diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 86d07df29437..750b618c0e84 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,8 +8,8 @@ /bigquery/ @googleapis/api-bigquery @googleapis/yoshi-go-admins /datastore/ @enocom @telpirion @googleapis/yoshi-go-admins /firestore/ @enocom @telpirion @googleapis/yoshi-go-admins -/pubsub/ @googleapis/api-pubsub @googleapis/yoshi-go-admins -/pubsublite/ @googleapis/api-pubsub @googleapis/yoshi-go-admins +/pubsub/ @googleapis/api-pubsub @googleapis/yoshi-go-admins @shollyman +/pubsublite/ @googleapis/api-pubsub @googleapis/yoshi-go-admins @shollyman /spanner/ @googleapis/api-spanner-go @googleapis/yoshi-go-admins /storage/ @googleapis/cloud-storage-dpe @googleapis/yoshi-go-admins /errorreporting/ @googleapis/api-logging @googleapis/yoshi-go-admins diff --git a/.github/ISSUE_TEMPLATE/migration-issue.md b/.github/ISSUE_TEMPLATE/migration-issue.md new file mode 100644 index 000000000000..f8247e5f6f28 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/migration-issue.md @@ -0,0 +1,32 @@ +--- +name: Migration Issue +about: Ask a question or report an issue related related to the go-genproto type migration +title: 'package: migration help' +labels: genproto-migration +assignees: '' + +--- + +## If you have not already please read our migration.md file for assistance. + +**Which client are you migrating** +e.g asset: google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1 + +**What issue are you having** +A clear and concise description of what is happening. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Relevant go.mod dependencies** +``` +/ /go.mod +require ( + cloud.google.com/go/asset v1.6.0 + google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 +) +``` + + +**Additional context** +Add any other context about the problem here. diff --git a/.github/header-checker-lint.yml b/.github/header-checker-lint.yml new file mode 100644 index 000000000000..92c3d36c7bf6 --- /dev/null +++ b/.github/header-checker-lint.yml @@ -0,0 +1,28 @@ +allowedCopyrightHolders: + - 'Google LLC' +allowedLicenses: + - 'Apache-2.0' +sourceFileExtensions: + - 'go' + - 'proto' +ignoreFiles: + # Automatically Generated + - "bigtable/cmd/cbt/cbtdoc.go" + # BSD license, which is compatible, is embedded in the file. + - "cmd/go-cloud-debug-agent/internal/debug/elf/elf.go" + # From https://github.com/golang/pkgsite. + - "third_party/pkgsite/print_type.go" + - "third_party/pkgsite/synopsis.go" + - "third_party/go/doc/comment.go" + - "third_party/go/doc/comment_test.go" + - "third_party/go/doc/doc.go" + - "third_party/go/doc/example.go" + - "third_party/go/doc/example_test.go" + - "third_party/go/doc/exports.go" + - "third_party/go/doc/filter.go" + - "third_party/go/doc/headscan.go" + - "third_party/go/doc/reader.go" + - "third_party/go/doc/synopsis.go" + - "third_party/go/doc/synopsis_test.go" + # Ignore all proto files + - "**/*.pb.go" diff --git a/.github/release-please.yml b/.github/release-please.yml index 0d16973549d3..3c7cdb141900 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,64 +1,77 @@ handleGHRelease: true manifest: true +releaseType: go-yoshi branches: - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: .release-please-manifest-submodules.json manifestConfig: release-please-config-yoshi-submodules.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: bigquery/.release-please-manifest.json manifestConfig: bigquery/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: bigtable/.release-please-manifest.json manifestConfig: bigtable/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: datastore/.release-please-manifest.json manifestConfig: datastore/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: errorreporting/.release-please-manifest.json manifestConfig: errorreporting/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: firestore/.release-please-manifest.json manifestConfig: firestore/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: logging/.release-please-manifest.json manifestConfig: logging/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: profiler/.release-please-manifest.json manifestConfig: profiler/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: pubsub/.release-please-manifest.json manifestConfig: pubsub/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: pubsublite/.release-please-manifest.json manifestConfig: pubsublite/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: spanner/.release-please-manifest.json manifestConfig: spanner/release-please-config.json - branch: main handleGHRelease: true manifest: true + releaseType: go-yoshi manifestFile: storage/.release-please-manifest.json manifestConfig: storage/release-please-config.json diff --git a/.github/renovate.json b/.github/renovate.json index 836214c66f80..a9588af211ab 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -11,7 +11,7 @@ ], "commitMessagePrefix": "chore(all): ", "commitMessageAction": "update", - "groupName": "everything", + "groupName": "all", "ignoreDeps": [ "google.golang.org/genproto", "github.com/google/martian/v3" diff --git a/.release-please-manifest-submodules.json b/.release-please-manifest-submodules.json index fa64b1a9b8f2..9db12f5bbdba 100644 --- a/.release-please-manifest-submodules.json +++ b/.release-please-manifest-submodules.json @@ -1,107 +1,111 @@ { - "accessapproval": "1.3.0", + "accessapproval": "1.3.1", "accesscontextmanager": "1.2.0", - "aiplatform": "1.14.0", - "analytics": "0.8.0", + "aiplatform": "1.21.0", + "analytics": "0.11.0", "apigateway": "1.2.0", "apigeeconnect": "1.2.0", + "apigeeregistry": "0.2.1", + "apikeys": "0.2.0", "appengine": "1.3.0", - "area120": "0.4.0", - "artifactregistry": "1.3.0", - "asset": "1.3.0", - "assuredworkloads": "1.0.0", - "automl": "1.4.0", + "area120": "0.5.0", + "artifactregistry": "1.6.0", + "asset": "1.6.0", + "assuredworkloads": "1.5.0", + "automl": "1.5.0", "baremetalsolution": "0.2.0", - "batch": "0.1.0", - "billing": "1.2.0", - "binaryauthorization": "1.0.0", - "certificatemanager": "0.2.0", + "batch": "0.2.1", + "beyondcorp": "0.1.1", + "billing": "1.4.0", + "binaryauthorization": "1.1.0", + "certificatemanager": "1.0.0", "channel": "1.7.0", "cloudbuild": "1.2.0", "clouddms": "1.2.0", - "cloudtasks": "1.4.0", - "compute": "1.7.0", - "contactcenterinsights": "1.2.0", - "container": "1.2.0", + "cloudtasks": "1.5.0", + "compute": "1.10.0", + "contactcenterinsights": "1.2.3", + "container": "1.4.0", "containeranalysis": "0.4.0", - "datacatalog": "1.3.0", - "dataflow": "0.5.0", + "datacatalog": "1.5.0", + "dataflow": "0.6.0", + "dataform": "0.3.0", "datafusion": "1.3.0", - "datalabeling": "0.3.0", - "dataplex": "1.0.0", + "datalabeling": "0.5.0", + "dataplex": "1.1.0", "dataproc": "1.5.0", - "dataqna": "0.4.0", - "datastream": "1.0.0", - "deploy": "1.2.0", - "dialogflow": "1.11.0", - "dlp": "1.4.0", - "documentai": "1.4.0", - "domains": "0.5.0", + "dataqna": "0.5.0", + "datastream": "1.2.0", + "deploy": "1.2.1", + "dialogflow": "1.15.0", + "dlp": "1.5.0", + "documentai": "1.7.0", + "domains": "0.6.0", "essentialcontacts": "1.2.0", "eventarc": "1.6.0", "filestore": "1.2.0", - "functions": "1.4.0", - "gaming": "1.3.0", + "functions": "1.6.0", + "gaming": "1.5.0", "gkebackup": "0.1.0", - "gkeconnect": "0.3.0", - "gkehub": "0.8.0", + "gkeconnect": "0.5.0", + "gkehub": "0.9.0", "gkemulticloud": "0.2.0", "grafeas": "0.2.0", "gsuiteaddons": "1.2.0", - "iam": "0.3.0", + "iam": "0.4.0", "iap": "1.3.0", "ids": "1.0.0", "iot": "1.2.0", "kms": "1.4.0", - "language": "1.3.0", - "lifesciences": "0.4.0", + "language": "1.4.0", + "lifesciences": "0.5.0", "managedidentities": "1.2.0", - "mediatranslation": "0.3.0", - "memcache": "1.3.0", - "metastore": "1.3.0", - "monitoring": "1.5.0", - "networkconnectivity": "1.2.0", + "mediatranslation": "0.5.0", + "memcache": "1.4.0", + "metastore": "1.5.0", + "monitoring": "1.6.0", + "networkconnectivity": "1.4.0", "networkmanagement": "1.3.0", - "networksecurity": "0.3.0", - "notebooks": "1.0.0", + "networksecurity": "0.5.0", + "notebooks": "1.2.0", "optimization": "1.0.0", "orchestration": "1.2.0", "orgpolicy": "1.3.0", - "osconfig": "1.6.0", - "oslogin": "1.3.0", - "phishingprotection": "0.4.0", + "osconfig": "1.7.0", + "oslogin": "1.4.0", + "phishingprotection": "0.5.0", "policytroubleshooter": "1.2.0", - "privatecatalog": "0.4.0", + "privatecatalog": "0.5.0", "recaptchaenterprise/v2": "2.0.1", - "recommendationengine": "0.2.0", - "recommender": "1.4.0", - "redis": "1.6.0", + "recommendationengine": "0.5.0", + "recommender": "1.5.0", + "redis": "1.7.0", "resourcemanager": "1.2.0", "resourcesettings": "1.2.0", - "retail": "1.4.0", - "run": "0.1.1", - "scheduler": "1.3.0", - "secretmanager": "1.5.0", - "security": "1.4.0", - "securitycenter": "1.8.0", + "retail": "1.8.0", + "run": "0.1.2", + "scheduler": "1.4.0", + "secretmanager": "1.6.0", + "security": "1.7.0", + "securitycenter": "1.13.0", "servicecontrol": "1.3.0", - "servicedirectory": "1.3.0", - "servicemanagement": "1.3.0", + "servicedirectory": "1.4.0", + "servicemanagement": "1.3.1", "serviceusage": "1.2.0", "shell": "1.2.0", - "speech": "1.5.0", - "storagetransfer": "1.3.0", - "talent": "0.9.0", + "speech": "1.6.0", + "storagetransfer": "1.4.0", + "talent": "1.1.0", "texttospeech": "1.3.0", "tpu": "1.2.0", "trace": "1.2.0", "translate": "1.2.0", "video": "1.7.0", - "videointelligence": "1.4.0", - "vision/v2": "2.0.0", - "vmmigration": "1.0.0", - "vpcaccess": "1.2.0", - "webrisk": "1.3.0", - "websecurityscanner": "1.2.0", - "workflows": "1.5.0" + "videointelligence": "1.6.0", + "vision/v2": "2.1.1", + "vmmigration": "1.1.0", + "vpcaccess": "1.3.0", + "webrisk": "1.4.0", + "websecurityscanner": "1.2.1", + "workflows": "1.6.0" } diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 52eec6a30755..d9c9389061b5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.102.1" + ".": "0.104.0" } diff --git a/CHANGES.md b/CHANGES.md index 0ced42279c60..8d00d2e952dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,19 @@ # Changes +## [0.104.0](https://github.com/googleapis/google-cloud-go/compare/v0.103.0...v0.104.0) (2022-08-24) + + +### Features + +* **godocfx:** add friendlyAPIName ([#6447](https://github.com/googleapis/google-cloud-go/issues/6447)) ([c6d3ba4](https://github.com/googleapis/google-cloud-go/commit/c6d3ba401b7b3ae9b710a8850c6ec5d49c4c1490)) + +## [0.103.0](https://github.com/googleapis/google-cloud-go/compare/v0.102.1...v0.103.0) (2022-06-29) + + +### Features + +* **privateca:** temporarily remove REGAPIC support ([199b725](https://github.com/googleapis/google-cloud-go/commit/199b7250f474b1a6f53dcf0aac0c2966f4987b68)) + ## [0.102.1](https://github.com/googleapis/google-cloud-go/compare/v0.102.0...v0.102.1) (2022-06-17) diff --git a/README.md b/README.md index 669cc7532702..01453cc692a5 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ For an updated list of all of our released APIs please see our Our libraries are compatible with at least the three most recent, major Go releases. They are currently compatible with: +- Go 1.19 - Go 1.18 - Go 1.17 - Go 1.16 diff --git a/accessapproval/CHANGES.md b/accessapproval/CHANGES.md index b248f7c8c47f..39f0a0222a88 100644 --- a/accessapproval/CHANGES.md +++ b/accessapproval/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [1.3.1](https://github.com/googleapis/google-cloud-go/compare/accessapproval/v1.3.0...accessapproval/v1.3.1) (2022-09-06) + + +### Documentation + +* **accessapproval:** added Cloud Dataproc and Secret Manager to the list of supported services ([3bc37e2](https://github.com/googleapis/google-cloud-go/commit/3bc37e28626df5f7ec37b00c0c2f0bfb91c30495)) + ## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/accessapproval/v1.2.0...accessapproval/v1.3.0) (2022-05-24) diff --git a/accessapproval/apiv1/access_approval_client.go b/accessapproval/apiv1/access_approval_client.go index 46dd206e6e4c..307618182489 100644 --- a/accessapproval/apiv1/access_approval_client.go +++ b/accessapproval/apiv1/access_approval_client.go @@ -128,12 +128,12 @@ type internalClient interface { // This API allows a customer to manage accesses to cloud resources by // Google personnel. It defines the following resource model: // -// The API has a collection of -// ApprovalRequest -// resources, named approvalRequests/{approval_request} +// The API has a collection of +// ApprovalRequest +// resources, named approvalRequests/{approval_request} // -// The API has top-level settings per Project/Folder/Organization, named -// accessApprovalSettings +// The API has top-level settings per Project/Folder/Organization, named +// accessApprovalSettings // // The service also periodically emails a list of recipients, defined at the // Project/Folder/Organization level in the accessApprovalSettings, when there @@ -184,7 +184,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -288,12 +289,12 @@ type gRPCClient struct { // This API allows a customer to manage accesses to cloud resources by // Google personnel. It defines the following resource model: // -// The API has a collection of -// ApprovalRequest -// resources, named approvalRequests/{approval_request} +// The API has a collection of +// ApprovalRequest +// resources, named approvalRequests/{approval_request} // -// The API has top-level settings per Project/Folder/Organization, named -// accessApprovalSettings +// The API has top-level settings per Project/Folder/Organization, named +// accessApprovalSettings // // The service also periodically emails a list of recipients, defined at the // Project/Folder/Organization level in the accessApprovalSettings, when there @@ -355,7 +356,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/accessapproval/apiv1/access_approval_client_example_test.go b/accessapproval/apiv1/access_approval_client_example_test.go index 69286e9906b0..40c1fdc260e7 100644 --- a/accessapproval/apiv1/access_approval_client_example_test.go +++ b/accessapproval/apiv1/access_approval_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_ListApprovalRequests() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleClient_ListApprovalRequests() { func ExampleClient_GetApprovalRequest() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleClient_GetApprovalRequest() { func ExampleClient_ApproveApprovalRequest() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleClient_ApproveApprovalRequest() { func ExampleClient_DismissApprovalRequest() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleClient_DismissApprovalRequest() { func ExampleClient_InvalidateApprovalRequest() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleClient_InvalidateApprovalRequest() { func ExampleClient_GetAccessApprovalSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleClient_GetAccessApprovalSettings() { func ExampleClient_UpdateAccessApprovalSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -184,6 +224,11 @@ func ExampleClient_UpdateAccessApprovalSettings() { func ExampleClient_DeleteAccessApprovalSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +247,11 @@ func ExampleClient_DeleteAccessApprovalSettings() { func ExampleClient_GetAccessApprovalServiceAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accessapproval.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/accessapproval/apiv1/doc.go b/accessapproval/apiv1/doc.go index 6a7f344b5834..5a252e389601 100644 --- a/accessapproval/apiv1/doc.go +++ b/accessapproval/apiv1/doc.go @@ -19,49 +19,60 @@ // // An API for controlling access to data by Google personnel. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := accessapproval.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := accessapproval.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := accessapproval.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &accessapprovalpb.ListApprovalRequestsMessage{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/accessapproval/v1#ListApprovalRequestsMessage. -// } -// it := c.ListApprovalRequests(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := accessapproval.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &accessapprovalpb.ListApprovalRequestsMessage{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/accessapproval/v1#ListApprovalRequestsMessage. +// } +// it := c.ListApprovalRequests(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/accessapproval/go.mod b/accessapproval/go.mod index d6b3563fc07a..d112adcf37ee 100644 --- a/accessapproval/go.mod +++ b/accessapproval/go.mod @@ -1,11 +1,25 @@ module cloud.google.com/go/accessapproval -go 1.16 +go 1.17 require ( github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/accessapproval/go.sum b/accessapproval/go.sum index a7f80a16a22d..19676af53bd6 100644 --- a/accessapproval/go.sum +++ b/accessapproval/go.sum @@ -161,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -289,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -310,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -496,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -584,8 +587,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf h1:Q5xNKbTSFwkuaaGaR7CMcXEM5sy19KYdUU8iF8/iRC0= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -616,8 +620,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -632,8 +637,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/accessapproval/internal/version.go b/accessapproval/internal/version.go index bb0feadfd279..38847e203664 100644 --- a/accessapproval/internal/version.go +++ b/accessapproval/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.3.0" +const Version = "1.3.1" diff --git a/accesscontextmanager/apiv1/access_context_manager_client.go b/accesscontextmanager/apiv1/access_context_manager_client.go index d60554650314..b602404cad26 100644 --- a/accesscontextmanager/apiv1/access_context_manager_client.go +++ b/accesscontextmanager/apiv1/access_context_manager_client.go @@ -195,7 +195,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -616,7 +617,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/accesscontextmanager/apiv1/access_context_manager_client_example_test.go b/accesscontextmanager/apiv1/access_context_manager_client_example_test.go index 5502de9161e6..31e6465700ac 100644 --- a/accesscontextmanager/apiv1/access_context_manager_client_example_test.go +++ b/accesscontextmanager/apiv1/access_context_manager_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_ListAccessPolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleClient_ListAccessPolicies() { func ExampleClient_GetAccessPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleClient_GetAccessPolicy() { func ExampleClient_CreateAccessPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleClient_CreateAccessPolicy() { func ExampleClient_UpdateAccessPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +159,11 @@ func ExampleClient_UpdateAccessPolicy() { func ExampleClient_DeleteAccessPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +187,11 @@ func ExampleClient_DeleteAccessPolicy() { func ExampleClient_ListAccessLevels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +218,11 @@ func ExampleClient_ListAccessLevels() { func ExampleClient_GetAccessLevel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +243,11 @@ func ExampleClient_GetAccessLevel() { func ExampleClient_CreateAccessLevel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +273,11 @@ func ExampleClient_CreateAccessLevel() { func ExampleClient_UpdateAccessLevel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -253,6 +303,11 @@ func ExampleClient_UpdateAccessLevel() { func ExampleClient_DeleteAccessLevel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +331,11 @@ func ExampleClient_DeleteAccessLevel() { func ExampleClient_ReplaceAccessLevels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -301,6 +361,11 @@ func ExampleClient_ReplaceAccessLevels() { func ExampleClient_ListServicePerimeters() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -327,6 +392,11 @@ func ExampleClient_ListServicePerimeters() { func ExampleClient_GetServicePerimeter() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +417,11 @@ func ExampleClient_GetServicePerimeter() { func ExampleClient_CreateServicePerimeter() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +447,11 @@ func ExampleClient_CreateServicePerimeter() { func ExampleClient_UpdateServicePerimeter() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -397,6 +477,11 @@ func ExampleClient_UpdateServicePerimeter() { func ExampleClient_DeleteServicePerimeter() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -420,6 +505,11 @@ func ExampleClient_DeleteServicePerimeter() { func ExampleClient_ReplaceServicePerimeters() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -445,6 +535,11 @@ func ExampleClient_ReplaceServicePerimeters() { func ExampleClient_CommitServicePerimeters() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -470,6 +565,11 @@ func ExampleClient_CommitServicePerimeters() { func ExampleClient_ListGcpUserAccessBindings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -496,6 +596,11 @@ func ExampleClient_ListGcpUserAccessBindings() { func ExampleClient_GetGcpUserAccessBinding() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -516,6 +621,11 @@ func ExampleClient_GetGcpUserAccessBinding() { func ExampleClient_CreateGcpUserAccessBinding() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -541,6 +651,11 @@ func ExampleClient_CreateGcpUserAccessBinding() { func ExampleClient_UpdateGcpUserAccessBinding() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -566,6 +681,11 @@ func ExampleClient_UpdateGcpUserAccessBinding() { func ExampleClient_DeleteGcpUserAccessBinding() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := accesscontextmanager.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/accesscontextmanager/apiv1/doc.go b/accesscontextmanager/apiv1/doc.go index 56c910a4e85b..2f10cb3fd2c6 100644 --- a/accesscontextmanager/apiv1/doc.go +++ b/accesscontextmanager/apiv1/doc.go @@ -20,49 +20,60 @@ // An API for setting attribute based access control to requests to GCP // services. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := accesscontextmanager.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := accesscontextmanager.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := accesscontextmanager.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &accesscontextmanagerpb.ListAccessPoliciesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListAccessPoliciesRequest. -// } -// it := c.ListAccessPolicies(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := accesscontextmanager.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &accesscontextmanagerpb.ListAccessPoliciesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1#ListAccessPoliciesRequest. +// } +// it := c.ListAccessPolicies(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/accesscontextmanager/go.mod b/accesscontextmanager/go.mod index 63a5789b7bf8..e197a04c9eb7 100644 --- a/accesscontextmanager/go.mod +++ b/accesscontextmanager/go.mod @@ -5,10 +5,10 @@ go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/accesscontextmanager/go.sum b/accesscontextmanager/go.sum index f00d995cec43..fe8755ea9d8f 100644 --- a/accesscontextmanager/go.sum +++ b/accesscontextmanager/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +621,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +638,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/aiplatform/CHANGES.md b/aiplatform/CHANGES.md index b3876cda69cb..88b148db8eea 100644 --- a/aiplatform/CHANGES.md +++ b/aiplatform/CHANGES.md @@ -1,6 +1,59 @@ # Changes +## [1.21.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.20.0...aiplatform/v1.21.0) (2022-09-19) + + +### Features + +* **aiplatform:** add deleteFeatureValues in aiplatform v1beta1 featurestore_service.proto ([bc7a5f6](https://github.com/googleapis/google-cloud-go/commit/bc7a5f609994f73e26f72a78f0ff14aa75c1c227)) + +## [1.20.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.19.0...aiplatform/v1.20.0) (2022-09-15) + + +### Features + +* **aiplatform/apiv1beta1:** add REST transport ([f7b0822](https://github.com/googleapis/google-cloud-go/commit/f7b082212b1e46ff2f4126b52d49618785c2e8ca)) + +## [1.19.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.18.0...aiplatform/v1.19.0) (2022-09-08) + + +### Features + +* **aiplatform:** add model_monitoring_stats_anomalies,model_monitoring_status to BatchPredictionJob in aiplatform v1beta1 batch_prediction_job.proto ([e45ad9a](https://github.com/googleapis/google-cloud-go/commit/e45ad9af568c59151decc0dacedf137653b576dd)) + +## [1.18.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.17.0...aiplatform/v1.18.0) (2022-09-06) + + +### Features + +* **aiplatform:** add read_mask to ListPipelineJobsRequest in aiplatform v1 pipeline_service feat: add input_artifacts to PipelineJob.runtime_config in aiplatform v1 pipeline_job ([3bc37e2](https://github.com/googleapis/google-cloud-go/commit/3bc37e28626df5f7ec37b00c0c2f0bfb91c30495)) +* **aiplatform:** add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1 index_service.proto ([204b856](https://github.com/googleapis/google-cloud-go/commit/204b85632f2556ab2c74020250850b53f6a405ff)) +* **aiplatform:** add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1beta1 index_service.proto ([204b856](https://github.com/googleapis/google-cloud-go/commit/204b85632f2556ab2c74020250850b53f6a405ff)) + +## [1.17.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.16.0...aiplatform/v1.17.0) (2022-08-18) + + +### Features + +* **aiplatform:** add WriteFeatureValues in aiplatform v1beta1 featurestore_online_service.proto ([370e23e](https://github.com/googleapis/google-cloud-go/commit/370e23eaa342a7055a8d8b6f8fe9420f83afe43e)) + +## [1.16.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.15.0...aiplatform/v1.16.0) (2022-08-02) + + +### Features + +* **aiplatform:** add DeploymentResourcePool in aiplatform v1beta1 deployment_resource_pool.proto feat: add DeploymentResourcePoolService in aiplatform v1beta1 deployment_resource_pool_service.proto feat: add SHARED_RESOURCES to DeploymentResourcesType in aiplatform v1beta1 model.proto ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) +* **aiplatform:** making network arg optional in aiplatform v1 custom_job.proto feat: added SHARED_RESOURCES enum to aiplatform v1 model.proto docs: doc edits to aiplatform v1 dataset_service.proto, job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) +* **aiplatform:** making network arg optional in aiplatform v1beta1 custom_job.proto feat: DeploymentResourcePool and DeployementResourcePoolService added to aiplatform v1beta1 model.proto (cl/463147866) docs: doc edits to aiplatform v1beta1 job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) + +## [1.15.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.14.0...aiplatform/v1.15.0) (2022-07-26) + + +### Features + +* **aiplatform:** add a DeploymentResourcePool API resource_definition feat: add shared_resources for supported prediction_resources ([8a8ba85](https://github.com/googleapis/google-cloud-go/commit/8a8ba85311f85701c97fd7c10f1d88b738ce423f)) + ## [1.14.0](https://github.com/googleapis/google-cloud-go/compare/aiplatform/v1.13.0...aiplatform/v1.14.0) (2022-06-29) diff --git a/aiplatform/apiv1/dataset_client.go b/aiplatform/apiv1/dataset_client.go index 51b6a7a5383a..3e9f1ee0ccec 100644 --- a/aiplatform/apiv1/dataset_client.go +++ b/aiplatform/apiv1/dataset_client.go @@ -171,7 +171,8 @@ func (c *DatasetClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DatasetClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -402,7 +403,8 @@ func NewDatasetClient(ctx context.Context, opts ...option.ClientOption) (*Datase // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *datasetGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/dataset_client_example_test.go b/aiplatform/apiv1/dataset_client_example_test.go index b94f366c3f28..31ebf428c85e 100644 --- a/aiplatform/apiv1/dataset_client_example_test.go +++ b/aiplatform/apiv1/dataset_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewDatasetClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewDatasetClient() { func ExampleDatasetClient_CreateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleDatasetClient_CreateDataset() { func ExampleDatasetClient_GetDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleDatasetClient_GetDataset() { func ExampleDatasetClient_UpdateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleDatasetClient_UpdateDataset() { func ExampleDatasetClient_ListDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +157,11 @@ func ExampleDatasetClient_ListDatasets() { func ExampleDatasetClient_DeleteDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +185,11 @@ func ExampleDatasetClient_DeleteDataset() { func ExampleDatasetClient_ImportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +215,11 @@ func ExampleDatasetClient_ImportData() { func ExampleDatasetClient_ExportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +245,11 @@ func ExampleDatasetClient_ExportData() { func ExampleDatasetClient_ListDataItems() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -231,6 +276,11 @@ func ExampleDatasetClient_ListDataItems() { func ExampleDatasetClient_ListSavedQueries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -257,6 +307,11 @@ func ExampleDatasetClient_ListSavedQueries() { func ExampleDatasetClient_GetAnnotationSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -277,6 +332,11 @@ func ExampleDatasetClient_GetAnnotationSpec() { func ExampleDatasetClient_ListAnnotations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -303,6 +363,11 @@ func ExampleDatasetClient_ListAnnotations() { func ExampleDatasetClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -323,6 +388,11 @@ func ExampleDatasetClient_GetLocation() { func ExampleDatasetClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -349,6 +419,11 @@ func ExampleDatasetClient_ListLocations() { func ExampleDatasetClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -369,6 +444,11 @@ func ExampleDatasetClient_GetIamPolicy() { func ExampleDatasetClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -389,6 +469,11 @@ func ExampleDatasetClient_SetIamPolicy() { func ExampleDatasetClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -409,6 +494,11 @@ func ExampleDatasetClient_TestIamPermissions() { func ExampleDatasetClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -427,6 +517,11 @@ func ExampleDatasetClient_CancelOperation() { func ExampleDatasetClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -445,6 +540,11 @@ func ExampleDatasetClient_DeleteOperation() { func ExampleDatasetClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -465,6 +565,11 @@ func ExampleDatasetClient_GetOperation() { func ExampleDatasetClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -491,6 +596,11 @@ func ExampleDatasetClient_ListOperations() { func ExampleDatasetClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/doc.go b/aiplatform/apiv1/doc.go index cf849b216288..bcf4432db43d 100644 --- a/aiplatform/apiv1/doc.go +++ b/aiplatform/apiv1/doc.go @@ -20,50 +20,61 @@ // Train high-quality custom machine learning models with minimal machine // learning expertise and effort. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := aiplatform.NewDatasetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := aiplatform.NewDatasetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := aiplatform.NewDatasetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &aiplatformpb.CreateDatasetRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDatasetRequest. -// } -// op, err := c.CreateDataset(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := aiplatform.NewDatasetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &aiplatformpb.CreateDatasetRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateDatasetRequest. +// } +// op, err := c.CreateDataset(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewDatasetClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/aiplatform/apiv1/endpoint_client.go b/aiplatform/apiv1/endpoint_client.go index 7e2a7caef1eb..ee5a6f2f6aac 100644 --- a/aiplatform/apiv1/endpoint_client.go +++ b/aiplatform/apiv1/endpoint_client.go @@ -158,7 +158,8 @@ func (c *EndpointClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *EndpointClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -369,7 +370,8 @@ func NewEndpointClient(ctx context.Context, opts ...option.ClientOption) (*Endpo // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *endpointGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/endpoint_client_example_test.go b/aiplatform/apiv1/endpoint_client_example_test.go index a3853c78dce5..333e312e1f75 100644 --- a/aiplatform/apiv1/endpoint_client_example_test.go +++ b/aiplatform/apiv1/endpoint_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewEndpointClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewEndpointClient() { func ExampleEndpointClient_CreateEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleEndpointClient_CreateEndpoint() { func ExampleEndpointClient_GetEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleEndpointClient_GetEndpoint() { func ExampleEndpointClient_ListEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleEndpointClient_ListEndpoints() { func ExampleEndpointClient_UpdateEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +157,11 @@ func ExampleEndpointClient_UpdateEndpoint() { func ExampleEndpointClient_DeleteEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +185,11 @@ func ExampleEndpointClient_DeleteEndpoint() { func ExampleEndpointClient_DeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +215,11 @@ func ExampleEndpointClient_DeployModel() { func ExampleEndpointClient_UndeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +245,11 @@ func ExampleEndpointClient_UndeployModel() { func ExampleEndpointClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +270,11 @@ func ExampleEndpointClient_GetLocation() { func ExampleEndpointClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -251,6 +301,11 @@ func ExampleEndpointClient_ListLocations() { func ExampleEndpointClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +326,11 @@ func ExampleEndpointClient_GetIamPolicy() { func ExampleEndpointClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +351,11 @@ func ExampleEndpointClient_SetIamPolicy() { func ExampleEndpointClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -311,6 +376,11 @@ func ExampleEndpointClient_TestIamPermissions() { func ExampleEndpointClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -329,6 +399,11 @@ func ExampleEndpointClient_CancelOperation() { func ExampleEndpointClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +422,11 @@ func ExampleEndpointClient_DeleteOperation() { func ExampleEndpointClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -367,6 +447,11 @@ func ExampleEndpointClient_GetOperation() { func ExampleEndpointClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -393,6 +478,11 @@ func ExampleEndpointClient_ListOperations() { func ExampleEndpointClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/featurestore_client.go b/aiplatform/apiv1/featurestore_client.go index b448d23fdcd9..f3d1e94c6e9d 100644 --- a/aiplatform/apiv1/featurestore_client.go +++ b/aiplatform/apiv1/featurestore_client.go @@ -204,7 +204,8 @@ func (c *FeaturestoreClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FeaturestoreClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -352,15 +353,15 @@ func (c *FeaturestoreClient) DeleteFeatureOperation(name string) *DeleteFeatureO // // There are also scenarios where the caller can cause inconsistency. // -// Source data for import contains multiple distinct Feature values for -// the same entity ID and timestamp. +// Source data for import contains multiple distinct Feature values for +// the same entity ID and timestamp. // -// Source is modified during an import. This includes adding, updating, or -// removing source data and/or metadata. Examples of updating metadata -// include but are not limited to changing storage location, storage class, -// or retention policy. +// Source is modified during an import. This includes adding, updating, or +// removing source data and/or metadata. Examples of updating metadata +// include but are not limited to changing storage location, storage class, +// or retention policy. // -// Online serving cluster is under-provisioned. +// Online serving cluster is under-provisioned. func (c *FeaturestoreClient) ImportFeatureValues(ctx context.Context, req *aiplatformpb.ImportFeatureValuesRequest, opts ...gax.CallOption) (*ImportFeatureValuesOperation, error) { return c.internalClient.ImportFeatureValues(ctx, req, opts...) } @@ -549,7 +550,8 @@ func NewFeaturestoreClient(ctx context.Context, opts ...option.ClientOption) (*F // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *featurestoreGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/featurestore_client_example_test.go b/aiplatform/apiv1/featurestore_client_example_test.go index c99c22cc723d..cfab953fbfb8 100644 --- a/aiplatform/apiv1/featurestore_client_example_test.go +++ b/aiplatform/apiv1/featurestore_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewFeaturestoreClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewFeaturestoreClient() { func ExampleFeaturestoreClient_CreateFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleFeaturestoreClient_CreateFeaturestore() { func ExampleFeaturestoreClient_GetFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleFeaturestoreClient_GetFeaturestore() { func ExampleFeaturestoreClient_ListFeaturestores() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleFeaturestoreClient_ListFeaturestores() { func ExampleFeaturestoreClient_UpdateFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +162,11 @@ func ExampleFeaturestoreClient_UpdateFeaturestore() { func ExampleFeaturestoreClient_DeleteFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +190,11 @@ func ExampleFeaturestoreClient_DeleteFeaturestore() { func ExampleFeaturestoreClient_CreateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -185,6 +220,11 @@ func ExampleFeaturestoreClient_CreateEntityType() { func ExampleFeaturestoreClient_GetEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +245,11 @@ func ExampleFeaturestoreClient_GetEntityType() { func ExampleFeaturestoreClient_ListEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -231,6 +276,11 @@ func ExampleFeaturestoreClient_ListEntityTypes() { func ExampleFeaturestoreClient_UpdateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -251,6 +301,11 @@ func ExampleFeaturestoreClient_UpdateEntityType() { func ExampleFeaturestoreClient_DeleteEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -274,6 +329,11 @@ func ExampleFeaturestoreClient_DeleteEntityType() { func ExampleFeaturestoreClient_CreateFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -299,6 +359,11 @@ func ExampleFeaturestoreClient_CreateFeature() { func ExampleFeaturestoreClient_BatchCreateFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -324,6 +389,11 @@ func ExampleFeaturestoreClient_BatchCreateFeatures() { func ExampleFeaturestoreClient_GetFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -344,6 +414,11 @@ func ExampleFeaturestoreClient_GetFeature() { func ExampleFeaturestoreClient_ListFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -370,6 +445,11 @@ func ExampleFeaturestoreClient_ListFeatures() { func ExampleFeaturestoreClient_UpdateFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -390,6 +470,11 @@ func ExampleFeaturestoreClient_UpdateFeature() { func ExampleFeaturestoreClient_DeleteFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -413,6 +498,11 @@ func ExampleFeaturestoreClient_DeleteFeature() { func ExampleFeaturestoreClient_ImportFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +528,11 @@ func ExampleFeaturestoreClient_ImportFeatureValues() { func ExampleFeaturestoreClient_BatchReadFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -463,6 +558,11 @@ func ExampleFeaturestoreClient_BatchReadFeatureValues() { func ExampleFeaturestoreClient_ExportFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -488,6 +588,11 @@ func ExampleFeaturestoreClient_ExportFeatureValues() { func ExampleFeaturestoreClient_SearchFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -514,6 +619,11 @@ func ExampleFeaturestoreClient_SearchFeatures() { func ExampleFeaturestoreClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -534,6 +644,11 @@ func ExampleFeaturestoreClient_GetLocation() { func ExampleFeaturestoreClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -560,6 +675,11 @@ func ExampleFeaturestoreClient_ListLocations() { func ExampleFeaturestoreClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -580,6 +700,11 @@ func ExampleFeaturestoreClient_GetIamPolicy() { func ExampleFeaturestoreClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -600,6 +725,11 @@ func ExampleFeaturestoreClient_SetIamPolicy() { func ExampleFeaturestoreClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -620,6 +750,11 @@ func ExampleFeaturestoreClient_TestIamPermissions() { func ExampleFeaturestoreClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -638,6 +773,11 @@ func ExampleFeaturestoreClient_CancelOperation() { func ExampleFeaturestoreClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -656,6 +796,11 @@ func ExampleFeaturestoreClient_DeleteOperation() { func ExampleFeaturestoreClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -676,6 +821,11 @@ func ExampleFeaturestoreClient_GetOperation() { func ExampleFeaturestoreClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -702,6 +852,11 @@ func ExampleFeaturestoreClient_ListOperations() { func ExampleFeaturestoreClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/featurestore_online_serving_client.go b/aiplatform/apiv1/featurestore_online_serving_client.go index b1846f41305a..4e09adb79846 100644 --- a/aiplatform/apiv1/featurestore_online_serving_client.go +++ b/aiplatform/apiv1/featurestore_online_serving_client.go @@ -131,7 +131,8 @@ func (c *FeaturestoreOnlineServingClient) setGoogleClientInfo(keyval ...string) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FeaturestoreOnlineServingClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -280,7 +281,8 @@ func NewFeaturestoreOnlineServingClient(ctx context.Context, opts ...option.Clie // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *featurestoreOnlineServingGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/featurestore_online_serving_client_example_test.go b/aiplatform/apiv1/featurestore_online_serving_client_example_test.go index 2e0df3b54b1b..3d7fe7891eba 100644 --- a/aiplatform/apiv1/featurestore_online_serving_client_example_test.go +++ b/aiplatform/apiv1/featurestore_online_serving_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewFeaturestoreOnlineServingClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewFeaturestoreOnlineServingClient() { func ExampleFeaturestoreOnlineServingClient_ReadFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleFeaturestoreOnlineServingClient_ReadFeatureValues() { func ExampleFeaturestoreOnlineServingClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleFeaturestoreOnlineServingClient_GetLocation() { func ExampleFeaturestoreOnlineServingClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleFeaturestoreOnlineServingClient_ListLocations() { func ExampleFeaturestoreOnlineServingClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleFeaturestoreOnlineServingClient_GetIamPolicy() { func ExampleFeaturestoreOnlineServingClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +177,11 @@ func ExampleFeaturestoreOnlineServingClient_SetIamPolicy() { func ExampleFeaturestoreOnlineServingClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +202,11 @@ func ExampleFeaturestoreOnlineServingClient_TestIamPermissions() { func ExampleFeaturestoreOnlineServingClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -185,6 +225,11 @@ func ExampleFeaturestoreOnlineServingClient_CancelOperation() { func ExampleFeaturestoreOnlineServingClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +248,11 @@ func ExampleFeaturestoreOnlineServingClient_DeleteOperation() { func ExampleFeaturestoreOnlineServingClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -223,6 +273,11 @@ func ExampleFeaturestoreOnlineServingClient_GetOperation() { func ExampleFeaturestoreOnlineServingClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -249,6 +304,11 @@ func ExampleFeaturestoreOnlineServingClient_ListOperations() { func ExampleFeaturestoreOnlineServingClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/gapic_metadata.json b/aiplatform/apiv1/gapic_metadata.json index 14d14b7b5e09..4d80866a2927 100644 --- a/aiplatform/apiv1/gapic_metadata.json +++ b/aiplatform/apiv1/gapic_metadata.json @@ -600,6 +600,11 @@ "ListOperations" ] }, + "RemoveDatapoints": { + "methods": [ + "RemoveDatapoints" + ] + }, "SetIamPolicy": { "methods": [ "SetIamPolicy" @@ -615,6 +620,11 @@ "UpdateIndex" ] }, + "UpsertDatapoints": { + "methods": [ + "UpsertDatapoints" + ] + }, "WaitOperation": { "methods": [ "WaitOperation" diff --git a/aiplatform/apiv1/index_client.go b/aiplatform/apiv1/index_client.go index 6bf7c693ca2c..fc7426c0fee7 100644 --- a/aiplatform/apiv1/index_client.go +++ b/aiplatform/apiv1/index_client.go @@ -48,6 +48,8 @@ type IndexCallOptions struct { ListIndexes []gax.CallOption UpdateIndex []gax.CallOption DeleteIndex []gax.CallOption + UpsertDatapoints []gax.CallOption + RemoveDatapoints []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption @@ -79,6 +81,8 @@ func defaultIndexCallOptions() *IndexCallOptions { ListIndexes: []gax.CallOption{}, UpdateIndex: []gax.CallOption{}, DeleteIndex: []gax.CallOption{}, + UpsertDatapoints: []gax.CallOption{}, + RemoveDatapoints: []gax.CallOption{}, GetLocation: []gax.CallOption{}, ListLocations: []gax.CallOption{}, GetIamPolicy: []gax.CallOption{}, @@ -105,6 +109,8 @@ type internalIndexClient interface { UpdateIndexOperation(name string) *UpdateIndexOperation DeleteIndex(context.Context, *aiplatformpb.DeleteIndexRequest, ...gax.CallOption) (*DeleteIndexOperation, error) DeleteIndexOperation(name string) *DeleteIndexOperation + UpsertDatapoints(context.Context, *aiplatformpb.UpsertDatapointsRequest, ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) + RemoveDatapoints(context.Context, *aiplatformpb.RemoveDatapointsRequest, ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) @@ -151,7 +157,8 @@ func (c *IndexClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *IndexClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -201,6 +208,16 @@ func (c *IndexClient) DeleteIndexOperation(name string) *DeleteIndexOperation { return c.internalClient.DeleteIndexOperation(name) } +// UpsertDatapoints add/update Datapoints into an Index. +func (c *IndexClient) UpsertDatapoints(ctx context.Context, req *aiplatformpb.UpsertDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) { + return c.internalClient.UpsertDatapoints(ctx, req, opts...) +} + +// RemoveDatapoints remove Datapoints from an Index. +func (c *IndexClient) RemoveDatapoints(ctx context.Context, req *aiplatformpb.RemoveDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) { + return c.internalClient.RemoveDatapoints(ctx, req, opts...) +} + // GetLocation gets information about a location. func (c *IndexClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { return c.internalClient.GetLocation(ctx, req, opts...) @@ -347,7 +364,8 @@ func NewIndexClient(ctx context.Context, opts ...option.ClientOption) (*IndexCli // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *indexGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -486,6 +504,40 @@ func (c *indexGRPCClient) DeleteIndex(ctx context.Context, req *aiplatformpb.Del }, nil } +func (c *indexGRPCClient) UpsertDatapoints(ctx context.Context, req *aiplatformpb.UpsertDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index", url.QueryEscape(req.GetIndex()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpsertDatapoints[0:len((*c.CallOptions).UpsertDatapoints):len((*c.CallOptions).UpsertDatapoints)], opts...) + var resp *aiplatformpb.UpsertDatapointsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.indexClient.UpsertDatapoints(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *indexGRPCClient) RemoveDatapoints(ctx context.Context, req *aiplatformpb.RemoveDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index", url.QueryEscape(req.GetIndex()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RemoveDatapoints[0:len((*c.CallOptions).RemoveDatapoints):len((*c.CallOptions).RemoveDatapoints)], opts...) + var resp *aiplatformpb.RemoveDatapointsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.indexClient.RemoveDatapoints(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *indexGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) diff --git a/aiplatform/apiv1/index_client_example_test.go b/aiplatform/apiv1/index_client_example_test.go index 51821e77919e..2797f884878a 100644 --- a/aiplatform/apiv1/index_client_example_test.go +++ b/aiplatform/apiv1/index_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewIndexClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewIndexClient() { func ExampleIndexClient_CreateIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleIndexClient_CreateIndex() { func ExampleIndexClient_GetIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleIndexClient_GetIndex() { func ExampleIndexClient_ListIndexes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleIndexClient_ListIndexes() { func ExampleIndexClient_UpdateIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +162,11 @@ func ExampleIndexClient_UpdateIndex() { func ExampleIndexClient_DeleteIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -158,8 +188,63 @@ func ExampleIndexClient_DeleteIndex() { } } +func ExampleIndexClient_UpsertDatapoints() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewIndexClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpsertDatapointsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpsertDatapointsRequest. + } + resp, err := c.UpsertDatapoints(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIndexClient_RemoveDatapoints() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewIndexClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.RemoveDatapointsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#RemoveDatapointsRequest. + } + resp, err := c.RemoveDatapoints(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleIndexClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +265,11 @@ func ExampleIndexClient_GetLocation() { func ExampleIndexClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -206,6 +296,11 @@ func ExampleIndexClient_ListLocations() { func ExampleIndexClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +321,11 @@ func ExampleIndexClient_GetIamPolicy() { func ExampleIndexClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +346,11 @@ func ExampleIndexClient_SetIamPolicy() { func ExampleIndexClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +371,11 @@ func ExampleIndexClient_TestIamPermissions() { func ExampleIndexClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -284,6 +394,11 @@ func ExampleIndexClient_CancelOperation() { func ExampleIndexClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +417,11 @@ func ExampleIndexClient_DeleteOperation() { func ExampleIndexClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +442,11 @@ func ExampleIndexClient_GetOperation() { func ExampleIndexClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -348,6 +473,11 @@ func ExampleIndexClient_ListOperations() { func ExampleIndexClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/index_endpoint_client.go b/aiplatform/apiv1/index_endpoint_client.go index de41bc7e6368..a24decc1a55d 100644 --- a/aiplatform/apiv1/index_endpoint_client.go +++ b/aiplatform/apiv1/index_endpoint_client.go @@ -162,7 +162,8 @@ func (c *IndexEndpointClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *IndexEndpointClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -386,7 +387,8 @@ func NewIndexEndpointClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *indexEndpointGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/index_endpoint_client_example_test.go b/aiplatform/apiv1/index_endpoint_client_example_test.go index fceedf95a525..130a723c733b 100644 --- a/aiplatform/apiv1/index_endpoint_client_example_test.go +++ b/aiplatform/apiv1/index_endpoint_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewIndexEndpointClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewIndexEndpointClient() { func ExampleIndexEndpointClient_CreateIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleIndexEndpointClient_CreateIndexEndpoint() { func ExampleIndexEndpointClient_GetIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleIndexEndpointClient_GetIndexEndpoint() { func ExampleIndexEndpointClient_ListIndexEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleIndexEndpointClient_ListIndexEndpoints() { func ExampleIndexEndpointClient_UpdateIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +157,11 @@ func ExampleIndexEndpointClient_UpdateIndexEndpoint() { func ExampleIndexEndpointClient_DeleteIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +185,11 @@ func ExampleIndexEndpointClient_DeleteIndexEndpoint() { func ExampleIndexEndpointClient_DeployIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +215,11 @@ func ExampleIndexEndpointClient_DeployIndex() { func ExampleIndexEndpointClient_UndeployIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +245,11 @@ func ExampleIndexEndpointClient_UndeployIndex() { func ExampleIndexEndpointClient_MutateDeployedIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -230,6 +275,11 @@ func ExampleIndexEndpointClient_MutateDeployedIndex() { func ExampleIndexEndpointClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -250,6 +300,11 @@ func ExampleIndexEndpointClient_GetLocation() { func ExampleIndexEndpointClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +331,11 @@ func ExampleIndexEndpointClient_ListLocations() { func ExampleIndexEndpointClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -296,6 +356,11 @@ func ExampleIndexEndpointClient_GetIamPolicy() { func ExampleIndexEndpointClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -316,6 +381,11 @@ func ExampleIndexEndpointClient_SetIamPolicy() { func ExampleIndexEndpointClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -336,6 +406,11 @@ func ExampleIndexEndpointClient_TestIamPermissions() { func ExampleIndexEndpointClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -354,6 +429,11 @@ func ExampleIndexEndpointClient_CancelOperation() { func ExampleIndexEndpointClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +452,11 @@ func ExampleIndexEndpointClient_DeleteOperation() { func ExampleIndexEndpointClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -392,6 +477,11 @@ func ExampleIndexEndpointClient_GetOperation() { func ExampleIndexEndpointClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -418,6 +508,11 @@ func ExampleIndexEndpointClient_ListOperations() { func ExampleIndexEndpointClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/job_client.go b/aiplatform/apiv1/job_client.go index e90ba2984df0..9f4467953a9f 100644 --- a/aiplatform/apiv1/job_client.go +++ b/aiplatform/apiv1/job_client.go @@ -223,7 +223,8 @@ func (c *JobClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *JobClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -585,7 +586,8 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *jobGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/job_client_example_test.go b/aiplatform/apiv1/job_client_example_test.go index eea5671cdf14..07576a1c4a23 100644 --- a/aiplatform/apiv1/job_client_example_test.go +++ b/aiplatform/apiv1/job_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewJobClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewJobClient() { func ExampleJobClient_CreateCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleJobClient_CreateCustomJob() { func ExampleJobClient_GetCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleJobClient_GetCustomJob() { func ExampleJobClient_ListCustomJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleJobClient_ListCustomJobs() { func ExampleJobClient_DeleteCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleJobClient_DeleteCustomJob() { func ExampleJobClient_CancelCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -148,6 +178,11 @@ func ExampleJobClient_CancelCustomJob() { func ExampleJobClient_CreateDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -168,6 +203,11 @@ func ExampleJobClient_CreateDataLabelingJob() { func ExampleJobClient_GetDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +228,11 @@ func ExampleJobClient_GetDataLabelingJob() { func ExampleJobClient_ListDataLabelingJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +259,11 @@ func ExampleJobClient_ListDataLabelingJobs() { func ExampleJobClient_DeleteDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -237,6 +287,11 @@ func ExampleJobClient_DeleteDataLabelingJob() { func ExampleJobClient_CancelDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -255,6 +310,11 @@ func ExampleJobClient_CancelDataLabelingJob() { func ExampleJobClient_CreateHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -275,6 +335,11 @@ func ExampleJobClient_CreateHyperparameterTuningJob() { func ExampleJobClient_GetHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -295,6 +360,11 @@ func ExampleJobClient_GetHyperparameterTuningJob() { func ExampleJobClient_ListHyperparameterTuningJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +391,11 @@ func ExampleJobClient_ListHyperparameterTuningJobs() { func ExampleJobClient_DeleteHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -344,6 +419,11 @@ func ExampleJobClient_DeleteHyperparameterTuningJob() { func ExampleJobClient_CancelHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -362,6 +442,11 @@ func ExampleJobClient_CancelHyperparameterTuningJob() { func ExampleJobClient_CreateBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -382,6 +467,11 @@ func ExampleJobClient_CreateBatchPredictionJob() { func ExampleJobClient_GetBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -402,6 +492,11 @@ func ExampleJobClient_GetBatchPredictionJob() { func ExampleJobClient_ListBatchPredictionJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -428,6 +523,11 @@ func ExampleJobClient_ListBatchPredictionJobs() { func ExampleJobClient_DeleteBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -451,6 +551,11 @@ func ExampleJobClient_DeleteBatchPredictionJob() { func ExampleJobClient_CancelBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -469,6 +574,11 @@ func ExampleJobClient_CancelBatchPredictionJob() { func ExampleJobClient_CreateModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -489,6 +599,11 @@ func ExampleJobClient_CreateModelDeploymentMonitoringJob() { func ExampleJobClient_SearchModelDeploymentMonitoringStatsAnomalies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -515,6 +630,11 @@ func ExampleJobClient_SearchModelDeploymentMonitoringStatsAnomalies() { func ExampleJobClient_GetModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -535,6 +655,11 @@ func ExampleJobClient_GetModelDeploymentMonitoringJob() { func ExampleJobClient_ListModelDeploymentMonitoringJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -561,6 +686,11 @@ func ExampleJobClient_ListModelDeploymentMonitoringJobs() { func ExampleJobClient_UpdateModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -586,6 +716,11 @@ func ExampleJobClient_UpdateModelDeploymentMonitoringJob() { func ExampleJobClient_DeleteModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -609,6 +744,11 @@ func ExampleJobClient_DeleteModelDeploymentMonitoringJob() { func ExampleJobClient_PauseModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -627,6 +767,11 @@ func ExampleJobClient_PauseModelDeploymentMonitoringJob() { func ExampleJobClient_ResumeModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -645,6 +790,11 @@ func ExampleJobClient_ResumeModelDeploymentMonitoringJob() { func ExampleJobClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -665,6 +815,11 @@ func ExampleJobClient_GetLocation() { func ExampleJobClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -691,6 +846,11 @@ func ExampleJobClient_ListLocations() { func ExampleJobClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -711,6 +871,11 @@ func ExampleJobClient_GetIamPolicy() { func ExampleJobClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -731,6 +896,11 @@ func ExampleJobClient_SetIamPolicy() { func ExampleJobClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -751,6 +921,11 @@ func ExampleJobClient_TestIamPermissions() { func ExampleJobClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -769,6 +944,11 @@ func ExampleJobClient_CancelOperation() { func ExampleJobClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -787,6 +967,11 @@ func ExampleJobClient_DeleteOperation() { func ExampleJobClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -807,6 +992,11 @@ func ExampleJobClient_GetOperation() { func ExampleJobClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -833,6 +1023,11 @@ func ExampleJobClient_ListOperations() { func ExampleJobClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/metadata_client.go b/aiplatform/apiv1/metadata_client.go index f1e131c49cdb..a351d459508d 100644 --- a/aiplatform/apiv1/metadata_client.go +++ b/aiplatform/apiv1/metadata_client.go @@ -234,7 +234,8 @@ func (c *MetadataClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MetadataClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -602,7 +603,8 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *metadataGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/metadata_client_example_test.go b/aiplatform/apiv1/metadata_client_example_test.go index 151f4026b656..4d8b1b5bd9a4 100644 --- a/aiplatform/apiv1/metadata_client_example_test.go +++ b/aiplatform/apiv1/metadata_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewMetadataClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewMetadataClient() { func ExampleMetadataClient_CreateMetadataStore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleMetadataClient_CreateMetadataStore() { func ExampleMetadataClient_GetMetadataStore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleMetadataClient_GetMetadataStore() { func ExampleMetadataClient_ListMetadataStores() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleMetadataClient_ListMetadataStores() { func ExampleMetadataClient_DeleteMetadataStore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +160,11 @@ func ExampleMetadataClient_DeleteMetadataStore() { func ExampleMetadataClient_CreateArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +185,11 @@ func ExampleMetadataClient_CreateArtifact() { func ExampleMetadataClient_GetArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -175,6 +210,11 @@ func ExampleMetadataClient_GetArtifact() { func ExampleMetadataClient_ListArtifacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -201,6 +241,11 @@ func ExampleMetadataClient_ListArtifacts() { func ExampleMetadataClient_UpdateArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -221,6 +266,11 @@ func ExampleMetadataClient_UpdateArtifact() { func ExampleMetadataClient_DeleteArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -244,6 +294,11 @@ func ExampleMetadataClient_DeleteArtifact() { func ExampleMetadataClient_PurgeArtifacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -269,6 +324,11 @@ func ExampleMetadataClient_PurgeArtifacts() { func ExampleMetadataClient_CreateContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +349,11 @@ func ExampleMetadataClient_CreateContext() { func ExampleMetadataClient_GetContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -309,6 +374,11 @@ func ExampleMetadataClient_GetContext() { func ExampleMetadataClient_ListContexts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -335,6 +405,11 @@ func ExampleMetadataClient_ListContexts() { func ExampleMetadataClient_UpdateContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -355,6 +430,11 @@ func ExampleMetadataClient_UpdateContext() { func ExampleMetadataClient_DeleteContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -378,6 +458,11 @@ func ExampleMetadataClient_DeleteContext() { func ExampleMetadataClient_PurgeContexts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -403,6 +488,11 @@ func ExampleMetadataClient_PurgeContexts() { func ExampleMetadataClient_AddContextArtifactsAndExecutions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -423,6 +513,11 @@ func ExampleMetadataClient_AddContextArtifactsAndExecutions() { func ExampleMetadataClient_AddContextChildren() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -443,6 +538,11 @@ func ExampleMetadataClient_AddContextChildren() { func ExampleMetadataClient_QueryContextLineageSubgraph() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -463,6 +563,11 @@ func ExampleMetadataClient_QueryContextLineageSubgraph() { func ExampleMetadataClient_CreateExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -483,6 +588,11 @@ func ExampleMetadataClient_CreateExecution() { func ExampleMetadataClient_GetExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -503,6 +613,11 @@ func ExampleMetadataClient_GetExecution() { func ExampleMetadataClient_ListExecutions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -529,6 +644,11 @@ func ExampleMetadataClient_ListExecutions() { func ExampleMetadataClient_UpdateExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -549,6 +669,11 @@ func ExampleMetadataClient_UpdateExecution() { func ExampleMetadataClient_DeleteExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -572,6 +697,11 @@ func ExampleMetadataClient_DeleteExecution() { func ExampleMetadataClient_PurgeExecutions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -597,6 +727,11 @@ func ExampleMetadataClient_PurgeExecutions() { func ExampleMetadataClient_AddExecutionEvents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -617,6 +752,11 @@ func ExampleMetadataClient_AddExecutionEvents() { func ExampleMetadataClient_QueryExecutionInputsAndOutputs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -637,6 +777,11 @@ func ExampleMetadataClient_QueryExecutionInputsAndOutputs() { func ExampleMetadataClient_CreateMetadataSchema() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -657,6 +802,11 @@ func ExampleMetadataClient_CreateMetadataSchema() { func ExampleMetadataClient_GetMetadataSchema() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -677,6 +827,11 @@ func ExampleMetadataClient_GetMetadataSchema() { func ExampleMetadataClient_ListMetadataSchemas() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -703,6 +858,11 @@ func ExampleMetadataClient_ListMetadataSchemas() { func ExampleMetadataClient_QueryArtifactLineageSubgraph() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -723,6 +883,11 @@ func ExampleMetadataClient_QueryArtifactLineageSubgraph() { func ExampleMetadataClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -743,6 +908,11 @@ func ExampleMetadataClient_GetLocation() { func ExampleMetadataClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -769,6 +939,11 @@ func ExampleMetadataClient_ListLocations() { func ExampleMetadataClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -789,6 +964,11 @@ func ExampleMetadataClient_GetIamPolicy() { func ExampleMetadataClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -809,6 +989,11 @@ func ExampleMetadataClient_SetIamPolicy() { func ExampleMetadataClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -829,6 +1014,11 @@ func ExampleMetadataClient_TestIamPermissions() { func ExampleMetadataClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -847,6 +1037,11 @@ func ExampleMetadataClient_CancelOperation() { func ExampleMetadataClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -865,6 +1060,11 @@ func ExampleMetadataClient_DeleteOperation() { func ExampleMetadataClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -885,6 +1085,11 @@ func ExampleMetadataClient_GetOperation() { func ExampleMetadataClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -911,6 +1116,11 @@ func ExampleMetadataClient_ListOperations() { func ExampleMetadataClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/migration_client.go b/aiplatform/apiv1/migration_client.go index ad8248a244ef..2cbb9d7aa5e7 100644 --- a/aiplatform/apiv1/migration_client.go +++ b/aiplatform/apiv1/migration_client.go @@ -141,7 +141,8 @@ func (c *MigrationClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MigrationClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -312,7 +313,8 @@ func NewMigrationClient(ctx context.Context, opts ...option.ClientOption) (*Migr // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *migrationGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/migration_client_example_test.go b/aiplatform/apiv1/migration_client_example_test.go index 32d6b3621697..c6b7a46c4155 100644 --- a/aiplatform/apiv1/migration_client_example_test.go +++ b/aiplatform/apiv1/migration_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewMigrationClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewMigrationClient() { func ExampleMigrationClient_SearchMigratableResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -67,6 +77,11 @@ func ExampleMigrationClient_SearchMigratableResources() { func ExampleMigrationClient_BatchMigrateResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -92,6 +107,11 @@ func ExampleMigrationClient_BatchMigrateResources() { func ExampleMigrationClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleMigrationClient_GetLocation() { func ExampleMigrationClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +163,11 @@ func ExampleMigrationClient_ListLocations() { func ExampleMigrationClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +188,11 @@ func ExampleMigrationClient_GetIamPolicy() { func ExampleMigrationClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -178,6 +213,11 @@ func ExampleMigrationClient_SetIamPolicy() { func ExampleMigrationClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -198,6 +238,11 @@ func ExampleMigrationClient_TestIamPermissions() { func ExampleMigrationClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -216,6 +261,11 @@ func ExampleMigrationClient_CancelOperation() { func ExampleMigrationClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -234,6 +284,11 @@ func ExampleMigrationClient_DeleteOperation() { func ExampleMigrationClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -254,6 +309,11 @@ func ExampleMigrationClient_GetOperation() { func ExampleMigrationClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -280,6 +340,11 @@ func ExampleMigrationClient_ListOperations() { func ExampleMigrationClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/model_client.go b/aiplatform/apiv1/model_client.go index 6b1865eba979..8e897965c9e7 100644 --- a/aiplatform/apiv1/model_client.go +++ b/aiplatform/apiv1/model_client.go @@ -182,7 +182,8 @@ func (c *ModelClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ModelClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -442,7 +443,8 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *modelGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/model_client_example_test.go b/aiplatform/apiv1/model_client_example_test.go index 5084f87ea0bc..5363df34ff4a 100644 --- a/aiplatform/apiv1/model_client_example_test.go +++ b/aiplatform/apiv1/model_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewModelClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewModelClient() { func ExampleModelClient_UploadModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleModelClient_UploadModel() { func ExampleModelClient_GetModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleModelClient_GetModel() { func ExampleModelClient_ListModels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleModelClient_ListModels() { func ExampleModelClient_ListModelVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +163,11 @@ func ExampleModelClient_ListModelVersions() { func ExampleModelClient_UpdateModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +188,11 @@ func ExampleModelClient_UpdateModel() { func ExampleModelClient_DeleteModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -181,6 +216,11 @@ func ExampleModelClient_DeleteModel() { func ExampleModelClient_DeleteModelVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -204,6 +244,11 @@ func ExampleModelClient_DeleteModelVersion() { func ExampleModelClient_MergeVersionAliases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -224,6 +269,11 @@ func ExampleModelClient_MergeVersionAliases() { func ExampleModelClient_ExportModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -249,6 +299,11 @@ func ExampleModelClient_ExportModel() { func ExampleModelClient_ImportModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -269,6 +324,11 @@ func ExampleModelClient_ImportModelEvaluation() { func ExampleModelClient_BatchImportModelEvaluationSlices() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +349,11 @@ func ExampleModelClient_BatchImportModelEvaluationSlices() { func ExampleModelClient_GetModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -309,6 +374,11 @@ func ExampleModelClient_GetModelEvaluation() { func ExampleModelClient_ListModelEvaluations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -335,6 +405,11 @@ func ExampleModelClient_ListModelEvaluations() { func ExampleModelClient_GetModelEvaluationSlice() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -355,6 +430,11 @@ func ExampleModelClient_GetModelEvaluationSlice() { func ExampleModelClient_ListModelEvaluationSlices() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -381,6 +461,11 @@ func ExampleModelClient_ListModelEvaluationSlices() { func ExampleModelClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -401,6 +486,11 @@ func ExampleModelClient_GetLocation() { func ExampleModelClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -427,6 +517,11 @@ func ExampleModelClient_ListLocations() { func ExampleModelClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -447,6 +542,11 @@ func ExampleModelClient_GetIamPolicy() { func ExampleModelClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -467,6 +567,11 @@ func ExampleModelClient_SetIamPolicy() { func ExampleModelClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -487,6 +592,11 @@ func ExampleModelClient_TestIamPermissions() { func ExampleModelClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -505,6 +615,11 @@ func ExampleModelClient_CancelOperation() { func ExampleModelClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -523,6 +638,11 @@ func ExampleModelClient_DeleteOperation() { func ExampleModelClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -543,6 +663,11 @@ func ExampleModelClient_GetOperation() { func ExampleModelClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -569,6 +694,11 @@ func ExampleModelClient_ListOperations() { func ExampleModelClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/pipeline_client.go b/aiplatform/apiv1/pipeline_client.go index 6668af5f76e8..c9db75fd6732 100644 --- a/aiplatform/apiv1/pipeline_client.go +++ b/aiplatform/apiv1/pipeline_client.go @@ -167,7 +167,8 @@ func (c *PipelineClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PipelineClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -401,7 +402,8 @@ func NewPipelineClient(ctx context.Context, opts ...option.ClientOption) (*Pipel // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *pipelineGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/pipeline_client_example_test.go b/aiplatform/apiv1/pipeline_client_example_test.go index f67d14e9bc1c..c3e6b8eecaca 100644 --- a/aiplatform/apiv1/pipeline_client_example_test.go +++ b/aiplatform/apiv1/pipeline_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewPipelineClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewPipelineClient() { func ExamplePipelineClient_CreateTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExamplePipelineClient_CreateTrainingPipeline() { func ExamplePipelineClient_GetTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExamplePipelineClient_GetTrainingPipeline() { func ExamplePipelineClient_ListTrainingPipelines() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExamplePipelineClient_ListTrainingPipelines() { func ExamplePipelineClient_DeleteTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExamplePipelineClient_DeleteTrainingPipeline() { func ExamplePipelineClient_CancelTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -148,6 +178,11 @@ func ExamplePipelineClient_CancelTrainingPipeline() { func ExamplePipelineClient_CreatePipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -168,6 +203,11 @@ func ExamplePipelineClient_CreatePipelineJob() { func ExamplePipelineClient_GetPipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +228,11 @@ func ExamplePipelineClient_GetPipelineJob() { func ExamplePipelineClient_ListPipelineJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +259,11 @@ func ExamplePipelineClient_ListPipelineJobs() { func ExamplePipelineClient_DeletePipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -237,6 +287,11 @@ func ExamplePipelineClient_DeletePipelineJob() { func ExamplePipelineClient_CancelPipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -255,6 +310,11 @@ func ExamplePipelineClient_CancelPipelineJob() { func ExamplePipelineClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -275,6 +335,11 @@ func ExamplePipelineClient_GetLocation() { func ExamplePipelineClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -301,6 +366,11 @@ func ExamplePipelineClient_ListLocations() { func ExamplePipelineClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +391,11 @@ func ExamplePipelineClient_GetIamPolicy() { func ExamplePipelineClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -341,6 +416,11 @@ func ExamplePipelineClient_SetIamPolicy() { func ExamplePipelineClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -361,6 +441,11 @@ func ExamplePipelineClient_TestIamPermissions() { func ExamplePipelineClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -379,6 +464,11 @@ func ExamplePipelineClient_CancelOperation() { func ExamplePipelineClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -397,6 +487,11 @@ func ExamplePipelineClient_DeleteOperation() { func ExamplePipelineClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -417,6 +512,11 @@ func ExamplePipelineClient_GetOperation() { func ExamplePipelineClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -443,6 +543,11 @@ func ExamplePipelineClient_ListOperations() { func ExamplePipelineClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/prediction_client.go b/aiplatform/apiv1/prediction_client.go index abe706291a7c..cb8c1efc0b2c 100644 --- a/aiplatform/apiv1/prediction_client.go +++ b/aiplatform/apiv1/prediction_client.go @@ -135,7 +135,8 @@ func (c *PredictionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PredictionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -149,11 +150,11 @@ func (c *PredictionClient) Predict(ctx context.Context, req *aiplatformpb.Predic // // The response includes the following HTTP headers: // -// X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this -// prediction. +// X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this +// prediction. // -// X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel -// that served this prediction. +// X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel +// that served this prediction. func (c *PredictionClient) RawPredict(ctx context.Context, req *aiplatformpb.RawPredictRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { return c.internalClient.RawPredict(ctx, req, opts...) } @@ -302,7 +303,8 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *predictionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/prediction_client_example_test.go b/aiplatform/apiv1/prediction_client_example_test.go index e19866fe1b2f..369ebfa477df 100644 --- a/aiplatform/apiv1/prediction_client_example_test.go +++ b/aiplatform/apiv1/prediction_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewPredictionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewPredictionClient() { func ExamplePredictionClient_Predict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExamplePredictionClient_Predict() { func ExamplePredictionClient_RawPredict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExamplePredictionClient_RawPredict() { func ExamplePredictionClient_Explain() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExamplePredictionClient_Explain() { func ExamplePredictionClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -121,6 +146,11 @@ func ExamplePredictionClient_GetLocation() { func ExamplePredictionClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +177,11 @@ func ExamplePredictionClient_ListLocations() { func ExamplePredictionClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +202,11 @@ func ExamplePredictionClient_GetIamPolicy() { func ExamplePredictionClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -187,6 +227,11 @@ func ExamplePredictionClient_SetIamPolicy() { func ExamplePredictionClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +252,11 @@ func ExamplePredictionClient_TestIamPermissions() { func ExamplePredictionClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +275,11 @@ func ExamplePredictionClient_CancelOperation() { func ExamplePredictionClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -243,6 +298,11 @@ func ExamplePredictionClient_DeleteOperation() { func ExamplePredictionClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -263,6 +323,11 @@ func ExamplePredictionClient_GetOperation() { func ExamplePredictionClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +354,11 @@ func ExamplePredictionClient_ListOperations() { func ExamplePredictionClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/specialist_pool_client.go b/aiplatform/apiv1/specialist_pool_client.go index 8e4e0d389c01..2d5c6951698b 100644 --- a/aiplatform/apiv1/specialist_pool_client.go +++ b/aiplatform/apiv1/specialist_pool_client.go @@ -156,7 +156,8 @@ func (c *SpecialistPoolClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SpecialistPoolClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -355,7 +356,8 @@ func NewSpecialistPoolClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *specialistPoolGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/specialist_pool_client_example_test.go b/aiplatform/apiv1/specialist_pool_client_example_test.go index db4a3da8e001..b3075e005ad4 100644 --- a/aiplatform/apiv1/specialist_pool_client_example_test.go +++ b/aiplatform/apiv1/specialist_pool_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewSpecialistPoolClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewSpecialistPoolClient() { func ExampleSpecialistPoolClient_CreateSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleSpecialistPoolClient_CreateSpecialistPool() { func ExampleSpecialistPoolClient_GetSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleSpecialistPoolClient_GetSpecialistPool() { func ExampleSpecialistPoolClient_ListSpecialistPools() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleSpecialistPoolClient_ListSpecialistPools() { func ExampleSpecialistPoolClient_DeleteSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +160,11 @@ func ExampleSpecialistPoolClient_DeleteSpecialistPool() { func ExampleSpecialistPoolClient_UpdateSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +190,11 @@ func ExampleSpecialistPoolClient_UpdateSpecialistPool() { func ExampleSpecialistPoolClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +215,11 @@ func ExampleSpecialistPoolClient_GetLocation() { func ExampleSpecialistPoolClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -206,6 +246,11 @@ func ExampleSpecialistPoolClient_ListLocations() { func ExampleSpecialistPoolClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +271,11 @@ func ExampleSpecialistPoolClient_GetIamPolicy() { func ExampleSpecialistPoolClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +296,11 @@ func ExampleSpecialistPoolClient_SetIamPolicy() { func ExampleSpecialistPoolClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +321,11 @@ func ExampleSpecialistPoolClient_TestIamPermissions() { func ExampleSpecialistPoolClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -284,6 +344,11 @@ func ExampleSpecialistPoolClient_CancelOperation() { func ExampleSpecialistPoolClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +367,11 @@ func ExampleSpecialistPoolClient_DeleteOperation() { func ExampleSpecialistPoolClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +392,11 @@ func ExampleSpecialistPoolClient_GetOperation() { func ExampleSpecialistPoolClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -348,6 +423,11 @@ func ExampleSpecialistPoolClient_ListOperations() { func ExampleSpecialistPoolClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/tensorboard_client.go b/aiplatform/apiv1/tensorboard_client.go index 05486cd9f45b..009dec35b8a1 100644 --- a/aiplatform/apiv1/tensorboard_client.go +++ b/aiplatform/apiv1/tensorboard_client.go @@ -223,7 +223,8 @@ func (c *TensorboardClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TensorboardClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -566,7 +567,8 @@ func NewTensorboardClient(ctx context.Context, opts ...option.ClientOption) (*Te // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *tensorboardGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/tensorboard_client_example_test.go b/aiplatform/apiv1/tensorboard_client_example_test.go index 54b149914439..5cc67bafb839 100644 --- a/aiplatform/apiv1/tensorboard_client_example_test.go +++ b/aiplatform/apiv1/tensorboard_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewTensorboardClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewTensorboardClient() { func ExampleTensorboardClient_CreateTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleTensorboardClient_CreateTensorboard() { func ExampleTensorboardClient_GetTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleTensorboardClient_GetTensorboard() { func ExampleTensorboardClient_UpdateTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -111,6 +131,11 @@ func ExampleTensorboardClient_UpdateTensorboard() { func ExampleTensorboardClient_ListTensorboards() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +162,11 @@ func ExampleTensorboardClient_ListTensorboards() { func ExampleTensorboardClient_DeleteTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +190,11 @@ func ExampleTensorboardClient_DeleteTensorboard() { func ExampleTensorboardClient_CreateTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +215,11 @@ func ExampleTensorboardClient_CreateTensorboardExperiment() { func ExampleTensorboardClient_GetTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -200,6 +240,11 @@ func ExampleTensorboardClient_GetTensorboardExperiment() { func ExampleTensorboardClient_UpdateTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -220,6 +265,11 @@ func ExampleTensorboardClient_UpdateTensorboardExperiment() { func ExampleTensorboardClient_ListTensorboardExperiments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +296,11 @@ func ExampleTensorboardClient_ListTensorboardExperiments() { func ExampleTensorboardClient_DeleteTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -269,6 +324,11 @@ func ExampleTensorboardClient_DeleteTensorboardExperiment() { func ExampleTensorboardClient_CreateTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +349,11 @@ func ExampleTensorboardClient_CreateTensorboardRun() { func ExampleTensorboardClient_BatchCreateTensorboardRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -309,6 +374,11 @@ func ExampleTensorboardClient_BatchCreateTensorboardRuns() { func ExampleTensorboardClient_GetTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -329,6 +399,11 @@ func ExampleTensorboardClient_GetTensorboardRun() { func ExampleTensorboardClient_UpdateTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -349,6 +424,11 @@ func ExampleTensorboardClient_UpdateTensorboardRun() { func ExampleTensorboardClient_ListTensorboardRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -375,6 +455,11 @@ func ExampleTensorboardClient_ListTensorboardRuns() { func ExampleTensorboardClient_DeleteTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -398,6 +483,11 @@ func ExampleTensorboardClient_DeleteTensorboardRun() { func ExampleTensorboardClient_BatchCreateTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -418,6 +508,11 @@ func ExampleTensorboardClient_BatchCreateTensorboardTimeSeries() { func ExampleTensorboardClient_CreateTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +533,11 @@ func ExampleTensorboardClient_CreateTensorboardTimeSeries() { func ExampleTensorboardClient_GetTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -458,6 +558,11 @@ func ExampleTensorboardClient_GetTensorboardTimeSeries() { func ExampleTensorboardClient_UpdateTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -478,6 +583,11 @@ func ExampleTensorboardClient_UpdateTensorboardTimeSeries() { func ExampleTensorboardClient_ListTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -504,6 +614,11 @@ func ExampleTensorboardClient_ListTensorboardTimeSeries() { func ExampleTensorboardClient_DeleteTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -527,6 +642,11 @@ func ExampleTensorboardClient_DeleteTensorboardTimeSeries() { func ExampleTensorboardClient_BatchReadTensorboardTimeSeriesData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -547,6 +667,11 @@ func ExampleTensorboardClient_BatchReadTensorboardTimeSeriesData() { func ExampleTensorboardClient_ReadTensorboardTimeSeriesData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -567,6 +692,11 @@ func ExampleTensorboardClient_ReadTensorboardTimeSeriesData() { func ExampleTensorboardClient_WriteTensorboardExperimentData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -587,6 +717,11 @@ func ExampleTensorboardClient_WriteTensorboardExperimentData() { func ExampleTensorboardClient_WriteTensorboardRunData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -607,6 +742,11 @@ func ExampleTensorboardClient_WriteTensorboardRunData() { func ExampleTensorboardClient_ExportTensorboardTimeSeriesData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -633,6 +773,11 @@ func ExampleTensorboardClient_ExportTensorboardTimeSeriesData() { func ExampleTensorboardClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -653,6 +798,11 @@ func ExampleTensorboardClient_GetLocation() { func ExampleTensorboardClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -679,6 +829,11 @@ func ExampleTensorboardClient_ListLocations() { func ExampleTensorboardClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -699,6 +854,11 @@ func ExampleTensorboardClient_GetIamPolicy() { func ExampleTensorboardClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -719,6 +879,11 @@ func ExampleTensorboardClient_SetIamPolicy() { func ExampleTensorboardClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -739,6 +904,11 @@ func ExampleTensorboardClient_TestIamPermissions() { func ExampleTensorboardClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -757,6 +927,11 @@ func ExampleTensorboardClient_CancelOperation() { func ExampleTensorboardClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -775,6 +950,11 @@ func ExampleTensorboardClient_DeleteOperation() { func ExampleTensorboardClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -795,6 +975,11 @@ func ExampleTensorboardClient_GetOperation() { func ExampleTensorboardClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -821,6 +1006,11 @@ func ExampleTensorboardClient_ListOperations() { func ExampleTensorboardClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1/vizier_client.go b/aiplatform/apiv1/vizier_client.go index b658f86ba70f..63bb74b25b14 100644 --- a/aiplatform/apiv1/vizier_client.go +++ b/aiplatform/apiv1/vizier_client.go @@ -184,7 +184,8 @@ func (c *VizierClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VizierClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -439,7 +440,8 @@ func NewVizierClient(ctx context.Context, opts ...option.ClientOption) (*VizierC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *vizierGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/aiplatform/apiv1/vizier_client_example_test.go b/aiplatform/apiv1/vizier_client_example_test.go index 1636dff3a3ce..6a4637e846c5 100644 --- a/aiplatform/apiv1/vizier_client_example_test.go +++ b/aiplatform/apiv1/vizier_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewVizierClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewVizierClient() { func ExampleVizierClient_CreateStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleVizierClient_CreateStudy() { func ExampleVizierClient_GetStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleVizierClient_GetStudy() { func ExampleVizierClient_ListStudies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleVizierClient_ListStudies() { func ExampleVizierClient_DeleteStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleVizierClient_DeleteStudy() { func ExampleVizierClient_LookupStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -145,6 +175,11 @@ func ExampleVizierClient_LookupStudy() { func ExampleVizierClient_SuggestTrials() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleVizierClient_SuggestTrials() { func ExampleVizierClient_CreateTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleVizierClient_CreateTrial() { func ExampleVizierClient_GetTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -210,6 +255,11 @@ func ExampleVizierClient_GetTrial() { func ExampleVizierClient_ListTrials() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -236,6 +286,11 @@ func ExampleVizierClient_ListTrials() { func ExampleVizierClient_AddTrialMeasurement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -256,6 +311,11 @@ func ExampleVizierClient_AddTrialMeasurement() { func ExampleVizierClient_CompleteTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +336,11 @@ func ExampleVizierClient_CompleteTrial() { func ExampleVizierClient_DeleteTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -294,6 +359,11 @@ func ExampleVizierClient_DeleteTrial() { func ExampleVizierClient_CheckTrialEarlyStoppingState() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -319,6 +389,11 @@ func ExampleVizierClient_CheckTrialEarlyStoppingState() { func ExampleVizierClient_StopTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -339,6 +414,11 @@ func ExampleVizierClient_StopTrial() { func ExampleVizierClient_ListOptimalTrials() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -359,6 +439,11 @@ func ExampleVizierClient_ListOptimalTrials() { func ExampleVizierClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -379,6 +464,11 @@ func ExampleVizierClient_GetLocation() { func ExampleVizierClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -405,6 +495,11 @@ func ExampleVizierClient_ListLocations() { func ExampleVizierClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -425,6 +520,11 @@ func ExampleVizierClient_GetIamPolicy() { func ExampleVizierClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -445,6 +545,11 @@ func ExampleVizierClient_SetIamPolicy() { func ExampleVizierClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -465,6 +570,11 @@ func ExampleVizierClient_TestIamPermissions() { func ExampleVizierClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -483,6 +593,11 @@ func ExampleVizierClient_CancelOperation() { func ExampleVizierClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -501,6 +616,11 @@ func ExampleVizierClient_DeleteOperation() { func ExampleVizierClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -521,6 +641,11 @@ func ExampleVizierClient_GetOperation() { func ExampleVizierClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -547,6 +672,11 @@ func ExampleVizierClient_ListOperations() { func ExampleVizierClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/dataset_client.go b/aiplatform/apiv1beta1/dataset_client.go index 2c50f31b4d65..4e8bc8dae3d1 100644 --- a/aiplatform/apiv1beta1/dataset_client.go +++ b/aiplatform/apiv1beta1/dataset_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -104,6 +110,32 @@ func defaultDatasetCallOptions() *DatasetCallOptions { } } +func defaultDatasetRESTCallOptions() *DatasetCallOptions { + return &DatasetCallOptions{ + CreateDataset: []gax.CallOption{}, + GetDataset: []gax.CallOption{}, + UpdateDataset: []gax.CallOption{}, + ListDatasets: []gax.CallOption{}, + DeleteDataset: []gax.CallOption{}, + ImportData: []gax.CallOption{}, + ExportData: []gax.CallOption{}, + ListDataItems: []gax.CallOption{}, + ListSavedQueries: []gax.CallOption{}, + GetAnnotationSpec: []gax.CallOption{}, + ListAnnotations: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalDatasetClient is an interface that defines the methods available from Vertex AI API. type internalDatasetClient interface { Close() error @@ -171,7 +203,8 @@ func (c *DatasetClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DatasetClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -402,7 +435,8 @@ func NewDatasetClient(ctx context.Context, opts ...option.ClientOption) (*Datase // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *datasetGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -422,6 +456,90 @@ func (c *datasetGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type datasetRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing DatasetClient + CallOptions **DatasetCallOptions +} + +// NewDatasetRESTClient creates a new dataset service rest client. +// +// The service that handles the CRUD of Vertex AI Dataset and its child +// resources. +func NewDatasetRESTClient(ctx context.Context, opts ...option.ClientOption) (*DatasetClient, error) { + clientOpts := append(defaultDatasetRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultDatasetRESTCallOptions() + c := &datasetRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &DatasetClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultDatasetRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *datasetRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *datasetRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *datasetRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *datasetGRPCClient) CreateDataset(ctx context.Context, req *aiplatformpb.CreateDatasetRequest, opts ...gax.CallOption) (*CreateDatasetOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -982,167 +1100,1660 @@ func (c *datasetGRPCClient) WaitOperation(ctx context.Context, req *longrunningp return resp, nil } -// CreateDatasetOperation manages a long-running operation from CreateDataset. -type CreateDatasetOperation struct { - lro *longrunning.Operation -} - -// CreateDatasetOperation returns a new CreateDatasetOperation from a given name. -// The name must be that of a previously created CreateDatasetOperation, possibly from a different process. -func (c *datasetGRPCClient) CreateDatasetOperation(name string) *CreateDatasetOperation { - return &CreateDatasetOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error) { - var resp aiplatformpb.Dataset - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateDataset creates a Dataset. +func (c *datasetRESTClient) CreateDataset(ctx context.Context, req *aiplatformpb.CreateDatasetRequest, opts ...gax.CallOption) (*CreateDatasetOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDataset() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error) { - var resp aiplatformpb.Dataset - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/datasets", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateDatasetOperation) Metadata() (*aiplatformpb.CreateDatasetOperationMetadata, error) { - var meta aiplatformpb.CreateDatasetOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Done reports whether the long-running operation has completed. -func (op *CreateDatasetOperation) Done() bool { - return op.lro.Done() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateDatasetOperation) Name() string { - return op.lro.Name() -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteDatasetOperation manages a long-running operation from DeleteDataset. -type DeleteDatasetOperation struct { - lro *longrunning.Operation -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// DeleteDatasetOperation returns a new DeleteDatasetOperation from a given name. -// The name must be that of a previously created DeleteDatasetOperation, possibly from a different process. -func (c *datasetGRPCClient) DeleteDatasetOperation(name string) *DeleteDatasetOperation { - return &DeleteDatasetOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteDatasetOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetDataset gets a Dataset. +func (c *datasetRESTClient) GetDataset(ctx context.Context, req *aiplatformpb.GetDatasetRequest, opts ...gax.CallOption) (*aiplatformpb.Dataset, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteDatasetOperation) Done() bool { - return op.lro.Done() -} + params := url.Values{} + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, err + } + params.Add("readMask", string(readMask)) + } -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteDatasetOperation) Name() string { - return op.lro.Name() -} + baseUrl.RawQuery = params.Encode() -// ExportDataOperation manages a long-running operation from ExportData. -type ExportDataOperation struct { - lro *longrunning.Operation -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// ExportDataOperation returns a new ExportDataOperation from a given name. -// The name must be that of a previously created ExportDataOperation, possibly from a different process. -func (c *datasetGRPCClient) ExportDataOperation(name string) *ExportDataOperation { - return &ExportDataOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetDataset[0:len((*c.CallOptions).GetDataset):len((*c.CallOptions).GetDataset)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Dataset{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } + return resp, nil } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error) { - var resp aiplatformpb.ExportDataResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// UpdateDataset updates a Dataset. +func (c *datasetRESTClient) UpdateDataset(ctx context.Context, req *aiplatformpb.UpdateDatasetRequest, opts ...gax.CallOption) (*aiplatformpb.Dataset, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDataset() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetDataset().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "dataset.name", url.QueryEscape(req.GetDataset().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateDataset[0:len((*c.CallOptions).UpdateDataset):len((*c.CallOptions).UpdateDataset)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Dataset{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListDatasets lists Datasets in a Location. +func (c *datasetRESTClient) ListDatasets(ctx context.Context, req *aiplatformpb.ListDatasetsRequest, opts ...gax.CallOption) *DatasetIterator { + it := &DatasetIterator{} + req = proto.Clone(req).(*aiplatformpb.ListDatasetsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Dataset, string, error) { + resp := &aiplatformpb.ListDatasetsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/datasets", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDatasets(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteDataset deletes a Dataset. +func (c *datasetRESTClient) DeleteDataset(ctx context.Context, req *aiplatformpb.DeleteDatasetRequest, opts ...gax.CallOption) (*DeleteDatasetOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ImportData imports data into a Dataset. +func (c *datasetRESTClient) ImportData(ctx context.Context, req *aiplatformpb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:import", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &ImportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ExportData exports data from a Dataset. +func (c *datasetRESTClient) ExportData(ctx context.Context, req *aiplatformpb.ExportDataRequest, opts ...gax.CallOption) (*ExportDataOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:export", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &ExportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListDataItems lists DataItems in a Dataset. +func (c *datasetRESTClient) ListDataItems(ctx context.Context, req *aiplatformpb.ListDataItemsRequest, opts ...gax.CallOption) *DataItemIterator { + it := &DataItemIterator{} + req = proto.Clone(req).(*aiplatformpb.ListDataItemsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.DataItem, string, error) { + resp := &aiplatformpb.ListDataItemsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/dataItems", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDataItems(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListSavedQueries lists SavedQueries in a Dataset. +func (c *datasetRESTClient) ListSavedQueries(ctx context.Context, req *aiplatformpb.ListSavedQueriesRequest, opts ...gax.CallOption) *SavedQueryIterator { + it := &SavedQueryIterator{} + req = proto.Clone(req).(*aiplatformpb.ListSavedQueriesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.SavedQuery, string, error) { + resp := &aiplatformpb.ListSavedQueriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/savedQueries", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetSavedQueries(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetAnnotationSpec gets an AnnotationSpec. +func (c *datasetRESTClient) GetAnnotationSpec(ctx context.Context, req *aiplatformpb.GetAnnotationSpecRequest, opts ...gax.CallOption) (*aiplatformpb.AnnotationSpec, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAnnotationSpec[0:len((*c.CallOptions).GetAnnotationSpec):len((*c.CallOptions).GetAnnotationSpec)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.AnnotationSpec{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAnnotations lists Annotations belongs to a dataitem +func (c *datasetRESTClient) ListAnnotations(ctx context.Context, req *aiplatformpb.ListAnnotationsRequest, opts ...gax.CallOption) *AnnotationIterator { + it := &AnnotationIterator{} + req = proto.Clone(req).(*aiplatformpb.ListAnnotationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Annotation, string, error) { + resp := &aiplatformpb.ListAnnotationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/annotations", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAnnotations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *datasetRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *datasetRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *datasetRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *datasetRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *datasetRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *datasetRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *datasetRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *datasetRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *datasetRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *datasetRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateDatasetOperation manages a long-running operation from CreateDataset. +type CreateDatasetOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateDatasetOperation returns a new CreateDatasetOperation from a given name. +// The name must be that of a previously created CreateDatasetOperation, possibly from a different process. +func (c *datasetGRPCClient) CreateDatasetOperation(name string) *CreateDatasetOperation { + return &CreateDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateDatasetOperation returns a new CreateDatasetOperation from a given name. +// The name must be that of a previously created CreateDatasetOperation, possibly from a different process. +func (c *datasetRESTClient) CreateDatasetOperation(name string) *CreateDatasetOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Dataset + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Dataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Dataset + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateDatasetOperation) Metadata() (*aiplatformpb.CreateDatasetOperationMetadata, error) { + var meta aiplatformpb.CreateDatasetOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateDatasetOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateDatasetOperation) Name() string { + return op.lro.Name() +} + +// DeleteDatasetOperation manages a long-running operation from DeleteDataset. +type DeleteDatasetOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteDatasetOperation returns a new DeleteDatasetOperation from a given name. +// The name must be that of a previously created DeleteDatasetOperation, possibly from a different process. +func (c *datasetGRPCClient) DeleteDatasetOperation(name string) *DeleteDatasetOperation { + return &DeleteDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteDatasetOperation returns a new DeleteDatasetOperation from a given name. +// The name must be that of a previously created DeleteDatasetOperation, possibly from a different process. +func (c *datasetRESTClient) DeleteDatasetOperation(name string) *DeleteDatasetOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteDatasetOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteDatasetOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteDatasetOperation) Name() string { + return op.lro.Name() +} + +// ExportDataOperation manages a long-running operation from ExportData. +type ExportDataOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ExportDataOperation returns a new ExportDataOperation from a given name. +// The name must be that of a previously created ExportDataOperation, possibly from a different process. +func (c *datasetGRPCClient) ExportDataOperation(name string) *ExportDataOperation { + return &ExportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ExportDataOperation returns a new ExportDataOperation from a given name. +// The name must be that of a previously created ExportDataOperation, possibly from a different process. +func (c *datasetRESTClient) ExportDataOperation(name string) *ExportDataOperation { + override := fmt.Sprintf("/ui/%s", name) + return &ExportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.ExportDataResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and // the operation has completed with failure, the error is returned and op.Done will return true. // If Poll succeeds and the operation has completed successfully, // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ExportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportDataResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ExportDataResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1180,7 +2791,8 @@ func (op *ExportDataOperation) Name() string { // ImportDataOperation manages a long-running operation from ImportData. type ImportDataOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ImportDataOperation returns a new ImportDataOperation from a given name. @@ -1191,10 +2803,21 @@ func (c *datasetGRPCClient) ImportDataOperation(name string) *ImportDataOperatio } } +// ImportDataOperation returns a new ImportDataOperation from a given name. +// The name must be that of a previously created ImportDataOperation, possibly from a different process. +func (c *datasetRESTClient) ImportDataOperation(name string) *ImportDataOperation { + override := fmt.Sprintf("/ui/%s", name) + return &ImportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportDataResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ImportDataResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1212,6 +2835,7 @@ func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ImportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportDataResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ImportDataResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/dataset_client_example_test.go b/aiplatform/apiv1beta1/dataset_client_example_test.go index eae682694885..06102c568746 100644 --- a/aiplatform/apiv1beta1/dataset_client_example_test.go +++ b/aiplatform/apiv1beta1/dataset_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewDatasetClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewDatasetClient() { _ = c } +func ExampleNewDatasetRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDatasetRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleDatasetClient_CreateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleDatasetClient_CreateDataset() { func ExampleDatasetClient_GetDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleDatasetClient_GetDataset() { func ExampleDatasetClient_UpdateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +143,11 @@ func ExampleDatasetClient_UpdateDataset() { func ExampleDatasetClient_ListDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +174,11 @@ func ExampleDatasetClient_ListDatasets() { func ExampleDatasetClient_DeleteDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +202,11 @@ func ExampleDatasetClient_DeleteDataset() { func ExampleDatasetClient_ImportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +232,11 @@ func ExampleDatasetClient_ImportData() { func ExampleDatasetClient_ExportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +262,11 @@ func ExampleDatasetClient_ExportData() { func ExampleDatasetClient_ListDataItems() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -231,6 +293,11 @@ func ExampleDatasetClient_ListDataItems() { func ExampleDatasetClient_ListSavedQueries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -257,6 +324,11 @@ func ExampleDatasetClient_ListSavedQueries() { func ExampleDatasetClient_GetAnnotationSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -277,6 +349,11 @@ func ExampleDatasetClient_GetAnnotationSpec() { func ExampleDatasetClient_ListAnnotations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -303,6 +380,11 @@ func ExampleDatasetClient_ListAnnotations() { func ExampleDatasetClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -323,6 +405,11 @@ func ExampleDatasetClient_GetLocation() { func ExampleDatasetClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -349,6 +436,11 @@ func ExampleDatasetClient_ListLocations() { func ExampleDatasetClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -369,6 +461,11 @@ func ExampleDatasetClient_GetIamPolicy() { func ExampleDatasetClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -389,6 +486,11 @@ func ExampleDatasetClient_SetIamPolicy() { func ExampleDatasetClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -409,6 +511,11 @@ func ExampleDatasetClient_TestIamPermissions() { func ExampleDatasetClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -427,6 +534,11 @@ func ExampleDatasetClient_CancelOperation() { func ExampleDatasetClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -445,6 +557,11 @@ func ExampleDatasetClient_DeleteOperation() { func ExampleDatasetClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -465,6 +582,11 @@ func ExampleDatasetClient_GetOperation() { func ExampleDatasetClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. @@ -491,6 +613,11 @@ func ExampleDatasetClient_ListOperations() { func ExampleDatasetClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewDatasetClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/deployment_resource_pool_client.go b/aiplatform/apiv1beta1/deployment_resource_pool_client.go new file mode 100644 index 000000000000..918cef70757f --- /dev/null +++ b/aiplatform/apiv1beta1/deployment_resource_pool_client.go @@ -0,0 +1,2035 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package aiplatform + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newDeploymentResourcePoolClientHook clientHook + +// DeploymentResourcePoolCallOptions contains the retry settings for each method of DeploymentResourcePoolClient. +type DeploymentResourcePoolCallOptions struct { + CreateDeploymentResourcePool []gax.CallOption + GetDeploymentResourcePool []gax.CallOption + ListDeploymentResourcePools []gax.CallOption + DeleteDeploymentResourcePool []gax.CallOption + QueryDeployedModels []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption + WaitOperation []gax.CallOption +} + +func defaultDeploymentResourcePoolGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("aiplatform.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("aiplatform.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultDeploymentResourcePoolCallOptions() *DeploymentResourcePoolCallOptions { + return &DeploymentResourcePoolCallOptions{ + CreateDeploymentResourcePool: []gax.CallOption{}, + GetDeploymentResourcePool: []gax.CallOption{}, + ListDeploymentResourcePools: []gax.CallOption{}, + DeleteDeploymentResourcePool: []gax.CallOption{}, + QueryDeployedModels: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + +func defaultDeploymentResourcePoolRESTCallOptions() *DeploymentResourcePoolCallOptions { + return &DeploymentResourcePoolCallOptions{ + CreateDeploymentResourcePool: []gax.CallOption{}, + GetDeploymentResourcePool: []gax.CallOption{}, + ListDeploymentResourcePools: []gax.CallOption{}, + DeleteDeploymentResourcePool: []gax.CallOption{}, + QueryDeployedModels: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + +// internalDeploymentResourcePoolClient is an interface that defines the methods available from Vertex AI API. +type internalDeploymentResourcePoolClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateDeploymentResourcePool(context.Context, *aiplatformpb.CreateDeploymentResourcePoolRequest, ...gax.CallOption) (*CreateDeploymentResourcePoolOperation, error) + CreateDeploymentResourcePoolOperation(name string) *CreateDeploymentResourcePoolOperation + GetDeploymentResourcePool(context.Context, *aiplatformpb.GetDeploymentResourcePoolRequest, ...gax.CallOption) (*aiplatformpb.DeploymentResourcePool, error) + ListDeploymentResourcePools(context.Context, *aiplatformpb.ListDeploymentResourcePoolsRequest, ...gax.CallOption) *DeploymentResourcePoolIterator + DeleteDeploymentResourcePool(context.Context, *aiplatformpb.DeleteDeploymentResourcePoolRequest, ...gax.CallOption) (*DeleteDeploymentResourcePoolOperation, error) + DeleteDeploymentResourcePoolOperation(name string) *DeleteDeploymentResourcePoolOperation + QueryDeployedModels(context.Context, *aiplatformpb.QueryDeployedModelsRequest, ...gax.CallOption) *DeployedModelIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator + WaitOperation(context.Context, *longrunningpb.WaitOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) +} + +// DeploymentResourcePoolClient is a client for interacting with Vertex AI API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// A service that manages the DeploymentResourcePool resource. +type DeploymentResourcePoolClient struct { + // The internal transport-dependent client. + internalClient internalDeploymentResourcePoolClient + + // The call options for this service. + CallOptions *DeploymentResourcePoolCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *DeploymentResourcePoolClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *DeploymentResourcePoolClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *DeploymentResourcePoolClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateDeploymentResourcePool create a DeploymentResourcePool. +func (c *DeploymentResourcePoolClient) CreateDeploymentResourcePool(ctx context.Context, req *aiplatformpb.CreateDeploymentResourcePoolRequest, opts ...gax.CallOption) (*CreateDeploymentResourcePoolOperation, error) { + return c.internalClient.CreateDeploymentResourcePool(ctx, req, opts...) +} + +// CreateDeploymentResourcePoolOperation returns a new CreateDeploymentResourcePoolOperation from a given name. +// The name must be that of a previously created CreateDeploymentResourcePoolOperation, possibly from a different process. +func (c *DeploymentResourcePoolClient) CreateDeploymentResourcePoolOperation(name string) *CreateDeploymentResourcePoolOperation { + return c.internalClient.CreateDeploymentResourcePoolOperation(name) +} + +// GetDeploymentResourcePool get a DeploymentResourcePool. +func (c *DeploymentResourcePoolClient) GetDeploymentResourcePool(ctx context.Context, req *aiplatformpb.GetDeploymentResourcePoolRequest, opts ...gax.CallOption) (*aiplatformpb.DeploymentResourcePool, error) { + return c.internalClient.GetDeploymentResourcePool(ctx, req, opts...) +} + +// ListDeploymentResourcePools list DeploymentResourcePools in a location. +func (c *DeploymentResourcePoolClient) ListDeploymentResourcePools(ctx context.Context, req *aiplatformpb.ListDeploymentResourcePoolsRequest, opts ...gax.CallOption) *DeploymentResourcePoolIterator { + return c.internalClient.ListDeploymentResourcePools(ctx, req, opts...) +} + +// DeleteDeploymentResourcePool delete a DeploymentResourcePool. +func (c *DeploymentResourcePoolClient) DeleteDeploymentResourcePool(ctx context.Context, req *aiplatformpb.DeleteDeploymentResourcePoolRequest, opts ...gax.CallOption) (*DeleteDeploymentResourcePoolOperation, error) { + return c.internalClient.DeleteDeploymentResourcePool(ctx, req, opts...) +} + +// DeleteDeploymentResourcePoolOperation returns a new DeleteDeploymentResourcePoolOperation from a given name. +// The name must be that of a previously created DeleteDeploymentResourcePoolOperation, possibly from a different process. +func (c *DeploymentResourcePoolClient) DeleteDeploymentResourcePoolOperation(name string) *DeleteDeploymentResourcePoolOperation { + return c.internalClient.DeleteDeploymentResourcePoolOperation(name) +} + +// QueryDeployedModels list DeployedModels that have been deployed on this DeploymentResourcePool. +func (c *DeploymentResourcePoolClient) QueryDeployedModels(ctx context.Context, req *aiplatformpb.QueryDeployedModelsRequest, opts ...gax.CallOption) *DeployedModelIterator { + return c.internalClient.QueryDeployedModels(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *DeploymentResourcePoolClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *DeploymentResourcePoolClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *DeploymentResourcePoolClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *DeploymentResourcePoolClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *DeploymentResourcePoolClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *DeploymentResourcePoolClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *DeploymentResourcePoolClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *DeploymentResourcePoolClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *DeploymentResourcePoolClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *DeploymentResourcePoolClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.WaitOperation(ctx, req, opts...) +} + +// deploymentResourcePoolGRPCClient is a client for interacting with Vertex AI API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type deploymentResourcePoolGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing DeploymentResourcePoolClient + CallOptions **DeploymentResourcePoolCallOptions + + // The gRPC API client. + deploymentResourcePoolClient aiplatformpb.DeploymentResourcePoolServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewDeploymentResourcePoolClient creates a new deployment resource pool service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// A service that manages the DeploymentResourcePool resource. +func NewDeploymentResourcePoolClient(ctx context.Context, opts ...option.ClientOption) (*DeploymentResourcePoolClient, error) { + clientOpts := defaultDeploymentResourcePoolGRPCClientOptions() + if newDeploymentResourcePoolClientHook != nil { + hookOpts, err := newDeploymentResourcePoolClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := DeploymentResourcePoolClient{CallOptions: defaultDeploymentResourcePoolCallOptions()} + + c := &deploymentResourcePoolGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + deploymentResourcePoolClient: aiplatformpb.NewDeploymentResourcePoolServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *deploymentResourcePoolGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *deploymentResourcePoolGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *deploymentResourcePoolGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type deploymentResourcePoolRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing DeploymentResourcePoolClient + CallOptions **DeploymentResourcePoolCallOptions +} + +// NewDeploymentResourcePoolRESTClient creates a new deployment resource pool service rest client. +// +// A service that manages the DeploymentResourcePool resource. +func NewDeploymentResourcePoolRESTClient(ctx context.Context, opts ...option.ClientOption) (*DeploymentResourcePoolClient, error) { + clientOpts := append(defaultDeploymentResourcePoolRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultDeploymentResourcePoolRESTCallOptions() + c := &deploymentResourcePoolRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &DeploymentResourcePoolClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultDeploymentResourcePoolRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *deploymentResourcePoolRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *deploymentResourcePoolRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *deploymentResourcePoolRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *deploymentResourcePoolGRPCClient) CreateDeploymentResourcePool(ctx context.Context, req *aiplatformpb.CreateDeploymentResourcePoolRequest, opts ...gax.CallOption) (*CreateDeploymentResourcePoolOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateDeploymentResourcePool[0:len((*c.CallOptions).CreateDeploymentResourcePool):len((*c.CallOptions).CreateDeploymentResourcePool)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.deploymentResourcePoolClient.CreateDeploymentResourcePool(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *deploymentResourcePoolGRPCClient) GetDeploymentResourcePool(ctx context.Context, req *aiplatformpb.GetDeploymentResourcePoolRequest, opts ...gax.CallOption) (*aiplatformpb.DeploymentResourcePool, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetDeploymentResourcePool[0:len((*c.CallOptions).GetDeploymentResourcePool):len((*c.CallOptions).GetDeploymentResourcePool)], opts...) + var resp *aiplatformpb.DeploymentResourcePool + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.deploymentResourcePoolClient.GetDeploymentResourcePool(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *deploymentResourcePoolGRPCClient) ListDeploymentResourcePools(ctx context.Context, req *aiplatformpb.ListDeploymentResourcePoolsRequest, opts ...gax.CallOption) *DeploymentResourcePoolIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListDeploymentResourcePools[0:len((*c.CallOptions).ListDeploymentResourcePools):len((*c.CallOptions).ListDeploymentResourcePools)], opts...) + it := &DeploymentResourcePoolIterator{} + req = proto.Clone(req).(*aiplatformpb.ListDeploymentResourcePoolsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.DeploymentResourcePool, string, error) { + resp := &aiplatformpb.ListDeploymentResourcePoolsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.deploymentResourcePoolClient.ListDeploymentResourcePools(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetDeploymentResourcePools(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *deploymentResourcePoolGRPCClient) DeleteDeploymentResourcePool(ctx context.Context, req *aiplatformpb.DeleteDeploymentResourcePoolRequest, opts ...gax.CallOption) (*DeleteDeploymentResourcePoolOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteDeploymentResourcePool[0:len((*c.CallOptions).DeleteDeploymentResourcePool):len((*c.CallOptions).DeleteDeploymentResourcePool)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.deploymentResourcePoolClient.DeleteDeploymentResourcePool(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *deploymentResourcePoolGRPCClient) QueryDeployedModels(ctx context.Context, req *aiplatformpb.QueryDeployedModelsRequest, opts ...gax.CallOption) *DeployedModelIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "deployment_resource_pool", url.QueryEscape(req.GetDeploymentResourcePool()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).QueryDeployedModels[0:len((*c.CallOptions).QueryDeployedModels):len((*c.CallOptions).QueryDeployedModels)], opts...) + it := &DeployedModelIterator{} + req = proto.Clone(req).(*aiplatformpb.QueryDeployedModelsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.DeployedModel, string, error) { + resp := &aiplatformpb.QueryDeployedModelsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.deploymentResourcePoolClient.QueryDeployedModels(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetDeployedModels(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *deploymentResourcePoolGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *deploymentResourcePoolGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *deploymentResourcePoolGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *deploymentResourcePoolGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *deploymentResourcePoolGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *deploymentResourcePoolGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *deploymentResourcePoolGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *deploymentResourcePoolGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *deploymentResourcePoolGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *deploymentResourcePoolGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// CreateDeploymentResourcePool create a DeploymentResourcePool. +func (c *deploymentResourcePoolRESTClient) CreateDeploymentResourcePool(ctx context.Context, req *aiplatformpb.CreateDeploymentResourcePoolRequest, opts ...gax.CallOption) (*CreateDeploymentResourcePoolOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/deploymentResourcePools", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetDeploymentResourcePool get a DeploymentResourcePool. +func (c *deploymentResourcePoolRESTClient) GetDeploymentResourcePool(ctx context.Context, req *aiplatformpb.GetDeploymentResourcePoolRequest, opts ...gax.CallOption) (*aiplatformpb.DeploymentResourcePool, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetDeploymentResourcePool[0:len((*c.CallOptions).GetDeploymentResourcePool):len((*c.CallOptions).GetDeploymentResourcePool)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.DeploymentResourcePool{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListDeploymentResourcePools list DeploymentResourcePools in a location. +func (c *deploymentResourcePoolRESTClient) ListDeploymentResourcePools(ctx context.Context, req *aiplatformpb.ListDeploymentResourcePoolsRequest, opts ...gax.CallOption) *DeploymentResourcePoolIterator { + it := &DeploymentResourcePoolIterator{} + req = proto.Clone(req).(*aiplatformpb.ListDeploymentResourcePoolsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.DeploymentResourcePool, string, error) { + resp := &aiplatformpb.ListDeploymentResourcePoolsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/deploymentResourcePools", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDeploymentResourcePools(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteDeploymentResourcePool delete a DeploymentResourcePool. +func (c *deploymentResourcePoolRESTClient) DeleteDeploymentResourcePool(ctx context.Context, req *aiplatformpb.DeleteDeploymentResourcePoolRequest, opts ...gax.CallOption) (*DeleteDeploymentResourcePoolOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// QueryDeployedModels list DeployedModels that have been deployed on this DeploymentResourcePool. +func (c *deploymentResourcePoolRESTClient) QueryDeployedModels(ctx context.Context, req *aiplatformpb.QueryDeployedModelsRequest, opts ...gax.CallOption) *DeployedModelIterator { + it := &DeployedModelIterator{} + req = proto.Clone(req).(*aiplatformpb.QueryDeployedModelsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.DeployedModel, string, error) { + resp := &aiplatformpb.QueryDeployedModelsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:queryDeployedModels", req.GetDeploymentResourcePool()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDeployedModels(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *deploymentResourcePoolRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *deploymentResourcePoolRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *deploymentResourcePoolRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *deploymentResourcePoolRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *deploymentResourcePoolRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *deploymentResourcePoolRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *deploymentResourcePoolRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *deploymentResourcePoolRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *deploymentResourcePoolRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *deploymentResourcePoolRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateDeploymentResourcePoolOperation manages a long-running operation from CreateDeploymentResourcePool. +type CreateDeploymentResourcePoolOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateDeploymentResourcePoolOperation returns a new CreateDeploymentResourcePoolOperation from a given name. +// The name must be that of a previously created CreateDeploymentResourcePoolOperation, possibly from a different process. +func (c *deploymentResourcePoolGRPCClient) CreateDeploymentResourcePoolOperation(name string) *CreateDeploymentResourcePoolOperation { + return &CreateDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateDeploymentResourcePoolOperation returns a new CreateDeploymentResourcePoolOperation from a given name. +// The name must be that of a previously created CreateDeploymentResourcePoolOperation, possibly from a different process. +func (c *deploymentResourcePoolRESTClient) CreateDeploymentResourcePoolOperation(name string) *CreateDeploymentResourcePoolOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateDeploymentResourcePoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeploymentResourcePool, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeploymentResourcePool + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateDeploymentResourcePoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeploymentResourcePool, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeploymentResourcePool + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateDeploymentResourcePoolOperation) Metadata() (*aiplatformpb.CreateDeploymentResourcePoolOperationMetadata, error) { + var meta aiplatformpb.CreateDeploymentResourcePoolOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateDeploymentResourcePoolOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateDeploymentResourcePoolOperation) Name() string { + return op.lro.Name() +} + +// DeleteDeploymentResourcePoolOperation manages a long-running operation from DeleteDeploymentResourcePool. +type DeleteDeploymentResourcePoolOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteDeploymentResourcePoolOperation returns a new DeleteDeploymentResourcePoolOperation from a given name. +// The name must be that of a previously created DeleteDeploymentResourcePoolOperation, possibly from a different process. +func (c *deploymentResourcePoolGRPCClient) DeleteDeploymentResourcePoolOperation(name string) *DeleteDeploymentResourcePoolOperation { + return &DeleteDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteDeploymentResourcePoolOperation returns a new DeleteDeploymentResourcePoolOperation from a given name. +// The name must be that of a previously created DeleteDeploymentResourcePoolOperation, possibly from a different process. +func (c *deploymentResourcePoolRESTClient) DeleteDeploymentResourcePoolOperation(name string) *DeleteDeploymentResourcePoolOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteDeploymentResourcePoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteDeploymentResourcePoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteDeploymentResourcePoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteDeploymentResourcePoolOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteDeploymentResourcePoolOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteDeploymentResourcePoolOperation) Name() string { + return op.lro.Name() +} + +// DeployedModelIterator manages a stream of *aiplatformpb.DeployedModel. +type DeployedModelIterator struct { + items []*aiplatformpb.DeployedModel + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.DeployedModel, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *DeployedModelIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *DeployedModelIterator) Next() (*aiplatformpb.DeployedModel, error) { + var item *aiplatformpb.DeployedModel + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *DeployedModelIterator) bufLen() int { + return len(it.items) +} + +func (it *DeployedModelIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// DeploymentResourcePoolIterator manages a stream of *aiplatformpb.DeploymentResourcePool. +type DeploymentResourcePoolIterator struct { + items []*aiplatformpb.DeploymentResourcePool + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.DeploymentResourcePool, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *DeploymentResourcePoolIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *DeploymentResourcePoolIterator) Next() (*aiplatformpb.DeploymentResourcePool, error) { + var item *aiplatformpb.DeploymentResourcePool + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *DeploymentResourcePoolIterator) bufLen() int { + return len(it.items) +} + +func (it *DeploymentResourcePoolIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/aiplatform/apiv1beta1/deployment_resource_pool_client_example_test.go b/aiplatform/apiv1beta1/deployment_resource_pool_client_example_test.go new file mode 100644 index 000000000000..6a5d261f1e47 --- /dev/null +++ b/aiplatform/apiv1beta1/deployment_resource_pool_client_example_test.go @@ -0,0 +1,465 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package aiplatform_test + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewDeploymentResourcePoolClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewDeploymentResourcePoolRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleDeploymentResourcePoolClient_CreateDeploymentResourcePool() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateDeploymentResourcePoolRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#CreateDeploymentResourcePoolRequest. + } + op, err := c.CreateDeploymentResourcePool(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_GetDeploymentResourcePool() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetDeploymentResourcePoolRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#GetDeploymentResourcePoolRequest. + } + resp, err := c.GetDeploymentResourcePool(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_ListDeploymentResourcePools() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListDeploymentResourcePoolsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#ListDeploymentResourcePoolsRequest. + } + it := c.ListDeploymentResourcePools(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDeploymentResourcePoolClient_DeleteDeploymentResourcePool() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteDeploymentResourcePoolRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#DeleteDeploymentResourcePoolRequest. + } + op, err := c.DeleteDeploymentResourcePool(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDeploymentResourcePoolClient_QueryDeployedModels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.QueryDeployedModelsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#QueryDeployedModelsRequest. + } + it := c.QueryDeployedModels(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDeploymentResourcePoolClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDeploymentResourcePoolClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDeploymentResourcePoolClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDeploymentResourcePoolClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDeploymentResourcePoolClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDeploymentResourcePoolClient_WaitOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewDeploymentResourcePoolClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.WaitOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#WaitOperationRequest. + } + resp, err := c.WaitOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/aiplatform/apiv1beta1/doc.go b/aiplatform/apiv1beta1/doc.go index cae573cb585c..158ac5386788 100644 --- a/aiplatform/apiv1beta1/doc.go +++ b/aiplatform/apiv1beta1/doc.go @@ -20,52 +20,63 @@ // Train high-quality custom machine learning models with minimal machine // learning expertise and effort. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := aiplatform.NewDatasetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := aiplatform.NewDatasetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := aiplatform.NewDatasetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &aiplatformpb.CreateDatasetRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#CreateDatasetRequest. -// } -// op, err := c.CreateDataset(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := aiplatform.NewDatasetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &aiplatformpb.CreateDatasetRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#CreateDatasetRequest. +// } +// op, err := c.CreateDataset(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewDatasetClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // @@ -77,6 +88,8 @@ package aiplatform // import "cloud.google.com/go/aiplatform/apiv1beta1" import ( "context" + "fmt" + "net/http" "os" "runtime" "strconv" @@ -165,3 +178,22 @@ func versionGo() string { } return "UNKNOWN" } + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/aiplatform/apiv1beta1/endpoint_client.go b/aiplatform/apiv1beta1/endpoint_client.go index 57be4d224ffa..5bf19db86bef 100644 --- a/aiplatform/apiv1beta1/endpoint_client.go +++ b/aiplatform/apiv1beta1/endpoint_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -96,6 +102,28 @@ func defaultEndpointCallOptions() *EndpointCallOptions { } } +func defaultEndpointRESTCallOptions() *EndpointCallOptions { + return &EndpointCallOptions{ + CreateEndpoint: []gax.CallOption{}, + GetEndpoint: []gax.CallOption{}, + ListEndpoints: []gax.CallOption{}, + UpdateEndpoint: []gax.CallOption{}, + DeleteEndpoint: []gax.CallOption{}, + DeployModel: []gax.CallOption{}, + UndeployModel: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalEndpointClient is an interface that defines the methods available from Vertex AI API. type internalEndpointClient interface { Close() error @@ -158,7 +186,8 @@ func (c *EndpointClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *EndpointClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -369,7 +398,8 @@ func NewEndpointClient(ctx context.Context, opts ...option.ClientOption) (*Endpo // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *endpointGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -389,6 +419,89 @@ func (c *endpointGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type endpointRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing EndpointClient + CallOptions **EndpointCallOptions +} + +// NewEndpointRESTClient creates a new endpoint service rest client. +// +// A service for managing Vertex AI’s Endpoints. +func NewEndpointRESTClient(ctx context.Context, opts ...option.ClientOption) (*EndpointClient, error) { + clientOpts := append(defaultEndpointRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultEndpointRESTCallOptions() + c := &endpointRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &EndpointClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultEndpointRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *endpointRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *endpointRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *endpointRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *endpointGRPCClient) CreateEndpoint(ctx context.Context, req *aiplatformpb.CreateEndpointRequest, opts ...gax.CallOption) (*CreateEndpointOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -792,173 +905,1296 @@ func (c *endpointGRPCClient) WaitOperation(ctx context.Context, req *longrunning return resp, nil } -// CreateEndpointOperation manages a long-running operation from CreateEndpoint. -type CreateEndpointOperation struct { - lro *longrunning.Operation -} - -// CreateEndpointOperation returns a new CreateEndpointOperation from a given name. -// The name must be that of a previously created CreateEndpointOperation, possibly from a different process. -func (c *endpointGRPCClient) CreateEndpointOperation(name string) *CreateEndpointOperation { - return &CreateEndpointOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error) { - var resp aiplatformpb.Endpoint - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateEndpoint creates an Endpoint. +func (c *endpointRESTClient) CreateEndpoint(ctx context.Context, req *aiplatformpb.CreateEndpointRequest, opts ...gax.CallOption) (*CreateEndpointOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEndpoint() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error) { - var resp aiplatformpb.Endpoint - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/endpoints", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateEndpointOperation) Metadata() (*aiplatformpb.CreateEndpointOperationMetadata, error) { - var meta aiplatformpb.CreateEndpointOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err + params := url.Values{} + if req.GetEndpointId() != "" { + params.Add("endpointId", fmt.Sprintf("%v", req.GetEndpointId())) } - return &meta, nil -} -// Done reports whether the long-running operation has completed. -func (op *CreateEndpointOperation) Done() bool { - return op.lro.Done() -} + baseUrl.RawQuery = params.Encode() -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateEndpointOperation) Name() string { - return op.lro.Name() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// DeleteEndpointOperation manages a long-running operation from DeleteEndpoint. -type DeleteEndpointOperation struct { - lro *longrunning.Operation -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteEndpointOperation returns a new DeleteEndpointOperation from a given name. -// The name must be that of a previously created DeleteEndpointOperation, possibly from a different process. -func (c *endpointGRPCClient) DeleteEndpointOperation(name string) *DeleteEndpointOperation { - return &DeleteEndpointOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetEndpoint gets an Endpoint. +func (c *endpointRESTClient) GetEndpoint(ctx context.Context, req *aiplatformpb.GetEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteEndpointOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteEndpointOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEndpoint[0:len((*c.CallOptions).GetEndpoint):len((*c.CallOptions).GetEndpoint)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Endpoint{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeployModelOperation manages a long-running operation from DeployModel. -type DeployModelOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeployModelOperation returns a new DeployModelOperation from a given name. -// The name must be that of a previously created DeployModelOperation, possibly from a different process. -func (c *endpointGRPCClient) DeployModelOperation(name string) *DeployModelOperation { - return &DeployModelOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error) { - var resp aiplatformpb.DeployModelResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + return resp, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error) { - var resp aiplatformpb.DeployModelResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil +// ListEndpoints lists Endpoints in a Location. +func (c *endpointRESTClient) ListEndpoints(ctx context.Context, req *aiplatformpb.ListEndpointsRequest, opts ...gax.CallOption) *EndpointIterator { + it := &EndpointIterator{} + req = proto.Clone(req).(*aiplatformpb.ListEndpointsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Endpoint, string, error) { + resp := &aiplatformpb.ListEndpointsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/endpoints", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEndpoints(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateEndpoint updates an Endpoint. +func (c *endpointRESTClient) UpdateEndpoint(ctx context.Context, req *aiplatformpb.UpdateEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEndpoint() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetEndpoint().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint.name", url.QueryEscape(req.GetEndpoint().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEndpoint[0:len((*c.CallOptions).UpdateEndpoint):len((*c.CallOptions).UpdateEndpoint)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Endpoint{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteEndpoint deletes an Endpoint. +func (c *endpointRESTClient) DeleteEndpoint(ctx context.Context, req *aiplatformpb.DeleteEndpointRequest, opts ...gax.CallOption) (*DeleteEndpointOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeployModel deploys a Model into this Endpoint, creating a DeployedModel within it. +func (c *endpointRESTClient) DeployModel(ctx context.Context, req *aiplatformpb.DeployModelRequest, opts ...gax.CallOption) (*DeployModelOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:deployModel", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeployModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UndeployModel undeploys a Model from an Endpoint, removing a DeployedModel from it, and +// freeing all resources it’s using. +func (c *endpointRESTClient) UndeployModel(ctx context.Context, req *aiplatformpb.UndeployModelRequest, opts ...gax.CallOption) (*UndeployModelOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:undeployModel", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UndeployModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *endpointRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *endpointRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *endpointRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *endpointRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *endpointRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *endpointRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *endpointRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *endpointRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *endpointRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *endpointRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateEndpointOperation manages a long-running operation from CreateEndpoint. +type CreateEndpointOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateEndpointOperation returns a new CreateEndpointOperation from a given name. +// The name must be that of a previously created CreateEndpointOperation, possibly from a different process. +func (c *endpointGRPCClient) CreateEndpointOperation(name string) *CreateEndpointOperation { + return &CreateEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateEndpointOperation returns a new CreateEndpointOperation from a given name. +// The name must be that of a previously created CreateEndpointOperation, possibly from a different process. +func (c *endpointRESTClient) CreateEndpointOperation(name string) *CreateEndpointOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Endpoint + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Endpoint, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Endpoint + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateEndpointOperation) Metadata() (*aiplatformpb.CreateEndpointOperationMetadata, error) { + var meta aiplatformpb.CreateEndpointOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateEndpointOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateEndpointOperation) Name() string { + return op.lro.Name() +} + +// DeleteEndpointOperation manages a long-running operation from DeleteEndpoint. +type DeleteEndpointOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteEndpointOperation returns a new DeleteEndpointOperation from a given name. +// The name must be that of a previously created DeleteEndpointOperation, possibly from a different process. +func (c *endpointGRPCClient) DeleteEndpointOperation(name string) *DeleteEndpointOperation { + return &DeleteEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteEndpointOperation returns a new DeleteEndpointOperation from a given name. +// The name must be that of a previously created DeleteEndpointOperation, possibly from a different process. +func (c *endpointRESTClient) DeleteEndpointOperation(name string) *DeleteEndpointOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteEndpointOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteEndpointOperation) Name() string { + return op.lro.Name() +} + +// DeployModelOperation manages a long-running operation from DeployModel. +type DeployModelOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeployModelOperation returns a new DeployModelOperation from a given name. +// The name must be that of a previously created DeployModelOperation, possibly from a different process. +func (c *endpointGRPCClient) DeployModelOperation(name string) *DeployModelOperation { + return &DeployModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeployModelOperation returns a new DeployModelOperation from a given name. +// The name must be that of a previously created DeployModelOperation, possibly from a different process. +func (c *endpointRESTClient) DeployModelOperation(name string) *DeployModelOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeployModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeployModelResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeployModelResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil } return &resp, nil } @@ -990,7 +2226,8 @@ func (op *DeployModelOperation) Name() string { // UndeployModelOperation manages a long-running operation from UndeployModel. type UndeployModelOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UndeployModelOperation returns a new UndeployModelOperation from a given name. @@ -1001,10 +2238,21 @@ func (c *endpointGRPCClient) UndeployModelOperation(name string) *UndeployModelO } } +// UndeployModelOperation returns a new UndeployModelOperation from a given name. +// The name must be that of a previously created UndeployModelOperation, possibly from a different process. +func (c *endpointRESTClient) UndeployModelOperation(name string) *UndeployModelOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UndeployModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UndeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UndeployModelResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1022,6 +2270,7 @@ func (op *UndeployModelOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UndeployModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UndeployModelResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/endpoint_client_example_test.go b/aiplatform/apiv1beta1/endpoint_client_example_test.go index 01c34929571a..e8068f400ce4 100644 --- a/aiplatform/apiv1beta1/endpoint_client_example_test.go +++ b/aiplatform/apiv1beta1/endpoint_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewEndpointClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewEndpointClient() { _ = c } +func ExampleNewEndpointRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewEndpointRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleEndpointClient_CreateEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleEndpointClient_CreateEndpoint() { func ExampleEndpointClient_GetEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleEndpointClient_GetEndpoint() { func ExampleEndpointClient_ListEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleEndpointClient_ListEndpoints() { func ExampleEndpointClient_UpdateEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +174,11 @@ func ExampleEndpointClient_UpdateEndpoint() { func ExampleEndpointClient_DeleteEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +202,11 @@ func ExampleEndpointClient_DeleteEndpoint() { func ExampleEndpointClient_DeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +232,11 @@ func ExampleEndpointClient_DeployModel() { func ExampleEndpointClient_UndeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +262,11 @@ func ExampleEndpointClient_UndeployModel() { func ExampleEndpointClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +287,11 @@ func ExampleEndpointClient_GetLocation() { func ExampleEndpointClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -251,6 +318,11 @@ func ExampleEndpointClient_ListLocations() { func ExampleEndpointClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +343,11 @@ func ExampleEndpointClient_GetIamPolicy() { func ExampleEndpointClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +368,11 @@ func ExampleEndpointClient_SetIamPolicy() { func ExampleEndpointClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -311,6 +393,11 @@ func ExampleEndpointClient_TestIamPermissions() { func ExampleEndpointClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -329,6 +416,11 @@ func ExampleEndpointClient_CancelOperation() { func ExampleEndpointClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +439,11 @@ func ExampleEndpointClient_DeleteOperation() { func ExampleEndpointClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -367,6 +464,11 @@ func ExampleEndpointClient_GetOperation() { func ExampleEndpointClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -393,6 +495,11 @@ func ExampleEndpointClient_ListOperations() { func ExampleEndpointClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewEndpointClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/featurestore_client.go b/aiplatform/apiv1beta1/featurestore_client.go index af470caf8e46..2e6715fe002f 100644 --- a/aiplatform/apiv1beta1/featurestore_client.go +++ b/aiplatform/apiv1beta1/featurestore_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -62,6 +68,7 @@ type FeaturestoreCallOptions struct { ImportFeatureValues []gax.CallOption BatchReadFeatureValues []gax.CallOption ExportFeatureValues []gax.CallOption + DeleteFeatureValues []gax.CallOption SearchFeatures []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption @@ -108,6 +115,43 @@ func defaultFeaturestoreCallOptions() *FeaturestoreCallOptions { ImportFeatureValues: []gax.CallOption{}, BatchReadFeatureValues: []gax.CallOption{}, ExportFeatureValues: []gax.CallOption{}, + DeleteFeatureValues: []gax.CallOption{}, + SearchFeatures: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + +func defaultFeaturestoreRESTCallOptions() *FeaturestoreCallOptions { + return &FeaturestoreCallOptions{ + CreateFeaturestore: []gax.CallOption{}, + GetFeaturestore: []gax.CallOption{}, + ListFeaturestores: []gax.CallOption{}, + UpdateFeaturestore: []gax.CallOption{}, + DeleteFeaturestore: []gax.CallOption{}, + CreateEntityType: []gax.CallOption{}, + GetEntityType: []gax.CallOption{}, + ListEntityTypes: []gax.CallOption{}, + UpdateEntityType: []gax.CallOption{}, + DeleteEntityType: []gax.CallOption{}, + CreateFeature: []gax.CallOption{}, + BatchCreateFeatures: []gax.CallOption{}, + GetFeature: []gax.CallOption{}, + ListFeatures: []gax.CallOption{}, + UpdateFeature: []gax.CallOption{}, + DeleteFeature: []gax.CallOption{}, + ImportFeatureValues: []gax.CallOption{}, + BatchReadFeatureValues: []gax.CallOption{}, + ExportFeatureValues: []gax.CallOption{}, + DeleteFeatureValues: []gax.CallOption{}, SearchFeatures: []gax.CallOption{}, GetLocation: []gax.CallOption{}, ListLocations: []gax.CallOption{}, @@ -157,6 +201,8 @@ type internalFeaturestoreClient interface { BatchReadFeatureValuesOperation(name string) *BatchReadFeatureValuesOperation ExportFeatureValues(context.Context, *aiplatformpb.ExportFeatureValuesRequest, ...gax.CallOption) (*ExportFeatureValuesOperation, error) ExportFeatureValuesOperation(name string) *ExportFeatureValuesOperation + DeleteFeatureValues(context.Context, *aiplatformpb.DeleteFeatureValuesRequest, ...gax.CallOption) (*DeleteFeatureValuesOperation, error) + DeleteFeatureValuesOperation(name string) *DeleteFeatureValuesOperation SearchFeatures(context.Context, *aiplatformpb.SearchFeaturesRequest, ...gax.CallOption) *FeatureIterator GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator @@ -204,7 +250,8 @@ func (c *FeaturestoreClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FeaturestoreClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -352,15 +399,15 @@ func (c *FeaturestoreClient) DeleteFeatureOperation(name string) *DeleteFeatureO // // There are also scenarios where the caller can cause inconsistency. // -// Source data for import contains multiple distinct Feature values for -// the same entity ID and timestamp. +// Source data for import contains multiple distinct Feature values for +// the same entity ID and timestamp. // -// Source is modified during an import. This includes adding, updating, or -// removing source data and/or metadata. Examples of updating metadata -// include but are not limited to changing storage location, storage class, -// or retention policy. +// Source is modified during an import. This includes adding, updating, or +// removing source data and/or metadata. Examples of updating metadata +// include but are not limited to changing storage location, storage class, +// or retention policy. // -// Online serving cluster is under-provisioned. +// Online serving cluster is under-provisioned. func (c *FeaturestoreClient) ImportFeatureValues(ctx context.Context, req *aiplatformpb.ImportFeatureValuesRequest, opts ...gax.CallOption) (*ImportFeatureValuesOperation, error) { return c.internalClient.ImportFeatureValues(ctx, req, opts...) } @@ -398,6 +445,26 @@ func (c *FeaturestoreClient) ExportFeatureValuesOperation(name string) *ExportFe return c.internalClient.ExportFeatureValuesOperation(name) } +// DeleteFeatureValues delete Feature values from Featurestore. +// +// The progress of the deletion is tracked by the returned operation. The +// deleted feature values are guaranteed to be invisible to subsequent read +// operations after the operation is marked as successfully done. +// +// If a delete feature values operation fails, the feature values +// returned from reads and exports may be inconsistent. If consistency is +// required, the caller must retry the same delete request again and wait till +// the new operation returned is marked as successfully done. +func (c *FeaturestoreClient) DeleteFeatureValues(ctx context.Context, req *aiplatformpb.DeleteFeatureValuesRequest, opts ...gax.CallOption) (*DeleteFeatureValuesOperation, error) { + return c.internalClient.DeleteFeatureValues(ctx, req, opts...) +} + +// DeleteFeatureValuesOperation returns a new DeleteFeatureValuesOperation from a given name. +// The name must be that of a previously created DeleteFeatureValuesOperation, possibly from a different process. +func (c *FeaturestoreClient) DeleteFeatureValuesOperation(name string) *DeleteFeatureValuesOperation { + return c.internalClient.DeleteFeatureValuesOperation(name) +} + // SearchFeatures searches Features matching a query in a given project. func (c *FeaturestoreClient) SearchFeatures(ctx context.Context, req *aiplatformpb.SearchFeaturesRequest, opts ...gax.CallOption) *FeatureIterator { return c.internalClient.SearchFeatures(ctx, req, opts...) @@ -549,7 +616,8 @@ func NewFeaturestoreClient(ctx context.Context, opts ...option.ClientOption) (*F // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *featurestoreGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -569,6 +637,89 @@ func (c *featurestoreGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type featurestoreRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing FeaturestoreClient + CallOptions **FeaturestoreCallOptions +} + +// NewFeaturestoreRESTClient creates a new featurestore service rest client. +// +// The service that handles CRUD and List for resources for Featurestore. +func NewFeaturestoreRESTClient(ctx context.Context, opts ...option.ClientOption) (*FeaturestoreClient, error) { + clientOpts := append(defaultFeaturestoreRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultFeaturestoreRESTCallOptions() + c := &featurestoreRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &FeaturestoreClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultFeaturestoreRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *featurestoreRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *featurestoreRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *featurestoreRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *featurestoreGRPCClient) CreateFeaturestore(ctx context.Context, req *aiplatformpb.CreateFeaturestoreRequest, opts ...gax.CallOption) (*CreateFeaturestoreOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -1073,6 +1224,25 @@ func (c *featurestoreGRPCClient) ExportFeatureValues(ctx context.Context, req *a }, nil } +func (c *featurestoreGRPCClient) DeleteFeatureValues(ctx context.Context, req *aiplatformpb.DeleteFeatureValuesRequest, opts ...gax.CallOption) (*DeleteFeatureValuesOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteFeatureValues[0:len((*c.CallOptions).DeleteFeatureValues):len((*c.CallOptions).DeleteFeatureValues)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.featurestoreClient.DeleteFeatureValues(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + func (c *featurestoreGRPCClient) SearchFeatures(ctx context.Context, req *aiplatformpb.SearchFeaturesRequest, opts ...gax.CallOption) *FeatureIterator { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "location", url.QueryEscape(req.GetLocation()))) @@ -1336,147 +1506,2295 @@ func (c *featurestoreGRPCClient) WaitOperation(ctx context.Context, req *longrun return resp, nil } -// BatchCreateFeaturesOperation manages a long-running operation from BatchCreateFeatures. -type BatchCreateFeaturesOperation struct { - lro *longrunning.Operation -} - -// BatchCreateFeaturesOperation returns a new BatchCreateFeaturesOperation from a given name. -// The name must be that of a previously created BatchCreateFeaturesOperation, possibly from a different process. -func (c *featurestoreGRPCClient) BatchCreateFeaturesOperation(name string) *BatchCreateFeaturesOperation { - return &BatchCreateFeaturesOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *BatchCreateFeaturesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchCreateFeaturesResponse, error) { - var resp aiplatformpb.BatchCreateFeaturesResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateFeaturestore creates a new Featurestore in a given project and location. +func (c *featurestoreRESTClient) CreateFeaturestore(ctx context.Context, req *aiplatformpb.CreateFeaturestoreRequest, opts ...gax.CallOption) (*CreateFeaturestoreOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetFeaturestore() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *BatchCreateFeaturesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchCreateFeaturesResponse, error) { - var resp aiplatformpb.BatchCreateFeaturesResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/featurestores", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *BatchCreateFeaturesOperation) Metadata() (*aiplatformpb.BatchCreateFeaturesOperationMetadata, error) { - var meta aiplatformpb.BatchCreateFeaturesOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} + params := url.Values{} + params.Add("featurestoreId", fmt.Sprintf("%v", req.GetFeaturestoreId())) -// Done reports whether the long-running operation has completed. -func (op *BatchCreateFeaturesOperation) Done() bool { - return op.lro.Done() -} + baseUrl.RawQuery = params.Encode() -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *BatchCreateFeaturesOperation) Name() string { - return op.lro.Name() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// BatchReadFeatureValuesOperation manages a long-running operation from BatchReadFeatureValues. -type BatchReadFeatureValuesOperation struct { - lro *longrunning.Operation -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// BatchReadFeatureValuesOperation returns a new BatchReadFeatureValuesOperation from a given name. -// The name must be that of a previously created BatchReadFeatureValuesOperation, possibly from a different process. -func (c *featurestoreGRPCClient) BatchReadFeatureValuesOperation(name string) *BatchReadFeatureValuesOperation { - return &BatchReadFeatureValuesOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *BatchReadFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchReadFeatureValuesResponse, error) { - var resp aiplatformpb.BatchReadFeatureValuesResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err - } - return &resp, nil -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *BatchReadFeatureValuesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchReadFeatureValuesResponse, error) { - var resp aiplatformpb.BatchReadFeatureValuesResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateFeaturestoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *BatchReadFeatureValuesOperation) Metadata() (*aiplatformpb.BatchReadFeatureValuesOperationMetadata, error) { - var meta aiplatformpb.BatchReadFeatureValuesOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetFeaturestore gets details of a single Featurestore. +func (c *featurestoreRESTClient) GetFeaturestore(ctx context.Context, req *aiplatformpb.GetFeaturestoreRequest, opts ...gax.CallOption) (*aiplatformpb.Featurestore, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *BatchReadFeatureValuesOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *BatchReadFeatureValuesOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetFeaturestore[0:len((*c.CallOptions).GetFeaturestore):len((*c.CallOptions).GetFeaturestore)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Featurestore{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// CreateEntityTypeOperation manages a long-running operation from CreateEntityType. + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListFeaturestores lists Featurestores in a given project and location. +func (c *featurestoreRESTClient) ListFeaturestores(ctx context.Context, req *aiplatformpb.ListFeaturestoresRequest, opts ...gax.CallOption) *FeaturestoreIterator { + it := &FeaturestoreIterator{} + req = proto.Clone(req).(*aiplatformpb.ListFeaturestoresRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Featurestore, string, error) { + resp := &aiplatformpb.ListFeaturestoresResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/featurestores", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetFeaturestores(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateFeaturestore updates the parameters of a single Featurestore. +func (c *featurestoreRESTClient) UpdateFeaturestore(ctx context.Context, req *aiplatformpb.UpdateFeaturestoreRequest, opts ...gax.CallOption) (*UpdateFeaturestoreOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetFeaturestore() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetFeaturestore().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "featurestore.name", url.QueryEscape(req.GetFeaturestore().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UpdateFeaturestoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteFeaturestore deletes a single Featurestore. The Featurestore must not contain any +// EntityTypes or force must be set to true for the request to succeed. +func (c *featurestoreRESTClient) DeleteFeaturestore(ctx context.Context, req *aiplatformpb.DeleteFeaturestoreRequest, opts ...gax.CallOption) (*DeleteFeaturestoreOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteFeaturestoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateEntityType creates a new EntityType in a given Featurestore. +func (c *featurestoreRESTClient) CreateEntityType(ctx context.Context, req *aiplatformpb.CreateEntityTypeRequest, opts ...gax.CallOption) (*CreateEntityTypeOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntityType() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/entityTypes", req.GetParent()) + + params := url.Values{} + params.Add("entityTypeId", fmt.Sprintf("%v", req.GetEntityTypeId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateEntityTypeOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetEntityType gets details of a single EntityType. +func (c *featurestoreRESTClient) GetEntityType(ctx context.Context, req *aiplatformpb.GetEntityTypeRequest, opts ...gax.CallOption) (*aiplatformpb.EntityType, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEntityType[0:len((*c.CallOptions).GetEntityType):len((*c.CallOptions).GetEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.EntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListEntityTypes lists EntityTypes in a given Featurestore. +func (c *featurestoreRESTClient) ListEntityTypes(ctx context.Context, req *aiplatformpb.ListEntityTypesRequest, opts ...gax.CallOption) *EntityTypeIterator { + it := &EntityTypeIterator{} + req = proto.Clone(req).(*aiplatformpb.ListEntityTypesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.EntityType, string, error) { + resp := &aiplatformpb.ListEntityTypesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/entityTypes", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEntityTypes(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateEntityType updates the parameters of a single EntityType. +func (c *featurestoreRESTClient) UpdateEntityType(ctx context.Context, req *aiplatformpb.UpdateEntityTypeRequest, opts ...gax.CallOption) (*aiplatformpb.EntityType, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntityType() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetEntityType().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type.name", url.QueryEscape(req.GetEntityType().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEntityType[0:len((*c.CallOptions).UpdateEntityType):len((*c.CallOptions).UpdateEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.EntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteEntityType deletes a single EntityType. The EntityType must not have any Features +// or force must be set to true for the request to succeed. +func (c *featurestoreRESTClient) DeleteEntityType(ctx context.Context, req *aiplatformpb.DeleteEntityTypeRequest, opts ...gax.CallOption) (*DeleteEntityTypeOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteEntityTypeOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateFeature creates a new Feature in a given EntityType. +func (c *featurestoreRESTClient) CreateFeature(ctx context.Context, req *aiplatformpb.CreateFeatureRequest, opts ...gax.CallOption) (*CreateFeatureOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetFeature() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/features", req.GetParent()) + + params := url.Values{} + params.Add("featureId", fmt.Sprintf("%v", req.GetFeatureId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateFeatureOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchCreateFeatures creates a batch of Features in a given EntityType. +func (c *featurestoreRESTClient) BatchCreateFeatures(ctx context.Context, req *aiplatformpb.BatchCreateFeaturesRequest, opts ...gax.CallOption) (*BatchCreateFeaturesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/features:batchCreate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &BatchCreateFeaturesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetFeature gets details of a single Feature. +func (c *featurestoreRESTClient) GetFeature(ctx context.Context, req *aiplatformpb.GetFeatureRequest, opts ...gax.CallOption) (*aiplatformpb.Feature, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetFeature[0:len((*c.CallOptions).GetFeature):len((*c.CallOptions).GetFeature)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Feature{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListFeatures lists Features in a given EntityType. +func (c *featurestoreRESTClient) ListFeatures(ctx context.Context, req *aiplatformpb.ListFeaturesRequest, opts ...gax.CallOption) *FeatureIterator { + it := &FeatureIterator{} + req = proto.Clone(req).(*aiplatformpb.ListFeaturesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Feature, string, error) { + resp := &aiplatformpb.ListFeaturesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/features", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetLatestStatsCount() != 0 { + params.Add("latestStatsCount", fmt.Sprintf("%v", req.GetLatestStatsCount())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetFeatures(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateFeature updates the parameters of a single Feature. +func (c *featurestoreRESTClient) UpdateFeature(ctx context.Context, req *aiplatformpb.UpdateFeatureRequest, opts ...gax.CallOption) (*aiplatformpb.Feature, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetFeature() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetFeature().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "feature.name", url.QueryEscape(req.GetFeature().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateFeature[0:len((*c.CallOptions).UpdateFeature):len((*c.CallOptions).UpdateFeature)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Feature{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteFeature deletes a single Feature. +func (c *featurestoreRESTClient) DeleteFeature(ctx context.Context, req *aiplatformpb.DeleteFeatureRequest, opts ...gax.CallOption) (*DeleteFeatureOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteFeatureOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ImportFeatureValues imports Feature values into the Featurestore from a source storage. +// +// The progress of the import is tracked by the returned operation. The +// imported features are guaranteed to be visible to subsequent read +// operations after the operation is marked as successfully done. +// +// If an import operation fails, the Feature values returned from +// reads and exports may be inconsistent. If consistency is +// required, the caller must retry the same import request again and wait till +// the new operation returned is marked as successfully done. +// +// There are also scenarios where the caller can cause inconsistency. +// +// Source data for import contains multiple distinct Feature values for +// the same entity ID and timestamp. +// +// Source is modified during an import. This includes adding, updating, or +// removing source data and/or metadata. Examples of updating metadata +// include but are not limited to changing storage location, storage class, +// or retention policy. +// +// Online serving cluster is under-provisioned. +func (c *featurestoreRESTClient) ImportFeatureValues(ctx context.Context, req *aiplatformpb.ImportFeatureValuesRequest, opts ...gax.CallOption) (*ImportFeatureValuesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:importFeatureValues", req.GetEntityType()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &ImportFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchReadFeatureValues batch reads Feature values from a Featurestore. +// +// This API enables batch reading Feature values, where each read +// instance in the batch may read Feature values of entities from one or +// more EntityTypes. Point-in-time correctness is guaranteed for Feature +// values of each read instance as of each instance’s read timestamp. +func (c *featurestoreRESTClient) BatchReadFeatureValues(ctx context.Context, req *aiplatformpb.BatchReadFeatureValuesRequest, opts ...gax.CallOption) (*BatchReadFeatureValuesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:batchReadFeatureValues", req.GetFeaturestore()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "featurestore", url.QueryEscape(req.GetFeaturestore()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &BatchReadFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ExportFeatureValues exports Feature values from all the entities of a target EntityType. +func (c *featurestoreRESTClient) ExportFeatureValues(ctx context.Context, req *aiplatformpb.ExportFeatureValuesRequest, opts ...gax.CallOption) (*ExportFeatureValuesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:exportFeatureValues", req.GetEntityType()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &ExportFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteFeatureValues delete Feature values from Featurestore. +// +// The progress of the deletion is tracked by the returned operation. The +// deleted feature values are guaranteed to be invisible to subsequent read +// operations after the operation is marked as successfully done. +// +// If a delete feature values operation fails, the feature values +// returned from reads and exports may be inconsistent. If consistency is +// required, the caller must retry the same delete request again and wait till +// the new operation returned is marked as successfully done. +func (c *featurestoreRESTClient) DeleteFeatureValues(ctx context.Context, req *aiplatformpb.DeleteFeatureValuesRequest, opts ...gax.CallOption) (*DeleteFeatureValuesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:deleteFeatureValues", req.GetEntityType()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// SearchFeatures searches Features matching a query in a given project. +func (c *featurestoreRESTClient) SearchFeatures(ctx context.Context, req *aiplatformpb.SearchFeaturesRequest, opts ...gax.CallOption) *FeatureIterator { + it := &FeatureIterator{} + req = proto.Clone(req).(*aiplatformpb.SearchFeaturesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Feature, string, error) { + resp := &aiplatformpb.SearchFeaturesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/featurestores:searchFeatures", req.GetLocation()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetQuery() != "" { + params.Add("query", fmt.Sprintf("%v", req.GetQuery())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetFeatures(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *featurestoreRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *featurestoreRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *featurestoreRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *featurestoreRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *featurestoreRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *featurestoreRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchCreateFeaturesOperation manages a long-running operation from BatchCreateFeatures. +type BatchCreateFeaturesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchCreateFeaturesOperation returns a new BatchCreateFeaturesOperation from a given name. +// The name must be that of a previously created BatchCreateFeaturesOperation, possibly from a different process. +func (c *featurestoreGRPCClient) BatchCreateFeaturesOperation(name string) *BatchCreateFeaturesOperation { + return &BatchCreateFeaturesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchCreateFeaturesOperation returns a new BatchCreateFeaturesOperation from a given name. +// The name must be that of a previously created BatchCreateFeaturesOperation, possibly from a different process. +func (c *featurestoreRESTClient) BatchCreateFeaturesOperation(name string) *BatchCreateFeaturesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &BatchCreateFeaturesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchCreateFeaturesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchCreateFeaturesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.BatchCreateFeaturesResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchCreateFeaturesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchCreateFeaturesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.BatchCreateFeaturesResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchCreateFeaturesOperation) Metadata() (*aiplatformpb.BatchCreateFeaturesOperationMetadata, error) { + var meta aiplatformpb.BatchCreateFeaturesOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchCreateFeaturesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchCreateFeaturesOperation) Name() string { + return op.lro.Name() +} + +// BatchReadFeatureValuesOperation manages a long-running operation from BatchReadFeatureValues. +type BatchReadFeatureValuesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchReadFeatureValuesOperation returns a new BatchReadFeatureValuesOperation from a given name. +// The name must be that of a previously created BatchReadFeatureValuesOperation, possibly from a different process. +func (c *featurestoreGRPCClient) BatchReadFeatureValuesOperation(name string) *BatchReadFeatureValuesOperation { + return &BatchReadFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchReadFeatureValuesOperation returns a new BatchReadFeatureValuesOperation from a given name. +// The name must be that of a previously created BatchReadFeatureValuesOperation, possibly from a different process. +func (c *featurestoreRESTClient) BatchReadFeatureValuesOperation(name string) *BatchReadFeatureValuesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &BatchReadFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchReadFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchReadFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.BatchReadFeatureValuesResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchReadFeatureValuesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchReadFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.BatchReadFeatureValuesResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchReadFeatureValuesOperation) Metadata() (*aiplatformpb.BatchReadFeatureValuesOperationMetadata, error) { + var meta aiplatformpb.BatchReadFeatureValuesOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchReadFeatureValuesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchReadFeatureValuesOperation) Name() string { + return op.lro.Name() +} + +// CreateEntityTypeOperation manages a long-running operation from CreateEntityType. type CreateEntityTypeOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // CreateEntityTypeOperation returns a new CreateEntityTypeOperation from a given name. @@ -1487,10 +3805,21 @@ func (c *featurestoreGRPCClient) CreateEntityTypeOperation(name string) *CreateE } } +// CreateEntityTypeOperation returns a new CreateEntityTypeOperation from a given name. +// The name must be that of a previously created CreateEntityTypeOperation, possibly from a different process. +func (c *featurestoreRESTClient) CreateEntityTypeOperation(name string) *CreateEntityTypeOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateEntityTypeOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateEntityTypeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.EntityType, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.EntityType if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1508,6 +3837,7 @@ func (op *CreateEntityTypeOperation) Wait(ctx context.Context, opts ...gax.CallO // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *CreateEntityTypeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.EntityType, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.EntityType if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1545,7 +3875,8 @@ func (op *CreateEntityTypeOperation) Name() string { // CreateFeatureOperation manages a long-running operation from CreateFeature. type CreateFeatureOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // CreateFeatureOperation returns a new CreateFeatureOperation from a given name. @@ -1556,10 +3887,21 @@ func (c *featurestoreGRPCClient) CreateFeatureOperation(name string) *CreateFeat } } +// CreateFeatureOperation returns a new CreateFeatureOperation from a given name. +// The name must be that of a previously created CreateFeatureOperation, possibly from a different process. +func (c *featurestoreRESTClient) CreateFeatureOperation(name string) *CreateFeatureOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateFeatureOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateFeatureOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Feature, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Feature if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1577,6 +3919,7 @@ func (op *CreateFeatureOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *CreateFeatureOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Feature, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Feature if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1614,7 +3957,8 @@ func (op *CreateFeatureOperation) Name() string { // CreateFeaturestoreOperation manages a long-running operation from CreateFeaturestore. type CreateFeaturestoreOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // CreateFeaturestoreOperation returns a new CreateFeaturestoreOperation from a given name. @@ -1625,10 +3969,21 @@ func (c *featurestoreGRPCClient) CreateFeaturestoreOperation(name string) *Creat } } +// CreateFeaturestoreOperation returns a new CreateFeaturestoreOperation from a given name. +// The name must be that of a previously created CreateFeaturestoreOperation, possibly from a different process. +func (c *featurestoreRESTClient) CreateFeaturestoreOperation(name string) *CreateFeaturestoreOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateFeaturestoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *CreateFeaturestoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Featurestore, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Featurestore if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1646,6 +4001,7 @@ func (op *CreateFeaturestoreOperation) Wait(ctx context.Context, opts ...gax.Cal // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *CreateFeaturestoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Featurestore, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Featurestore if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1683,7 +4039,8 @@ func (op *CreateFeaturestoreOperation) Name() string { // DeleteEntityTypeOperation manages a long-running operation from DeleteEntityType. type DeleteEntityTypeOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteEntityTypeOperation returns a new DeleteEntityTypeOperation from a given name. @@ -1694,10 +4051,21 @@ func (c *featurestoreGRPCClient) DeleteEntityTypeOperation(name string) *DeleteE } } +// DeleteEntityTypeOperation returns a new DeleteEntityTypeOperation from a given name. +// The name must be that of a previously created DeleteEntityTypeOperation, possibly from a different process. +func (c *featurestoreRESTClient) DeleteEntityTypeOperation(name string) *DeleteEntityTypeOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteEntityTypeOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteEntityTypeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1711,6 +4079,7 @@ func (op *DeleteEntityTypeOperation) Wait(ctx context.Context, opts ...gax.CallO // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteEntityTypeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1741,7 +4110,8 @@ func (op *DeleteEntityTypeOperation) Name() string { // DeleteFeatureOperation manages a long-running operation from DeleteFeature. type DeleteFeatureOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteFeatureOperation returns a new DeleteFeatureOperation from a given name. @@ -1752,10 +4122,21 @@ func (c *featurestoreGRPCClient) DeleteFeatureOperation(name string) *DeleteFeat } } +// DeleteFeatureOperation returns a new DeleteFeatureOperation from a given name. +// The name must be that of a previously created DeleteFeatureOperation, possibly from a different process. +func (c *featurestoreRESTClient) DeleteFeatureOperation(name string) *DeleteFeatureOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteFeatureOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteFeatureOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1769,6 +4150,7 @@ func (op *DeleteFeatureOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteFeatureOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1797,9 +4179,92 @@ func (op *DeleteFeatureOperation) Name() string { return op.lro.Name() } +// DeleteFeatureValuesOperation manages a long-running operation from DeleteFeatureValues. +type DeleteFeatureValuesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteFeatureValuesOperation returns a new DeleteFeatureValuesOperation from a given name. +// The name must be that of a previously created DeleteFeatureValuesOperation, possibly from a different process. +func (c *featurestoreGRPCClient) DeleteFeatureValuesOperation(name string) *DeleteFeatureValuesOperation { + return &DeleteFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteFeatureValuesOperation returns a new DeleteFeatureValuesOperation from a given name. +// The name must be that of a previously created DeleteFeatureValuesOperation, possibly from a different process. +func (c *featurestoreRESTClient) DeleteFeatureValuesOperation(name string) *DeleteFeatureValuesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeleteFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeleteFeatureValuesResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteFeatureValuesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeleteFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeleteFeatureValuesResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteFeatureValuesOperation) Metadata() (*aiplatformpb.DeleteFeatureValuesOperationMetadata, error) { + var meta aiplatformpb.DeleteFeatureValuesOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteFeatureValuesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteFeatureValuesOperation) Name() string { + return op.lro.Name() +} + // DeleteFeaturestoreOperation manages a long-running operation from DeleteFeaturestore. type DeleteFeaturestoreOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteFeaturestoreOperation returns a new DeleteFeaturestoreOperation from a given name. @@ -1810,10 +4275,21 @@ func (c *featurestoreGRPCClient) DeleteFeaturestoreOperation(name string) *Delet } } +// DeleteFeaturestoreOperation returns a new DeleteFeaturestoreOperation from a given name. +// The name must be that of a previously created DeleteFeaturestoreOperation, possibly from a different process. +func (c *featurestoreRESTClient) DeleteFeaturestoreOperation(name string) *DeleteFeaturestoreOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteFeaturestoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteFeaturestoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1827,6 +4303,7 @@ func (op *DeleteFeaturestoreOperation) Wait(ctx context.Context, opts ...gax.Cal // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteFeaturestoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1857,7 +4334,8 @@ func (op *DeleteFeaturestoreOperation) Name() string { // ExportFeatureValuesOperation manages a long-running operation from ExportFeatureValues. type ExportFeatureValuesOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ExportFeatureValuesOperation returns a new ExportFeatureValuesOperation from a given name. @@ -1868,10 +4346,21 @@ func (c *featurestoreGRPCClient) ExportFeatureValuesOperation(name string) *Expo } } +// ExportFeatureValuesOperation returns a new ExportFeatureValuesOperation from a given name. +// The name must be that of a previously created ExportFeatureValuesOperation, possibly from a different process. +func (c *featurestoreRESTClient) ExportFeatureValuesOperation(name string) *ExportFeatureValuesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &ExportFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ExportFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ExportFeatureValuesResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1889,6 +4378,7 @@ func (op *ExportFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.Ca // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ExportFeatureValuesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ExportFeatureValuesResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1926,7 +4416,8 @@ func (op *ExportFeatureValuesOperation) Name() string { // ImportFeatureValuesOperation manages a long-running operation from ImportFeatureValues. type ImportFeatureValuesOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ImportFeatureValuesOperation returns a new ImportFeatureValuesOperation from a given name. @@ -1937,10 +4428,21 @@ func (c *featurestoreGRPCClient) ImportFeatureValuesOperation(name string) *Impo } } +// ImportFeatureValuesOperation returns a new ImportFeatureValuesOperation from a given name. +// The name must be that of a previously created ImportFeatureValuesOperation, possibly from a different process. +func (c *featurestoreRESTClient) ImportFeatureValuesOperation(name string) *ImportFeatureValuesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &ImportFeatureValuesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ImportFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ImportFeatureValuesResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1958,6 +4460,7 @@ func (op *ImportFeatureValuesOperation) Wait(ctx context.Context, opts ...gax.Ca // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ImportFeatureValuesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ImportFeatureValuesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ImportFeatureValuesResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1995,7 +4498,8 @@ func (op *ImportFeatureValuesOperation) Name() string { // UpdateFeaturestoreOperation manages a long-running operation from UpdateFeaturestore. type UpdateFeaturestoreOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UpdateFeaturestoreOperation returns a new UpdateFeaturestoreOperation from a given name. @@ -2006,10 +4510,21 @@ func (c *featurestoreGRPCClient) UpdateFeaturestoreOperation(name string) *Updat } } +// UpdateFeaturestoreOperation returns a new UpdateFeaturestoreOperation from a given name. +// The name must be that of a previously created UpdateFeaturestoreOperation, possibly from a different process. +func (c *featurestoreRESTClient) UpdateFeaturestoreOperation(name string) *UpdateFeaturestoreOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UpdateFeaturestoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateFeaturestoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Featurestore, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Featurestore if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -2027,6 +4542,7 @@ func (op *UpdateFeaturestoreOperation) Wait(ctx context.Context, opts ...gax.Cal // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UpdateFeaturestoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Featurestore, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Featurestore if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/featurestore_client_example_test.go b/aiplatform/apiv1beta1/featurestore_client_example_test.go index eeb1ae42a1aa..8faf034adab2 100644 --- a/aiplatform/apiv1beta1/featurestore_client_example_test.go +++ b/aiplatform/apiv1beta1/featurestore_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewFeaturestoreClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewFeaturestoreClient() { _ = c } +func ExampleNewFeaturestoreRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewFeaturestoreRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleFeaturestoreClient_CreateFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleFeaturestoreClient_CreateFeaturestore() { func ExampleFeaturestoreClient_GetFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleFeaturestoreClient_GetFeaturestore() { func ExampleFeaturestoreClient_ListFeaturestores() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleFeaturestoreClient_ListFeaturestores() { func ExampleFeaturestoreClient_UpdateFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +179,11 @@ func ExampleFeaturestoreClient_UpdateFeaturestore() { func ExampleFeaturestoreClient_DeleteFeaturestore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +207,11 @@ func ExampleFeaturestoreClient_DeleteFeaturestore() { func ExampleFeaturestoreClient_CreateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -185,6 +237,11 @@ func ExampleFeaturestoreClient_CreateEntityType() { func ExampleFeaturestoreClient_GetEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +262,11 @@ func ExampleFeaturestoreClient_GetEntityType() { func ExampleFeaturestoreClient_ListEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -231,6 +293,11 @@ func ExampleFeaturestoreClient_ListEntityTypes() { func ExampleFeaturestoreClient_UpdateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -251,6 +318,11 @@ func ExampleFeaturestoreClient_UpdateEntityType() { func ExampleFeaturestoreClient_DeleteEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -274,6 +346,11 @@ func ExampleFeaturestoreClient_DeleteEntityType() { func ExampleFeaturestoreClient_CreateFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -299,6 +376,11 @@ func ExampleFeaturestoreClient_CreateFeature() { func ExampleFeaturestoreClient_BatchCreateFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -324,6 +406,11 @@ func ExampleFeaturestoreClient_BatchCreateFeatures() { func ExampleFeaturestoreClient_GetFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -344,6 +431,11 @@ func ExampleFeaturestoreClient_GetFeature() { func ExampleFeaturestoreClient_ListFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -370,6 +462,11 @@ func ExampleFeaturestoreClient_ListFeatures() { func ExampleFeaturestoreClient_UpdateFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -390,6 +487,11 @@ func ExampleFeaturestoreClient_UpdateFeature() { func ExampleFeaturestoreClient_DeleteFeature() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -413,6 +515,11 @@ func ExampleFeaturestoreClient_DeleteFeature() { func ExampleFeaturestoreClient_ImportFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +545,11 @@ func ExampleFeaturestoreClient_ImportFeatureValues() { func ExampleFeaturestoreClient_BatchReadFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -463,6 +575,11 @@ func ExampleFeaturestoreClient_BatchReadFeatureValues() { func ExampleFeaturestoreClient_ExportFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -486,8 +603,43 @@ func ExampleFeaturestoreClient_ExportFeatureValues() { _ = resp } +func ExampleFeaturestoreClient_DeleteFeatureValues() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewFeaturestoreClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteFeatureValuesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#DeleteFeatureValuesRequest. + } + op, err := c.DeleteFeatureValues(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleFeaturestoreClient_SearchFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -514,6 +666,11 @@ func ExampleFeaturestoreClient_SearchFeatures() { func ExampleFeaturestoreClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -534,6 +691,11 @@ func ExampleFeaturestoreClient_GetLocation() { func ExampleFeaturestoreClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -560,6 +722,11 @@ func ExampleFeaturestoreClient_ListLocations() { func ExampleFeaturestoreClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -580,6 +747,11 @@ func ExampleFeaturestoreClient_GetIamPolicy() { func ExampleFeaturestoreClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -600,6 +772,11 @@ func ExampleFeaturestoreClient_SetIamPolicy() { func ExampleFeaturestoreClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -620,6 +797,11 @@ func ExampleFeaturestoreClient_TestIamPermissions() { func ExampleFeaturestoreClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -638,6 +820,11 @@ func ExampleFeaturestoreClient_CancelOperation() { func ExampleFeaturestoreClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -656,6 +843,11 @@ func ExampleFeaturestoreClient_DeleteOperation() { func ExampleFeaturestoreClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -676,6 +868,11 @@ func ExampleFeaturestoreClient_GetOperation() { func ExampleFeaturestoreClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. @@ -702,6 +899,11 @@ func ExampleFeaturestoreClient_ListOperations() { func ExampleFeaturestoreClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/featurestore_online_serving_client.go b/aiplatform/apiv1beta1/featurestore_online_serving_client.go index f069b5d4071f..8294498fc043 100644 --- a/aiplatform/apiv1beta1/featurestore_online_serving_client.go +++ b/aiplatform/apiv1beta1/featurestore_online_serving_client.go @@ -17,23 +17,29 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -43,6 +49,7 @@ var newFeaturestoreOnlineServingClientHook clientHook type FeaturestoreOnlineServingCallOptions struct { ReadFeatureValues []gax.CallOption StreamingReadFeatureValues []gax.CallOption + WriteFeatureValues []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption @@ -71,6 +78,25 @@ func defaultFeaturestoreOnlineServingCallOptions() *FeaturestoreOnlineServingCal return &FeaturestoreOnlineServingCallOptions{ ReadFeatureValues: []gax.CallOption{}, StreamingReadFeatureValues: []gax.CallOption{}, + WriteFeatureValues: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + +func defaultFeaturestoreOnlineServingRESTCallOptions() *FeaturestoreOnlineServingCallOptions { + return &FeaturestoreOnlineServingCallOptions{ + ReadFeatureValues: []gax.CallOption{}, + StreamingReadFeatureValues: []gax.CallOption{}, + WriteFeatureValues: []gax.CallOption{}, GetLocation: []gax.CallOption{}, ListLocations: []gax.CallOption{}, GetIamPolicy: []gax.CallOption{}, @@ -91,6 +117,7 @@ type internalFeaturestoreOnlineServingClient interface { Connection() *grpc.ClientConn ReadFeatureValues(context.Context, *aiplatformpb.ReadFeatureValuesRequest, ...gax.CallOption) (*aiplatformpb.ReadFeatureValuesResponse, error) StreamingReadFeatureValues(context.Context, *aiplatformpb.StreamingReadFeatureValuesRequest, ...gax.CallOption) (aiplatformpb.FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient, error) + WriteFeatureValues(context.Context, *aiplatformpb.WriteFeatureValuesRequest, ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) @@ -132,7 +159,8 @@ func (c *FeaturestoreOnlineServingClient) setGoogleClientInfo(keyval ...string) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FeaturestoreOnlineServingClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -151,6 +179,15 @@ func (c *FeaturestoreOnlineServingClient) StreamingReadFeatureValues(ctx context return c.internalClient.StreamingReadFeatureValues(ctx, req, opts...) } +// WriteFeatureValues writes Feature values of one or more entities of an EntityType. +// +// The Feature values are merged into existing entities if any. The Feature +// values to be written must have timestamp within the online storage +// retention. +func (c *FeaturestoreOnlineServingClient) WriteFeatureValues(ctx context.Context, req *aiplatformpb.WriteFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) { + return c.internalClient.WriteFeatureValues(ctx, req, opts...) +} + // GetLocation gets information about a location. func (c *FeaturestoreOnlineServingClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { return c.internalClient.GetLocation(ctx, req, opts...) @@ -281,7 +318,8 @@ func NewFeaturestoreOnlineServingClient(ctx context.Context, opts ...option.Clie // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *featurestoreOnlineServingGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -301,6 +339,74 @@ func (c *featurestoreOnlineServingGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type featurestoreOnlineServingRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing FeaturestoreOnlineServingClient + CallOptions **FeaturestoreOnlineServingCallOptions +} + +// NewFeaturestoreOnlineServingRESTClient creates a new featurestore online serving service rest client. +// +// A service for serving online feature values. +func NewFeaturestoreOnlineServingRESTClient(ctx context.Context, opts ...option.ClientOption) (*FeaturestoreOnlineServingClient, error) { + clientOpts := append(defaultFeaturestoreOnlineServingRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultFeaturestoreOnlineServingRESTCallOptions() + c := &featurestoreOnlineServingRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &FeaturestoreOnlineServingClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultFeaturestoreOnlineServingRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *featurestoreOnlineServingRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *featurestoreOnlineServingRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *featurestoreOnlineServingRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *featurestoreOnlineServingGRPCClient) ReadFeatureValues(ctx context.Context, req *aiplatformpb.ReadFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.ReadFeatureValuesResponse, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -339,6 +445,23 @@ func (c *featurestoreOnlineServingGRPCClient) StreamingReadFeatureValues(ctx con return resp, nil } +func (c *featurestoreOnlineServingGRPCClient) WriteFeatureValues(ctx context.Context, req *aiplatformpb.WriteFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).WriteFeatureValues[0:len((*c.CallOptions).WriteFeatureValues):len((*c.CallOptions).WriteFeatureValues)], opts...) + var resp *aiplatformpb.WriteFeatureValuesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.featurestoreOnlineServingClient.WriteFeatureValues(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *featurestoreOnlineServingGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) @@ -556,3 +679,836 @@ func (c *featurestoreOnlineServingGRPCClient) WaitOperation(ctx context.Context, } return resp, nil } + +// ReadFeatureValues reads Feature values of a specific entity of an EntityType. For reading +// feature values of multiple entities of an EntityType, please use +// StreamingReadFeatureValues. +func (c *featurestoreOnlineServingRESTClient) ReadFeatureValues(ctx context.Context, req *aiplatformpb.ReadFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.ReadFeatureValuesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:readFeatureValues", req.GetEntityType()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ReadFeatureValues[0:len((*c.CallOptions).ReadFeatureValues):len((*c.CallOptions).ReadFeatureValues)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ReadFeatureValuesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// StreamingReadFeatureValues reads Feature values for multiple entities. Depending on their size, data +// for different entities may be broken +// up across multiple responses. +func (c *featurestoreOnlineServingRESTClient) StreamingReadFeatureValues(ctx context.Context, req *aiplatformpb.StreamingReadFeatureValuesRequest, opts ...gax.CallOption) (aiplatformpb.FeaturestoreOnlineServingService_StreamingReadFeatureValuesClient, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:streamingReadFeatureValues", req.GetEntityType()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + var streamClient *streamingReadFeatureValuesRESTClient + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + streamClient = &streamingReadFeatureValuesRESTClient{ + ctx: ctx, + md: metadata.MD(httpRsp.Header), + stream: gax.NewProtoJSONStreamReader(httpRsp.Body, (&aiplatformpb.ReadFeatureValuesResponse{}).ProtoReflect().Type()), + } + return nil + }, opts...) + + return streamClient, e +} + +// streamingReadFeatureValuesRESTClient is the stream client used to consume the server stream created by +// the REST implementation of StreamingReadFeatureValues. +type streamingReadFeatureValuesRESTClient struct { + ctx context.Context + md metadata.MD + stream *gax.ProtoJSONStream +} + +func (c *streamingReadFeatureValuesRESTClient) Recv() (*aiplatformpb.ReadFeatureValuesResponse, error) { + if err := c.ctx.Err(); err != nil { + defer c.stream.Close() + return nil, err + } + msg, err := c.stream.Recv() + if err != nil { + defer c.stream.Close() + return nil, err + } + res := msg.(*aiplatformpb.ReadFeatureValuesResponse) + return res, nil +} + +func (c *streamingReadFeatureValuesRESTClient) Header() (metadata.MD, error) { + return c.md, nil +} + +func (c *streamingReadFeatureValuesRESTClient) Trailer() metadata.MD { + return c.md +} + +func (c *streamingReadFeatureValuesRESTClient) CloseSend() error { + // This is a no-op to fulfill the interface. + return fmt.Errorf("this method is not implemented for a server-stream") +} + +func (c *streamingReadFeatureValuesRESTClient) Context() context.Context { + return c.ctx +} + +func (c *streamingReadFeatureValuesRESTClient) SendMsg(m interface{}) error { + // This is a no-op to fulfill the interface. + return fmt.Errorf("this method is not implemented for a server-stream") +} + +func (c *streamingReadFeatureValuesRESTClient) RecvMsg(m interface{}) error { + // This is a no-op to fulfill the interface. + return fmt.Errorf("this method is not implemented, use Recv") +} + +// WriteFeatureValues writes Feature values of one or more entities of an EntityType. +// +// The Feature values are merged into existing entities if any. The Feature +// values to be written must have timestamp within the online storage +// retention. +func (c *featurestoreOnlineServingRESTClient) WriteFeatureValues(ctx context.Context, req *aiplatformpb.WriteFeatureValuesRequest, opts ...gax.CallOption) (*aiplatformpb.WriteFeatureValuesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:writeFeatureValues", req.GetEntityType()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type", url.QueryEscape(req.GetEntityType()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WriteFeatureValues[0:len((*c.CallOptions).WriteFeatureValues):len((*c.CallOptions).WriteFeatureValues)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.WriteFeatureValuesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *featurestoreOnlineServingRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *featurestoreOnlineServingRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *featurestoreOnlineServingRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *featurestoreOnlineServingRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *featurestoreOnlineServingRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreOnlineServingRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreOnlineServingRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreOnlineServingRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *featurestoreOnlineServingRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *featurestoreOnlineServingRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} diff --git a/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go b/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go index 046bc7584a7d..4b96cc20b4e2 100644 --- a/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go +++ b/aiplatform/apiv1beta1/featurestore_online_serving_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewFeaturestoreOnlineServingClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewFeaturestoreOnlineServingClient() { _ = c } +func ExampleNewFeaturestoreOnlineServingRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewFeaturestoreOnlineServingRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleFeaturestoreOnlineServingClient_ReadFeatureValues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -59,8 +86,38 @@ func ExampleFeaturestoreOnlineServingClient_ReadFeatureValues() { _ = resp } +func ExampleFeaturestoreOnlineServingClient_WriteFeatureValues() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteFeatureValuesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#WriteFeatureValuesRequest. + } + resp, err := c.WriteFeatureValues(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleFeaturestoreOnlineServingClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +138,11 @@ func ExampleFeaturestoreOnlineServingClient_GetLocation() { func ExampleFeaturestoreOnlineServingClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +169,11 @@ func ExampleFeaturestoreOnlineServingClient_ListLocations() { func ExampleFeaturestoreOnlineServingClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +194,11 @@ func ExampleFeaturestoreOnlineServingClient_GetIamPolicy() { func ExampleFeaturestoreOnlineServingClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +219,11 @@ func ExampleFeaturestoreOnlineServingClient_SetIamPolicy() { func ExampleFeaturestoreOnlineServingClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +244,11 @@ func ExampleFeaturestoreOnlineServingClient_TestIamPermissions() { func ExampleFeaturestoreOnlineServingClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -185,6 +267,11 @@ func ExampleFeaturestoreOnlineServingClient_CancelOperation() { func ExampleFeaturestoreOnlineServingClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +290,11 @@ func ExampleFeaturestoreOnlineServingClient_DeleteOperation() { func ExampleFeaturestoreOnlineServingClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -223,6 +315,11 @@ func ExampleFeaturestoreOnlineServingClient_GetOperation() { func ExampleFeaturestoreOnlineServingClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. @@ -249,6 +346,11 @@ func ExampleFeaturestoreOnlineServingClient_ListOperations() { func ExampleFeaturestoreOnlineServingClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewFeaturestoreOnlineServingClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/gapic_metadata.json b/aiplatform/apiv1beta1/gapic_metadata.json index 548d1d8e554c..f74aed916913 100644 --- a/aiplatform/apiv1beta1/gapic_metadata.json +++ b/aiplatform/apiv1beta1/gapic_metadata.json @@ -116,27 +116,23 @@ ] } } - } - } - }, - "EndpointService": { - "clients": { - "grpc": { - "libraryClient": "EndpointClient", + }, + "rest": { + "libraryClient": "DatasetClient", "rpcs": { "CancelOperation": { "methods": [ "CancelOperation" ] }, - "CreateEndpoint": { + "CreateDataset": { "methods": [ - "CreateEndpoint" + "CreateDataset" ] }, - "DeleteEndpoint": { + "DeleteDataset": { "methods": [ - "DeleteEndpoint" + "DeleteDataset" ] }, "DeleteOperation": { @@ -144,14 +140,19 @@ "DeleteOperation" ] }, - "DeployModel": { + "ExportData": { "methods": [ - "DeployModel" + "ExportData" ] }, - "GetEndpoint": { + "GetAnnotationSpec": { "methods": [ - "GetEndpoint" + "GetAnnotationSpec" + ] + }, + "GetDataset": { + "methods": [ + "GetDataset" ] }, "GetIamPolicy": { @@ -169,9 +170,24 @@ "GetOperation" ] }, - "ListEndpoints": { + "ImportData": { "methods": [ - "ListEndpoints" + "ImportData" + ] + }, + "ListAnnotations": { + "methods": [ + "ListAnnotations" + ] + }, + "ListDataItems": { + "methods": [ + "ListDataItems" + ] + }, + "ListDatasets": { + "methods": [ + "ListDatasets" ] }, "ListLocations": { @@ -184,6 +200,11 @@ "ListOperations" ] }, + "ListSavedQueries": { + "methods": [ + "ListSavedQueries" + ] + }, "SetIamPolicy": { "methods": [ "SetIamPolicy" @@ -194,14 +215,9 @@ "TestIamPermissions" ] }, - "UndeployModel": { - "methods": [ - "UndeployModel" - ] - }, - "UpdateEndpoint": { + "UpdateDataset": { "methods": [ - "UpdateEndpoint" + "UpdateDataset" ] }, "WaitOperation": { @@ -213,21 +229,36 @@ } } }, - "FeaturestoreOnlineServingService": { + "DeploymentResourcePoolService": { "clients": { "grpc": { - "libraryClient": "FeaturestoreOnlineServingClient", + "libraryClient": "DeploymentResourcePoolClient", "rpcs": { "CancelOperation": { "methods": [ "CancelOperation" ] }, + "CreateDeploymentResourcePool": { + "methods": [ + "CreateDeploymentResourcePool" + ] + }, + "DeleteDeploymentResourcePool": { + "methods": [ + "DeleteDeploymentResourcePool" + ] + }, "DeleteOperation": { "methods": [ "DeleteOperation" ] }, + "GetDeploymentResourcePool": { + "methods": [ + "GetDeploymentResourcePool" + ] + }, "GetIamPolicy": { "methods": [ "GetIamPolicy" @@ -243,6 +274,11 @@ "GetOperation" ] }, + "ListDeploymentResourcePools": { + "methods": [ + "ListDeploymentResourcePools" + ] + }, "ListLocations": { "methods": [ "ListLocations" @@ -253,9 +289,9 @@ "ListOperations" ] }, - "ReadFeatureValues": { + "QueryDeployedModels": { "methods": [ - "ReadFeatureValues" + "QueryDeployedModels" ] }, "SetIamPolicy": { @@ -263,11 +299,6 @@ "SetIamPolicy" ] }, - "StreamingReadFeatureValues": { - "methods": [ - "StreamingReadFeatureValues" - ] - }, "TestIamPermissions": { "methods": [ "TestIamPermissions" @@ -279,57 +310,23 @@ ] } } - } - } - }, - "FeaturestoreService": { - "clients": { - "grpc": { - "libraryClient": "FeaturestoreClient", + }, + "rest": { + "libraryClient": "DeploymentResourcePoolClient", "rpcs": { - "BatchCreateFeatures": { - "methods": [ - "BatchCreateFeatures" - ] - }, - "BatchReadFeatureValues": { - "methods": [ - "BatchReadFeatureValues" - ] - }, "CancelOperation": { "methods": [ "CancelOperation" ] }, - "CreateEntityType": { - "methods": [ - "CreateEntityType" - ] - }, - "CreateFeature": { - "methods": [ - "CreateFeature" - ] - }, - "CreateFeaturestore": { - "methods": [ - "CreateFeaturestore" - ] - }, - "DeleteEntityType": { - "methods": [ - "DeleteEntityType" - ] - }, - "DeleteFeature": { + "CreateDeploymentResourcePool": { "methods": [ - "DeleteFeature" + "CreateDeploymentResourcePool" ] }, - "DeleteFeaturestore": { + "DeleteDeploymentResourcePool": { "methods": [ - "DeleteFeaturestore" + "DeleteDeploymentResourcePool" ] }, "DeleteOperation": { @@ -337,24 +334,9 @@ "DeleteOperation" ] }, - "ExportFeatureValues": { - "methods": [ - "ExportFeatureValues" - ] - }, - "GetEntityType": { - "methods": [ - "GetEntityType" - ] - }, - "GetFeature": { - "methods": [ - "GetFeature" - ] - }, - "GetFeaturestore": { + "GetDeploymentResourcePool": { "methods": [ - "GetFeaturestore" + "GetDeploymentResourcePool" ] }, "GetIamPolicy": { @@ -372,24 +354,9 @@ "GetOperation" ] }, - "ImportFeatureValues": { - "methods": [ - "ImportFeatureValues" - ] - }, - "ListEntityTypes": { - "methods": [ - "ListEntityTypes" - ] - }, - "ListFeatures": { - "methods": [ - "ListFeatures" - ] - }, - "ListFeaturestores": { + "ListDeploymentResourcePools": { "methods": [ - "ListFeaturestores" + "ListDeploymentResourcePools" ] }, "ListLocations": { @@ -402,9 +369,9 @@ "ListOperations" ] }, - "SearchFeatures": { + "QueryDeployedModels": { "methods": [ - "SearchFeatures" + "QueryDeployedModels" ] }, "SetIamPolicy": { @@ -417,21 +384,6 @@ "TestIamPermissions" ] }, - "UpdateEntityType": { - "methods": [ - "UpdateEntityType" - ] - }, - "UpdateFeature": { - "methods": [ - "UpdateFeature" - ] - }, - "UpdateFeaturestore": { - "methods": [ - "UpdateFeaturestore" - ] - }, "WaitOperation": { "methods": [ "WaitOperation" @@ -441,24 +393,24 @@ } } }, - "IndexEndpointService": { + "EndpointService": { "clients": { "grpc": { - "libraryClient": "IndexEndpointClient", + "libraryClient": "EndpointClient", "rpcs": { "CancelOperation": { "methods": [ "CancelOperation" ] }, - "CreateIndexEndpoint": { + "CreateEndpoint": { "methods": [ - "CreateIndexEndpoint" + "CreateEndpoint" ] }, - "DeleteIndexEndpoint": { + "DeleteEndpoint": { "methods": [ - "DeleteIndexEndpoint" + "DeleteEndpoint" ] }, "DeleteOperation": { @@ -466,19 +418,19 @@ "DeleteOperation" ] }, - "DeployIndex": { + "DeployModel": { "methods": [ - "DeployIndex" + "DeployModel" ] }, - "GetIamPolicy": { + "GetEndpoint": { "methods": [ - "GetIamPolicy" + "GetEndpoint" ] }, - "GetIndexEndpoint": { + "GetIamPolicy": { "methods": [ - "GetIndexEndpoint" + "GetIamPolicy" ] }, "GetLocation": { @@ -491,9 +443,9 @@ "GetOperation" ] }, - "ListIndexEndpoints": { + "ListEndpoints": { "methods": [ - "ListIndexEndpoints" + "ListEndpoints" ] }, "ListLocations": { @@ -506,11 +458,6 @@ "ListOperations" ] }, - "MutateDeployedIndex": { - "methods": [ - "MutateDeployedIndex" - ] - }, "SetIamPolicy": { "methods": [ "SetIamPolicy" @@ -521,14 +468,14 @@ "TestIamPermissions" ] }, - "UndeployIndex": { + "UndeployModel": { "methods": [ - "UndeployIndex" + "UndeployModel" ] }, - "UpdateIndexEndpoint": { + "UpdateEndpoint": { "methods": [ - "UpdateIndexEndpoint" + "UpdateEndpoint" ] }, "WaitOperation": { @@ -537,27 +484,23 @@ ] } } - } - } - }, - "IndexService": { - "clients": { - "grpc": { - "libraryClient": "IndexClient", + }, + "rest": { + "libraryClient": "EndpointClient", "rpcs": { "CancelOperation": { "methods": [ "CancelOperation" ] }, - "CreateIndex": { + "CreateEndpoint": { "methods": [ - "CreateIndex" + "CreateEndpoint" ] }, - "DeleteIndex": { + "DeleteEndpoint": { "methods": [ - "DeleteIndex" + "DeleteEndpoint" ] }, "DeleteOperation": { @@ -565,14 +508,19 @@ "DeleteOperation" ] }, - "GetIamPolicy": { + "DeployModel": { "methods": [ - "GetIamPolicy" + "DeployModel" ] }, - "GetIndex": { + "GetEndpoint": { "methods": [ - "GetIndex" + "GetEndpoint" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" ] }, "GetLocation": { @@ -585,9 +533,9 @@ "GetOperation" ] }, - "ListIndexes": { + "ListEndpoints": { "methods": [ - "ListIndexes" + "ListEndpoints" ] }, "ListLocations": { @@ -610,123 +558,108 @@ "TestIamPermissions" ] }, - "UpdateIndex": { + "UndeployModel": { "methods": [ - "UpdateIndex" + "UndeployModel" ] }, - "WaitOperation": { + "UpdateEndpoint": { "methods": [ - "WaitOperation" + "UpdateEndpoint" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" ] } } } } }, - "JobService": { + "FeaturestoreOnlineServingService": { "clients": { "grpc": { - "libraryClient": "JobClient", + "libraryClient": "FeaturestoreOnlineServingClient", "rpcs": { - "CancelBatchPredictionJob": { - "methods": [ - "CancelBatchPredictionJob" - ] - }, - "CancelCustomJob": { - "methods": [ - "CancelCustomJob" - ] - }, - "CancelDataLabelingJob": { - "methods": [ - "CancelDataLabelingJob" - ] - }, - "CancelHyperparameterTuningJob": { - "methods": [ - "CancelHyperparameterTuningJob" - ] - }, "CancelOperation": { "methods": [ "CancelOperation" ] }, - "CreateBatchPredictionJob": { - "methods": [ - "CreateBatchPredictionJob" - ] - }, - "CreateCustomJob": { + "DeleteOperation": { "methods": [ - "CreateCustomJob" + "DeleteOperation" ] }, - "CreateDataLabelingJob": { + "GetIamPolicy": { "methods": [ - "CreateDataLabelingJob" + "GetIamPolicy" ] }, - "CreateHyperparameterTuningJob": { + "GetLocation": { "methods": [ - "CreateHyperparameterTuningJob" + "GetLocation" ] }, - "CreateModelDeploymentMonitoringJob": { + "GetOperation": { "methods": [ - "CreateModelDeploymentMonitoringJob" + "GetOperation" ] }, - "DeleteBatchPredictionJob": { + "ListLocations": { "methods": [ - "DeleteBatchPredictionJob" + "ListLocations" ] }, - "DeleteCustomJob": { + "ListOperations": { "methods": [ - "DeleteCustomJob" + "ListOperations" ] }, - "DeleteDataLabelingJob": { + "ReadFeatureValues": { "methods": [ - "DeleteDataLabelingJob" + "ReadFeatureValues" ] }, - "DeleteHyperparameterTuningJob": { + "SetIamPolicy": { "methods": [ - "DeleteHyperparameterTuningJob" + "SetIamPolicy" ] }, - "DeleteModelDeploymentMonitoringJob": { + "StreamingReadFeatureValues": { "methods": [ - "DeleteModelDeploymentMonitoringJob" + "StreamingReadFeatureValues" ] }, - "DeleteOperation": { + "TestIamPermissions": { "methods": [ - "DeleteOperation" + "TestIamPermissions" ] }, - "GetBatchPredictionJob": { + "WaitOperation": { "methods": [ - "GetBatchPredictionJob" + "WaitOperation" ] }, - "GetCustomJob": { + "WriteFeatureValues": { "methods": [ - "GetCustomJob" + "WriteFeatureValues" ] - }, - "GetDataLabelingJob": { + } + } + }, + "rest": { + "libraryClient": "FeaturestoreOnlineServingClient", + "rpcs": { + "CancelOperation": { "methods": [ - "GetDataLabelingJob" + "CancelOperation" ] }, - "GetHyperparameterTuningJob": { + "DeleteOperation": { "methods": [ - "GetHyperparameterTuningJob" + "DeleteOperation" ] }, "GetIamPolicy": { @@ -739,69 +672,34 @@ "GetLocation" ] }, - "GetModelDeploymentMonitoringJob": { - "methods": [ - "GetModelDeploymentMonitoringJob" - ] - }, "GetOperation": { "methods": [ "GetOperation" ] }, - "ListBatchPredictionJobs": { - "methods": [ - "ListBatchPredictionJobs" - ] - }, - "ListCustomJobs": { - "methods": [ - "ListCustomJobs" - ] - }, - "ListDataLabelingJobs": { - "methods": [ - "ListDataLabelingJobs" - ] - }, - "ListHyperparameterTuningJobs": { - "methods": [ - "ListHyperparameterTuningJobs" - ] - }, "ListLocations": { "methods": [ "ListLocations" ] }, - "ListModelDeploymentMonitoringJobs": { - "methods": [ - "ListModelDeploymentMonitoringJobs" - ] - }, "ListOperations": { "methods": [ "ListOperations" ] }, - "PauseModelDeploymentMonitoringJob": { - "methods": [ - "PauseModelDeploymentMonitoringJob" - ] - }, - "ResumeModelDeploymentMonitoringJob": { + "ReadFeatureValues": { "methods": [ - "ResumeModelDeploymentMonitoringJob" + "ReadFeatureValues" ] }, - "SearchModelDeploymentMonitoringStatsAnomalies": { + "SetIamPolicy": { "methods": [ - "SearchModelDeploymentMonitoringStatsAnomalies" + "SetIamPolicy" ] }, - "SetIamPolicy": { + "StreamingReadFeatureValues": { "methods": [ - "SetIamPolicy" + "StreamingReadFeatureValues" ] }, "TestIamPermissions": { @@ -809,38 +707,33 @@ "TestIamPermissions" ] }, - "UpdateModelDeploymentMonitoringJob": { + "WaitOperation": { "methods": [ - "UpdateModelDeploymentMonitoringJob" + "WaitOperation" ] }, - "WaitOperation": { + "WriteFeatureValues": { "methods": [ - "WaitOperation" + "WriteFeatureValues" ] } } } } }, - "MetadataService": { + "FeaturestoreService": { "clients": { "grpc": { - "libraryClient": "MetadataClient", + "libraryClient": "FeaturestoreClient", "rpcs": { - "AddContextArtifactsAndExecutions": { - "methods": [ - "AddContextArtifactsAndExecutions" - ] - }, - "AddContextChildren": { + "BatchCreateFeatures": { "methods": [ - "AddContextChildren" + "BatchCreateFeatures" ] }, - "AddExecutionEvents": { + "BatchReadFeatureValues": { "methods": [ - "AddExecutionEvents" + "BatchReadFeatureValues" ] }, "CancelOperation": { @@ -848,69 +741,64 @@ "CancelOperation" ] }, - "CreateArtifact": { - "methods": [ - "CreateArtifact" - ] - }, - "CreateContext": { + "CreateEntityType": { "methods": [ - "CreateContext" + "CreateEntityType" ] }, - "CreateExecution": { + "CreateFeature": { "methods": [ - "CreateExecution" + "CreateFeature" ] }, - "CreateMetadataSchema": { + "CreateFeaturestore": { "methods": [ - "CreateMetadataSchema" + "CreateFeaturestore" ] }, - "CreateMetadataStore": { + "DeleteEntityType": { "methods": [ - "CreateMetadataStore" + "DeleteEntityType" ] }, - "DeleteArtifact": { + "DeleteFeature": { "methods": [ - "DeleteArtifact" + "DeleteFeature" ] }, - "DeleteContext": { + "DeleteFeatureValues": { "methods": [ - "DeleteContext" + "DeleteFeatureValues" ] }, - "DeleteExecution": { + "DeleteFeaturestore": { "methods": [ - "DeleteExecution" + "DeleteFeaturestore" ] }, - "DeleteMetadataStore": { + "DeleteOperation": { "methods": [ - "DeleteMetadataStore" + "DeleteOperation" ] }, - "DeleteOperation": { + "ExportFeatureValues": { "methods": [ - "DeleteOperation" + "ExportFeatureValues" ] }, - "GetArtifact": { + "GetEntityType": { "methods": [ - "GetArtifact" + "GetEntityType" ] }, - "GetContext": { + "GetFeature": { "methods": [ - "GetContext" + "GetFeature" ] }, - "GetExecution": { + "GetFeaturestore": { "methods": [ - "GetExecution" + "GetFeaturestore" ] }, "GetIamPolicy": { @@ -923,84 +811,2111 @@ "GetLocation" ] }, - "GetMetadataSchema": { + "GetOperation": { "methods": [ - "GetMetadataSchema" + "GetOperation" ] }, - "GetMetadataStore": { + "ImportFeatureValues": { "methods": [ - "GetMetadataStore" + "ImportFeatureValues" ] }, - "GetOperation": { + "ListEntityTypes": { "methods": [ - "GetOperation" + "ListEntityTypes" ] }, - "ListArtifacts": { + "ListFeatures": { "methods": [ - "ListArtifacts" + "ListFeatures" ] }, - "ListContexts": { + "ListFeaturestores": { "methods": [ - "ListContexts" + "ListFeaturestores" ] }, - "ListExecutions": { + "ListLocations": { "methods": [ - "ListExecutions" + "ListLocations" ] }, - "ListLocations": { + "ListOperations": { "methods": [ - "ListLocations" + "ListOperations" + ] + }, + "SearchFeatures": { + "methods": [ + "SearchFeatures" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateEntityType": { + "methods": [ + "UpdateEntityType" + ] + }, + "UpdateFeature": { + "methods": [ + "UpdateFeature" + ] + }, + "UpdateFeaturestore": { + "methods": [ + "UpdateFeaturestore" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "FeaturestoreClient", + "rpcs": { + "BatchCreateFeatures": { + "methods": [ + "BatchCreateFeatures" + ] + }, + "BatchReadFeatureValues": { + "methods": [ + "BatchReadFeatureValues" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateEntityType": { + "methods": [ + "CreateEntityType" + ] + }, + "CreateFeature": { + "methods": [ + "CreateFeature" + ] + }, + "CreateFeaturestore": { + "methods": [ + "CreateFeaturestore" + ] + }, + "DeleteEntityType": { + "methods": [ + "DeleteEntityType" + ] + }, + "DeleteFeature": { + "methods": [ + "DeleteFeature" + ] + }, + "DeleteFeatureValues": { + "methods": [ + "DeleteFeatureValues" + ] + }, + "DeleteFeaturestore": { + "methods": [ + "DeleteFeaturestore" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "ExportFeatureValues": { + "methods": [ + "ExportFeatureValues" + ] + }, + "GetEntityType": { + "methods": [ + "GetEntityType" + ] + }, + "GetFeature": { + "methods": [ + "GetFeature" + ] + }, + "GetFeaturestore": { + "methods": [ + "GetFeaturestore" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportFeatureValues": { + "methods": [ + "ImportFeatureValues" + ] + }, + "ListEntityTypes": { + "methods": [ + "ListEntityTypes" + ] + }, + "ListFeatures": { + "methods": [ + "ListFeatures" + ] + }, + "ListFeaturestores": { + "methods": [ + "ListFeaturestores" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SearchFeatures": { + "methods": [ + "SearchFeatures" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateEntityType": { + "methods": [ + "UpdateEntityType" + ] + }, + "UpdateFeature": { + "methods": [ + "UpdateFeature" + ] + }, + "UpdateFeaturestore": { + "methods": [ + "UpdateFeaturestore" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "IndexEndpointService": { + "clients": { + "grpc": { + "libraryClient": "IndexEndpointClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateIndexEndpoint": { + "methods": [ + "CreateIndexEndpoint" + ] + }, + "DeleteIndexEndpoint": { + "methods": [ + "DeleteIndexEndpoint" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeployIndex": { + "methods": [ + "DeployIndex" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetIndexEndpoint": { + "methods": [ + "GetIndexEndpoint" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListIndexEndpoints": { + "methods": [ + "ListIndexEndpoints" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "MutateDeployedIndex": { + "methods": [ + "MutateDeployedIndex" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UndeployIndex": { + "methods": [ + "UndeployIndex" + ] + }, + "UpdateIndexEndpoint": { + "methods": [ + "UpdateIndexEndpoint" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "IndexEndpointClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateIndexEndpoint": { + "methods": [ + "CreateIndexEndpoint" + ] + }, + "DeleteIndexEndpoint": { + "methods": [ + "DeleteIndexEndpoint" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeployIndex": { + "methods": [ + "DeployIndex" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetIndexEndpoint": { + "methods": [ + "GetIndexEndpoint" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListIndexEndpoints": { + "methods": [ + "ListIndexEndpoints" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "MutateDeployedIndex": { + "methods": [ + "MutateDeployedIndex" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UndeployIndex": { + "methods": [ + "UndeployIndex" + ] + }, + "UpdateIndexEndpoint": { + "methods": [ + "UpdateIndexEndpoint" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "IndexService": { + "clients": { + "grpc": { + "libraryClient": "IndexClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateIndex": { + "methods": [ + "CreateIndex" + ] + }, + "DeleteIndex": { + "methods": [ + "DeleteIndex" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetIndex": { + "methods": [ + "GetIndex" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListIndexes": { + "methods": [ + "ListIndexes" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "RemoveDatapoints": { + "methods": [ + "RemoveDatapoints" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateIndex": { + "methods": [ + "UpdateIndex" + ] + }, + "UpsertDatapoints": { + "methods": [ + "UpsertDatapoints" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "IndexClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateIndex": { + "methods": [ + "CreateIndex" + ] + }, + "DeleteIndex": { + "methods": [ + "DeleteIndex" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetIndex": { + "methods": [ + "GetIndex" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListIndexes": { + "methods": [ + "ListIndexes" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "RemoveDatapoints": { + "methods": [ + "RemoveDatapoints" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateIndex": { + "methods": [ + "UpdateIndex" + ] + }, + "UpsertDatapoints": { + "methods": [ + "UpsertDatapoints" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "JobService": { + "clients": { + "grpc": { + "libraryClient": "JobClient", + "rpcs": { + "CancelBatchPredictionJob": { + "methods": [ + "CancelBatchPredictionJob" + ] + }, + "CancelCustomJob": { + "methods": [ + "CancelCustomJob" + ] + }, + "CancelDataLabelingJob": { + "methods": [ + "CancelDataLabelingJob" + ] + }, + "CancelHyperparameterTuningJob": { + "methods": [ + "CancelHyperparameterTuningJob" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateBatchPredictionJob": { + "methods": [ + "CreateBatchPredictionJob" + ] + }, + "CreateCustomJob": { + "methods": [ + "CreateCustomJob" + ] + }, + "CreateDataLabelingJob": { + "methods": [ + "CreateDataLabelingJob" + ] + }, + "CreateHyperparameterTuningJob": { + "methods": [ + "CreateHyperparameterTuningJob" + ] + }, + "CreateModelDeploymentMonitoringJob": { + "methods": [ + "CreateModelDeploymentMonitoringJob" + ] + }, + "DeleteBatchPredictionJob": { + "methods": [ + "DeleteBatchPredictionJob" + ] + }, + "DeleteCustomJob": { + "methods": [ + "DeleteCustomJob" + ] + }, + "DeleteDataLabelingJob": { + "methods": [ + "DeleteDataLabelingJob" + ] + }, + "DeleteHyperparameterTuningJob": { + "methods": [ + "DeleteHyperparameterTuningJob" + ] + }, + "DeleteModelDeploymentMonitoringJob": { + "methods": [ + "DeleteModelDeploymentMonitoringJob" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetBatchPredictionJob": { + "methods": [ + "GetBatchPredictionJob" + ] + }, + "GetCustomJob": { + "methods": [ + "GetCustomJob" + ] + }, + "GetDataLabelingJob": { + "methods": [ + "GetDataLabelingJob" + ] + }, + "GetHyperparameterTuningJob": { + "methods": [ + "GetHyperparameterTuningJob" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetModelDeploymentMonitoringJob": { + "methods": [ + "GetModelDeploymentMonitoringJob" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListBatchPredictionJobs": { + "methods": [ + "ListBatchPredictionJobs" + ] + }, + "ListCustomJobs": { + "methods": [ + "ListCustomJobs" + ] + }, + "ListDataLabelingJobs": { + "methods": [ + "ListDataLabelingJobs" + ] + }, + "ListHyperparameterTuningJobs": { + "methods": [ + "ListHyperparameterTuningJobs" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListModelDeploymentMonitoringJobs": { + "methods": [ + "ListModelDeploymentMonitoringJobs" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "PauseModelDeploymentMonitoringJob": { + "methods": [ + "PauseModelDeploymentMonitoringJob" + ] + }, + "ResumeModelDeploymentMonitoringJob": { + "methods": [ + "ResumeModelDeploymentMonitoringJob" + ] + }, + "SearchModelDeploymentMonitoringStatsAnomalies": { + "methods": [ + "SearchModelDeploymentMonitoringStatsAnomalies" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateModelDeploymentMonitoringJob": { + "methods": [ + "UpdateModelDeploymentMonitoringJob" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "JobClient", + "rpcs": { + "CancelBatchPredictionJob": { + "methods": [ + "CancelBatchPredictionJob" + ] + }, + "CancelCustomJob": { + "methods": [ + "CancelCustomJob" + ] + }, + "CancelDataLabelingJob": { + "methods": [ + "CancelDataLabelingJob" + ] + }, + "CancelHyperparameterTuningJob": { + "methods": [ + "CancelHyperparameterTuningJob" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateBatchPredictionJob": { + "methods": [ + "CreateBatchPredictionJob" + ] + }, + "CreateCustomJob": { + "methods": [ + "CreateCustomJob" + ] + }, + "CreateDataLabelingJob": { + "methods": [ + "CreateDataLabelingJob" + ] + }, + "CreateHyperparameterTuningJob": { + "methods": [ + "CreateHyperparameterTuningJob" + ] + }, + "CreateModelDeploymentMonitoringJob": { + "methods": [ + "CreateModelDeploymentMonitoringJob" + ] + }, + "DeleteBatchPredictionJob": { + "methods": [ + "DeleteBatchPredictionJob" + ] + }, + "DeleteCustomJob": { + "methods": [ + "DeleteCustomJob" + ] + }, + "DeleteDataLabelingJob": { + "methods": [ + "DeleteDataLabelingJob" + ] + }, + "DeleteHyperparameterTuningJob": { + "methods": [ + "DeleteHyperparameterTuningJob" + ] + }, + "DeleteModelDeploymentMonitoringJob": { + "methods": [ + "DeleteModelDeploymentMonitoringJob" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetBatchPredictionJob": { + "methods": [ + "GetBatchPredictionJob" + ] + }, + "GetCustomJob": { + "methods": [ + "GetCustomJob" + ] + }, + "GetDataLabelingJob": { + "methods": [ + "GetDataLabelingJob" + ] + }, + "GetHyperparameterTuningJob": { + "methods": [ + "GetHyperparameterTuningJob" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetModelDeploymentMonitoringJob": { + "methods": [ + "GetModelDeploymentMonitoringJob" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListBatchPredictionJobs": { + "methods": [ + "ListBatchPredictionJobs" + ] + }, + "ListCustomJobs": { + "methods": [ + "ListCustomJobs" + ] + }, + "ListDataLabelingJobs": { + "methods": [ + "ListDataLabelingJobs" + ] + }, + "ListHyperparameterTuningJobs": { + "methods": [ + "ListHyperparameterTuningJobs" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListModelDeploymentMonitoringJobs": { + "methods": [ + "ListModelDeploymentMonitoringJobs" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "PauseModelDeploymentMonitoringJob": { + "methods": [ + "PauseModelDeploymentMonitoringJob" + ] + }, + "ResumeModelDeploymentMonitoringJob": { + "methods": [ + "ResumeModelDeploymentMonitoringJob" + ] + }, + "SearchModelDeploymentMonitoringStatsAnomalies": { + "methods": [ + "SearchModelDeploymentMonitoringStatsAnomalies" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateModelDeploymentMonitoringJob": { + "methods": [ + "UpdateModelDeploymentMonitoringJob" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "MetadataService": { + "clients": { + "grpc": { + "libraryClient": "MetadataClient", + "rpcs": { + "AddContextArtifactsAndExecutions": { + "methods": [ + "AddContextArtifactsAndExecutions" + ] + }, + "AddContextChildren": { + "methods": [ + "AddContextChildren" + ] + }, + "AddExecutionEvents": { + "methods": [ + "AddExecutionEvents" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateArtifact": { + "methods": [ + "CreateArtifact" + ] + }, + "CreateContext": { + "methods": [ + "CreateContext" + ] + }, + "CreateExecution": { + "methods": [ + "CreateExecution" + ] + }, + "CreateMetadataSchema": { + "methods": [ + "CreateMetadataSchema" + ] + }, + "CreateMetadataStore": { + "methods": [ + "CreateMetadataStore" + ] + }, + "DeleteArtifact": { + "methods": [ + "DeleteArtifact" + ] + }, + "DeleteContext": { + "methods": [ + "DeleteContext" + ] + }, + "DeleteExecution": { + "methods": [ + "DeleteExecution" + ] + }, + "DeleteMetadataStore": { + "methods": [ + "DeleteMetadataStore" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetArtifact": { + "methods": [ + "GetArtifact" + ] + }, + "GetContext": { + "methods": [ + "GetContext" + ] + }, + "GetExecution": { + "methods": [ + "GetExecution" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetMetadataSchema": { + "methods": [ + "GetMetadataSchema" + ] + }, + "GetMetadataStore": { + "methods": [ + "GetMetadataStore" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListArtifacts": { + "methods": [ + "ListArtifacts" + ] + }, + "ListContexts": { + "methods": [ + "ListContexts" + ] + }, + "ListExecutions": { + "methods": [ + "ListExecutions" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListMetadataSchemas": { + "methods": [ + "ListMetadataSchemas" + ] + }, + "ListMetadataStores": { + "methods": [ + "ListMetadataStores" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "PurgeArtifacts": { + "methods": [ + "PurgeArtifacts" + ] + }, + "PurgeContexts": { + "methods": [ + "PurgeContexts" + ] + }, + "PurgeExecutions": { + "methods": [ + "PurgeExecutions" + ] + }, + "QueryArtifactLineageSubgraph": { + "methods": [ + "QueryArtifactLineageSubgraph" + ] + }, + "QueryContextLineageSubgraph": { + "methods": [ + "QueryContextLineageSubgraph" + ] + }, + "QueryExecutionInputsAndOutputs": { + "methods": [ + "QueryExecutionInputsAndOutputs" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateArtifact": { + "methods": [ + "UpdateArtifact" + ] + }, + "UpdateContext": { + "methods": [ + "UpdateContext" + ] + }, + "UpdateExecution": { + "methods": [ + "UpdateExecution" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "MetadataClient", + "rpcs": { + "AddContextArtifactsAndExecutions": { + "methods": [ + "AddContextArtifactsAndExecutions" + ] + }, + "AddContextChildren": { + "methods": [ + "AddContextChildren" + ] + }, + "AddExecutionEvents": { + "methods": [ + "AddExecutionEvents" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateArtifact": { + "methods": [ + "CreateArtifact" + ] + }, + "CreateContext": { + "methods": [ + "CreateContext" + ] + }, + "CreateExecution": { + "methods": [ + "CreateExecution" + ] + }, + "CreateMetadataSchema": { + "methods": [ + "CreateMetadataSchema" + ] + }, + "CreateMetadataStore": { + "methods": [ + "CreateMetadataStore" + ] + }, + "DeleteArtifact": { + "methods": [ + "DeleteArtifact" + ] + }, + "DeleteContext": { + "methods": [ + "DeleteContext" + ] + }, + "DeleteExecution": { + "methods": [ + "DeleteExecution" + ] + }, + "DeleteMetadataStore": { + "methods": [ + "DeleteMetadataStore" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetArtifact": { + "methods": [ + "GetArtifact" + ] + }, + "GetContext": { + "methods": [ + "GetContext" + ] + }, + "GetExecution": { + "methods": [ + "GetExecution" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetMetadataSchema": { + "methods": [ + "GetMetadataSchema" + ] + }, + "GetMetadataStore": { + "methods": [ + "GetMetadataStore" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListArtifacts": { + "methods": [ + "ListArtifacts" + ] + }, + "ListContexts": { + "methods": [ + "ListContexts" + ] + }, + "ListExecutions": { + "methods": [ + "ListExecutions" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListMetadataSchemas": { + "methods": [ + "ListMetadataSchemas" + ] + }, + "ListMetadataStores": { + "methods": [ + "ListMetadataStores" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "PurgeArtifacts": { + "methods": [ + "PurgeArtifacts" + ] + }, + "PurgeContexts": { + "methods": [ + "PurgeContexts" + ] + }, + "PurgeExecutions": { + "methods": [ + "PurgeExecutions" + ] + }, + "QueryArtifactLineageSubgraph": { + "methods": [ + "QueryArtifactLineageSubgraph" + ] + }, + "QueryContextLineageSubgraph": { + "methods": [ + "QueryContextLineageSubgraph" + ] + }, + "QueryExecutionInputsAndOutputs": { + "methods": [ + "QueryExecutionInputsAndOutputs" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateArtifact": { + "methods": [ + "UpdateArtifact" + ] + }, + "UpdateContext": { + "methods": [ + "UpdateContext" + ] + }, + "UpdateExecution": { + "methods": [ + "UpdateExecution" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "MigrationClient", + "rpcs": { + "BatchMigrateResources": { + "methods": [ + "BatchMigrateResources" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SearchMigratableResources": { + "methods": [ + "SearchMigratableResources" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "MigrationClient", + "rpcs": { + "BatchMigrateResources": { + "methods": [ + "BatchMigrateResources" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SearchMigratableResources": { + "methods": [ + "SearchMigratableResources" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "ModelService": { + "clients": { + "grpc": { + "libraryClient": "ModelClient", + "rpcs": { + "BatchImportModelEvaluationSlices": { + "methods": [ + "BatchImportModelEvaluationSlices" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteModel": { + "methods": [ + "DeleteModel" + ] + }, + "DeleteModelVersion": { + "methods": [ + "DeleteModelVersion" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "ExportModel": { + "methods": [ + "ExportModel" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetModel": { + "methods": [ + "GetModel" + ] + }, + "GetModelEvaluation": { + "methods": [ + "GetModelEvaluation" + ] + }, + "GetModelEvaluationSlice": { + "methods": [ + "GetModelEvaluationSlice" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportModelEvaluation": { + "methods": [ + "ImportModelEvaluation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListModelEvaluationSlices": { + "methods": [ + "ListModelEvaluationSlices" + ] + }, + "ListModelEvaluations": { + "methods": [ + "ListModelEvaluations" + ] + }, + "ListModelVersions": { + "methods": [ + "ListModelVersions" + ] + }, + "ListModels": { + "methods": [ + "ListModels" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "MergeVersionAliases": { + "methods": [ + "MergeVersionAliases" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateExplanationDataset": { + "methods": [ + "UpdateExplanationDataset" + ] + }, + "UpdateModel": { + "methods": [ + "UpdateModel" + ] + }, + "UploadModel": { + "methods": [ + "UploadModel" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "ModelClient", + "rpcs": { + "BatchImportModelEvaluationSlices": { + "methods": [ + "BatchImportModelEvaluationSlices" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteModel": { + "methods": [ + "DeleteModel" + ] + }, + "DeleteModelVersion": { + "methods": [ + "DeleteModelVersion" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "ExportModel": { + "methods": [ + "ExportModel" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetModel": { + "methods": [ + "GetModel" + ] + }, + "GetModelEvaluation": { + "methods": [ + "GetModelEvaluation" + ] + }, + "GetModelEvaluationSlice": { + "methods": [ + "GetModelEvaluationSlice" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportModelEvaluation": { + "methods": [ + "ImportModelEvaluation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListModelEvaluationSlices": { + "methods": [ + "ListModelEvaluationSlices" + ] + }, + "ListModelEvaluations": { + "methods": [ + "ListModelEvaluations" + ] + }, + "ListModelVersions": { + "methods": [ + "ListModelVersions" + ] + }, + "ListModels": { + "methods": [ + "ListModels" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "MergeVersionAliases": { + "methods": [ + "MergeVersionAliases" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateExplanationDataset": { + "methods": [ + "UpdateExplanationDataset" + ] + }, + "UpdateModel": { + "methods": [ + "UpdateModel" + ] + }, + "UploadModel": { + "methods": [ + "UploadModel" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "PipelineService": { + "clients": { + "grpc": { + "libraryClient": "PipelineClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CancelPipelineJob": { + "methods": [ + "CancelPipelineJob" + ] + }, + "CancelTrainingPipeline": { + "methods": [ + "CancelTrainingPipeline" + ] + }, + "CreatePipelineJob": { + "methods": [ + "CreatePipelineJob" + ] + }, + "CreateTrainingPipeline": { + "methods": [ + "CreateTrainingPipeline" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeletePipelineJob": { + "methods": [ + "DeletePipelineJob" + ] + }, + "DeleteTrainingPipeline": { + "methods": [ + "DeleteTrainingPipeline" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetPipelineJob": { + "methods": [ + "GetPipelineJob" + ] + }, + "GetTrainingPipeline": { + "methods": [ + "GetTrainingPipeline" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListPipelineJobs": { + "methods": [ + "ListPipelineJobs" + ] + }, + "ListTrainingPipelines": { + "methods": [ + "ListTrainingPipelines" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "PipelineClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CancelPipelineJob": { + "methods": [ + "CancelPipelineJob" + ] + }, + "CancelTrainingPipeline": { + "methods": [ + "CancelTrainingPipeline" + ] + }, + "CreatePipelineJob": { + "methods": [ + "CreatePipelineJob" + ] + }, + "CreateTrainingPipeline": { + "methods": [ + "CreateTrainingPipeline" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeletePipelineJob": { + "methods": [ + "DeletePipelineJob" + ] + }, + "DeleteTrainingPipeline": { + "methods": [ + "DeleteTrainingPipeline" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetPipelineJob": { + "methods": [ + "GetPipelineJob" + ] + }, + "GetTrainingPipeline": { + "methods": [ + "GetTrainingPipeline" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListPipelineJobs": { + "methods": [ + "ListPipelineJobs" + ] + }, + "ListTrainingPipelines": { + "methods": [ + "ListTrainingPipelines" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "PredictionService": { + "clients": { + "grpc": { + "libraryClient": "PredictionClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" ] }, - "ListMetadataSchemas": { + "DeleteOperation": { "methods": [ - "ListMetadataSchemas" + "DeleteOperation" ] }, - "ListMetadataStores": { + "Explain": { "methods": [ - "ListMetadataStores" + "Explain" ] }, - "ListOperations": { + "GetIamPolicy": { "methods": [ - "ListOperations" + "GetIamPolicy" ] }, - "PurgeArtifacts": { + "GetLocation": { "methods": [ - "PurgeArtifacts" + "GetLocation" ] }, - "PurgeContexts": { + "GetOperation": { "methods": [ - "PurgeContexts" + "GetOperation" ] }, - "PurgeExecutions": { + "ListLocations": { "methods": [ - "PurgeExecutions" + "ListLocations" ] }, - "QueryArtifactLineageSubgraph": { + "ListOperations": { "methods": [ - "QueryArtifactLineageSubgraph" + "ListOperations" ] }, - "QueryContextLineageSubgraph": { + "Predict": { "methods": [ - "QueryContextLineageSubgraph" + "Predict" ] }, - "QueryExecutionInputsAndOutputs": { + "RawPredict": { "methods": [ - "QueryExecutionInputsAndOutputs" + "RawPredict" ] }, "SetIamPolicy": { @@ -1013,40 +2928,16 @@ "TestIamPermissions" ] }, - "UpdateArtifact": { - "methods": [ - "UpdateArtifact" - ] - }, - "UpdateContext": { - "methods": [ - "UpdateContext" - ] - }, - "UpdateExecution": { - "methods": [ - "UpdateExecution" - ] - }, "WaitOperation": { "methods": [ "WaitOperation" ] } } - } - } - }, - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "MigrationClient", + }, + "rest": { + "libraryClient": "PredictionClient", "rpcs": { - "BatchMigrateResources": { - "methods": [ - "BatchMigrateResources" - ] - }, "CancelOperation": { "methods": [ "CancelOperation" @@ -1057,6 +2948,11 @@ "DeleteOperation" ] }, + "Explain": { + "methods": [ + "Explain" + ] + }, "GetIamPolicy": { "methods": [ "GetIamPolicy" @@ -1082,9 +2978,14 @@ "ListOperations" ] }, - "SearchMigratableResources": { + "Predict": { "methods": [ - "SearchMigratableResources" + "Predict" + ] + }, + "RawPredict": { + "methods": [ + "RawPredict" ] }, "SetIamPolicy": { @@ -1106,29 +3007,19 @@ } } }, - "ModelService": { + "SpecialistPoolService": { "clients": { "grpc": { - "libraryClient": "ModelClient", + "libraryClient": "SpecialistPoolClient", "rpcs": { - "BatchImportModelEvaluationSlices": { - "methods": [ - "BatchImportModelEvaluationSlices" - ] - }, "CancelOperation": { "methods": [ "CancelOperation" ] }, - "DeleteModel": { - "methods": [ - "DeleteModel" - ] - }, - "DeleteModelVersion": { + "CreateSpecialistPool": { "methods": [ - "DeleteModelVersion" + "CreateSpecialistPool" ] }, "DeleteOperation": { @@ -1136,9 +3027,9 @@ "DeleteOperation" ] }, - "ExportModel": { + "DeleteSpecialistPool": { "methods": [ - "ExportModel" + "DeleteSpecialistPool" ] }, "GetIamPolicy": { @@ -1151,29 +3042,14 @@ "GetLocation" ] }, - "GetModel": { - "methods": [ - "GetModel" - ] - }, - "GetModelEvaluation": { - "methods": [ - "GetModelEvaluation" - ] - }, - "GetModelEvaluationSlice": { - "methods": [ - "GetModelEvaluationSlice" - ] - }, "GetOperation": { "methods": [ "GetOperation" ] }, - "ImportModelEvaluation": { + "GetSpecialistPool": { "methods": [ - "ImportModelEvaluation" + "GetSpecialistPool" ] }, "ListLocations": { @@ -1181,34 +3057,14 @@ "ListLocations" ] }, - "ListModelEvaluationSlices": { - "methods": [ - "ListModelEvaluationSlices" - ] - }, - "ListModelEvaluations": { - "methods": [ - "ListModelEvaluations" - ] - }, - "ListModelVersions": { - "methods": [ - "ListModelVersions" - ] - }, - "ListModels": { - "methods": [ - "ListModels" - ] - }, "ListOperations": { "methods": [ "ListOperations" ] }, - "MergeVersionAliases": { + "ListSpecialistPools": { "methods": [ - "MergeVersionAliases" + "ListSpecialistPools" ] }, "SetIamPolicy": { @@ -1221,19 +3077,9 @@ "TestIamPermissions" ] }, - "UpdateExplanationDataset": { - "methods": [ - "UpdateExplanationDataset" - ] - }, - "UpdateModel": { - "methods": [ - "UpdateModel" - ] - }, - "UploadModel": { + "UpdateSpecialistPool": { "methods": [ - "UploadModel" + "UpdateSpecialistPool" ] }, "WaitOperation": { @@ -1242,37 +3088,18 @@ ] } } - } - } - }, - "PipelineService": { - "clients": { - "grpc": { - "libraryClient": "PipelineClient", + }, + "rest": { + "libraryClient": "SpecialistPoolClient", "rpcs": { "CancelOperation": { "methods": [ "CancelOperation" ] }, - "CancelPipelineJob": { - "methods": [ - "CancelPipelineJob" - ] - }, - "CancelTrainingPipeline": { - "methods": [ - "CancelTrainingPipeline" - ] - }, - "CreatePipelineJob": { - "methods": [ - "CreatePipelineJob" - ] - }, - "CreateTrainingPipeline": { + "CreateSpecialistPool": { "methods": [ - "CreateTrainingPipeline" + "CreateSpecialistPool" ] }, "DeleteOperation": { @@ -1280,14 +3107,9 @@ "DeleteOperation" ] }, - "DeletePipelineJob": { - "methods": [ - "DeletePipelineJob" - ] - }, - "DeleteTrainingPipeline": { + "DeleteSpecialistPool": { "methods": [ - "DeleteTrainingPipeline" + "DeleteSpecialistPool" ] }, "GetIamPolicy": { @@ -1305,14 +3127,9 @@ "GetOperation" ] }, - "GetPipelineJob": { - "methods": [ - "GetPipelineJob" - ] - }, - "GetTrainingPipeline": { + "GetSpecialistPool": { "methods": [ - "GetTrainingPipeline" + "GetSpecialistPool" ] }, "ListLocations": { @@ -1325,14 +3142,9 @@ "ListOperations" ] }, - "ListPipelineJobs": { - "methods": [ - "ListPipelineJobs" - ] - }, - "ListTrainingPipelines": { + "ListSpecialistPools": { "methods": [ - "ListTrainingPipelines" + "ListSpecialistPools" ] }, "SetIamPolicy": { @@ -1345,6 +3157,11 @@ "TestIamPermissions" ] }, + "UpdateSpecialistPool": { + "methods": [ + "UpdateSpecialistPool" + ] + }, "WaitOperation": { "methods": [ "WaitOperation" @@ -1354,24 +3171,79 @@ } } }, - "PredictionService": { + "TensorboardService": { "clients": { "grpc": { - "libraryClient": "PredictionClient", + "libraryClient": "TensorboardClient", "rpcs": { + "BatchCreateTensorboardRuns": { + "methods": [ + "BatchCreateTensorboardRuns" + ] + }, + "BatchCreateTensorboardTimeSeries": { + "methods": [ + "BatchCreateTensorboardTimeSeries" + ] + }, + "BatchReadTensorboardTimeSeriesData": { + "methods": [ + "BatchReadTensorboardTimeSeriesData" + ] + }, "CancelOperation": { "methods": [ "CancelOperation" ] }, + "CreateTensorboard": { + "methods": [ + "CreateTensorboard" + ] + }, + "CreateTensorboardExperiment": { + "methods": [ + "CreateTensorboardExperiment" + ] + }, + "CreateTensorboardRun": { + "methods": [ + "CreateTensorboardRun" + ] + }, + "CreateTensorboardTimeSeries": { + "methods": [ + "CreateTensorboardTimeSeries" + ] + }, "DeleteOperation": { "methods": [ "DeleteOperation" ] }, - "Explain": { + "DeleteTensorboard": { "methods": [ - "Explain" + "DeleteTensorboard" + ] + }, + "DeleteTensorboardExperiment": { + "methods": [ + "DeleteTensorboardExperiment" + ] + }, + "DeleteTensorboardRun": { + "methods": [ + "DeleteTensorboardRun" + ] + }, + "DeleteTensorboardTimeSeries": { + "methods": [ + "DeleteTensorboardTimeSeries" + ] + }, + "ExportTensorboardTimeSeriesData": { + "methods": [ + "ExportTensorboardTimeSeriesData" ] }, "GetIamPolicy": { @@ -1389,132 +3261,114 @@ "GetOperation" ] }, - "ListLocations": { + "GetTensorboard": { "methods": [ - "ListLocations" + "GetTensorboard" ] }, - "ListOperations": { + "GetTensorboardExperiment": { "methods": [ - "ListOperations" + "GetTensorboardExperiment" ] }, - "Predict": { + "GetTensorboardRun": { "methods": [ - "Predict" + "GetTensorboardRun" ] }, - "RawPredict": { + "GetTensorboardTimeSeries": { "methods": [ - "RawPredict" + "GetTensorboardTimeSeries" ] }, - "SetIamPolicy": { + "ListLocations": { "methods": [ - "SetIamPolicy" + "ListLocations" ] }, - "TestIamPermissions": { + "ListOperations": { "methods": [ - "TestIamPermissions" + "ListOperations" ] }, - "WaitOperation": { - "methods": [ - "WaitOperation" - ] - } - } - } - } - }, - "SpecialistPoolService": { - "clients": { - "grpc": { - "libraryClient": "SpecialistPoolClient", - "rpcs": { - "CancelOperation": { + "ListTensorboardExperiments": { "methods": [ - "CancelOperation" + "ListTensorboardExperiments" ] }, - "CreateSpecialistPool": { + "ListTensorboardRuns": { "methods": [ - "CreateSpecialistPool" + "ListTensorboardRuns" ] }, - "DeleteOperation": { + "ListTensorboardTimeSeries": { "methods": [ - "DeleteOperation" + "ListTensorboardTimeSeries" ] }, - "DeleteSpecialistPool": { + "ListTensorboards": { "methods": [ - "DeleteSpecialistPool" + "ListTensorboards" ] }, - "GetIamPolicy": { + "ReadTensorboardBlobData": { "methods": [ - "GetIamPolicy" + "ReadTensorboardBlobData" ] }, - "GetLocation": { + "ReadTensorboardTimeSeriesData": { "methods": [ - "GetLocation" + "ReadTensorboardTimeSeriesData" ] }, - "GetOperation": { + "SetIamPolicy": { "methods": [ - "GetOperation" + "SetIamPolicy" ] }, - "GetSpecialistPool": { + "TestIamPermissions": { "methods": [ - "GetSpecialistPool" + "TestIamPermissions" ] }, - "ListLocations": { + "UpdateTensorboard": { "methods": [ - "ListLocations" + "UpdateTensorboard" ] }, - "ListOperations": { + "UpdateTensorboardExperiment": { "methods": [ - "ListOperations" + "UpdateTensorboardExperiment" ] }, - "ListSpecialistPools": { + "UpdateTensorboardRun": { "methods": [ - "ListSpecialistPools" + "UpdateTensorboardRun" ] }, - "SetIamPolicy": { + "UpdateTensorboardTimeSeries": { "methods": [ - "SetIamPolicy" + "UpdateTensorboardTimeSeries" ] }, - "TestIamPermissions": { + "WaitOperation": { "methods": [ - "TestIamPermissions" + "WaitOperation" ] }, - "UpdateSpecialistPool": { + "WriteTensorboardExperimentData": { "methods": [ - "UpdateSpecialistPool" + "WriteTensorboardExperimentData" ] }, - "WaitOperation": { + "WriteTensorboardRunData": { "methods": [ - "WaitOperation" + "WriteTensorboardRunData" ] } } - } - } - }, - "TensorboardService": { - "clients": { - "grpc": { + }, + "rest": { "libraryClient": "TensorboardClient", "rpcs": { "BatchCreateTensorboardRuns": { @@ -1842,6 +3696,136 @@ ] } } + }, + "rest": { + "libraryClient": "VizierClient", + "rpcs": { + "AddTrialMeasurement": { + "methods": [ + "AddTrialMeasurement" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CheckTrialEarlyStoppingState": { + "methods": [ + "CheckTrialEarlyStoppingState" + ] + }, + "CompleteTrial": { + "methods": [ + "CompleteTrial" + ] + }, + "CreateStudy": { + "methods": [ + "CreateStudy" + ] + }, + "CreateTrial": { + "methods": [ + "CreateTrial" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeleteStudy": { + "methods": [ + "DeleteStudy" + ] + }, + "DeleteTrial": { + "methods": [ + "DeleteTrial" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetStudy": { + "methods": [ + "GetStudy" + ] + }, + "GetTrial": { + "methods": [ + "GetTrial" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListOptimalTrials": { + "methods": [ + "ListOptimalTrials" + ] + }, + "ListStudies": { + "methods": [ + "ListStudies" + ] + }, + "ListTrials": { + "methods": [ + "ListTrials" + ] + }, + "LookupStudy": { + "methods": [ + "LookupStudy" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "StopTrial": { + "methods": [ + "StopTrial" + ] + }, + "SuggestTrials": { + "methods": [ + "SuggestTrials" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } } } } diff --git a/aiplatform/apiv1beta1/index_client.go b/aiplatform/apiv1beta1/index_client.go index 8a8ed5ecc0e7..33c9ada25ce9 100644 --- a/aiplatform/apiv1beta1/index_client.go +++ b/aiplatform/apiv1beta1/index_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -48,6 +54,8 @@ type IndexCallOptions struct { ListIndexes []gax.CallOption UpdateIndex []gax.CallOption DeleteIndex []gax.CallOption + UpsertDatapoints []gax.CallOption + RemoveDatapoints []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption GetIamPolicy []gax.CallOption @@ -79,6 +87,30 @@ func defaultIndexCallOptions() *IndexCallOptions { ListIndexes: []gax.CallOption{}, UpdateIndex: []gax.CallOption{}, DeleteIndex: []gax.CallOption{}, + UpsertDatapoints: []gax.CallOption{}, + RemoveDatapoints: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + +func defaultIndexRESTCallOptions() *IndexCallOptions { + return &IndexCallOptions{ + CreateIndex: []gax.CallOption{}, + GetIndex: []gax.CallOption{}, + ListIndexes: []gax.CallOption{}, + UpdateIndex: []gax.CallOption{}, + DeleteIndex: []gax.CallOption{}, + UpsertDatapoints: []gax.CallOption{}, + RemoveDatapoints: []gax.CallOption{}, GetLocation: []gax.CallOption{}, ListLocations: []gax.CallOption{}, GetIamPolicy: []gax.CallOption{}, @@ -105,6 +137,8 @@ type internalIndexClient interface { UpdateIndexOperation(name string) *UpdateIndexOperation DeleteIndex(context.Context, *aiplatformpb.DeleteIndexRequest, ...gax.CallOption) (*DeleteIndexOperation, error) DeleteIndexOperation(name string) *DeleteIndexOperation + UpsertDatapoints(context.Context, *aiplatformpb.UpsertDatapointsRequest, ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) + RemoveDatapoints(context.Context, *aiplatformpb.RemoveDatapointsRequest, ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) @@ -151,7 +185,8 @@ func (c *IndexClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *IndexClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -201,6 +236,16 @@ func (c *IndexClient) DeleteIndexOperation(name string) *DeleteIndexOperation { return c.internalClient.DeleteIndexOperation(name) } +// UpsertDatapoints add/update Datapoints into an Index. +func (c *IndexClient) UpsertDatapoints(ctx context.Context, req *aiplatformpb.UpsertDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) { + return c.internalClient.UpsertDatapoints(ctx, req, opts...) +} + +// RemoveDatapoints remove Datapoints from an Index. +func (c *IndexClient) RemoveDatapoints(ctx context.Context, req *aiplatformpb.RemoveDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) { + return c.internalClient.RemoveDatapoints(ctx, req, opts...) +} + // GetLocation gets information about a location. func (c *IndexClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { return c.internalClient.GetLocation(ctx, req, opts...) @@ -347,7 +392,8 @@ func NewIndexClient(ctx context.Context, opts ...option.ClientOption) (*IndexCli // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *indexGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -367,6 +413,89 @@ func (c *indexGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type indexRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing IndexClient + CallOptions **IndexCallOptions +} + +// NewIndexRESTClient creates a new index service rest client. +// +// A service for creating and managing Vertex AI’s Index resources. +func NewIndexRESTClient(ctx context.Context, opts ...option.ClientOption) (*IndexClient, error) { + clientOpts := append(defaultIndexRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultIndexRESTCallOptions() + c := &indexRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &IndexClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultIndexRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *indexRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *indexRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *indexRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *indexGRPCClient) CreateIndex(ctx context.Context, req *aiplatformpb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -506,6 +635,40 @@ func (c *indexGRPCClient) DeleteIndex(ctx context.Context, req *aiplatformpb.Del }, nil } +func (c *indexGRPCClient) UpsertDatapoints(ctx context.Context, req *aiplatformpb.UpsertDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index", url.QueryEscape(req.GetIndex()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpsertDatapoints[0:len((*c.CallOptions).UpsertDatapoints):len((*c.CallOptions).UpsertDatapoints)], opts...) + var resp *aiplatformpb.UpsertDatapointsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.indexClient.UpsertDatapoints(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *indexGRPCClient) RemoveDatapoints(ctx context.Context, req *aiplatformpb.RemoveDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index", url.QueryEscape(req.GetIndex()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RemoveDatapoints[0:len((*c.CallOptions).RemoveDatapoints):len((*c.CallOptions).RemoveDatapoints)], opts...) + var resp *aiplatformpb.RemoveDatapointsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.indexClient.RemoveDatapoints(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *indexGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) @@ -724,150 +887,1262 @@ func (c *indexGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. return resp, nil } -// CreateIndexOperation manages a long-running operation from CreateIndex. -type CreateIndexOperation struct { - lro *longrunning.Operation -} - -// CreateIndexOperation returns a new CreateIndexOperation from a given name. -// The name must be that of a previously created CreateIndexOperation, possibly from a different process. -func (c *indexGRPCClient) CreateIndexOperation(name string) *CreateIndexOperation { - return &CreateIndexOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error) { - var resp aiplatformpb.Index - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateIndex creates an Index. +func (c *indexRESTClient) CreateIndex(ctx context.Context, req *aiplatformpb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIndex() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error) { - var resp aiplatformpb.Index - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/indexes", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateIndexOperation) Metadata() (*aiplatformpb.CreateIndexOperationMetadata, error) { - var meta aiplatformpb.CreateIndexOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Done reports whether the long-running operation has completed. -func (op *CreateIndexOperation) Done() bool { - return op.lro.Done() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateIndexOperation) Name() string { - return op.lro.Name() -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteIndexOperation manages a long-running operation from DeleteIndex. -type DeleteIndexOperation struct { - lro *longrunning.Operation -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// DeleteIndexOperation returns a new DeleteIndexOperation from a given name. -// The name must be that of a previously created DeleteIndexOperation, possibly from a different process. -func (c *indexGRPCClient) DeleteIndexOperation(name string) *DeleteIndexOperation { - return &DeleteIndexOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteIndexOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetIndex gets an Index. +func (c *indexRESTClient) GetIndex(ctx context.Context, req *aiplatformpb.GetIndexRequest, opts ...gax.CallOption) (*aiplatformpb.Index, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteIndexOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteIndexOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIndex[0:len((*c.CallOptions).GetIndex):len((*c.CallOptions).GetIndex)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Index{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// UpdateIndexOperation manages a long-running operation from UpdateIndex. -type UpdateIndexOperation struct { - lro *longrunning.Operation + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// UpdateIndexOperation returns a new UpdateIndexOperation from a given name. -// The name must be that of a previously created UpdateIndexOperation, possibly from a different process. -func (c *indexGRPCClient) UpdateIndexOperation(name string) *UpdateIndexOperation { - return &UpdateIndexOperation{ +// ListIndexes lists Indexes in a Location. +func (c *indexRESTClient) ListIndexes(ctx context.Context, req *aiplatformpb.ListIndexesRequest, opts ...gax.CallOption) *IndexIterator { + it := &IndexIterator{} + req = proto.Clone(req).(*aiplatformpb.ListIndexesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Index, string, error) { + resp := &aiplatformpb.ListIndexesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/indexes", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetIndexes(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateIndex updates an Index. +func (c *indexRESTClient) UpdateIndex(ctx context.Context, req *aiplatformpb.UpdateIndexRequest, opts ...gax.CallOption) (*UpdateIndexOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIndex() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetIndex().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index.name", url.QueryEscape(req.GetIndex().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UpdateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteIndex deletes an Index. +// An Index can only be deleted when all its +// DeployedIndexes had been undeployed. +func (c *indexRESTClient) DeleteIndex(ctx context.Context, req *aiplatformpb.DeleteIndexRequest, opts ...gax.CallOption) (*DeleteIndexOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UpsertDatapoints add/update Datapoints into an Index. +func (c *indexRESTClient) UpsertDatapoints(ctx context.Context, req *aiplatformpb.UpsertDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.UpsertDatapointsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:upsertDatapoints", req.GetIndex()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index", url.QueryEscape(req.GetIndex()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpsertDatapoints[0:len((*c.CallOptions).UpsertDatapoints):len((*c.CallOptions).UpsertDatapoints)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.UpsertDatapointsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RemoveDatapoints remove Datapoints from an Index. +func (c *indexRESTClient) RemoveDatapoints(ctx context.Context, req *aiplatformpb.RemoveDatapointsRequest, opts ...gax.CallOption) (*aiplatformpb.RemoveDatapointsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:removeDatapoints", req.GetIndex()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index", url.QueryEscape(req.GetIndex()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).RemoveDatapoints[0:len((*c.CallOptions).RemoveDatapoints):len((*c.CallOptions).RemoveDatapoints)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.RemoveDatapointsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *indexRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *indexRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *indexRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *indexRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *indexRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *indexRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *indexRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *indexRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *indexRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *indexRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateIndexOperation manages a long-running operation from CreateIndex. +type CreateIndexOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateIndexOperation returns a new CreateIndexOperation from a given name. +// The name must be that of a previously created CreateIndexOperation, possibly from a different process. +func (c *indexGRPCClient) CreateIndexOperation(name string) *CreateIndexOperation { + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateIndexOperation returns a new CreateIndexOperation from a given name. +// The name must be that of a previously created CreateIndexOperation, possibly from a different process. +func (c *indexRESTClient) CreateIndexOperation(name string) *CreateIndexOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Index + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Index + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateIndexOperation) Metadata() (*aiplatformpb.CreateIndexOperationMetadata, error) { + var meta aiplatformpb.CreateIndexOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateIndexOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateIndexOperation) Name() string { + return op.lro.Name() +} + +// DeleteIndexOperation manages a long-running operation from DeleteIndex. +type DeleteIndexOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteIndexOperation returns a new DeleteIndexOperation from a given name. +// The name must be that of a previously created DeleteIndexOperation, possibly from a different process. +func (c *indexGRPCClient) DeleteIndexOperation(name string) *DeleteIndexOperation { + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteIndexOperation returns a new DeleteIndexOperation from a given name. +// The name must be that of a previously created DeleteIndexOperation, possibly from a different process. +func (c *indexRESTClient) DeleteIndexOperation(name string) *DeleteIndexOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteIndexOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteIndexOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteIndexOperation) Name() string { + return op.lro.Name() +} + +// UpdateIndexOperation manages a long-running operation from UpdateIndex. +type UpdateIndexOperation struct { + lro *longrunning.Operation + pollPath string +} + +// UpdateIndexOperation returns a new UpdateIndexOperation from a given name. +// The name must be that of a previously created UpdateIndexOperation, possibly from a different process. +func (c *indexGRPCClient) UpdateIndexOperation(name string) *UpdateIndexOperation { + return &UpdateIndexOperation{ lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), } } +// UpdateIndexOperation returns a new UpdateIndexOperation from a given name. +// The name must be that of a previously created UpdateIndexOperation, possibly from a different process. +func (c *indexRESTClient) UpdateIndexOperation(name string) *UpdateIndexOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UpdateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Index if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -885,6 +2160,7 @@ func (op *UpdateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UpdateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Index, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Index if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/index_client_example_test.go b/aiplatform/apiv1beta1/index_client_example_test.go index 6d03126fc3ea..767ed3197f7c 100644 --- a/aiplatform/apiv1beta1/index_client_example_test.go +++ b/aiplatform/apiv1beta1/index_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewIndexClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewIndexClient() { _ = c } +func ExampleNewIndexRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewIndexRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleIndexClient_CreateIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleIndexClient_CreateIndex() { func ExampleIndexClient_GetIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleIndexClient_GetIndex() { func ExampleIndexClient_ListIndexes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleIndexClient_ListIndexes() { func ExampleIndexClient_UpdateIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +179,11 @@ func ExampleIndexClient_UpdateIndex() { func ExampleIndexClient_DeleteIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -158,8 +205,63 @@ func ExampleIndexClient_DeleteIndex() { } } +func ExampleIndexClient_UpsertDatapoints() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewIndexClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpsertDatapointsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#UpsertDatapointsRequest. + } + resp, err := c.UpsertDatapoints(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIndexClient_RemoveDatapoints() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewIndexClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.RemoveDatapointsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1#RemoveDatapointsRequest. + } + resp, err := c.RemoveDatapoints(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleIndexClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +282,11 @@ func ExampleIndexClient_GetLocation() { func ExampleIndexClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -206,6 +313,11 @@ func ExampleIndexClient_ListLocations() { func ExampleIndexClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +338,11 @@ func ExampleIndexClient_GetIamPolicy() { func ExampleIndexClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +363,11 @@ func ExampleIndexClient_SetIamPolicy() { func ExampleIndexClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +388,11 @@ func ExampleIndexClient_TestIamPermissions() { func ExampleIndexClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -284,6 +411,11 @@ func ExampleIndexClient_CancelOperation() { func ExampleIndexClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +434,11 @@ func ExampleIndexClient_DeleteOperation() { func ExampleIndexClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +459,11 @@ func ExampleIndexClient_GetOperation() { func ExampleIndexClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. @@ -348,6 +490,11 @@ func ExampleIndexClient_ListOperations() { func ExampleIndexClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/index_endpoint_client.go b/aiplatform/apiv1beta1/index_endpoint_client.go index 9de39c137f21..a5f2c12150bb 100644 --- a/aiplatform/apiv1beta1/index_endpoint_client.go +++ b/aiplatform/apiv1beta1/index_endpoint_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -98,6 +104,29 @@ func defaultIndexEndpointCallOptions() *IndexEndpointCallOptions { } } +func defaultIndexEndpointRESTCallOptions() *IndexEndpointCallOptions { + return &IndexEndpointCallOptions{ + CreateIndexEndpoint: []gax.CallOption{}, + GetIndexEndpoint: []gax.CallOption{}, + ListIndexEndpoints: []gax.CallOption{}, + UpdateIndexEndpoint: []gax.CallOption{}, + DeleteIndexEndpoint: []gax.CallOption{}, + DeployIndex: []gax.CallOption{}, + UndeployIndex: []gax.CallOption{}, + MutateDeployedIndex: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalIndexEndpointClient is an interface that defines the methods available from Vertex AI API. type internalIndexEndpointClient interface { Close() error @@ -162,7 +191,8 @@ func (c *IndexEndpointClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *IndexEndpointClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -386,7 +416,8 @@ func NewIndexEndpointClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *indexEndpointGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -406,6 +437,89 @@ func (c *indexEndpointGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type indexEndpointRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing IndexEndpointClient + CallOptions **IndexEndpointCallOptions +} + +// NewIndexEndpointRESTClient creates a new index endpoint service rest client. +// +// A service for managing Vertex AI’s IndexEndpoints. +func NewIndexEndpointRESTClient(ctx context.Context, opts ...option.ClientOption) (*IndexEndpointClient, error) { + clientOpts := append(defaultIndexEndpointRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultIndexEndpointRESTCallOptions() + c := &indexEndpointRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &IndexEndpointClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultIndexEndpointRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *indexEndpointRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *indexEndpointRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *indexEndpointRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *indexEndpointGRPCClient) CreateIndexEndpoint(ctx context.Context, req *aiplatformpb.CreateIndexEndpointRequest, opts ...gax.CallOption) (*CreateIndexEndpointOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -828,173 +942,1355 @@ func (c *indexEndpointGRPCClient) WaitOperation(ctx context.Context, req *longru return resp, nil } -// CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint. -type CreateIndexEndpointOperation struct { - lro *longrunning.Operation -} - -// CreateIndexEndpointOperation returns a new CreateIndexEndpointOperation from a given name. -// The name must be that of a previously created CreateIndexEndpointOperation, possibly from a different process. -func (c *indexEndpointGRPCClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation { - return &CreateIndexEndpointOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error) { - var resp aiplatformpb.IndexEndpoint - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateIndexEndpoint creates an IndexEndpoint. +func (c *indexEndpointRESTClient) CreateIndexEndpoint(ctx context.Context, req *aiplatformpb.CreateIndexEndpointRequest, opts ...gax.CallOption) (*CreateIndexEndpointOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIndexEndpoint() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error) { - var resp aiplatformpb.IndexEndpoint - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/indexEndpoints", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateIndexEndpointOperation) Metadata() (*aiplatformpb.CreateIndexEndpointOperationMetadata, error) { - var meta aiplatformpb.CreateIndexEndpointOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Done reports whether the long-running operation has completed. -func (op *CreateIndexEndpointOperation) Done() bool { - return op.lro.Done() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateIndexEndpointOperation) Name() string { - return op.lro.Name() -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint. -type DeleteIndexEndpointOperation struct { - lro *longrunning.Operation -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// DeleteIndexEndpointOperation returns a new DeleteIndexEndpointOperation from a given name. -// The name must be that of a previously created DeleteIndexEndpointOperation, possibly from a different process. -func (c *indexEndpointGRPCClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation { - return &DeleteIndexEndpointOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateIndexEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteIndexEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetIndexEndpoint gets an IndexEndpoint. +func (c *indexEndpointRESTClient) GetIndexEndpoint(ctx context.Context, req *aiplatformpb.GetIndexEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteIndexEndpointOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteIndexEndpointOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIndexEndpoint[0:len((*c.CallOptions).GetIndexEndpoint):len((*c.CallOptions).GetIndexEndpoint)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.IndexEndpoint{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeployIndexOperation manages a long-running operation from DeployIndex. -type DeployIndexOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeployIndexOperation returns a new DeployIndexOperation from a given name. -// The name must be that of a previously created DeployIndexOperation, possibly from a different process. -func (c *indexEndpointGRPCClient) DeployIndexOperation(name string) *DeployIndexOperation { - return &DeployIndexOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error) { - var resp aiplatformpb.DeployIndexResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + return resp, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error) { - var resp aiplatformpb.DeployIndexResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil +// ListIndexEndpoints lists IndexEndpoints in a Location. +func (c *indexEndpointRESTClient) ListIndexEndpoints(ctx context.Context, req *aiplatformpb.ListIndexEndpointsRequest, opts ...gax.CallOption) *IndexEndpointIterator { + it := &IndexEndpointIterator{} + req = proto.Clone(req).(*aiplatformpb.ListIndexEndpointsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.IndexEndpoint, string, error) { + resp := &aiplatformpb.ListIndexEndpointsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/indexEndpoints", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetIndexEndpoints(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateIndexEndpoint updates an IndexEndpoint. +func (c *indexEndpointRESTClient) UpdateIndexEndpoint(ctx context.Context, req *aiplatformpb.UpdateIndexEndpointRequest, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIndexEndpoint() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetIndexEndpoint().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index_endpoint.name", url.QueryEscape(req.GetIndexEndpoint().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateIndexEndpoint[0:len((*c.CallOptions).UpdateIndexEndpoint):len((*c.CallOptions).UpdateIndexEndpoint)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.IndexEndpoint{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteIndexEndpoint deletes an IndexEndpoint. +func (c *indexEndpointRESTClient) DeleteIndexEndpoint(ctx context.Context, req *aiplatformpb.DeleteIndexEndpointRequest, opts ...gax.CallOption) (*DeleteIndexEndpointOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteIndexEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeployIndex deploys an Index into this IndexEndpoint, creating a DeployedIndex within +// it. +// Only non-empty Indexes can be deployed. +func (c *indexEndpointRESTClient) DeployIndex(ctx context.Context, req *aiplatformpb.DeployIndexRequest, opts ...gax.CallOption) (*DeployIndexOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:deployIndex", req.GetIndexEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index_endpoint", url.QueryEscape(req.GetIndexEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeployIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UndeployIndex undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, +// and freeing all resources it’s using. +func (c *indexEndpointRESTClient) UndeployIndex(ctx context.Context, req *aiplatformpb.UndeployIndexRequest, opts ...gax.CallOption) (*UndeployIndexOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:undeployIndex", req.GetIndexEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index_endpoint", url.QueryEscape(req.GetIndexEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UndeployIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// MutateDeployedIndex update an existing DeployedIndex under an IndexEndpoint. +func (c *indexEndpointRESTClient) MutateDeployedIndex(ctx context.Context, req *aiplatformpb.MutateDeployedIndexRequest, opts ...gax.CallOption) (*MutateDeployedIndexOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDeployedIndex() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:mutateDeployedIndex", req.GetIndexEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "index_endpoint", url.QueryEscape(req.GetIndexEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &MutateDeployedIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *indexEndpointRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *indexEndpointRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *indexEndpointRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *indexEndpointRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *indexEndpointRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *indexEndpointRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *indexEndpointRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *indexEndpointRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *indexEndpointRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *indexEndpointRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateIndexEndpointOperation manages a long-running operation from CreateIndexEndpoint. +type CreateIndexEndpointOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateIndexEndpointOperation returns a new CreateIndexEndpointOperation from a given name. +// The name must be that of a previously created CreateIndexEndpointOperation, possibly from a different process. +func (c *indexEndpointGRPCClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation { + return &CreateIndexEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateIndexEndpointOperation returns a new CreateIndexEndpointOperation from a given name. +// The name must be that of a previously created CreateIndexEndpointOperation, possibly from a different process. +func (c *indexEndpointRESTClient) CreateIndexEndpointOperation(name string) *CreateIndexEndpointOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateIndexEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.IndexEndpoint + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.IndexEndpoint, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.IndexEndpoint + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateIndexEndpointOperation) Metadata() (*aiplatformpb.CreateIndexEndpointOperationMetadata, error) { + var meta aiplatformpb.CreateIndexEndpointOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateIndexEndpointOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateIndexEndpointOperation) Name() string { + return op.lro.Name() +} + +// DeleteIndexEndpointOperation manages a long-running operation from DeleteIndexEndpoint. +type DeleteIndexEndpointOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteIndexEndpointOperation returns a new DeleteIndexEndpointOperation from a given name. +// The name must be that of a previously created DeleteIndexEndpointOperation, possibly from a different process. +func (c *indexEndpointGRPCClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation { + return &DeleteIndexEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteIndexEndpointOperation returns a new DeleteIndexEndpointOperation from a given name. +// The name must be that of a previously created DeleteIndexEndpointOperation, possibly from a different process. +func (c *indexEndpointRESTClient) DeleteIndexEndpointOperation(name string) *DeleteIndexEndpointOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteIndexEndpointOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteIndexEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteIndexEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteIndexEndpointOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteIndexEndpointOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteIndexEndpointOperation) Name() string { + return op.lro.Name() +} + +// DeployIndexOperation manages a long-running operation from DeployIndex. +type DeployIndexOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeployIndexOperation returns a new DeployIndexOperation from a given name. +// The name must be that of a previously created DeployIndexOperation, possibly from a different process. +func (c *indexEndpointGRPCClient) DeployIndexOperation(name string) *DeployIndexOperation { + return &DeployIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeployIndexOperation returns a new DeployIndexOperation from a given name. +// The name must be that of a previously created DeployIndexOperation, possibly from a different process. +func (c *indexEndpointRESTClient) DeployIndexOperation(name string) *DeployIndexOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeployIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeployIndexResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.DeployIndexResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.DeployIndexResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil } return &resp, nil } @@ -1026,7 +2322,8 @@ func (op *DeployIndexOperation) Name() string { // MutateDeployedIndexOperation manages a long-running operation from MutateDeployedIndex. type MutateDeployedIndexOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // MutateDeployedIndexOperation returns a new MutateDeployedIndexOperation from a given name. @@ -1037,10 +2334,21 @@ func (c *indexEndpointGRPCClient) MutateDeployedIndexOperation(name string) *Mut } } +// MutateDeployedIndexOperation returns a new MutateDeployedIndexOperation from a given name. +// The name must be that of a previously created MutateDeployedIndexOperation, possibly from a different process. +func (c *indexEndpointRESTClient) MutateDeployedIndexOperation(name string) *MutateDeployedIndexOperation { + override := fmt.Sprintf("/ui/%s", name) + return &MutateDeployedIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *MutateDeployedIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MutateDeployedIndexResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.MutateDeployedIndexResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1058,6 +2366,7 @@ func (op *MutateDeployedIndexOperation) Wait(ctx context.Context, opts ...gax.Ca // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *MutateDeployedIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MutateDeployedIndexResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.MutateDeployedIndexResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1095,7 +2404,8 @@ func (op *MutateDeployedIndexOperation) Name() string { // UndeployIndexOperation manages a long-running operation from UndeployIndex. type UndeployIndexOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UndeployIndexOperation returns a new UndeployIndexOperation from a given name. @@ -1106,10 +2416,21 @@ func (c *indexEndpointGRPCClient) UndeployIndexOperation(name string) *UndeployI } } +// UndeployIndexOperation returns a new UndeployIndexOperation from a given name. +// The name must be that of a previously created UndeployIndexOperation, possibly from a different process. +func (c *indexEndpointRESTClient) UndeployIndexOperation(name string) *UndeployIndexOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UndeployIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UndeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployIndexResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UndeployIndexResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1127,6 +2448,7 @@ func (op *UndeployIndexOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UndeployIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UndeployIndexResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UndeployIndexResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/index_endpoint_client_example_test.go b/aiplatform/apiv1beta1/index_endpoint_client_example_test.go index 06f5612b41f6..ef16c18b8f9f 100644 --- a/aiplatform/apiv1beta1/index_endpoint_client_example_test.go +++ b/aiplatform/apiv1beta1/index_endpoint_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewIndexEndpointClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewIndexEndpointClient() { _ = c } +func ExampleNewIndexEndpointRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewIndexEndpointRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleIndexEndpointClient_CreateIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleIndexEndpointClient_CreateIndexEndpoint() { func ExampleIndexEndpointClient_GetIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleIndexEndpointClient_GetIndexEndpoint() { func ExampleIndexEndpointClient_ListIndexEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleIndexEndpointClient_ListIndexEndpoints() { func ExampleIndexEndpointClient_UpdateIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +174,11 @@ func ExampleIndexEndpointClient_UpdateIndexEndpoint() { func ExampleIndexEndpointClient_DeleteIndexEndpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +202,11 @@ func ExampleIndexEndpointClient_DeleteIndexEndpoint() { func ExampleIndexEndpointClient_DeployIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +232,11 @@ func ExampleIndexEndpointClient_DeployIndex() { func ExampleIndexEndpointClient_UndeployIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +262,11 @@ func ExampleIndexEndpointClient_UndeployIndex() { func ExampleIndexEndpointClient_MutateDeployedIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -230,6 +292,11 @@ func ExampleIndexEndpointClient_MutateDeployedIndex() { func ExampleIndexEndpointClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -250,6 +317,11 @@ func ExampleIndexEndpointClient_GetLocation() { func ExampleIndexEndpointClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +348,11 @@ func ExampleIndexEndpointClient_ListLocations() { func ExampleIndexEndpointClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -296,6 +373,11 @@ func ExampleIndexEndpointClient_GetIamPolicy() { func ExampleIndexEndpointClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -316,6 +398,11 @@ func ExampleIndexEndpointClient_SetIamPolicy() { func ExampleIndexEndpointClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -336,6 +423,11 @@ func ExampleIndexEndpointClient_TestIamPermissions() { func ExampleIndexEndpointClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -354,6 +446,11 @@ func ExampleIndexEndpointClient_CancelOperation() { func ExampleIndexEndpointClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +469,11 @@ func ExampleIndexEndpointClient_DeleteOperation() { func ExampleIndexEndpointClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -392,6 +494,11 @@ func ExampleIndexEndpointClient_GetOperation() { func ExampleIndexEndpointClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. @@ -418,6 +525,11 @@ func ExampleIndexEndpointClient_ListOperations() { func ExampleIndexEndpointClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewIndexEndpointClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/job_client.go b/aiplatform/apiv1beta1/job_client.go index 94e32a1eeaa6..ed6cbe32c4a7 100644 --- a/aiplatform/apiv1beta1/job_client.go +++ b/aiplatform/apiv1beta1/job_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -138,6 +144,49 @@ func defaultJobCallOptions() *JobCallOptions { } } +func defaultJobRESTCallOptions() *JobCallOptions { + return &JobCallOptions{ + CreateCustomJob: []gax.CallOption{}, + GetCustomJob: []gax.CallOption{}, + ListCustomJobs: []gax.CallOption{}, + DeleteCustomJob: []gax.CallOption{}, + CancelCustomJob: []gax.CallOption{}, + CreateDataLabelingJob: []gax.CallOption{}, + GetDataLabelingJob: []gax.CallOption{}, + ListDataLabelingJobs: []gax.CallOption{}, + DeleteDataLabelingJob: []gax.CallOption{}, + CancelDataLabelingJob: []gax.CallOption{}, + CreateHyperparameterTuningJob: []gax.CallOption{}, + GetHyperparameterTuningJob: []gax.CallOption{}, + ListHyperparameterTuningJobs: []gax.CallOption{}, + DeleteHyperparameterTuningJob: []gax.CallOption{}, + CancelHyperparameterTuningJob: []gax.CallOption{}, + CreateBatchPredictionJob: []gax.CallOption{}, + GetBatchPredictionJob: []gax.CallOption{}, + ListBatchPredictionJobs: []gax.CallOption{}, + DeleteBatchPredictionJob: []gax.CallOption{}, + CancelBatchPredictionJob: []gax.CallOption{}, + CreateModelDeploymentMonitoringJob: []gax.CallOption{}, + SearchModelDeploymentMonitoringStatsAnomalies: []gax.CallOption{}, + GetModelDeploymentMonitoringJob: []gax.CallOption{}, + ListModelDeploymentMonitoringJobs: []gax.CallOption{}, + UpdateModelDeploymentMonitoringJob: []gax.CallOption{}, + DeleteModelDeploymentMonitoringJob: []gax.CallOption{}, + PauseModelDeploymentMonitoringJob: []gax.CallOption{}, + ResumeModelDeploymentMonitoringJob: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalJobClient is an interface that defines the methods available from Vertex AI API. type internalJobClient interface { Close() error @@ -223,7 +272,8 @@ func (c *JobClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *JobClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -585,7 +635,8 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *jobGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -605,6 +656,89 @@ func (c *jobGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type jobRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing JobClient + CallOptions **JobCallOptions +} + +// NewJobRESTClient creates a new job service rest client. +// +// A service for creating and managing Vertex AI’s jobs. +func NewJobRESTClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, error) { + clientOpts := append(defaultJobRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultJobRESTCallOptions() + c := &jobRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &JobClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultJobRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *jobRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *jobRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *jobRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *jobGRPCClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.CreateCustomJobRequest, opts ...gax.CallOption) (*aiplatformpb.CustomJob, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -1565,152 +1699,2576 @@ func (c *jobGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.Wa return resp, nil } -// DeleteBatchPredictionJobOperation manages a long-running operation from DeleteBatchPredictionJob. -type DeleteBatchPredictionJobOperation struct { - lro *longrunning.Operation -} - -// DeleteBatchPredictionJobOperation returns a new DeleteBatchPredictionJobOperation from a given name. -// The name must be that of a previously created DeleteBatchPredictionJobOperation, possibly from a different process. -func (c *jobGRPCClient) DeleteBatchPredictionJobOperation(name string) *DeleteBatchPredictionJobOperation { - return &DeleteBatchPredictionJobOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), +// CreateCustomJob creates a CustomJob. A created CustomJob right away +// will be attempted to be run. +func (c *jobRESTClient) CreateCustomJob(ctx context.Context, req *aiplatformpb.CreateCustomJobRequest, opts ...gax.CallOption) (*aiplatformpb.CustomJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetCustomJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteBatchPredictionJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteBatchPredictionJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) -} -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteBatchPredictionJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/customJobs", req.GetParent()) -// Done reports whether the long-running operation has completed. -func (op *DeleteBatchPredictionJobOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteBatchPredictionJobOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateCustomJob[0:len((*c.CallOptions).CreateCustomJob):len((*c.CallOptions).CreateCustomJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.CustomJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteCustomJobOperation manages a long-running operation from DeleteCustomJob. -type DeleteCustomJobOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteCustomJobOperation returns a new DeleteCustomJobOperation from a given name. -// The name must be that of a previously created DeleteCustomJobOperation, possibly from a different process. -func (c *jobGRPCClient) DeleteCustomJobOperation(name string) *DeleteCustomJobOperation { - return &DeleteCustomJobOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteCustomJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteCustomJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteCustomJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetCustomJob gets a CustomJob. +func (c *jobRESTClient) GetCustomJob(ctx context.Context, req *aiplatformpb.GetCustomJobRequest, opts ...gax.CallOption) (*aiplatformpb.CustomJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteCustomJobOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteCustomJobOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetCustomJob[0:len((*c.CallOptions).GetCustomJob):len((*c.CallOptions).GetCustomJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.CustomJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteDataLabelingJobOperation manages a long-running operation from DeleteDataLabelingJob. -type DeleteDataLabelingJobOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteDataLabelingJobOperation returns a new DeleteDataLabelingJobOperation from a given name. -// The name must be that of a previously created DeleteDataLabelingJobOperation, possibly from a different process. -func (c *jobGRPCClient) DeleteDataLabelingJobOperation(name string) *DeleteDataLabelingJobOperation { - return &DeleteDataLabelingJobOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteDataLabelingJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// ListCustomJobs lists CustomJobs in a Location. +func (c *jobRESTClient) ListCustomJobs(ctx context.Context, req *aiplatformpb.ListCustomJobsRequest, opts ...gax.CallOption) *CustomJobIterator { + it := &CustomJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListCustomJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.CustomJob, string, error) { + resp := &aiplatformpb.ListCustomJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/customJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetCustomJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteCustomJob deletes a CustomJob. +func (c *jobRESTClient) DeleteCustomJob(ctx context.Context, req *aiplatformpb.DeleteCustomJobRequest, opts ...gax.CallOption) (*DeleteCustomJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteCustomJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CancelCustomJob cancels a CustomJob. +// Starts asynchronous cancellation on the CustomJob. The server +// makes a best effort to cancel the job, but success is not +// guaranteed. Clients can use JobService.GetCustomJob or +// other methods to check whether the cancellation succeeded or whether the +// job completed despite cancellation. On successful cancellation, +// the CustomJob is not deleted; instead it becomes a job with +// a CustomJob.error value with a google.rpc.Status.code of 1, +// corresponding to Code.CANCELLED, and CustomJob.state is set to +// CANCELLED. +func (c *jobRESTClient) CancelCustomJob(ctx context.Context, req *aiplatformpb.CancelCustomJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateDataLabelingJob creates a DataLabelingJob. +func (c *jobRESTClient) CreateDataLabelingJob(ctx context.Context, req *aiplatformpb.CreateDataLabelingJobRequest, opts ...gax.CallOption) (*aiplatformpb.DataLabelingJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDataLabelingJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/dataLabelingJobs", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateDataLabelingJob[0:len((*c.CallOptions).CreateDataLabelingJob):len((*c.CallOptions).CreateDataLabelingJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.DataLabelingJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetDataLabelingJob gets a DataLabelingJob. +func (c *jobRESTClient) GetDataLabelingJob(ctx context.Context, req *aiplatformpb.GetDataLabelingJobRequest, opts ...gax.CallOption) (*aiplatformpb.DataLabelingJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetDataLabelingJob[0:len((*c.CallOptions).GetDataLabelingJob):len((*c.CallOptions).GetDataLabelingJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.DataLabelingJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListDataLabelingJobs lists DataLabelingJobs in a Location. +func (c *jobRESTClient) ListDataLabelingJobs(ctx context.Context, req *aiplatformpb.ListDataLabelingJobsRequest, opts ...gax.CallOption) *DataLabelingJobIterator { + it := &DataLabelingJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListDataLabelingJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.DataLabelingJob, string, error) { + resp := &aiplatformpb.ListDataLabelingJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/dataLabelingJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDataLabelingJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteDataLabelingJob deletes a DataLabelingJob. +func (c *jobRESTClient) DeleteDataLabelingJob(ctx context.Context, req *aiplatformpb.DeleteDataLabelingJobRequest, opts ...gax.CallOption) (*DeleteDataLabelingJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteDataLabelingJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CancelDataLabelingJob cancels a DataLabelingJob. Success of cancellation is not guaranteed. +func (c *jobRESTClient) CancelDataLabelingJob(ctx context.Context, req *aiplatformpb.CancelDataLabelingJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateHyperparameterTuningJob creates a HyperparameterTuningJob +func (c *jobRESTClient) CreateHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CreateHyperparameterTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.HyperparameterTuningJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetHyperparameterTuningJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/hyperparameterTuningJobs", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateHyperparameterTuningJob[0:len((*c.CallOptions).CreateHyperparameterTuningJob):len((*c.CallOptions).CreateHyperparameterTuningJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.HyperparameterTuningJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetHyperparameterTuningJob gets a HyperparameterTuningJob +func (c *jobRESTClient) GetHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.GetHyperparameterTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.HyperparameterTuningJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetHyperparameterTuningJob[0:len((*c.CallOptions).GetHyperparameterTuningJob):len((*c.CallOptions).GetHyperparameterTuningJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.HyperparameterTuningJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListHyperparameterTuningJobs lists HyperparameterTuningJobs in a Location. +func (c *jobRESTClient) ListHyperparameterTuningJobs(ctx context.Context, req *aiplatformpb.ListHyperparameterTuningJobsRequest, opts ...gax.CallOption) *HyperparameterTuningJobIterator { + it := &HyperparameterTuningJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListHyperparameterTuningJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.HyperparameterTuningJob, string, error) { + resp := &aiplatformpb.ListHyperparameterTuningJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/hyperparameterTuningJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetHyperparameterTuningJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteHyperparameterTuningJob deletes a HyperparameterTuningJob. +func (c *jobRESTClient) DeleteHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.DeleteHyperparameterTuningJobRequest, opts ...gax.CallOption) (*DeleteHyperparameterTuningJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteHyperparameterTuningJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CancelHyperparameterTuningJob cancels a HyperparameterTuningJob. +// Starts asynchronous cancellation on the HyperparameterTuningJob. The server +// makes a best effort to cancel the job, but success is not +// guaranteed. Clients can use JobService.GetHyperparameterTuningJob or +// other methods to check whether the cancellation succeeded or whether the +// job completed despite cancellation. On successful cancellation, +// the HyperparameterTuningJob is not deleted; instead it becomes a job with +// a HyperparameterTuningJob.error value with a google.rpc.Status.code +// of 1, corresponding to Code.CANCELLED, and +// HyperparameterTuningJob.state is set to CANCELLED. +func (c *jobRESTClient) CancelHyperparameterTuningJob(ctx context.Context, req *aiplatformpb.CancelHyperparameterTuningJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateBatchPredictionJob creates a BatchPredictionJob. A BatchPredictionJob once created will +// right away be attempted to start. +func (c *jobRESTClient) CreateBatchPredictionJob(ctx context.Context, req *aiplatformpb.CreateBatchPredictionJobRequest, opts ...gax.CallOption) (*aiplatformpb.BatchPredictionJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetBatchPredictionJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/batchPredictionJobs", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateBatchPredictionJob[0:len((*c.CallOptions).CreateBatchPredictionJob):len((*c.CallOptions).CreateBatchPredictionJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.BatchPredictionJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetBatchPredictionJob gets a BatchPredictionJob +func (c *jobRESTClient) GetBatchPredictionJob(ctx context.Context, req *aiplatformpb.GetBatchPredictionJobRequest, opts ...gax.CallOption) (*aiplatformpb.BatchPredictionJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetBatchPredictionJob[0:len((*c.CallOptions).GetBatchPredictionJob):len((*c.CallOptions).GetBatchPredictionJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.BatchPredictionJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListBatchPredictionJobs lists BatchPredictionJobs in a Location. +func (c *jobRESTClient) ListBatchPredictionJobs(ctx context.Context, req *aiplatformpb.ListBatchPredictionJobsRequest, opts ...gax.CallOption) *BatchPredictionJobIterator { + it := &BatchPredictionJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListBatchPredictionJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.BatchPredictionJob, string, error) { + resp := &aiplatformpb.ListBatchPredictionJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/batchPredictionJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetBatchPredictionJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteBatchPredictionJob deletes a BatchPredictionJob. Can only be called on jobs that already +// finished. +func (c *jobRESTClient) DeleteBatchPredictionJob(ctx context.Context, req *aiplatformpb.DeleteBatchPredictionJobRequest, opts ...gax.CallOption) (*DeleteBatchPredictionJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteBatchPredictionJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CancelBatchPredictionJob cancels a BatchPredictionJob. +// +// Starts asynchronous cancellation on the BatchPredictionJob. The server +// makes the best effort to cancel the job, but success is not +// guaranteed. Clients can use JobService.GetBatchPredictionJob or +// other methods to check whether the cancellation succeeded or whether the +// job completed despite cancellation. On a successful cancellation, +// the BatchPredictionJob is not deleted;instead its +// BatchPredictionJob.state is set to CANCELLED. Any files already +// outputted by the job are not deleted. +func (c *jobRESTClient) CancelBatchPredictionJob(ctx context.Context, req *aiplatformpb.CancelBatchPredictionJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateModelDeploymentMonitoringJob creates a ModelDeploymentMonitoringJob. It will run periodically on a +// configured interval. +func (c *jobRESTClient) CreateModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.CreateModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetModelDeploymentMonitoringJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/modelDeploymentMonitoringJobs", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateModelDeploymentMonitoringJob[0:len((*c.CallOptions).CreateModelDeploymentMonitoringJob):len((*c.CallOptions).CreateModelDeploymentMonitoringJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ModelDeploymentMonitoringJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SearchModelDeploymentMonitoringStatsAnomalies searches Model Monitoring Statistics generated within a given time window. +func (c *jobRESTClient) SearchModelDeploymentMonitoringStatsAnomalies(ctx context.Context, req *aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest, opts ...gax.CallOption) *ModelMonitoringStatsAnomaliesIterator { + it := &ModelMonitoringStatsAnomaliesIterator{} + req = proto.Clone(req).(*aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.ModelMonitoringStatsAnomalies, string, error) { + resp := &aiplatformpb.SearchModelDeploymentMonitoringStatsAnomaliesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:searchModelDeploymentMonitoringStatsAnomalies", req.GetModelDeploymentMonitoringJob()) + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMonitoringStats(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetModelDeploymentMonitoringJob gets a ModelDeploymentMonitoringJob. +func (c *jobRESTClient) GetModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.GetModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetModelDeploymentMonitoringJob[0:len((*c.CallOptions).GetModelDeploymentMonitoringJob):len((*c.CallOptions).GetModelDeploymentMonitoringJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ModelDeploymentMonitoringJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListModelDeploymentMonitoringJobs lists ModelDeploymentMonitoringJobs in a Location. +func (c *jobRESTClient) ListModelDeploymentMonitoringJobs(ctx context.Context, req *aiplatformpb.ListModelDeploymentMonitoringJobsRequest, opts ...gax.CallOption) *ModelDeploymentMonitoringJobIterator { + it := &ModelDeploymentMonitoringJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListModelDeploymentMonitoringJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.ModelDeploymentMonitoringJob, string, error) { + resp := &aiplatformpb.ListModelDeploymentMonitoringJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/modelDeploymentMonitoringJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetModelDeploymentMonitoringJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateModelDeploymentMonitoringJob updates a ModelDeploymentMonitoringJob. +func (c *jobRESTClient) UpdateModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.UpdateModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*UpdateModelDeploymentMonitoringJobOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetModelDeploymentMonitoringJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetModelDeploymentMonitoringJob().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "model_deployment_monitoring_job.name", url.QueryEscape(req.GetModelDeploymentMonitoringJob().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UpdateModelDeploymentMonitoringJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteModelDeploymentMonitoringJob deletes a ModelDeploymentMonitoringJob. +func (c *jobRESTClient) DeleteModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.DeleteModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) (*DeleteModelDeploymentMonitoringJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteModelDeploymentMonitoringJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// PauseModelDeploymentMonitoringJob pauses a ModelDeploymentMonitoringJob. If the job is running, the server +// makes a best effort to cancel the job. Will mark +// ModelDeploymentMonitoringJob.state to ‘PAUSED’. +func (c *jobRESTClient) PauseModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.PauseModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:pause", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ResumeModelDeploymentMonitoringJob resumes a paused ModelDeploymentMonitoringJob. It will start to run from +// next scheduled time. A deleted ModelDeploymentMonitoringJob can’t be +// resumed. +func (c *jobRESTClient) ResumeModelDeploymentMonitoringJob(ctx context.Context, req *aiplatformpb.ResumeModelDeploymentMonitoringJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:resume", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetLocation gets information about a location. +func (c *jobRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *jobRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *jobRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *jobRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *jobRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *jobRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *jobRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *jobRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *jobRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *jobRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteBatchPredictionJobOperation manages a long-running operation from DeleteBatchPredictionJob. +type DeleteBatchPredictionJobOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteBatchPredictionJobOperation returns a new DeleteBatchPredictionJobOperation from a given name. +// The name must be that of a previously created DeleteBatchPredictionJobOperation, possibly from a different process. +func (c *jobGRPCClient) DeleteBatchPredictionJobOperation(name string) *DeleteBatchPredictionJobOperation { + return &DeleteBatchPredictionJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteBatchPredictionJobOperation returns a new DeleteBatchPredictionJobOperation from a given name. +// The name must be that of a previously created DeleteBatchPredictionJobOperation, possibly from a different process. +func (c *jobRESTClient) DeleteBatchPredictionJobOperation(name string) *DeleteBatchPredictionJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteBatchPredictionJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteBatchPredictionJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteBatchPredictionJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteBatchPredictionJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteBatchPredictionJobOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteBatchPredictionJobOperation) Name() string { + return op.lro.Name() +} + +// DeleteCustomJobOperation manages a long-running operation from DeleteCustomJob. +type DeleteCustomJobOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteCustomJobOperation returns a new DeleteCustomJobOperation from a given name. +// The name must be that of a previously created DeleteCustomJobOperation, possibly from a different process. +func (c *jobGRPCClient) DeleteCustomJobOperation(name string) *DeleteCustomJobOperation { + return &DeleteCustomJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteCustomJobOperation returns a new DeleteCustomJobOperation from a given name. +// The name must be that of a previously created DeleteCustomJobOperation, possibly from a different process. +func (c *jobRESTClient) DeleteCustomJobOperation(name string) *DeleteCustomJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteCustomJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteCustomJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteCustomJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteCustomJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteCustomJobOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteCustomJobOperation) Name() string { + return op.lro.Name() +} + +// DeleteDataLabelingJobOperation manages a long-running operation from DeleteDataLabelingJob. +type DeleteDataLabelingJobOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteDataLabelingJobOperation returns a new DeleteDataLabelingJobOperation from a given name. +// The name must be that of a previously created DeleteDataLabelingJobOperation, possibly from a different process. +func (c *jobGRPCClient) DeleteDataLabelingJobOperation(name string) *DeleteDataLabelingJobOperation { + return &DeleteDataLabelingJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteDataLabelingJobOperation returns a new DeleteDataLabelingJobOperation from a given name. +// The name must be that of a previously created DeleteDataLabelingJobOperation, possibly from a different process. +func (c *jobRESTClient) DeleteDataLabelingJobOperation(name string) *DeleteDataLabelingJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteDataLabelingJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteDataLabelingJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and // the operation has completed with failure, the error is returned and op.Done will return true. // If Poll succeeds and the operation has completed successfully, // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteDataLabelingJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1741,7 +4299,8 @@ func (op *DeleteDataLabelingJobOperation) Name() string { // DeleteHyperparameterTuningJobOperation manages a long-running operation from DeleteHyperparameterTuningJob. type DeleteHyperparameterTuningJobOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteHyperparameterTuningJobOperation returns a new DeleteHyperparameterTuningJobOperation from a given name. @@ -1752,10 +4311,21 @@ func (c *jobGRPCClient) DeleteHyperparameterTuningJobOperation(name string) *Del } } +// DeleteHyperparameterTuningJobOperation returns a new DeleteHyperparameterTuningJobOperation from a given name. +// The name must be that of a previously created DeleteHyperparameterTuningJobOperation, possibly from a different process. +func (c *jobRESTClient) DeleteHyperparameterTuningJobOperation(name string) *DeleteHyperparameterTuningJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteHyperparameterTuningJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteHyperparameterTuningJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1769,6 +4339,7 @@ func (op *DeleteHyperparameterTuningJobOperation) Wait(ctx context.Context, opts // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteHyperparameterTuningJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1799,7 +4370,8 @@ func (op *DeleteHyperparameterTuningJobOperation) Name() string { // DeleteModelDeploymentMonitoringJobOperation manages a long-running operation from DeleteModelDeploymentMonitoringJob. type DeleteModelDeploymentMonitoringJobOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteModelDeploymentMonitoringJobOperation returns a new DeleteModelDeploymentMonitoringJobOperation from a given name. @@ -1810,10 +4382,21 @@ func (c *jobGRPCClient) DeleteModelDeploymentMonitoringJobOperation(name string) } } +// DeleteModelDeploymentMonitoringJobOperation returns a new DeleteModelDeploymentMonitoringJobOperation from a given name. +// The name must be that of a previously created DeleteModelDeploymentMonitoringJobOperation, possibly from a different process. +func (c *jobRESTClient) DeleteModelDeploymentMonitoringJobOperation(name string) *DeleteModelDeploymentMonitoringJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteModelDeploymentMonitoringJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1827,6 +4410,7 @@ func (op *DeleteModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteModelDeploymentMonitoringJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1857,7 +4441,8 @@ func (op *DeleteModelDeploymentMonitoringJobOperation) Name() string { // UpdateModelDeploymentMonitoringJobOperation manages a long-running operation from UpdateModelDeploymentMonitoringJob. type UpdateModelDeploymentMonitoringJobOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UpdateModelDeploymentMonitoringJobOperation returns a new UpdateModelDeploymentMonitoringJobOperation from a given name. @@ -1868,10 +4453,21 @@ func (c *jobGRPCClient) UpdateModelDeploymentMonitoringJobOperation(name string) } } +// UpdateModelDeploymentMonitoringJobOperation returns a new UpdateModelDeploymentMonitoringJobOperation from a given name. +// The name must be that of a previously created UpdateModelDeploymentMonitoringJobOperation, possibly from a different process. +func (c *jobRESTClient) UpdateModelDeploymentMonitoringJobOperation(name string) *UpdateModelDeploymentMonitoringJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UpdateModelDeploymentMonitoringJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ModelDeploymentMonitoringJob if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1889,6 +4485,7 @@ func (op *UpdateModelDeploymentMonitoringJobOperation) Wait(ctx context.Context, // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UpdateModelDeploymentMonitoringJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ModelDeploymentMonitoringJob, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.ModelDeploymentMonitoringJob if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/job_client_example_test.go b/aiplatform/apiv1beta1/job_client_example_test.go index eab42d8b2181..9425ac70200f 100644 --- a/aiplatform/apiv1beta1/job_client_example_test.go +++ b/aiplatform/apiv1beta1/job_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewJobClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewJobClient() { _ = c } +func ExampleNewJobRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewJobRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleJobClient_CreateCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +88,11 @@ func ExampleJobClient_CreateCustomJob() { func ExampleJobClient_GetCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +113,11 @@ func ExampleJobClient_GetCustomJob() { func ExampleJobClient_ListCustomJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +144,11 @@ func ExampleJobClient_ListCustomJobs() { func ExampleJobClient_DeleteCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +172,11 @@ func ExampleJobClient_DeleteCustomJob() { func ExampleJobClient_CancelCustomJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -148,6 +195,11 @@ func ExampleJobClient_CancelCustomJob() { func ExampleJobClient_CreateDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -168,6 +220,11 @@ func ExampleJobClient_CreateDataLabelingJob() { func ExampleJobClient_GetDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +245,11 @@ func ExampleJobClient_GetDataLabelingJob() { func ExampleJobClient_ListDataLabelingJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +276,11 @@ func ExampleJobClient_ListDataLabelingJobs() { func ExampleJobClient_DeleteDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -237,6 +304,11 @@ func ExampleJobClient_DeleteDataLabelingJob() { func ExampleJobClient_CancelDataLabelingJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -255,6 +327,11 @@ func ExampleJobClient_CancelDataLabelingJob() { func ExampleJobClient_CreateHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -275,6 +352,11 @@ func ExampleJobClient_CreateHyperparameterTuningJob() { func ExampleJobClient_GetHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -295,6 +377,11 @@ func ExampleJobClient_GetHyperparameterTuningJob() { func ExampleJobClient_ListHyperparameterTuningJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +408,11 @@ func ExampleJobClient_ListHyperparameterTuningJobs() { func ExampleJobClient_DeleteHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -344,6 +436,11 @@ func ExampleJobClient_DeleteHyperparameterTuningJob() { func ExampleJobClient_CancelHyperparameterTuningJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -362,6 +459,11 @@ func ExampleJobClient_CancelHyperparameterTuningJob() { func ExampleJobClient_CreateBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -382,6 +484,11 @@ func ExampleJobClient_CreateBatchPredictionJob() { func ExampleJobClient_GetBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -402,6 +509,11 @@ func ExampleJobClient_GetBatchPredictionJob() { func ExampleJobClient_ListBatchPredictionJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -428,6 +540,11 @@ func ExampleJobClient_ListBatchPredictionJobs() { func ExampleJobClient_DeleteBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -451,6 +568,11 @@ func ExampleJobClient_DeleteBatchPredictionJob() { func ExampleJobClient_CancelBatchPredictionJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -469,6 +591,11 @@ func ExampleJobClient_CancelBatchPredictionJob() { func ExampleJobClient_CreateModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -489,6 +616,11 @@ func ExampleJobClient_CreateModelDeploymentMonitoringJob() { func ExampleJobClient_SearchModelDeploymentMonitoringStatsAnomalies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -515,6 +647,11 @@ func ExampleJobClient_SearchModelDeploymentMonitoringStatsAnomalies() { func ExampleJobClient_GetModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -535,6 +672,11 @@ func ExampleJobClient_GetModelDeploymentMonitoringJob() { func ExampleJobClient_ListModelDeploymentMonitoringJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -561,6 +703,11 @@ func ExampleJobClient_ListModelDeploymentMonitoringJobs() { func ExampleJobClient_UpdateModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -586,6 +733,11 @@ func ExampleJobClient_UpdateModelDeploymentMonitoringJob() { func ExampleJobClient_DeleteModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -609,6 +761,11 @@ func ExampleJobClient_DeleteModelDeploymentMonitoringJob() { func ExampleJobClient_PauseModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -627,6 +784,11 @@ func ExampleJobClient_PauseModelDeploymentMonitoringJob() { func ExampleJobClient_ResumeModelDeploymentMonitoringJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -645,6 +807,11 @@ func ExampleJobClient_ResumeModelDeploymentMonitoringJob() { func ExampleJobClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -665,6 +832,11 @@ func ExampleJobClient_GetLocation() { func ExampleJobClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -691,6 +863,11 @@ func ExampleJobClient_ListLocations() { func ExampleJobClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -711,6 +888,11 @@ func ExampleJobClient_GetIamPolicy() { func ExampleJobClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -731,6 +913,11 @@ func ExampleJobClient_SetIamPolicy() { func ExampleJobClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -751,6 +938,11 @@ func ExampleJobClient_TestIamPermissions() { func ExampleJobClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -769,6 +961,11 @@ func ExampleJobClient_CancelOperation() { func ExampleJobClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -787,6 +984,11 @@ func ExampleJobClient_DeleteOperation() { func ExampleJobClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -807,6 +1009,11 @@ func ExampleJobClient_GetOperation() { func ExampleJobClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. @@ -833,6 +1040,11 @@ func ExampleJobClient_ListOperations() { func ExampleJobClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewJobClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/metadata_client.go b/aiplatform/apiv1beta1/metadata_client.go index c30d96c0c1e0..6f52fdb2bf83 100644 --- a/aiplatform/apiv1beta1/metadata_client.go +++ b/aiplatform/apiv1beta1/metadata_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -144,6 +150,52 @@ func defaultMetadataCallOptions() *MetadataCallOptions { } } +func defaultMetadataRESTCallOptions() *MetadataCallOptions { + return &MetadataCallOptions{ + CreateMetadataStore: []gax.CallOption{}, + GetMetadataStore: []gax.CallOption{}, + ListMetadataStores: []gax.CallOption{}, + DeleteMetadataStore: []gax.CallOption{}, + CreateArtifact: []gax.CallOption{}, + GetArtifact: []gax.CallOption{}, + ListArtifacts: []gax.CallOption{}, + UpdateArtifact: []gax.CallOption{}, + DeleteArtifact: []gax.CallOption{}, + PurgeArtifacts: []gax.CallOption{}, + CreateContext: []gax.CallOption{}, + GetContext: []gax.CallOption{}, + ListContexts: []gax.CallOption{}, + UpdateContext: []gax.CallOption{}, + DeleteContext: []gax.CallOption{}, + PurgeContexts: []gax.CallOption{}, + AddContextArtifactsAndExecutions: []gax.CallOption{}, + AddContextChildren: []gax.CallOption{}, + QueryContextLineageSubgraph: []gax.CallOption{}, + CreateExecution: []gax.CallOption{}, + GetExecution: []gax.CallOption{}, + ListExecutions: []gax.CallOption{}, + UpdateExecution: []gax.CallOption{}, + DeleteExecution: []gax.CallOption{}, + PurgeExecutions: []gax.CallOption{}, + AddExecutionEvents: []gax.CallOption{}, + QueryExecutionInputsAndOutputs: []gax.CallOption{}, + CreateMetadataSchema: []gax.CallOption{}, + GetMetadataSchema: []gax.CallOption{}, + ListMetadataSchemas: []gax.CallOption{}, + QueryArtifactLineageSubgraph: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalMetadataClient is an interface that defines the methods available from Vertex AI API. type internalMetadataClient interface { Close() error @@ -234,7 +286,8 @@ func (c *MetadataClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MetadataClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -602,7 +655,8 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *metadataGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -622,6 +676,89 @@ func (c *metadataGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type metadataRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing MetadataClient + CallOptions **MetadataCallOptions +} + +// NewMetadataRESTClient creates a new metadata service rest client. +// +// Service for reading and writing metadata entries. +func NewMetadataRESTClient(ctx context.Context, opts ...option.ClientOption) (*MetadataClient, error) { + clientOpts := append(defaultMetadataRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultMetadataRESTCallOptions() + c := &metadataRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &MetadataClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultMetadataRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *metadataRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *metadataRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *metadataRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *metadataGRPCClient) CreateMetadataStore(ctx context.Context, req *aiplatformpb.CreateMetadataStoreRequest, opts ...gax.CallOption) (*CreateMetadataStoreOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -1623,150 +1760,2877 @@ func (c *metadataGRPCClient) WaitOperation(ctx context.Context, req *longrunning return resp, nil } -// CreateMetadataStoreOperation manages a long-running operation from CreateMetadataStore. -type CreateMetadataStoreOperation struct { - lro *longrunning.Operation -} - -// CreateMetadataStoreOperation returns a new CreateMetadataStoreOperation from a given name. -// The name must be that of a previously created CreateMetadataStoreOperation, possibly from a different process. -func (c *metadataGRPCClient) CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation { - return &CreateMetadataStoreOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateMetadataStoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) { - var resp aiplatformpb.MetadataStore - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateMetadataStore initializes a MetadataStore, including allocation of resources. +func (c *metadataRESTClient) CreateMetadataStore(ctx context.Context, req *aiplatformpb.CreateMetadataStoreRequest, opts ...gax.CallOption) (*CreateMetadataStoreOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetMetadataStore() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateMetadataStoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) { - var resp aiplatformpb.MetadataStore - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/metadataStores", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateMetadataStoreOperation) Metadata() (*aiplatformpb.CreateMetadataStoreOperationMetadata, error) { - var meta aiplatformpb.CreateMetadataStoreOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err + params := url.Values{} + if req.GetMetadataStoreId() != "" { + params.Add("metadataStoreId", fmt.Sprintf("%v", req.GetMetadataStoreId())) } - return &meta, nil -} -// Done reports whether the long-running operation has completed. -func (op *CreateMetadataStoreOperation) Done() bool { - return op.lro.Done() -} + baseUrl.RawQuery = params.Encode() -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateMetadataStoreOperation) Name() string { - return op.lro.Name() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// DeleteArtifactOperation manages a long-running operation from DeleteArtifact. -type DeleteArtifactOperation struct { - lro *longrunning.Operation -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteArtifactOperation returns a new DeleteArtifactOperation from a given name. -// The name must be that of a previously created DeleteArtifactOperation, possibly from a different process. -func (c *metadataGRPCClient) DeleteArtifactOperation(name string) *DeleteArtifactOperation { - return &DeleteArtifactOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteArtifactOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteArtifactOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateMetadataStoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteArtifactOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetMetadataStore retrieves a specific MetadataStore. +func (c *metadataRESTClient) GetMetadataStore(ctx context.Context, req *aiplatformpb.GetMetadataStoreRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteArtifactOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteArtifactOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetMetadataStore[0:len((*c.CallOptions).GetMetadataStore):len((*c.CallOptions).GetMetadataStore)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.MetadataStore{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteContextOperation manages a long-running operation from DeleteContext. -type DeleteContextOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteContextOperation returns a new DeleteContextOperation from a given name. -// The name must be that of a previously created DeleteContextOperation, possibly from a different process. -func (c *metadataGRPCClient) DeleteContextOperation(name string) *DeleteContextOperation { - return &DeleteContextOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } + return resp, nil } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// ListMetadataStores lists MetadataStores for a Location. +func (c *metadataRESTClient) ListMetadataStores(ctx context.Context, req *aiplatformpb.ListMetadataStoresRequest, opts ...gax.CallOption) *MetadataStoreIterator { + it := &MetadataStoreIterator{} + req = proto.Clone(req).(*aiplatformpb.ListMetadataStoresRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.MetadataStore, string, error) { + resp := &aiplatformpb.ListMetadataStoresResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/metadataStores", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMetadataStores(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteMetadataStore deletes a single MetadataStore and all its child resources (Artifacts, +// Executions, and Contexts). +func (c *metadataRESTClient) DeleteMetadataStore(ctx context.Context, req *aiplatformpb.DeleteMetadataStoreRequest, opts ...gax.CallOption) (*DeleteMetadataStoreOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteMetadataStoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateArtifact creates an Artifact associated with a MetadataStore. +func (c *metadataRESTClient) CreateArtifact(ctx context.Context, req *aiplatformpb.CreateArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetArtifact() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/artifacts", req.GetParent()) + + params := url.Values{} + if req.GetArtifactId() != "" { + params.Add("artifactId", fmt.Sprintf("%v", req.GetArtifactId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateArtifact[0:len((*c.CallOptions).CreateArtifact):len((*c.CallOptions).CreateArtifact)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Artifact{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetArtifact retrieves a specific Artifact. +func (c *metadataRESTClient) GetArtifact(ctx context.Context, req *aiplatformpb.GetArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetArtifact[0:len((*c.CallOptions).GetArtifact):len((*c.CallOptions).GetArtifact)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Artifact{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListArtifacts lists Artifacts in the MetadataStore. +func (c *metadataRESTClient) ListArtifacts(ctx context.Context, req *aiplatformpb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator { + it := &ArtifactIterator{} + req = proto.Clone(req).(*aiplatformpb.ListArtifactsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Artifact, string, error) { + resp := &aiplatformpb.ListArtifactsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/artifacts", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetArtifacts(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateArtifact updates a stored Artifact. +func (c *metadataRESTClient) UpdateArtifact(ctx context.Context, req *aiplatformpb.UpdateArtifactRequest, opts ...gax.CallOption) (*aiplatformpb.Artifact, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetArtifact() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetArtifact().GetName()) + + params := url.Values{} + if req.GetAllowMissing() { + params.Add("allowMissing", fmt.Sprintf("%v", req.GetAllowMissing())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "artifact.name", url.QueryEscape(req.GetArtifact().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateArtifact[0:len((*c.CallOptions).UpdateArtifact):len((*c.CallOptions).UpdateArtifact)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Artifact{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteArtifact deletes an Artifact. +func (c *metadataRESTClient) DeleteArtifact(ctx context.Context, req *aiplatformpb.DeleteArtifactRequest, opts ...gax.CallOption) (*DeleteArtifactOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetEtag() != "" { + params.Add("etag", fmt.Sprintf("%v", req.GetEtag())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteArtifactOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// PurgeArtifacts purges Artifacts. +func (c *metadataRESTClient) PurgeArtifacts(ctx context.Context, req *aiplatformpb.PurgeArtifactsRequest, opts ...gax.CallOption) (*PurgeArtifactsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/artifacts:purge", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &PurgeArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateContext creates a Context associated with a MetadataStore. +func (c *metadataRESTClient) CreateContext(ctx context.Context, req *aiplatformpb.CreateContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetContext() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/contexts", req.GetParent()) + + params := url.Values{} + if req.GetContextId() != "" { + params.Add("contextId", fmt.Sprintf("%v", req.GetContextId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateContext[0:len((*c.CallOptions).CreateContext):len((*c.CallOptions).CreateContext)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Context{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetContext retrieves a specific Context. +func (c *metadataRESTClient) GetContext(ctx context.Context, req *aiplatformpb.GetContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetContext[0:len((*c.CallOptions).GetContext):len((*c.CallOptions).GetContext)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Context{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListContexts lists Contexts on the MetadataStore. +func (c *metadataRESTClient) ListContexts(ctx context.Context, req *aiplatformpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator { + it := &ContextIterator{} + req = proto.Clone(req).(*aiplatformpb.ListContextsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Context, string, error) { + resp := &aiplatformpb.ListContextsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/contexts", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetContexts(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateContext updates a stored Context. +func (c *metadataRESTClient) UpdateContext(ctx context.Context, req *aiplatformpb.UpdateContextRequest, opts ...gax.CallOption) (*aiplatformpb.Context, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetContext() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetContext().GetName()) + + params := url.Values{} + if req.GetAllowMissing() { + params.Add("allowMissing", fmt.Sprintf("%v", req.GetAllowMissing())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context.name", url.QueryEscape(req.GetContext().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateContext[0:len((*c.CallOptions).UpdateContext):len((*c.CallOptions).UpdateContext)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Context{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteContext deletes a stored Context. +func (c *metadataRESTClient) DeleteContext(ctx context.Context, req *aiplatformpb.DeleteContextRequest, opts ...gax.CallOption) (*DeleteContextOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetEtag() != "" { + params.Add("etag", fmt.Sprintf("%v", req.GetEtag())) + } + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteContextOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// PurgeContexts purges Contexts. +func (c *metadataRESTClient) PurgeContexts(ctx context.Context, req *aiplatformpb.PurgeContextsRequest, opts ...gax.CallOption) (*PurgeContextsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/contexts:purge", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &PurgeContextsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// AddContextArtifactsAndExecutions adds a set of Artifacts and Executions to a Context. If any of the +// Artifacts or Executions have already been added to a Context, they are +// simply skipped. +func (c *metadataRESTClient) AddContextArtifactsAndExecutions(ctx context.Context, req *aiplatformpb.AddContextArtifactsAndExecutionsRequest, opts ...gax.CallOption) (*aiplatformpb.AddContextArtifactsAndExecutionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:addContextArtifactsAndExecutions", req.GetContext()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context", url.QueryEscape(req.GetContext()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).AddContextArtifactsAndExecutions[0:len((*c.CallOptions).AddContextArtifactsAndExecutions):len((*c.CallOptions).AddContextArtifactsAndExecutions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.AddContextArtifactsAndExecutionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// AddContextChildren adds a set of Contexts as children to a parent Context. If any of the +// child Contexts have already been added to the parent Context, they are +// simply skipped. If this call would create a cycle or cause any Context to +// have more than 10 parents, the request will fail with an INVALID_ARGUMENT +// error. +func (c *metadataRESTClient) AddContextChildren(ctx context.Context, req *aiplatformpb.AddContextChildrenRequest, opts ...gax.CallOption) (*aiplatformpb.AddContextChildrenResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:addContextChildren", req.GetContext()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context", url.QueryEscape(req.GetContext()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).AddContextChildren[0:len((*c.CallOptions).AddContextChildren):len((*c.CallOptions).AddContextChildren)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.AddContextChildrenResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// QueryContextLineageSubgraph retrieves Artifacts and Executions within the specified Context, connected +// by Event edges and returned as a LineageSubgraph. +func (c *metadataRESTClient) QueryContextLineageSubgraph(ctx context.Context, req *aiplatformpb.QueryContextLineageSubgraphRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:queryContextLineageSubgraph", req.GetContext()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context", url.QueryEscape(req.GetContext()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).QueryContextLineageSubgraph[0:len((*c.CallOptions).QueryContextLineageSubgraph):len((*c.CallOptions).QueryContextLineageSubgraph)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.LineageSubgraph{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateExecution creates an Execution associated with a MetadataStore. +func (c *metadataRESTClient) CreateExecution(ctx context.Context, req *aiplatformpb.CreateExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetExecution() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/executions", req.GetParent()) + + params := url.Values{} + if req.GetExecutionId() != "" { + params.Add("executionId", fmt.Sprintf("%v", req.GetExecutionId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateExecution[0:len((*c.CallOptions).CreateExecution):len((*c.CallOptions).CreateExecution)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Execution{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetExecution retrieves a specific Execution. +func (c *metadataRESTClient) GetExecution(ctx context.Context, req *aiplatformpb.GetExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetExecution[0:len((*c.CallOptions).GetExecution):len((*c.CallOptions).GetExecution)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Execution{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListExecutions lists Executions in the MetadataStore. +func (c *metadataRESTClient) ListExecutions(ctx context.Context, req *aiplatformpb.ListExecutionsRequest, opts ...gax.CallOption) *ExecutionIterator { + it := &ExecutionIterator{} + req = proto.Clone(req).(*aiplatformpb.ListExecutionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Execution, string, error) { + resp := &aiplatformpb.ListExecutionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/executions", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetExecutions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateExecution updates a stored Execution. +func (c *metadataRESTClient) UpdateExecution(ctx context.Context, req *aiplatformpb.UpdateExecutionRequest, opts ...gax.CallOption) (*aiplatformpb.Execution, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetExecution() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetExecution().GetName()) + + params := url.Values{} + if req.GetAllowMissing() { + params.Add("allowMissing", fmt.Sprintf("%v", req.GetAllowMissing())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "execution.name", url.QueryEscape(req.GetExecution().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateExecution[0:len((*c.CallOptions).UpdateExecution):len((*c.CallOptions).UpdateExecution)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Execution{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteExecution deletes an Execution. +func (c *metadataRESTClient) DeleteExecution(ctx context.Context, req *aiplatformpb.DeleteExecutionRequest, opts ...gax.CallOption) (*DeleteExecutionOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetEtag() != "" { + params.Add("etag", fmt.Sprintf("%v", req.GetEtag())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteExecutionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// PurgeExecutions purges Executions. +func (c *metadataRESTClient) PurgeExecutions(ctx context.Context, req *aiplatformpb.PurgeExecutionsRequest, opts ...gax.CallOption) (*PurgeExecutionsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/executions:purge", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &PurgeExecutionsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// AddExecutionEvents adds Events to the specified Execution. An Event indicates whether an +// Artifact was used as an input or output for an Execution. If an Event +// already exists between the Execution and the Artifact, the Event is +// skipped. +func (c *metadataRESTClient) AddExecutionEvents(ctx context.Context, req *aiplatformpb.AddExecutionEventsRequest, opts ...gax.CallOption) (*aiplatformpb.AddExecutionEventsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:addExecutionEvents", req.GetExecution()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "execution", url.QueryEscape(req.GetExecution()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).AddExecutionEvents[0:len((*c.CallOptions).AddExecutionEvents):len((*c.CallOptions).AddExecutionEvents)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.AddExecutionEventsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// QueryExecutionInputsAndOutputs obtains the set of input and output Artifacts for this Execution, in the +// form of LineageSubgraph that also contains the Execution and connecting +// Events. +func (c *metadataRESTClient) QueryExecutionInputsAndOutputs(ctx context.Context, req *aiplatformpb.QueryExecutionInputsAndOutputsRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:queryExecutionInputsAndOutputs", req.GetExecution()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "execution", url.QueryEscape(req.GetExecution()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).QueryExecutionInputsAndOutputs[0:len((*c.CallOptions).QueryExecutionInputsAndOutputs):len((*c.CallOptions).QueryExecutionInputsAndOutputs)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.LineageSubgraph{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateMetadataSchema creates a MetadataSchema. +func (c *metadataRESTClient) CreateMetadataSchema(ctx context.Context, req *aiplatformpb.CreateMetadataSchemaRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataSchema, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetMetadataSchema() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/metadataSchemas", req.GetParent()) + + params := url.Values{} + if req.GetMetadataSchemaId() != "" { + params.Add("metadataSchemaId", fmt.Sprintf("%v", req.GetMetadataSchemaId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateMetadataSchema[0:len((*c.CallOptions).CreateMetadataSchema):len((*c.CallOptions).CreateMetadataSchema)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.MetadataSchema{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetMetadataSchema retrieves a specific MetadataSchema. +func (c *metadataRESTClient) GetMetadataSchema(ctx context.Context, req *aiplatformpb.GetMetadataSchemaRequest, opts ...gax.CallOption) (*aiplatformpb.MetadataSchema, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetMetadataSchema[0:len((*c.CallOptions).GetMetadataSchema):len((*c.CallOptions).GetMetadataSchema)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.MetadataSchema{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListMetadataSchemas lists MetadataSchemas. +func (c *metadataRESTClient) ListMetadataSchemas(ctx context.Context, req *aiplatformpb.ListMetadataSchemasRequest, opts ...gax.CallOption) *MetadataSchemaIterator { + it := &MetadataSchemaIterator{} + req = proto.Clone(req).(*aiplatformpb.ListMetadataSchemasRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.MetadataSchema, string, error) { + resp := &aiplatformpb.ListMetadataSchemasResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/metadataSchemas", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMetadataSchemas(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// QueryArtifactLineageSubgraph retrieves lineage of an Artifact represented through Artifacts and +// Executions connected by Event edges and returned as a LineageSubgraph. +func (c *metadataRESTClient) QueryArtifactLineageSubgraph(ctx context.Context, req *aiplatformpb.QueryArtifactLineageSubgraphRequest, opts ...gax.CallOption) (*aiplatformpb.LineageSubgraph, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:queryArtifactLineageSubgraph", req.GetArtifact()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetMaxHops() != 0 { + params.Add("maxHops", fmt.Sprintf("%v", req.GetMaxHops())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "artifact", url.QueryEscape(req.GetArtifact()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).QueryArtifactLineageSubgraph[0:len((*c.CallOptions).QueryArtifactLineageSubgraph):len((*c.CallOptions).QueryArtifactLineageSubgraph)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.LineageSubgraph{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *metadataRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *metadataRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *metadataRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *metadataRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *metadataRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *metadataRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *metadataRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *metadataRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *metadataRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *metadataRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateMetadataStoreOperation manages a long-running operation from CreateMetadataStore. +type CreateMetadataStoreOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateMetadataStoreOperation returns a new CreateMetadataStoreOperation from a given name. +// The name must be that of a previously created CreateMetadataStoreOperation, possibly from a different process. +func (c *metadataGRPCClient) CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation { + return &CreateMetadataStoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateMetadataStoreOperation returns a new CreateMetadataStoreOperation from a given name. +// The name must be that of a previously created CreateMetadataStoreOperation, possibly from a different process. +func (c *metadataRESTClient) CreateMetadataStoreOperation(name string) *CreateMetadataStoreOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateMetadataStoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateMetadataStoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.MetadataStore + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateMetadataStoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.MetadataStore, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.MetadataStore + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateMetadataStoreOperation) Metadata() (*aiplatformpb.CreateMetadataStoreOperationMetadata, error) { + var meta aiplatformpb.CreateMetadataStoreOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateMetadataStoreOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateMetadataStoreOperation) Name() string { + return op.lro.Name() +} + +// DeleteArtifactOperation manages a long-running operation from DeleteArtifact. +type DeleteArtifactOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteArtifactOperation returns a new DeleteArtifactOperation from a given name. +// The name must be that of a previously created DeleteArtifactOperation, possibly from a different process. +func (c *metadataGRPCClient) DeleteArtifactOperation(name string) *DeleteArtifactOperation { + return &DeleteArtifactOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteArtifactOperation returns a new DeleteArtifactOperation from a given name. +// The name must be that of a previously created DeleteArtifactOperation, possibly from a different process. +func (c *metadataRESTClient) DeleteArtifactOperation(name string) *DeleteArtifactOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteArtifactOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteArtifactOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteArtifactOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteArtifactOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteArtifactOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteArtifactOperation) Name() string { + return op.lro.Name() +} + +// DeleteContextOperation manages a long-running operation from DeleteContext. +type DeleteContextOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteContextOperation returns a new DeleteContextOperation from a given name. +// The name must be that of a previously created DeleteContextOperation, possibly from a different process. +func (c *metadataGRPCClient) DeleteContextOperation(name string) *DeleteContextOperation { + return &DeleteContextOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteContextOperation returns a new DeleteContextOperation from a given name. +// The name must be that of a previously created DeleteContextOperation, possibly from a different process. +func (c *metadataRESTClient) DeleteContextOperation(name string) *DeleteContextOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteContextOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteContextOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1780,6 +4644,7 @@ func (op *DeleteContextOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteContextOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1810,7 +4675,8 @@ func (op *DeleteContextOperation) Name() string { // DeleteExecutionOperation manages a long-running operation from DeleteExecution. type DeleteExecutionOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteExecutionOperation returns a new DeleteExecutionOperation from a given name. @@ -1821,10 +4687,21 @@ func (c *metadataGRPCClient) DeleteExecutionOperation(name string) *DeleteExecut } } +// DeleteExecutionOperation returns a new DeleteExecutionOperation from a given name. +// The name must be that of a previously created DeleteExecutionOperation, possibly from a different process. +func (c *metadataRESTClient) DeleteExecutionOperation(name string) *DeleteExecutionOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteExecutionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteExecutionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1838,6 +4715,7 @@ func (op *DeleteExecutionOperation) Wait(ctx context.Context, opts ...gax.CallOp // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteExecutionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1868,7 +4746,8 @@ func (op *DeleteExecutionOperation) Name() string { // DeleteMetadataStoreOperation manages a long-running operation from DeleteMetadataStore. type DeleteMetadataStoreOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteMetadataStoreOperation returns a new DeleteMetadataStoreOperation from a given name. @@ -1879,10 +4758,21 @@ func (c *metadataGRPCClient) DeleteMetadataStoreOperation(name string) *DeleteMe } } +// DeleteMetadataStoreOperation returns a new DeleteMetadataStoreOperation from a given name. +// The name must be that of a previously created DeleteMetadataStoreOperation, possibly from a different process. +func (c *metadataRESTClient) DeleteMetadataStoreOperation(name string) *DeleteMetadataStoreOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteMetadataStoreOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteMetadataStoreOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1896,6 +4786,7 @@ func (op *DeleteMetadataStoreOperation) Wait(ctx context.Context, opts ...gax.Ca // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteMetadataStoreOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1926,7 +4817,8 @@ func (op *DeleteMetadataStoreOperation) Name() string { // PurgeArtifactsOperation manages a long-running operation from PurgeArtifacts. type PurgeArtifactsOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // PurgeArtifactsOperation returns a new PurgeArtifactsOperation from a given name. @@ -1937,10 +4829,21 @@ func (c *metadataGRPCClient) PurgeArtifactsOperation(name string) *PurgeArtifact } } +// PurgeArtifactsOperation returns a new PurgeArtifactsOperation from a given name. +// The name must be that of a previously created PurgeArtifactsOperation, possibly from a different process. +func (c *metadataRESTClient) PurgeArtifactsOperation(name string) *PurgeArtifactsOperation { + override := fmt.Sprintf("/ui/%s", name) + return &PurgeArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *PurgeArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.PurgeArtifactsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.PurgeArtifactsResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1958,6 +4861,7 @@ func (op *PurgeArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOpt // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *PurgeArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.PurgeArtifactsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.PurgeArtifactsResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1995,7 +4899,8 @@ func (op *PurgeArtifactsOperation) Name() string { // PurgeContextsOperation manages a long-running operation from PurgeContexts. type PurgeContextsOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // PurgeContextsOperation returns a new PurgeContextsOperation from a given name. @@ -2006,10 +4911,21 @@ func (c *metadataGRPCClient) PurgeContextsOperation(name string) *PurgeContextsO } } +// PurgeContextsOperation returns a new PurgeContextsOperation from a given name. +// The name must be that of a previously created PurgeContextsOperation, possibly from a different process. +func (c *metadataRESTClient) PurgeContextsOperation(name string) *PurgeContextsOperation { + override := fmt.Sprintf("/ui/%s", name) + return &PurgeContextsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *PurgeContextsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.PurgeContextsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.PurgeContextsResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -2027,6 +4943,7 @@ func (op *PurgeContextsOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *PurgeContextsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.PurgeContextsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.PurgeContextsResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -2064,7 +4981,8 @@ func (op *PurgeContextsOperation) Name() string { // PurgeExecutionsOperation manages a long-running operation from PurgeExecutions. type PurgeExecutionsOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // PurgeExecutionsOperation returns a new PurgeExecutionsOperation from a given name. @@ -2075,10 +4993,21 @@ func (c *metadataGRPCClient) PurgeExecutionsOperation(name string) *PurgeExecuti } } +// PurgeExecutionsOperation returns a new PurgeExecutionsOperation from a given name. +// The name must be that of a previously created PurgeExecutionsOperation, possibly from a different process. +func (c *metadataRESTClient) PurgeExecutionsOperation(name string) *PurgeExecutionsOperation { + override := fmt.Sprintf("/ui/%s", name) + return &PurgeExecutionsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *PurgeExecutionsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.PurgeExecutionsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.PurgeExecutionsResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -2096,6 +5025,7 @@ func (op *PurgeExecutionsOperation) Wait(ctx context.Context, opts ...gax.CallOp // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *PurgeExecutionsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.PurgeExecutionsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.PurgeExecutionsResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/metadata_client_example_test.go b/aiplatform/apiv1beta1/metadata_client_example_test.go index 8da2edbc5663..78f8b72d45e9 100644 --- a/aiplatform/apiv1beta1/metadata_client_example_test.go +++ b/aiplatform/apiv1beta1/metadata_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewMetadataClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewMetadataClient() { _ = c } +func ExampleNewMetadataRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewMetadataRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleMetadataClient_CreateMetadataStore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleMetadataClient_CreateMetadataStore() { func ExampleMetadataClient_GetMetadataStore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleMetadataClient_GetMetadataStore() { func ExampleMetadataClient_ListMetadataStores() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleMetadataClient_ListMetadataStores() { func ExampleMetadataClient_DeleteMetadataStore() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +177,11 @@ func ExampleMetadataClient_DeleteMetadataStore() { func ExampleMetadataClient_CreateArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +202,11 @@ func ExampleMetadataClient_CreateArtifact() { func ExampleMetadataClient_GetArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -175,6 +227,11 @@ func ExampleMetadataClient_GetArtifact() { func ExampleMetadataClient_ListArtifacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -201,6 +258,11 @@ func ExampleMetadataClient_ListArtifacts() { func ExampleMetadataClient_UpdateArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -221,6 +283,11 @@ func ExampleMetadataClient_UpdateArtifact() { func ExampleMetadataClient_DeleteArtifact() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -244,6 +311,11 @@ func ExampleMetadataClient_DeleteArtifact() { func ExampleMetadataClient_PurgeArtifacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -269,6 +341,11 @@ func ExampleMetadataClient_PurgeArtifacts() { func ExampleMetadataClient_CreateContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +366,11 @@ func ExampleMetadataClient_CreateContext() { func ExampleMetadataClient_GetContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -309,6 +391,11 @@ func ExampleMetadataClient_GetContext() { func ExampleMetadataClient_ListContexts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -335,6 +422,11 @@ func ExampleMetadataClient_ListContexts() { func ExampleMetadataClient_UpdateContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -355,6 +447,11 @@ func ExampleMetadataClient_UpdateContext() { func ExampleMetadataClient_DeleteContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -378,6 +475,11 @@ func ExampleMetadataClient_DeleteContext() { func ExampleMetadataClient_PurgeContexts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -403,6 +505,11 @@ func ExampleMetadataClient_PurgeContexts() { func ExampleMetadataClient_AddContextArtifactsAndExecutions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -423,6 +530,11 @@ func ExampleMetadataClient_AddContextArtifactsAndExecutions() { func ExampleMetadataClient_AddContextChildren() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -443,6 +555,11 @@ func ExampleMetadataClient_AddContextChildren() { func ExampleMetadataClient_QueryContextLineageSubgraph() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -463,6 +580,11 @@ func ExampleMetadataClient_QueryContextLineageSubgraph() { func ExampleMetadataClient_CreateExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -483,6 +605,11 @@ func ExampleMetadataClient_CreateExecution() { func ExampleMetadataClient_GetExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -503,6 +630,11 @@ func ExampleMetadataClient_GetExecution() { func ExampleMetadataClient_ListExecutions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -529,6 +661,11 @@ func ExampleMetadataClient_ListExecutions() { func ExampleMetadataClient_UpdateExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -549,6 +686,11 @@ func ExampleMetadataClient_UpdateExecution() { func ExampleMetadataClient_DeleteExecution() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -572,6 +714,11 @@ func ExampleMetadataClient_DeleteExecution() { func ExampleMetadataClient_PurgeExecutions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -597,6 +744,11 @@ func ExampleMetadataClient_PurgeExecutions() { func ExampleMetadataClient_AddExecutionEvents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -617,6 +769,11 @@ func ExampleMetadataClient_AddExecutionEvents() { func ExampleMetadataClient_QueryExecutionInputsAndOutputs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -637,6 +794,11 @@ func ExampleMetadataClient_QueryExecutionInputsAndOutputs() { func ExampleMetadataClient_CreateMetadataSchema() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -657,6 +819,11 @@ func ExampleMetadataClient_CreateMetadataSchema() { func ExampleMetadataClient_GetMetadataSchema() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -677,6 +844,11 @@ func ExampleMetadataClient_GetMetadataSchema() { func ExampleMetadataClient_ListMetadataSchemas() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -703,6 +875,11 @@ func ExampleMetadataClient_ListMetadataSchemas() { func ExampleMetadataClient_QueryArtifactLineageSubgraph() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -723,6 +900,11 @@ func ExampleMetadataClient_QueryArtifactLineageSubgraph() { func ExampleMetadataClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -743,6 +925,11 @@ func ExampleMetadataClient_GetLocation() { func ExampleMetadataClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -769,6 +956,11 @@ func ExampleMetadataClient_ListLocations() { func ExampleMetadataClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -789,6 +981,11 @@ func ExampleMetadataClient_GetIamPolicy() { func ExampleMetadataClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -809,6 +1006,11 @@ func ExampleMetadataClient_SetIamPolicy() { func ExampleMetadataClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -829,6 +1031,11 @@ func ExampleMetadataClient_TestIamPermissions() { func ExampleMetadataClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -847,6 +1054,11 @@ func ExampleMetadataClient_CancelOperation() { func ExampleMetadataClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -865,6 +1077,11 @@ func ExampleMetadataClient_DeleteOperation() { func ExampleMetadataClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -885,6 +1102,11 @@ func ExampleMetadataClient_GetOperation() { func ExampleMetadataClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -911,6 +1133,11 @@ func ExampleMetadataClient_ListOperations() { func ExampleMetadataClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/migration_client.go b/aiplatform/apiv1beta1/migration_client.go index ac843d4b28de..fe3c4c1110fc 100644 --- a/aiplatform/apiv1beta1/migration_client.go +++ b/aiplatform/apiv1beta1/migration_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -86,6 +92,23 @@ func defaultMigrationCallOptions() *MigrationCallOptions { } } +func defaultMigrationRESTCallOptions() *MigrationCallOptions { + return &MigrationCallOptions{ + SearchMigratableResources: []gax.CallOption{}, + BatchMigrateResources: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalMigrationClient is an interface that defines the methods available from Vertex AI API. type internalMigrationClient interface { Close() error @@ -141,7 +164,8 @@ func (c *MigrationClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MigrationClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -312,7 +336,8 @@ func NewMigrationClient(ctx context.Context, opts ...option.ClientOption) (*Migr // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *migrationGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -332,6 +357,90 @@ func (c *migrationGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type migrationRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing MigrationClient + CallOptions **MigrationCallOptions +} + +// NewMigrationRESTClient creates a new migration service rest client. +// +// A service that migrates resources from automl.googleapis.com (at http://automl.googleapis.com), +// datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) to Vertex AI. +func NewMigrationRESTClient(ctx context.Context, opts ...option.ClientOption) (*MigrationClient, error) { + clientOpts := append(defaultMigrationRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultMigrationRESTCallOptions() + c := &migrationRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &MigrationClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultMigrationRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *migrationRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *migrationRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *migrationRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *migrationGRPCClient) SearchMigratableResources(ctx context.Context, req *aiplatformpb.SearchMigratableResourcesRequest, opts ...gax.CallOption) *MigratableResourceIterator { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -614,9 +723,767 @@ func (c *migrationGRPCClient) WaitOperation(ctx context.Context, req *longrunnin return resp, nil } +// SearchMigratableResources searches all of the resources in automl.googleapis.com (at http://automl.googleapis.com), +// datalabeling.googleapis.com (at http://datalabeling.googleapis.com) and ml.googleapis.com (at http://ml.googleapis.com) that can be migrated to +// Vertex AI’s given location. +func (c *migrationRESTClient) SearchMigratableResources(ctx context.Context, req *aiplatformpb.SearchMigratableResourcesRequest, opts ...gax.CallOption) *MigratableResourceIterator { + it := &MigratableResourceIterator{} + req = proto.Clone(req).(*aiplatformpb.SearchMigratableResourcesRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.MigratableResource, string, error) { + resp := &aiplatformpb.SearchMigratableResourcesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/migratableResources:search", req.GetParent()) + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMigratableResources(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// BatchMigrateResources batch migrates resources from ml.googleapis.com (at http://ml.googleapis.com), automl.googleapis.com (at http://automl.googleapis.com), +// and datalabeling.googleapis.com (at http://datalabeling.googleapis.com) to Vertex AI. +func (c *migrationRESTClient) BatchMigrateResources(ctx context.Context, req *aiplatformpb.BatchMigrateResourcesRequest, opts ...gax.CallOption) (*BatchMigrateResourcesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/migratableResources:batchMigrate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &BatchMigrateResourcesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *migrationRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *migrationRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *migrationRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *migrationRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *migrationRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *migrationRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *migrationRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *migrationRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *migrationRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *migrationRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // BatchMigrateResourcesOperation manages a long-running operation from BatchMigrateResources. type BatchMigrateResourcesOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // BatchMigrateResourcesOperation returns a new BatchMigrateResourcesOperation from a given name. @@ -627,10 +1494,21 @@ func (c *migrationGRPCClient) BatchMigrateResourcesOperation(name string) *Batch } } +// BatchMigrateResourcesOperation returns a new BatchMigrateResourcesOperation from a given name. +// The name must be that of a previously created BatchMigrateResourcesOperation, possibly from a different process. +func (c *migrationRESTClient) BatchMigrateResourcesOperation(name string) *BatchMigrateResourcesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &BatchMigrateResourcesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *BatchMigrateResourcesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchMigrateResourcesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.BatchMigrateResourcesResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -648,6 +1526,7 @@ func (op *BatchMigrateResourcesOperation) Wait(ctx context.Context, opts ...gax. // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *BatchMigrateResourcesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.BatchMigrateResourcesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.BatchMigrateResourcesResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/migration_client_example_test.go b/aiplatform/apiv1beta1/migration_client_example_test.go index 851409fb6117..dbdeaafa7e7c 100644 --- a/aiplatform/apiv1beta1/migration_client_example_test.go +++ b/aiplatform/apiv1beta1/migration_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewMigrationClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewMigrationClient() { _ = c } +func ExampleNewMigrationRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewMigrationRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleMigrationClient_SearchMigratableResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -67,6 +94,11 @@ func ExampleMigrationClient_SearchMigratableResources() { func ExampleMigrationClient_BatchMigrateResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -92,6 +124,11 @@ func ExampleMigrationClient_BatchMigrateResources() { func ExampleMigrationClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleMigrationClient_GetLocation() { func ExampleMigrationClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +180,11 @@ func ExampleMigrationClient_ListLocations() { func ExampleMigrationClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +205,11 @@ func ExampleMigrationClient_GetIamPolicy() { func ExampleMigrationClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -178,6 +230,11 @@ func ExampleMigrationClient_SetIamPolicy() { func ExampleMigrationClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -198,6 +255,11 @@ func ExampleMigrationClient_TestIamPermissions() { func ExampleMigrationClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -216,6 +278,11 @@ func ExampleMigrationClient_CancelOperation() { func ExampleMigrationClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -234,6 +301,11 @@ func ExampleMigrationClient_DeleteOperation() { func ExampleMigrationClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -254,6 +326,11 @@ func ExampleMigrationClient_GetOperation() { func ExampleMigrationClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -280,6 +357,11 @@ func ExampleMigrationClient_ListOperations() { func ExampleMigrationClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewMigrationClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/model_client.go b/aiplatform/apiv1beta1/model_client.go index 7c5fa68df0d7..ce54f4b248d8 100644 --- a/aiplatform/apiv1beta1/model_client.go +++ b/aiplatform/apiv1beta1/model_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -114,6 +120,37 @@ func defaultModelCallOptions() *ModelCallOptions { } } +func defaultModelRESTCallOptions() *ModelCallOptions { + return &ModelCallOptions{ + UploadModel: []gax.CallOption{}, + GetModel: []gax.CallOption{}, + ListModels: []gax.CallOption{}, + ListModelVersions: []gax.CallOption{}, + UpdateModel: []gax.CallOption{}, + UpdateExplanationDataset: []gax.CallOption{}, + DeleteModel: []gax.CallOption{}, + DeleteModelVersion: []gax.CallOption{}, + MergeVersionAliases: []gax.CallOption{}, + ExportModel: []gax.CallOption{}, + ImportModelEvaluation: []gax.CallOption{}, + BatchImportModelEvaluationSlices: []gax.CallOption{}, + GetModelEvaluation: []gax.CallOption{}, + ListModelEvaluations: []gax.CallOption{}, + GetModelEvaluationSlice: []gax.CallOption{}, + ListModelEvaluationSlices: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalModelClient is an interface that defines the methods available from Vertex AI API. type internalModelClient interface { Close() error @@ -186,7 +223,8 @@ func (c *ModelClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ModelClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -457,7 +495,8 @@ func NewModelClient(ctx context.Context, opts ...option.ClientOption) (*ModelCli // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *modelGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -477,6 +516,89 @@ func (c *modelGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type modelRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing ModelClient + CallOptions **ModelCallOptions +} + +// NewModelRESTClient creates a new model service rest client. +// +// A service for managing Vertex AI’s machine learning Models. +func NewModelRESTClient(ctx context.Context, opts ...option.ClientOption) (*ModelClient, error) { + clientOpts := append(defaultModelRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultModelRESTCallOptions() + c := &modelRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &ModelClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultModelRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *modelRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *modelRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *modelRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *modelGRPCClient) UploadModel(ctx context.Context, req *aiplatformpb.UploadModelRequest, opts ...gax.CallOption) (*UploadModelOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -1124,163 +1246,1918 @@ func (c *modelGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb. return resp, nil } -// DeleteModelOperation manages a long-running operation from DeleteModel. -type DeleteModelOperation struct { - lro *longrunning.Operation -} +// UploadModel uploads a Model artifact into Vertex AI. +func (c *modelRESTClient) UploadModel(ctx context.Context, req *aiplatformpb.UploadModelRequest, opts ...gax.CallOption) (*UploadModelOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } -// DeleteModelOperation returns a new DeleteModelOperation from a given name. -// The name must be that of a previously created DeleteModelOperation, possibly from a different process. -func (c *modelGRPCClient) DeleteModelOperation(name string) *DeleteModelOperation { - return &DeleteModelOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err } -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/models:upload", req.GetParent()) -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteModelOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err - } - return &meta, nil -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// Done reports whether the long-running operation has completed. -func (op *DeleteModelOperation) Done() bool { - return op.lro.Done() -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteModelOperation) Name() string { - return op.lro.Name() -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// DeleteModelVersionOperation manages a long-running operation from DeleteModelVersion. -type DeleteModelVersionOperation struct { - lro *longrunning.Operation -} + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } -// DeleteModelVersionOperation returns a new DeleteModelVersionOperation from a given name. -// The name must be that of a previously created DeleteModelVersionOperation, possibly from a different process. -func (c *modelGRPCClient) DeleteModelVersionOperation(name string) *DeleteModelVersionOperation { - return &DeleteModelVersionOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + return nil + }, opts...) + if e != nil { + return nil, e } -} -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteModelVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} - -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteModelVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UploadModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteModelVersionOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetModel gets a Model. +func (c *modelRESTClient) GetModel(ctx context.Context, req *aiplatformpb.GetModelRequest, opts ...gax.CallOption) (*aiplatformpb.Model, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeleteModelVersionOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteModelVersionOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetModel[0:len((*c.CallOptions).GetModel):len((*c.CallOptions).GetModel)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Model{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// ExportModelOperation manages a long-running operation from ExportModel. -type ExportModelOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// ExportModelOperation returns a new ExportModelOperation from a given name. -// The name must be that of a previously created ExportModelOperation, possibly from a different process. -func (c *modelGRPCClient) ExportModelOperation(name string) *ExportModelOperation { - return &ExportModelOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *ExportModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error) { - var resp aiplatformpb.ExportModelResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { - return nil, err + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + return resp, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *ExportModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error) { - var resp aiplatformpb.ExportModelResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { - return nil, err - } - if !op.Done() { - return nil, nil - } +// ListModels lists Models in a Location. +func (c *modelRESTClient) ListModels(ctx context.Context, req *aiplatformpb.ListModelsRequest, opts ...gax.CallOption) *ModelIterator { + it := &ModelIterator{} + req = proto.Clone(req).(*aiplatformpb.ListModelsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Model, string, error) { + resp := &aiplatformpb.ListModelsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/models", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetModels(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListModelVersions lists versions of the specified model. +func (c *modelRESTClient) ListModelVersions(ctx context.Context, req *aiplatformpb.ListModelVersionsRequest, opts ...gax.CallOption) *ModelIterator { + it := &ModelIterator{} + req = proto.Clone(req).(*aiplatformpb.ListModelVersionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Model, string, error) { + resp := &aiplatformpb.ListModelVersionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:listVersions", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetModels(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateModel updates a Model. +func (c *modelRESTClient) UpdateModel(ctx context.Context, req *aiplatformpb.UpdateModelRequest, opts ...gax.CallOption) (*aiplatformpb.Model, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetModel() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetModel().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "model.name", url.QueryEscape(req.GetModel().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateModel[0:len((*c.CallOptions).UpdateModel):len((*c.CallOptions).UpdateModel)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Model{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateExplanationDataset incrementally update the dataset used for an examples model. +func (c *modelRESTClient) UpdateExplanationDataset(ctx context.Context, req *aiplatformpb.UpdateExplanationDatasetRequest, opts ...gax.CallOption) (*UpdateExplanationDatasetOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:updateExplanationDataset", req.GetModel()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "model", url.QueryEscape(req.GetModel()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UpdateExplanationDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteModel deletes a Model. +// +// A model cannot be deleted if any Endpoint resource has a +// DeployedModel based on the model in its +// deployed_models field. +func (c *modelRESTClient) DeleteModel(ctx context.Context, req *aiplatformpb.DeleteModelRequest, opts ...gax.CallOption) (*DeleteModelOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteModelVersion deletes a Model version. +// +// Model version can only be deleted if there are no DeployedModels +// created from it. Deleting the only version in the Model is not allowed. Use +// DeleteModel for deleting the Model instead. +func (c *modelRESTClient) DeleteModelVersion(ctx context.Context, req *aiplatformpb.DeleteModelVersionRequest, opts ...gax.CallOption) (*DeleteModelVersionOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:deleteVersion", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteModelVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// MergeVersionAliases merges a set of aliases for a Model version. +func (c *modelRESTClient) MergeVersionAliases(ctx context.Context, req *aiplatformpb.MergeVersionAliasesRequest, opts ...gax.CallOption) (*aiplatformpb.Model, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:mergeVersionAliases", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).MergeVersionAliases[0:len((*c.CallOptions).MergeVersionAliases):len((*c.CallOptions).MergeVersionAliases)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Model{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ExportModel exports a trained, exportable Model to a location specified by the +// user. A Model is considered to be exportable if it has at least one +// [supported export format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats]. +func (c *modelRESTClient) ExportModel(ctx context.Context, req *aiplatformpb.ExportModelRequest, opts ...gax.CallOption) (*ExportModelOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:export", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &ExportModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ImportModelEvaluation imports an externally generated ModelEvaluation. +func (c *modelRESTClient) ImportModelEvaluation(ctx context.Context, req *aiplatformpb.ImportModelEvaluationRequest, opts ...gax.CallOption) (*aiplatformpb.ModelEvaluation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/evaluations:import", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ImportModelEvaluation[0:len((*c.CallOptions).ImportModelEvaluation):len((*c.CallOptions).ImportModelEvaluation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ModelEvaluation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchImportModelEvaluationSlices imports a list of externally generated ModelEvaluationSlice. +func (c *modelRESTClient) BatchImportModelEvaluationSlices(ctx context.Context, req *aiplatformpb.BatchImportModelEvaluationSlicesRequest, opts ...gax.CallOption) (*aiplatformpb.BatchImportModelEvaluationSlicesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/slices:batchImport", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).BatchImportModelEvaluationSlices[0:len((*c.CallOptions).BatchImportModelEvaluationSlices):len((*c.CallOptions).BatchImportModelEvaluationSlices)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.BatchImportModelEvaluationSlicesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetModelEvaluation gets a ModelEvaluation. +func (c *modelRESTClient) GetModelEvaluation(ctx context.Context, req *aiplatformpb.GetModelEvaluationRequest, opts ...gax.CallOption) (*aiplatformpb.ModelEvaluation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetModelEvaluation[0:len((*c.CallOptions).GetModelEvaluation):len((*c.CallOptions).GetModelEvaluation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ModelEvaluation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListModelEvaluations lists ModelEvaluations in a Model. +func (c *modelRESTClient) ListModelEvaluations(ctx context.Context, req *aiplatformpb.ListModelEvaluationsRequest, opts ...gax.CallOption) *ModelEvaluationIterator { + it := &ModelEvaluationIterator{} + req = proto.Clone(req).(*aiplatformpb.ListModelEvaluationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.ModelEvaluation, string, error) { + resp := &aiplatformpb.ListModelEvaluationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/evaluations", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetModelEvaluations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetModelEvaluationSlice gets a ModelEvaluationSlice. +func (c *modelRESTClient) GetModelEvaluationSlice(ctx context.Context, req *aiplatformpb.GetModelEvaluationSliceRequest, opts ...gax.CallOption) (*aiplatformpb.ModelEvaluationSlice, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetModelEvaluationSlice[0:len((*c.CallOptions).GetModelEvaluationSlice):len((*c.CallOptions).GetModelEvaluationSlice)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ModelEvaluationSlice{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListModelEvaluationSlices lists ModelEvaluationSlices in a ModelEvaluation. +func (c *modelRESTClient) ListModelEvaluationSlices(ctx context.Context, req *aiplatformpb.ListModelEvaluationSlicesRequest, opts ...gax.CallOption) *ModelEvaluationSliceIterator { + it := &ModelEvaluationSliceIterator{} + req = proto.Clone(req).(*aiplatformpb.ListModelEvaluationSlicesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.ModelEvaluationSlice, string, error) { + resp := &aiplatformpb.ListModelEvaluationSlicesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/slices", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetModelEvaluationSlices(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *modelRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *modelRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *modelRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *modelRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *modelRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *modelRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *modelRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *modelRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *modelRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *modelRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteModelOperation manages a long-running operation from DeleteModel. +type DeleteModelOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteModelOperation returns a new DeleteModelOperation from a given name. +// The name must be that of a previously created DeleteModelOperation, possibly from a different process. +func (c *modelGRPCClient) DeleteModelOperation(name string) *DeleteModelOperation { + return &DeleteModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteModelOperation returns a new DeleteModelOperation from a given name. +// The name must be that of a previously created DeleteModelOperation, possibly from a different process. +func (c *modelRESTClient) DeleteModelOperation(name string) *DeleteModelOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteModelOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteModelOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteModelOperation) Name() string { + return op.lro.Name() +} + +// DeleteModelVersionOperation manages a long-running operation from DeleteModelVersion. +type DeleteModelVersionOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteModelVersionOperation returns a new DeleteModelVersionOperation from a given name. +// The name must be that of a previously created DeleteModelVersionOperation, possibly from a different process. +func (c *modelGRPCClient) DeleteModelVersionOperation(name string) *DeleteModelVersionOperation { + return &DeleteModelVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteModelVersionOperation returns a new DeleteModelVersionOperation from a given name. +// The name must be that of a previously created DeleteModelVersionOperation, possibly from a different process. +func (c *modelRESTClient) DeleteModelVersionOperation(name string) *DeleteModelVersionOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteModelVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteModelVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteModelVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteModelVersionOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteModelVersionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteModelVersionOperation) Name() string { + return op.lro.Name() +} + +// ExportModelOperation manages a long-running operation from ExportModel. +type ExportModelOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ExportModelOperation returns a new ExportModelOperation from a given name. +// The name must be that of a previously created ExportModelOperation, possibly from a different process. +func (c *modelGRPCClient) ExportModelOperation(name string) *ExportModelOperation { + return &ExportModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ExportModelOperation returns a new ExportModelOperation from a given name. +// The name must be that of a previously created ExportModelOperation, possibly from a different process. +func (c *modelRESTClient) ExportModelOperation(name string) *ExportModelOperation { + override := fmt.Sprintf("/ui/%s", name) + return &ExportModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ExportModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.ExportModelResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ExportModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ExportModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.ExportModelResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } return &resp, nil } @@ -1311,7 +3188,8 @@ func (op *ExportModelOperation) Name() string { // UpdateExplanationDatasetOperation manages a long-running operation from UpdateExplanationDataset. type UpdateExplanationDatasetOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UpdateExplanationDatasetOperation returns a new UpdateExplanationDatasetOperation from a given name. @@ -1322,10 +3200,21 @@ func (c *modelGRPCClient) UpdateExplanationDatasetOperation(name string) *Update } } +// UpdateExplanationDatasetOperation returns a new UpdateExplanationDatasetOperation from a given name. +// The name must be that of a previously created UpdateExplanationDatasetOperation, possibly from a different process. +func (c *modelRESTClient) UpdateExplanationDatasetOperation(name string) *UpdateExplanationDatasetOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UpdateExplanationDatasetOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateExplanationDatasetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UpdateExplanationDatasetResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UpdateExplanationDatasetResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1343,6 +3232,7 @@ func (op *UpdateExplanationDatasetOperation) Wait(ctx context.Context, opts ...g // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UpdateExplanationDatasetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UpdateExplanationDatasetResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UpdateExplanationDatasetResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1380,7 +3270,8 @@ func (op *UpdateExplanationDatasetOperation) Name() string { // UploadModelOperation manages a long-running operation from UploadModel. type UploadModelOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UploadModelOperation returns a new UploadModelOperation from a given name. @@ -1391,10 +3282,21 @@ func (c *modelGRPCClient) UploadModelOperation(name string) *UploadModelOperatio } } +// UploadModelOperation returns a new UploadModelOperation from a given name. +// The name must be that of a previously created UploadModelOperation, possibly from a different process. +func (c *modelRESTClient) UploadModelOperation(name string) *UploadModelOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UploadModelOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UploadModelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UploadModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UploadModelResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1412,6 +3314,7 @@ func (op *UploadModelOperation) Wait(ctx context.Context, opts ...gax.CallOption // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UploadModelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.UploadModelResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.UploadModelResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/model_client_example_test.go b/aiplatform/apiv1beta1/model_client_example_test.go index 6a0478e91c66..7c80201e5b93 100644 --- a/aiplatform/apiv1beta1/model_client_example_test.go +++ b/aiplatform/apiv1beta1/model_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewModelClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewModelClient() { _ = c } +func ExampleNewModelRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewModelRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleModelClient_UploadModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleModelClient_UploadModel() { func ExampleModelClient_GetModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleModelClient_GetModel() { func ExampleModelClient_ListModels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleModelClient_ListModels() { func ExampleModelClient_ListModelVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +180,11 @@ func ExampleModelClient_ListModelVersions() { func ExampleModelClient_UpdateModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +205,11 @@ func ExampleModelClient_UpdateModel() { func ExampleModelClient_UpdateExplanationDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +235,11 @@ func ExampleModelClient_UpdateExplanationDataset() { func ExampleModelClient_DeleteModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -206,6 +263,11 @@ func ExampleModelClient_DeleteModel() { func ExampleModelClient_DeleteModelVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -229,6 +291,11 @@ func ExampleModelClient_DeleteModelVersion() { func ExampleModelClient_MergeVersionAliases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -249,6 +316,11 @@ func ExampleModelClient_MergeVersionAliases() { func ExampleModelClient_ExportModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -274,6 +346,11 @@ func ExampleModelClient_ExportModel() { func ExampleModelClient_ImportModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -294,6 +371,11 @@ func ExampleModelClient_ImportModelEvaluation() { func ExampleModelClient_BatchImportModelEvaluationSlices() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -314,6 +396,11 @@ func ExampleModelClient_BatchImportModelEvaluationSlices() { func ExampleModelClient_GetModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -334,6 +421,11 @@ func ExampleModelClient_GetModelEvaluation() { func ExampleModelClient_ListModelEvaluations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -360,6 +452,11 @@ func ExampleModelClient_ListModelEvaluations() { func ExampleModelClient_GetModelEvaluationSlice() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -380,6 +477,11 @@ func ExampleModelClient_GetModelEvaluationSlice() { func ExampleModelClient_ListModelEvaluationSlices() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -406,6 +508,11 @@ func ExampleModelClient_ListModelEvaluationSlices() { func ExampleModelClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -426,6 +533,11 @@ func ExampleModelClient_GetLocation() { func ExampleModelClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -452,6 +564,11 @@ func ExampleModelClient_ListLocations() { func ExampleModelClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -472,6 +589,11 @@ func ExampleModelClient_GetIamPolicy() { func ExampleModelClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -492,6 +614,11 @@ func ExampleModelClient_SetIamPolicy() { func ExampleModelClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -512,6 +639,11 @@ func ExampleModelClient_TestIamPermissions() { func ExampleModelClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -530,6 +662,11 @@ func ExampleModelClient_CancelOperation() { func ExampleModelClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -548,6 +685,11 @@ func ExampleModelClient_DeleteOperation() { func ExampleModelClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -568,6 +710,11 @@ func ExampleModelClient_GetOperation() { func ExampleModelClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. @@ -594,6 +741,11 @@ func ExampleModelClient_ListOperations() { func ExampleModelClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewModelClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/pipeline_client.go b/aiplatform/apiv1beta1/pipeline_client.go index b049d20482e9..354e0cd11ac7 100644 --- a/aiplatform/apiv1beta1/pipeline_client.go +++ b/aiplatform/apiv1beta1/pipeline_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -102,6 +108,31 @@ func defaultPipelineCallOptions() *PipelineCallOptions { } } +func defaultPipelineRESTCallOptions() *PipelineCallOptions { + return &PipelineCallOptions{ + CreateTrainingPipeline: []gax.CallOption{}, + GetTrainingPipeline: []gax.CallOption{}, + ListTrainingPipelines: []gax.CallOption{}, + DeleteTrainingPipeline: []gax.CallOption{}, + CancelTrainingPipeline: []gax.CallOption{}, + CreatePipelineJob: []gax.CallOption{}, + GetPipelineJob: []gax.CallOption{}, + ListPipelineJobs: []gax.CallOption{}, + DeletePipelineJob: []gax.CallOption{}, + CancelPipelineJob: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalPipelineClient is an interface that defines the methods available from Vertex AI API. type internalPipelineClient interface { Close() error @@ -167,7 +198,8 @@ func (c *PipelineClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PipelineClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -401,7 +433,8 @@ func NewPipelineClient(ctx context.Context, opts ...option.ClientOption) (*Pipel // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *pipelineGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -421,6 +454,91 @@ func (c *pipelineGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type pipelineRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing PipelineClient + CallOptions **PipelineCallOptions +} + +// NewPipelineRESTClient creates a new pipeline service rest client. +// +// A service for creating and managing Vertex AI’s pipelines. This includes both +// TrainingPipeline resources (used for AutoML and custom training) and +// PipelineJob resources (used for Vertex AI Pipelines). +func NewPipelineRESTClient(ctx context.Context, opts ...option.ClientOption) (*PipelineClient, error) { + clientOpts := append(defaultPipelineRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultPipelineRESTCallOptions() + c := &pipelineRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &PipelineClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultPipelineRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *pipelineRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *pipelineRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *pipelineRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *pipelineGRPCClient) CreateTrainingPipeline(ctx context.Context, req *aiplatformpb.CreateTrainingPipelineRequest, opts ...gax.CallOption) (*aiplatformpb.TrainingPipeline, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -881,74 +999,1344 @@ func (c *pipelineGRPCClient) WaitOperation(ctx context.Context, req *longrunning return resp, nil } -// DeletePipelineJobOperation manages a long-running operation from DeletePipelineJob. -type DeletePipelineJobOperation struct { - lro *longrunning.Operation -} +// CreateTrainingPipeline creates a TrainingPipeline. A created TrainingPipeline right away will be +// attempted to be run. +func (c *pipelineRESTClient) CreateTrainingPipeline(ctx context.Context, req *aiplatformpb.CreateTrainingPipelineRequest, opts ...gax.CallOption) (*aiplatformpb.TrainingPipeline, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTrainingPipeline() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } -// DeletePipelineJobOperation returns a new DeletePipelineJobOperation from a given name. -// The name must be that of a previously created DeletePipelineJobOperation, possibly from a different process. -func (c *pipelineGRPCClient) DeletePipelineJobOperation(name string) *DeletePipelineJobOperation { - return &DeletePipelineJobOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err } -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/trainingPipelines", req.GetParent()) -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeletePipelineJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeletePipelineJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTrainingPipeline[0:len((*c.CallOptions).CreateTrainingPipeline):len((*c.CallOptions).CreateTrainingPipeline)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TrainingPipeline{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeletePipelineJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetTrainingPipeline gets a TrainingPipeline. +func (c *pipelineRESTClient) GetTrainingPipeline(ctx context.Context, req *aiplatformpb.GetTrainingPipelineRequest, opts ...gax.CallOption) (*aiplatformpb.TrainingPipeline, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *DeletePipelineJobOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeletePipelineJobOperation) Name() string { - return op.lro.Name() + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTrainingPipeline[0:len((*c.CallOptions).GetTrainingPipeline):len((*c.CallOptions).GetTrainingPipeline)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TrainingPipeline{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// DeleteTrainingPipelineOperation manages a long-running operation from DeleteTrainingPipeline. -type DeleteTrainingPipelineOperation struct { - lro *longrunning.Operation +// ListTrainingPipelines lists TrainingPipelines in a Location. +func (c *pipelineRESTClient) ListTrainingPipelines(ctx context.Context, req *aiplatformpb.ListTrainingPipelinesRequest, opts ...gax.CallOption) *TrainingPipelineIterator { + it := &TrainingPipelineIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTrainingPipelinesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TrainingPipeline, string, error) { + resp := &aiplatformpb.ListTrainingPipelinesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/trainingPipelines", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTrainingPipelines(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it } -// DeleteTrainingPipelineOperation returns a new DeleteTrainingPipelineOperation from a given name. -// The name must be that of a previously created DeleteTrainingPipelineOperation, possibly from a different process. -func (c *pipelineGRPCClient) DeleteTrainingPipelineOperation(name string) *DeleteTrainingPipelineOperation { +// DeleteTrainingPipeline deletes a TrainingPipeline. +func (c *pipelineRESTClient) DeleteTrainingPipeline(ctx context.Context, req *aiplatformpb.DeleteTrainingPipelineRequest, opts ...gax.CallOption) (*DeleteTrainingPipelineOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) return &DeleteTrainingPipelineOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CancelTrainingPipeline cancels a TrainingPipeline. +// Starts asynchronous cancellation on the TrainingPipeline. The server +// makes a best effort to cancel the pipeline, but success is not +// guaranteed. Clients can use PipelineService.GetTrainingPipeline or +// other methods to check whether the cancellation succeeded or whether the +// pipeline completed despite cancellation. On successful cancellation, +// the TrainingPipeline is not deleted; instead it becomes a pipeline with +// a TrainingPipeline.error value with a google.rpc.Status.code of 1, +// corresponding to Code.CANCELLED, and TrainingPipeline.state is set to +// CANCELLED. +func (c *pipelineRESTClient) CancelTrainingPipeline(ctx context.Context, req *aiplatformpb.CancelTrainingPipelineRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreatePipelineJob creates a PipelineJob. A PipelineJob will run immediately when created. +func (c *pipelineRESTClient) CreatePipelineJob(ctx context.Context, req *aiplatformpb.CreatePipelineJobRequest, opts ...gax.CallOption) (*aiplatformpb.PipelineJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetPipelineJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/pipelineJobs", req.GetParent()) + + params := url.Values{} + if req.GetPipelineJobId() != "" { + params.Add("pipelineJobId", fmt.Sprintf("%v", req.GetPipelineJobId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreatePipelineJob[0:len((*c.CallOptions).CreatePipelineJob):len((*c.CallOptions).CreatePipelineJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.PipelineJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetPipelineJob gets a PipelineJob. +func (c *pipelineRESTClient) GetPipelineJob(ctx context.Context, req *aiplatformpb.GetPipelineJobRequest, opts ...gax.CallOption) (*aiplatformpb.PipelineJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetPipelineJob[0:len((*c.CallOptions).GetPipelineJob):len((*c.CallOptions).GetPipelineJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.PipelineJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListPipelineJobs lists PipelineJobs in a Location. +func (c *pipelineRESTClient) ListPipelineJobs(ctx context.Context, req *aiplatformpb.ListPipelineJobsRequest, opts ...gax.CallOption) *PipelineJobIterator { + it := &PipelineJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListPipelineJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.PipelineJob, string, error) { + resp := &aiplatformpb.ListPipelineJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/pipelineJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetPipelineJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeletePipelineJob deletes a PipelineJob. +func (c *pipelineRESTClient) DeletePipelineJob(ctx context.Context, req *aiplatformpb.DeletePipelineJobRequest, opts ...gax.CallOption) (*DeletePipelineJobOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeletePipelineJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CancelPipelineJob cancels a PipelineJob. +// Starts asynchronous cancellation on the PipelineJob. The server +// makes a best effort to cancel the pipeline, but success is not +// guaranteed. Clients can use PipelineService.GetPipelineJob or +// other methods to check whether the cancellation succeeded or whether the +// pipeline completed despite cancellation. On successful cancellation, +// the PipelineJob is not deleted; instead it becomes a pipeline with +// a PipelineJob.error value with a google.rpc.Status.code of 1, +// corresponding to Code.CANCELLED, and PipelineJob.state is set to +// CANCELLED. +func (c *pipelineRESTClient) CancelPipelineJob(ctx context.Context, req *aiplatformpb.CancelPipelineJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetLocation gets information about a location. +func (c *pipelineRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *pipelineRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *pipelineRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *pipelineRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *pipelineRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *pipelineRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *pipelineRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *pipelineRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *pipelineRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *pipelineRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeletePipelineJobOperation manages a long-running operation from DeletePipelineJob. +type DeletePipelineJobOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeletePipelineJobOperation returns a new DeletePipelineJobOperation from a given name. +// The name must be that of a previously created DeletePipelineJobOperation, possibly from a different process. +func (c *pipelineGRPCClient) DeletePipelineJobOperation(name string) *DeletePipelineJobOperation { + return &DeletePipelineJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeletePipelineJobOperation returns a new DeletePipelineJobOperation from a given name. +// The name must be that of a previously created DeletePipelineJobOperation, possibly from a different process. +func (c *pipelineRESTClient) DeletePipelineJobOperation(name string) *DeletePipelineJobOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeletePipelineJobOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeletePipelineJobOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeletePipelineJobOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeletePipelineJobOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeletePipelineJobOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeletePipelineJobOperation) Name() string { + return op.lro.Name() +} + +// DeleteTrainingPipelineOperation manages a long-running operation from DeleteTrainingPipeline. +type DeleteTrainingPipelineOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteTrainingPipelineOperation returns a new DeleteTrainingPipelineOperation from a given name. +// The name must be that of a previously created DeleteTrainingPipelineOperation, possibly from a different process. +func (c *pipelineGRPCClient) DeleteTrainingPipelineOperation(name string) *DeleteTrainingPipelineOperation { + return &DeleteTrainingPipelineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteTrainingPipelineOperation returns a new DeleteTrainingPipelineOperation from a given name. +// The name must be that of a previously created DeleteTrainingPipelineOperation, possibly from a different process. +func (c *pipelineRESTClient) DeleteTrainingPipelineOperation(name string) *DeleteTrainingPipelineOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteTrainingPipelineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, } } @@ -956,6 +2344,7 @@ func (c *pipelineGRPCClient) DeleteTrainingPipelineOperation(name string) *Delet // // See documentation of Poll for error-handling information. func (op *DeleteTrainingPipelineOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -969,6 +2358,7 @@ func (op *DeleteTrainingPipelineOperation) Wait(ctx context.Context, opts ...gax // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteTrainingPipelineOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } diff --git a/aiplatform/apiv1beta1/pipeline_client_example_test.go b/aiplatform/apiv1beta1/pipeline_client_example_test.go index 1dd964537ce7..5a8cc4fcfa96 100644 --- a/aiplatform/apiv1beta1/pipeline_client_example_test.go +++ b/aiplatform/apiv1beta1/pipeline_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewPipelineClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewPipelineClient() { _ = c } +func ExampleNewPipelineRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewPipelineRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExamplePipelineClient_CreateTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +88,11 @@ func ExamplePipelineClient_CreateTrainingPipeline() { func ExamplePipelineClient_GetTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +113,11 @@ func ExamplePipelineClient_GetTrainingPipeline() { func ExamplePipelineClient_ListTrainingPipelines() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +144,11 @@ func ExamplePipelineClient_ListTrainingPipelines() { func ExamplePipelineClient_DeleteTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +172,11 @@ func ExamplePipelineClient_DeleteTrainingPipeline() { func ExamplePipelineClient_CancelTrainingPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -148,6 +195,11 @@ func ExamplePipelineClient_CancelTrainingPipeline() { func ExamplePipelineClient_CreatePipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -168,6 +220,11 @@ func ExamplePipelineClient_CreatePipelineJob() { func ExamplePipelineClient_GetPipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +245,11 @@ func ExamplePipelineClient_GetPipelineJob() { func ExamplePipelineClient_ListPipelineJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +276,11 @@ func ExamplePipelineClient_ListPipelineJobs() { func ExamplePipelineClient_DeletePipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -237,6 +304,11 @@ func ExamplePipelineClient_DeletePipelineJob() { func ExamplePipelineClient_CancelPipelineJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -255,6 +327,11 @@ func ExamplePipelineClient_CancelPipelineJob() { func ExamplePipelineClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -275,6 +352,11 @@ func ExamplePipelineClient_GetLocation() { func ExamplePipelineClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -301,6 +383,11 @@ func ExamplePipelineClient_ListLocations() { func ExamplePipelineClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +408,11 @@ func ExamplePipelineClient_GetIamPolicy() { func ExamplePipelineClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -341,6 +433,11 @@ func ExamplePipelineClient_SetIamPolicy() { func ExamplePipelineClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -361,6 +458,11 @@ func ExamplePipelineClient_TestIamPermissions() { func ExamplePipelineClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -379,6 +481,11 @@ func ExamplePipelineClient_CancelOperation() { func ExamplePipelineClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -397,6 +504,11 @@ func ExamplePipelineClient_DeleteOperation() { func ExamplePipelineClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -417,6 +529,11 @@ func ExamplePipelineClient_GetOperation() { func ExamplePipelineClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. @@ -443,6 +560,11 @@ func ExamplePipelineClient_ListOperations() { func ExamplePipelineClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPipelineClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/prediction_client.go b/aiplatform/apiv1beta1/prediction_client.go index f3daada95613..b27a60c1eaa4 100644 --- a/aiplatform/apiv1beta1/prediction_client.go +++ b/aiplatform/apiv1beta1/prediction_client.go @@ -17,17 +17,22 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" httpbodypb "google.golang.org/genproto/googleapis/api/httpbody" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" @@ -35,6 +40,7 @@ import ( longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -87,6 +93,24 @@ func defaultPredictionCallOptions() *PredictionCallOptions { } } +func defaultPredictionRESTCallOptions() *PredictionCallOptions { + return &PredictionCallOptions{ + Predict: []gax.CallOption{}, + RawPredict: []gax.CallOption{}, + Explain: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalPredictionClient is an interface that defines the methods available from Vertex AI API. type internalPredictionClient interface { Close() error @@ -136,7 +160,8 @@ func (c *PredictionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PredictionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -150,11 +175,11 @@ func (c *PredictionClient) Predict(ctx context.Context, req *aiplatformpb.Predic // // The response includes the following HTTP headers: // -// X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this -// prediction. +// X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this +// prediction. // -// X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel -// that served this prediction. +// X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel +// that served this prediction. func (c *PredictionClient) RawPredict(ctx context.Context, req *aiplatformpb.RawPredictRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { return c.internalClient.RawPredict(ctx, req, opts...) } @@ -303,7 +328,8 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *predictionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -323,6 +349,74 @@ func (c *predictionGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type predictionRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing PredictionClient + CallOptions **PredictionCallOptions +} + +// NewPredictionRESTClient creates a new prediction service rest client. +// +// A service for online predictions and explanations. +func NewPredictionRESTClient(ctx context.Context, opts ...option.ClientOption) (*PredictionClient, error) { + clientOpts := append(defaultPredictionRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultPredictionRESTCallOptions() + c := &predictionRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &PredictionClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultPredictionRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *predictionRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *predictionRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *predictionRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *predictionGRPCClient) Predict(ctx context.Context, req *aiplatformpb.PredictRequest, opts ...gax.CallOption) (*aiplatformpb.PredictResponse, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -601,3 +695,805 @@ func (c *predictionGRPCClient) WaitOperation(ctx context.Context, req *longrunni } return resp, nil } + +// Predict perform an online prediction. +func (c *predictionRESTClient) Predict(ctx context.Context, req *aiplatformpb.PredictRequest, opts ...gax.CallOption) (*aiplatformpb.PredictResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:predict", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Predict[0:len((*c.CallOptions).Predict):len((*c.CallOptions).Predict)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.PredictResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RawPredict perform an online prediction with an arbitrary HTTP payload. +// +// The response includes the following HTTP headers: +// +// X-Vertex-AI-Endpoint-Id: ID of the Endpoint that served this +// prediction. +// +// X-Vertex-AI-Deployed-Model-Id: ID of the Endpoint’s DeployedModel +// that served this prediction. +func (c *predictionRESTClient) RawPredict(ctx context.Context, req *aiplatformpb.RawPredictRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:rawPredict", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).RawPredict[0:len((*c.CallOptions).RawPredict):len((*c.CallOptions).RawPredict)], opts...) + resp := &httpbodypb.HttpBody{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + resp.Data = buf + if headers := httpRsp.Header; len(headers["Content-Type"]) > 0 { + resp.ContentType = headers["Content-Type"][0] + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// Explain perform an online explanation. +// +// If deployed_model_id is specified, +// the corresponding DeployModel must have +// explanation_spec +// populated. If deployed_model_id +// is not specified, all DeployedModels must have +// explanation_spec +// populated. Only deployed AutoML tabular Models have +// explanation_spec. +func (c *predictionRESTClient) Explain(ctx context.Context, req *aiplatformpb.ExplainRequest, opts ...gax.CallOption) (*aiplatformpb.ExplainResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:explain", req.GetEndpoint()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint", url.QueryEscape(req.GetEndpoint()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Explain[0:len((*c.CallOptions).Explain):len((*c.CallOptions).Explain)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ExplainResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *predictionRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *predictionRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *predictionRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *predictionRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *predictionRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *predictionRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *predictionRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *predictionRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *predictionRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *predictionRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} diff --git a/aiplatform/apiv1beta1/prediction_client_example_test.go b/aiplatform/apiv1beta1/prediction_client_example_test.go index b0c305956b68..8011d3ebbaea 100644 --- a/aiplatform/apiv1beta1/prediction_client_example_test.go +++ b/aiplatform/apiv1beta1/prediction_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewPredictionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewPredictionClient() { _ = c } +func ExampleNewPredictionRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewPredictionRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExamplePredictionClient_Predict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +88,11 @@ func ExamplePredictionClient_Predict() { func ExamplePredictionClient_RawPredict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +113,11 @@ func ExamplePredictionClient_RawPredict() { func ExamplePredictionClient_Explain() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +138,11 @@ func ExamplePredictionClient_Explain() { func ExamplePredictionClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -121,6 +163,11 @@ func ExamplePredictionClient_GetLocation() { func ExamplePredictionClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +194,11 @@ func ExamplePredictionClient_ListLocations() { func ExamplePredictionClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +219,11 @@ func ExamplePredictionClient_GetIamPolicy() { func ExamplePredictionClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -187,6 +244,11 @@ func ExamplePredictionClient_SetIamPolicy() { func ExamplePredictionClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +269,11 @@ func ExamplePredictionClient_TestIamPermissions() { func ExamplePredictionClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +292,11 @@ func ExamplePredictionClient_CancelOperation() { func ExamplePredictionClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -243,6 +315,11 @@ func ExamplePredictionClient_DeleteOperation() { func ExamplePredictionClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -263,6 +340,11 @@ func ExamplePredictionClient_GetOperation() { func ExamplePredictionClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +371,11 @@ func ExamplePredictionClient_ListOperations() { func ExamplePredictionClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/specialist_pool_client.go b/aiplatform/apiv1beta1/specialist_pool_client.go index 09bf576e0bf1..08d95ba8e934 100644 --- a/aiplatform/apiv1beta1/specialist_pool_client.go +++ b/aiplatform/apiv1beta1/specialist_pool_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -92,6 +98,26 @@ func defaultSpecialistPoolCallOptions() *SpecialistPoolCallOptions { } } +func defaultSpecialistPoolRESTCallOptions() *SpecialistPoolCallOptions { + return &SpecialistPoolCallOptions{ + CreateSpecialistPool: []gax.CallOption{}, + GetSpecialistPool: []gax.CallOption{}, + ListSpecialistPools: []gax.CallOption{}, + DeleteSpecialistPool: []gax.CallOption{}, + UpdateSpecialistPool: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalSpecialistPoolClient is an interface that defines the methods available from Vertex AI API. type internalSpecialistPoolClient interface { Close() error @@ -156,7 +182,8 @@ func (c *SpecialistPoolClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SpecialistPoolClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -355,7 +382,8 @@ func NewSpecialistPoolClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *specialistPoolGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -375,6 +403,94 @@ func (c *specialistPoolGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type specialistPoolRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing SpecialistPoolClient + CallOptions **SpecialistPoolCallOptions +} + +// NewSpecialistPoolRESTClient creates a new specialist pool service rest client. +// +// A service for creating and managing Customer SpecialistPools. +// When customers start Data Labeling jobs, they can reuse/create Specialist +// Pools to bring their own Specialists to label the data. +// Customers can add/remove Managers for the Specialist Pool on Cloud console, +// then Managers will get email notifications to manage Specialists and tasks on +// CrowdCompute console. +func NewSpecialistPoolRESTClient(ctx context.Context, opts ...option.ClientOption) (*SpecialistPoolClient, error) { + clientOpts := append(defaultSpecialistPoolRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultSpecialistPoolRESTCallOptions() + c := &specialistPoolRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &SpecialistPoolClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultSpecialistPoolRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *specialistPoolRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *specialistPoolRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *specialistPoolRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *specialistPoolGRPCClient) CreateSpecialistPool(ctx context.Context, req *aiplatformpb.CreateSpecialistPoolRequest, opts ...gax.CallOption) (*CreateSpecialistPoolOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -732,150 +848,1146 @@ func (c *specialistPoolGRPCClient) WaitOperation(ctx context.Context, req *longr return resp, nil } -// CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool. -type CreateSpecialistPoolOperation struct { - lro *longrunning.Operation -} - -// CreateSpecialistPoolOperation returns a new CreateSpecialistPoolOperation from a given name. -// The name must be that of a previously created CreateSpecialistPoolOperation, possibly from a different process. -func (c *specialistPoolGRPCClient) CreateSpecialistPoolOperation(name string) *CreateSpecialistPoolOperation { - return &CreateSpecialistPoolOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { - var resp aiplatformpb.SpecialistPool - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateSpecialistPool creates a SpecialistPool. +func (c *specialistPoolRESTClient) CreateSpecialistPool(ctx context.Context, req *aiplatformpb.CreateSpecialistPoolRequest, opts ...gax.CallOption) (*CreateSpecialistPoolOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetSpecialistPool() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { - var resp aiplatformpb.SpecialistPool - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/specialistPools", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateSpecialistPoolOperation) Metadata() (*aiplatformpb.CreateSpecialistPoolOperationMetadata, error) { - var meta aiplatformpb.CreateSpecialistPoolOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetSpecialistPool gets a SpecialistPool. +func (c *specialistPoolRESTClient) GetSpecialistPool(ctx context.Context, req *aiplatformpb.GetSpecialistPoolRequest, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *CreateSpecialistPoolOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateSpecialistPoolOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetSpecialistPool[0:len((*c.CallOptions).GetSpecialistPool):len((*c.CallOptions).GetSpecialistPool)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.SpecialistPool{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteSpecialistPoolOperation manages a long-running operation from DeleteSpecialistPool. -type DeleteSpecialistPoolOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteSpecialistPoolOperation returns a new DeleteSpecialistPoolOperation from a given name. -// The name must be that of a previously created DeleteSpecialistPoolOperation, possibly from a different process. -func (c *specialistPoolGRPCClient) DeleteSpecialistPoolOperation(name string) *DeleteSpecialistPoolOperation { - return &DeleteSpecialistPoolOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) -} + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteSpecialistPoolOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err + return nil + }, opts...) + if e != nil { + return nil, e } - return &meta, nil + return resp, nil } -// Done reports whether the long-running operation has completed. -func (op *DeleteSpecialistPoolOperation) Done() bool { - return op.lro.Done() -} +// ListSpecialistPools lists SpecialistPools in a Location. +func (c *specialistPoolRESTClient) ListSpecialistPools(ctx context.Context, req *aiplatformpb.ListSpecialistPoolsRequest, opts ...gax.CallOption) *SpecialistPoolIterator { + it := &SpecialistPoolIterator{} + req = proto.Clone(req).(*aiplatformpb.ListSpecialistPoolsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.SpecialistPool, string, error) { + resp := &aiplatformpb.ListSpecialistPoolsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/specialistPools", req.GetParent()) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteSpecialistPoolOperation) Name() string { - return op.lro.Name() -} + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } -// UpdateSpecialistPoolOperation manages a long-running operation from UpdateSpecialistPool. -type UpdateSpecialistPoolOperation struct { - lro *longrunning.Operation -} + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetSpecialistPools(), resp.GetNextPageToken(), nil + } -// UpdateSpecialistPoolOperation returns a new UpdateSpecialistPoolOperation from a given name. -// The name must be that of a previously created UpdateSpecialistPoolOperation, possibly from a different process. -func (c *specialistPoolGRPCClient) UpdateSpecialistPoolOperation(name string) *UpdateSpecialistPoolOperation { - return &UpdateSpecialistPoolOperation{ + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteSpecialistPool deletes a SpecialistPool as well as all Specialists in the pool. +func (c *specialistPoolRESTClient) DeleteSpecialistPool(ctx context.Context, req *aiplatformpb.DeleteSpecialistPoolRequest, opts ...gax.CallOption) (*DeleteSpecialistPoolOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UpdateSpecialistPool updates a SpecialistPool. +func (c *specialistPoolRESTClient) UpdateSpecialistPool(ctx context.Context, req *aiplatformpb.UpdateSpecialistPoolRequest, opts ...gax.CallOption) (*UpdateSpecialistPoolOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetSpecialistPool() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetSpecialistPool().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "specialist_pool.name", url.QueryEscape(req.GetSpecialistPool().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UpdateSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *specialistPoolRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *specialistPoolRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *specialistPoolRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *specialistPoolRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *specialistPoolRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *specialistPoolRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *specialistPoolRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *specialistPoolRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *specialistPoolRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *specialistPoolRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool. +type CreateSpecialistPoolOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateSpecialistPoolOperation returns a new CreateSpecialistPoolOperation from a given name. +// The name must be that of a previously created CreateSpecialistPoolOperation, possibly from a different process. +func (c *specialistPoolGRPCClient) CreateSpecialistPoolOperation(name string) *CreateSpecialistPoolOperation { + return &CreateSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateSpecialistPoolOperation returns a new CreateSpecialistPoolOperation from a given name. +// The name must be that of a previously created CreateSpecialistPoolOperation, possibly from a different process. +func (c *specialistPoolRESTClient) CreateSpecialistPoolOperation(name string) *CreateSpecialistPoolOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.SpecialistPool + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.SpecialistPool + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateSpecialistPoolOperation) Metadata() (*aiplatformpb.CreateSpecialistPoolOperationMetadata, error) { + var meta aiplatformpb.CreateSpecialistPoolOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateSpecialistPoolOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateSpecialistPoolOperation) Name() string { + return op.lro.Name() +} + +// DeleteSpecialistPoolOperation manages a long-running operation from DeleteSpecialistPool. +type DeleteSpecialistPoolOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteSpecialistPoolOperation returns a new DeleteSpecialistPoolOperation from a given name. +// The name must be that of a previously created DeleteSpecialistPoolOperation, possibly from a different process. +func (c *specialistPoolGRPCClient) DeleteSpecialistPoolOperation(name string) *DeleteSpecialistPoolOperation { + return &DeleteSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteSpecialistPoolOperation returns a new DeleteSpecialistPoolOperation from a given name. +// The name must be that of a previously created DeleteSpecialistPoolOperation, possibly from a different process. +func (c *specialistPoolRESTClient) DeleteSpecialistPoolOperation(name string) *DeleteSpecialistPoolOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteSpecialistPoolOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteSpecialistPoolOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteSpecialistPoolOperation) Name() string { + return op.lro.Name() +} + +// UpdateSpecialistPoolOperation manages a long-running operation from UpdateSpecialistPool. +type UpdateSpecialistPoolOperation struct { + lro *longrunning.Operation + pollPath string +} + +// UpdateSpecialistPoolOperation returns a new UpdateSpecialistPoolOperation from a given name. +// The name must be that of a previously created UpdateSpecialistPoolOperation, possibly from a different process. +func (c *specialistPoolGRPCClient) UpdateSpecialistPoolOperation(name string) *UpdateSpecialistPoolOperation { + return &UpdateSpecialistPoolOperation{ lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), } } +// UpdateSpecialistPoolOperation returns a new UpdateSpecialistPoolOperation from a given name. +// The name must be that of a previously created UpdateSpecialistPoolOperation, possibly from a different process. +func (c *specialistPoolRESTClient) UpdateSpecialistPoolOperation(name string) *UpdateSpecialistPoolOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UpdateSpecialistPoolOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.SpecialistPool if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -893,6 +2005,7 @@ func (op *UpdateSpecialistPoolOperation) Wait(ctx context.Context, opts ...gax.C // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UpdateSpecialistPoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SpecialistPool, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.SpecialistPool if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/specialist_pool_client_example_test.go b/aiplatform/apiv1beta1/specialist_pool_client_example_test.go index 4d4e3b2bee35..afbea176ef29 100644 --- a/aiplatform/apiv1beta1/specialist_pool_client_example_test.go +++ b/aiplatform/apiv1beta1/specialist_pool_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewSpecialistPoolClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewSpecialistPoolClient() { _ = c } +func ExampleNewSpecialistPoolRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewSpecialistPoolRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleSpecialistPoolClient_CreateSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleSpecialistPoolClient_CreateSpecialistPool() { func ExampleSpecialistPoolClient_GetSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleSpecialistPoolClient_GetSpecialistPool() { func ExampleSpecialistPoolClient_ListSpecialistPools() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +149,11 @@ func ExampleSpecialistPoolClient_ListSpecialistPools() { func ExampleSpecialistPoolClient_DeleteSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +177,11 @@ func ExampleSpecialistPoolClient_DeleteSpecialistPool() { func ExampleSpecialistPoolClient_UpdateSpecialistPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +207,11 @@ func ExampleSpecialistPoolClient_UpdateSpecialistPool() { func ExampleSpecialistPoolClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +232,11 @@ func ExampleSpecialistPoolClient_GetLocation() { func ExampleSpecialistPoolClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -206,6 +263,11 @@ func ExampleSpecialistPoolClient_ListLocations() { func ExampleSpecialistPoolClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +288,11 @@ func ExampleSpecialistPoolClient_GetIamPolicy() { func ExampleSpecialistPoolClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +313,11 @@ func ExampleSpecialistPoolClient_SetIamPolicy() { func ExampleSpecialistPoolClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +338,11 @@ func ExampleSpecialistPoolClient_TestIamPermissions() { func ExampleSpecialistPoolClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -284,6 +361,11 @@ func ExampleSpecialistPoolClient_CancelOperation() { func ExampleSpecialistPoolClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +384,11 @@ func ExampleSpecialistPoolClient_DeleteOperation() { func ExampleSpecialistPoolClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +409,11 @@ func ExampleSpecialistPoolClient_GetOperation() { func ExampleSpecialistPoolClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. @@ -348,6 +440,11 @@ func ExampleSpecialistPoolClient_ListOperations() { func ExampleSpecialistPoolClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewSpecialistPoolClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/tensorboard_client.go b/aiplatform/apiv1beta1/tensorboard_client.go index 54f840672e34..22be003d14c8 100644 --- a/aiplatform/apiv1beta1/tensorboard_client.go +++ b/aiplatform/apiv1beta1/tensorboard_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -138,6 +144,49 @@ func defaultTensorboardCallOptions() *TensorboardCallOptions { } } +func defaultTensorboardRESTCallOptions() *TensorboardCallOptions { + return &TensorboardCallOptions{ + CreateTensorboard: []gax.CallOption{}, + GetTensorboard: []gax.CallOption{}, + UpdateTensorboard: []gax.CallOption{}, + ListTensorboards: []gax.CallOption{}, + DeleteTensorboard: []gax.CallOption{}, + CreateTensorboardExperiment: []gax.CallOption{}, + GetTensorboardExperiment: []gax.CallOption{}, + UpdateTensorboardExperiment: []gax.CallOption{}, + ListTensorboardExperiments: []gax.CallOption{}, + DeleteTensorboardExperiment: []gax.CallOption{}, + CreateTensorboardRun: []gax.CallOption{}, + BatchCreateTensorboardRuns: []gax.CallOption{}, + GetTensorboardRun: []gax.CallOption{}, + UpdateTensorboardRun: []gax.CallOption{}, + ListTensorboardRuns: []gax.CallOption{}, + DeleteTensorboardRun: []gax.CallOption{}, + BatchCreateTensorboardTimeSeries: []gax.CallOption{}, + CreateTensorboardTimeSeries: []gax.CallOption{}, + GetTensorboardTimeSeries: []gax.CallOption{}, + UpdateTensorboardTimeSeries: []gax.CallOption{}, + ListTensorboardTimeSeries: []gax.CallOption{}, + DeleteTensorboardTimeSeries: []gax.CallOption{}, + BatchReadTensorboardTimeSeriesData: []gax.CallOption{}, + ReadTensorboardTimeSeriesData: []gax.CallOption{}, + ReadTensorboardBlobData: []gax.CallOption{}, + WriteTensorboardExperimentData: []gax.CallOption{}, + WriteTensorboardRunData: []gax.CallOption{}, + ExportTensorboardTimeSeriesData: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalTensorboardClient is an interface that defines the methods available from Vertex AI API. type internalTensorboardClient interface { Close() error @@ -223,7 +272,8 @@ func (c *TensorboardClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TensorboardClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -566,7 +616,8 @@ func NewTensorboardClient(ctx context.Context, opts ...option.ClientOption) (*Te // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *tensorboardGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -586,6 +637,89 @@ func (c *tensorboardGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type tensorboardRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing TensorboardClient + CallOptions **TensorboardCallOptions +} + +// NewTensorboardRESTClient creates a new tensorboard service rest client. +// +// TensorboardService +func NewTensorboardRESTClient(ctx context.Context, opts ...option.ClientOption) (*TensorboardClient, error) { + clientOpts := append(defaultTensorboardRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultTensorboardRESTCallOptions() + c := &tensorboardRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &TensorboardClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultTensorboardRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *tensorboardRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *tensorboardRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *tensorboardRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *tensorboardGRPCClient) CreateTensorboard(ctx context.Context, req *aiplatformpb.CreateTensorboardRequest, opts ...gax.CallOption) (*CreateTensorboardOperation, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -1431,137 +1565,2719 @@ func (c *tensorboardGRPCClient) WaitOperation(ctx context.Context, req *longrunn return resp, nil } -// CreateTensorboardOperation manages a long-running operation from CreateTensorboard. -type CreateTensorboardOperation struct { - lro *longrunning.Operation -} - -// CreateTensorboardOperation returns a new CreateTensorboardOperation from a given name. -// The name must be that of a previously created CreateTensorboardOperation, possibly from a different process. -func (c *tensorboardGRPCClient) CreateTensorboardOperation(name string) *CreateTensorboardOperation { - return &CreateTensorboardOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { - var resp aiplatformpb.Tensorboard - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateTensorboard creates a Tensorboard. +func (c *tensorboardRESTClient) CreateTensorboard(ctx context.Context, req *aiplatformpb.CreateTensorboardRequest, opts ...gax.CallOption) (*CreateTensorboardOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboard() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { - var resp aiplatformpb.Tensorboard - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/tensorboards", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CreateTensorboardOperation) Metadata() (*aiplatformpb.CreateTensorboardOperationMetadata, error) { - var meta aiplatformpb.CreateTensorboardOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// GetTensorboard gets a Tensorboard. +func (c *tensorboardRESTClient) GetTensorboard(ctx context.Context, req *aiplatformpb.GetTensorboardRequest, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &meta, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) -// Done reports whether the long-running operation has completed. -func (op *CreateTensorboardOperation) Done() bool { - return op.lro.Done() -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CreateTensorboardOperation) Name() string { - return op.lro.Name() -} + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTensorboard[0:len((*c.CallOptions).GetTensorboard):len((*c.CallOptions).GetTensorboard)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Tensorboard{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers -// DeleteTensorboardOperation manages a long-running operation from DeleteTensorboard. -type DeleteTensorboardOperation struct { - lro *longrunning.Operation -} + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() -// DeleteTensorboardOperation returns a new DeleteTensorboardOperation from a given name. -// The name must be that of a previously created DeleteTensorboardOperation, possibly from a different process. -func (c *tensorboardGRPCClient) DeleteTensorboardOperation(name string) *DeleteTensorboardOperation { - return &DeleteTensorboardOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *DeleteTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) -} + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *DeleteTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { - return op.lro.Poll(ctx, nil, opts...) + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *DeleteTensorboardOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { - var meta aiplatformpb.DeleteOperationMetadata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { +// UpdateTensorboard updates a Tensorboard. +func (c *tensorboardRESTClient) UpdateTensorboard(ctx context.Context, req *aiplatformpb.UpdateTensorboardRequest, opts ...gax.CallOption) (*UpdateTensorboardOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboard() + jsonReq, err := m.Marshal(body) + if err != nil { return nil, err } - return &meta, nil -} -// Done reports whether the long-running operation has completed. -func (op *DeleteTensorboardOperation) Done() bool { - return op.lro.Done() -} + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTensorboard().GetName()) -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *DeleteTensorboardOperation) Name() string { - return op.lro.Name() -} + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } -// DeleteTensorboardExperimentOperation manages a long-running operation from DeleteTensorboardExperiment. -type DeleteTensorboardExperimentOperation struct { - lro *longrunning.Operation -} + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard.name", url.QueryEscape(req.GetTensorboard().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &UpdateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListTensorboards lists Tensorboards in a Location. +func (c *tensorboardRESTClient) ListTensorboards(ctx context.Context, req *aiplatformpb.ListTensorboardsRequest, opts ...gax.CallOption) *TensorboardIterator { + it := &TensorboardIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Tensorboard, string, error) { + resp := &aiplatformpb.ListTensorboardsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/tensorboards", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTensorboards(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteTensorboard deletes a Tensorboard. +func (c *tensorboardRESTClient) DeleteTensorboard(ctx context.Context, req *aiplatformpb.DeleteTensorboardRequest, opts ...gax.CallOption) (*DeleteTensorboardOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateTensorboardExperiment creates a TensorboardExperiment. +func (c *tensorboardRESTClient) CreateTensorboardExperiment(ctx context.Context, req *aiplatformpb.CreateTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboardExperiment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/experiments", req.GetParent()) + + params := url.Values{} + params.Add("tensorboardExperimentId", fmt.Sprintf("%v", req.GetTensorboardExperimentId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTensorboardExperiment[0:len((*c.CallOptions).CreateTensorboardExperiment):len((*c.CallOptions).CreateTensorboardExperiment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardExperiment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetTensorboardExperiment gets a TensorboardExperiment. +func (c *tensorboardRESTClient) GetTensorboardExperiment(ctx context.Context, req *aiplatformpb.GetTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTensorboardExperiment[0:len((*c.CallOptions).GetTensorboardExperiment):len((*c.CallOptions).GetTensorboardExperiment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardExperiment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTensorboardExperiment updates a TensorboardExperiment. +func (c *tensorboardRESTClient) UpdateTensorboardExperiment(ctx context.Context, req *aiplatformpb.UpdateTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboardExperiment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTensorboardExperiment().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_experiment.name", url.QueryEscape(req.GetTensorboardExperiment().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTensorboardExperiment[0:len((*c.CallOptions).UpdateTensorboardExperiment):len((*c.CallOptions).UpdateTensorboardExperiment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardExperiment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTensorboardExperiments lists TensorboardExperiments in a Location. +func (c *tensorboardRESTClient) ListTensorboardExperiments(ctx context.Context, req *aiplatformpb.ListTensorboardExperimentsRequest, opts ...gax.CallOption) *TensorboardExperimentIterator { + it := &TensorboardExperimentIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardExperimentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TensorboardExperiment, string, error) { + resp := &aiplatformpb.ListTensorboardExperimentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/experiments", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTensorboardExperiments(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteTensorboardExperiment deletes a TensorboardExperiment. +func (c *tensorboardRESTClient) DeleteTensorboardExperiment(ctx context.Context, req *aiplatformpb.DeleteTensorboardExperimentRequest, opts ...gax.CallOption) (*DeleteTensorboardExperimentOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteTensorboardExperimentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateTensorboardRun creates a TensorboardRun. +func (c *tensorboardRESTClient) CreateTensorboardRun(ctx context.Context, req *aiplatformpb.CreateTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboardRun() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/runs", req.GetParent()) + + params := url.Values{} + params.Add("tensorboardRunId", fmt.Sprintf("%v", req.GetTensorboardRunId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTensorboardRun[0:len((*c.CallOptions).CreateTensorboardRun):len((*c.CallOptions).CreateTensorboardRun)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardRun{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchCreateTensorboardRuns batch create TensorboardRuns. +func (c *tensorboardRESTClient) BatchCreateTensorboardRuns(ctx context.Context, req *aiplatformpb.BatchCreateTensorboardRunsRequest, opts ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardRunsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/runs:batchCreate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).BatchCreateTensorboardRuns[0:len((*c.CallOptions).BatchCreateTensorboardRuns):len((*c.CallOptions).BatchCreateTensorboardRuns)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.BatchCreateTensorboardRunsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetTensorboardRun gets a TensorboardRun. +func (c *tensorboardRESTClient) GetTensorboardRun(ctx context.Context, req *aiplatformpb.GetTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTensorboardRun[0:len((*c.CallOptions).GetTensorboardRun):len((*c.CallOptions).GetTensorboardRun)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardRun{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTensorboardRun updates a TensorboardRun. +func (c *tensorboardRESTClient) UpdateTensorboardRun(ctx context.Context, req *aiplatformpb.UpdateTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboardRun() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTensorboardRun().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_run.name", url.QueryEscape(req.GetTensorboardRun().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTensorboardRun[0:len((*c.CallOptions).UpdateTensorboardRun):len((*c.CallOptions).UpdateTensorboardRun)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardRun{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTensorboardRuns lists TensorboardRuns in a Location. +func (c *tensorboardRESTClient) ListTensorboardRuns(ctx context.Context, req *aiplatformpb.ListTensorboardRunsRequest, opts ...gax.CallOption) *TensorboardRunIterator { + it := &TensorboardRunIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardRunsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TensorboardRun, string, error) { + resp := &aiplatformpb.ListTensorboardRunsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/runs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTensorboardRuns(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteTensorboardRun deletes a TensorboardRun. +func (c *tensorboardRESTClient) DeleteTensorboardRun(ctx context.Context, req *aiplatformpb.DeleteTensorboardRunRequest, opts ...gax.CallOption) (*DeleteTensorboardRunOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteTensorboardRunOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchCreateTensorboardTimeSeries batch create TensorboardTimeSeries that belong to a TensorboardExperiment. +func (c *tensorboardRESTClient) BatchCreateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.BatchCreateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardTimeSeriesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/runs/*/timeSeries:batchCreate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).BatchCreateTensorboardTimeSeries[0:len((*c.CallOptions).BatchCreateTensorboardTimeSeries):len((*c.CallOptions).BatchCreateTensorboardTimeSeries)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.BatchCreateTensorboardTimeSeriesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateTensorboardTimeSeries creates a TensorboardTimeSeries. +func (c *tensorboardRESTClient) CreateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.CreateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboardTimeSeries() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/timeSeries", req.GetParent()) + + params := url.Values{} + if req.GetTensorboardTimeSeriesId() != "" { + params.Add("tensorboardTimeSeriesId", fmt.Sprintf("%v", req.GetTensorboardTimeSeriesId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTensorboardTimeSeries[0:len((*c.CallOptions).CreateTensorboardTimeSeries):len((*c.CallOptions).CreateTensorboardTimeSeries)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardTimeSeries{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetTensorboardTimeSeries gets a TensorboardTimeSeries. +func (c *tensorboardRESTClient) GetTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.GetTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTensorboardTimeSeries[0:len((*c.CallOptions).GetTensorboardTimeSeries):len((*c.CallOptions).GetTensorboardTimeSeries)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardTimeSeries{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTensorboardTimeSeries updates a TensorboardTimeSeries. +func (c *tensorboardRESTClient) UpdateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.UpdateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTensorboardTimeSeries() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTensorboardTimeSeries().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_time_series.name", url.QueryEscape(req.GetTensorboardTimeSeries().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTensorboardTimeSeries[0:len((*c.CallOptions).UpdateTensorboardTimeSeries):len((*c.CallOptions).UpdateTensorboardTimeSeries)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.TensorboardTimeSeries{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTensorboardTimeSeries lists TensorboardTimeSeries in a Location. +func (c *tensorboardRESTClient) ListTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.ListTensorboardTimeSeriesRequest, opts ...gax.CallOption) *TensorboardTimeSeriesIterator { + it := &TensorboardTimeSeriesIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardTimeSeriesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TensorboardTimeSeries, string, error) { + resp := &aiplatformpb.ListTensorboardTimeSeriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/timeSeries", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTensorboardTimeSeries(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteTensorboardTimeSeries deletes a TensorboardTimeSeries. +func (c *tensorboardRESTClient) DeleteTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.DeleteTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*DeleteTensorboardTimeSeriesOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteTensorboardTimeSeriesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchReadTensorboardTimeSeriesData reads multiple TensorboardTimeSeries’ data. The data point number limit is +// 1000 for scalars, 100 for tensors and blob references. If the number of +// data points stored is less than the limit, all data will be returned. +// Otherwise, that limit number of data points will be randomly selected from +// this time series and returned. +func (c *tensorboardRESTClient) BatchReadTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) (*aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/experiments/*/runs/*/timeSeries:batchRead", req.GetTensorboard()) + + params := url.Values{} + if req.GetTimeSeries() != nil { + params.Add("timeSeries", fmt.Sprintf("%v", req.GetTimeSeries())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard", url.QueryEscape(req.GetTensorboard()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).BatchReadTensorboardTimeSeriesData[0:len((*c.CallOptions).BatchReadTensorboardTimeSeriesData):len((*c.CallOptions).BatchReadTensorboardTimeSeriesData)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ReadTensorboardTimeSeriesData reads a TensorboardTimeSeries’ data. By default, if the number of data +// points stored is less than 1000, all data will be returned. Otherwise, 1000 +// data points will be randomly selected from this time series and returned. +// This value can be changed by changing max_data_points, which can’t be +// greater than 10k. +func (c *tensorboardRESTClient) ReadTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.ReadTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) (*aiplatformpb.ReadTensorboardTimeSeriesDataResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:read", req.GetTensorboardTimeSeries()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetMaxDataPoints() != 0 { + params.Add("maxDataPoints", fmt.Sprintf("%v", req.GetMaxDataPoints())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_time_series", url.QueryEscape(req.GetTensorboardTimeSeries()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ReadTensorboardTimeSeriesData[0:len((*c.CallOptions).ReadTensorboardTimeSeriesData):len((*c.CallOptions).ReadTensorboardTimeSeriesData)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ReadTensorboardTimeSeriesDataResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ReadTensorboardBlobData gets bytes of TensorboardBlobs. +// This is to allow reading blob data stored in consumer project’s Cloud +// Storage bucket without users having to obtain Cloud Storage access +// permission. +func (c *tensorboardRESTClient) ReadTensorboardBlobData(ctx context.Context, req *aiplatformpb.ReadTensorboardBlobDataRequest, opts ...gax.CallOption) (aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:readBlobData", req.GetTimeSeries()) + + params := url.Values{} + if req.GetBlobIds() != nil { + params.Add("blobIds", fmt.Sprintf("%v", req.GetBlobIds())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "time_series", url.QueryEscape(req.GetTimeSeries()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + var streamClient *readTensorboardBlobDataRESTClient + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + streamClient = &readTensorboardBlobDataRESTClient{ + ctx: ctx, + md: metadata.MD(httpRsp.Header), + stream: gax.NewProtoJSONStreamReader(httpRsp.Body, (&aiplatformpb.ReadTensorboardBlobDataResponse{}).ProtoReflect().Type()), + } + return nil + }, opts...) + + return streamClient, e +} + +// readTensorboardBlobDataRESTClient is the stream client used to consume the server stream created by +// the REST implementation of ReadTensorboardBlobData. +type readTensorboardBlobDataRESTClient struct { + ctx context.Context + md metadata.MD + stream *gax.ProtoJSONStream +} + +func (c *readTensorboardBlobDataRESTClient) Recv() (*aiplatformpb.ReadTensorboardBlobDataResponse, error) { + if err := c.ctx.Err(); err != nil { + defer c.stream.Close() + return nil, err + } + msg, err := c.stream.Recv() + if err != nil { + defer c.stream.Close() + return nil, err + } + res := msg.(*aiplatformpb.ReadTensorboardBlobDataResponse) + return res, nil +} + +func (c *readTensorboardBlobDataRESTClient) Header() (metadata.MD, error) { + return c.md, nil +} + +func (c *readTensorboardBlobDataRESTClient) Trailer() metadata.MD { + return c.md +} + +func (c *readTensorboardBlobDataRESTClient) CloseSend() error { + // This is a no-op to fulfill the interface. + return fmt.Errorf("this method is not implemented for a server-stream") +} + +func (c *readTensorboardBlobDataRESTClient) Context() context.Context { + return c.ctx +} + +func (c *readTensorboardBlobDataRESTClient) SendMsg(m interface{}) error { + // This is a no-op to fulfill the interface. + return fmt.Errorf("this method is not implemented for a server-stream") +} + +func (c *readTensorboardBlobDataRESTClient) RecvMsg(m interface{}) error { + // This is a no-op to fulfill the interface. + return fmt.Errorf("this method is not implemented, use Recv") +} + +// WriteTensorboardExperimentData write time series data points of multiple TensorboardTimeSeries in multiple +// TensorboardRun’s. If any data fail to be ingested, an error will be +// returned. +func (c *tensorboardRESTClient) WriteTensorboardExperimentData(ctx context.Context, req *aiplatformpb.WriteTensorboardExperimentDataRequest, opts ...gax.CallOption) (*aiplatformpb.WriteTensorboardExperimentDataResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:write", req.GetTensorboardExperiment()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_experiment", url.QueryEscape(req.GetTensorboardExperiment()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WriteTensorboardExperimentData[0:len((*c.CallOptions).WriteTensorboardExperimentData):len((*c.CallOptions).WriteTensorboardExperimentData)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.WriteTensorboardExperimentDataResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// WriteTensorboardRunData write time series data points into multiple TensorboardTimeSeries under +// a TensorboardRun. If any data fail to be ingested, an error will be +// returned. +func (c *tensorboardRESTClient) WriteTensorboardRunData(ctx context.Context, req *aiplatformpb.WriteTensorboardRunDataRequest, opts ...gax.CallOption) (*aiplatformpb.WriteTensorboardRunDataResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:write", req.GetTensorboardRun()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_run", url.QueryEscape(req.GetTensorboardRun()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WriteTensorboardRunData[0:len((*c.CallOptions).WriteTensorboardRunData):len((*c.CallOptions).WriteTensorboardRunData)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.WriteTensorboardRunDataResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ExportTensorboardTimeSeriesData exports a TensorboardTimeSeries’ data. Data is returned in paginated +// responses. +func (c *tensorboardRESTClient) ExportTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.ExportTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) *TimeSeriesDataPointIterator { + it := &TimeSeriesDataPointIterator{} + req = proto.Clone(req).(*aiplatformpb.ExportTensorboardTimeSeriesDataRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TimeSeriesDataPoint, string, error) { + resp := &aiplatformpb.ExportTensorboardTimeSeriesDataResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:exportTensorboardTimeSeries", req.GetTensorboardTimeSeries()) + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTimeSeriesDataPoints(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *tensorboardRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *tensorboardRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *tensorboardRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *tensorboardRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *tensorboardRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *tensorboardRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *tensorboardRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *tensorboardRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *tensorboardRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *tensorboardRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateTensorboardOperation manages a long-running operation from CreateTensorboard. +type CreateTensorboardOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateTensorboardOperation returns a new CreateTensorboardOperation from a given name. +// The name must be that of a previously created CreateTensorboardOperation, possibly from a different process. +func (c *tensorboardGRPCClient) CreateTensorboardOperation(name string) *CreateTensorboardOperation { + return &CreateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateTensorboardOperation returns a new CreateTensorboardOperation from a given name. +// The name must be that of a previously created CreateTensorboardOperation, possibly from a different process. +func (c *tensorboardRESTClient) CreateTensorboardOperation(name string) *CreateTensorboardOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Tensorboard + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.Tensorboard + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateTensorboardOperation) Metadata() (*aiplatformpb.CreateTensorboardOperationMetadata, error) { + var meta aiplatformpb.CreateTensorboardOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateTensorboardOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateTensorboardOperation) Name() string { + return op.lro.Name() +} + +// DeleteTensorboardOperation manages a long-running operation from DeleteTensorboard. +type DeleteTensorboardOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteTensorboardOperation returns a new DeleteTensorboardOperation from a given name. +// The name must be that of a previously created DeleteTensorboardOperation, possibly from a different process. +func (c *tensorboardGRPCClient) DeleteTensorboardOperation(name string) *DeleteTensorboardOperation { + return &DeleteTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteTensorboardOperation returns a new DeleteTensorboardOperation from a given name. +// The name must be that of a previously created DeleteTensorboardOperation, possibly from a different process. +func (c *tensorboardRESTClient) DeleteTensorboardOperation(name string) *DeleteTensorboardOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteTensorboardOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteTensorboardOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteTensorboardOperation) Name() string { + return op.lro.Name() +} + +// DeleteTensorboardExperimentOperation manages a long-running operation from DeleteTensorboardExperiment. +type DeleteTensorboardExperimentOperation struct { + lro *longrunning.Operation + pollPath string +} // DeleteTensorboardExperimentOperation returns a new DeleteTensorboardExperimentOperation from a given name. // The name must be that of a previously created DeleteTensorboardExperimentOperation, possibly from a different process. @@ -1571,10 +4287,21 @@ func (c *tensorboardGRPCClient) DeleteTensorboardExperimentOperation(name string } } +// DeleteTensorboardExperimentOperation returns a new DeleteTensorboardExperimentOperation from a given name. +// The name must be that of a previously created DeleteTensorboardExperimentOperation, possibly from a different process. +func (c *tensorboardRESTClient) DeleteTensorboardExperimentOperation(name string) *DeleteTensorboardExperimentOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteTensorboardExperimentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteTensorboardExperimentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1588,6 +4315,7 @@ func (op *DeleteTensorboardExperimentOperation) Wait(ctx context.Context, opts . // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteTensorboardExperimentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1618,7 +4346,8 @@ func (op *DeleteTensorboardExperimentOperation) Name() string { // DeleteTensorboardRunOperation manages a long-running operation from DeleteTensorboardRun. type DeleteTensorboardRunOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteTensorboardRunOperation returns a new DeleteTensorboardRunOperation from a given name. @@ -1629,10 +4358,21 @@ func (c *tensorboardGRPCClient) DeleteTensorboardRunOperation(name string) *Dele } } +// DeleteTensorboardRunOperation returns a new DeleteTensorboardRunOperation from a given name. +// The name must be that of a previously created DeleteTensorboardRunOperation, possibly from a different process. +func (c *tensorboardRESTClient) DeleteTensorboardRunOperation(name string) *DeleteTensorboardRunOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteTensorboardRunOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteTensorboardRunOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1646,6 +4386,7 @@ func (op *DeleteTensorboardRunOperation) Wait(ctx context.Context, opts ...gax.C // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteTensorboardRunOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1676,7 +4417,8 @@ func (op *DeleteTensorboardRunOperation) Name() string { // DeleteTensorboardTimeSeriesOperation manages a long-running operation from DeleteTensorboardTimeSeries. type DeleteTensorboardTimeSeriesOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteTensorboardTimeSeriesOperation returns a new DeleteTensorboardTimeSeriesOperation from a given name. @@ -1687,10 +4429,21 @@ func (c *tensorboardGRPCClient) DeleteTensorboardTimeSeriesOperation(name string } } +// DeleteTensorboardTimeSeriesOperation returns a new DeleteTensorboardTimeSeriesOperation from a given name. +// The name must be that of a previously created DeleteTensorboardTimeSeriesOperation, possibly from a different process. +func (c *tensorboardRESTClient) DeleteTensorboardTimeSeriesOperation(name string) *DeleteTensorboardTimeSeriesOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteTensorboardTimeSeriesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteTensorboardTimeSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1704,6 +4457,7 @@ func (op *DeleteTensorboardTimeSeriesOperation) Wait(ctx context.Context, opts . // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteTensorboardTimeSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1734,7 +4488,8 @@ func (op *DeleteTensorboardTimeSeriesOperation) Name() string { // UpdateTensorboardOperation manages a long-running operation from UpdateTensorboard. type UpdateTensorboardOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // UpdateTensorboardOperation returns a new UpdateTensorboardOperation from a given name. @@ -1745,10 +4500,21 @@ func (c *tensorboardGRPCClient) UpdateTensorboardOperation(name string) *UpdateT } } +// UpdateTensorboardOperation returns a new UpdateTensorboardOperation from a given name. +// The name must be that of a previously created UpdateTensorboardOperation, possibly from a different process. +func (c *tensorboardRESTClient) UpdateTensorboardOperation(name string) *UpdateTensorboardOperation { + override := fmt.Sprintf("/ui/%s", name) + return &UpdateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *UpdateTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Tensorboard if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1766,6 +4532,7 @@ func (op *UpdateTensorboardOperation) Wait(ctx context.Context, opts ...gax.Call // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *UpdateTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.Tensorboard if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/tensorboard_client_example_test.go b/aiplatform/apiv1beta1/tensorboard_client_example_test.go index 12c9f87a84c0..7fe6c002d73c 100644 --- a/aiplatform/apiv1beta1/tensorboard_client_example_test.go +++ b/aiplatform/apiv1beta1/tensorboard_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewTensorboardClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewTensorboardClient() { _ = c } +func ExampleNewTensorboardRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewTensorboardRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleTensorboardClient_CreateTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +93,11 @@ func ExampleTensorboardClient_CreateTensorboard() { func ExampleTensorboardClient_GetTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +118,11 @@ func ExampleTensorboardClient_GetTensorboard() { func ExampleTensorboardClient_UpdateTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -111,6 +148,11 @@ func ExampleTensorboardClient_UpdateTensorboard() { func ExampleTensorboardClient_ListTensorboards() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +179,11 @@ func ExampleTensorboardClient_ListTensorboards() { func ExampleTensorboardClient_DeleteTensorboard() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +207,11 @@ func ExampleTensorboardClient_DeleteTensorboard() { func ExampleTensorboardClient_CreateTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +232,11 @@ func ExampleTensorboardClient_CreateTensorboardExperiment() { func ExampleTensorboardClient_GetTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -200,6 +257,11 @@ func ExampleTensorboardClient_GetTensorboardExperiment() { func ExampleTensorboardClient_UpdateTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -220,6 +282,11 @@ func ExampleTensorboardClient_UpdateTensorboardExperiment() { func ExampleTensorboardClient_ListTensorboardExperiments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +313,11 @@ func ExampleTensorboardClient_ListTensorboardExperiments() { func ExampleTensorboardClient_DeleteTensorboardExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -269,6 +341,11 @@ func ExampleTensorboardClient_DeleteTensorboardExperiment() { func ExampleTensorboardClient_CreateTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +366,11 @@ func ExampleTensorboardClient_CreateTensorboardRun() { func ExampleTensorboardClient_BatchCreateTensorboardRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -309,6 +391,11 @@ func ExampleTensorboardClient_BatchCreateTensorboardRuns() { func ExampleTensorboardClient_GetTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -329,6 +416,11 @@ func ExampleTensorboardClient_GetTensorboardRun() { func ExampleTensorboardClient_UpdateTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -349,6 +441,11 @@ func ExampleTensorboardClient_UpdateTensorboardRun() { func ExampleTensorboardClient_ListTensorboardRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -375,6 +472,11 @@ func ExampleTensorboardClient_ListTensorboardRuns() { func ExampleTensorboardClient_DeleteTensorboardRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -398,6 +500,11 @@ func ExampleTensorboardClient_DeleteTensorboardRun() { func ExampleTensorboardClient_BatchCreateTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -418,6 +525,11 @@ func ExampleTensorboardClient_BatchCreateTensorboardTimeSeries() { func ExampleTensorboardClient_CreateTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +550,11 @@ func ExampleTensorboardClient_CreateTensorboardTimeSeries() { func ExampleTensorboardClient_GetTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -458,6 +575,11 @@ func ExampleTensorboardClient_GetTensorboardTimeSeries() { func ExampleTensorboardClient_UpdateTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -478,6 +600,11 @@ func ExampleTensorboardClient_UpdateTensorboardTimeSeries() { func ExampleTensorboardClient_ListTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -504,6 +631,11 @@ func ExampleTensorboardClient_ListTensorboardTimeSeries() { func ExampleTensorboardClient_DeleteTensorboardTimeSeries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -527,6 +659,11 @@ func ExampleTensorboardClient_DeleteTensorboardTimeSeries() { func ExampleTensorboardClient_BatchReadTensorboardTimeSeriesData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -547,6 +684,11 @@ func ExampleTensorboardClient_BatchReadTensorboardTimeSeriesData() { func ExampleTensorboardClient_ReadTensorboardTimeSeriesData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -567,6 +709,11 @@ func ExampleTensorboardClient_ReadTensorboardTimeSeriesData() { func ExampleTensorboardClient_WriteTensorboardExperimentData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -587,6 +734,11 @@ func ExampleTensorboardClient_WriteTensorboardExperimentData() { func ExampleTensorboardClient_WriteTensorboardRunData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -607,6 +759,11 @@ func ExampleTensorboardClient_WriteTensorboardRunData() { func ExampleTensorboardClient_ExportTensorboardTimeSeriesData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -633,6 +790,11 @@ func ExampleTensorboardClient_ExportTensorboardTimeSeriesData() { func ExampleTensorboardClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -653,6 +815,11 @@ func ExampleTensorboardClient_GetLocation() { func ExampleTensorboardClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -679,6 +846,11 @@ func ExampleTensorboardClient_ListLocations() { func ExampleTensorboardClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -699,6 +871,11 @@ func ExampleTensorboardClient_GetIamPolicy() { func ExampleTensorboardClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -719,6 +896,11 @@ func ExampleTensorboardClient_SetIamPolicy() { func ExampleTensorboardClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -739,6 +921,11 @@ func ExampleTensorboardClient_TestIamPermissions() { func ExampleTensorboardClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -757,6 +944,11 @@ func ExampleTensorboardClient_CancelOperation() { func ExampleTensorboardClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -775,6 +967,11 @@ func ExampleTensorboardClient_DeleteOperation() { func ExampleTensorboardClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -795,6 +992,11 @@ func ExampleTensorboardClient_GetOperation() { func ExampleTensorboardClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. @@ -821,6 +1023,11 @@ func ExampleTensorboardClient_ListOperations() { func ExampleTensorboardClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewTensorboardClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/apiv1beta1/vizier_client.go b/aiplatform/apiv1beta1/vizier_client.go index b74e3e97d853..bbcaa8dadc33 100644 --- a/aiplatform/apiv1beta1/vizier_client.go +++ b/aiplatform/apiv1beta1/vizier_client.go @@ -17,25 +17,31 @@ package aiplatform import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1" locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -112,6 +118,36 @@ func defaultVizierCallOptions() *VizierCallOptions { } } +func defaultVizierRESTCallOptions() *VizierCallOptions { + return &VizierCallOptions{ + CreateStudy: []gax.CallOption{}, + GetStudy: []gax.CallOption{}, + ListStudies: []gax.CallOption{}, + DeleteStudy: []gax.CallOption{}, + LookupStudy: []gax.CallOption{}, + SuggestTrials: []gax.CallOption{}, + CreateTrial: []gax.CallOption{}, + GetTrial: []gax.CallOption{}, + ListTrials: []gax.CallOption{}, + AddTrialMeasurement: []gax.CallOption{}, + CompleteTrial: []gax.CallOption{}, + DeleteTrial: []gax.CallOption{}, + CheckTrialEarlyStoppingState: []gax.CallOption{}, + StopTrial: []gax.CallOption{}, + ListOptimalTrials: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + // internalVizierClient is an interface that defines the methods available from Vertex AI API. type internalVizierClient interface { Close() error @@ -184,7 +220,8 @@ func (c *VizierClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VizierClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -439,7 +476,8 @@ func NewVizierClient(ctx context.Context, opts ...option.ClientOption) (*VizierC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *vizierGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -459,6 +497,93 @@ func (c *vizierGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type vizierRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing VizierClient + CallOptions **VizierCallOptions +} + +// NewVizierRESTClient creates a new vizier service rest client. +// +// Vertex AI Vizier API. +// +// Vertex AI Vizier is a service to solve blackbox optimization problems, +// such as tuning machine learning hyperparameters and searching over deep +// learning architectures. +func NewVizierRESTClient(ctx context.Context, opts ...option.ClientOption) (*VizierClient, error) { + clientOpts := append(defaultVizierRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultVizierRESTCallOptions() + c := &vizierRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &VizierClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultVizierRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *vizierRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *vizierRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *vizierRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *vizierGRPCClient) CreateStudy(ctx context.Context, req *aiplatformpb.CreateStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) @@ -1049,85 +1174,1621 @@ func (c *vizierGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb return resp, nil } -// CheckTrialEarlyStoppingStateOperation manages a long-running operation from CheckTrialEarlyStoppingState. -type CheckTrialEarlyStoppingStateOperation struct { - lro *longrunning.Operation -} - -// CheckTrialEarlyStoppingStateOperation returns a new CheckTrialEarlyStoppingStateOperation from a given name. -// The name must be that of a previously created CheckTrialEarlyStoppingStateOperation, possibly from a different process. -func (c *vizierGRPCClient) CheckTrialEarlyStoppingStateOperation(name string) *CheckTrialEarlyStoppingStateOperation { - return &CheckTrialEarlyStoppingStateOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), +// CreateStudy creates a Study. A resource name will be generated after creation of the +// Study. +func (c *vizierRESTClient) CreateStudy(ctx context.Context, req *aiplatformpb.CreateStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetStudy() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err } -} -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CheckTrialEarlyStoppingStateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error) { - var resp aiplatformpb.CheckTrialEarlyStoppingStateResponse - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &resp, nil + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/studies", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateStudy[0:len((*c.CallOptions).CreateStudy):len((*c.CallOptions).CreateStudy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Study{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CheckTrialEarlyStoppingStateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error) { - var resp aiplatformpb.CheckTrialEarlyStoppingStateResponse - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { +// GetStudy gets a Study by name. +func (c *vizierRESTClient) GetStudy(ctx context.Context, req *aiplatformpb.GetStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetStudy[0:len((*c.CallOptions).GetStudy):len((*c.CallOptions).GetStudy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Study{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e } - return &resp, nil + return resp, nil } -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. -// To get the latest metadata, call this method after a successful call to Poll. -// If the metadata is not available, the returned metadata and error are both nil. -func (op *CheckTrialEarlyStoppingStateOperation) Metadata() (*aiplatformpb.CheckTrialEarlyStoppingStateMetatdata, error) { - var meta aiplatformpb.CheckTrialEarlyStoppingStateMetatdata - if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { - return nil, nil - } else if err != nil { - return nil, err +// ListStudies lists all the studies in a region for an associated project. +func (c *vizierRESTClient) ListStudies(ctx context.Context, req *aiplatformpb.ListStudiesRequest, opts ...gax.CallOption) *StudyIterator { + it := &StudyIterator{} + req = proto.Clone(req).(*aiplatformpb.ListStudiesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Study, string, error) { + resp := &aiplatformpb.ListStudiesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/studies", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetStudies(), resp.GetNextPageToken(), nil } - return &meta, nil -} -// Done reports whether the long-running operation has completed. -func (op *CheckTrialEarlyStoppingStateOperation) Done() bool { - return op.lro.Done() -} + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } -// Name returns the name of the long-running operation. -// The name is assigned by the server and is unique within the service from which the operation is created. -func (op *CheckTrialEarlyStoppingStateOperation) Name() string { - return op.lro.Name() + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it } -// SuggestTrialsOperation manages a long-running operation from SuggestTrials. -type SuggestTrialsOperation struct { - lro *longrunning.Operation +// DeleteStudy deletes a Study. +func (c *vizierRESTClient) DeleteStudy(ctx context.Context, req *aiplatformpb.DeleteStudyRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) } -// SuggestTrialsOperation returns a new SuggestTrialsOperation from a given name. -// The name must be that of a previously created SuggestTrialsOperation, possibly from a different process. -func (c *vizierGRPCClient) SuggestTrialsOperation(name string) *SuggestTrialsOperation { - return &SuggestTrialsOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), +// LookupStudy looks a study up using the user-defined display_name field instead of the +// fully qualified resource name. +func (c *vizierRESTClient) LookupStudy(ctx context.Context, req *aiplatformpb.LookupStudyRequest, opts ...gax.CallOption) (*aiplatformpb.Study, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/studies:lookup", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).LookupStudy[0:len((*c.CallOptions).LookupStudy):len((*c.CallOptions).LookupStudy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Study{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SuggestTrials adds one or more Trials to a Study, with parameter values +// suggested by Vertex AI Vizier. Returns a long-running +// operation associated with the generation of Trial suggestions. +// When this long-running operation succeeds, it will contain +// a SuggestTrialsResponse. +func (c *vizierRESTClient) SuggestTrials(ctx context.Context, req *aiplatformpb.SuggestTrialsRequest, opts ...gax.CallOption) (*SuggestTrialsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/trials:suggest", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &SuggestTrialsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CreateTrial adds a user provided Trial to a Study. +func (c *vizierRESTClient) CreateTrial(ctx context.Context, req *aiplatformpb.CreateTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTrial() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/trials", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTrial[0:len((*c.CallOptions).CreateTrial):len((*c.CallOptions).CreateTrial)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Trial{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetTrial gets a Trial. +func (c *vizierRESTClient) GetTrial(ctx context.Context, req *aiplatformpb.GetTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTrial[0:len((*c.CallOptions).GetTrial):len((*c.CallOptions).GetTrial)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Trial{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTrials lists the Trials associated with a Study. +func (c *vizierRESTClient) ListTrials(ctx context.Context, req *aiplatformpb.ListTrialsRequest, opts ...gax.CallOption) *TrialIterator { + it := &TrialIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTrialsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Trial, string, error) { + resp := &aiplatformpb.ListTrialsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/trials", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTrials(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// AddTrialMeasurement adds a measurement of the objective metrics to a Trial. This measurement +// is assumed to have been taken before the Trial is complete. +func (c *vizierRESTClient) AddTrialMeasurement(ctx context.Context, req *aiplatformpb.AddTrialMeasurementRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:addTrialMeasurement", req.GetTrialName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "trial_name", url.QueryEscape(req.GetTrialName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).AddTrialMeasurement[0:len((*c.CallOptions).AddTrialMeasurement):len((*c.CallOptions).AddTrialMeasurement)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Trial{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CompleteTrial marks a Trial as complete. +func (c *vizierRESTClient) CompleteTrial(ctx context.Context, req *aiplatformpb.CompleteTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:complete", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CompleteTrial[0:len((*c.CallOptions).CompleteTrial):len((*c.CallOptions).CompleteTrial)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Trial{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteTrial deletes a Trial. +func (c *vizierRESTClient) DeleteTrial(ctx context.Context, req *aiplatformpb.DeleteTrialRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CheckTrialEarlyStoppingState checks whether a Trial should stop or not. Returns a +// long-running operation. When the operation is successful, +// it will contain a +// CheckTrialEarlyStoppingStateResponse. +func (c *vizierRESTClient) CheckTrialEarlyStoppingState(ctx context.Context, req *aiplatformpb.CheckTrialEarlyStoppingStateRequest, opts ...gax.CallOption) (*CheckTrialEarlyStoppingStateOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:checkTrialEarlyStoppingState", req.GetTrialName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "trial_name", url.QueryEscape(req.GetTrialName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CheckTrialEarlyStoppingStateOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// StopTrial stops a Trial. +func (c *vizierRESTClient) StopTrial(ctx context.Context, req *aiplatformpb.StopTrialRequest, opts ...gax.CallOption) (*aiplatformpb.Trial, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:stop", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).StopTrial[0:len((*c.CallOptions).StopTrial):len((*c.CallOptions).StopTrial)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.Trial{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOptimalTrials lists the pareto-optimal Trials for multi-objective Study or the +// optimal Trials for single-objective Study. The definition of +// pareto-optimal can be checked in wiki page. +// https://en.wikipedia.org/wiki/Pareto_efficiency (at https://en.wikipedia.org/wiki/Pareto_efficiency) +func (c *vizierRESTClient) ListOptimalTrials(ctx context.Context, req *aiplatformpb.ListOptimalTrialsRequest, opts ...gax.CallOption) (*aiplatformpb.ListOptimalTrialsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/trials:listOptimalTrials", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ListOptimalTrials[0:len((*c.CallOptions).ListOptimalTrials):len((*c.CallOptions).ListOptimalTrials)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ListOptimalTrialsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *vizierRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *vizierRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *vizierRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *vizierRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *vizierRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *vizierRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *vizierRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *vizierRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *vizierRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *vizierRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CheckTrialEarlyStoppingStateOperation manages a long-running operation from CheckTrialEarlyStoppingState. +type CheckTrialEarlyStoppingStateOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CheckTrialEarlyStoppingStateOperation returns a new CheckTrialEarlyStoppingStateOperation from a given name. +// The name must be that of a previously created CheckTrialEarlyStoppingStateOperation, possibly from a different process. +func (c *vizierGRPCClient) CheckTrialEarlyStoppingStateOperation(name string) *CheckTrialEarlyStoppingStateOperation { + return &CheckTrialEarlyStoppingStateOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CheckTrialEarlyStoppingStateOperation returns a new CheckTrialEarlyStoppingStateOperation from a given name. +// The name must be that of a previously created CheckTrialEarlyStoppingStateOperation, possibly from a different process. +func (c *vizierRESTClient) CheckTrialEarlyStoppingStateOperation(name string) *CheckTrialEarlyStoppingStateOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CheckTrialEarlyStoppingStateOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CheckTrialEarlyStoppingStateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.CheckTrialEarlyStoppingStateResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CheckTrialEarlyStoppingStateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.CheckTrialEarlyStoppingStateResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.CheckTrialEarlyStoppingStateResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CheckTrialEarlyStoppingStateOperation) Metadata() (*aiplatformpb.CheckTrialEarlyStoppingStateMetatdata, error) { + var meta aiplatformpb.CheckTrialEarlyStoppingStateMetatdata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CheckTrialEarlyStoppingStateOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CheckTrialEarlyStoppingStateOperation) Name() string { + return op.lro.Name() +} + +// SuggestTrialsOperation manages a long-running operation from SuggestTrials. +type SuggestTrialsOperation struct { + lro *longrunning.Operation + pollPath string +} + +// SuggestTrialsOperation returns a new SuggestTrialsOperation from a given name. +// The name must be that of a previously created SuggestTrialsOperation, possibly from a different process. +func (c *vizierGRPCClient) SuggestTrialsOperation(name string) *SuggestTrialsOperation { + return &SuggestTrialsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// SuggestTrialsOperation returns a new SuggestTrialsOperation from a given name. +// The name must be that of a previously created SuggestTrialsOperation, possibly from a different process. +func (c *vizierRESTClient) SuggestTrialsOperation(name string) *SuggestTrialsOperation { + override := fmt.Sprintf("/ui/%s", name) + return &SuggestTrialsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, } } @@ -1135,6 +2796,7 @@ func (c *vizierGRPCClient) SuggestTrialsOperation(name string) *SuggestTrialsOpe // // See documentation of Poll for error-handling information. func (op *SuggestTrialsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SuggestTrialsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.SuggestTrialsResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1152,6 +2814,7 @@ func (op *SuggestTrialsOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *SuggestTrialsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.SuggestTrialsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp aiplatformpb.SuggestTrialsResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/aiplatform/apiv1beta1/vizier_client_example_test.go b/aiplatform/apiv1beta1/vizier_client_example_test.go index b57ad106502f..1b3d8eb47b4d 100644 --- a/aiplatform/apiv1beta1/vizier_client_example_test.go +++ b/aiplatform/apiv1beta1/vizier_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewVizierClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -39,8 +44,30 @@ func ExampleNewVizierClient() { _ = c } +func ExampleNewVizierRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewVizierRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleVizierClient_CreateStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +88,11 @@ func ExampleVizierClient_CreateStudy() { func ExampleVizierClient_GetStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +113,11 @@ func ExampleVizierClient_GetStudy() { func ExampleVizierClient_ListStudies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +144,11 @@ func ExampleVizierClient_ListStudies() { func ExampleVizierClient_DeleteStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +167,11 @@ func ExampleVizierClient_DeleteStudy() { func ExampleVizierClient_LookupStudy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -145,6 +192,11 @@ func ExampleVizierClient_LookupStudy() { func ExampleVizierClient_SuggestTrials() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +222,11 @@ func ExampleVizierClient_SuggestTrials() { func ExampleVizierClient_CreateTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +247,11 @@ func ExampleVizierClient_CreateTrial() { func ExampleVizierClient_GetTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -210,6 +272,11 @@ func ExampleVizierClient_GetTrial() { func ExampleVizierClient_ListTrials() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -236,6 +303,11 @@ func ExampleVizierClient_ListTrials() { func ExampleVizierClient_AddTrialMeasurement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -256,6 +328,11 @@ func ExampleVizierClient_AddTrialMeasurement() { func ExampleVizierClient_CompleteTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +353,11 @@ func ExampleVizierClient_CompleteTrial() { func ExampleVizierClient_DeleteTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -294,6 +376,11 @@ func ExampleVizierClient_DeleteTrial() { func ExampleVizierClient_CheckTrialEarlyStoppingState() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -319,6 +406,11 @@ func ExampleVizierClient_CheckTrialEarlyStoppingState() { func ExampleVizierClient_StopTrial() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -339,6 +431,11 @@ func ExampleVizierClient_StopTrial() { func ExampleVizierClient_ListOptimalTrials() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -359,6 +456,11 @@ func ExampleVizierClient_ListOptimalTrials() { func ExampleVizierClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -379,6 +481,11 @@ func ExampleVizierClient_GetLocation() { func ExampleVizierClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -405,6 +512,11 @@ func ExampleVizierClient_ListLocations() { func ExampleVizierClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -425,6 +537,11 @@ func ExampleVizierClient_GetIamPolicy() { func ExampleVizierClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -445,6 +562,11 @@ func ExampleVizierClient_SetIamPolicy() { func ExampleVizierClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -465,6 +587,11 @@ func ExampleVizierClient_TestIamPermissions() { func ExampleVizierClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -483,6 +610,11 @@ func ExampleVizierClient_CancelOperation() { func ExampleVizierClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -501,6 +633,11 @@ func ExampleVizierClient_DeleteOperation() { func ExampleVizierClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -521,6 +658,11 @@ func ExampleVizierClient_GetOperation() { func ExampleVizierClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. @@ -547,6 +689,11 @@ func ExampleVizierClient_ListOperations() { func ExampleVizierClient_WaitOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := aiplatform.NewVizierClient(ctx) if err != nil { // TODO: Handle error. diff --git a/aiplatform/go.mod b/aiplatform/go.mod index f1baab475284..a0e88722a19b 100644 --- a/aiplatform/go.mod +++ b/aiplatform/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/aiplatform -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.96.0 + google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/aiplatform/go.sum b/aiplatform/go.sum index cc18f1ad14b3..755dc1422d34 100644 --- a/aiplatform/go.sum +++ b/aiplatform/go.sum @@ -30,6 +30,7 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -50,6 +51,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -162,6 +164,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +293,9 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +315,11 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +390,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +505,9 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -586,8 +595,10 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa h1:VWkrxnAx2C2hirAP+W5ADU7e/+93Yhk//ioKd2XFyDI= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -618,8 +629,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -634,8 +646,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/aiplatform/internal/version.go b/aiplatform/internal/version.go index c9ba91825c29..b1672963f6c5 100644 --- a/aiplatform/internal/version.go +++ b/aiplatform/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.14.0" +const Version = "1.21.0" diff --git a/analytics/CHANGES.md b/analytics/CHANGES.md index 32c1f544e8ea..64e207a5b8c0 100644 --- a/analytics/CHANGES.md +++ b/analytics/CHANGES.md @@ -1,5 +1,34 @@ # Changes +## [0.11.0](https://github.com/googleapis/google-cloud-go/compare/analytics/v0.10.0...analytics/v0.11.0) (2022-09-19) + + +### Features + +* **analytics:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [0.10.0](https://github.com/googleapis/google-cloud-go/compare/analytics/v0.9.0...analytics/v0.10.0) (2022-09-15) + + +### Features + +* **analytics/admin:** Enable REST transport support for Python analytics-admin, media-translation and dataflow clients ([ec1a190](https://github.com/googleapis/google-cloud-go/commit/ec1a190abbc4436fcaeaa1421c7d9df624042752)) + +## [0.9.0](https://github.com/googleapis/google-cloud-go/compare/analytics/v0.8.1...analytics/v0.9.0) (2022-08-09) + + +### Features + +* **analytics/admin:** add `GetAudience`, 'ListAudience', 'CreateAudience', 'UpdateAudience', 'ArchiveAudience' methods to the Admin API v1alpha feat: add `GetAttributionSettings`, `UpdateAttributionSettings` methods to the Admin API v1alpha ([83d8e8d](https://github.com/googleapis/google-cloud-go/commit/83d8e8dde9d8601db20096fb869b50c7abf1ba7e)) +* **analytics/admin:** add `RunAccessReport` method to the Admin API v1alpha ([83d8e8d](https://github.com/googleapis/google-cloud-go/commit/83d8e8dde9d8601db20096fb869b50c7abf1ba7e)) + +## [0.8.1](https://github.com/googleapis/google-cloud-go/compare/analytics/v0.8.0...analytics/v0.8.1) (2022-08-02) + + +### Bug Fixes + +* **analytics/admin:** Add py_test targets ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) + ## [0.8.0](https://github.com/googleapis/google-cloud-go/compare/analytics/v0.7.0...analytics/v0.8.0) (2022-06-29) diff --git a/analytics/admin/apiv1alpha/adminpb/access_report.pb.go b/analytics/admin/apiv1alpha/adminpb/access_report.pb.go new file mode 100644 index 000000000000..32e6fe43d43d --- /dev/null +++ b/analytics/admin/apiv1alpha/adminpb/access_report.pb.go @@ -0,0 +1,2248 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/analytics/admin/v1alpha/access_report.proto + +package adminpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The match type of a string filter. +type AccessStringFilter_MatchType int32 + +const ( + // Unspecified + AccessStringFilter_MATCH_TYPE_UNSPECIFIED AccessStringFilter_MatchType = 0 + // Exact match of the string value. + AccessStringFilter_EXACT AccessStringFilter_MatchType = 1 + // Begins with the string value. + AccessStringFilter_BEGINS_WITH AccessStringFilter_MatchType = 2 + // Ends with the string value. + AccessStringFilter_ENDS_WITH AccessStringFilter_MatchType = 3 + // Contains the string value. + AccessStringFilter_CONTAINS AccessStringFilter_MatchType = 4 + // Full match for the regular expression with the string value. + AccessStringFilter_FULL_REGEXP AccessStringFilter_MatchType = 5 + // Partial match for the regular expression with the string value. + AccessStringFilter_PARTIAL_REGEXP AccessStringFilter_MatchType = 6 +) + +// Enum value maps for AccessStringFilter_MatchType. +var ( + AccessStringFilter_MatchType_name = map[int32]string{ + 0: "MATCH_TYPE_UNSPECIFIED", + 1: "EXACT", + 2: "BEGINS_WITH", + 3: "ENDS_WITH", + 4: "CONTAINS", + 5: "FULL_REGEXP", + 6: "PARTIAL_REGEXP", + } + AccessStringFilter_MatchType_value = map[string]int32{ + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6, + } +) + +func (x AccessStringFilter_MatchType) Enum() *AccessStringFilter_MatchType { + p := new(AccessStringFilter_MatchType) + *p = x + return p +} + +func (x AccessStringFilter_MatchType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccessStringFilter_MatchType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_access_report_proto_enumTypes[0].Descriptor() +} + +func (AccessStringFilter_MatchType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_access_report_proto_enumTypes[0] +} + +func (x AccessStringFilter_MatchType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccessStringFilter_MatchType.Descriptor instead. +func (AccessStringFilter_MatchType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{6, 0} +} + +// The operation applied to a numeric filter. +type AccessNumericFilter_Operation int32 + +const ( + // Unspecified. + AccessNumericFilter_OPERATION_UNSPECIFIED AccessNumericFilter_Operation = 0 + // Equal + AccessNumericFilter_EQUAL AccessNumericFilter_Operation = 1 + // Less than + AccessNumericFilter_LESS_THAN AccessNumericFilter_Operation = 2 + // Less than or equal + AccessNumericFilter_LESS_THAN_OR_EQUAL AccessNumericFilter_Operation = 3 + // Greater than + AccessNumericFilter_GREATER_THAN AccessNumericFilter_Operation = 4 + // Greater than or equal + AccessNumericFilter_GREATER_THAN_OR_EQUAL AccessNumericFilter_Operation = 5 +) + +// Enum value maps for AccessNumericFilter_Operation. +var ( + AccessNumericFilter_Operation_name = map[int32]string{ + 0: "OPERATION_UNSPECIFIED", + 1: "EQUAL", + 2: "LESS_THAN", + 3: "LESS_THAN_OR_EQUAL", + 4: "GREATER_THAN", + 5: "GREATER_THAN_OR_EQUAL", + } + AccessNumericFilter_Operation_value = map[string]int32{ + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5, + } +) + +func (x AccessNumericFilter_Operation) Enum() *AccessNumericFilter_Operation { + p := new(AccessNumericFilter_Operation) + *p = x + return p +} + +func (x AccessNumericFilter_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccessNumericFilter_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_access_report_proto_enumTypes[1].Descriptor() +} + +func (AccessNumericFilter_Operation) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_access_report_proto_enumTypes[1] +} + +func (x AccessNumericFilter_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccessNumericFilter_Operation.Descriptor instead. +func (AccessNumericFilter_Operation) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{8, 0} +} + +// Rule to order the string dimension values by. +type AccessOrderBy_DimensionOrderBy_OrderType int32 + +const ( + // Unspecified. + AccessOrderBy_DimensionOrderBy_ORDER_TYPE_UNSPECIFIED AccessOrderBy_DimensionOrderBy_OrderType = 0 + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + AccessOrderBy_DimensionOrderBy_ALPHANUMERIC AccessOrderBy_DimensionOrderBy_OrderType = 1 + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + AccessOrderBy_DimensionOrderBy_CASE_INSENSITIVE_ALPHANUMERIC AccessOrderBy_DimensionOrderBy_OrderType = 2 + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + AccessOrderBy_DimensionOrderBy_NUMERIC AccessOrderBy_DimensionOrderBy_OrderType = 3 +) + +// Enum value maps for AccessOrderBy_DimensionOrderBy_OrderType. +var ( + AccessOrderBy_DimensionOrderBy_OrderType_name = map[int32]string{ + 0: "ORDER_TYPE_UNSPECIFIED", + 1: "ALPHANUMERIC", + 2: "CASE_INSENSITIVE_ALPHANUMERIC", + 3: "NUMERIC", + } + AccessOrderBy_DimensionOrderBy_OrderType_value = map[string]int32{ + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3, + } +) + +func (x AccessOrderBy_DimensionOrderBy_OrderType) Enum() *AccessOrderBy_DimensionOrderBy_OrderType { + p := new(AccessOrderBy_DimensionOrderBy_OrderType) + *p = x + return p +} + +func (x AccessOrderBy_DimensionOrderBy_OrderType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccessOrderBy_DimensionOrderBy_OrderType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_access_report_proto_enumTypes[2].Descriptor() +} + +func (AccessOrderBy_DimensionOrderBy_OrderType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_access_report_proto_enumTypes[2] +} + +func (x AccessOrderBy_DimensionOrderBy_OrderType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccessOrderBy_DimensionOrderBy_OrderType.Descriptor instead. +func (AccessOrderBy_DimensionOrderBy_OrderType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{11, 1, 0} +} + +// Dimensions are attributes of your data. For example, the dimension +// `userEmail` indicates the email of the user that accessed reporting data. +// Dimension values in report responses are strings. +type AccessDimension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The API name of the dimension. See [Data Access + // Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + // for the list of dimensions supported in this API. + // + // Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + DimensionName string `protobuf:"bytes,1,opt,name=dimension_name,json=dimensionName,proto3" json:"dimension_name,omitempty"` +} + +func (x *AccessDimension) Reset() { + *x = AccessDimension{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessDimension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessDimension) ProtoMessage() {} + +func (x *AccessDimension) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessDimension.ProtoReflect.Descriptor instead. +func (*AccessDimension) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{0} +} + +func (x *AccessDimension) GetDimensionName() string { + if x != nil { + return x.DimensionName + } + return "" +} + +// The quantitative measurements of a report. For example, the metric +// `accessCount` is the total number of data access records. +type AccessMetric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The API name of the metric. See [Data Access + // Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + // for the list of metrics supported in this API. + // + // Metrics are referenced by name in `metricFilter` & `orderBys`. + MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` +} + +func (x *AccessMetric) Reset() { + *x = AccessMetric{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessMetric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessMetric) ProtoMessage() {} + +func (x *AccessMetric) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessMetric.ProtoReflect.Descriptor instead. +func (*AccessMetric) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{1} +} + +func (x *AccessMetric) GetMetricName() string { + if x != nil { + return x.MetricName + } + return "" +} + +// A contiguous range of days: startDate, startDate + 1, ..., endDate. +type AccessDateRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the current time + // in the request's time zone. + StartDate string `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the current + // time in the request's time zone. + EndDate string `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` +} + +func (x *AccessDateRange) Reset() { + *x = AccessDateRange{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessDateRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessDateRange) ProtoMessage() {} + +func (x *AccessDateRange) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessDateRange.ProtoReflect.Descriptor instead. +func (*AccessDateRange) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{2} +} + +func (x *AccessDateRange) GetStartDate() string { + if x != nil { + return x.StartDate + } + return "" +} + +func (x *AccessDateRange) GetEndDate() string { + if x != nil { + return x.EndDate + } + return "" +} + +// Expresses dimension or metric filters. The fields in the same expression need +// to be either all dimensions or all metrics. +type AccessFilterExpression struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify one type of filter expression for `FilterExpression`. + // + // Types that are assignable to OneExpression: + // + // *AccessFilterExpression_AndGroup + // *AccessFilterExpression_OrGroup + // *AccessFilterExpression_NotExpression + // *AccessFilterExpression_AccessFilter + OneExpression isAccessFilterExpression_OneExpression `protobuf_oneof:"one_expression"` +} + +func (x *AccessFilterExpression) Reset() { + *x = AccessFilterExpression{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessFilterExpression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessFilterExpression) ProtoMessage() {} + +func (x *AccessFilterExpression) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessFilterExpression.ProtoReflect.Descriptor instead. +func (*AccessFilterExpression) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{3} +} + +func (m *AccessFilterExpression) GetOneExpression() isAccessFilterExpression_OneExpression { + if m != nil { + return m.OneExpression + } + return nil +} + +func (x *AccessFilterExpression) GetAndGroup() *AccessFilterExpressionList { + if x, ok := x.GetOneExpression().(*AccessFilterExpression_AndGroup); ok { + return x.AndGroup + } + return nil +} + +func (x *AccessFilterExpression) GetOrGroup() *AccessFilterExpressionList { + if x, ok := x.GetOneExpression().(*AccessFilterExpression_OrGroup); ok { + return x.OrGroup + } + return nil +} + +func (x *AccessFilterExpression) GetNotExpression() *AccessFilterExpression { + if x, ok := x.GetOneExpression().(*AccessFilterExpression_NotExpression); ok { + return x.NotExpression + } + return nil +} + +func (x *AccessFilterExpression) GetAccessFilter() *AccessFilter { + if x, ok := x.GetOneExpression().(*AccessFilterExpression_AccessFilter); ok { + return x.AccessFilter + } + return nil +} + +type isAccessFilterExpression_OneExpression interface { + isAccessFilterExpression_OneExpression() +} + +type AccessFilterExpression_AndGroup struct { + // Each of the FilterExpressions in the and_group has an AND relationship. + AndGroup *AccessFilterExpressionList `protobuf:"bytes,1,opt,name=and_group,json=andGroup,proto3,oneof"` +} + +type AccessFilterExpression_OrGroup struct { + // Each of the FilterExpressions in the or_group has an OR relationship. + OrGroup *AccessFilterExpressionList `protobuf:"bytes,2,opt,name=or_group,json=orGroup,proto3,oneof"` +} + +type AccessFilterExpression_NotExpression struct { + // The FilterExpression is NOT of not_expression. + NotExpression *AccessFilterExpression `protobuf:"bytes,3,opt,name=not_expression,json=notExpression,proto3,oneof"` +} + +type AccessFilterExpression_AccessFilter struct { + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + AccessFilter *AccessFilter `protobuf:"bytes,4,opt,name=access_filter,json=accessFilter,proto3,oneof"` +} + +func (*AccessFilterExpression_AndGroup) isAccessFilterExpression_OneExpression() {} + +func (*AccessFilterExpression_OrGroup) isAccessFilterExpression_OneExpression() {} + +func (*AccessFilterExpression_NotExpression) isAccessFilterExpression_OneExpression() {} + +func (*AccessFilterExpression_AccessFilter) isAccessFilterExpression_OneExpression() {} + +// A list of filter expressions. +type AccessFilterExpressionList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of filter expressions. + Expressions []*AccessFilterExpression `protobuf:"bytes,1,rep,name=expressions,proto3" json:"expressions,omitempty"` +} + +func (x *AccessFilterExpressionList) Reset() { + *x = AccessFilterExpressionList{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessFilterExpressionList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessFilterExpressionList) ProtoMessage() {} + +func (x *AccessFilterExpressionList) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessFilterExpressionList.ProtoReflect.Descriptor instead. +func (*AccessFilterExpressionList) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{4} +} + +func (x *AccessFilterExpressionList) GetExpressions() []*AccessFilterExpression { + if x != nil { + return x.Expressions + } + return nil +} + +// An expression to filter dimension or metric values. +type AccessFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify one type of filter for `Filter`. + // + // Types that are assignable to OneFilter: + // + // *AccessFilter_StringFilter + // *AccessFilter_InListFilter + // *AccessFilter_NumericFilter + // *AccessFilter_BetweenFilter + OneFilter isAccessFilter_OneFilter `protobuf_oneof:"one_filter"` + // The dimension name or metric name. + FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` +} + +func (x *AccessFilter) Reset() { + *x = AccessFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessFilter) ProtoMessage() {} + +func (x *AccessFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessFilter.ProtoReflect.Descriptor instead. +func (*AccessFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{5} +} + +func (m *AccessFilter) GetOneFilter() isAccessFilter_OneFilter { + if m != nil { + return m.OneFilter + } + return nil +} + +func (x *AccessFilter) GetStringFilter() *AccessStringFilter { + if x, ok := x.GetOneFilter().(*AccessFilter_StringFilter); ok { + return x.StringFilter + } + return nil +} + +func (x *AccessFilter) GetInListFilter() *AccessInListFilter { + if x, ok := x.GetOneFilter().(*AccessFilter_InListFilter); ok { + return x.InListFilter + } + return nil +} + +func (x *AccessFilter) GetNumericFilter() *AccessNumericFilter { + if x, ok := x.GetOneFilter().(*AccessFilter_NumericFilter); ok { + return x.NumericFilter + } + return nil +} + +func (x *AccessFilter) GetBetweenFilter() *AccessBetweenFilter { + if x, ok := x.GetOneFilter().(*AccessFilter_BetweenFilter); ok { + return x.BetweenFilter + } + return nil +} + +func (x *AccessFilter) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +type isAccessFilter_OneFilter interface { + isAccessFilter_OneFilter() +} + +type AccessFilter_StringFilter struct { + // Strings related filter. + StringFilter *AccessStringFilter `protobuf:"bytes,2,opt,name=string_filter,json=stringFilter,proto3,oneof"` +} + +type AccessFilter_InListFilter struct { + // A filter for in list values. + InListFilter *AccessInListFilter `protobuf:"bytes,3,opt,name=in_list_filter,json=inListFilter,proto3,oneof"` +} + +type AccessFilter_NumericFilter struct { + // A filter for numeric or date values. + NumericFilter *AccessNumericFilter `protobuf:"bytes,4,opt,name=numeric_filter,json=numericFilter,proto3,oneof"` +} + +type AccessFilter_BetweenFilter struct { + // A filter for two values. + BetweenFilter *AccessBetweenFilter `protobuf:"bytes,5,opt,name=between_filter,json=betweenFilter,proto3,oneof"` +} + +func (*AccessFilter_StringFilter) isAccessFilter_OneFilter() {} + +func (*AccessFilter_InListFilter) isAccessFilter_OneFilter() {} + +func (*AccessFilter_NumericFilter) isAccessFilter_OneFilter() {} + +func (*AccessFilter_BetweenFilter) isAccessFilter_OneFilter() {} + +// The filter for strings. +type AccessStringFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The match type for this filter. + MatchType AccessStringFilter_MatchType `protobuf:"varint,1,opt,name=match_type,json=matchType,proto3,enum=google.analytics.admin.v1alpha.AccessStringFilter_MatchType" json:"match_type,omitempty"` + // The string value used for the matching. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // If true, the string value is case sensitive. + CaseSensitive bool `protobuf:"varint,3,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` +} + +func (x *AccessStringFilter) Reset() { + *x = AccessStringFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessStringFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessStringFilter) ProtoMessage() {} + +func (x *AccessStringFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessStringFilter.ProtoReflect.Descriptor instead. +func (*AccessStringFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{6} +} + +func (x *AccessStringFilter) GetMatchType() AccessStringFilter_MatchType { + if x != nil { + return x.MatchType + } + return AccessStringFilter_MATCH_TYPE_UNSPECIFIED +} + +func (x *AccessStringFilter) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *AccessStringFilter) GetCaseSensitive() bool { + if x != nil { + return x.CaseSensitive + } + return false +} + +// The result needs to be in a list of string values. +type AccessInListFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of string values. Must be non-empty. + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + // If true, the string value is case sensitive. + CaseSensitive bool `protobuf:"varint,2,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` +} + +func (x *AccessInListFilter) Reset() { + *x = AccessInListFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessInListFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessInListFilter) ProtoMessage() {} + +func (x *AccessInListFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessInListFilter.ProtoReflect.Descriptor instead. +func (*AccessInListFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{7} +} + +func (x *AccessInListFilter) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +func (x *AccessInListFilter) GetCaseSensitive() bool { + if x != nil { + return x.CaseSensitive + } + return false +} + +// Filters for numeric or date values. +type AccessNumericFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The operation type for this filter. + Operation AccessNumericFilter_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=google.analytics.admin.v1alpha.AccessNumericFilter_Operation" json:"operation,omitempty"` + // A numeric value or a date value. + Value *NumericValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *AccessNumericFilter) Reset() { + *x = AccessNumericFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessNumericFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessNumericFilter) ProtoMessage() {} + +func (x *AccessNumericFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessNumericFilter.ProtoReflect.Descriptor instead. +func (*AccessNumericFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{8} +} + +func (x *AccessNumericFilter) GetOperation() AccessNumericFilter_Operation { + if x != nil { + return x.Operation + } + return AccessNumericFilter_OPERATION_UNSPECIFIED +} + +func (x *AccessNumericFilter) GetValue() *NumericValue { + if x != nil { + return x.Value + } + return nil +} + +// To express that the result needs to be between two numbers (inclusive). +type AccessBetweenFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Begins with this number. + FromValue *NumericValue `protobuf:"bytes,1,opt,name=from_value,json=fromValue,proto3" json:"from_value,omitempty"` + // Ends with this number. + ToValue *NumericValue `protobuf:"bytes,2,opt,name=to_value,json=toValue,proto3" json:"to_value,omitempty"` +} + +func (x *AccessBetweenFilter) Reset() { + *x = AccessBetweenFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessBetweenFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessBetweenFilter) ProtoMessage() {} + +func (x *AccessBetweenFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessBetweenFilter.ProtoReflect.Descriptor instead. +func (*AccessBetweenFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{9} +} + +func (x *AccessBetweenFilter) GetFromValue() *NumericValue { + if x != nil { + return x.FromValue + } + return nil +} + +func (x *AccessBetweenFilter) GetToValue() *NumericValue { + if x != nil { + return x.ToValue + } + return nil +} + +// To represent a number. +type NumericValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // One of a numeric value + // + // Types that are assignable to OneValue: + // + // *NumericValue_Int64Value + // *NumericValue_DoubleValue + OneValue isNumericValue_OneValue `protobuf_oneof:"one_value"` +} + +func (x *NumericValue) Reset() { + *x = NumericValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NumericValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NumericValue) ProtoMessage() {} + +func (x *NumericValue) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NumericValue.ProtoReflect.Descriptor instead. +func (*NumericValue) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{10} +} + +func (m *NumericValue) GetOneValue() isNumericValue_OneValue { + if m != nil { + return m.OneValue + } + return nil +} + +func (x *NumericValue) GetInt64Value() int64 { + if x, ok := x.GetOneValue().(*NumericValue_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (x *NumericValue) GetDoubleValue() float64 { + if x, ok := x.GetOneValue().(*NumericValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +type isNumericValue_OneValue interface { + isNumericValue_OneValue() +} + +type NumericValue_Int64Value struct { + // Integer value + Int64Value int64 `protobuf:"varint,1,opt,name=int64_value,json=int64Value,proto3,oneof"` +} + +type NumericValue_DoubleValue struct { + // Double value + DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +func (*NumericValue_Int64Value) isNumericValue_OneValue() {} + +func (*NumericValue_DoubleValue) isNumericValue_OneValue() {} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending access count is one ordering, and ordering rows +// by the country string is a different ordering. +type AccessOrderBy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify one type of order by for `OrderBy`. + // + // Types that are assignable to OneOrderBy: + // + // *AccessOrderBy_Metric + // *AccessOrderBy_Dimension + OneOrderBy isAccessOrderBy_OneOrderBy `protobuf_oneof:"one_order_by"` + // If true, sorts by descending order. If false or unspecified, sorts in + // ascending order. + Desc bool `protobuf:"varint,3,opt,name=desc,proto3" json:"desc,omitempty"` +} + +func (x *AccessOrderBy) Reset() { + *x = AccessOrderBy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessOrderBy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessOrderBy) ProtoMessage() {} + +func (x *AccessOrderBy) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessOrderBy.ProtoReflect.Descriptor instead. +func (*AccessOrderBy) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{11} +} + +func (m *AccessOrderBy) GetOneOrderBy() isAccessOrderBy_OneOrderBy { + if m != nil { + return m.OneOrderBy + } + return nil +} + +func (x *AccessOrderBy) GetMetric() *AccessOrderBy_MetricOrderBy { + if x, ok := x.GetOneOrderBy().(*AccessOrderBy_Metric); ok { + return x.Metric + } + return nil +} + +func (x *AccessOrderBy) GetDimension() *AccessOrderBy_DimensionOrderBy { + if x, ok := x.GetOneOrderBy().(*AccessOrderBy_Dimension); ok { + return x.Dimension + } + return nil +} + +func (x *AccessOrderBy) GetDesc() bool { + if x != nil { + return x.Desc + } + return false +} + +type isAccessOrderBy_OneOrderBy interface { + isAccessOrderBy_OneOrderBy() +} + +type AccessOrderBy_Metric struct { + // Sorts results by a metric's values. + Metric *AccessOrderBy_MetricOrderBy `protobuf:"bytes,1,opt,name=metric,proto3,oneof"` +} + +type AccessOrderBy_Dimension struct { + // Sorts results by a dimension's values. + Dimension *AccessOrderBy_DimensionOrderBy `protobuf:"bytes,2,opt,name=dimension,proto3,oneof"` +} + +func (*AccessOrderBy_Metric) isAccessOrderBy_OneOrderBy() {} + +func (*AccessOrderBy_Dimension) isAccessOrderBy_OneOrderBy() {} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +type AccessDimensionHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The dimension's name; for example 'userEmail'. + DimensionName string `protobuf:"bytes,1,opt,name=dimension_name,json=dimensionName,proto3" json:"dimension_name,omitempty"` +} + +func (x *AccessDimensionHeader) Reset() { + *x = AccessDimensionHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessDimensionHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessDimensionHeader) ProtoMessage() {} + +func (x *AccessDimensionHeader) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessDimensionHeader.ProtoReflect.Descriptor instead. +func (*AccessDimensionHeader) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{12} +} + +func (x *AccessDimensionHeader) GetDimensionName() string { + if x != nil { + return x.DimensionName + } + return "" +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +type AccessMetricHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The metric's name; for example 'accessCount'. + MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` +} + +func (x *AccessMetricHeader) Reset() { + *x = AccessMetricHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessMetricHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessMetricHeader) ProtoMessage() {} + +func (x *AccessMetricHeader) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessMetricHeader.ProtoReflect.Descriptor instead. +func (*AccessMetricHeader) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{13} +} + +func (x *AccessMetricHeader) GetMetricName() string { + if x != nil { + return x.MetricName + } + return "" +} + +// Access report data for each row. +type AccessRow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of dimension values. These values are in the same order as specified + // in the request. + DimensionValues []*AccessDimensionValue `protobuf:"bytes,1,rep,name=dimension_values,json=dimensionValues,proto3" json:"dimension_values,omitempty"` + // List of metric values. These values are in the same order as specified + // in the request. + MetricValues []*AccessMetricValue `protobuf:"bytes,2,rep,name=metric_values,json=metricValues,proto3" json:"metric_values,omitempty"` +} + +func (x *AccessRow) Reset() { + *x = AccessRow{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessRow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessRow) ProtoMessage() {} + +func (x *AccessRow) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessRow.ProtoReflect.Descriptor instead. +func (*AccessRow) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{14} +} + +func (x *AccessRow) GetDimensionValues() []*AccessDimensionValue { + if x != nil { + return x.DimensionValues + } + return nil +} + +func (x *AccessRow) GetMetricValues() []*AccessMetricValue { + if x != nil { + return x.MetricValues + } + return nil +} + +// The value of a dimension. +type AccessDimensionValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The dimension value. For example, this value may be 'France' for the + // 'country' dimension. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *AccessDimensionValue) Reset() { + *x = AccessDimensionValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessDimensionValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessDimensionValue) ProtoMessage() {} + +func (x *AccessDimensionValue) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessDimensionValue.ProtoReflect.Descriptor instead. +func (*AccessDimensionValue) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{15} +} + +func (x *AccessDimensionValue) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// The value of a metric. +type AccessMetricValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The measurement value. For example, this value may be '13'. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *AccessMetricValue) Reset() { + *x = AccessMetricValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessMetricValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessMetricValue) ProtoMessage() {} + +func (x *AccessMetricValue) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessMetricValue.ProtoReflect.Descriptor instead. +func (*AccessMetricValue) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{16} +} + +func (x *AccessMetricValue) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// Current state of all quotas for this Analytics property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +type AccessQuota struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Properties can use 250,000 tokens per day. Most requests consume fewer than + // 10 tokens. + TokensPerDay *AccessQuotaStatus `protobuf:"bytes,1,opt,name=tokens_per_day,json=tokensPerDay,proto3" json:"tokens_per_day,omitempty"` + // Properties can use 50,000 tokens per hour. An API request consumes a single + // number of tokens, and that number is deducted from both the hourly and + // daily quotas. + TokensPerHour *AccessQuotaStatus `protobuf:"bytes,2,opt,name=tokens_per_hour,json=tokensPerHour,proto3" json:"tokens_per_hour,omitempty"` + // Properties can use up to 50 concurrent requests. + ConcurrentRequests *AccessQuotaStatus `protobuf:"bytes,3,opt,name=concurrent_requests,json=concurrentRequests,proto3" json:"concurrent_requests,omitempty"` + // Properties and cloud project pairs can have up to 50 server errors per + // hour. + ServerErrorsPerProjectPerHour *AccessQuotaStatus `protobuf:"bytes,4,opt,name=server_errors_per_project_per_hour,json=serverErrorsPerProjectPerHour,proto3" json:"server_errors_per_project_per_hour,omitempty"` +} + +func (x *AccessQuota) Reset() { + *x = AccessQuota{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessQuota) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessQuota) ProtoMessage() {} + +func (x *AccessQuota) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessQuota.ProtoReflect.Descriptor instead. +func (*AccessQuota) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{17} +} + +func (x *AccessQuota) GetTokensPerDay() *AccessQuotaStatus { + if x != nil { + return x.TokensPerDay + } + return nil +} + +func (x *AccessQuota) GetTokensPerHour() *AccessQuotaStatus { + if x != nil { + return x.TokensPerHour + } + return nil +} + +func (x *AccessQuota) GetConcurrentRequests() *AccessQuotaStatus { + if x != nil { + return x.ConcurrentRequests + } + return nil +} + +func (x *AccessQuota) GetServerErrorsPerProjectPerHour() *AccessQuotaStatus { + if x != nil { + return x.ServerErrorsPerProjectPerHour + } + return nil +} + +// Current state for a particular quota group. +type AccessQuotaStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Quota consumed by this request. + Consumed int32 `protobuf:"varint,1,opt,name=consumed,proto3" json:"consumed,omitempty"` + // Quota remaining after this request. + Remaining int32 `protobuf:"varint,2,opt,name=remaining,proto3" json:"remaining,omitempty"` +} + +func (x *AccessQuotaStatus) Reset() { + *x = AccessQuotaStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessQuotaStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessQuotaStatus) ProtoMessage() {} + +func (x *AccessQuotaStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessQuotaStatus.ProtoReflect.Descriptor instead. +func (*AccessQuotaStatus) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{18} +} + +func (x *AccessQuotaStatus) GetConsumed() int32 { + if x != nil { + return x.Consumed + } + return 0 +} + +func (x *AccessQuotaStatus) GetRemaining() int32 { + if x != nil { + return x.Remaining + } + return 0 +} + +// Sorts by metric values. +type AccessOrderBy_MetricOrderBy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A metric name in the request to order by. + MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` +} + +func (x *AccessOrderBy_MetricOrderBy) Reset() { + *x = AccessOrderBy_MetricOrderBy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessOrderBy_MetricOrderBy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessOrderBy_MetricOrderBy) ProtoMessage() {} + +func (x *AccessOrderBy_MetricOrderBy) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessOrderBy_MetricOrderBy.ProtoReflect.Descriptor instead. +func (*AccessOrderBy_MetricOrderBy) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *AccessOrderBy_MetricOrderBy) GetMetricName() string { + if x != nil { + return x.MetricName + } + return "" +} + +// Sorts by dimension values. +type AccessOrderBy_DimensionOrderBy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A dimension name in the request to order by. + DimensionName string `protobuf:"bytes,1,opt,name=dimension_name,json=dimensionName,proto3" json:"dimension_name,omitempty"` + // Controls the rule for dimension value ordering. + OrderType AccessOrderBy_DimensionOrderBy_OrderType `protobuf:"varint,2,opt,name=order_type,json=orderType,proto3,enum=google.analytics.admin.v1alpha.AccessOrderBy_DimensionOrderBy_OrderType" json:"order_type,omitempty"` +} + +func (x *AccessOrderBy_DimensionOrderBy) Reset() { + *x = AccessOrderBy_DimensionOrderBy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessOrderBy_DimensionOrderBy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessOrderBy_DimensionOrderBy) ProtoMessage() {} + +func (x *AccessOrderBy_DimensionOrderBy) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessOrderBy_DimensionOrderBy.ProtoReflect.Descriptor instead. +func (*AccessOrderBy_DimensionOrderBy) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP(), []int{11, 1} +} + +func (x *AccessOrderBy_DimensionOrderBy) GetDimensionName() string { + if x != nil { + return x.DimensionName + } + return "" +} + +func (x *AccessOrderBy_DimensionOrderBy) GetOrderType() AccessOrderBy_DimensionOrderBy_OrderType { + if x != nil { + return x.OrderType + } + return AccessOrderBy_DimensionOrderBy_ORDER_TYPE_UNSPECIFIED +} + +var File_google_analytics_admin_v1alpha_access_report_proto protoreflect.FileDescriptor + +var file_google_analytics_admin_v1alpha_access_report_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x22, 0x38, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x69, + 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2f, + 0x0a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1f, + 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x4b, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0x94, 0x03, 0x0a, + 0x16, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x57, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5f, 0x0a, 0x0e, 0x6e, + 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x6e, + 0x6f, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x0d, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x6f, 0x6e, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x1a, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x58, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xae, 0x03, 0x0a, 0x0c, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0d, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x69, 0x6e, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x5c, 0x0a, 0x0e, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x5f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x0d, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0c, + 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xb6, 0x02, 0x0a, + 0x12, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, + 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x85, 0x01, + 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, + 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x58, 0x41, 0x43, 0x54, + 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x53, 0x5f, 0x57, 0x49, 0x54, + 0x48, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x44, 0x53, 0x5f, 0x57, 0x49, 0x54, 0x48, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x53, 0x10, 0x04, + 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x50, 0x10, + 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x47, + 0x45, 0x58, 0x50, 0x10, 0x06, 0x22, 0x53, 0x0a, 0x12, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x49, + 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, + 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0xbe, 0x02, 0x0a, 0x13, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4e, 0x75, 0x6d, + 0x65, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x42, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, 0x5f, + 0x54, 0x48, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, + 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x10, + 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x04, + 0x12, 0x19, 0x0a, 0x15, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, + 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x05, 0x22, 0xab, 0x01, 0x0a, 0x13, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x47, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x07, 0x74, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x63, 0x0a, 0x0c, 0x4e, 0x75, 0x6d, + 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6f, 0x6e, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xac, + 0x04, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, + 0x12, 0x55, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x48, 0x00, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x5e, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x2e, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, + 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x1a, 0x30, 0x0a, 0x0d, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1f, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x8d, 0x02, + 0x0a, 0x10, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x6d, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x67, 0x0a, 0x0a, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x2e, 0x44, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x2e, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x22, 0x69, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x16, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, + 0x4c, 0x50, 0x48, 0x41, 0x4e, 0x55, 0x4d, 0x45, 0x52, 0x49, 0x43, 0x10, 0x01, 0x12, 0x21, 0x0a, + 0x1d, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, + 0x45, 0x5f, 0x41, 0x4c, 0x50, 0x48, 0x41, 0x4e, 0x55, 0x4d, 0x45, 0x52, 0x49, 0x43, 0x10, 0x02, + 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x55, 0x4d, 0x45, 0x52, 0x49, 0x43, 0x10, 0x03, 0x42, 0x0e, 0x0a, + 0x0c, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x22, 0x3e, 0x0a, + 0x15, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x35, 0x0a, + 0x12, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x6f, 0x77, 0x12, 0x5f, 0x0a, 0x10, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x2c, 0x0a, 0x14, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x11, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa3, 0x03, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x51, + 0x75, 0x6f, 0x74, 0x61, 0x12, 0x57, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x44, 0x61, 0x79, 0x12, 0x59, 0x0a, + 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x75, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x73, 0x50, 0x65, 0x72, 0x48, 0x6f, 0x75, 0x72, 0x12, 0x62, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x7c, 0x0a, 0x22, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x68, 0x6f, + 0x75, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x1d, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x50, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x48, 0x6f, 0x75, 0x72, 0x22, 0x4d, 0x0a, 0x11, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x7e, 0x0a, 0x22, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, + 0x11, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_analytics_admin_v1alpha_access_report_proto_rawDescOnce sync.Once + file_google_analytics_admin_v1alpha_access_report_proto_rawDescData = file_google_analytics_admin_v1alpha_access_report_proto_rawDesc +) + +func file_google_analytics_admin_v1alpha_access_report_proto_rawDescGZIP() []byte { + file_google_analytics_admin_v1alpha_access_report_proto_rawDescOnce.Do(func() { + file_google_analytics_admin_v1alpha_access_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_analytics_admin_v1alpha_access_report_proto_rawDescData) + }) + return file_google_analytics_admin_v1alpha_access_report_proto_rawDescData +} + +var file_google_analytics_admin_v1alpha_access_report_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_analytics_admin_v1alpha_access_report_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_google_analytics_admin_v1alpha_access_report_proto_goTypes = []interface{}{ + (AccessStringFilter_MatchType)(0), // 0: google.analytics.admin.v1alpha.AccessStringFilter.MatchType + (AccessNumericFilter_Operation)(0), // 1: google.analytics.admin.v1alpha.AccessNumericFilter.Operation + (AccessOrderBy_DimensionOrderBy_OrderType)(0), // 2: google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType + (*AccessDimension)(nil), // 3: google.analytics.admin.v1alpha.AccessDimension + (*AccessMetric)(nil), // 4: google.analytics.admin.v1alpha.AccessMetric + (*AccessDateRange)(nil), // 5: google.analytics.admin.v1alpha.AccessDateRange + (*AccessFilterExpression)(nil), // 6: google.analytics.admin.v1alpha.AccessFilterExpression + (*AccessFilterExpressionList)(nil), // 7: google.analytics.admin.v1alpha.AccessFilterExpressionList + (*AccessFilter)(nil), // 8: google.analytics.admin.v1alpha.AccessFilter + (*AccessStringFilter)(nil), // 9: google.analytics.admin.v1alpha.AccessStringFilter + (*AccessInListFilter)(nil), // 10: google.analytics.admin.v1alpha.AccessInListFilter + (*AccessNumericFilter)(nil), // 11: google.analytics.admin.v1alpha.AccessNumericFilter + (*AccessBetweenFilter)(nil), // 12: google.analytics.admin.v1alpha.AccessBetweenFilter + (*NumericValue)(nil), // 13: google.analytics.admin.v1alpha.NumericValue + (*AccessOrderBy)(nil), // 14: google.analytics.admin.v1alpha.AccessOrderBy + (*AccessDimensionHeader)(nil), // 15: google.analytics.admin.v1alpha.AccessDimensionHeader + (*AccessMetricHeader)(nil), // 16: google.analytics.admin.v1alpha.AccessMetricHeader + (*AccessRow)(nil), // 17: google.analytics.admin.v1alpha.AccessRow + (*AccessDimensionValue)(nil), // 18: google.analytics.admin.v1alpha.AccessDimensionValue + (*AccessMetricValue)(nil), // 19: google.analytics.admin.v1alpha.AccessMetricValue + (*AccessQuota)(nil), // 20: google.analytics.admin.v1alpha.AccessQuota + (*AccessQuotaStatus)(nil), // 21: google.analytics.admin.v1alpha.AccessQuotaStatus + (*AccessOrderBy_MetricOrderBy)(nil), // 22: google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + (*AccessOrderBy_DimensionOrderBy)(nil), // 23: google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy +} +var file_google_analytics_admin_v1alpha_access_report_proto_depIdxs = []int32{ + 7, // 0: google.analytics.admin.v1alpha.AccessFilterExpression.and_group:type_name -> google.analytics.admin.v1alpha.AccessFilterExpressionList + 7, // 1: google.analytics.admin.v1alpha.AccessFilterExpression.or_group:type_name -> google.analytics.admin.v1alpha.AccessFilterExpressionList + 6, // 2: google.analytics.admin.v1alpha.AccessFilterExpression.not_expression:type_name -> google.analytics.admin.v1alpha.AccessFilterExpression + 8, // 3: google.analytics.admin.v1alpha.AccessFilterExpression.access_filter:type_name -> google.analytics.admin.v1alpha.AccessFilter + 6, // 4: google.analytics.admin.v1alpha.AccessFilterExpressionList.expressions:type_name -> google.analytics.admin.v1alpha.AccessFilterExpression + 9, // 5: google.analytics.admin.v1alpha.AccessFilter.string_filter:type_name -> google.analytics.admin.v1alpha.AccessStringFilter + 10, // 6: google.analytics.admin.v1alpha.AccessFilter.in_list_filter:type_name -> google.analytics.admin.v1alpha.AccessInListFilter + 11, // 7: google.analytics.admin.v1alpha.AccessFilter.numeric_filter:type_name -> google.analytics.admin.v1alpha.AccessNumericFilter + 12, // 8: google.analytics.admin.v1alpha.AccessFilter.between_filter:type_name -> google.analytics.admin.v1alpha.AccessBetweenFilter + 0, // 9: google.analytics.admin.v1alpha.AccessStringFilter.match_type:type_name -> google.analytics.admin.v1alpha.AccessStringFilter.MatchType + 1, // 10: google.analytics.admin.v1alpha.AccessNumericFilter.operation:type_name -> google.analytics.admin.v1alpha.AccessNumericFilter.Operation + 13, // 11: google.analytics.admin.v1alpha.AccessNumericFilter.value:type_name -> google.analytics.admin.v1alpha.NumericValue + 13, // 12: google.analytics.admin.v1alpha.AccessBetweenFilter.from_value:type_name -> google.analytics.admin.v1alpha.NumericValue + 13, // 13: google.analytics.admin.v1alpha.AccessBetweenFilter.to_value:type_name -> google.analytics.admin.v1alpha.NumericValue + 22, // 14: google.analytics.admin.v1alpha.AccessOrderBy.metric:type_name -> google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + 23, // 15: google.analytics.admin.v1alpha.AccessOrderBy.dimension:type_name -> google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + 18, // 16: google.analytics.admin.v1alpha.AccessRow.dimension_values:type_name -> google.analytics.admin.v1alpha.AccessDimensionValue + 19, // 17: google.analytics.admin.v1alpha.AccessRow.metric_values:type_name -> google.analytics.admin.v1alpha.AccessMetricValue + 21, // 18: google.analytics.admin.v1alpha.AccessQuota.tokens_per_day:type_name -> google.analytics.admin.v1alpha.AccessQuotaStatus + 21, // 19: google.analytics.admin.v1alpha.AccessQuota.tokens_per_hour:type_name -> google.analytics.admin.v1alpha.AccessQuotaStatus + 21, // 20: google.analytics.admin.v1alpha.AccessQuota.concurrent_requests:type_name -> google.analytics.admin.v1alpha.AccessQuotaStatus + 21, // 21: google.analytics.admin.v1alpha.AccessQuota.server_errors_per_project_per_hour:type_name -> google.analytics.admin.v1alpha.AccessQuotaStatus + 2, // 22: google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.order_type:type_name -> google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_google_analytics_admin_v1alpha_access_report_proto_init() } +func file_google_analytics_admin_v1alpha_access_report_proto_init() { + if File_google_analytics_admin_v1alpha_access_report_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessDimension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessMetric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessDateRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessFilterExpression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessFilterExpressionList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessStringFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessInListFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessNumericFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessBetweenFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NumericValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessOrderBy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessDimensionHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessMetricHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessRow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessDimensionValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessMetricValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessQuota); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessQuotaStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessOrderBy_MetricOrderBy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessOrderBy_DimensionOrderBy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*AccessFilterExpression_AndGroup)(nil), + (*AccessFilterExpression_OrGroup)(nil), + (*AccessFilterExpression_NotExpression)(nil), + (*AccessFilterExpression_AccessFilter)(nil), + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*AccessFilter_StringFilter)(nil), + (*AccessFilter_InListFilter)(nil), + (*AccessFilter_NumericFilter)(nil), + (*AccessFilter_BetweenFilter)(nil), + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*NumericValue_Int64Value)(nil), + (*NumericValue_DoubleValue)(nil), + } + file_google_analytics_admin_v1alpha_access_report_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*AccessOrderBy_Metric)(nil), + (*AccessOrderBy_Dimension)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_analytics_admin_v1alpha_access_report_proto_rawDesc, + NumEnums: 3, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_analytics_admin_v1alpha_access_report_proto_goTypes, + DependencyIndexes: file_google_analytics_admin_v1alpha_access_report_proto_depIdxs, + EnumInfos: file_google_analytics_admin_v1alpha_access_report_proto_enumTypes, + MessageInfos: file_google_analytics_admin_v1alpha_access_report_proto_msgTypes, + }.Build() + File_google_analytics_admin_v1alpha_access_report_proto = out.File + file_google_analytics_admin_v1alpha_access_report_proto_rawDesc = nil + file_google_analytics_admin_v1alpha_access_report_proto_goTypes = nil + file_google_analytics_admin_v1alpha_access_report_proto_depIdxs = nil +} diff --git a/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go b/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go new file mode 100644 index 000000000000..ef275166d590 --- /dev/null +++ b/analytics/admin/apiv1alpha/adminpb/analytics_admin.pb.go @@ -0,0 +1,13310 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package adminpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The request for a Data Access Record Report. +type RunAccessReportRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Data Access Report is requested for this property. + // For example if "123" is your GA4 property ID, then entity should be + // "properties/123". + Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + // The dimensions requested and displayed in the response. Requests are + // allowed up to 9 dimensions. + Dimensions []*AccessDimension `protobuf:"bytes,2,rep,name=dimensions,proto3" json:"dimensions,omitempty"` + // The metrics requested and displayed in the response. Requests are allowed + // up to 10 metrics. + Metrics []*AccessMetric `protobuf:"bytes,3,rep,name=metrics,proto3" json:"metrics,omitempty"` + // Date ranges of access records to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the access records for the overlapping days is + // included in the response rows for both date ranges. Requests are allowed up + // to 2 date ranges. + DateRanges []*AccessDateRange `protobuf:"bytes,4,rep,name=date_ranges,json=dateRanges,proto3" json:"date_ranges,omitempty"` + // Dimension filters allow you to restrict report response to specific + // dimension values which match the filter. For example, filtering on access + // records of a single user. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + DimensionFilter *AccessFilterExpression `protobuf:"bytes,5,opt,name=dimension_filter,json=dimensionFilter,proto3" json:"dimension_filter,omitempty"` + // Metric filters allow you to restrict report response to specific metric + // values which match the filter. Metric filters are applied after aggregating + // the report's rows, similar to SQL having-clause. Dimensions cannot be used + // in this filter. + MetricFilter *AccessFilterExpression `protobuf:"bytes,6,opt,name=metric_filter,json=metricFilter,proto3" json:"metric_filter,omitempty"` + // The row count of the start row. The first row is counted as row 0. If + // offset is unspecified, it is treated as 0. If offset is zero, then this + // method will return the first page of results with `limit` entries. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + Offset int64 `protobuf:"varint,7,opt,name=offset,proto3" json:"offset,omitempty"` + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 100,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API may return fewer rows than the requested `limit`, if there aren't + // as many remaining rows as the `limit`. For instance, there are fewer than + // 300 possible values for the dimension `country`, so when reporting on only + // `country`, you can't get more than 300 rows, even if you set `limit` to a + // higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + Limit int64 `protobuf:"varint,8,opt,name=limit,proto3" json:"limit,omitempty"` + // This request's time zone if specified. If unspecified, the property's time + // zone is used. The request's time zone is used to interpret the start & end + // dates of the report. + // + // Formatted as strings from the IANA Time Zone database + // (https://www.iana.org/time-zones); for example "America/New_York" or + // "Asia/Tokyo". + TimeZone string `protobuf:"bytes,9,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"` + // Specifies how rows are ordered in the response. + OrderBys []*AccessOrderBy `protobuf:"bytes,10,rep,name=order_bys,json=orderBys,proto3" json:"order_bys,omitempty"` + // Toggles whether to return the current state of this Analytics Property's + // quota. Quota is returned in [AccessQuota](#AccessQuota). + ReturnEntityQuota bool `protobuf:"varint,11,opt,name=return_entity_quota,json=returnEntityQuota,proto3" json:"return_entity_quota,omitempty"` +} + +func (x *RunAccessReportRequest) Reset() { + *x = RunAccessReportRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunAccessReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunAccessReportRequest) ProtoMessage() {} + +func (x *RunAccessReportRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunAccessReportRequest.ProtoReflect.Descriptor instead. +func (*RunAccessReportRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{0} +} + +func (x *RunAccessReportRequest) GetEntity() string { + if x != nil { + return x.Entity + } + return "" +} + +func (x *RunAccessReportRequest) GetDimensions() []*AccessDimension { + if x != nil { + return x.Dimensions + } + return nil +} + +func (x *RunAccessReportRequest) GetMetrics() []*AccessMetric { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *RunAccessReportRequest) GetDateRanges() []*AccessDateRange { + if x != nil { + return x.DateRanges + } + return nil +} + +func (x *RunAccessReportRequest) GetDimensionFilter() *AccessFilterExpression { + if x != nil { + return x.DimensionFilter + } + return nil +} + +func (x *RunAccessReportRequest) GetMetricFilter() *AccessFilterExpression { + if x != nil { + return x.MetricFilter + } + return nil +} + +func (x *RunAccessReportRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *RunAccessReportRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *RunAccessReportRequest) GetTimeZone() string { + if x != nil { + return x.TimeZone + } + return "" +} + +func (x *RunAccessReportRequest) GetOrderBys() []*AccessOrderBy { + if x != nil { + return x.OrderBys + } + return nil +} + +func (x *RunAccessReportRequest) GetReturnEntityQuota() bool { + if x != nil { + return x.ReturnEntityQuota + } + return false +} + +// The customized Data Access Record Report response. +type RunAccessReportResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The header for a column in the report that corresponds to a specific + // dimension. The number of DimensionHeaders and ordering of DimensionHeaders + // matches the dimensions present in rows. + DimensionHeaders []*AccessDimensionHeader `protobuf:"bytes,1,rep,name=dimension_headers,json=dimensionHeaders,proto3" json:"dimension_headers,omitempty"` + // The header for a column in the report that corresponds to a specific + // metric. The number of MetricHeaders and ordering of MetricHeaders matches + // the metrics present in rows. + MetricHeaders []*AccessMetricHeader `protobuf:"bytes,2,rep,name=metric_headers,json=metricHeaders,proto3" json:"metric_headers,omitempty"` + // Rows of dimension value combinations and metric values in the report. + Rows []*AccessRow `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"` + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response, the `limit` request + // parameter, and the `offset` request parameter. For example if a query + // returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + RowCount int32 `protobuf:"varint,4,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"` + // The quota state for this Analytics property including this request. + Quota *AccessQuota `protobuf:"bytes,5,opt,name=quota,proto3" json:"quota,omitempty"` +} + +func (x *RunAccessReportResponse) Reset() { + *x = RunAccessReportResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunAccessReportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunAccessReportResponse) ProtoMessage() {} + +func (x *RunAccessReportResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunAccessReportResponse.ProtoReflect.Descriptor instead. +func (*RunAccessReportResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{1} +} + +func (x *RunAccessReportResponse) GetDimensionHeaders() []*AccessDimensionHeader { + if x != nil { + return x.DimensionHeaders + } + return nil +} + +func (x *RunAccessReportResponse) GetMetricHeaders() []*AccessMetricHeader { + if x != nil { + return x.MetricHeaders + } + return nil +} + +func (x *RunAccessReportResponse) GetRows() []*AccessRow { + if x != nil { + return x.Rows + } + return nil +} + +func (x *RunAccessReportResponse) GetRowCount() int32 { + if x != nil { + return x.RowCount + } + return 0 +} + +func (x *RunAccessReportResponse) GetQuota() *AccessQuota { + if x != nil { + return x.Quota + } + return nil +} + +// Request message for GetAccount RPC. +type GetAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the account to lookup. + // Format: accounts/{account} + // Example: "accounts/100" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAccountRequest) Reset() { + *x = GetAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountRequest) ProtoMessage() {} + +func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead. +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{2} +} + +func (x *GetAccountRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListAccounts RPC. +type ListAccountsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListAccounts` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccounts` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Whether to include soft-deleted (ie: "trashed") Accounts in the + // results. Accounts can be inspected to determine whether they are deleted or + // not. + ShowDeleted bool `protobuf:"varint,3,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` +} + +func (x *ListAccountsRequest) Reset() { + *x = ListAccountsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsRequest) ProtoMessage() {} + +func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListAccountsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAccountsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAccountsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAccountsRequest) GetShowDeleted() bool { + if x != nil { + return x.ShowDeleted + } + return false +} + +// Request message for ListAccounts RPC. +type ListAccountsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Results that were accessible to the caller. + Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAccountsResponse) Reset() { + *x = ListAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsResponse) ProtoMessage() {} + +func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead. +func (*ListAccountsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{4} +} + +func (x *ListAccountsResponse) GetAccounts() []*Account { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *ListAccountsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for DeleteAccount RPC. +type DeleteAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Account to soft-delete. + // Format: accounts/{account} + // Example: "accounts/100" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteAccountRequest) Reset() { + *x = DeleteAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountRequest) ProtoMessage() {} + +func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteAccountRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateAccount RPC. +type UpdateAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The account to update. + // The account's `name` field is used to identify the account. + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateAccountRequest) Reset() { + *x = UpdateAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAccountRequest) ProtoMessage() {} + +func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead. +func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateAccountRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *UpdateAccountRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for ProvisionAccountTicket RPC. +type ProvisionAccountTicketRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The account to create. + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Redirect URI where the user will be sent after accepting Terms of Service. + // Must be configured in Developers Console as a Redirect URI + RedirectUri string `protobuf:"bytes,2,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` +} + +func (x *ProvisionAccountTicketRequest) Reset() { + *x = ProvisionAccountTicketRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProvisionAccountTicketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProvisionAccountTicketRequest) ProtoMessage() {} + +func (x *ProvisionAccountTicketRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProvisionAccountTicketRequest.ProtoReflect.Descriptor instead. +func (*ProvisionAccountTicketRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{7} +} + +func (x *ProvisionAccountTicketRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *ProvisionAccountTicketRequest) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +// Response message for ProvisionAccountTicket RPC. +type ProvisionAccountTicketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The param to be passed in the ToS link. + AccountTicketId string `protobuf:"bytes,1,opt,name=account_ticket_id,json=accountTicketId,proto3" json:"account_ticket_id,omitempty"` +} + +func (x *ProvisionAccountTicketResponse) Reset() { + *x = ProvisionAccountTicketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProvisionAccountTicketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProvisionAccountTicketResponse) ProtoMessage() {} + +func (x *ProvisionAccountTicketResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProvisionAccountTicketResponse.ProtoReflect.Descriptor instead. +func (*ProvisionAccountTicketResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{8} +} + +func (x *ProvisionAccountTicketResponse) GetAccountTicketId() string { + if x != nil { + return x.AccountTicketId + } + return "" +} + +// Request message for GetProperty RPC. +type GetPropertyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the property to lookup. + // Format: properties/{property_id} + // Example: "properties/1000" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPropertyRequest) Reset() { + *x = GetPropertyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPropertyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPropertyRequest) ProtoMessage() {} + +func (x *GetPropertyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPropertyRequest.ProtoReflect.Descriptor instead. +func (*GetPropertyRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{9} +} + +func (x *GetPropertyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListProperties RPC. +type ListPropertiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. An expression for filtering the results of the request. + // Fields eligible for filtering are: + // `parent:`(The resource name of the parent account/property) or + // `ancestor:`(The resource name of the parent account) or + // `firebase_project:`(The id or number of the linked firebase project). + // Some examples of filters: + // + // ``` + // | Filter | Description | + // |-----------------------------|-------------------------------------------| + // | parent:accounts/123 | The account with account id: 123. | + // | parent:properties/123 | The property with property id: 123. | + // | ancestor:accounts/123 | The account with account id: 123. | + // | firebase_project:project-id | The firebase project with id: project-id. | + // | firebase_project:123 | The firebase project with number: 123. | + // ``` + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListProperties` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Whether to include soft-deleted (ie: "trashed") Properties in the + // results. Properties can be inspected to determine whether they are deleted + // or not. + ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` +} + +func (x *ListPropertiesRequest) Reset() { + *x = ListPropertiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPropertiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPropertiesRequest) ProtoMessage() {} + +func (x *ListPropertiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPropertiesRequest.ProtoReflect.Descriptor instead. +func (*ListPropertiesRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{10} +} + +func (x *ListPropertiesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListPropertiesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPropertiesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListPropertiesRequest) GetShowDeleted() bool { + if x != nil { + return x.ShowDeleted + } + return false +} + +// Response message for ListProperties RPC. +type ListPropertiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Results that matched the filter criteria and were accessible to the caller. + Properties []*Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPropertiesResponse) Reset() { + *x = ListPropertiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPropertiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPropertiesResponse) ProtoMessage() {} + +func (x *ListPropertiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPropertiesResponse.ProtoReflect.Descriptor instead. +func (*ListPropertiesResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{11} +} + +func (x *ListPropertiesResponse) GetProperties() []*Property { + if x != nil { + return x.Properties + } + return nil +} + +func (x *ListPropertiesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for UpdateProperty RPC. +type UpdatePropertyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The property to update. + // The property's `name` field is used to identify the property to be + // updated. + Property *Property `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdatePropertyRequest) Reset() { + *x = UpdatePropertyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePropertyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePropertyRequest) ProtoMessage() {} + +func (x *UpdatePropertyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePropertyRequest.ProtoReflect.Descriptor instead. +func (*UpdatePropertyRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdatePropertyRequest) GetProperty() *Property { + if x != nil { + return x.Property + } + return nil +} + +func (x *UpdatePropertyRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for CreateProperty RPC. +type CreatePropertyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The property to create. + // Note: the supplied property must specify its parent. + Property *Property `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"` +} + +func (x *CreatePropertyRequest) Reset() { + *x = CreatePropertyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePropertyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePropertyRequest) ProtoMessage() {} + +func (x *CreatePropertyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePropertyRequest.ProtoReflect.Descriptor instead. +func (*CreatePropertyRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{13} +} + +func (x *CreatePropertyRequest) GetProperty() *Property { + if x != nil { + return x.Property + } + return nil +} + +// Request message for DeleteProperty RPC. +type DeletePropertyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Property to soft-delete. + // Format: properties/{property_id} + // Example: "properties/1000" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeletePropertyRequest) Reset() { + *x = DeletePropertyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePropertyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePropertyRequest) ProtoMessage() {} + +func (x *DeletePropertyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePropertyRequest.ProtoReflect.Descriptor instead. +func (*DeletePropertyRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{14} +} + +func (x *DeletePropertyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for GetUserLink RPC. +type GetUserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: accounts/1234/userLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetUserLinkRequest) Reset() { + *x = GetUserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserLinkRequest) ProtoMessage() {} + +func (x *GetUserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserLinkRequest.ProtoReflect.Descriptor instead. +func (*GetUserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{15} +} + +func (x *GetUserLinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for BatchGetUserLinks RPC. +type BatchGetUserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The account or property that all user links in the request are + // for. The parent of all provided values for the 'names' field must match + // this field. + // Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The names of the user links to retrieve. + // A maximum of 1000 user links can be retrieved in a batch. + // Format: accounts/{accountId}/userLinks/{userLinkId} + Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` +} + +func (x *BatchGetUserLinksRequest) Reset() { + *x = BatchGetUserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchGetUserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchGetUserLinksRequest) ProtoMessage() {} + +func (x *BatchGetUserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchGetUserLinksRequest.ProtoReflect.Descriptor instead. +func (*BatchGetUserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{16} +} + +func (x *BatchGetUserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchGetUserLinksRequest) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +// Response message for BatchGetUserLinks RPC. +type BatchGetUserLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The requested user links. + UserLinks []*UserLink `protobuf:"bytes,1,rep,name=user_links,json=userLinks,proto3" json:"user_links,omitempty"` +} + +func (x *BatchGetUserLinksResponse) Reset() { + *x = BatchGetUserLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchGetUserLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchGetUserLinksResponse) ProtoMessage() {} + +func (x *BatchGetUserLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchGetUserLinksResponse.ProtoReflect.Descriptor instead. +func (*BatchGetUserLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{17} +} + +func (x *BatchGetUserLinksResponse) GetUserLinks() []*UserLink { + if x != nil { + return x.UserLinks + } + return nil +} + +// Request message for ListUserLinks RPC. +type ListUserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of user links to return. + // The service may return fewer than this value. + // If unspecified, at most 200 user links will be returned. + // The maximum value is 500; values above 500 will be coerced to 500. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListUserLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListUserLinks` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListUserLinksRequest) Reset() { + *x = ListUserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUserLinksRequest) ProtoMessage() {} + +func (x *ListUserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUserLinksRequest.ProtoReflect.Descriptor instead. +func (*ListUserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{18} +} + +func (x *ListUserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListUserLinksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListUserLinksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListUserLinks RPC. +type ListUserLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of UserLinks. These will be ordered stably, but in an arbitrary order. + UserLinks []*UserLink `protobuf:"bytes,1,rep,name=user_links,json=userLinks,proto3" json:"user_links,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListUserLinksResponse) Reset() { + *x = ListUserLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUserLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUserLinksResponse) ProtoMessage() {} + +func (x *ListUserLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUserLinksResponse.ProtoReflect.Descriptor instead. +func (*ListUserLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{19} +} + +func (x *ListUserLinksResponse) GetUserLinks() []*UserLink { + if x != nil { + return x.UserLinks + } + return nil +} + +func (x *ListUserLinksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for AuditUserLinks RPC. +type AuditUserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of user links to return. + // The service may return fewer than this value. + // If unspecified, at most 1000 user links will be returned. + // The maximum value is 5000; values above 5000 will be coerced to 5000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `AuditUserLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `AuditUserLinks` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *AuditUserLinksRequest) Reset() { + *x = AuditUserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuditUserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuditUserLinksRequest) ProtoMessage() {} + +func (x *AuditUserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuditUserLinksRequest.ProtoReflect.Descriptor instead. +func (*AuditUserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{20} +} + +func (x *AuditUserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *AuditUserLinksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *AuditUserLinksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for AuditUserLinks RPC. +type AuditUserLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of AuditUserLinks. These will be ordered stably, but in an arbitrary + // order. + UserLinks []*AuditUserLink `protobuf:"bytes,1,rep,name=user_links,json=userLinks,proto3" json:"user_links,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *AuditUserLinksResponse) Reset() { + *x = AuditUserLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuditUserLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuditUserLinksResponse) ProtoMessage() {} + +func (x *AuditUserLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuditUserLinksResponse.ProtoReflect.Descriptor instead. +func (*AuditUserLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{21} +} + +func (x *AuditUserLinksResponse) GetUserLinks() []*AuditUserLink { + if x != nil { + return x.UserLinks + } + return nil +} + +func (x *AuditUserLinksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for CreateUserLink RPC. +// +// Users can have multiple email addresses associated with their Google +// account, and one of these email addresses is the "primary" email address. +// Any of the email addresses associated with a Google account may be used +// for a new UserLink, but the returned UserLink will always contain the +// "primary" email address. As a result, the input and output email address +// for this request may differ. +type CreateUserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. If set, then email the new user notifying them that they've been granted + // permissions to the resource. + NotifyNewUser bool `protobuf:"varint,2,opt,name=notify_new_user,json=notifyNewUser,proto3" json:"notify_new_user,omitempty"` + // Required. The user link to create. + UserLink *UserLink `protobuf:"bytes,3,opt,name=user_link,json=userLink,proto3" json:"user_link,omitempty"` +} + +func (x *CreateUserLinkRequest) Reset() { + *x = CreateUserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateUserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateUserLinkRequest) ProtoMessage() {} + +func (x *CreateUserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateUserLinkRequest.ProtoReflect.Descriptor instead. +func (*CreateUserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{22} +} + +func (x *CreateUserLinkRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateUserLinkRequest) GetNotifyNewUser() bool { + if x != nil { + return x.NotifyNewUser + } + return false +} + +func (x *CreateUserLinkRequest) GetUserLink() *UserLink { + if x != nil { + return x.UserLink + } + return nil +} + +// Request message for BatchCreateUserLinks RPC. +type BatchCreateUserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The account or property that all user links in the request are for. + // This field is required. The parent field in the CreateUserLinkRequest + // messages must either be empty or match this field. + // Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. If set, then email the new users notifying them that they've been granted + // permissions to the resource. Regardless of whether this is set or not, + // notify_new_user field inside each individual request is ignored. + NotifyNewUsers bool `protobuf:"varint,2,opt,name=notify_new_users,json=notifyNewUsers,proto3" json:"notify_new_users,omitempty"` + // Required. The requests specifying the user links to create. + // A maximum of 1000 user links can be created in a batch. + Requests []*CreateUserLinkRequest `protobuf:"bytes,3,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchCreateUserLinksRequest) Reset() { + *x = BatchCreateUserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchCreateUserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateUserLinksRequest) ProtoMessage() {} + +func (x *BatchCreateUserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchCreateUserLinksRequest.ProtoReflect.Descriptor instead. +func (*BatchCreateUserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{23} +} + +func (x *BatchCreateUserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchCreateUserLinksRequest) GetNotifyNewUsers() bool { + if x != nil { + return x.NotifyNewUsers + } + return false +} + +func (x *BatchCreateUserLinksRequest) GetRequests() []*CreateUserLinkRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response message for BatchCreateUserLinks RPC. +type BatchCreateUserLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The user links created. + UserLinks []*UserLink `protobuf:"bytes,1,rep,name=user_links,json=userLinks,proto3" json:"user_links,omitempty"` +} + +func (x *BatchCreateUserLinksResponse) Reset() { + *x = BatchCreateUserLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchCreateUserLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateUserLinksResponse) ProtoMessage() {} + +func (x *BatchCreateUserLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchCreateUserLinksResponse.ProtoReflect.Descriptor instead. +func (*BatchCreateUserLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{24} +} + +func (x *BatchCreateUserLinksResponse) GetUserLinks() []*UserLink { + if x != nil { + return x.UserLinks + } + return nil +} + +// Request message for UpdateUserLink RPC. +type UpdateUserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The user link to update. + UserLink *UserLink `protobuf:"bytes,1,opt,name=user_link,json=userLink,proto3" json:"user_link,omitempty"` +} + +func (x *UpdateUserLinkRequest) Reset() { + *x = UpdateUserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserLinkRequest) ProtoMessage() {} + +func (x *UpdateUserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateUserLinkRequest.ProtoReflect.Descriptor instead. +func (*UpdateUserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{25} +} + +func (x *UpdateUserLinkRequest) GetUserLink() *UserLink { + if x != nil { + return x.UserLink + } + return nil +} + +// Request message for BatchUpdateUserLinks RPC. +type BatchUpdateUserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The account or property that all user links in the request are + // for. The parent field in the UpdateUserLinkRequest messages must either be + // empty or match this field. + // Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + Requests []*UpdateUserLinkRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchUpdateUserLinksRequest) Reset() { + *x = BatchUpdateUserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchUpdateUserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUpdateUserLinksRequest) ProtoMessage() {} + +func (x *BatchUpdateUserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUpdateUserLinksRequest.ProtoReflect.Descriptor instead. +func (*BatchUpdateUserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{26} +} + +func (x *BatchUpdateUserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchUpdateUserLinksRequest) GetRequests() []*UpdateUserLinkRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response message for BatchUpdateUserLinks RPC. +type BatchUpdateUserLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The user links updated. + UserLinks []*UserLink `protobuf:"bytes,1,rep,name=user_links,json=userLinks,proto3" json:"user_links,omitempty"` +} + +func (x *BatchUpdateUserLinksResponse) Reset() { + *x = BatchUpdateUserLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchUpdateUserLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUpdateUserLinksResponse) ProtoMessage() {} + +func (x *BatchUpdateUserLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUpdateUserLinksResponse.ProtoReflect.Descriptor instead. +func (*BatchUpdateUserLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{27} +} + +func (x *BatchUpdateUserLinksResponse) GetUserLinks() []*UserLink { + if x != nil { + return x.UserLinks + } + return nil +} + +// Request message for DeleteUserLink RPC. +type DeleteUserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: accounts/1234/userLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteUserLinkRequest) Reset() { + *x = DeleteUserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteUserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteUserLinkRequest) ProtoMessage() {} + +func (x *DeleteUserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteUserLinkRequest.ProtoReflect.Descriptor instead. +func (*DeleteUserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{28} +} + +func (x *DeleteUserLinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for BatchDeleteUserLinks RPC. +type BatchDeleteUserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The account or property that all user links in the request are + // for. The parent of all values for user link names to delete must match this + // field. + // Example format: accounts/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + Requests []*DeleteUserLinkRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchDeleteUserLinksRequest) Reset() { + *x = BatchDeleteUserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchDeleteUserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchDeleteUserLinksRequest) ProtoMessage() {} + +func (x *BatchDeleteUserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchDeleteUserLinksRequest.ProtoReflect.Descriptor instead. +func (*BatchDeleteUserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{29} +} + +func (x *BatchDeleteUserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchDeleteUserLinksRequest) GetRequests() []*DeleteUserLinkRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Request message for CreateFirebaseLink RPC +type CreateFirebaseLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: properties/{property_id} + // Example: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The Firebase link to create. + FirebaseLink *FirebaseLink `protobuf:"bytes,2,opt,name=firebase_link,json=firebaseLink,proto3" json:"firebase_link,omitempty"` +} + +func (x *CreateFirebaseLinkRequest) Reset() { + *x = CreateFirebaseLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFirebaseLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFirebaseLinkRequest) ProtoMessage() {} + +func (x *CreateFirebaseLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFirebaseLinkRequest.ProtoReflect.Descriptor instead. +func (*CreateFirebaseLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{30} +} + +func (x *CreateFirebaseLinkRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateFirebaseLinkRequest) GetFirebaseLink() *FirebaseLink { + if x != nil { + return x.FirebaseLink + } + return nil +} + +// Request message for DeleteFirebaseLink RPC +type DeleteFirebaseLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + // Example: properties/1234/firebaseLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteFirebaseLinkRequest) Reset() { + *x = DeleteFirebaseLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFirebaseLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFirebaseLinkRequest) ProtoMessage() {} + +func (x *DeleteFirebaseLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFirebaseLinkRequest.ProtoReflect.Descriptor instead. +func (*DeleteFirebaseLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{31} +} + +func (x *DeleteFirebaseLinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListFirebaseLinks RPC +type ListFirebaseLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: properties/{property_id} + // Example: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListFirebaseLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListFirebaseLinksRequest) Reset() { + *x = ListFirebaseLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFirebaseLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFirebaseLinksRequest) ProtoMessage() {} + +func (x *ListFirebaseLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFirebaseLinksRequest.ProtoReflect.Descriptor instead. +func (*ListFirebaseLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{32} +} + +func (x *ListFirebaseLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListFirebaseLinksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFirebaseLinksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListFirebaseLinks RPC +type ListFirebaseLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of FirebaseLinks. This will have at most one value. + FirebaseLinks []*FirebaseLink `protobuf:"bytes,1,rep,name=firebase_links,json=firebaseLinks,proto3" json:"firebase_links,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + // Currently, Google Analytics supports only one FirebaseLink per property, + // so this will never be populated. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFirebaseLinksResponse) Reset() { + *x = ListFirebaseLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFirebaseLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFirebaseLinksResponse) ProtoMessage() {} + +func (x *ListFirebaseLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFirebaseLinksResponse.ProtoReflect.Descriptor instead. +func (*ListFirebaseLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{33} +} + +func (x *ListFirebaseLinksResponse) GetFirebaseLinks() []*FirebaseLink { + if x != nil { + return x.FirebaseLinks + } + return nil +} + +func (x *ListFirebaseLinksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetGlobalSiteTag RPC. +type GetGlobalSiteTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the site tag to lookup. + // Note that site tags are singletons and do not have unique IDs. + // Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + // Example: "properties/123/dataStreams/456/globalSiteTag" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetGlobalSiteTagRequest) Reset() { + *x = GetGlobalSiteTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGlobalSiteTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGlobalSiteTagRequest) ProtoMessage() {} + +func (x *GetGlobalSiteTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGlobalSiteTagRequest.ProtoReflect.Descriptor instead. +func (*GetGlobalSiteTagRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{34} +} + +func (x *GetGlobalSiteTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for CreateGoogleAdsLink RPC +type CreateGoogleAdsLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The GoogleAdsLink to create. + GoogleAdsLink *GoogleAdsLink `protobuf:"bytes,2,opt,name=google_ads_link,json=googleAdsLink,proto3" json:"google_ads_link,omitempty"` +} + +func (x *CreateGoogleAdsLinkRequest) Reset() { + *x = CreateGoogleAdsLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGoogleAdsLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGoogleAdsLinkRequest) ProtoMessage() {} + +func (x *CreateGoogleAdsLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateGoogleAdsLinkRequest.ProtoReflect.Descriptor instead. +func (*CreateGoogleAdsLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{35} +} + +func (x *CreateGoogleAdsLinkRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateGoogleAdsLinkRequest) GetGoogleAdsLink() *GoogleAdsLink { + if x != nil { + return x.GoogleAdsLink + } + return nil +} + +// Request message for UpdateGoogleAdsLink RPC +type UpdateGoogleAdsLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The GoogleAdsLink to update + GoogleAdsLink *GoogleAdsLink `protobuf:"bytes,1,opt,name=google_ads_link,json=googleAdsLink,proto3" json:"google_ads_link,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateGoogleAdsLinkRequest) Reset() { + *x = UpdateGoogleAdsLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGoogleAdsLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGoogleAdsLinkRequest) ProtoMessage() {} + +func (x *UpdateGoogleAdsLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGoogleAdsLinkRequest.ProtoReflect.Descriptor instead. +func (*UpdateGoogleAdsLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{36} +} + +func (x *UpdateGoogleAdsLinkRequest) GetGoogleAdsLink() *GoogleAdsLink { + if x != nil { + return x.GoogleAdsLink + } + return nil +} + +func (x *UpdateGoogleAdsLinkRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for DeleteGoogleAdsLink RPC. +type DeleteGoogleAdsLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234/googleAdsLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteGoogleAdsLinkRequest) Reset() { + *x = DeleteGoogleAdsLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGoogleAdsLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGoogleAdsLinkRequest) ProtoMessage() {} + +func (x *DeleteGoogleAdsLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteGoogleAdsLinkRequest.ProtoReflect.Descriptor instead. +func (*DeleteGoogleAdsLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{37} +} + +func (x *DeleteGoogleAdsLinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListGoogleAdsLinks RPC. +type ListGoogleAdsLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListGoogleAdsLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListGoogleAdsLinks` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListGoogleAdsLinksRequest) Reset() { + *x = ListGoogleAdsLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGoogleAdsLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGoogleAdsLinksRequest) ProtoMessage() {} + +func (x *ListGoogleAdsLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGoogleAdsLinksRequest.ProtoReflect.Descriptor instead. +func (*ListGoogleAdsLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{38} +} + +func (x *ListGoogleAdsLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListGoogleAdsLinksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGoogleAdsLinksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListGoogleAdsLinks RPC. +type ListGoogleAdsLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of GoogleAdsLinks. + GoogleAdsLinks []*GoogleAdsLink `protobuf:"bytes,1,rep,name=google_ads_links,json=googleAdsLinks,proto3" json:"google_ads_links,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListGoogleAdsLinksResponse) Reset() { + *x = ListGoogleAdsLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGoogleAdsLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGoogleAdsLinksResponse) ProtoMessage() {} + +func (x *ListGoogleAdsLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListGoogleAdsLinksResponse.ProtoReflect.Descriptor instead. +func (*ListGoogleAdsLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{39} +} + +func (x *ListGoogleAdsLinksResponse) GetGoogleAdsLinks() []*GoogleAdsLink { + if x != nil { + return x.GoogleAdsLinks + } + return nil +} + +func (x *ListGoogleAdsLinksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetDataSharingSettings RPC. +type GetDataSharingSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the settings to lookup. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDataSharingSettingsRequest) Reset() { + *x = GetDataSharingSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDataSharingSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataSharingSettingsRequest) ProtoMessage() {} + +func (x *GetDataSharingSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataSharingSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetDataSharingSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{40} +} + +func (x *GetDataSharingSettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListAccountSummaries RPC. +type ListAccountSummariesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of AccountSummary resources to return. The service may + // return fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListAccountSummaries` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccountSummaries` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAccountSummariesRequest) Reset() { + *x = ListAccountSummariesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountSummariesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountSummariesRequest) ProtoMessage() {} + +func (x *ListAccountSummariesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountSummariesRequest.ProtoReflect.Descriptor instead. +func (*ListAccountSummariesRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{41} +} + +func (x *ListAccountSummariesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAccountSummariesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListAccountSummaries RPC. +type ListAccountSummariesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Account summaries of all accounts the caller has access to. + AccountSummaries []*AccountSummary `protobuf:"bytes,1,rep,name=account_summaries,json=accountSummaries,proto3" json:"account_summaries,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAccountSummariesResponse) Reset() { + *x = ListAccountSummariesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountSummariesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountSummariesResponse) ProtoMessage() {} + +func (x *ListAccountSummariesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountSummariesResponse.ProtoReflect.Descriptor instead. +func (*ListAccountSummariesResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{42} +} + +func (x *ListAccountSummariesResponse) GetAccountSummaries() []*AccountSummary { + if x != nil { + return x.AccountSummaries + } + return nil +} + +func (x *ListAccountSummariesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for AcknowledgeUserDataCollection RPC. +type AcknowledgeUserDataCollectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The property for which to acknowledge user data collection. + Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"` + // Required. An acknowledgement that the caller of this method understands the terms + // of user data collection. + // + // This field must contain the exact value: + // "I acknowledge that I have the necessary privacy disclosures and rights + // from my end users for the collection and processing of their data, + // including the association of such data with the visitation information + // Google Analytics collects from my site and/or app property." + Acknowledgement string `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` +} + +func (x *AcknowledgeUserDataCollectionRequest) Reset() { + *x = AcknowledgeUserDataCollectionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AcknowledgeUserDataCollectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcknowledgeUserDataCollectionRequest) ProtoMessage() {} + +func (x *AcknowledgeUserDataCollectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcknowledgeUserDataCollectionRequest.ProtoReflect.Descriptor instead. +func (*AcknowledgeUserDataCollectionRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{43} +} + +func (x *AcknowledgeUserDataCollectionRequest) GetProperty() string { + if x != nil { + return x.Property + } + return "" +} + +func (x *AcknowledgeUserDataCollectionRequest) GetAcknowledgement() string { + if x != nil { + return x.Acknowledgement + } + return "" +} + +// Response message for AcknowledgeUserDataCollection RPC. +type AcknowledgeUserDataCollectionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AcknowledgeUserDataCollectionResponse) Reset() { + *x = AcknowledgeUserDataCollectionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AcknowledgeUserDataCollectionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcknowledgeUserDataCollectionResponse) ProtoMessage() {} + +func (x *AcknowledgeUserDataCollectionResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcknowledgeUserDataCollectionResponse.ProtoReflect.Descriptor instead. +func (*AcknowledgeUserDataCollectionResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{44} +} + +// Request message for SearchChangeHistoryEvents RPC. +type SearchChangeHistoryEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The account resource for which to return change history resources. + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Optional. Resource name for a child property. If set, only return changes + // made to this property or its child resources. + Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` + // Optional. If set, only return changes if they are for a resource that matches at + // least one of these types. + ResourceType []ChangeHistoryResourceType `protobuf:"varint,3,rep,packed,name=resource_type,json=resourceType,proto3,enum=google.analytics.admin.v1alpha.ChangeHistoryResourceType" json:"resource_type,omitempty"` + // Optional. If set, only return changes that match one or more of these types of + // actions. + Action []ActionType `protobuf:"varint,4,rep,packed,name=action,proto3,enum=google.analytics.admin.v1alpha.ActionType" json:"action,omitempty"` + // Optional. If set, only return changes if they are made by a user in this list. + ActorEmail []string `protobuf:"bytes,5,rep,name=actor_email,json=actorEmail,proto3" json:"actor_email,omitempty"` + // Optional. If set, only return changes made after this time (inclusive). + EarliestChangeTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=earliest_change_time,json=earliestChangeTime,proto3" json:"earliest_change_time,omitempty"` + // Optional. If set, only return changes made before this time (inclusive). + LatestChangeTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=latest_change_time,json=latestChangeTime,proto3" json:"latest_change_time,omitempty"` + // Optional. The maximum number of ChangeHistoryEvent items to return. + // The service may return fewer than this value, even if there are additional + // pages. If unspecified, at most 50 items will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,8,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `SearchChangeHistoryEvents` must match the call that + // provided the page token. + PageToken string `protobuf:"bytes,9,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *SearchChangeHistoryEventsRequest) Reset() { + *x = SearchChangeHistoryEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchChangeHistoryEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchChangeHistoryEventsRequest) ProtoMessage() {} + +func (x *SearchChangeHistoryEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchChangeHistoryEventsRequest.ProtoReflect.Descriptor instead. +func (*SearchChangeHistoryEventsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{45} +} + +func (x *SearchChangeHistoryEventsRequest) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *SearchChangeHistoryEventsRequest) GetProperty() string { + if x != nil { + return x.Property + } + return "" +} + +func (x *SearchChangeHistoryEventsRequest) GetResourceType() []ChangeHistoryResourceType { + if x != nil { + return x.ResourceType + } + return nil +} + +func (x *SearchChangeHistoryEventsRequest) GetAction() []ActionType { + if x != nil { + return x.Action + } + return nil +} + +func (x *SearchChangeHistoryEventsRequest) GetActorEmail() []string { + if x != nil { + return x.ActorEmail + } + return nil +} + +func (x *SearchChangeHistoryEventsRequest) GetEarliestChangeTime() *timestamppb.Timestamp { + if x != nil { + return x.EarliestChangeTime + } + return nil +} + +func (x *SearchChangeHistoryEventsRequest) GetLatestChangeTime() *timestamppb.Timestamp { + if x != nil { + return x.LatestChangeTime + } + return nil +} + +func (x *SearchChangeHistoryEventsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchChangeHistoryEventsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for SearchAccounts RPC. +type SearchChangeHistoryEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Results that were accessible to the caller. + ChangeHistoryEvents []*ChangeHistoryEvent `protobuf:"bytes,1,rep,name=change_history_events,json=changeHistoryEvents,proto3" json:"change_history_events,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *SearchChangeHistoryEventsResponse) Reset() { + *x = SearchChangeHistoryEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchChangeHistoryEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchChangeHistoryEventsResponse) ProtoMessage() {} + +func (x *SearchChangeHistoryEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchChangeHistoryEventsResponse.ProtoReflect.Descriptor instead. +func (*SearchChangeHistoryEventsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{46} +} + +func (x *SearchChangeHistoryEventsResponse) GetChangeHistoryEvents() []*ChangeHistoryEvent { + if x != nil { + return x.ChangeHistoryEvents + } + return nil +} + +func (x *SearchChangeHistoryEventsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetMeasurementProtocolSecret RPC. +type GetMeasurementProtocolSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the measurement protocol secret to lookup. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetMeasurementProtocolSecretRequest) Reset() { + *x = GetMeasurementProtocolSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMeasurementProtocolSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMeasurementProtocolSecretRequest) ProtoMessage() {} + +func (x *GetMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMeasurementProtocolSecretRequest.ProtoReflect.Descriptor instead. +func (*GetMeasurementProtocolSecretRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{47} +} + +func (x *GetMeasurementProtocolSecretRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for CreateMeasurementProtocolSecret RPC +type CreateMeasurementProtocolSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent resource where this secret will be created. + // Format: properties/{property}/dataStreams/{dataStream} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The measurement protocol secret to create. + MeasurementProtocolSecret *MeasurementProtocolSecret `protobuf:"bytes,2,opt,name=measurement_protocol_secret,json=measurementProtocolSecret,proto3" json:"measurement_protocol_secret,omitempty"` +} + +func (x *CreateMeasurementProtocolSecretRequest) Reset() { + *x = CreateMeasurementProtocolSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateMeasurementProtocolSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateMeasurementProtocolSecretRequest) ProtoMessage() {} + +func (x *CreateMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateMeasurementProtocolSecretRequest.ProtoReflect.Descriptor instead. +func (*CreateMeasurementProtocolSecretRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{48} +} + +func (x *CreateMeasurementProtocolSecretRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateMeasurementProtocolSecretRequest) GetMeasurementProtocolSecret() *MeasurementProtocolSecret { + if x != nil { + return x.MeasurementProtocolSecret + } + return nil +} + +// Request message for DeleteMeasurementProtocolSecret RPC +type DeleteMeasurementProtocolSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the MeasurementProtocolSecret to delete. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteMeasurementProtocolSecretRequest) Reset() { + *x = DeleteMeasurementProtocolSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteMeasurementProtocolSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteMeasurementProtocolSecretRequest) ProtoMessage() {} + +func (x *DeleteMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteMeasurementProtocolSecretRequest.ProtoReflect.Descriptor instead. +func (*DeleteMeasurementProtocolSecretRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{49} +} + +func (x *DeleteMeasurementProtocolSecretRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateMeasurementProtocolSecret RPC +type UpdateMeasurementProtocolSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The measurement protocol secret to update. + MeasurementProtocolSecret *MeasurementProtocolSecret `protobuf:"bytes,1,opt,name=measurement_protocol_secret,json=measurementProtocolSecret,proto3" json:"measurement_protocol_secret,omitempty"` + // The list of fields to be updated. Omitted fields will not be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateMeasurementProtocolSecretRequest) Reset() { + *x = UpdateMeasurementProtocolSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMeasurementProtocolSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMeasurementProtocolSecretRequest) ProtoMessage() {} + +func (x *UpdateMeasurementProtocolSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateMeasurementProtocolSecretRequest.ProtoReflect.Descriptor instead. +func (*UpdateMeasurementProtocolSecretRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{50} +} + +func (x *UpdateMeasurementProtocolSecretRequest) GetMeasurementProtocolSecret() *MeasurementProtocolSecret { + if x != nil { + return x.MeasurementProtocolSecret + } + return nil +} + +func (x *UpdateMeasurementProtocolSecretRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for ListMeasurementProtocolSecret RPC +type ListMeasurementProtocolSecretsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the parent stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 10 resources will be returned. + // The maximum value is 10. Higher values will be coerced to the maximum. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListMeasurementProtocolSecrets` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListMeasurementProtocolSecrets` must match + // the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListMeasurementProtocolSecretsRequest) Reset() { + *x = ListMeasurementProtocolSecretsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMeasurementProtocolSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMeasurementProtocolSecretsRequest) ProtoMessage() {} + +func (x *ListMeasurementProtocolSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMeasurementProtocolSecretsRequest.ProtoReflect.Descriptor instead. +func (*ListMeasurementProtocolSecretsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{51} +} + +func (x *ListMeasurementProtocolSecretsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListMeasurementProtocolSecretsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListMeasurementProtocolSecretsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListMeasurementProtocolSecret RPC +type ListMeasurementProtocolSecretsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of secrets for the parent stream specified in the request. + MeasurementProtocolSecrets []*MeasurementProtocolSecret `protobuf:"bytes,1,rep,name=measurement_protocol_secrets,json=measurementProtocolSecrets,proto3" json:"measurement_protocol_secrets,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListMeasurementProtocolSecretsResponse) Reset() { + *x = ListMeasurementProtocolSecretsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMeasurementProtocolSecretsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMeasurementProtocolSecretsResponse) ProtoMessage() {} + +func (x *ListMeasurementProtocolSecretsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMeasurementProtocolSecretsResponse.ProtoReflect.Descriptor instead. +func (*ListMeasurementProtocolSecretsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{52} +} + +func (x *ListMeasurementProtocolSecretsResponse) GetMeasurementProtocolSecrets() []*MeasurementProtocolSecret { + if x != nil { + return x.MeasurementProtocolSecrets + } + return nil +} + +func (x *ListMeasurementProtocolSecretsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetGoogleSignalsSettings RPC +type GetGoogleSignalsSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the google signals settings to retrieve. + // Format: properties/{property}/googleSignalsSettings + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetGoogleSignalsSettingsRequest) Reset() { + *x = GetGoogleSignalsSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGoogleSignalsSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGoogleSignalsSettingsRequest) ProtoMessage() {} + +func (x *GetGoogleSignalsSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGoogleSignalsSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetGoogleSignalsSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{53} +} + +func (x *GetGoogleSignalsSettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateGoogleSignalsSettings RPC +type UpdateGoogleSignalsSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + GoogleSignalsSettings *GoogleSignalsSettings `protobuf:"bytes,1,opt,name=google_signals_settings,json=googleSignalsSettings,proto3" json:"google_signals_settings,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateGoogleSignalsSettingsRequest) Reset() { + *x = UpdateGoogleSignalsSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGoogleSignalsSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGoogleSignalsSettingsRequest) ProtoMessage() {} + +func (x *UpdateGoogleSignalsSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateGoogleSignalsSettingsRequest.ProtoReflect.Descriptor instead. +func (*UpdateGoogleSignalsSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{54} +} + +func (x *UpdateGoogleSignalsSettingsRequest) GetGoogleSignalsSettings() *GoogleSignalsSettings { + if x != nil { + return x.GoogleSignalsSettings + } + return nil +} + +func (x *UpdateGoogleSignalsSettingsRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for CreateConversionEvent RPC +type CreateConversionEventRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The conversion event to create. + ConversionEvent *ConversionEvent `protobuf:"bytes,1,opt,name=conversion_event,json=conversionEvent,proto3" json:"conversion_event,omitempty"` + // Required. The resource name of the parent property where this conversion event will + // be created. Format: properties/123 + Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *CreateConversionEventRequest) Reset() { + *x = CreateConversionEventRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateConversionEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConversionEventRequest) ProtoMessage() {} + +func (x *CreateConversionEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateConversionEventRequest.ProtoReflect.Descriptor instead. +func (*CreateConversionEventRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{55} +} + +func (x *CreateConversionEventRequest) GetConversionEvent() *ConversionEvent { + if x != nil { + return x.ConversionEvent + } + return nil +} + +func (x *CreateConversionEventRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +// Request message for GetConversionEvent RPC +type GetConversionEventRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the conversion event to retrieve. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetConversionEventRequest) Reset() { + *x = GetConversionEventRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversionEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversionEventRequest) ProtoMessage() {} + +func (x *GetConversionEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConversionEventRequest.ProtoReflect.Descriptor instead. +func (*GetConversionEventRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{56} +} + +func (x *GetConversionEventRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for DeleteConversionEvent RPC +type DeleteConversionEventRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the conversion event to delete. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteConversionEventRequest) Reset() { + *x = DeleteConversionEventRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteConversionEventRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteConversionEventRequest) ProtoMessage() {} + +func (x *DeleteConversionEventRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteConversionEventRequest.ProtoReflect.Descriptor instead. +func (*DeleteConversionEventRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{57} +} + +func (x *DeleteConversionEventRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListConversionEvents RPC +type ListConversionEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the parent property. + // Example: 'properties/123' + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListConversionEvents` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListConversionEvents` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListConversionEventsRequest) Reset() { + *x = ListConversionEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListConversionEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConversionEventsRequest) ProtoMessage() {} + +func (x *ListConversionEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConversionEventsRequest.ProtoReflect.Descriptor instead. +func (*ListConversionEventsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{58} +} + +func (x *ListConversionEventsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListConversionEventsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListConversionEventsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListConversionEvents RPC. +type ListConversionEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The requested conversion events + ConversionEvents []*ConversionEvent `protobuf:"bytes,1,rep,name=conversion_events,json=conversionEvents,proto3" json:"conversion_events,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListConversionEventsResponse) Reset() { + *x = ListConversionEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListConversionEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConversionEventsResponse) ProtoMessage() {} + +func (x *ListConversionEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConversionEventsResponse.ProtoReflect.Descriptor instead. +func (*ListConversionEventsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{59} +} + +func (x *ListConversionEventsResponse) GetConversionEvents() []*ConversionEvent { + if x != nil { + return x.ConversionEvents + } + return nil +} + +func (x *ListConversionEventsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetDisplayVideo360AdvertiserLink RPC. +type GetDisplayVideo360AdvertiserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DisplayVideo360AdvertiserLink to get. + // Example format: properties/1234/displayVideo360AdvertiserLink/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDisplayVideo360AdvertiserLinkRequest) Reset() { + *x = GetDisplayVideo360AdvertiserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDisplayVideo360AdvertiserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} + +func (x *GetDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDisplayVideo360AdvertiserLinkRequest.ProtoReflect.Descriptor instead. +func (*GetDisplayVideo360AdvertiserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{60} +} + +func (x *GetDisplayVideo360AdvertiserLinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListDisplayVideo360AdvertiserLinks RPC. +type ListDisplayVideo360AdvertiserLinksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDisplayVideo360AdvertiserLinks` must match the call that provided the + // page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDisplayVideo360AdvertiserLinksRequest) Reset() { + *x = ListDisplayVideo360AdvertiserLinksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisplayVideo360AdvertiserLinksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisplayVideo360AdvertiserLinksRequest) ProtoMessage() {} + +func (x *ListDisplayVideo360AdvertiserLinksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisplayVideo360AdvertiserLinksRequest.ProtoReflect.Descriptor instead. +func (*ListDisplayVideo360AdvertiserLinksRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{61} +} + +func (x *ListDisplayVideo360AdvertiserLinksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDisplayVideo360AdvertiserLinksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDisplayVideo360AdvertiserLinksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListDisplayVideo360AdvertiserLinks RPC. +type ListDisplayVideo360AdvertiserLinksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of DisplayVideo360AdvertiserLinks. + DisplayVideo_360AdvertiserLinks []*DisplayVideo360AdvertiserLink `protobuf:"bytes,1,rep,name=display_video_360_advertiser_links,json=displayVideo360AdvertiserLinks,proto3" json:"display_video_360_advertiser_links,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDisplayVideo360AdvertiserLinksResponse) Reset() { + *x = ListDisplayVideo360AdvertiserLinksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisplayVideo360AdvertiserLinksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisplayVideo360AdvertiserLinksResponse) ProtoMessage() {} + +func (x *ListDisplayVideo360AdvertiserLinksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisplayVideo360AdvertiserLinksResponse.ProtoReflect.Descriptor instead. +func (*ListDisplayVideo360AdvertiserLinksResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{62} +} + +func (x *ListDisplayVideo360AdvertiserLinksResponse) GetDisplayVideo_360AdvertiserLinks() []*DisplayVideo360AdvertiserLink { + if x != nil { + return x.DisplayVideo_360AdvertiserLinks + } + return nil +} + +func (x *ListDisplayVideo360AdvertiserLinksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for CreateDisplayVideo360AdvertiserLink RPC. +type CreateDisplayVideo360AdvertiserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The DisplayVideo360AdvertiserLink to create. + DisplayVideo_360AdvertiserLink *DisplayVideo360AdvertiserLink `protobuf:"bytes,2,opt,name=display_video_360_advertiser_link,json=displayVideo360AdvertiserLink,proto3" json:"display_video_360_advertiser_link,omitempty"` +} + +func (x *CreateDisplayVideo360AdvertiserLinkRequest) Reset() { + *x = CreateDisplayVideo360AdvertiserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDisplayVideo360AdvertiserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} + +func (x *CreateDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDisplayVideo360AdvertiserLinkRequest.ProtoReflect.Descriptor instead. +func (*CreateDisplayVideo360AdvertiserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{63} +} + +func (x *CreateDisplayVideo360AdvertiserLinkRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDisplayVideo360AdvertiserLinkRequest) GetDisplayVideo_360AdvertiserLink() *DisplayVideo360AdvertiserLink { + if x != nil { + return x.DisplayVideo_360AdvertiserLink + } + return nil +} + +// Request message for DeleteDisplayVideo360AdvertiserLink RPC. +type DeleteDisplayVideo360AdvertiserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DisplayVideo360AdvertiserLink to delete. + // Example format: properties/1234/displayVideo360AdvertiserLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteDisplayVideo360AdvertiserLinkRequest) Reset() { + *x = DeleteDisplayVideo360AdvertiserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDisplayVideo360AdvertiserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} + +func (x *DeleteDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDisplayVideo360AdvertiserLinkRequest.ProtoReflect.Descriptor instead. +func (*DeleteDisplayVideo360AdvertiserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{64} +} + +func (x *DeleteDisplayVideo360AdvertiserLinkRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateDisplayVideo360AdvertiserLink RPC. +type UpdateDisplayVideo360AdvertiserLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The DisplayVideo360AdvertiserLink to update + DisplayVideo_360AdvertiserLink *DisplayVideo360AdvertiserLink `protobuf:"bytes,1,opt,name=display_video_360_advertiser_link,json=displayVideo360AdvertiserLink,proto3" json:"display_video_360_advertiser_link,omitempty"` + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateDisplayVideo360AdvertiserLinkRequest) Reset() { + *x = UpdateDisplayVideo360AdvertiserLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDisplayVideo360AdvertiserLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDisplayVideo360AdvertiserLinkRequest) ProtoMessage() {} + +func (x *UpdateDisplayVideo360AdvertiserLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDisplayVideo360AdvertiserLinkRequest.ProtoReflect.Descriptor instead. +func (*UpdateDisplayVideo360AdvertiserLinkRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{65} +} + +func (x *UpdateDisplayVideo360AdvertiserLinkRequest) GetDisplayVideo_360AdvertiserLink() *DisplayVideo360AdvertiserLink { + if x != nil { + return x.DisplayVideo_360AdvertiserLink + } + return nil +} + +func (x *UpdateDisplayVideo360AdvertiserLinkRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for GetDisplayVideo360AdvertiserLinkProposal RPC. +type GetDisplayVideo360AdvertiserLinkProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) Reset() { + *x = GetDisplayVideo360AdvertiserLinkProposalRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} + +func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDisplayVideo360AdvertiserLinkProposalRequest.ProtoReflect.Descriptor instead. +func (*GetDisplayVideo360AdvertiserLinkProposalRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{66} +} + +func (x *GetDisplayVideo360AdvertiserLinkProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListDisplayVideo360AdvertiserLinkProposals RPC. +type ListDisplayVideo360AdvertiserLinkProposalsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous + // `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + // the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDisplayVideo360AdvertiserLinkProposals` must match the call that + // provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) Reset() { + *x = ListDisplayVideo360AdvertiserLinkProposalsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisplayVideo360AdvertiserLinkProposalsRequest) ProtoMessage() {} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisplayVideo360AdvertiserLinkProposalsRequest.ProtoReflect.Descriptor instead. +func (*ListDisplayVideo360AdvertiserLinkProposalsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{67} +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListDisplayVideo360AdvertiserLinkProposals RPC. +type ListDisplayVideo360AdvertiserLinkProposalsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of DisplayVideo360AdvertiserLinkProposals. + DisplayVideo_360AdvertiserLinkProposals []*DisplayVideo360AdvertiserLinkProposal `protobuf:"bytes,1,rep,name=display_video_360_advertiser_link_proposals,json=displayVideo360AdvertiserLinkProposals,proto3" json:"display_video_360_advertiser_link_proposals,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) Reset() { + *x = ListDisplayVideo360AdvertiserLinkProposalsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDisplayVideo360AdvertiserLinkProposalsResponse) ProtoMessage() {} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDisplayVideo360AdvertiserLinkProposalsResponse.ProtoReflect.Descriptor instead. +func (*ListDisplayVideo360AdvertiserLinkProposalsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{68} +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) GetDisplayVideo_360AdvertiserLinkProposals() []*DisplayVideo360AdvertiserLinkProposal { + if x != nil { + return x.DisplayVideo_360AdvertiserLinkProposals + } + return nil +} + +func (x *ListDisplayVideo360AdvertiserLinkProposalsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for CreateDisplayVideo360AdvertiserLinkProposal RPC. +type CreateDisplayVideo360AdvertiserLinkProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The DisplayVideo360AdvertiserLinkProposal to create. + DisplayVideo_360AdvertiserLinkProposal *DisplayVideo360AdvertiserLinkProposal `protobuf:"bytes,2,opt,name=display_video_360_advertiser_link_proposal,json=displayVideo360AdvertiserLinkProposal,proto3" json:"display_video_360_advertiser_link_proposal,omitempty"` +} + +func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) Reset() { + *x = CreateDisplayVideo360AdvertiserLinkProposalRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} + +func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDisplayVideo360AdvertiserLinkProposalRequest.ProtoReflect.Descriptor instead. +func (*CreateDisplayVideo360AdvertiserLinkProposalRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{69} +} + +func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDisplayVideo360AdvertiserLinkProposalRequest) GetDisplayVideo_360AdvertiserLinkProposal() *DisplayVideo360AdvertiserLinkProposal { + if x != nil { + return x.DisplayVideo_360AdvertiserLinkProposal + } + return nil +} + +// Request message for DeleteDisplayVideo360AdvertiserLinkProposal RPC. +type DeleteDisplayVideo360AdvertiserLinkProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) Reset() { + *x = DeleteDisplayVideo360AdvertiserLinkProposalRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} + +func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDisplayVideo360AdvertiserLinkProposalRequest.ProtoReflect.Descriptor instead. +func (*DeleteDisplayVideo360AdvertiserLinkProposalRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{70} +} + +func (x *DeleteDisplayVideo360AdvertiserLinkProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ApproveDisplayVideo360AdvertiserLinkProposal RPC. +type ApproveDisplayVideo360AdvertiserLinkProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) Reset() { + *x = ApproveDisplayVideo360AdvertiserLinkProposalRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveDisplayVideo360AdvertiserLinkProposalRequest.ProtoReflect.Descriptor instead. +func (*ApproveDisplayVideo360AdvertiserLinkProposalRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{71} +} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Response message for ApproveDisplayVideo360AdvertiserLinkProposal RPC. +type ApproveDisplayVideo360AdvertiserLinkProposalResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The DisplayVideo360AdvertiserLink created as a result of approving the + // proposal. + DisplayVideo_360AdvertiserLink *DisplayVideo360AdvertiserLink `protobuf:"bytes,1,opt,name=display_video_360_advertiser_link,json=displayVideo360AdvertiserLink,proto3" json:"display_video_360_advertiser_link,omitempty"` +} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) Reset() { + *x = ApproveDisplayVideo360AdvertiserLinkProposalResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveDisplayVideo360AdvertiserLinkProposalResponse) ProtoMessage() {} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveDisplayVideo360AdvertiserLinkProposalResponse.ProtoReflect.Descriptor instead. +func (*ApproveDisplayVideo360AdvertiserLinkProposalResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{72} +} + +func (x *ApproveDisplayVideo360AdvertiserLinkProposalResponse) GetDisplayVideo_360AdvertiserLink() *DisplayVideo360AdvertiserLink { + if x != nil { + return x.DisplayVideo_360AdvertiserLink + } + return nil +} + +// Request message for CancelDisplayVideo360AdvertiserLinkProposal RPC. +type CancelDisplayVideo360AdvertiserLinkProposalRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) Reset() { + *x = CancelDisplayVideo360AdvertiserLinkProposalRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelDisplayVideo360AdvertiserLinkProposalRequest) ProtoMessage() {} + +func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelDisplayVideo360AdvertiserLinkProposalRequest.ProtoReflect.Descriptor instead. +func (*CancelDisplayVideo360AdvertiserLinkProposalRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{73} +} + +func (x *CancelDisplayVideo360AdvertiserLinkProposalRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for CreateCustomDimension RPC. +type CreateCustomDimensionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The CustomDimension to create. + CustomDimension *CustomDimension `protobuf:"bytes,2,opt,name=custom_dimension,json=customDimension,proto3" json:"custom_dimension,omitempty"` +} + +func (x *CreateCustomDimensionRequest) Reset() { + *x = CreateCustomDimensionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateCustomDimensionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateCustomDimensionRequest) ProtoMessage() {} + +func (x *CreateCustomDimensionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateCustomDimensionRequest.ProtoReflect.Descriptor instead. +func (*CreateCustomDimensionRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{74} +} + +func (x *CreateCustomDimensionRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateCustomDimensionRequest) GetCustomDimension() *CustomDimension { + if x != nil { + return x.CustomDimension + } + return nil +} + +// Request message for UpdateCustomDimension RPC. +type UpdateCustomDimensionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The CustomDimension to update + CustomDimension *CustomDimension `protobuf:"bytes,1,opt,name=custom_dimension,json=customDimension,proto3" json:"custom_dimension,omitempty"` + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateCustomDimensionRequest) Reset() { + *x = UpdateCustomDimensionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateCustomDimensionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateCustomDimensionRequest) ProtoMessage() {} + +func (x *UpdateCustomDimensionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateCustomDimensionRequest.ProtoReflect.Descriptor instead. +func (*UpdateCustomDimensionRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{75} +} + +func (x *UpdateCustomDimensionRequest) GetCustomDimension() *CustomDimension { + if x != nil { + return x.CustomDimension + } + return nil +} + +func (x *UpdateCustomDimensionRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for ListCustomDimensions RPC. +type ListCustomDimensionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListCustomDimensions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomDimensions` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListCustomDimensionsRequest) Reset() { + *x = ListCustomDimensionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCustomDimensionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCustomDimensionsRequest) ProtoMessage() {} + +func (x *ListCustomDimensionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCustomDimensionsRequest.ProtoReflect.Descriptor instead. +func (*ListCustomDimensionsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{76} +} + +func (x *ListCustomDimensionsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListCustomDimensionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListCustomDimensionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListCustomDimensions RPC. +type ListCustomDimensionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of CustomDimensions. + CustomDimensions []*CustomDimension `protobuf:"bytes,1,rep,name=custom_dimensions,json=customDimensions,proto3" json:"custom_dimensions,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListCustomDimensionsResponse) Reset() { + *x = ListCustomDimensionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCustomDimensionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCustomDimensionsResponse) ProtoMessage() {} + +func (x *ListCustomDimensionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCustomDimensionsResponse.ProtoReflect.Descriptor instead. +func (*ListCustomDimensionsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{77} +} + +func (x *ListCustomDimensionsResponse) GetCustomDimensions() []*CustomDimension { + if x != nil { + return x.CustomDimensions + } + return nil +} + +func (x *ListCustomDimensionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for ArchiveCustomDimension RPC. +type ArchiveCustomDimensionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the CustomDimension to archive. + // Example format: properties/1234/customDimensions/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ArchiveCustomDimensionRequest) Reset() { + *x = ArchiveCustomDimensionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveCustomDimensionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveCustomDimensionRequest) ProtoMessage() {} + +func (x *ArchiveCustomDimensionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveCustomDimensionRequest.ProtoReflect.Descriptor instead. +func (*ArchiveCustomDimensionRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{78} +} + +func (x *ArchiveCustomDimensionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for GetCustomDimension RPC. +type GetCustomDimensionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the CustomDimension to get. + // Example format: properties/1234/customDimensions/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetCustomDimensionRequest) Reset() { + *x = GetCustomDimensionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCustomDimensionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCustomDimensionRequest) ProtoMessage() {} + +func (x *GetCustomDimensionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCustomDimensionRequest.ProtoReflect.Descriptor instead. +func (*GetCustomDimensionRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{79} +} + +func (x *GetCustomDimensionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for CreateCustomMetric RPC. +type CreateCustomMetricRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The CustomMetric to create. + CustomMetric *CustomMetric `protobuf:"bytes,2,opt,name=custom_metric,json=customMetric,proto3" json:"custom_metric,omitempty"` +} + +func (x *CreateCustomMetricRequest) Reset() { + *x = CreateCustomMetricRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateCustomMetricRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateCustomMetricRequest) ProtoMessage() {} + +func (x *CreateCustomMetricRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateCustomMetricRequest.ProtoReflect.Descriptor instead. +func (*CreateCustomMetricRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{80} +} + +func (x *CreateCustomMetricRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateCustomMetricRequest) GetCustomMetric() *CustomMetric { + if x != nil { + return x.CustomMetric + } + return nil +} + +// Request message for UpdateCustomMetric RPC. +type UpdateCustomMetricRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The CustomMetric to update + CustomMetric *CustomMetric `protobuf:"bytes,1,opt,name=custom_metric,json=customMetric,proto3" json:"custom_metric,omitempty"` + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateCustomMetricRequest) Reset() { + *x = UpdateCustomMetricRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateCustomMetricRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateCustomMetricRequest) ProtoMessage() {} + +func (x *UpdateCustomMetricRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateCustomMetricRequest.ProtoReflect.Descriptor instead. +func (*UpdateCustomMetricRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{81} +} + +func (x *UpdateCustomMetricRequest) GetCustomMetric() *CustomMetric { + if x != nil { + return x.CustomMetric + } + return nil +} + +func (x *UpdateCustomMetricRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for ListCustomMetrics RPC. +type ListCustomMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListCustomMetrics` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomMetrics` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListCustomMetricsRequest) Reset() { + *x = ListCustomMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCustomMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCustomMetricsRequest) ProtoMessage() {} + +func (x *ListCustomMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCustomMetricsRequest.ProtoReflect.Descriptor instead. +func (*ListCustomMetricsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{82} +} + +func (x *ListCustomMetricsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListCustomMetricsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListCustomMetricsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListCustomMetrics RPC. +type ListCustomMetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of CustomMetrics. + CustomMetrics []*CustomMetric `protobuf:"bytes,1,rep,name=custom_metrics,json=customMetrics,proto3" json:"custom_metrics,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListCustomMetricsResponse) Reset() { + *x = ListCustomMetricsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCustomMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCustomMetricsResponse) ProtoMessage() {} + +func (x *ListCustomMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCustomMetricsResponse.ProtoReflect.Descriptor instead. +func (*ListCustomMetricsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{83} +} + +func (x *ListCustomMetricsResponse) GetCustomMetrics() []*CustomMetric { + if x != nil { + return x.CustomMetrics + } + return nil +} + +func (x *ListCustomMetricsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for ArchiveCustomMetric RPC. +type ArchiveCustomMetricRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the CustomMetric to archive. + // Example format: properties/1234/customMetrics/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ArchiveCustomMetricRequest) Reset() { + *x = ArchiveCustomMetricRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveCustomMetricRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveCustomMetricRequest) ProtoMessage() {} + +func (x *ArchiveCustomMetricRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveCustomMetricRequest.ProtoReflect.Descriptor instead. +func (*ArchiveCustomMetricRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{84} +} + +func (x *ArchiveCustomMetricRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for GetCustomMetric RPC. +type GetCustomMetricRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the CustomMetric to get. + // Example format: properties/1234/customMetrics/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetCustomMetricRequest) Reset() { + *x = GetCustomMetricRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCustomMetricRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCustomMetricRequest) ProtoMessage() {} + +func (x *GetCustomMetricRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCustomMetricRequest.ProtoReflect.Descriptor instead. +func (*GetCustomMetricRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{85} +} + +func (x *GetCustomMetricRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for GetDataRetentionSettings RPC. +type GetDataRetentionSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the settings to lookup. + // Format: + // properties/{property}/dataRetentionSettings + // Example: "properties/1000/dataRetentionSettings" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDataRetentionSettingsRequest) Reset() { + *x = GetDataRetentionSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDataRetentionSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataRetentionSettingsRequest) ProtoMessage() {} + +func (x *GetDataRetentionSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataRetentionSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetDataRetentionSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{86} +} + +func (x *GetDataRetentionSettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateDataRetentionSettings RPC. +type UpdateDataRetentionSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + DataRetentionSettings *DataRetentionSettings `protobuf:"bytes,1,opt,name=data_retention_settings,json=dataRetentionSettings,proto3" json:"data_retention_settings,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateDataRetentionSettingsRequest) Reset() { + *x = UpdateDataRetentionSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDataRetentionSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDataRetentionSettingsRequest) ProtoMessage() {} + +func (x *UpdateDataRetentionSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDataRetentionSettingsRequest.ProtoReflect.Descriptor instead. +func (*UpdateDataRetentionSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{87} +} + +func (x *UpdateDataRetentionSettingsRequest) GetDataRetentionSettings() *DataRetentionSettings { + if x != nil { + return x.DataRetentionSettings + } + return nil +} + +func (x *UpdateDataRetentionSettingsRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for CreateDataStream RPC. +type CreateDataStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The DataStream to create. + DataStream *DataStream `protobuf:"bytes,2,opt,name=data_stream,json=dataStream,proto3" json:"data_stream,omitempty"` +} + +func (x *CreateDataStreamRequest) Reset() { + *x = CreateDataStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDataStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDataStreamRequest) ProtoMessage() {} + +func (x *CreateDataStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDataStreamRequest.ProtoReflect.Descriptor instead. +func (*CreateDataStreamRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{88} +} + +func (x *CreateDataStreamRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDataStreamRequest) GetDataStream() *DataStream { + if x != nil { + return x.DataStream + } + return nil +} + +// Request message for DeleteDataStream RPC. +type DeleteDataStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DataStream to delete. + // Example format: properties/1234/dataStreams/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteDataStreamRequest) Reset() { + *x = DeleteDataStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDataStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDataStreamRequest) ProtoMessage() {} + +func (x *DeleteDataStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDataStreamRequest.ProtoReflect.Descriptor instead. +func (*DeleteDataStreamRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{89} +} + +func (x *DeleteDataStreamRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateDataStream RPC. +type UpdateDataStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The DataStream to update + DataStream *DataStream `protobuf:"bytes,1,opt,name=data_stream,json=dataStream,proto3" json:"data_stream,omitempty"` + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateDataStreamRequest) Reset() { + *x = UpdateDataStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDataStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDataStreamRequest) ProtoMessage() {} + +func (x *UpdateDataStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDataStreamRequest.ProtoReflect.Descriptor instead. +func (*UpdateDataStreamRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{90} +} + +func (x *UpdateDataStreamRequest) GetDataStream() *DataStream { + if x != nil { + return x.DataStream + } + return nil +} + +func (x *UpdateDataStreamRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for ListDataStreams RPC. +type ListDataStreamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListDataStreams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataStreams` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDataStreamsRequest) Reset() { + *x = ListDataStreamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDataStreamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDataStreamsRequest) ProtoMessage() {} + +func (x *ListDataStreamsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDataStreamsRequest.ProtoReflect.Descriptor instead. +func (*ListDataStreamsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{91} +} + +func (x *ListDataStreamsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDataStreamsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDataStreamsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListDataStreams RPC. +type ListDataStreamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of DataStreams. + DataStreams []*DataStream `protobuf:"bytes,1,rep,name=data_streams,json=dataStreams,proto3" json:"data_streams,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDataStreamsResponse) Reset() { + *x = ListDataStreamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDataStreamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDataStreamsResponse) ProtoMessage() {} + +func (x *ListDataStreamsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDataStreamsResponse.ProtoReflect.Descriptor instead. +func (*ListDataStreamsResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{92} +} + +func (x *ListDataStreamsResponse) GetDataStreams() []*DataStream { + if x != nil { + return x.DataStreams + } + return nil +} + +func (x *ListDataStreamsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetDataStream RPC. +type GetDataStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DataStream to get. + // Example format: properties/1234/dataStreams/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDataStreamRequest) Reset() { + *x = GetDataStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDataStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataStreamRequest) ProtoMessage() {} + +func (x *GetDataStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataStreamRequest.ProtoReflect.Descriptor instead. +func (*GetDataStreamRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{93} +} + +func (x *GetDataStreamRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for GetAudience RPC. +type GetAudienceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Audience to get. + // Example format: properties/1234/audiences/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAudienceRequest) Reset() { + *x = GetAudienceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAudienceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAudienceRequest) ProtoMessage() {} + +func (x *GetAudienceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAudienceRequest.ProtoReflect.Descriptor instead. +func (*GetAudienceRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{94} +} + +func (x *GetAudienceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListAudiences RPC. +type ListAudiencesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListAudiences` call. Provide this + // to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudiences` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAudiencesRequest) Reset() { + *x = ListAudiencesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAudiencesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAudiencesRequest) ProtoMessage() {} + +func (x *ListAudiencesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAudiencesRequest.ProtoReflect.Descriptor instead. +func (*ListAudiencesRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{95} +} + +func (x *ListAudiencesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListAudiencesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAudiencesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for ListAudiences RPC. +type ListAudiencesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of Audiences. + Audiences []*Audience `protobuf:"bytes,1,rep,name=audiences,proto3" json:"audiences,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAudiencesResponse) Reset() { + *x = ListAudiencesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAudiencesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAudiencesResponse) ProtoMessage() {} + +func (x *ListAudiencesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAudiencesResponse.ProtoReflect.Descriptor instead. +func (*ListAudiencesResponse) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{96} +} + +func (x *ListAudiencesResponse) GetAudiences() []*Audience { + if x != nil { + return x.Audiences + } + return nil +} + +func (x *ListAudiencesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for CreateAudience RPC. +type CreateAudienceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The audience to create. + Audience *Audience `protobuf:"bytes,2,opt,name=audience,proto3" json:"audience,omitempty"` +} + +func (x *CreateAudienceRequest) Reset() { + *x = CreateAudienceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAudienceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAudienceRequest) ProtoMessage() {} + +func (x *CreateAudienceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAudienceRequest.ProtoReflect.Descriptor instead. +func (*CreateAudienceRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{97} +} + +func (x *CreateAudienceRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateAudienceRequest) GetAudience() *Audience { + if x != nil { + return x.Audience + } + return nil +} + +// Request message for UpdateAudience RPC. +type UpdateAudienceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The audience to update. + // The audience's `name` field is used to identify the audience to be updated. + Audience *Audience `protobuf:"bytes,1,opt,name=audience,proto3" json:"audience,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateAudienceRequest) Reset() { + *x = UpdateAudienceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAudienceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAudienceRequest) ProtoMessage() {} + +func (x *UpdateAudienceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAudienceRequest.ProtoReflect.Descriptor instead. +func (*UpdateAudienceRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{98} +} + +func (x *UpdateAudienceRequest) GetAudience() *Audience { + if x != nil { + return x.Audience + } + return nil +} + +func (x *UpdateAudienceRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for ArchiveAudience RPC. +type ArchiveAudienceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example format: properties/1234/audiences/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ArchiveAudienceRequest) Reset() { + *x = ArchiveAudienceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveAudienceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveAudienceRequest) ProtoMessage() {} + +func (x *ArchiveAudienceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArchiveAudienceRequest.ProtoReflect.Descriptor instead. +func (*ArchiveAudienceRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{99} +} + +func (x *ArchiveAudienceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for GetAttributionSettings RPC. +type GetAttributionSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the attribution settings to retrieve. + // Format: properties/{property}/attributionSettings + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAttributionSettingsRequest) Reset() { + *x = GetAttributionSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAttributionSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAttributionSettingsRequest) ProtoMessage() {} + +func (x *GetAttributionSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAttributionSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetAttributionSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{100} +} + +func (x *GetAttributionSettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for UpdateAttributionSettings RPC +type UpdateAttributionSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The attribution settings to update. + // The `name` field is used to identify the settings to be updated. + AttributionSettings *AttributionSettings `protobuf:"bytes,1,opt,name=attribution_settings,json=attributionSettings,proto3" json:"attribution_settings,omitempty"` + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateAttributionSettingsRequest) Reset() { + *x = UpdateAttributionSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAttributionSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAttributionSettingsRequest) ProtoMessage() {} + +func (x *UpdateAttributionSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAttributionSettingsRequest.ProtoReflect.Descriptor instead. +func (*UpdateAttributionSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP(), []int{101} +} + +func (x *UpdateAttributionSettingsRequest) GetAttributionSettings() *AttributionSettings { + if x != nil { + return x.AttributionSettings + } + return nil +} + +func (x *UpdateAttributionSettingsRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +var File_google_analytics_admin_v1alpha_analytics_admin_proto protoreflect.FileDescriptor + +var file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x05, 0x0a, + 0x16, 0x52, 0x75, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x4f, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x46, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, + 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x50, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0a, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x10, 0x64, 0x69, + 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x64, 0x69, + 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5b, 0x0a, + 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, + 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, + 0x79, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, + 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x22, 0xf7, 0x02, 0x0a, 0x17, 0x52, 0x75, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, + 0x11, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x10, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x59, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x05, 0x71, 0x75, 0x6f, 0x74, + 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x51, + 0x75, 0x6f, 0x74, 0x61, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x74, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x68, + 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x59, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x14, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x85, 0x01, + 0x0a, 0x1d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x41, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x55, 0x72, 0x69, 0x22, 0x4c, 0x0a, 0x1e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, + 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x93, 0x01, + 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0xa4, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x62, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x49, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x5b, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x64, 0x0a, + 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x88, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x15, + 0x41, 0x75, 0x64, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x16, 0x41, 0x75, + 0x64, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x15, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x0f, + 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6e, 0x6f, 0x74, 0x69, + 0x66, 0x79, 0x4e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0xec, 0x01, 0x0a, 0x1b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, + 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x79, 0x4e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x22, 0x67, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x63, 0x0a, + 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x22, 0xbd, 0x01, 0x0a, 0x1b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x22, 0x67, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x22, 0x5b, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x1b, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, + 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x56, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xbf, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x12, 0x2a, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, + 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, + 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x66, 0x69, + 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x63, 0x0a, 0x19, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, 0x72, + 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xa2, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2c, 0x12, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x72, + 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x72, 0x65, + 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x0d, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, + 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, + 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, + 0x0a, 0x2b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x12, 0x2b, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x5a, 0x0a, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, + 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0xb5, 0x01, 0x0a, 0x1a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, + 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x0f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x0d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, + 0x6b, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, + 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x61, 0x73, 0x6b, 0x22, 0x65, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, + 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x19, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, + 0x12, 0x2b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x9d, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x57, 0x0a, 0x10, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x0e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x6e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x39, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x33, 0x0a, 0x31, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x59, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa3, 0x01, 0x0a, + 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, + 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x24, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x0f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, + 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x27, 0x0a, 0x25, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xf3, 0x04, 0x0a, 0x20, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4a, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2e, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x63, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x47, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x51, 0x0a, + 0x14, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, 0x61, + 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x4d, 0x0a, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb3, 0x01, 0x0a, 0x21, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x13, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7a, 0x0a, 0x23, 0x47, + 0x65, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x3f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x39, 0x0a, 0x37, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x26, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x57, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x3f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x39, 0x12, 0x37, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x7e, 0x0a, 0x1b, 0x6d, + 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x19, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x7d, 0x0a, 0x26, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x3f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x39, 0x0a, 0x37, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x26, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7e, 0x0a, 0x1b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x19, 0x6d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x22, 0xbc, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3f, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x39, 0x12, 0x37, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0xcd, 0x01, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x1c, + 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x1a, 0x6d, + 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x72, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x3b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x35, 0x0a, 0x33, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x22, 0xce, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x12, 0x2d, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x22, 0x66, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x49, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x0a, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x69, 0x0a, 0x1c, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2f, 0x0a, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x12, 0x2d, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0xa4, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x10, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x43, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x3d, 0x0a, 0x3b, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc4, 0x01, + 0x0a, 0x29, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x43, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x3d, 0x12, 0x3b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe0, 0x01, 0x0a, 0x2a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x22, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, + 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x1e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, + 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x98, 0x02, 0x0a, 0x2a, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, + 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x43, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x3d, 0x12, 0x3b, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x8c, 0x01, 0x0a, 0x21, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, + 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x22, 0x85, 0x01, 0x0a, 0x2a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x57, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x43, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x3d, 0x0a, 0x3b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf8, 0x01, 0x0a, 0x2a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x87, 0x01, 0x0a, 0x21, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, + 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x92, 0x01, 0x0a, 0x2f, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x45, 0x0a, + 0x43, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x31, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x63, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x4b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x45, 0x12, 0x43, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x81, 0x02, 0x0a, 0x32, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x2b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x26, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xc1, 0x02, 0x0a, 0x32, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x45, 0x12, 0x43, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0xa5, 0x01, 0x0a, 0x2a, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x25, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x95, 0x01, 0x0a, 0x32, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x5f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x45, 0x0a, 0x43, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x96, 0x01, 0x0a, 0x33, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x45, 0x0a, + 0x43, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x34, 0x41, + 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x21, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, + 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x1d, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x95, 0x01, + 0x0a, 0x32, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x4b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x45, 0x0a, 0x43, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xce, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x12, 0x2d, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xbc, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x12, 0x2d, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0xa4, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, + 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5c, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, 0x6d, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6a, 0x0a, 0x1d, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x0a, 0x2d, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x66, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x49, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x0a, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x19, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2c, 0x12, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0xb0, 0x01, + 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x40, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, + 0x22, 0xa2, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x12, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x64, 0x0a, 0x1a, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x72, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3b, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x35, 0x0a, 0x33, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xda, 0x01, 0x0a, + 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x17, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xb5, 0x01, 0x0a, 0x17, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x12, 0x28, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x50, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x22, 0x5f, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x2a, 0x0a, 0x28, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, + 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x40, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x9e, 0x01, + 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, + 0x12, 0x28, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x90, + 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x0b, 0x64, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x5c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x0a, + 0x28, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x58, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x87, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x46, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x61, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0xaa, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xa4, 0x01, + 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x5c, 0x0a, 0x16, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x41, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x6e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x39, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x33, 0x0a, 0x31, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xd1, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x14, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x32, 0x8c, 0x8d, 0x01, 0x0a, 0x15, 0x41, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x93, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x29, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x88, + 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb9, 0x01, 0x0a, 0x0d, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2d, 0x32, 0x22, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xda, + 0x41, 0x13, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xcc, 0x01, 0x0a, 0x16, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x12, 0x19, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x9c, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, + 0x12, 0x13, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1f, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x3a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0xda, 0x41, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x9e, 0x01, 0x0a, 0x0e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xc1, 0x01, 0x0a, + 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x32, 0x25, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0xda, 0x41, 0x14, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x12, 0xce, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x61, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x2a, + 0x12, 0x28, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0xf6, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x66, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x47, 0x65, 0x74, 0x5a, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x12, 0xe1, 0x01, 0x0a, 0x0d, 0x4c, + 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x54, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x5a, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xed, + 0x01, 0x0a, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x66, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, + 0x3a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x5a, 0x33, 0x22, 0x2e, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xf7, + 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x22, 0x83, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6a, 0x22, 0x26, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x73, 0x3a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5a, 0x35, + 0x22, 0x28, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0xda, 0x41, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x8b, 0x02, 0x0a, 0x14, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x72, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x5a, 0x39, 0x22, 0x34, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x84, 0x02, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x90, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x7e, 0x32, 0x30, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, + 0x5a, 0x3f, 0x32, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0xda, 0x41, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x8b, 0x02, + 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x78, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x72, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, + 0x5a, 0x39, 0x22, 0x34, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xc2, 0x01, 0x0a, 0x0e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x61, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x2a, 0x26, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, 0x2a, 0x2a, + 0x28, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xe5, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x78, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x72, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x5a, 0x39, 0x22, + 0x34, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xd9, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, + 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x72, 0x65, + 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, + 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x0d, + 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0xda, 0x41, 0x14, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0xa4, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, + 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x2a, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xc7, 0x01, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, + 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, + 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0xda, 0x41, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xc3, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, 0x54, + 0x61, 0x67, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, + 0x54, 0x61, 0x67, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe1, 0x01, 0x0a, 0x13, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0x5f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, + 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0xda, 0x41, 0x16, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x12, + 0xf6, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, + 0x6e, 0x6b, 0x22, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x32, 0x3d, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, + 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, + 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0xda, 0x41, 0x1b, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xa7, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, + 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, + 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x2a, 0x2d, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xcb, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, + 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0xcb, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, + 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xf6, + 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, + 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, + 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x12, 0x47, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2f, 0x2a, 0x2f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x89, 0x02, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x45, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x49, 0x12, 0x47, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0xb8, 0x02, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x91, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x66, 0x22, 0x47, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x3a, 0x1b, 0x6d, 0x65, + 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0xda, 0x41, 0x22, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x2c, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0xd9, + 0x01, 0x0a, 0x1f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x2a, 0x47, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xda, 0x02, 0x0a, 0x1f, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x46, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x22, 0xb3, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x82, 0x01, 0x32, 0x63, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2f, 0x2a, 0x2f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x1b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0xda, 0x41, 0x27, + 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xf7, 0x01, 0x0a, 0x1d, 0x41, 0x63, 0x6b, 0x6e, + 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, + 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, 0x3e, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, + 0x2a, 0x12, 0xe4, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3d, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xd5, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x41, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xac, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x91, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x65, 0x32, 0x4a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x7d, + 0x3a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0xda, 0x41, 0x23, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, + 0xeb, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, + 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x3a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0xda, 0x41, 0x17, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0xc0, 0x01, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xad, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xd3, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xf8, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x44, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x47, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x8b, 0x02, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x49, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0xc6, 0x02, 0x0a, 0x23, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x22, 0x93, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x62, 0x22, 0x3d, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x3a, 0x21, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0xda, 0x41, 0x28, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0xd7, 0x01, 0x0a, 0x23, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x12, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x2a, 0x3d, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xee, 0x02, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, + 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x22, 0xbb, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x84, 0x01, 0x32, + 0x5f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x21, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, + 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0xda, 0x41, 0x2d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x12, 0x98, 0x02, 0x0a, 0x28, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x4f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, + 0x12, 0x45, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xab, + 0x02, 0x0a, 0x2a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x12, 0x51, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x52, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xf8, 0x02, 0x0a, + 0x2b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x52, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, + 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, + 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0xad, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x73, + 0x22, 0x45, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, + 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x3a, 0x2a, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0xda, 0x41, 0x31, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0xef, 0x01, 0x0a, 0x2b, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, + 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x52, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x2a, 0x45, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, + 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb3, 0x02, 0x0a, 0x2c, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x53, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x54, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x22, 0x4d, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, + 0xa1, 0x02, 0x0a, 0x2b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, + 0x52, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x51, 0x22, 0x4c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x3a, 0x01, 0x2a, 0x12, 0xeb, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x43, 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, + 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0xda, 0x41, 0x17, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x2c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x81, 0x02, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x54, 0x32, 0x40, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0xda, 0x41, 0x1c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xd3, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xba, 0x01, 0x0a, 0x16, + 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x49, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x3a, 0x01, + 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xc0, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd9, 0x01, 0x0a, 0x12, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x5a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3d, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x3a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0xda, 0x41, 0x14, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0xec, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x39, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x32, + 0x3a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0d, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0xda, 0x41, 0x19, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xc7, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x38, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0xb1, 0x01, 0x0a, 0x13, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, + 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x46, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x39, 0x22, 0x34, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb4, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x3b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd5, 0x01, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xac, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x91, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x65, 0x32, 0x4a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x7d, 0x3a, 0x17, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0xda, 0x41, 0x23, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x12, 0xcd, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x54, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x39, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x3a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xda, 0x41, 0x12, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x12, 0x9e, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, + 0x2a, 0x2a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xde, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x65, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x32, 0x36, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, + 0x7b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0b, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xda, 0x41, 0x17, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xbf, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xac, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, + 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb7, 0x01, 0x0a, + 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xbf, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x34, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x08, 0x61, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0xcd, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x5a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3d, 0x32, 0x31, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0xda, 0x41, 0x14, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x9e, 0x01, 0x0a, 0x0f, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x72, + 0x63, 0x68, 0x69, 0x76, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x35, 0x22, 0x30, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xcd, 0x01, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x12, 0x30, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x9b, 0x02, 0x0a, 0x19, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x86, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x32, 0x45, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x7d, 0x3a, 0x14, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0xda, 0x41, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xbd, 0x01, 0x0a, 0x0f, 0x52, 0x75, 0x6e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x36, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x75, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x33, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x75, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0x1a, 0xfc, 0x01, 0xca, 0x41, 0x1d, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xd8, 0x01, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x65, 0x64, 0x69, 0x74, 0x2c, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x2e, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6f, + 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x72, 0x65, + 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x42, 0x80, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x41, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescOnce sync.Once + file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescData = file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDesc +) + +func file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescGZIP() []byte { + file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescOnce.Do(func() { + file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescData) + }) + return file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDescData +} + +var file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 102) +var file_google_analytics_admin_v1alpha_analytics_admin_proto_goTypes = []interface{}{ + (*RunAccessReportRequest)(nil), // 0: google.analytics.admin.v1alpha.RunAccessReportRequest + (*RunAccessReportResponse)(nil), // 1: google.analytics.admin.v1alpha.RunAccessReportResponse + (*GetAccountRequest)(nil), // 2: google.analytics.admin.v1alpha.GetAccountRequest + (*ListAccountsRequest)(nil), // 3: google.analytics.admin.v1alpha.ListAccountsRequest + (*ListAccountsResponse)(nil), // 4: google.analytics.admin.v1alpha.ListAccountsResponse + (*DeleteAccountRequest)(nil), // 5: google.analytics.admin.v1alpha.DeleteAccountRequest + (*UpdateAccountRequest)(nil), // 6: google.analytics.admin.v1alpha.UpdateAccountRequest + (*ProvisionAccountTicketRequest)(nil), // 7: google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + (*ProvisionAccountTicketResponse)(nil), // 8: google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + (*GetPropertyRequest)(nil), // 9: google.analytics.admin.v1alpha.GetPropertyRequest + (*ListPropertiesRequest)(nil), // 10: google.analytics.admin.v1alpha.ListPropertiesRequest + (*ListPropertiesResponse)(nil), // 11: google.analytics.admin.v1alpha.ListPropertiesResponse + (*UpdatePropertyRequest)(nil), // 12: google.analytics.admin.v1alpha.UpdatePropertyRequest + (*CreatePropertyRequest)(nil), // 13: google.analytics.admin.v1alpha.CreatePropertyRequest + (*DeletePropertyRequest)(nil), // 14: google.analytics.admin.v1alpha.DeletePropertyRequest + (*GetUserLinkRequest)(nil), // 15: google.analytics.admin.v1alpha.GetUserLinkRequest + (*BatchGetUserLinksRequest)(nil), // 16: google.analytics.admin.v1alpha.BatchGetUserLinksRequest + (*BatchGetUserLinksResponse)(nil), // 17: google.analytics.admin.v1alpha.BatchGetUserLinksResponse + (*ListUserLinksRequest)(nil), // 18: google.analytics.admin.v1alpha.ListUserLinksRequest + (*ListUserLinksResponse)(nil), // 19: google.analytics.admin.v1alpha.ListUserLinksResponse + (*AuditUserLinksRequest)(nil), // 20: google.analytics.admin.v1alpha.AuditUserLinksRequest + (*AuditUserLinksResponse)(nil), // 21: google.analytics.admin.v1alpha.AuditUserLinksResponse + (*CreateUserLinkRequest)(nil), // 22: google.analytics.admin.v1alpha.CreateUserLinkRequest + (*BatchCreateUserLinksRequest)(nil), // 23: google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + (*BatchCreateUserLinksResponse)(nil), // 24: google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + (*UpdateUserLinkRequest)(nil), // 25: google.analytics.admin.v1alpha.UpdateUserLinkRequest + (*BatchUpdateUserLinksRequest)(nil), // 26: google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + (*BatchUpdateUserLinksResponse)(nil), // 27: google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + (*DeleteUserLinkRequest)(nil), // 28: google.analytics.admin.v1alpha.DeleteUserLinkRequest + (*BatchDeleteUserLinksRequest)(nil), // 29: google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + (*CreateFirebaseLinkRequest)(nil), // 30: google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + (*DeleteFirebaseLinkRequest)(nil), // 31: google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + (*ListFirebaseLinksRequest)(nil), // 32: google.analytics.admin.v1alpha.ListFirebaseLinksRequest + (*ListFirebaseLinksResponse)(nil), // 33: google.analytics.admin.v1alpha.ListFirebaseLinksResponse + (*GetGlobalSiteTagRequest)(nil), // 34: google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + (*CreateGoogleAdsLinkRequest)(nil), // 35: google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + (*UpdateGoogleAdsLinkRequest)(nil), // 36: google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + (*DeleteGoogleAdsLinkRequest)(nil), // 37: google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + (*ListGoogleAdsLinksRequest)(nil), // 38: google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + (*ListGoogleAdsLinksResponse)(nil), // 39: google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + (*GetDataSharingSettingsRequest)(nil), // 40: google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + (*ListAccountSummariesRequest)(nil), // 41: google.analytics.admin.v1alpha.ListAccountSummariesRequest + (*ListAccountSummariesResponse)(nil), // 42: google.analytics.admin.v1alpha.ListAccountSummariesResponse + (*AcknowledgeUserDataCollectionRequest)(nil), // 43: google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + (*AcknowledgeUserDataCollectionResponse)(nil), // 44: google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + (*SearchChangeHistoryEventsRequest)(nil), // 45: google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + (*SearchChangeHistoryEventsResponse)(nil), // 46: google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + (*GetMeasurementProtocolSecretRequest)(nil), // 47: google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + (*CreateMeasurementProtocolSecretRequest)(nil), // 48: google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + (*DeleteMeasurementProtocolSecretRequest)(nil), // 49: google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + (*UpdateMeasurementProtocolSecretRequest)(nil), // 50: google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + (*ListMeasurementProtocolSecretsRequest)(nil), // 51: google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + (*ListMeasurementProtocolSecretsResponse)(nil), // 52: google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + (*GetGoogleSignalsSettingsRequest)(nil), // 53: google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + (*UpdateGoogleSignalsSettingsRequest)(nil), // 54: google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + (*CreateConversionEventRequest)(nil), // 55: google.analytics.admin.v1alpha.CreateConversionEventRequest + (*GetConversionEventRequest)(nil), // 56: google.analytics.admin.v1alpha.GetConversionEventRequest + (*DeleteConversionEventRequest)(nil), // 57: google.analytics.admin.v1alpha.DeleteConversionEventRequest + (*ListConversionEventsRequest)(nil), // 58: google.analytics.admin.v1alpha.ListConversionEventsRequest + (*ListConversionEventsResponse)(nil), // 59: google.analytics.admin.v1alpha.ListConversionEventsResponse + (*GetDisplayVideo360AdvertiserLinkRequest)(nil), // 60: google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + (*ListDisplayVideo360AdvertiserLinksRequest)(nil), // 61: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + (*ListDisplayVideo360AdvertiserLinksResponse)(nil), // 62: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + (*CreateDisplayVideo360AdvertiserLinkRequest)(nil), // 63: google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + (*DeleteDisplayVideo360AdvertiserLinkRequest)(nil), // 64: google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + (*UpdateDisplayVideo360AdvertiserLinkRequest)(nil), // 65: google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + (*GetDisplayVideo360AdvertiserLinkProposalRequest)(nil), // 66: google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + (*ListDisplayVideo360AdvertiserLinkProposalsRequest)(nil), // 67: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + (*ListDisplayVideo360AdvertiserLinkProposalsResponse)(nil), // 68: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + (*CreateDisplayVideo360AdvertiserLinkProposalRequest)(nil), // 69: google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + (*DeleteDisplayVideo360AdvertiserLinkProposalRequest)(nil), // 70: google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + (*ApproveDisplayVideo360AdvertiserLinkProposalRequest)(nil), // 71: google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + (*ApproveDisplayVideo360AdvertiserLinkProposalResponse)(nil), // 72: google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + (*CancelDisplayVideo360AdvertiserLinkProposalRequest)(nil), // 73: google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + (*CreateCustomDimensionRequest)(nil), // 74: google.analytics.admin.v1alpha.CreateCustomDimensionRequest + (*UpdateCustomDimensionRequest)(nil), // 75: google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + (*ListCustomDimensionsRequest)(nil), // 76: google.analytics.admin.v1alpha.ListCustomDimensionsRequest + (*ListCustomDimensionsResponse)(nil), // 77: google.analytics.admin.v1alpha.ListCustomDimensionsResponse + (*ArchiveCustomDimensionRequest)(nil), // 78: google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + (*GetCustomDimensionRequest)(nil), // 79: google.analytics.admin.v1alpha.GetCustomDimensionRequest + (*CreateCustomMetricRequest)(nil), // 80: google.analytics.admin.v1alpha.CreateCustomMetricRequest + (*UpdateCustomMetricRequest)(nil), // 81: google.analytics.admin.v1alpha.UpdateCustomMetricRequest + (*ListCustomMetricsRequest)(nil), // 82: google.analytics.admin.v1alpha.ListCustomMetricsRequest + (*ListCustomMetricsResponse)(nil), // 83: google.analytics.admin.v1alpha.ListCustomMetricsResponse + (*ArchiveCustomMetricRequest)(nil), // 84: google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + (*GetCustomMetricRequest)(nil), // 85: google.analytics.admin.v1alpha.GetCustomMetricRequest + (*GetDataRetentionSettingsRequest)(nil), // 86: google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + (*UpdateDataRetentionSettingsRequest)(nil), // 87: google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + (*CreateDataStreamRequest)(nil), // 88: google.analytics.admin.v1alpha.CreateDataStreamRequest + (*DeleteDataStreamRequest)(nil), // 89: google.analytics.admin.v1alpha.DeleteDataStreamRequest + (*UpdateDataStreamRequest)(nil), // 90: google.analytics.admin.v1alpha.UpdateDataStreamRequest + (*ListDataStreamsRequest)(nil), // 91: google.analytics.admin.v1alpha.ListDataStreamsRequest + (*ListDataStreamsResponse)(nil), // 92: google.analytics.admin.v1alpha.ListDataStreamsResponse + (*GetDataStreamRequest)(nil), // 93: google.analytics.admin.v1alpha.GetDataStreamRequest + (*GetAudienceRequest)(nil), // 94: google.analytics.admin.v1alpha.GetAudienceRequest + (*ListAudiencesRequest)(nil), // 95: google.analytics.admin.v1alpha.ListAudiencesRequest + (*ListAudiencesResponse)(nil), // 96: google.analytics.admin.v1alpha.ListAudiencesResponse + (*CreateAudienceRequest)(nil), // 97: google.analytics.admin.v1alpha.CreateAudienceRequest + (*UpdateAudienceRequest)(nil), // 98: google.analytics.admin.v1alpha.UpdateAudienceRequest + (*ArchiveAudienceRequest)(nil), // 99: google.analytics.admin.v1alpha.ArchiveAudienceRequest + (*GetAttributionSettingsRequest)(nil), // 100: google.analytics.admin.v1alpha.GetAttributionSettingsRequest + (*UpdateAttributionSettingsRequest)(nil), // 101: google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + (*AccessDimension)(nil), // 102: google.analytics.admin.v1alpha.AccessDimension + (*AccessMetric)(nil), // 103: google.analytics.admin.v1alpha.AccessMetric + (*AccessDateRange)(nil), // 104: google.analytics.admin.v1alpha.AccessDateRange + (*AccessFilterExpression)(nil), // 105: google.analytics.admin.v1alpha.AccessFilterExpression + (*AccessOrderBy)(nil), // 106: google.analytics.admin.v1alpha.AccessOrderBy + (*AccessDimensionHeader)(nil), // 107: google.analytics.admin.v1alpha.AccessDimensionHeader + (*AccessMetricHeader)(nil), // 108: google.analytics.admin.v1alpha.AccessMetricHeader + (*AccessRow)(nil), // 109: google.analytics.admin.v1alpha.AccessRow + (*AccessQuota)(nil), // 110: google.analytics.admin.v1alpha.AccessQuota + (*Account)(nil), // 111: google.analytics.admin.v1alpha.Account + (*fieldmaskpb.FieldMask)(nil), // 112: google.protobuf.FieldMask + (*Property)(nil), // 113: google.analytics.admin.v1alpha.Property + (*UserLink)(nil), // 114: google.analytics.admin.v1alpha.UserLink + (*AuditUserLink)(nil), // 115: google.analytics.admin.v1alpha.AuditUserLink + (*FirebaseLink)(nil), // 116: google.analytics.admin.v1alpha.FirebaseLink + (*GoogleAdsLink)(nil), // 117: google.analytics.admin.v1alpha.GoogleAdsLink + (*AccountSummary)(nil), // 118: google.analytics.admin.v1alpha.AccountSummary + (ChangeHistoryResourceType)(0), // 119: google.analytics.admin.v1alpha.ChangeHistoryResourceType + (ActionType)(0), // 120: google.analytics.admin.v1alpha.ActionType + (*timestamppb.Timestamp)(nil), // 121: google.protobuf.Timestamp + (*ChangeHistoryEvent)(nil), // 122: google.analytics.admin.v1alpha.ChangeHistoryEvent + (*MeasurementProtocolSecret)(nil), // 123: google.analytics.admin.v1alpha.MeasurementProtocolSecret + (*GoogleSignalsSettings)(nil), // 124: google.analytics.admin.v1alpha.GoogleSignalsSettings + (*ConversionEvent)(nil), // 125: google.analytics.admin.v1alpha.ConversionEvent + (*DisplayVideo360AdvertiserLink)(nil), // 126: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + (*DisplayVideo360AdvertiserLinkProposal)(nil), // 127: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + (*CustomDimension)(nil), // 128: google.analytics.admin.v1alpha.CustomDimension + (*CustomMetric)(nil), // 129: google.analytics.admin.v1alpha.CustomMetric + (*DataRetentionSettings)(nil), // 130: google.analytics.admin.v1alpha.DataRetentionSettings + (*DataStream)(nil), // 131: google.analytics.admin.v1alpha.DataStream + (*Audience)(nil), // 132: google.analytics.admin.v1alpha.Audience + (*AttributionSettings)(nil), // 133: google.analytics.admin.v1alpha.AttributionSettings + (*emptypb.Empty)(nil), // 134: google.protobuf.Empty + (*GlobalSiteTag)(nil), // 135: google.analytics.admin.v1alpha.GlobalSiteTag + (*DataSharingSettings)(nil), // 136: google.analytics.admin.v1alpha.DataSharingSettings +} +var file_google_analytics_admin_v1alpha_analytics_admin_proto_depIdxs = []int32{ + 102, // 0: google.analytics.admin.v1alpha.RunAccessReportRequest.dimensions:type_name -> google.analytics.admin.v1alpha.AccessDimension + 103, // 1: google.analytics.admin.v1alpha.RunAccessReportRequest.metrics:type_name -> google.analytics.admin.v1alpha.AccessMetric + 104, // 2: google.analytics.admin.v1alpha.RunAccessReportRequest.date_ranges:type_name -> google.analytics.admin.v1alpha.AccessDateRange + 105, // 3: google.analytics.admin.v1alpha.RunAccessReportRequest.dimension_filter:type_name -> google.analytics.admin.v1alpha.AccessFilterExpression + 105, // 4: google.analytics.admin.v1alpha.RunAccessReportRequest.metric_filter:type_name -> google.analytics.admin.v1alpha.AccessFilterExpression + 106, // 5: google.analytics.admin.v1alpha.RunAccessReportRequest.order_bys:type_name -> google.analytics.admin.v1alpha.AccessOrderBy + 107, // 6: google.analytics.admin.v1alpha.RunAccessReportResponse.dimension_headers:type_name -> google.analytics.admin.v1alpha.AccessDimensionHeader + 108, // 7: google.analytics.admin.v1alpha.RunAccessReportResponse.metric_headers:type_name -> google.analytics.admin.v1alpha.AccessMetricHeader + 109, // 8: google.analytics.admin.v1alpha.RunAccessReportResponse.rows:type_name -> google.analytics.admin.v1alpha.AccessRow + 110, // 9: google.analytics.admin.v1alpha.RunAccessReportResponse.quota:type_name -> google.analytics.admin.v1alpha.AccessQuota + 111, // 10: google.analytics.admin.v1alpha.ListAccountsResponse.accounts:type_name -> google.analytics.admin.v1alpha.Account + 111, // 11: google.analytics.admin.v1alpha.UpdateAccountRequest.account:type_name -> google.analytics.admin.v1alpha.Account + 112, // 12: google.analytics.admin.v1alpha.UpdateAccountRequest.update_mask:type_name -> google.protobuf.FieldMask + 111, // 13: google.analytics.admin.v1alpha.ProvisionAccountTicketRequest.account:type_name -> google.analytics.admin.v1alpha.Account + 113, // 14: google.analytics.admin.v1alpha.ListPropertiesResponse.properties:type_name -> google.analytics.admin.v1alpha.Property + 113, // 15: google.analytics.admin.v1alpha.UpdatePropertyRequest.property:type_name -> google.analytics.admin.v1alpha.Property + 112, // 16: google.analytics.admin.v1alpha.UpdatePropertyRequest.update_mask:type_name -> google.protobuf.FieldMask + 113, // 17: google.analytics.admin.v1alpha.CreatePropertyRequest.property:type_name -> google.analytics.admin.v1alpha.Property + 114, // 18: google.analytics.admin.v1alpha.BatchGetUserLinksResponse.user_links:type_name -> google.analytics.admin.v1alpha.UserLink + 114, // 19: google.analytics.admin.v1alpha.ListUserLinksResponse.user_links:type_name -> google.analytics.admin.v1alpha.UserLink + 115, // 20: google.analytics.admin.v1alpha.AuditUserLinksResponse.user_links:type_name -> google.analytics.admin.v1alpha.AuditUserLink + 114, // 21: google.analytics.admin.v1alpha.CreateUserLinkRequest.user_link:type_name -> google.analytics.admin.v1alpha.UserLink + 22, // 22: google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.requests:type_name -> google.analytics.admin.v1alpha.CreateUserLinkRequest + 114, // 23: google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.user_links:type_name -> google.analytics.admin.v1alpha.UserLink + 114, // 24: google.analytics.admin.v1alpha.UpdateUserLinkRequest.user_link:type_name -> google.analytics.admin.v1alpha.UserLink + 25, // 25: google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.requests:type_name -> google.analytics.admin.v1alpha.UpdateUserLinkRequest + 114, // 26: google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.user_links:type_name -> google.analytics.admin.v1alpha.UserLink + 28, // 27: google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.requests:type_name -> google.analytics.admin.v1alpha.DeleteUserLinkRequest + 116, // 28: google.analytics.admin.v1alpha.CreateFirebaseLinkRequest.firebase_link:type_name -> google.analytics.admin.v1alpha.FirebaseLink + 116, // 29: google.analytics.admin.v1alpha.ListFirebaseLinksResponse.firebase_links:type_name -> google.analytics.admin.v1alpha.FirebaseLink + 117, // 30: google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest.google_ads_link:type_name -> google.analytics.admin.v1alpha.GoogleAdsLink + 117, // 31: google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.google_ads_link:type_name -> google.analytics.admin.v1alpha.GoogleAdsLink + 112, // 32: google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.update_mask:type_name -> google.protobuf.FieldMask + 117, // 33: google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.google_ads_links:type_name -> google.analytics.admin.v1alpha.GoogleAdsLink + 118, // 34: google.analytics.admin.v1alpha.ListAccountSummariesResponse.account_summaries:type_name -> google.analytics.admin.v1alpha.AccountSummary + 119, // 35: google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.resource_type:type_name -> google.analytics.admin.v1alpha.ChangeHistoryResourceType + 120, // 36: google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.action:type_name -> google.analytics.admin.v1alpha.ActionType + 121, // 37: google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.earliest_change_time:type_name -> google.protobuf.Timestamp + 121, // 38: google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.latest_change_time:type_name -> google.protobuf.Timestamp + 122, // 39: google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.change_history_events:type_name -> google.analytics.admin.v1alpha.ChangeHistoryEvent + 123, // 40: google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest.measurement_protocol_secret:type_name -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 123, // 41: google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.measurement_protocol_secret:type_name -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 112, // 42: google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.update_mask:type_name -> google.protobuf.FieldMask + 123, // 43: google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.measurement_protocol_secrets:type_name -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 124, // 44: google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.google_signals_settings:type_name -> google.analytics.admin.v1alpha.GoogleSignalsSettings + 112, // 45: google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.update_mask:type_name -> google.protobuf.FieldMask + 125, // 46: google.analytics.admin.v1alpha.CreateConversionEventRequest.conversion_event:type_name -> google.analytics.admin.v1alpha.ConversionEvent + 125, // 47: google.analytics.admin.v1alpha.ListConversionEventsResponse.conversion_events:type_name -> google.analytics.admin.v1alpha.ConversionEvent + 126, // 48: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.display_video_360_advertiser_links:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 126, // 49: google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest.display_video_360_advertiser_link:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 126, // 50: google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.display_video_360_advertiser_link:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 112, // 51: google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.update_mask:type_name -> google.protobuf.FieldMask + 127, // 52: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.display_video_360_advertiser_link_proposals:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + 127, // 53: google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest.display_video_360_advertiser_link_proposal:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + 126, // 54: google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse.display_video_360_advertiser_link:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 128, // 55: google.analytics.admin.v1alpha.CreateCustomDimensionRequest.custom_dimension:type_name -> google.analytics.admin.v1alpha.CustomDimension + 128, // 56: google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.custom_dimension:type_name -> google.analytics.admin.v1alpha.CustomDimension + 112, // 57: google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.update_mask:type_name -> google.protobuf.FieldMask + 128, // 58: google.analytics.admin.v1alpha.ListCustomDimensionsResponse.custom_dimensions:type_name -> google.analytics.admin.v1alpha.CustomDimension + 129, // 59: google.analytics.admin.v1alpha.CreateCustomMetricRequest.custom_metric:type_name -> google.analytics.admin.v1alpha.CustomMetric + 129, // 60: google.analytics.admin.v1alpha.UpdateCustomMetricRequest.custom_metric:type_name -> google.analytics.admin.v1alpha.CustomMetric + 112, // 61: google.analytics.admin.v1alpha.UpdateCustomMetricRequest.update_mask:type_name -> google.protobuf.FieldMask + 129, // 62: google.analytics.admin.v1alpha.ListCustomMetricsResponse.custom_metrics:type_name -> google.analytics.admin.v1alpha.CustomMetric + 130, // 63: google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.data_retention_settings:type_name -> google.analytics.admin.v1alpha.DataRetentionSettings + 112, // 64: google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.update_mask:type_name -> google.protobuf.FieldMask + 131, // 65: google.analytics.admin.v1alpha.CreateDataStreamRequest.data_stream:type_name -> google.analytics.admin.v1alpha.DataStream + 131, // 66: google.analytics.admin.v1alpha.UpdateDataStreamRequest.data_stream:type_name -> google.analytics.admin.v1alpha.DataStream + 112, // 67: google.analytics.admin.v1alpha.UpdateDataStreamRequest.update_mask:type_name -> google.protobuf.FieldMask + 131, // 68: google.analytics.admin.v1alpha.ListDataStreamsResponse.data_streams:type_name -> google.analytics.admin.v1alpha.DataStream + 132, // 69: google.analytics.admin.v1alpha.ListAudiencesResponse.audiences:type_name -> google.analytics.admin.v1alpha.Audience + 132, // 70: google.analytics.admin.v1alpha.CreateAudienceRequest.audience:type_name -> google.analytics.admin.v1alpha.Audience + 132, // 71: google.analytics.admin.v1alpha.UpdateAudienceRequest.audience:type_name -> google.analytics.admin.v1alpha.Audience + 112, // 72: google.analytics.admin.v1alpha.UpdateAudienceRequest.update_mask:type_name -> google.protobuf.FieldMask + 133, // 73: google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.attribution_settings:type_name -> google.analytics.admin.v1alpha.AttributionSettings + 112, // 74: google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.update_mask:type_name -> google.protobuf.FieldMask + 2, // 75: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccount:input_type -> google.analytics.admin.v1alpha.GetAccountRequest + 3, // 76: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccounts:input_type -> google.analytics.admin.v1alpha.ListAccountsRequest + 5, // 77: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccount:input_type -> google.analytics.admin.v1alpha.DeleteAccountRequest + 6, // 78: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccount:input_type -> google.analytics.admin.v1alpha.UpdateAccountRequest + 7, // 79: google.analytics.admin.v1alpha.AnalyticsAdminService.ProvisionAccountTicket:input_type -> google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + 41, // 80: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountSummaries:input_type -> google.analytics.admin.v1alpha.ListAccountSummariesRequest + 9, // 81: google.analytics.admin.v1alpha.AnalyticsAdminService.GetProperty:input_type -> google.analytics.admin.v1alpha.GetPropertyRequest + 10, // 82: google.analytics.admin.v1alpha.AnalyticsAdminService.ListProperties:input_type -> google.analytics.admin.v1alpha.ListPropertiesRequest + 13, // 83: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateProperty:input_type -> google.analytics.admin.v1alpha.CreatePropertyRequest + 14, // 84: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteProperty:input_type -> google.analytics.admin.v1alpha.DeletePropertyRequest + 12, // 85: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateProperty:input_type -> google.analytics.admin.v1alpha.UpdatePropertyRequest + 15, // 86: google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserLink:input_type -> google.analytics.admin.v1alpha.GetUserLinkRequest + 16, // 87: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetUserLinks:input_type -> google.analytics.admin.v1alpha.BatchGetUserLinksRequest + 18, // 88: google.analytics.admin.v1alpha.AnalyticsAdminService.ListUserLinks:input_type -> google.analytics.admin.v1alpha.ListUserLinksRequest + 20, // 89: google.analytics.admin.v1alpha.AnalyticsAdminService.AuditUserLinks:input_type -> google.analytics.admin.v1alpha.AuditUserLinksRequest + 22, // 90: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateUserLink:input_type -> google.analytics.admin.v1alpha.CreateUserLinkRequest + 23, // 91: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateUserLinks:input_type -> google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + 25, // 92: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateUserLink:input_type -> google.analytics.admin.v1alpha.UpdateUserLinkRequest + 26, // 93: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateUserLinks:input_type -> google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + 28, // 94: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteUserLink:input_type -> google.analytics.admin.v1alpha.DeleteUserLinkRequest + 29, // 95: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteUserLinks:input_type -> google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + 30, // 96: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateFirebaseLink:input_type -> google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + 31, // 97: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteFirebaseLink:input_type -> google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + 32, // 98: google.analytics.admin.v1alpha.AnalyticsAdminService.ListFirebaseLinks:input_type -> google.analytics.admin.v1alpha.ListFirebaseLinksRequest + 34, // 99: google.analytics.admin.v1alpha.AnalyticsAdminService.GetGlobalSiteTag:input_type -> google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + 35, // 100: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateGoogleAdsLink:input_type -> google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + 36, // 101: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleAdsLink:input_type -> google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + 37, // 102: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteGoogleAdsLink:input_type -> google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + 38, // 103: google.analytics.admin.v1alpha.AnalyticsAdminService.ListGoogleAdsLinks:input_type -> google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + 40, // 104: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataSharingSettings:input_type -> google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + 47, // 105: google.analytics.admin.v1alpha.AnalyticsAdminService.GetMeasurementProtocolSecret:input_type -> google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + 51, // 106: google.analytics.admin.v1alpha.AnalyticsAdminService.ListMeasurementProtocolSecrets:input_type -> google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + 48, // 107: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateMeasurementProtocolSecret:input_type -> google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + 49, // 108: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteMeasurementProtocolSecret:input_type -> google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + 50, // 109: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateMeasurementProtocolSecret:input_type -> google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + 43, // 110: google.analytics.admin.v1alpha.AnalyticsAdminService.AcknowledgeUserDataCollection:input_type -> google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + 45, // 111: google.analytics.admin.v1alpha.AnalyticsAdminService.SearchChangeHistoryEvents:input_type -> google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + 53, // 112: google.analytics.admin.v1alpha.AnalyticsAdminService.GetGoogleSignalsSettings:input_type -> google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + 54, // 113: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleSignalsSettings:input_type -> google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + 55, // 114: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateConversionEvent:input_type -> google.analytics.admin.v1alpha.CreateConversionEventRequest + 56, // 115: google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEvent:input_type -> google.analytics.admin.v1alpha.GetConversionEventRequest + 57, // 116: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteConversionEvent:input_type -> google.analytics.admin.v1alpha.DeleteConversionEventRequest + 58, // 117: google.analytics.admin.v1alpha.AnalyticsAdminService.ListConversionEvents:input_type -> google.analytics.admin.v1alpha.ListConversionEventsRequest + 60, // 118: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLink:input_type -> google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + 61, // 119: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinks:input_type -> google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + 63, // 120: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLink:input_type -> google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + 64, // 121: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLink:input_type -> google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + 65, // 122: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDisplayVideo360AdvertiserLink:input_type -> google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + 66, // 123: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposal:input_type -> google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + 67, // 124: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposals:input_type -> google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + 69, // 125: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkProposal:input_type -> google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + 70, // 126: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkProposal:input_type -> google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + 71, // 127: google.analytics.admin.v1alpha.AnalyticsAdminService.ApproveDisplayVideo360AdvertiserLinkProposal:input_type -> google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + 73, // 128: google.analytics.admin.v1alpha.AnalyticsAdminService.CancelDisplayVideo360AdvertiserLinkProposal:input_type -> google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + 74, // 129: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomDimension:input_type -> google.analytics.admin.v1alpha.CreateCustomDimensionRequest + 75, // 130: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomDimension:input_type -> google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + 76, // 131: google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomDimensions:input_type -> google.analytics.admin.v1alpha.ListCustomDimensionsRequest + 78, // 132: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomDimension:input_type -> google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + 79, // 133: google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomDimension:input_type -> google.analytics.admin.v1alpha.GetCustomDimensionRequest + 80, // 134: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomMetric:input_type -> google.analytics.admin.v1alpha.CreateCustomMetricRequest + 81, // 135: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomMetric:input_type -> google.analytics.admin.v1alpha.UpdateCustomMetricRequest + 82, // 136: google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomMetrics:input_type -> google.analytics.admin.v1alpha.ListCustomMetricsRequest + 84, // 137: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomMetric:input_type -> google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + 85, // 138: google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomMetric:input_type -> google.analytics.admin.v1alpha.GetCustomMetricRequest + 86, // 139: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataRetentionSettings:input_type -> google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + 87, // 140: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataRetentionSettings:input_type -> google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + 88, // 141: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDataStream:input_type -> google.analytics.admin.v1alpha.CreateDataStreamRequest + 89, // 142: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDataStream:input_type -> google.analytics.admin.v1alpha.DeleteDataStreamRequest + 90, // 143: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataStream:input_type -> google.analytics.admin.v1alpha.UpdateDataStreamRequest + 91, // 144: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreams:input_type -> google.analytics.admin.v1alpha.ListDataStreamsRequest + 93, // 145: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStream:input_type -> google.analytics.admin.v1alpha.GetDataStreamRequest + 94, // 146: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAudience:input_type -> google.analytics.admin.v1alpha.GetAudienceRequest + 95, // 147: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAudiences:input_type -> google.analytics.admin.v1alpha.ListAudiencesRequest + 97, // 148: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAudience:input_type -> google.analytics.admin.v1alpha.CreateAudienceRequest + 98, // 149: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAudience:input_type -> google.analytics.admin.v1alpha.UpdateAudienceRequest + 99, // 150: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveAudience:input_type -> google.analytics.admin.v1alpha.ArchiveAudienceRequest + 100, // 151: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAttributionSettings:input_type -> google.analytics.admin.v1alpha.GetAttributionSettingsRequest + 101, // 152: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAttributionSettings:input_type -> google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + 0, // 153: google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReport:input_type -> google.analytics.admin.v1alpha.RunAccessReportRequest + 111, // 154: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccount:output_type -> google.analytics.admin.v1alpha.Account + 4, // 155: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccounts:output_type -> google.analytics.admin.v1alpha.ListAccountsResponse + 134, // 156: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccount:output_type -> google.protobuf.Empty + 111, // 157: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccount:output_type -> google.analytics.admin.v1alpha.Account + 8, // 158: google.analytics.admin.v1alpha.AnalyticsAdminService.ProvisionAccountTicket:output_type -> google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + 42, // 159: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountSummaries:output_type -> google.analytics.admin.v1alpha.ListAccountSummariesResponse + 113, // 160: google.analytics.admin.v1alpha.AnalyticsAdminService.GetProperty:output_type -> google.analytics.admin.v1alpha.Property + 11, // 161: google.analytics.admin.v1alpha.AnalyticsAdminService.ListProperties:output_type -> google.analytics.admin.v1alpha.ListPropertiesResponse + 113, // 162: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateProperty:output_type -> google.analytics.admin.v1alpha.Property + 113, // 163: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteProperty:output_type -> google.analytics.admin.v1alpha.Property + 113, // 164: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateProperty:output_type -> google.analytics.admin.v1alpha.Property + 114, // 165: google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserLink:output_type -> google.analytics.admin.v1alpha.UserLink + 17, // 166: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetUserLinks:output_type -> google.analytics.admin.v1alpha.BatchGetUserLinksResponse + 19, // 167: google.analytics.admin.v1alpha.AnalyticsAdminService.ListUserLinks:output_type -> google.analytics.admin.v1alpha.ListUserLinksResponse + 21, // 168: google.analytics.admin.v1alpha.AnalyticsAdminService.AuditUserLinks:output_type -> google.analytics.admin.v1alpha.AuditUserLinksResponse + 114, // 169: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateUserLink:output_type -> google.analytics.admin.v1alpha.UserLink + 24, // 170: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateUserLinks:output_type -> google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + 114, // 171: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateUserLink:output_type -> google.analytics.admin.v1alpha.UserLink + 27, // 172: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateUserLinks:output_type -> google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + 134, // 173: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteUserLink:output_type -> google.protobuf.Empty + 134, // 174: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteUserLinks:output_type -> google.protobuf.Empty + 116, // 175: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateFirebaseLink:output_type -> google.analytics.admin.v1alpha.FirebaseLink + 134, // 176: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteFirebaseLink:output_type -> google.protobuf.Empty + 33, // 177: google.analytics.admin.v1alpha.AnalyticsAdminService.ListFirebaseLinks:output_type -> google.analytics.admin.v1alpha.ListFirebaseLinksResponse + 135, // 178: google.analytics.admin.v1alpha.AnalyticsAdminService.GetGlobalSiteTag:output_type -> google.analytics.admin.v1alpha.GlobalSiteTag + 117, // 179: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateGoogleAdsLink:output_type -> google.analytics.admin.v1alpha.GoogleAdsLink + 117, // 180: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleAdsLink:output_type -> google.analytics.admin.v1alpha.GoogleAdsLink + 134, // 181: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteGoogleAdsLink:output_type -> google.protobuf.Empty + 39, // 182: google.analytics.admin.v1alpha.AnalyticsAdminService.ListGoogleAdsLinks:output_type -> google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + 136, // 183: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataSharingSettings:output_type -> google.analytics.admin.v1alpha.DataSharingSettings + 123, // 184: google.analytics.admin.v1alpha.AnalyticsAdminService.GetMeasurementProtocolSecret:output_type -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 52, // 185: google.analytics.admin.v1alpha.AnalyticsAdminService.ListMeasurementProtocolSecrets:output_type -> google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + 123, // 186: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateMeasurementProtocolSecret:output_type -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 134, // 187: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteMeasurementProtocolSecret:output_type -> google.protobuf.Empty + 123, // 188: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateMeasurementProtocolSecret:output_type -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 44, // 189: google.analytics.admin.v1alpha.AnalyticsAdminService.AcknowledgeUserDataCollection:output_type -> google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + 46, // 190: google.analytics.admin.v1alpha.AnalyticsAdminService.SearchChangeHistoryEvents:output_type -> google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + 124, // 191: google.analytics.admin.v1alpha.AnalyticsAdminService.GetGoogleSignalsSettings:output_type -> google.analytics.admin.v1alpha.GoogleSignalsSettings + 124, // 192: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleSignalsSettings:output_type -> google.analytics.admin.v1alpha.GoogleSignalsSettings + 125, // 193: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateConversionEvent:output_type -> google.analytics.admin.v1alpha.ConversionEvent + 125, // 194: google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEvent:output_type -> google.analytics.admin.v1alpha.ConversionEvent + 134, // 195: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteConversionEvent:output_type -> google.protobuf.Empty + 59, // 196: google.analytics.admin.v1alpha.AnalyticsAdminService.ListConversionEvents:output_type -> google.analytics.admin.v1alpha.ListConversionEventsResponse + 126, // 197: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLink:output_type -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 62, // 198: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinks:output_type -> google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + 126, // 199: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLink:output_type -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 134, // 200: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLink:output_type -> google.protobuf.Empty + 126, // 201: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDisplayVideo360AdvertiserLink:output_type -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 127, // 202: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposal:output_type -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + 68, // 203: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposals:output_type -> google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + 127, // 204: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkProposal:output_type -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + 134, // 205: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkProposal:output_type -> google.protobuf.Empty + 72, // 206: google.analytics.admin.v1alpha.AnalyticsAdminService.ApproveDisplayVideo360AdvertiserLinkProposal:output_type -> google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + 127, // 207: google.analytics.admin.v1alpha.AnalyticsAdminService.CancelDisplayVideo360AdvertiserLinkProposal:output_type -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + 128, // 208: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomDimension:output_type -> google.analytics.admin.v1alpha.CustomDimension + 128, // 209: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomDimension:output_type -> google.analytics.admin.v1alpha.CustomDimension + 77, // 210: google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomDimensions:output_type -> google.analytics.admin.v1alpha.ListCustomDimensionsResponse + 134, // 211: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomDimension:output_type -> google.protobuf.Empty + 128, // 212: google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomDimension:output_type -> google.analytics.admin.v1alpha.CustomDimension + 129, // 213: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomMetric:output_type -> google.analytics.admin.v1alpha.CustomMetric + 129, // 214: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomMetric:output_type -> google.analytics.admin.v1alpha.CustomMetric + 83, // 215: google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomMetrics:output_type -> google.analytics.admin.v1alpha.ListCustomMetricsResponse + 134, // 216: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomMetric:output_type -> google.protobuf.Empty + 129, // 217: google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomMetric:output_type -> google.analytics.admin.v1alpha.CustomMetric + 130, // 218: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataRetentionSettings:output_type -> google.analytics.admin.v1alpha.DataRetentionSettings + 130, // 219: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataRetentionSettings:output_type -> google.analytics.admin.v1alpha.DataRetentionSettings + 131, // 220: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDataStream:output_type -> google.analytics.admin.v1alpha.DataStream + 134, // 221: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDataStream:output_type -> google.protobuf.Empty + 131, // 222: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataStream:output_type -> google.analytics.admin.v1alpha.DataStream + 92, // 223: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreams:output_type -> google.analytics.admin.v1alpha.ListDataStreamsResponse + 131, // 224: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStream:output_type -> google.analytics.admin.v1alpha.DataStream + 132, // 225: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAudience:output_type -> google.analytics.admin.v1alpha.Audience + 96, // 226: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAudiences:output_type -> google.analytics.admin.v1alpha.ListAudiencesResponse + 132, // 227: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAudience:output_type -> google.analytics.admin.v1alpha.Audience + 132, // 228: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAudience:output_type -> google.analytics.admin.v1alpha.Audience + 134, // 229: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveAudience:output_type -> google.protobuf.Empty + 133, // 230: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAttributionSettings:output_type -> google.analytics.admin.v1alpha.AttributionSettings + 133, // 231: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAttributionSettings:output_type -> google.analytics.admin.v1alpha.AttributionSettings + 1, // 232: google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReport:output_type -> google.analytics.admin.v1alpha.RunAccessReportResponse + 154, // [154:233] is the sub-list for method output_type + 75, // [75:154] is the sub-list for method input_type + 75, // [75:75] is the sub-list for extension type_name + 75, // [75:75] is the sub-list for extension extendee + 0, // [0:75] is the sub-list for field type_name +} + +func init() { file_google_analytics_admin_v1alpha_analytics_admin_proto_init() } +func file_google_analytics_admin_v1alpha_analytics_admin_proto_init() { + if File_google_analytics_admin_v1alpha_analytics_admin_proto != nil { + return + } + file_google_analytics_admin_v1alpha_access_report_proto_init() + file_google_analytics_admin_v1alpha_audience_proto_init() + file_google_analytics_admin_v1alpha_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunAccessReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunAccessReportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProvisionAccountTicketRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProvisionAccountTicketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPropertyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPropertiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPropertiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePropertyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreatePropertyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePropertyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchGetUserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchGetUserLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListUserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListUserLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuditUserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuditUserLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateUserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchCreateUserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchCreateUserLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchUpdateUserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchUpdateUserLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteUserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchDeleteUserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateFirebaseLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteFirebaseLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFirebaseLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFirebaseLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGlobalSiteTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGoogleAdsLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGoogleAdsLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteGoogleAdsLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGoogleAdsLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGoogleAdsLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataSharingSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountSummariesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountSummariesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcknowledgeUserDataCollectionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcknowledgeUserDataCollectionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchChangeHistoryEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchChangeHistoryEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMeasurementProtocolSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateMeasurementProtocolSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteMeasurementProtocolSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateMeasurementProtocolSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMeasurementProtocolSecretsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMeasurementProtocolSecretsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGoogleSignalsSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGoogleSignalsSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateConversionEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConversionEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteConversionEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListConversionEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListConversionEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDisplayVideo360AdvertiserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDisplayVideo360AdvertiserLinksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDisplayVideo360AdvertiserLinksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDisplayVideo360AdvertiserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDisplayVideo360AdvertiserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDisplayVideo360AdvertiserLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDisplayVideo360AdvertiserLinkProposalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDisplayVideo360AdvertiserLinkProposalsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDisplayVideo360AdvertiserLinkProposalsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDisplayVideo360AdvertiserLinkProposalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDisplayVideo360AdvertiserLinkProposalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApproveDisplayVideo360AdvertiserLinkProposalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApproveDisplayVideo360AdvertiserLinkProposalResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelDisplayVideo360AdvertiserLinkProposalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateCustomDimensionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateCustomDimensionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCustomDimensionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCustomDimensionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArchiveCustomDimensionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[79].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCustomDimensionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[80].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateCustomMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[81].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateCustomMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[82].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCustomMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCustomMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArchiveCustomMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCustomMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataRetentionSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDataRetentionSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDataStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDataStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDataStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDataStreamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDataStreamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAudienceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAudiencesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAudiencesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAudienceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAudienceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArchiveAudienceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAttributionSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAttributionSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDesc, + NumEnums: 0, + NumMessages: 102, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_analytics_admin_v1alpha_analytics_admin_proto_goTypes, + DependencyIndexes: file_google_analytics_admin_v1alpha_analytics_admin_proto_depIdxs, + MessageInfos: file_google_analytics_admin_v1alpha_analytics_admin_proto_msgTypes, + }.Build() + File_google_analytics_admin_v1alpha_analytics_admin_proto = out.File + file_google_analytics_admin_v1alpha_analytics_admin_proto_rawDesc = nil + file_google_analytics_admin_v1alpha_analytics_admin_proto_goTypes = nil + file_google_analytics_admin_v1alpha_analytics_admin_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AnalyticsAdminServiceClient is the client API for AnalyticsAdminService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AnalyticsAdminServiceClient interface { + // Lookup for a single Account. + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) + // Returns all accounts accessible by the caller. + // + // Note that these accounts might not currently have GA4 properties. + // Soft-deleted (ie: "trashed") accounts are excluded by default. + // Returns an empty list if no relevant accounts are found. + ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) + // Marks target Account as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted accounts. + // However, they can be restored using the Trash Can UI. + // + // If the accounts are not restored before the expiration time, the account + // and all child resources (eg: Properties, GoogleAdsLinks, Streams, + // UserLinks) will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found. + DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates an account. + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*Account, error) + // Requests a ticket for creating an account. + ProvisionAccountTicket(ctx context.Context, in *ProvisionAccountTicketRequest, opts ...grpc.CallOption) (*ProvisionAccountTicketResponse, error) + // Returns summaries of all accounts accessible by the caller. + ListAccountSummaries(ctx context.Context, in *ListAccountSummariesRequest, opts ...grpc.CallOption) (*ListAccountSummariesResponse, error) + // Lookup for a single "GA4" Property. + GetProperty(ctx context.Context, in *GetPropertyRequest, opts ...grpc.CallOption) (*Property, error) + // Returns child Properties under the specified parent Account. + // + // Only "GA4" properties will be returned. + // Properties will be excluded if the caller does not have access. + // Soft-deleted (ie: "trashed") properties are excluded by default. + // Returns an empty list if no relevant properties are found. + ListProperties(ctx context.Context, in *ListPropertiesRequest, opts ...grpc.CallOption) (*ListPropertiesResponse, error) + // Creates an "GA4" property with the specified location and attributes. + CreateProperty(ctx context.Context, in *CreatePropertyRequest, opts ...grpc.CallOption) (*Property, error) + // Marks target Property as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted properties. + // However, they can be restored using the Trash Can UI. + // + // If the properties are not restored before the expiration time, the Property + // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found, or is not an GA4 Property. + DeleteProperty(ctx context.Context, in *DeletePropertyRequest, opts ...grpc.CallOption) (*Property, error) + // Updates a property. + UpdateProperty(ctx context.Context, in *UpdatePropertyRequest, opts ...grpc.CallOption) (*Property, error) + // Gets information about a user's link to an account or property. + GetUserLink(ctx context.Context, in *GetUserLinkRequest, opts ...grpc.CallOption) (*UserLink, error) + // Gets information about multiple users' links to an account or property. + BatchGetUserLinks(ctx context.Context, in *BatchGetUserLinksRequest, opts ...grpc.CallOption) (*BatchGetUserLinksResponse, error) + // Lists all user links on an account or property. + ListUserLinks(ctx context.Context, in *ListUserLinksRequest, opts ...grpc.CallOption) (*ListUserLinksResponse, error) + // Lists all user links on an account or property, including implicit ones + // that come from effective permissions granted by groups or organization + // admin roles. + // + // If a returned user link does not have direct permissions, they cannot + // be removed from the account or property directly with the DeleteUserLink + // command. They have to be removed from the group/etc that gives them + // permissions, which is currently only usable/discoverable in the GA or GMP + // UIs. + AuditUserLinks(ctx context.Context, in *AuditUserLinksRequest, opts ...grpc.CallOption) (*AuditUserLinksResponse, error) + // Creates a user link on an account or property. + // + // If the user with the specified email already has permissions on the + // account or property, then the user's existing permissions will be unioned + // with the permissions specified in the new UserLink. + CreateUserLink(ctx context.Context, in *CreateUserLinkRequest, opts ...grpc.CallOption) (*UserLink, error) + // Creates information about multiple users' links to an account or property. + // + // This method is transactional. If any UserLink cannot be created, none of + // the UserLinks will be created. + BatchCreateUserLinks(ctx context.Context, in *BatchCreateUserLinksRequest, opts ...grpc.CallOption) (*BatchCreateUserLinksResponse, error) + // Updates a user link on an account or property. + UpdateUserLink(ctx context.Context, in *UpdateUserLinkRequest, opts ...grpc.CallOption) (*UserLink, error) + // Updates information about multiple users' links to an account or property. + BatchUpdateUserLinks(ctx context.Context, in *BatchUpdateUserLinksRequest, opts ...grpc.CallOption) (*BatchUpdateUserLinksResponse, error) + // Deletes a user link on an account or property. + DeleteUserLink(ctx context.Context, in *DeleteUserLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes information about multiple users' links to an account or property. + BatchDeleteUserLinks(ctx context.Context, in *BatchDeleteUserLinksRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Creates a FirebaseLink. + // + // Properties can have at most one FirebaseLink. + CreateFirebaseLink(ctx context.Context, in *CreateFirebaseLinkRequest, opts ...grpc.CallOption) (*FirebaseLink, error) + // Deletes a FirebaseLink on a property + DeleteFirebaseLink(ctx context.Context, in *DeleteFirebaseLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists FirebaseLinks on a property. + // Properties can have at most one FirebaseLink. + ListFirebaseLinks(ctx context.Context, in *ListFirebaseLinksRequest, opts ...grpc.CallOption) (*ListFirebaseLinksResponse, error) + // Returns the Site Tag for the specified web stream. + // Site Tags are immutable singletons. + GetGlobalSiteTag(ctx context.Context, in *GetGlobalSiteTagRequest, opts ...grpc.CallOption) (*GlobalSiteTag, error) + // Creates a GoogleAdsLink. + CreateGoogleAdsLink(ctx context.Context, in *CreateGoogleAdsLinkRequest, opts ...grpc.CallOption) (*GoogleAdsLink, error) + // Updates a GoogleAdsLink on a property + UpdateGoogleAdsLink(ctx context.Context, in *UpdateGoogleAdsLinkRequest, opts ...grpc.CallOption) (*GoogleAdsLink, error) + // Deletes a GoogleAdsLink on a property + DeleteGoogleAdsLink(ctx context.Context, in *DeleteGoogleAdsLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists GoogleAdsLinks on a property. + ListGoogleAdsLinks(ctx context.Context, in *ListGoogleAdsLinksRequest, opts ...grpc.CallOption) (*ListGoogleAdsLinksResponse, error) + // Get data sharing settings on an account. + // Data sharing settings are singletons. + GetDataSharingSettings(ctx context.Context, in *GetDataSharingSettingsRequest, opts ...grpc.CallOption) (*DataSharingSettings, error) + // Lookup for a single "GA4" MeasurementProtocolSecret. + GetMeasurementProtocolSecret(ctx context.Context, in *GetMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*MeasurementProtocolSecret, error) + // Returns child MeasurementProtocolSecrets under the specified parent + // Property. + ListMeasurementProtocolSecrets(ctx context.Context, in *ListMeasurementProtocolSecretsRequest, opts ...grpc.CallOption) (*ListMeasurementProtocolSecretsResponse, error) + // Creates a measurement protocol secret. + CreateMeasurementProtocolSecret(ctx context.Context, in *CreateMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*MeasurementProtocolSecret, error) + // Deletes target MeasurementProtocolSecret. + DeleteMeasurementProtocolSecret(ctx context.Context, in *DeleteMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates a measurement protocol secret. + UpdateMeasurementProtocolSecret(ctx context.Context, in *UpdateMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*MeasurementProtocolSecret, error) + // Acknowledges the terms of user data collection for the specified property. + // + // This acknowledgement must be completed (either in the Google Analytics UI + // or via this API) before MeasurementProtocolSecret resources may be created. + AcknowledgeUserDataCollection(ctx context.Context, in *AcknowledgeUserDataCollectionRequest, opts ...grpc.CallOption) (*AcknowledgeUserDataCollectionResponse, error) + // Searches through all changes to an account or its children given the + // specified set of filters. + SearchChangeHistoryEvents(ctx context.Context, in *SearchChangeHistoryEventsRequest, opts ...grpc.CallOption) (*SearchChangeHistoryEventsResponse, error) + // Lookup for Google Signals settings for a property. + GetGoogleSignalsSettings(ctx context.Context, in *GetGoogleSignalsSettingsRequest, opts ...grpc.CallOption) (*GoogleSignalsSettings, error) + // Updates Google Signals settings for a property. + UpdateGoogleSignalsSettings(ctx context.Context, in *UpdateGoogleSignalsSettingsRequest, opts ...grpc.CallOption) (*GoogleSignalsSettings, error) + // Creates a conversion event with the specified attributes. + CreateConversionEvent(ctx context.Context, in *CreateConversionEventRequest, opts ...grpc.CallOption) (*ConversionEvent, error) + // Retrieve a single conversion event. + GetConversionEvent(ctx context.Context, in *GetConversionEventRequest, opts ...grpc.CallOption) (*ConversionEvent, error) + // Deletes a conversion event in a property. + DeleteConversionEvent(ctx context.Context, in *DeleteConversionEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns a list of conversion events in the specified parent property. + // + // Returns an empty list if no conversion events are found. + ListConversionEvents(ctx context.Context, in *ListConversionEventsRequest, opts ...grpc.CallOption) (*ListConversionEventsResponse, error) + // Look up a single DisplayVideo360AdvertiserLink + GetDisplayVideo360AdvertiserLink(ctx context.Context, in *GetDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLink, error) + // Lists all DisplayVideo360AdvertiserLinks on a property. + ListDisplayVideo360AdvertiserLinks(ctx context.Context, in *ListDisplayVideo360AdvertiserLinksRequest, opts ...grpc.CallOption) (*ListDisplayVideo360AdvertiserLinksResponse, error) + // Creates a DisplayVideo360AdvertiserLink. + // This can only be utilized by users who have proper authorization both on + // the Google Analytics property and on the Display & Video 360 advertiser. + // Users who do not have access to the Display & Video 360 advertiser should + // instead seek to create a DisplayVideo360LinkProposal. + CreateDisplayVideo360AdvertiserLink(ctx context.Context, in *CreateDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLink, error) + // Deletes a DisplayVideo360AdvertiserLink on a property. + DeleteDisplayVideo360AdvertiserLink(ctx context.Context, in *DeleteDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates a DisplayVideo360AdvertiserLink on a property. + UpdateDisplayVideo360AdvertiserLink(ctx context.Context, in *UpdateDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLink, error) + // Lookup for a single DisplayVideo360AdvertiserLinkProposal. + GetDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *GetDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLinkProposal, error) + // Lists DisplayVideo360AdvertiserLinkProposals on a property. + ListDisplayVideo360AdvertiserLinkProposals(ctx context.Context, in *ListDisplayVideo360AdvertiserLinkProposalsRequest, opts ...grpc.CallOption) (*ListDisplayVideo360AdvertiserLinkProposalsResponse, error) + // Creates a DisplayVideo360AdvertiserLinkProposal. + CreateDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *CreateDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLinkProposal, error) + // Deletes a DisplayVideo360AdvertiserLinkProposal on a property. + // This can only be used on cancelled proposals. + DeleteDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *DeleteDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Approves a DisplayVideo360AdvertiserLinkProposal. + // The DisplayVideo360AdvertiserLinkProposal will be deleted and a new + // DisplayVideo360AdvertiserLink will be created. + ApproveDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *ApproveDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*ApproveDisplayVideo360AdvertiserLinkProposalResponse, error) + // Cancels a DisplayVideo360AdvertiserLinkProposal. + // Cancelling can mean either: + // - Declining a proposal initiated from Display & Video 360 + // - Withdrawing a proposal initiated from Google Analytics + // After being cancelled, a proposal will eventually be deleted automatically. + CancelDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *CancelDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLinkProposal, error) + // Creates a CustomDimension. + CreateCustomDimension(ctx context.Context, in *CreateCustomDimensionRequest, opts ...grpc.CallOption) (*CustomDimension, error) + // Updates a CustomDimension on a property. + UpdateCustomDimension(ctx context.Context, in *UpdateCustomDimensionRequest, opts ...grpc.CallOption) (*CustomDimension, error) + // Lists CustomDimensions on a property. + ListCustomDimensions(ctx context.Context, in *ListCustomDimensionsRequest, opts ...grpc.CallOption) (*ListCustomDimensionsResponse, error) + // Archives a CustomDimension on a property. + ArchiveCustomDimension(ctx context.Context, in *ArchiveCustomDimensionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lookup for a single CustomDimension. + GetCustomDimension(ctx context.Context, in *GetCustomDimensionRequest, opts ...grpc.CallOption) (*CustomDimension, error) + // Creates a CustomMetric. + CreateCustomMetric(ctx context.Context, in *CreateCustomMetricRequest, opts ...grpc.CallOption) (*CustomMetric, error) + // Updates a CustomMetric on a property. + UpdateCustomMetric(ctx context.Context, in *UpdateCustomMetricRequest, opts ...grpc.CallOption) (*CustomMetric, error) + // Lists CustomMetrics on a property. + ListCustomMetrics(ctx context.Context, in *ListCustomMetricsRequest, opts ...grpc.CallOption) (*ListCustomMetricsResponse, error) + // Archives a CustomMetric on a property. + ArchiveCustomMetric(ctx context.Context, in *ArchiveCustomMetricRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lookup for a single CustomMetric. + GetCustomMetric(ctx context.Context, in *GetCustomMetricRequest, opts ...grpc.CallOption) (*CustomMetric, error) + // Returns the singleton data retention settings for this property. + GetDataRetentionSettings(ctx context.Context, in *GetDataRetentionSettingsRequest, opts ...grpc.CallOption) (*DataRetentionSettings, error) + // Updates the singleton data retention settings for this property. + UpdateDataRetentionSettings(ctx context.Context, in *UpdateDataRetentionSettingsRequest, opts ...grpc.CallOption) (*DataRetentionSettings, error) + // Creates a DataStream. + CreateDataStream(ctx context.Context, in *CreateDataStreamRequest, opts ...grpc.CallOption) (*DataStream, error) + // Deletes a DataStream on a property. + DeleteDataStream(ctx context.Context, in *DeleteDataStreamRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates a DataStream on a property. + UpdateDataStream(ctx context.Context, in *UpdateDataStreamRequest, opts ...grpc.CallOption) (*DataStream, error) + // Lists DataStreams on a property. + ListDataStreams(ctx context.Context, in *ListDataStreamsRequest, opts ...grpc.CallOption) (*ListDataStreamsResponse, error) + // Lookup for a single DataStream. + GetDataStream(ctx context.Context, in *GetDataStreamRequest, opts ...grpc.CallOption) (*DataStream, error) + // Lookup for a single Audience. + // Audiences created before 2020 may not be supported. + GetAudience(ctx context.Context, in *GetAudienceRequest, opts ...grpc.CallOption) (*Audience, error) + // Lists Audiences on a property. + // Audiences created before 2020 may not be supported. + ListAudiences(ctx context.Context, in *ListAudiencesRequest, opts ...grpc.CallOption) (*ListAudiencesResponse, error) + // Creates an Audience. + CreateAudience(ctx context.Context, in *CreateAudienceRequest, opts ...grpc.CallOption) (*Audience, error) + // Updates an Audience on a property. + UpdateAudience(ctx context.Context, in *UpdateAudienceRequest, opts ...grpc.CallOption) (*Audience, error) + // Archives an Audience on a property. + ArchiveAudience(ctx context.Context, in *ArchiveAudienceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lookup for a AttributionSettings singleton. + GetAttributionSettings(ctx context.Context, in *GetAttributionSettingsRequest, opts ...grpc.CallOption) (*AttributionSettings, error) + // Updates attribution settings on a property. + UpdateAttributionSettings(ctx context.Context, in *UpdateAttributionSettingsRequest, opts ...grpc.CallOption) (*AttributionSettings, error) + // Returns a customized report of data access records. The report provides + // records of each time a user reads Google Analytics reporting data. Access + // records are retained for up to 2 years. + // + // Data Access Reports can be requested for a property. The property must be + // in Google Analytics 360. This method is only available to Administrators. + // + // These data access records include GA4 UI Reporting, GA4 UI Explorations, + // GA4 Data API, and other products like Firebase & Admob that can retrieve + // data from Google Analytics through a linkage. These records don't include + // property configuration changes like adding a stream or changing a + // property's time zone. For configuration change history, see + // [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + RunAccessReport(ctx context.Context, in *RunAccessReportRequest, opts ...grpc.CallOption) (*RunAccessReportResponse, error) +} + +type analyticsAdminServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAnalyticsAdminServiceClient(cc grpc.ClientConnInterface) AnalyticsAdminServiceClient { + return &analyticsAdminServiceClient{cc} +} + +func (c *analyticsAdminServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) { + out := new(Account) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) { + out := new(ListAccountsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*Account, error) { + out := new(Account) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ProvisionAccountTicket(ctx context.Context, in *ProvisionAccountTicketRequest, opts ...grpc.CallOption) (*ProvisionAccountTicketResponse, error) { + out := new(ProvisionAccountTicketResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionAccountTicket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListAccountSummaries(ctx context.Context, in *ListAccountSummariesRequest, opts ...grpc.CallOption) (*ListAccountSummariesResponse, error) { + out := new(ListAccountSummariesResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetProperty(ctx context.Context, in *GetPropertyRequest, opts ...grpc.CallOption) (*Property, error) { + out := new(Property) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetProperty", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListProperties(ctx context.Context, in *ListPropertiesRequest, opts ...grpc.CallOption) (*ListPropertiesResponse, error) { + out := new(ListPropertiesResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListProperties", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateProperty(ctx context.Context, in *CreatePropertyRequest, opts ...grpc.CallOption) (*Property, error) { + out := new(Property) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateProperty", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteProperty(ctx context.Context, in *DeletePropertyRequest, opts ...grpc.CallOption) (*Property, error) { + out := new(Property) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteProperty", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateProperty(ctx context.Context, in *UpdatePropertyRequest, opts ...grpc.CallOption) (*Property, error) { + out := new(Property) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateProperty", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetUserLink(ctx context.Context, in *GetUserLinkRequest, opts ...grpc.CallOption) (*UserLink, error) { + out := new(UserLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetUserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) BatchGetUserLinks(ctx context.Context, in *BatchGetUserLinksRequest, opts ...grpc.CallOption) (*BatchGetUserLinksResponse, error) { + out := new(BatchGetUserLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetUserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListUserLinks(ctx context.Context, in *ListUserLinksRequest, opts ...grpc.CallOption) (*ListUserLinksResponse, error) { + out := new(ListUserLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListUserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) AuditUserLinks(ctx context.Context, in *AuditUserLinksRequest, opts ...grpc.CallOption) (*AuditUserLinksResponse, error) { + out := new(AuditUserLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/AuditUserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateUserLink(ctx context.Context, in *CreateUserLinkRequest, opts ...grpc.CallOption) (*UserLink, error) { + out := new(UserLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateUserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) BatchCreateUserLinks(ctx context.Context, in *BatchCreateUserLinksRequest, opts ...grpc.CallOption) (*BatchCreateUserLinksResponse, error) { + out := new(BatchCreateUserLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateUserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateUserLink(ctx context.Context, in *UpdateUserLinkRequest, opts ...grpc.CallOption) (*UserLink, error) { + out := new(UserLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateUserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) BatchUpdateUserLinks(ctx context.Context, in *BatchUpdateUserLinksRequest, opts ...grpc.CallOption) (*BatchUpdateUserLinksResponse, error) { + out := new(BatchUpdateUserLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateUserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteUserLink(ctx context.Context, in *DeleteUserLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteUserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) BatchDeleteUserLinks(ctx context.Context, in *BatchDeleteUserLinksRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteUserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateFirebaseLink(ctx context.Context, in *CreateFirebaseLinkRequest, opts ...grpc.CallOption) (*FirebaseLink, error) { + out := new(FirebaseLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateFirebaseLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteFirebaseLink(ctx context.Context, in *DeleteFirebaseLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteFirebaseLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListFirebaseLinks(ctx context.Context, in *ListFirebaseLinksRequest, opts ...grpc.CallOption) (*ListFirebaseLinksResponse, error) { + out := new(ListFirebaseLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListFirebaseLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetGlobalSiteTag(ctx context.Context, in *GetGlobalSiteTagRequest, opts ...grpc.CallOption) (*GlobalSiteTag, error) { + out := new(GlobalSiteTag) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGlobalSiteTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateGoogleAdsLink(ctx context.Context, in *CreateGoogleAdsLinkRequest, opts ...grpc.CallOption) (*GoogleAdsLink, error) { + out := new(GoogleAdsLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateGoogleAdsLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateGoogleAdsLink(ctx context.Context, in *UpdateGoogleAdsLinkRequest, opts ...grpc.CallOption) (*GoogleAdsLink, error) { + out := new(GoogleAdsLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleAdsLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteGoogleAdsLink(ctx context.Context, in *DeleteGoogleAdsLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteGoogleAdsLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListGoogleAdsLinks(ctx context.Context, in *ListGoogleAdsLinksRequest, opts ...grpc.CallOption) (*ListGoogleAdsLinksResponse, error) { + out := new(ListGoogleAdsLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListGoogleAdsLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetDataSharingSettings(ctx context.Context, in *GetDataSharingSettingsRequest, opts ...grpc.CallOption) (*DataSharingSettings, error) { + out := new(DataSharingSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetMeasurementProtocolSecret(ctx context.Context, in *GetMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*MeasurementProtocolSecret, error) { + out := new(MeasurementProtocolSecret) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListMeasurementProtocolSecrets(ctx context.Context, in *ListMeasurementProtocolSecretsRequest, opts ...grpc.CallOption) (*ListMeasurementProtocolSecretsResponse, error) { + out := new(ListMeasurementProtocolSecretsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateMeasurementProtocolSecret(ctx context.Context, in *CreateMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*MeasurementProtocolSecret, error) { + out := new(MeasurementProtocolSecret) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteMeasurementProtocolSecret(ctx context.Context, in *DeleteMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateMeasurementProtocolSecret(ctx context.Context, in *UpdateMeasurementProtocolSecretRequest, opts ...grpc.CallOption) (*MeasurementProtocolSecret, error) { + out := new(MeasurementProtocolSecret) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) AcknowledgeUserDataCollection(ctx context.Context, in *AcknowledgeUserDataCollectionRequest, opts ...grpc.CallOption) (*AcknowledgeUserDataCollectionResponse, error) { + out := new(AcknowledgeUserDataCollectionResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) SearchChangeHistoryEvents(ctx context.Context, in *SearchChangeHistoryEventsRequest, opts ...grpc.CallOption) (*SearchChangeHistoryEventsResponse, error) { + out := new(SearchChangeHistoryEventsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetGoogleSignalsSettings(ctx context.Context, in *GetGoogleSignalsSettingsRequest, opts ...grpc.CallOption) (*GoogleSignalsSettings, error) { + out := new(GoogleSignalsSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateGoogleSignalsSettings(ctx context.Context, in *UpdateGoogleSignalsSettingsRequest, opts ...grpc.CallOption) (*GoogleSignalsSettings, error) { + out := new(GoogleSignalsSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateConversionEvent(ctx context.Context, in *CreateConversionEventRequest, opts ...grpc.CallOption) (*ConversionEvent, error) { + out := new(ConversionEvent) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetConversionEvent(ctx context.Context, in *GetConversionEventRequest, opts ...grpc.CallOption) (*ConversionEvent, error) { + out := new(ConversionEvent) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetConversionEvent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteConversionEvent(ctx context.Context, in *DeleteConversionEventRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListConversionEvents(ctx context.Context, in *ListConversionEventsRequest, opts ...grpc.CallOption) (*ListConversionEventsResponse, error) { + out := new(ListConversionEventsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetDisplayVideo360AdvertiserLink(ctx context.Context, in *GetDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLink, error) { + out := new(DisplayVideo360AdvertiserLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListDisplayVideo360AdvertiserLinks(ctx context.Context, in *ListDisplayVideo360AdvertiserLinksRequest, opts ...grpc.CallOption) (*ListDisplayVideo360AdvertiserLinksResponse, error) { + out := new(ListDisplayVideo360AdvertiserLinksResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateDisplayVideo360AdvertiserLink(ctx context.Context, in *CreateDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLink, error) { + out := new(DisplayVideo360AdvertiserLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteDisplayVideo360AdvertiserLink(ctx context.Context, in *DeleteDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateDisplayVideo360AdvertiserLink(ctx context.Context, in *UpdateDisplayVideo360AdvertiserLinkRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLink, error) { + out := new(DisplayVideo360AdvertiserLink) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *GetDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLinkProposal, error) { + out := new(DisplayVideo360AdvertiserLinkProposal) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListDisplayVideo360AdvertiserLinkProposals(ctx context.Context, in *ListDisplayVideo360AdvertiserLinkProposalsRequest, opts ...grpc.CallOption) (*ListDisplayVideo360AdvertiserLinkProposalsResponse, error) { + out := new(ListDisplayVideo360AdvertiserLinkProposalsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *CreateDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLinkProposal, error) { + out := new(DisplayVideo360AdvertiserLinkProposal) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *DeleteDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ApproveDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *ApproveDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*ApproveDisplayVideo360AdvertiserLinkProposalResponse, error) { + out := new(ApproveDisplayVideo360AdvertiserLinkProposalResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CancelDisplayVideo360AdvertiserLinkProposal(ctx context.Context, in *CancelDisplayVideo360AdvertiserLinkProposalRequest, opts ...grpc.CallOption) (*DisplayVideo360AdvertiserLinkProposal, error) { + out := new(DisplayVideo360AdvertiserLinkProposal) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateCustomDimension(ctx context.Context, in *CreateCustomDimensionRequest, opts ...grpc.CallOption) (*CustomDimension, error) { + out := new(CustomDimension) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateCustomDimension(ctx context.Context, in *UpdateCustomDimensionRequest, opts ...grpc.CallOption) (*CustomDimension, error) { + out := new(CustomDimension) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListCustomDimensions(ctx context.Context, in *ListCustomDimensionsRequest, opts ...grpc.CallOption) (*ListCustomDimensionsResponse, error) { + out := new(ListCustomDimensionsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ArchiveCustomDimension(ctx context.Context, in *ArchiveCustomDimensionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetCustomDimension(ctx context.Context, in *GetCustomDimensionRequest, opts ...grpc.CallOption) (*CustomDimension, error) { + out := new(CustomDimension) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomDimension", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateCustomMetric(ctx context.Context, in *CreateCustomMetricRequest, opts ...grpc.CallOption) (*CustomMetric, error) { + out := new(CustomMetric) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomMetric", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateCustomMetric(ctx context.Context, in *UpdateCustomMetricRequest, opts ...grpc.CallOption) (*CustomMetric, error) { + out := new(CustomMetric) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomMetric", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListCustomMetrics(ctx context.Context, in *ListCustomMetricsRequest, opts ...grpc.CallOption) (*ListCustomMetricsResponse, error) { + out := new(ListCustomMetricsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ArchiveCustomMetric(ctx context.Context, in *ArchiveCustomMetricRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomMetric", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetCustomMetric(ctx context.Context, in *GetCustomMetricRequest, opts ...grpc.CallOption) (*CustomMetric, error) { + out := new(CustomMetric) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomMetric", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetDataRetentionSettings(ctx context.Context, in *GetDataRetentionSettingsRequest, opts ...grpc.CallOption) (*DataRetentionSettings, error) { + out := new(DataRetentionSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateDataRetentionSettings(ctx context.Context, in *UpdateDataRetentionSettingsRequest, opts ...grpc.CallOption) (*DataRetentionSettings, error) { + out := new(DataRetentionSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateDataStream(ctx context.Context, in *CreateDataStreamRequest, opts ...grpc.CallOption) (*DataStream, error) { + out := new(DataStream) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDataStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) DeleteDataStream(ctx context.Context, in *DeleteDataStreamRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDataStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateDataStream(ctx context.Context, in *UpdateDataStreamRequest, opts ...grpc.CallOption) (*DataStream, error) { + out := new(DataStream) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListDataStreams(ctx context.Context, in *ListDataStreamsRequest, opts ...grpc.CallOption) (*ListDataStreamsResponse, error) { + out := new(ListDataStreamsResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDataStreams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetDataStream(ctx context.Context, in *GetDataStreamRequest, opts ...grpc.CallOption) (*DataStream, error) { + out := new(DataStream) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetAudience(ctx context.Context, in *GetAudienceRequest, opts ...grpc.CallOption) (*Audience, error) { + out := new(Audience) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAudience", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ListAudiences(ctx context.Context, in *ListAudiencesRequest, opts ...grpc.CallOption) (*ListAudiencesResponse, error) { + out := new(ListAudiencesResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAudiences", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) CreateAudience(ctx context.Context, in *CreateAudienceRequest, opts ...grpc.CallOption) (*Audience, error) { + out := new(Audience) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAudience", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateAudience(ctx context.Context, in *UpdateAudienceRequest, opts ...grpc.CallOption) (*Audience, error) { + out := new(Audience) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAudience", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) ArchiveAudience(ctx context.Context, in *ArchiveAudienceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveAudience", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) GetAttributionSettings(ctx context.Context, in *GetAttributionSettingsRequest, opts ...grpc.CallOption) (*AttributionSettings, error) { + out := new(AttributionSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) UpdateAttributionSettings(ctx context.Context, in *UpdateAttributionSettingsRequest, opts ...grpc.CallOption) (*AttributionSettings, error) { + out := new(AttributionSettings) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analyticsAdminServiceClient) RunAccessReport(ctx context.Context, in *RunAccessReportRequest, opts ...grpc.CallOption) (*RunAccessReportResponse, error) { + out := new(RunAccessReportResponse) + err := c.cc.Invoke(ctx, "/google.analytics.admin.v1alpha.AnalyticsAdminService/RunAccessReport", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AnalyticsAdminServiceServer is the server API for AnalyticsAdminService service. +type AnalyticsAdminServiceServer interface { + // Lookup for a single Account. + GetAccount(context.Context, *GetAccountRequest) (*Account, error) + // Returns all accounts accessible by the caller. + // + // Note that these accounts might not currently have GA4 properties. + // Soft-deleted (ie: "trashed") accounts are excluded by default. + // Returns an empty list if no relevant accounts are found. + ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) + // Marks target Account as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted accounts. + // However, they can be restored using the Trash Can UI. + // + // If the accounts are not restored before the expiration time, the account + // and all child resources (eg: Properties, GoogleAdsLinks, Streams, + // UserLinks) will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found. + DeleteAccount(context.Context, *DeleteAccountRequest) (*emptypb.Empty, error) + // Updates an account. + UpdateAccount(context.Context, *UpdateAccountRequest) (*Account, error) + // Requests a ticket for creating an account. + ProvisionAccountTicket(context.Context, *ProvisionAccountTicketRequest) (*ProvisionAccountTicketResponse, error) + // Returns summaries of all accounts accessible by the caller. + ListAccountSummaries(context.Context, *ListAccountSummariesRequest) (*ListAccountSummariesResponse, error) + // Lookup for a single "GA4" Property. + GetProperty(context.Context, *GetPropertyRequest) (*Property, error) + // Returns child Properties under the specified parent Account. + // + // Only "GA4" properties will be returned. + // Properties will be excluded if the caller does not have access. + // Soft-deleted (ie: "trashed") properties are excluded by default. + // Returns an empty list if no relevant properties are found. + ListProperties(context.Context, *ListPropertiesRequest) (*ListPropertiesResponse, error) + // Creates an "GA4" property with the specified location and attributes. + CreateProperty(context.Context, *CreatePropertyRequest) (*Property, error) + // Marks target Property as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted properties. + // However, they can be restored using the Trash Can UI. + // + // If the properties are not restored before the expiration time, the Property + // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found, or is not an GA4 Property. + DeleteProperty(context.Context, *DeletePropertyRequest) (*Property, error) + // Updates a property. + UpdateProperty(context.Context, *UpdatePropertyRequest) (*Property, error) + // Gets information about a user's link to an account or property. + GetUserLink(context.Context, *GetUserLinkRequest) (*UserLink, error) + // Gets information about multiple users' links to an account or property. + BatchGetUserLinks(context.Context, *BatchGetUserLinksRequest) (*BatchGetUserLinksResponse, error) + // Lists all user links on an account or property. + ListUserLinks(context.Context, *ListUserLinksRequest) (*ListUserLinksResponse, error) + // Lists all user links on an account or property, including implicit ones + // that come from effective permissions granted by groups or organization + // admin roles. + // + // If a returned user link does not have direct permissions, they cannot + // be removed from the account or property directly with the DeleteUserLink + // command. They have to be removed from the group/etc that gives them + // permissions, which is currently only usable/discoverable in the GA or GMP + // UIs. + AuditUserLinks(context.Context, *AuditUserLinksRequest) (*AuditUserLinksResponse, error) + // Creates a user link on an account or property. + // + // If the user with the specified email already has permissions on the + // account or property, then the user's existing permissions will be unioned + // with the permissions specified in the new UserLink. + CreateUserLink(context.Context, *CreateUserLinkRequest) (*UserLink, error) + // Creates information about multiple users' links to an account or property. + // + // This method is transactional. If any UserLink cannot be created, none of + // the UserLinks will be created. + BatchCreateUserLinks(context.Context, *BatchCreateUserLinksRequest) (*BatchCreateUserLinksResponse, error) + // Updates a user link on an account or property. + UpdateUserLink(context.Context, *UpdateUserLinkRequest) (*UserLink, error) + // Updates information about multiple users' links to an account or property. + BatchUpdateUserLinks(context.Context, *BatchUpdateUserLinksRequest) (*BatchUpdateUserLinksResponse, error) + // Deletes a user link on an account or property. + DeleteUserLink(context.Context, *DeleteUserLinkRequest) (*emptypb.Empty, error) + // Deletes information about multiple users' links to an account or property. + BatchDeleteUserLinks(context.Context, *BatchDeleteUserLinksRequest) (*emptypb.Empty, error) + // Creates a FirebaseLink. + // + // Properties can have at most one FirebaseLink. + CreateFirebaseLink(context.Context, *CreateFirebaseLinkRequest) (*FirebaseLink, error) + // Deletes a FirebaseLink on a property + DeleteFirebaseLink(context.Context, *DeleteFirebaseLinkRequest) (*emptypb.Empty, error) + // Lists FirebaseLinks on a property. + // Properties can have at most one FirebaseLink. + ListFirebaseLinks(context.Context, *ListFirebaseLinksRequest) (*ListFirebaseLinksResponse, error) + // Returns the Site Tag for the specified web stream. + // Site Tags are immutable singletons. + GetGlobalSiteTag(context.Context, *GetGlobalSiteTagRequest) (*GlobalSiteTag, error) + // Creates a GoogleAdsLink. + CreateGoogleAdsLink(context.Context, *CreateGoogleAdsLinkRequest) (*GoogleAdsLink, error) + // Updates a GoogleAdsLink on a property + UpdateGoogleAdsLink(context.Context, *UpdateGoogleAdsLinkRequest) (*GoogleAdsLink, error) + // Deletes a GoogleAdsLink on a property + DeleteGoogleAdsLink(context.Context, *DeleteGoogleAdsLinkRequest) (*emptypb.Empty, error) + // Lists GoogleAdsLinks on a property. + ListGoogleAdsLinks(context.Context, *ListGoogleAdsLinksRequest) (*ListGoogleAdsLinksResponse, error) + // Get data sharing settings on an account. + // Data sharing settings are singletons. + GetDataSharingSettings(context.Context, *GetDataSharingSettingsRequest) (*DataSharingSettings, error) + // Lookup for a single "GA4" MeasurementProtocolSecret. + GetMeasurementProtocolSecret(context.Context, *GetMeasurementProtocolSecretRequest) (*MeasurementProtocolSecret, error) + // Returns child MeasurementProtocolSecrets under the specified parent + // Property. + ListMeasurementProtocolSecrets(context.Context, *ListMeasurementProtocolSecretsRequest) (*ListMeasurementProtocolSecretsResponse, error) + // Creates a measurement protocol secret. + CreateMeasurementProtocolSecret(context.Context, *CreateMeasurementProtocolSecretRequest) (*MeasurementProtocolSecret, error) + // Deletes target MeasurementProtocolSecret. + DeleteMeasurementProtocolSecret(context.Context, *DeleteMeasurementProtocolSecretRequest) (*emptypb.Empty, error) + // Updates a measurement protocol secret. + UpdateMeasurementProtocolSecret(context.Context, *UpdateMeasurementProtocolSecretRequest) (*MeasurementProtocolSecret, error) + // Acknowledges the terms of user data collection for the specified property. + // + // This acknowledgement must be completed (either in the Google Analytics UI + // or via this API) before MeasurementProtocolSecret resources may be created. + AcknowledgeUserDataCollection(context.Context, *AcknowledgeUserDataCollectionRequest) (*AcknowledgeUserDataCollectionResponse, error) + // Searches through all changes to an account or its children given the + // specified set of filters. + SearchChangeHistoryEvents(context.Context, *SearchChangeHistoryEventsRequest) (*SearchChangeHistoryEventsResponse, error) + // Lookup for Google Signals settings for a property. + GetGoogleSignalsSettings(context.Context, *GetGoogleSignalsSettingsRequest) (*GoogleSignalsSettings, error) + // Updates Google Signals settings for a property. + UpdateGoogleSignalsSettings(context.Context, *UpdateGoogleSignalsSettingsRequest) (*GoogleSignalsSettings, error) + // Creates a conversion event with the specified attributes. + CreateConversionEvent(context.Context, *CreateConversionEventRequest) (*ConversionEvent, error) + // Retrieve a single conversion event. + GetConversionEvent(context.Context, *GetConversionEventRequest) (*ConversionEvent, error) + // Deletes a conversion event in a property. + DeleteConversionEvent(context.Context, *DeleteConversionEventRequest) (*emptypb.Empty, error) + // Returns a list of conversion events in the specified parent property. + // + // Returns an empty list if no conversion events are found. + ListConversionEvents(context.Context, *ListConversionEventsRequest) (*ListConversionEventsResponse, error) + // Look up a single DisplayVideo360AdvertiserLink + GetDisplayVideo360AdvertiserLink(context.Context, *GetDisplayVideo360AdvertiserLinkRequest) (*DisplayVideo360AdvertiserLink, error) + // Lists all DisplayVideo360AdvertiserLinks on a property. + ListDisplayVideo360AdvertiserLinks(context.Context, *ListDisplayVideo360AdvertiserLinksRequest) (*ListDisplayVideo360AdvertiserLinksResponse, error) + // Creates a DisplayVideo360AdvertiserLink. + // This can only be utilized by users who have proper authorization both on + // the Google Analytics property and on the Display & Video 360 advertiser. + // Users who do not have access to the Display & Video 360 advertiser should + // instead seek to create a DisplayVideo360LinkProposal. + CreateDisplayVideo360AdvertiserLink(context.Context, *CreateDisplayVideo360AdvertiserLinkRequest) (*DisplayVideo360AdvertiserLink, error) + // Deletes a DisplayVideo360AdvertiserLink on a property. + DeleteDisplayVideo360AdvertiserLink(context.Context, *DeleteDisplayVideo360AdvertiserLinkRequest) (*emptypb.Empty, error) + // Updates a DisplayVideo360AdvertiserLink on a property. + UpdateDisplayVideo360AdvertiserLink(context.Context, *UpdateDisplayVideo360AdvertiserLinkRequest) (*DisplayVideo360AdvertiserLink, error) + // Lookup for a single DisplayVideo360AdvertiserLinkProposal. + GetDisplayVideo360AdvertiserLinkProposal(context.Context, *GetDisplayVideo360AdvertiserLinkProposalRequest) (*DisplayVideo360AdvertiserLinkProposal, error) + // Lists DisplayVideo360AdvertiserLinkProposals on a property. + ListDisplayVideo360AdvertiserLinkProposals(context.Context, *ListDisplayVideo360AdvertiserLinkProposalsRequest) (*ListDisplayVideo360AdvertiserLinkProposalsResponse, error) + // Creates a DisplayVideo360AdvertiserLinkProposal. + CreateDisplayVideo360AdvertiserLinkProposal(context.Context, *CreateDisplayVideo360AdvertiserLinkProposalRequest) (*DisplayVideo360AdvertiserLinkProposal, error) + // Deletes a DisplayVideo360AdvertiserLinkProposal on a property. + // This can only be used on cancelled proposals. + DeleteDisplayVideo360AdvertiserLinkProposal(context.Context, *DeleteDisplayVideo360AdvertiserLinkProposalRequest) (*emptypb.Empty, error) + // Approves a DisplayVideo360AdvertiserLinkProposal. + // The DisplayVideo360AdvertiserLinkProposal will be deleted and a new + // DisplayVideo360AdvertiserLink will be created. + ApproveDisplayVideo360AdvertiserLinkProposal(context.Context, *ApproveDisplayVideo360AdvertiserLinkProposalRequest) (*ApproveDisplayVideo360AdvertiserLinkProposalResponse, error) + // Cancels a DisplayVideo360AdvertiserLinkProposal. + // Cancelling can mean either: + // - Declining a proposal initiated from Display & Video 360 + // - Withdrawing a proposal initiated from Google Analytics + // After being cancelled, a proposal will eventually be deleted automatically. + CancelDisplayVideo360AdvertiserLinkProposal(context.Context, *CancelDisplayVideo360AdvertiserLinkProposalRequest) (*DisplayVideo360AdvertiserLinkProposal, error) + // Creates a CustomDimension. + CreateCustomDimension(context.Context, *CreateCustomDimensionRequest) (*CustomDimension, error) + // Updates a CustomDimension on a property. + UpdateCustomDimension(context.Context, *UpdateCustomDimensionRequest) (*CustomDimension, error) + // Lists CustomDimensions on a property. + ListCustomDimensions(context.Context, *ListCustomDimensionsRequest) (*ListCustomDimensionsResponse, error) + // Archives a CustomDimension on a property. + ArchiveCustomDimension(context.Context, *ArchiveCustomDimensionRequest) (*emptypb.Empty, error) + // Lookup for a single CustomDimension. + GetCustomDimension(context.Context, *GetCustomDimensionRequest) (*CustomDimension, error) + // Creates a CustomMetric. + CreateCustomMetric(context.Context, *CreateCustomMetricRequest) (*CustomMetric, error) + // Updates a CustomMetric on a property. + UpdateCustomMetric(context.Context, *UpdateCustomMetricRequest) (*CustomMetric, error) + // Lists CustomMetrics on a property. + ListCustomMetrics(context.Context, *ListCustomMetricsRequest) (*ListCustomMetricsResponse, error) + // Archives a CustomMetric on a property. + ArchiveCustomMetric(context.Context, *ArchiveCustomMetricRequest) (*emptypb.Empty, error) + // Lookup for a single CustomMetric. + GetCustomMetric(context.Context, *GetCustomMetricRequest) (*CustomMetric, error) + // Returns the singleton data retention settings for this property. + GetDataRetentionSettings(context.Context, *GetDataRetentionSettingsRequest) (*DataRetentionSettings, error) + // Updates the singleton data retention settings for this property. + UpdateDataRetentionSettings(context.Context, *UpdateDataRetentionSettingsRequest) (*DataRetentionSettings, error) + // Creates a DataStream. + CreateDataStream(context.Context, *CreateDataStreamRequest) (*DataStream, error) + // Deletes a DataStream on a property. + DeleteDataStream(context.Context, *DeleteDataStreamRequest) (*emptypb.Empty, error) + // Updates a DataStream on a property. + UpdateDataStream(context.Context, *UpdateDataStreamRequest) (*DataStream, error) + // Lists DataStreams on a property. + ListDataStreams(context.Context, *ListDataStreamsRequest) (*ListDataStreamsResponse, error) + // Lookup for a single DataStream. + GetDataStream(context.Context, *GetDataStreamRequest) (*DataStream, error) + // Lookup for a single Audience. + // Audiences created before 2020 may not be supported. + GetAudience(context.Context, *GetAudienceRequest) (*Audience, error) + // Lists Audiences on a property. + // Audiences created before 2020 may not be supported. + ListAudiences(context.Context, *ListAudiencesRequest) (*ListAudiencesResponse, error) + // Creates an Audience. + CreateAudience(context.Context, *CreateAudienceRequest) (*Audience, error) + // Updates an Audience on a property. + UpdateAudience(context.Context, *UpdateAudienceRequest) (*Audience, error) + // Archives an Audience on a property. + ArchiveAudience(context.Context, *ArchiveAudienceRequest) (*emptypb.Empty, error) + // Lookup for a AttributionSettings singleton. + GetAttributionSettings(context.Context, *GetAttributionSettingsRequest) (*AttributionSettings, error) + // Updates attribution settings on a property. + UpdateAttributionSettings(context.Context, *UpdateAttributionSettingsRequest) (*AttributionSettings, error) + // Returns a customized report of data access records. The report provides + // records of each time a user reads Google Analytics reporting data. Access + // records are retained for up to 2 years. + // + // Data Access Reports can be requested for a property. The property must be + // in Google Analytics 360. This method is only available to Administrators. + // + // These data access records include GA4 UI Reporting, GA4 UI Explorations, + // GA4 Data API, and other products like Firebase & Admob that can retrieve + // data from Google Analytics through a linkage. These records don't include + // property configuration changes like adding a stream or changing a + // property's time zone. For configuration change history, see + // [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + RunAccessReport(context.Context, *RunAccessReportRequest) (*RunAccessReportResponse, error) +} + +// UnimplementedAnalyticsAdminServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAnalyticsAdminServiceServer struct { +} + +func (*UnimplementedAnalyticsAdminServiceServer) GetAccount(context.Context, *GetAccountRequest) (*Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ProvisionAccountTicket(context.Context, *ProvisionAccountTicketRequest) (*ProvisionAccountTicketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProvisionAccountTicket not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListAccountSummaries(context.Context, *ListAccountSummariesRequest) (*ListAccountSummariesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAccountSummaries not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetProperty(context.Context, *GetPropertyRequest) (*Property, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProperty not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListProperties(context.Context, *ListPropertiesRequest) (*ListPropertiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListProperties not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateProperty(context.Context, *CreatePropertyRequest) (*Property, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProperty not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteProperty(context.Context, *DeletePropertyRequest) (*Property, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProperty not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateProperty(context.Context, *UpdatePropertyRequest) (*Property, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProperty not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetUserLink(context.Context, *GetUserLinkRequest) (*UserLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) BatchGetUserLinks(context.Context, *BatchGetUserLinksRequest) (*BatchGetUserLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchGetUserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListUserLinks(context.Context, *ListUserLinksRequest) (*ListUserLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) AuditUserLinks(context.Context, *AuditUserLinksRequest) (*AuditUserLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuditUserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateUserLink(context.Context, *CreateUserLinkRequest) (*UserLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateUserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) BatchCreateUserLinks(context.Context, *BatchCreateUserLinksRequest) (*BatchCreateUserLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCreateUserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateUserLink(context.Context, *UpdateUserLinkRequest) (*UserLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) BatchUpdateUserLinks(context.Context, *BatchUpdateUserLinksRequest) (*BatchUpdateUserLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateUserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteUserLink(context.Context, *DeleteUserLinkRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteUserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) BatchDeleteUserLinks(context.Context, *BatchDeleteUserLinksRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchDeleteUserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateFirebaseLink(context.Context, *CreateFirebaseLinkRequest) (*FirebaseLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateFirebaseLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteFirebaseLink(context.Context, *DeleteFirebaseLinkRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteFirebaseLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListFirebaseLinks(context.Context, *ListFirebaseLinksRequest) (*ListFirebaseLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFirebaseLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetGlobalSiteTag(context.Context, *GetGlobalSiteTagRequest) (*GlobalSiteTag, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGlobalSiteTag not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateGoogleAdsLink(context.Context, *CreateGoogleAdsLinkRequest) (*GoogleAdsLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGoogleAdsLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateGoogleAdsLink(context.Context, *UpdateGoogleAdsLinkRequest) (*GoogleAdsLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGoogleAdsLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteGoogleAdsLink(context.Context, *DeleteGoogleAdsLinkRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteGoogleAdsLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListGoogleAdsLinks(context.Context, *ListGoogleAdsLinksRequest) (*ListGoogleAdsLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGoogleAdsLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetDataSharingSettings(context.Context, *GetDataSharingSettingsRequest) (*DataSharingSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataSharingSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetMeasurementProtocolSecret(context.Context, *GetMeasurementProtocolSecretRequest) (*MeasurementProtocolSecret, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMeasurementProtocolSecret not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListMeasurementProtocolSecrets(context.Context, *ListMeasurementProtocolSecretsRequest) (*ListMeasurementProtocolSecretsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMeasurementProtocolSecrets not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateMeasurementProtocolSecret(context.Context, *CreateMeasurementProtocolSecretRequest) (*MeasurementProtocolSecret, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateMeasurementProtocolSecret not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteMeasurementProtocolSecret(context.Context, *DeleteMeasurementProtocolSecretRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMeasurementProtocolSecret not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateMeasurementProtocolSecret(context.Context, *UpdateMeasurementProtocolSecretRequest) (*MeasurementProtocolSecret, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateMeasurementProtocolSecret not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) AcknowledgeUserDataCollection(context.Context, *AcknowledgeUserDataCollectionRequest) (*AcknowledgeUserDataCollectionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AcknowledgeUserDataCollection not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) SearchChangeHistoryEvents(context.Context, *SearchChangeHistoryEventsRequest) (*SearchChangeHistoryEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchChangeHistoryEvents not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetGoogleSignalsSettings(context.Context, *GetGoogleSignalsSettingsRequest) (*GoogleSignalsSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGoogleSignalsSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateGoogleSignalsSettings(context.Context, *UpdateGoogleSignalsSettingsRequest) (*GoogleSignalsSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGoogleSignalsSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateConversionEvent(context.Context, *CreateConversionEventRequest) (*ConversionEvent, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateConversionEvent not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetConversionEvent(context.Context, *GetConversionEventRequest) (*ConversionEvent, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConversionEvent not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteConversionEvent(context.Context, *DeleteConversionEventRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteConversionEvent not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListConversionEvents(context.Context, *ListConversionEventsRequest) (*ListConversionEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListConversionEvents not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetDisplayVideo360AdvertiserLink(context.Context, *GetDisplayVideo360AdvertiserLinkRequest) (*DisplayVideo360AdvertiserLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDisplayVideo360AdvertiserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListDisplayVideo360AdvertiserLinks(context.Context, *ListDisplayVideo360AdvertiserLinksRequest) (*ListDisplayVideo360AdvertiserLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDisplayVideo360AdvertiserLinks not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateDisplayVideo360AdvertiserLink(context.Context, *CreateDisplayVideo360AdvertiserLinkRequest) (*DisplayVideo360AdvertiserLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDisplayVideo360AdvertiserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteDisplayVideo360AdvertiserLink(context.Context, *DeleteDisplayVideo360AdvertiserLinkRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDisplayVideo360AdvertiserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateDisplayVideo360AdvertiserLink(context.Context, *UpdateDisplayVideo360AdvertiserLinkRequest) (*DisplayVideo360AdvertiserLink, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDisplayVideo360AdvertiserLink not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetDisplayVideo360AdvertiserLinkProposal(context.Context, *GetDisplayVideo360AdvertiserLinkProposalRequest) (*DisplayVideo360AdvertiserLinkProposal, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDisplayVideo360AdvertiserLinkProposal not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListDisplayVideo360AdvertiserLinkProposals(context.Context, *ListDisplayVideo360AdvertiserLinkProposalsRequest) (*ListDisplayVideo360AdvertiserLinkProposalsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDisplayVideo360AdvertiserLinkProposals not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateDisplayVideo360AdvertiserLinkProposal(context.Context, *CreateDisplayVideo360AdvertiserLinkProposalRequest) (*DisplayVideo360AdvertiserLinkProposal, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDisplayVideo360AdvertiserLinkProposal not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteDisplayVideo360AdvertiserLinkProposal(context.Context, *DeleteDisplayVideo360AdvertiserLinkProposalRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDisplayVideo360AdvertiserLinkProposal not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ApproveDisplayVideo360AdvertiserLinkProposal(context.Context, *ApproveDisplayVideo360AdvertiserLinkProposalRequest) (*ApproveDisplayVideo360AdvertiserLinkProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApproveDisplayVideo360AdvertiserLinkProposal not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CancelDisplayVideo360AdvertiserLinkProposal(context.Context, *CancelDisplayVideo360AdvertiserLinkProposalRequest) (*DisplayVideo360AdvertiserLinkProposal, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelDisplayVideo360AdvertiserLinkProposal not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateCustomDimension(context.Context, *CreateCustomDimensionRequest) (*CustomDimension, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCustomDimension not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateCustomDimension(context.Context, *UpdateCustomDimensionRequest) (*CustomDimension, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCustomDimension not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListCustomDimensions(context.Context, *ListCustomDimensionsRequest) (*ListCustomDimensionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCustomDimensions not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ArchiveCustomDimension(context.Context, *ArchiveCustomDimensionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveCustomDimension not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetCustomDimension(context.Context, *GetCustomDimensionRequest) (*CustomDimension, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCustomDimension not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateCustomMetric(context.Context, *CreateCustomMetricRequest) (*CustomMetric, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCustomMetric not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateCustomMetric(context.Context, *UpdateCustomMetricRequest) (*CustomMetric, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCustomMetric not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListCustomMetrics(context.Context, *ListCustomMetricsRequest) (*ListCustomMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCustomMetrics not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ArchiveCustomMetric(context.Context, *ArchiveCustomMetricRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveCustomMetric not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetCustomMetric(context.Context, *GetCustomMetricRequest) (*CustomMetric, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCustomMetric not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetDataRetentionSettings(context.Context, *GetDataRetentionSettingsRequest) (*DataRetentionSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataRetentionSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateDataRetentionSettings(context.Context, *UpdateDataRetentionSettingsRequest) (*DataRetentionSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDataRetentionSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateDataStream(context.Context, *CreateDataStreamRequest) (*DataStream, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDataStream not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) DeleteDataStream(context.Context, *DeleteDataStreamRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDataStream not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateDataStream(context.Context, *UpdateDataStreamRequest) (*DataStream, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDataStream not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListDataStreams(context.Context, *ListDataStreamsRequest) (*ListDataStreamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDataStreams not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetDataStream(context.Context, *GetDataStreamRequest) (*DataStream, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataStream not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetAudience(context.Context, *GetAudienceRequest) (*Audience, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAudience not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ListAudiences(context.Context, *ListAudiencesRequest) (*ListAudiencesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAudiences not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) CreateAudience(context.Context, *CreateAudienceRequest) (*Audience, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAudience not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateAudience(context.Context, *UpdateAudienceRequest) (*Audience, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAudience not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) ArchiveAudience(context.Context, *ArchiveAudienceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveAudience not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) GetAttributionSettings(context.Context, *GetAttributionSettingsRequest) (*AttributionSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttributionSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) UpdateAttributionSettings(context.Context, *UpdateAttributionSettingsRequest) (*AttributionSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAttributionSettings not implemented") +} +func (*UnimplementedAnalyticsAdminServiceServer) RunAccessReport(context.Context, *RunAccessReportRequest) (*RunAccessReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RunAccessReport not implemented") +} + +func RegisterAnalyticsAdminServiceServer(s *grpc.Server, srv AnalyticsAdminServiceServer) { + s.RegisterService(&_AnalyticsAdminService_serviceDesc, srv) +} + +func _AnalyticsAdminService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListAccounts(ctx, req.(*ListAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteAccount(ctx, req.(*DeleteAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateAccount(ctx, req.(*UpdateAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ProvisionAccountTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProvisionAccountTicketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ProvisionAccountTicket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ProvisionAccountTicket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ProvisionAccountTicket(ctx, req.(*ProvisionAccountTicketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListAccountSummaries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccountSummariesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListAccountSummaries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListAccountSummaries(ctx, req.(*ListAccountSummariesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetProperty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPropertyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetProperty(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetProperty", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetProperty(ctx, req.(*GetPropertyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListProperties_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPropertiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListProperties(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListProperties", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListProperties(ctx, req.(*ListPropertiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateProperty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePropertyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateProperty(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateProperty", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateProperty(ctx, req.(*CreatePropertyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteProperty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePropertyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteProperty(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteProperty", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteProperty(ctx, req.(*DeletePropertyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateProperty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePropertyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateProperty(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateProperty", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateProperty(ctx, req.(*UpdatePropertyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetUserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetUserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetUserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetUserLink(ctx, req.(*GetUserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_BatchGetUserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchGetUserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).BatchGetUserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchGetUserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).BatchGetUserLinks(ctx, req.(*BatchGetUserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListUserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListUserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListUserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListUserLinks(ctx, req.(*ListUserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_AuditUserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuditUserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).AuditUserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/AuditUserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).AuditUserLinks(ctx, req.(*AuditUserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateUserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateUserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateUserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateUserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateUserLink(ctx, req.(*CreateUserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_BatchCreateUserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchCreateUserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).BatchCreateUserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchCreateUserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).BatchCreateUserLinks(ctx, req.(*BatchCreateUserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateUserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateUserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateUserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateUserLink(ctx, req.(*UpdateUserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_BatchUpdateUserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchUpdateUserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).BatchUpdateUserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchUpdateUserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).BatchUpdateUserLinks(ctx, req.(*BatchUpdateUserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteUserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteUserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteUserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteUserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteUserLink(ctx, req.(*DeleteUserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_BatchDeleteUserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchDeleteUserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).BatchDeleteUserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/BatchDeleteUserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).BatchDeleteUserLinks(ctx, req.(*BatchDeleteUserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateFirebaseLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFirebaseLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateFirebaseLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateFirebaseLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateFirebaseLink(ctx, req.(*CreateFirebaseLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteFirebaseLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFirebaseLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteFirebaseLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteFirebaseLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteFirebaseLink(ctx, req.(*DeleteFirebaseLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListFirebaseLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFirebaseLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListFirebaseLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListFirebaseLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListFirebaseLinks(ctx, req.(*ListFirebaseLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetGlobalSiteTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGlobalSiteTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetGlobalSiteTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGlobalSiteTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetGlobalSiteTag(ctx, req.(*GetGlobalSiteTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateGoogleAdsLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGoogleAdsLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateGoogleAdsLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateGoogleAdsLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateGoogleAdsLink(ctx, req.(*CreateGoogleAdsLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateGoogleAdsLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGoogleAdsLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateGoogleAdsLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleAdsLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateGoogleAdsLink(ctx, req.(*UpdateGoogleAdsLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteGoogleAdsLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteGoogleAdsLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteGoogleAdsLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteGoogleAdsLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteGoogleAdsLink(ctx, req.(*DeleteGoogleAdsLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListGoogleAdsLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListGoogleAdsLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListGoogleAdsLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListGoogleAdsLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListGoogleAdsLinks(ctx, req.(*ListGoogleAdsLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetDataSharingSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataSharingSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetDataSharingSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataSharingSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetDataSharingSettings(ctx, req.(*GetDataSharingSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetMeasurementProtocolSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMeasurementProtocolSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetMeasurementProtocolSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetMeasurementProtocolSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetMeasurementProtocolSecret(ctx, req.(*GetMeasurementProtocolSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListMeasurementProtocolSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMeasurementProtocolSecretsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListMeasurementProtocolSecrets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListMeasurementProtocolSecrets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListMeasurementProtocolSecrets(ctx, req.(*ListMeasurementProtocolSecretsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateMeasurementProtocolSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateMeasurementProtocolSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateMeasurementProtocolSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateMeasurementProtocolSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateMeasurementProtocolSecret(ctx, req.(*CreateMeasurementProtocolSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteMeasurementProtocolSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMeasurementProtocolSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteMeasurementProtocolSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteMeasurementProtocolSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteMeasurementProtocolSecret(ctx, req.(*DeleteMeasurementProtocolSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateMeasurementProtocolSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateMeasurementProtocolSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateMeasurementProtocolSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateMeasurementProtocolSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateMeasurementProtocolSecret(ctx, req.(*UpdateMeasurementProtocolSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_AcknowledgeUserDataCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AcknowledgeUserDataCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).AcknowledgeUserDataCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/AcknowledgeUserDataCollection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).AcknowledgeUserDataCollection(ctx, req.(*AcknowledgeUserDataCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_SearchChangeHistoryEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchChangeHistoryEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).SearchChangeHistoryEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/SearchChangeHistoryEvents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).SearchChangeHistoryEvents(ctx, req.(*SearchChangeHistoryEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetGoogleSignalsSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGoogleSignalsSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetGoogleSignalsSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetGoogleSignalsSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetGoogleSignalsSettings(ctx, req.(*GetGoogleSignalsSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateGoogleSignalsSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGoogleSignalsSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateGoogleSignalsSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateGoogleSignalsSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateGoogleSignalsSettings(ctx, req.(*UpdateGoogleSignalsSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateConversionEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateConversionEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateConversionEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConversionEvent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateConversionEvent(ctx, req.(*CreateConversionEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetConversionEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConversionEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetConversionEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetConversionEvent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetConversionEvent(ctx, req.(*GetConversionEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteConversionEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteConversionEventRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteConversionEvent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConversionEvent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteConversionEvent(ctx, req.(*DeleteConversionEventRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListConversionEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListConversionEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListConversionEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConversionEvents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListConversionEvents(ctx, req.(*ListConversionEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetDisplayVideo360AdvertiserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDisplayVideo360AdvertiserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetDisplayVideo360AdvertiserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetDisplayVideo360AdvertiserLink(ctx, req.(*GetDisplayVideo360AdvertiserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDisplayVideo360AdvertiserLinksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListDisplayVideo360AdvertiserLinks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListDisplayVideo360AdvertiserLinks(ctx, req.(*ListDisplayVideo360AdvertiserLinksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateDisplayVideo360AdvertiserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDisplayVideo360AdvertiserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateDisplayVideo360AdvertiserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateDisplayVideo360AdvertiserLink(ctx, req.(*CreateDisplayVideo360AdvertiserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDisplayVideo360AdvertiserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteDisplayVideo360AdvertiserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteDisplayVideo360AdvertiserLink(ctx, req.(*DeleteDisplayVideo360AdvertiserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateDisplayVideo360AdvertiserLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDisplayVideo360AdvertiserLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateDisplayVideo360AdvertiserLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDisplayVideo360AdvertiserLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateDisplayVideo360AdvertiserLink(ctx, req.(*UpdateDisplayVideo360AdvertiserLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetDisplayVideo360AdvertiserLinkProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDisplayVideo360AdvertiserLinkProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetDisplayVideo360AdvertiserLinkProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDisplayVideo360AdvertiserLinkProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetDisplayVideo360AdvertiserLinkProposal(ctx, req.(*GetDisplayVideo360AdvertiserLinkProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDisplayVideo360AdvertiserLinkProposalsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListDisplayVideo360AdvertiserLinkProposals(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDisplayVideo360AdvertiserLinkProposals", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListDisplayVideo360AdvertiserLinkProposals(ctx, req.(*ListDisplayVideo360AdvertiserLinkProposalsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateDisplayVideo360AdvertiserLinkProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDisplayVideo360AdvertiserLinkProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateDisplayVideo360AdvertiserLinkProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDisplayVideo360AdvertiserLinkProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateDisplayVideo360AdvertiserLinkProposal(ctx, req.(*CreateDisplayVideo360AdvertiserLinkProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLinkProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDisplayVideo360AdvertiserLinkProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteDisplayVideo360AdvertiserLinkProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDisplayVideo360AdvertiserLinkProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteDisplayVideo360AdvertiserLinkProposal(ctx, req.(*DeleteDisplayVideo360AdvertiserLinkProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ApproveDisplayVideo360AdvertiserLinkProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApproveDisplayVideo360AdvertiserLinkProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ApproveDisplayVideo360AdvertiserLinkProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ApproveDisplayVideo360AdvertiserLinkProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ApproveDisplayVideo360AdvertiserLinkProposal(ctx, req.(*ApproveDisplayVideo360AdvertiserLinkProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelDisplayVideo360AdvertiserLinkProposalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CancelDisplayVideo360AdvertiserLinkProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CancelDisplayVideo360AdvertiserLinkProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CancelDisplayVideo360AdvertiserLinkProposal(ctx, req.(*CancelDisplayVideo360AdvertiserLinkProposalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateCustomDimension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCustomDimensionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateCustomDimension(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomDimension", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateCustomDimension(ctx, req.(*CreateCustomDimensionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateCustomDimension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCustomDimensionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateCustomDimension(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomDimension", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateCustomDimension(ctx, req.(*UpdateCustomDimensionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListCustomDimensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCustomDimensionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListCustomDimensions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomDimensions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListCustomDimensions(ctx, req.(*ListCustomDimensionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ArchiveCustomDimension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveCustomDimensionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ArchiveCustomDimension(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomDimension", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ArchiveCustomDimension(ctx, req.(*ArchiveCustomDimensionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetCustomDimension_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCustomDimensionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetCustomDimension(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomDimension", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetCustomDimension(ctx, req.(*GetCustomDimensionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateCustomMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCustomMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateCustomMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateCustomMetric", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateCustomMetric(ctx, req.(*CreateCustomMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateCustomMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCustomMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateCustomMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateCustomMetric", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateCustomMetric(ctx, req.(*UpdateCustomMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListCustomMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCustomMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListCustomMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListCustomMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListCustomMetrics(ctx, req.(*ListCustomMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ArchiveCustomMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveCustomMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ArchiveCustomMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveCustomMetric", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ArchiveCustomMetric(ctx, req.(*ArchiveCustomMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetCustomMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCustomMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetCustomMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetCustomMetric", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetCustomMetric(ctx, req.(*GetCustomMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetDataRetentionSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataRetentionSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetDataRetentionSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataRetentionSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetDataRetentionSettings(ctx, req.(*GetDataRetentionSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateDataRetentionSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDataRetentionSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateDataRetentionSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataRetentionSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateDataRetentionSettings(ctx, req.(*UpdateDataRetentionSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateDataStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDataStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateDataStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateDataStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateDataStream(ctx, req.(*CreateDataStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_DeleteDataStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDataStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).DeleteDataStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteDataStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).DeleteDataStream(ctx, req.(*DeleteDataStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateDataStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDataStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateDataStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateDataStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateDataStream(ctx, req.(*UpdateDataStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListDataStreams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDataStreamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListDataStreams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListDataStreams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListDataStreams(ctx, req.(*ListDataStreamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetDataStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetDataStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetDataStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetDataStream(ctx, req.(*GetDataStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetAudience_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAudienceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetAudience(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAudience", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetAudience(ctx, req.(*GetAudienceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ListAudiences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAudiencesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ListAudiences(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ListAudiences", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ListAudiences(ctx, req.(*ListAudiencesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_CreateAudience_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAudienceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).CreateAudience(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateAudience", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).CreateAudience(ctx, req.(*CreateAudienceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateAudience_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAudienceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateAudience(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAudience", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateAudience(ctx, req.(*UpdateAudienceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_ArchiveAudience_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveAudienceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).ArchiveAudience(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/ArchiveAudience", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).ArchiveAudience(ctx, req.(*ArchiveAudienceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_GetAttributionSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAttributionSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).GetAttributionSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/GetAttributionSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).GetAttributionSettings(ctx, req.(*GetAttributionSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_UpdateAttributionSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAttributionSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).UpdateAttributionSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateAttributionSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).UpdateAttributionSettings(ctx, req.(*UpdateAttributionSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalyticsAdminService_RunAccessReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunAccessReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalyticsAdminServiceServer).RunAccessReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.analytics.admin.v1alpha.AnalyticsAdminService/RunAccessReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalyticsAdminServiceServer).RunAccessReport(ctx, req.(*RunAccessReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AnalyticsAdminService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.analytics.admin.v1alpha.AnalyticsAdminService", + HandlerType: (*AnalyticsAdminServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAccount", + Handler: _AnalyticsAdminService_GetAccount_Handler, + }, + { + MethodName: "ListAccounts", + Handler: _AnalyticsAdminService_ListAccounts_Handler, + }, + { + MethodName: "DeleteAccount", + Handler: _AnalyticsAdminService_DeleteAccount_Handler, + }, + { + MethodName: "UpdateAccount", + Handler: _AnalyticsAdminService_UpdateAccount_Handler, + }, + { + MethodName: "ProvisionAccountTicket", + Handler: _AnalyticsAdminService_ProvisionAccountTicket_Handler, + }, + { + MethodName: "ListAccountSummaries", + Handler: _AnalyticsAdminService_ListAccountSummaries_Handler, + }, + { + MethodName: "GetProperty", + Handler: _AnalyticsAdminService_GetProperty_Handler, + }, + { + MethodName: "ListProperties", + Handler: _AnalyticsAdminService_ListProperties_Handler, + }, + { + MethodName: "CreateProperty", + Handler: _AnalyticsAdminService_CreateProperty_Handler, + }, + { + MethodName: "DeleteProperty", + Handler: _AnalyticsAdminService_DeleteProperty_Handler, + }, + { + MethodName: "UpdateProperty", + Handler: _AnalyticsAdminService_UpdateProperty_Handler, + }, + { + MethodName: "GetUserLink", + Handler: _AnalyticsAdminService_GetUserLink_Handler, + }, + { + MethodName: "BatchGetUserLinks", + Handler: _AnalyticsAdminService_BatchGetUserLinks_Handler, + }, + { + MethodName: "ListUserLinks", + Handler: _AnalyticsAdminService_ListUserLinks_Handler, + }, + { + MethodName: "AuditUserLinks", + Handler: _AnalyticsAdminService_AuditUserLinks_Handler, + }, + { + MethodName: "CreateUserLink", + Handler: _AnalyticsAdminService_CreateUserLink_Handler, + }, + { + MethodName: "BatchCreateUserLinks", + Handler: _AnalyticsAdminService_BatchCreateUserLinks_Handler, + }, + { + MethodName: "UpdateUserLink", + Handler: _AnalyticsAdminService_UpdateUserLink_Handler, + }, + { + MethodName: "BatchUpdateUserLinks", + Handler: _AnalyticsAdminService_BatchUpdateUserLinks_Handler, + }, + { + MethodName: "DeleteUserLink", + Handler: _AnalyticsAdminService_DeleteUserLink_Handler, + }, + { + MethodName: "BatchDeleteUserLinks", + Handler: _AnalyticsAdminService_BatchDeleteUserLinks_Handler, + }, + { + MethodName: "CreateFirebaseLink", + Handler: _AnalyticsAdminService_CreateFirebaseLink_Handler, + }, + { + MethodName: "DeleteFirebaseLink", + Handler: _AnalyticsAdminService_DeleteFirebaseLink_Handler, + }, + { + MethodName: "ListFirebaseLinks", + Handler: _AnalyticsAdminService_ListFirebaseLinks_Handler, + }, + { + MethodName: "GetGlobalSiteTag", + Handler: _AnalyticsAdminService_GetGlobalSiteTag_Handler, + }, + { + MethodName: "CreateGoogleAdsLink", + Handler: _AnalyticsAdminService_CreateGoogleAdsLink_Handler, + }, + { + MethodName: "UpdateGoogleAdsLink", + Handler: _AnalyticsAdminService_UpdateGoogleAdsLink_Handler, + }, + { + MethodName: "DeleteGoogleAdsLink", + Handler: _AnalyticsAdminService_DeleteGoogleAdsLink_Handler, + }, + { + MethodName: "ListGoogleAdsLinks", + Handler: _AnalyticsAdminService_ListGoogleAdsLinks_Handler, + }, + { + MethodName: "GetDataSharingSettings", + Handler: _AnalyticsAdminService_GetDataSharingSettings_Handler, + }, + { + MethodName: "GetMeasurementProtocolSecret", + Handler: _AnalyticsAdminService_GetMeasurementProtocolSecret_Handler, + }, + { + MethodName: "ListMeasurementProtocolSecrets", + Handler: _AnalyticsAdminService_ListMeasurementProtocolSecrets_Handler, + }, + { + MethodName: "CreateMeasurementProtocolSecret", + Handler: _AnalyticsAdminService_CreateMeasurementProtocolSecret_Handler, + }, + { + MethodName: "DeleteMeasurementProtocolSecret", + Handler: _AnalyticsAdminService_DeleteMeasurementProtocolSecret_Handler, + }, + { + MethodName: "UpdateMeasurementProtocolSecret", + Handler: _AnalyticsAdminService_UpdateMeasurementProtocolSecret_Handler, + }, + { + MethodName: "AcknowledgeUserDataCollection", + Handler: _AnalyticsAdminService_AcknowledgeUserDataCollection_Handler, + }, + { + MethodName: "SearchChangeHistoryEvents", + Handler: _AnalyticsAdminService_SearchChangeHistoryEvents_Handler, + }, + { + MethodName: "GetGoogleSignalsSettings", + Handler: _AnalyticsAdminService_GetGoogleSignalsSettings_Handler, + }, + { + MethodName: "UpdateGoogleSignalsSettings", + Handler: _AnalyticsAdminService_UpdateGoogleSignalsSettings_Handler, + }, + { + MethodName: "CreateConversionEvent", + Handler: _AnalyticsAdminService_CreateConversionEvent_Handler, + }, + { + MethodName: "GetConversionEvent", + Handler: _AnalyticsAdminService_GetConversionEvent_Handler, + }, + { + MethodName: "DeleteConversionEvent", + Handler: _AnalyticsAdminService_DeleteConversionEvent_Handler, + }, + { + MethodName: "ListConversionEvents", + Handler: _AnalyticsAdminService_ListConversionEvents_Handler, + }, + { + MethodName: "GetDisplayVideo360AdvertiserLink", + Handler: _AnalyticsAdminService_GetDisplayVideo360AdvertiserLink_Handler, + }, + { + MethodName: "ListDisplayVideo360AdvertiserLinks", + Handler: _AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_Handler, + }, + { + MethodName: "CreateDisplayVideo360AdvertiserLink", + Handler: _AnalyticsAdminService_CreateDisplayVideo360AdvertiserLink_Handler, + }, + { + MethodName: "DeleteDisplayVideo360AdvertiserLink", + Handler: _AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLink_Handler, + }, + { + MethodName: "UpdateDisplayVideo360AdvertiserLink", + Handler: _AnalyticsAdminService_UpdateDisplayVideo360AdvertiserLink_Handler, + }, + { + MethodName: "GetDisplayVideo360AdvertiserLinkProposal", + Handler: _AnalyticsAdminService_GetDisplayVideo360AdvertiserLinkProposal_Handler, + }, + { + MethodName: "ListDisplayVideo360AdvertiserLinkProposals", + Handler: _AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_Handler, + }, + { + MethodName: "CreateDisplayVideo360AdvertiserLinkProposal", + Handler: _AnalyticsAdminService_CreateDisplayVideo360AdvertiserLinkProposal_Handler, + }, + { + MethodName: "DeleteDisplayVideo360AdvertiserLinkProposal", + Handler: _AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLinkProposal_Handler, + }, + { + MethodName: "ApproveDisplayVideo360AdvertiserLinkProposal", + Handler: _AnalyticsAdminService_ApproveDisplayVideo360AdvertiserLinkProposal_Handler, + }, + { + MethodName: "CancelDisplayVideo360AdvertiserLinkProposal", + Handler: _AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_Handler, + }, + { + MethodName: "CreateCustomDimension", + Handler: _AnalyticsAdminService_CreateCustomDimension_Handler, + }, + { + MethodName: "UpdateCustomDimension", + Handler: _AnalyticsAdminService_UpdateCustomDimension_Handler, + }, + { + MethodName: "ListCustomDimensions", + Handler: _AnalyticsAdminService_ListCustomDimensions_Handler, + }, + { + MethodName: "ArchiveCustomDimension", + Handler: _AnalyticsAdminService_ArchiveCustomDimension_Handler, + }, + { + MethodName: "GetCustomDimension", + Handler: _AnalyticsAdminService_GetCustomDimension_Handler, + }, + { + MethodName: "CreateCustomMetric", + Handler: _AnalyticsAdminService_CreateCustomMetric_Handler, + }, + { + MethodName: "UpdateCustomMetric", + Handler: _AnalyticsAdminService_UpdateCustomMetric_Handler, + }, + { + MethodName: "ListCustomMetrics", + Handler: _AnalyticsAdminService_ListCustomMetrics_Handler, + }, + { + MethodName: "ArchiveCustomMetric", + Handler: _AnalyticsAdminService_ArchiveCustomMetric_Handler, + }, + { + MethodName: "GetCustomMetric", + Handler: _AnalyticsAdminService_GetCustomMetric_Handler, + }, + { + MethodName: "GetDataRetentionSettings", + Handler: _AnalyticsAdminService_GetDataRetentionSettings_Handler, + }, + { + MethodName: "UpdateDataRetentionSettings", + Handler: _AnalyticsAdminService_UpdateDataRetentionSettings_Handler, + }, + { + MethodName: "CreateDataStream", + Handler: _AnalyticsAdminService_CreateDataStream_Handler, + }, + { + MethodName: "DeleteDataStream", + Handler: _AnalyticsAdminService_DeleteDataStream_Handler, + }, + { + MethodName: "UpdateDataStream", + Handler: _AnalyticsAdminService_UpdateDataStream_Handler, + }, + { + MethodName: "ListDataStreams", + Handler: _AnalyticsAdminService_ListDataStreams_Handler, + }, + { + MethodName: "GetDataStream", + Handler: _AnalyticsAdminService_GetDataStream_Handler, + }, + { + MethodName: "GetAudience", + Handler: _AnalyticsAdminService_GetAudience_Handler, + }, + { + MethodName: "ListAudiences", + Handler: _AnalyticsAdminService_ListAudiences_Handler, + }, + { + MethodName: "CreateAudience", + Handler: _AnalyticsAdminService_CreateAudience_Handler, + }, + { + MethodName: "UpdateAudience", + Handler: _AnalyticsAdminService_UpdateAudience_Handler, + }, + { + MethodName: "ArchiveAudience", + Handler: _AnalyticsAdminService_ArchiveAudience_Handler, + }, + { + MethodName: "GetAttributionSettings", + Handler: _AnalyticsAdminService_GetAttributionSettings_Handler, + }, + { + MethodName: "UpdateAttributionSettings", + Handler: _AnalyticsAdminService_UpdateAttributionSettings_Handler, + }, + { + MethodName: "RunAccessReport", + Handler: _AnalyticsAdminService_RunAccessReport_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/analytics/admin/v1alpha/analytics_admin.proto", +} diff --git a/analytics/admin/apiv1alpha/adminpb/audience.pb.go b/analytics/admin/apiv1alpha/adminpb/audience.pb.go new file mode 100644 index 000000000000..2a15185667b1 --- /dev/null +++ b/analytics/admin/apiv1alpha/adminpb/audience.pb.go @@ -0,0 +1,2290 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/analytics/admin/v1alpha/audience.proto + +package adminpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Specifies how to evaluate users for joining an Audience. +type AudienceFilterScope int32 + +const ( + // Scope is not specified. + AudienceFilterScope_AUDIENCE_FILTER_SCOPE_UNSPECIFIED AudienceFilterScope = 0 + // User joins the Audience if the filter condition is met within one + // event. + AudienceFilterScope_AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT AudienceFilterScope = 1 + // User joins the Audience if the filter condition is met within one + // session. + AudienceFilterScope_AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION AudienceFilterScope = 2 + // User joins the Audience if the filter condition is met by any event + // across any session. + AudienceFilterScope_AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS AudienceFilterScope = 3 +) + +// Enum value maps for AudienceFilterScope. +var ( + AudienceFilterScope_name = map[int32]string{ + 0: "AUDIENCE_FILTER_SCOPE_UNSPECIFIED", + 1: "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT", + 2: "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION", + 3: "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS", + } + AudienceFilterScope_value = map[string]int32{ + "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": 0, + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": 1, + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": 2, + "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": 3, + } +) + +func (x AudienceFilterScope) Enum() *AudienceFilterScope { + p := new(AudienceFilterScope) + *p = x + return p +} + +func (x AudienceFilterScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AudienceFilterScope) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_audience_proto_enumTypes[0].Descriptor() +} + +func (AudienceFilterScope) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_audience_proto_enumTypes[0] +} + +func (x AudienceFilterScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AudienceFilterScope.Descriptor instead. +func (AudienceFilterScope) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0} +} + +// The match type for the string filter. +type AudienceDimensionOrMetricFilter_StringFilter_MatchType int32 + +const ( + // Unspecified + AudienceDimensionOrMetricFilter_StringFilter_MATCH_TYPE_UNSPECIFIED AudienceDimensionOrMetricFilter_StringFilter_MatchType = 0 + // Exact match of the string value. + AudienceDimensionOrMetricFilter_StringFilter_EXACT AudienceDimensionOrMetricFilter_StringFilter_MatchType = 1 + // Begins with the string value. + AudienceDimensionOrMetricFilter_StringFilter_BEGINS_WITH AudienceDimensionOrMetricFilter_StringFilter_MatchType = 2 + // Ends with the string value. + AudienceDimensionOrMetricFilter_StringFilter_ENDS_WITH AudienceDimensionOrMetricFilter_StringFilter_MatchType = 3 + // Contains the string value. + AudienceDimensionOrMetricFilter_StringFilter_CONTAINS AudienceDimensionOrMetricFilter_StringFilter_MatchType = 4 + // Full regular expression matches with the string value. + AudienceDimensionOrMetricFilter_StringFilter_FULL_REGEXP AudienceDimensionOrMetricFilter_StringFilter_MatchType = 5 + // Partial regular expression matches with the string value. + AudienceDimensionOrMetricFilter_StringFilter_PARTIAL_REGEXP AudienceDimensionOrMetricFilter_StringFilter_MatchType = 6 +) + +// Enum value maps for AudienceDimensionOrMetricFilter_StringFilter_MatchType. +var ( + AudienceDimensionOrMetricFilter_StringFilter_MatchType_name = map[int32]string{ + 0: "MATCH_TYPE_UNSPECIFIED", + 1: "EXACT", + 2: "BEGINS_WITH", + 3: "ENDS_WITH", + 4: "CONTAINS", + 5: "FULL_REGEXP", + 6: "PARTIAL_REGEXP", + } + AudienceDimensionOrMetricFilter_StringFilter_MatchType_value = map[string]int32{ + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6, + } +) + +func (x AudienceDimensionOrMetricFilter_StringFilter_MatchType) Enum() *AudienceDimensionOrMetricFilter_StringFilter_MatchType { + p := new(AudienceDimensionOrMetricFilter_StringFilter_MatchType) + *p = x + return p +} + +func (x AudienceDimensionOrMetricFilter_StringFilter_MatchType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AudienceDimensionOrMetricFilter_StringFilter_MatchType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_audience_proto_enumTypes[1].Descriptor() +} + +func (AudienceDimensionOrMetricFilter_StringFilter_MatchType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_audience_proto_enumTypes[1] +} + +func (x AudienceDimensionOrMetricFilter_StringFilter_MatchType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_StringFilter_MatchType.Descriptor instead. +func (AudienceDimensionOrMetricFilter_StringFilter_MatchType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// The operation applied to a numeric filter. +type AudienceDimensionOrMetricFilter_NumericFilter_Operation int32 + +const ( + // Unspecified. + AudienceDimensionOrMetricFilter_NumericFilter_OPERATION_UNSPECIFIED AudienceDimensionOrMetricFilter_NumericFilter_Operation = 0 + // Equal. + AudienceDimensionOrMetricFilter_NumericFilter_EQUAL AudienceDimensionOrMetricFilter_NumericFilter_Operation = 1 + // Less than. + AudienceDimensionOrMetricFilter_NumericFilter_LESS_THAN AudienceDimensionOrMetricFilter_NumericFilter_Operation = 2 + // Less than or equal. + AudienceDimensionOrMetricFilter_NumericFilter_LESS_THAN_OR_EQUAL AudienceDimensionOrMetricFilter_NumericFilter_Operation = 3 + // Greater than. + AudienceDimensionOrMetricFilter_NumericFilter_GREATER_THAN AudienceDimensionOrMetricFilter_NumericFilter_Operation = 4 + // Greater than or equal. + AudienceDimensionOrMetricFilter_NumericFilter_GREATER_THAN_OR_EQUAL AudienceDimensionOrMetricFilter_NumericFilter_Operation = 5 +) + +// Enum value maps for AudienceDimensionOrMetricFilter_NumericFilter_Operation. +var ( + AudienceDimensionOrMetricFilter_NumericFilter_Operation_name = map[int32]string{ + 0: "OPERATION_UNSPECIFIED", + 1: "EQUAL", + 2: "LESS_THAN", + 3: "LESS_THAN_OR_EQUAL", + 4: "GREATER_THAN", + 5: "GREATER_THAN_OR_EQUAL", + } + AudienceDimensionOrMetricFilter_NumericFilter_Operation_value = map[string]int32{ + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5, + } +) + +func (x AudienceDimensionOrMetricFilter_NumericFilter_Operation) Enum() *AudienceDimensionOrMetricFilter_NumericFilter_Operation { + p := new(AudienceDimensionOrMetricFilter_NumericFilter_Operation) + *p = x + return p +} + +func (x AudienceDimensionOrMetricFilter_NumericFilter_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AudienceDimensionOrMetricFilter_NumericFilter_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_audience_proto_enumTypes[2].Descriptor() +} + +func (AudienceDimensionOrMetricFilter_NumericFilter_Operation) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_audience_proto_enumTypes[2] +} + +func (x AudienceDimensionOrMetricFilter_NumericFilter_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_NumericFilter_Operation.Descriptor instead. +func (AudienceDimensionOrMetricFilter_NumericFilter_Operation) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 3, 0} +} + +// Specifies whether this is an include or exclude filter clause. +type AudienceFilterClause_AudienceClauseType int32 + +const ( + // Unspecified clause type. + AudienceFilterClause_AUDIENCE_CLAUSE_TYPE_UNSPECIFIED AudienceFilterClause_AudienceClauseType = 0 + // Users will be included in the Audience if the filter clause is met. + AudienceFilterClause_INCLUDE AudienceFilterClause_AudienceClauseType = 1 + // Users will be excluded from the Audience if the filter clause is met. + AudienceFilterClause_EXCLUDE AudienceFilterClause_AudienceClauseType = 2 +) + +// Enum value maps for AudienceFilterClause_AudienceClauseType. +var ( + AudienceFilterClause_AudienceClauseType_name = map[int32]string{ + 0: "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED", + 1: "INCLUDE", + 2: "EXCLUDE", + } + AudienceFilterClause_AudienceClauseType_value = map[string]int32{ + "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": 0, + "INCLUDE": 1, + "EXCLUDE": 2, + } +) + +func (x AudienceFilterClause_AudienceClauseType) Enum() *AudienceFilterClause_AudienceClauseType { + p := new(AudienceFilterClause_AudienceClauseType) + *p = x + return p +} + +func (x AudienceFilterClause_AudienceClauseType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AudienceFilterClause_AudienceClauseType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_audience_proto_enumTypes[3].Descriptor() +} + +func (AudienceFilterClause_AudienceClauseType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_audience_proto_enumTypes[3] +} + +func (x AudienceFilterClause_AudienceClauseType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AudienceFilterClause_AudienceClauseType.Descriptor instead. +func (AudienceFilterClause_AudienceClauseType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{6, 0} +} + +// Determines when to log the event. +type AudienceEventTrigger_LogCondition int32 + +const ( + // Log condition is not specified. + AudienceEventTrigger_LOG_CONDITION_UNSPECIFIED AudienceEventTrigger_LogCondition = 0 + // The event should be logged only when a user is joined. + AudienceEventTrigger_AUDIENCE_JOINED AudienceEventTrigger_LogCondition = 1 + // The event should be logged whenever the Audience condition is met, even + // if the user is already a member of the Audience. + AudienceEventTrigger_AUDIENCE_MEMBERSHIP_RENEWED AudienceEventTrigger_LogCondition = 2 +) + +// Enum value maps for AudienceEventTrigger_LogCondition. +var ( + AudienceEventTrigger_LogCondition_name = map[int32]string{ + 0: "LOG_CONDITION_UNSPECIFIED", + 1: "AUDIENCE_JOINED", + 2: "AUDIENCE_MEMBERSHIP_RENEWED", + } + AudienceEventTrigger_LogCondition_value = map[string]int32{ + "LOG_CONDITION_UNSPECIFIED": 0, + "AUDIENCE_JOINED": 1, + "AUDIENCE_MEMBERSHIP_RENEWED": 2, + } +) + +func (x AudienceEventTrigger_LogCondition) Enum() *AudienceEventTrigger_LogCondition { + p := new(AudienceEventTrigger_LogCondition) + *p = x + return p +} + +func (x AudienceEventTrigger_LogCondition) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AudienceEventTrigger_LogCondition) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_audience_proto_enumTypes[4].Descriptor() +} + +func (AudienceEventTrigger_LogCondition) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_audience_proto_enumTypes[4] +} + +func (x AudienceEventTrigger_LogCondition) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AudienceEventTrigger_LogCondition.Descriptor instead. +func (AudienceEventTrigger_LogCondition) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{7, 0} +} + +// Specifies how long an exclusion lasts for users that meet the exclusion +// filter. +type Audience_AudienceExclusionDurationMode int32 + +const ( + // Not specified. + Audience_AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED Audience_AudienceExclusionDurationMode = 0 + // Exclude users from the Audience during periods when they meet the + // filter clause. + Audience_EXCLUDE_TEMPORARILY Audience_AudienceExclusionDurationMode = 1 + // Exclude users from the Audience if they've ever met the filter clause. + Audience_EXCLUDE_PERMANENTLY Audience_AudienceExclusionDurationMode = 2 +) + +// Enum value maps for Audience_AudienceExclusionDurationMode. +var ( + Audience_AudienceExclusionDurationMode_name = map[int32]string{ + 0: "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED", + 1: "EXCLUDE_TEMPORARILY", + 2: "EXCLUDE_PERMANENTLY", + } + Audience_AudienceExclusionDurationMode_value = map[string]int32{ + "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": 0, + "EXCLUDE_TEMPORARILY": 1, + "EXCLUDE_PERMANENTLY": 2, + } +) + +func (x Audience_AudienceExclusionDurationMode) Enum() *Audience_AudienceExclusionDurationMode { + p := new(Audience_AudienceExclusionDurationMode) + *p = x + return p +} + +func (x Audience_AudienceExclusionDurationMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Audience_AudienceExclusionDurationMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_audience_proto_enumTypes[5].Descriptor() +} + +func (Audience_AudienceExclusionDurationMode) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_audience_proto_enumTypes[5] +} + +func (x Audience_AudienceExclusionDurationMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Audience_AudienceExclusionDurationMode.Descriptor instead. +func (Audience_AudienceExclusionDurationMode) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{8, 0} +} + +// A specific filter for a single dimension or metric. +type AudienceDimensionOrMetricFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // One of the above filters. + // + // Types that are assignable to OneFilter: + // + // *AudienceDimensionOrMetricFilter_StringFilter_ + // *AudienceDimensionOrMetricFilter_InListFilter_ + // *AudienceDimensionOrMetricFilter_NumericFilter_ + // *AudienceDimensionOrMetricFilter_BetweenFilter_ + OneFilter isAudienceDimensionOrMetricFilter_OneFilter `protobuf_oneof:"one_filter"` + // Required. Immutable. The dimension name or metric name to filter. + FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` + // Optional. Indicates whether this filter needs dynamic evaluation or not. If set to + // true, users join the Audience if they ever met the condition (static + // evaluation). If unset or set to false, user evaluation for an Audience is + // dynamic; users are added to an Audience when they meet the conditions and + // then removed when they no longer meet them. + // + // This can only be set when Audience scope is ACROSS_ALL_SESSIONS. + AtAnyPointInTime bool `protobuf:"varint,6,opt,name=at_any_point_in_time,json=atAnyPointInTime,proto3" json:"at_any_point_in_time,omitempty"` + // Optional. If set, specifies the time window for which to evaluate data in number of + // days. If not set, then audience data is evaluated against lifetime data + // (i.e., infinite time window). + // + // For example, if set to 1 day, only the current day's data is evaluated. The + // reference point is the current day when at_any_point_in_time is unset or + // false. + // + // It can only be set when Audience scope is ACROSS_ALL_SESSIONS and cannot be + // greater than 60 days. + InAnyNDayPeriod int32 `protobuf:"varint,7,opt,name=in_any_n_day_period,json=inAnyNDayPeriod,proto3" json:"in_any_n_day_period,omitempty"` +} + +func (x *AudienceDimensionOrMetricFilter) Reset() { + *x = AudienceDimensionOrMetricFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceDimensionOrMetricFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceDimensionOrMetricFilter) ProtoMessage() {} + +func (x *AudienceDimensionOrMetricFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter.ProtoReflect.Descriptor instead. +func (*AudienceDimensionOrMetricFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0} +} + +func (m *AudienceDimensionOrMetricFilter) GetOneFilter() isAudienceDimensionOrMetricFilter_OneFilter { + if m != nil { + return m.OneFilter + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter) GetStringFilter() *AudienceDimensionOrMetricFilter_StringFilter { + if x, ok := x.GetOneFilter().(*AudienceDimensionOrMetricFilter_StringFilter_); ok { + return x.StringFilter + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter) GetInListFilter() *AudienceDimensionOrMetricFilter_InListFilter { + if x, ok := x.GetOneFilter().(*AudienceDimensionOrMetricFilter_InListFilter_); ok { + return x.InListFilter + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter) GetNumericFilter() *AudienceDimensionOrMetricFilter_NumericFilter { + if x, ok := x.GetOneFilter().(*AudienceDimensionOrMetricFilter_NumericFilter_); ok { + return x.NumericFilter + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter) GetBetweenFilter() *AudienceDimensionOrMetricFilter_BetweenFilter { + if x, ok := x.GetOneFilter().(*AudienceDimensionOrMetricFilter_BetweenFilter_); ok { + return x.BetweenFilter + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +func (x *AudienceDimensionOrMetricFilter) GetAtAnyPointInTime() bool { + if x != nil { + return x.AtAnyPointInTime + } + return false +} + +func (x *AudienceDimensionOrMetricFilter) GetInAnyNDayPeriod() int32 { + if x != nil { + return x.InAnyNDayPeriod + } + return 0 +} + +type isAudienceDimensionOrMetricFilter_OneFilter interface { + isAudienceDimensionOrMetricFilter_OneFilter() +} + +type AudienceDimensionOrMetricFilter_StringFilter_ struct { + // A filter for a string-type dimension that matches a particular pattern. + StringFilter *AudienceDimensionOrMetricFilter_StringFilter `protobuf:"bytes,2,opt,name=string_filter,json=stringFilter,proto3,oneof"` +} + +type AudienceDimensionOrMetricFilter_InListFilter_ struct { + // A filter for a string dimension that matches a particular list of + // options. + InListFilter *AudienceDimensionOrMetricFilter_InListFilter `protobuf:"bytes,3,opt,name=in_list_filter,json=inListFilter,proto3,oneof"` +} + +type AudienceDimensionOrMetricFilter_NumericFilter_ struct { + // A filter for numeric or date values on a dimension or metric. + NumericFilter *AudienceDimensionOrMetricFilter_NumericFilter `protobuf:"bytes,4,opt,name=numeric_filter,json=numericFilter,proto3,oneof"` +} + +type AudienceDimensionOrMetricFilter_BetweenFilter_ struct { + // A filter for numeric or date values between certain values on a dimension + // or metric. + BetweenFilter *AudienceDimensionOrMetricFilter_BetweenFilter `protobuf:"bytes,5,opt,name=between_filter,json=betweenFilter,proto3,oneof"` +} + +func (*AudienceDimensionOrMetricFilter_StringFilter_) isAudienceDimensionOrMetricFilter_OneFilter() {} + +func (*AudienceDimensionOrMetricFilter_InListFilter_) isAudienceDimensionOrMetricFilter_OneFilter() {} + +func (*AudienceDimensionOrMetricFilter_NumericFilter_) isAudienceDimensionOrMetricFilter_OneFilter() { +} + +func (*AudienceDimensionOrMetricFilter_BetweenFilter_) isAudienceDimensionOrMetricFilter_OneFilter() { +} + +// A filter that matches events of a single event name. If an event parameter +// is specified, only the subset of events that match both the single event name +// and the parameter filter expressions match this event filter. +type AudienceEventFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Immutable. The name of the event to match against. + EventName string `protobuf:"bytes,1,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` + // Optional. If specified, this filter matches events that match both the single + // event name and the parameter filter expressions. AudienceEventFilter + // inside the parameter filter expression cannot be set (i.e., nested + // event filters are not supported). This should be a single and_group of + // dimension_or_metric_filter or not_expression; ANDs of ORs are not + // supported. Also, if it includes a filter for "eventCount", only that one + // will be considered; all the other filters will be ignored. + EventParameterFilterExpression *AudienceFilterExpression `protobuf:"bytes,2,opt,name=event_parameter_filter_expression,json=eventParameterFilterExpression,proto3" json:"event_parameter_filter_expression,omitempty"` +} + +func (x *AudienceEventFilter) Reset() { + *x = AudienceEventFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceEventFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceEventFilter) ProtoMessage() {} + +func (x *AudienceEventFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceEventFilter.ProtoReflect.Descriptor instead. +func (*AudienceEventFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{1} +} + +func (x *AudienceEventFilter) GetEventName() string { + if x != nil { + return x.EventName + } + return "" +} + +func (x *AudienceEventFilter) GetEventParameterFilterExpression() *AudienceFilterExpression { + if x != nil { + return x.EventParameterFilterExpression + } + return nil +} + +// A logical expression of Audience dimension, metric, or event filters. +type AudienceFilterExpression struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The expression applied to a filter. + // + // Types that are assignable to Expr: + // + // *AudienceFilterExpression_AndGroup + // *AudienceFilterExpression_OrGroup + // *AudienceFilterExpression_NotExpression + // *AudienceFilterExpression_DimensionOrMetricFilter + // *AudienceFilterExpression_EventFilter + Expr isAudienceFilterExpression_Expr `protobuf_oneof:"expr"` +} + +func (x *AudienceFilterExpression) Reset() { + *x = AudienceFilterExpression{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceFilterExpression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceFilterExpression) ProtoMessage() {} + +func (x *AudienceFilterExpression) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceFilterExpression.ProtoReflect.Descriptor instead. +func (*AudienceFilterExpression) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{2} +} + +func (m *AudienceFilterExpression) GetExpr() isAudienceFilterExpression_Expr { + if m != nil { + return m.Expr + } + return nil +} + +func (x *AudienceFilterExpression) GetAndGroup() *AudienceFilterExpressionList { + if x, ok := x.GetExpr().(*AudienceFilterExpression_AndGroup); ok { + return x.AndGroup + } + return nil +} + +func (x *AudienceFilterExpression) GetOrGroup() *AudienceFilterExpressionList { + if x, ok := x.GetExpr().(*AudienceFilterExpression_OrGroup); ok { + return x.OrGroup + } + return nil +} + +func (x *AudienceFilterExpression) GetNotExpression() *AudienceFilterExpression { + if x, ok := x.GetExpr().(*AudienceFilterExpression_NotExpression); ok { + return x.NotExpression + } + return nil +} + +func (x *AudienceFilterExpression) GetDimensionOrMetricFilter() *AudienceDimensionOrMetricFilter { + if x, ok := x.GetExpr().(*AudienceFilterExpression_DimensionOrMetricFilter); ok { + return x.DimensionOrMetricFilter + } + return nil +} + +func (x *AudienceFilterExpression) GetEventFilter() *AudienceEventFilter { + if x, ok := x.GetExpr().(*AudienceFilterExpression_EventFilter); ok { + return x.EventFilter + } + return nil +} + +type isAudienceFilterExpression_Expr interface { + isAudienceFilterExpression_Expr() +} + +type AudienceFilterExpression_AndGroup struct { + // A list of expressions to be AND’ed together. It can only contain + // AudienceFilterExpressions with or_group. This must be set for the top + // level AudienceFilterExpression. + AndGroup *AudienceFilterExpressionList `protobuf:"bytes,1,opt,name=and_group,json=andGroup,proto3,oneof"` +} + +type AudienceFilterExpression_OrGroup struct { + // A list of expressions to OR’ed together. It cannot contain + // AudienceFilterExpressions with and_group or or_group. + OrGroup *AudienceFilterExpressionList `protobuf:"bytes,2,opt,name=or_group,json=orGroup,proto3,oneof"` +} + +type AudienceFilterExpression_NotExpression struct { + // A filter expression to be NOT'ed (i.e., inverted, complemented). It + // can only include a dimension_or_metric_filter. This cannot be set on the + // top level AudienceFilterExpression. + NotExpression *AudienceFilterExpression `protobuf:"bytes,3,opt,name=not_expression,json=notExpression,proto3,oneof"` +} + +type AudienceFilterExpression_DimensionOrMetricFilter struct { + // A filter on a single dimension or metric. This cannot be set on the top + // level AudienceFilterExpression. + DimensionOrMetricFilter *AudienceDimensionOrMetricFilter `protobuf:"bytes,4,opt,name=dimension_or_metric_filter,json=dimensionOrMetricFilter,proto3,oneof"` +} + +type AudienceFilterExpression_EventFilter struct { + // Creates a filter that matches a specific event. This cannot be set on the + // top level AudienceFilterExpression. + EventFilter *AudienceEventFilter `protobuf:"bytes,5,opt,name=event_filter,json=eventFilter,proto3,oneof"` +} + +func (*AudienceFilterExpression_AndGroup) isAudienceFilterExpression_Expr() {} + +func (*AudienceFilterExpression_OrGroup) isAudienceFilterExpression_Expr() {} + +func (*AudienceFilterExpression_NotExpression) isAudienceFilterExpression_Expr() {} + +func (*AudienceFilterExpression_DimensionOrMetricFilter) isAudienceFilterExpression_Expr() {} + +func (*AudienceFilterExpression_EventFilter) isAudienceFilterExpression_Expr() {} + +// A list of Audience filter expressions. +type AudienceFilterExpressionList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of Audience filter expressions. + FilterExpressions []*AudienceFilterExpression `protobuf:"bytes,1,rep,name=filter_expressions,json=filterExpressions,proto3" json:"filter_expressions,omitempty"` +} + +func (x *AudienceFilterExpressionList) Reset() { + *x = AudienceFilterExpressionList{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceFilterExpressionList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceFilterExpressionList) ProtoMessage() {} + +func (x *AudienceFilterExpressionList) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceFilterExpressionList.ProtoReflect.Descriptor instead. +func (*AudienceFilterExpressionList) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{3} +} + +func (x *AudienceFilterExpressionList) GetFilterExpressions() []*AudienceFilterExpression { + if x != nil { + return x.FilterExpressions + } + return nil +} + +// Defines a simple filter that a user must satisfy to be a member of the +// Audience. +type AudienceSimpleFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Immutable. Specifies the scope for this filter. + Scope AudienceFilterScope `protobuf:"varint,1,opt,name=scope,proto3,enum=google.analytics.admin.v1alpha.AudienceFilterScope" json:"scope,omitempty"` + // Required. Immutable. A logical expression of Audience dimension, metric, or event filters. + FilterExpression *AudienceFilterExpression `protobuf:"bytes,2,opt,name=filter_expression,json=filterExpression,proto3" json:"filter_expression,omitempty"` +} + +func (x *AudienceSimpleFilter) Reset() { + *x = AudienceSimpleFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceSimpleFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceSimpleFilter) ProtoMessage() {} + +func (x *AudienceSimpleFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceSimpleFilter.ProtoReflect.Descriptor instead. +func (*AudienceSimpleFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{4} +} + +func (x *AudienceSimpleFilter) GetScope() AudienceFilterScope { + if x != nil { + return x.Scope + } + return AudienceFilterScope_AUDIENCE_FILTER_SCOPE_UNSPECIFIED +} + +func (x *AudienceSimpleFilter) GetFilterExpression() *AudienceFilterExpression { + if x != nil { + return x.FilterExpression + } + return nil +} + +// Defines filters that must occur in a specific order for the user to be a +// member of the Audience. +type AudienceSequenceFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Immutable. Specifies the scope for this filter. + Scope AudienceFilterScope `protobuf:"varint,1,opt,name=scope,proto3,enum=google.analytics.admin.v1alpha.AudienceFilterScope" json:"scope,omitempty"` + // Optional. Defines the time period in which the whole sequence must occur. + SequenceMaximumDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=sequence_maximum_duration,json=sequenceMaximumDuration,proto3" json:"sequence_maximum_duration,omitempty"` + // Required. An ordered sequence of steps. A user must complete each step in order to + // join the sequence filter. + SequenceSteps []*AudienceSequenceFilter_AudienceSequenceStep `protobuf:"bytes,3,rep,name=sequence_steps,json=sequenceSteps,proto3" json:"sequence_steps,omitempty"` +} + +func (x *AudienceSequenceFilter) Reset() { + *x = AudienceSequenceFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceSequenceFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceSequenceFilter) ProtoMessage() {} + +func (x *AudienceSequenceFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceSequenceFilter.ProtoReflect.Descriptor instead. +func (*AudienceSequenceFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{5} +} + +func (x *AudienceSequenceFilter) GetScope() AudienceFilterScope { + if x != nil { + return x.Scope + } + return AudienceFilterScope_AUDIENCE_FILTER_SCOPE_UNSPECIFIED +} + +func (x *AudienceSequenceFilter) GetSequenceMaximumDuration() *durationpb.Duration { + if x != nil { + return x.SequenceMaximumDuration + } + return nil +} + +func (x *AudienceSequenceFilter) GetSequenceSteps() []*AudienceSequenceFilter_AudienceSequenceStep { + if x != nil { + return x.SequenceSteps + } + return nil +} + +// A clause for defining either a simple or sequence filter. A filter can be +// inclusive (i.e., users satisfying the filter clause are included in the +// Audience) or exclusive (i.e., users satisfying the filter clause are +// excluded from the Audience). +type AudienceFilterClause struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Filter: + // + // *AudienceFilterClause_SimpleFilter + // *AudienceFilterClause_SequenceFilter + Filter isAudienceFilterClause_Filter `protobuf_oneof:"filter"` + // Required. Specifies whether this is an include or exclude filter clause. + ClauseType AudienceFilterClause_AudienceClauseType `protobuf:"varint,1,opt,name=clause_type,json=clauseType,proto3,enum=google.analytics.admin.v1alpha.AudienceFilterClause_AudienceClauseType" json:"clause_type,omitempty"` +} + +func (x *AudienceFilterClause) Reset() { + *x = AudienceFilterClause{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceFilterClause) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceFilterClause) ProtoMessage() {} + +func (x *AudienceFilterClause) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceFilterClause.ProtoReflect.Descriptor instead. +func (*AudienceFilterClause) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{6} +} + +func (m *AudienceFilterClause) GetFilter() isAudienceFilterClause_Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (x *AudienceFilterClause) GetSimpleFilter() *AudienceSimpleFilter { + if x, ok := x.GetFilter().(*AudienceFilterClause_SimpleFilter); ok { + return x.SimpleFilter + } + return nil +} + +func (x *AudienceFilterClause) GetSequenceFilter() *AudienceSequenceFilter { + if x, ok := x.GetFilter().(*AudienceFilterClause_SequenceFilter); ok { + return x.SequenceFilter + } + return nil +} + +func (x *AudienceFilterClause) GetClauseType() AudienceFilterClause_AudienceClauseType { + if x != nil { + return x.ClauseType + } + return AudienceFilterClause_AUDIENCE_CLAUSE_TYPE_UNSPECIFIED +} + +type isAudienceFilterClause_Filter interface { + isAudienceFilterClause_Filter() +} + +type AudienceFilterClause_SimpleFilter struct { + // A simple filter that a user must satisfy to be a member of the Audience. + SimpleFilter *AudienceSimpleFilter `protobuf:"bytes,2,opt,name=simple_filter,json=simpleFilter,proto3,oneof"` +} + +type AudienceFilterClause_SequenceFilter struct { + // Filters that must occur in a specific order for the user to be a member + // of the Audience. + SequenceFilter *AudienceSequenceFilter `protobuf:"bytes,3,opt,name=sequence_filter,json=sequenceFilter,proto3,oneof"` +} + +func (*AudienceFilterClause_SimpleFilter) isAudienceFilterClause_Filter() {} + +func (*AudienceFilterClause_SequenceFilter) isAudienceFilterClause_Filter() {} + +// Specifies an event to log when a user joins the Audience. +type AudienceEventTrigger struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The event name that will be logged. + EventName string `protobuf:"bytes,1,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` + // Required. When to log the event. + LogCondition AudienceEventTrigger_LogCondition `protobuf:"varint,2,opt,name=log_condition,json=logCondition,proto3,enum=google.analytics.admin.v1alpha.AudienceEventTrigger_LogCondition" json:"log_condition,omitempty"` +} + +func (x *AudienceEventTrigger) Reset() { + *x = AudienceEventTrigger{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceEventTrigger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceEventTrigger) ProtoMessage() {} + +func (x *AudienceEventTrigger) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceEventTrigger.ProtoReflect.Descriptor instead. +func (*AudienceEventTrigger) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{7} +} + +func (x *AudienceEventTrigger) GetEventName() string { + if x != nil { + return x.EventName + } + return "" +} + +func (x *AudienceEventTrigger) GetLogCondition() AudienceEventTrigger_LogCondition { + if x != nil { + return x.LogCondition + } + return AudienceEventTrigger_LOG_CONDITION_UNSPECIFIED +} + +// A resource message representing a GA4 Audience. +type Audience struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name for this Audience resource. + // Format: properties/{propertyId}/audiences/{audienceId} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The display name of the Audience. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. The description of the Audience. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more + // than 540 days. + MembershipDurationDays int32 `protobuf:"varint,4,opt,name=membership_duration_days,json=membershipDurationDays,proto3" json:"membership_duration_days,omitempty"` + // Output only. It is automatically set by GA to false if this is an NPA Audience and is + // excluded from ads personalization. + AdsPersonalizationEnabled bool `protobuf:"varint,5,opt,name=ads_personalization_enabled,json=adsPersonalizationEnabled,proto3" json:"ads_personalization_enabled,omitempty"` + // Optional. Specifies an event to log when a user joins the Audience. If not set, no + // event is logged when a user joins the Audience. + EventTrigger *AudienceEventTrigger `protobuf:"bytes,6,opt,name=event_trigger,json=eventTrigger,proto3" json:"event_trigger,omitempty"` + // Immutable. Specifies how long an exclusion lasts for users that meet the exclusion + // filter. It is applied to all EXCLUDE filter clauses and is ignored when + // there is no EXCLUDE filter clause in the Audience. + ExclusionDurationMode Audience_AudienceExclusionDurationMode `protobuf:"varint,7,opt,name=exclusion_duration_mode,json=exclusionDurationMode,proto3,enum=google.analytics.admin.v1alpha.Audience_AudienceExclusionDurationMode" json:"exclusion_duration_mode,omitempty"` + // Required. Immutable. null Filter clauses that define the Audience. All clauses will be AND’ed + // together. + FilterClauses []*AudienceFilterClause `protobuf:"bytes,8,rep,name=filter_clauses,json=filterClauses,proto3" json:"filter_clauses,omitempty"` +} + +func (x *Audience) Reset() { + *x = Audience{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Audience) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Audience) ProtoMessage() {} + +func (x *Audience) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Audience.ProtoReflect.Descriptor instead. +func (*Audience) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{8} +} + +func (x *Audience) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Audience) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Audience) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Audience) GetMembershipDurationDays() int32 { + if x != nil { + return x.MembershipDurationDays + } + return 0 +} + +func (x *Audience) GetAdsPersonalizationEnabled() bool { + if x != nil { + return x.AdsPersonalizationEnabled + } + return false +} + +func (x *Audience) GetEventTrigger() *AudienceEventTrigger { + if x != nil { + return x.EventTrigger + } + return nil +} + +func (x *Audience) GetExclusionDurationMode() Audience_AudienceExclusionDurationMode { + if x != nil { + return x.ExclusionDurationMode + } + return Audience_AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED +} + +func (x *Audience) GetFilterClauses() []*AudienceFilterClause { + if x != nil { + return x.FilterClauses + } + return nil +} + +// A filter for a string-type dimension that matches a particular pattern. +type AudienceDimensionOrMetricFilter_StringFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The match type for the string filter. + MatchType AudienceDimensionOrMetricFilter_StringFilter_MatchType `protobuf:"varint,1,opt,name=match_type,json=matchType,proto3,enum=google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter_StringFilter_MatchType" json:"match_type,omitempty"` + // Required. The string value to be matched against. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // Optional. If true, the match is case-sensitive. If false, the match is + // case-insensitive. + CaseSensitive bool `protobuf:"varint,3,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` +} + +func (x *AudienceDimensionOrMetricFilter_StringFilter) Reset() { + *x = AudienceDimensionOrMetricFilter_StringFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceDimensionOrMetricFilter_StringFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceDimensionOrMetricFilter_StringFilter) ProtoMessage() {} + +func (x *AudienceDimensionOrMetricFilter_StringFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_StringFilter.ProtoReflect.Descriptor instead. +func (*AudienceDimensionOrMetricFilter_StringFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AudienceDimensionOrMetricFilter_StringFilter) GetMatchType() AudienceDimensionOrMetricFilter_StringFilter_MatchType { + if x != nil { + return x.MatchType + } + return AudienceDimensionOrMetricFilter_StringFilter_MATCH_TYPE_UNSPECIFIED +} + +func (x *AudienceDimensionOrMetricFilter_StringFilter) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *AudienceDimensionOrMetricFilter_StringFilter) GetCaseSensitive() bool { + if x != nil { + return x.CaseSensitive + } + return false +} + +// A filter for a string dimension that matches a particular list of options. +type AudienceDimensionOrMetricFilter_InListFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The list of possible string values to match against. Must be non-empty. + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + // Optional. If true, the match is case-sensitive. If false, the match is + // case-insensitive. + CaseSensitive bool `protobuf:"varint,2,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` +} + +func (x *AudienceDimensionOrMetricFilter_InListFilter) Reset() { + *x = AudienceDimensionOrMetricFilter_InListFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceDimensionOrMetricFilter_InListFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceDimensionOrMetricFilter_InListFilter) ProtoMessage() {} + +func (x *AudienceDimensionOrMetricFilter_InListFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_InListFilter.ProtoReflect.Descriptor instead. +func (*AudienceDimensionOrMetricFilter_InListFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *AudienceDimensionOrMetricFilter_InListFilter) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter_InListFilter) GetCaseSensitive() bool { + if x != nil { + return x.CaseSensitive + } + return false +} + +// To represent a number. +type AudienceDimensionOrMetricFilter_NumericValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // One of a numeric value. + // + // Types that are assignable to OneValue: + // + // *AudienceDimensionOrMetricFilter_NumericValue_Int64Value + // *AudienceDimensionOrMetricFilter_NumericValue_DoubleValue + OneValue isAudienceDimensionOrMetricFilter_NumericValue_OneValue `protobuf_oneof:"one_value"` +} + +func (x *AudienceDimensionOrMetricFilter_NumericValue) Reset() { + *x = AudienceDimensionOrMetricFilter_NumericValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceDimensionOrMetricFilter_NumericValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceDimensionOrMetricFilter_NumericValue) ProtoMessage() {} + +func (x *AudienceDimensionOrMetricFilter_NumericValue) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_NumericValue.ProtoReflect.Descriptor instead. +func (*AudienceDimensionOrMetricFilter_NumericValue) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 2} +} + +func (m *AudienceDimensionOrMetricFilter_NumericValue) GetOneValue() isAudienceDimensionOrMetricFilter_NumericValue_OneValue { + if m != nil { + return m.OneValue + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter_NumericValue) GetInt64Value() int64 { + if x, ok := x.GetOneValue().(*AudienceDimensionOrMetricFilter_NumericValue_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (x *AudienceDimensionOrMetricFilter_NumericValue) GetDoubleValue() float64 { + if x, ok := x.GetOneValue().(*AudienceDimensionOrMetricFilter_NumericValue_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +type isAudienceDimensionOrMetricFilter_NumericValue_OneValue interface { + isAudienceDimensionOrMetricFilter_NumericValue_OneValue() +} + +type AudienceDimensionOrMetricFilter_NumericValue_Int64Value struct { + // Integer value. + Int64Value int64 `protobuf:"varint,1,opt,name=int64_value,json=int64Value,proto3,oneof"` +} + +type AudienceDimensionOrMetricFilter_NumericValue_DoubleValue struct { + // Double value. + DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +func (*AudienceDimensionOrMetricFilter_NumericValue_Int64Value) isAudienceDimensionOrMetricFilter_NumericValue_OneValue() { +} + +func (*AudienceDimensionOrMetricFilter_NumericValue_DoubleValue) isAudienceDimensionOrMetricFilter_NumericValue_OneValue() { +} + +// A filter for numeric or date values on a dimension or metric. +type AudienceDimensionOrMetricFilter_NumericFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The operation applied to a numeric filter. + Operation AudienceDimensionOrMetricFilter_NumericFilter_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter_NumericFilter_Operation" json:"operation,omitempty"` + // Required. The numeric or date value to match against. + Value *AudienceDimensionOrMetricFilter_NumericValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *AudienceDimensionOrMetricFilter_NumericFilter) Reset() { + *x = AudienceDimensionOrMetricFilter_NumericFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceDimensionOrMetricFilter_NumericFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceDimensionOrMetricFilter_NumericFilter) ProtoMessage() {} + +func (x *AudienceDimensionOrMetricFilter_NumericFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_NumericFilter.ProtoReflect.Descriptor instead. +func (*AudienceDimensionOrMetricFilter_NumericFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *AudienceDimensionOrMetricFilter_NumericFilter) GetOperation() AudienceDimensionOrMetricFilter_NumericFilter_Operation { + if x != nil { + return x.Operation + } + return AudienceDimensionOrMetricFilter_NumericFilter_OPERATION_UNSPECIFIED +} + +func (x *AudienceDimensionOrMetricFilter_NumericFilter) GetValue() *AudienceDimensionOrMetricFilter_NumericValue { + if x != nil { + return x.Value + } + return nil +} + +// A filter for numeric or date values between certain values on a dimension +// or metric. +type AudienceDimensionOrMetricFilter_BetweenFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Begins with this number, inclusive. + FromValue *AudienceDimensionOrMetricFilter_NumericValue `protobuf:"bytes,1,opt,name=from_value,json=fromValue,proto3" json:"from_value,omitempty"` + // Required. Ends with this number, inclusive. + ToValue *AudienceDimensionOrMetricFilter_NumericValue `protobuf:"bytes,2,opt,name=to_value,json=toValue,proto3" json:"to_value,omitempty"` +} + +func (x *AudienceDimensionOrMetricFilter_BetweenFilter) Reset() { + *x = AudienceDimensionOrMetricFilter_BetweenFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceDimensionOrMetricFilter_BetweenFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceDimensionOrMetricFilter_BetweenFilter) ProtoMessage() {} + +func (x *AudienceDimensionOrMetricFilter_BetweenFilter) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceDimensionOrMetricFilter_BetweenFilter.ProtoReflect.Descriptor instead. +func (*AudienceDimensionOrMetricFilter_BetweenFilter) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *AudienceDimensionOrMetricFilter_BetweenFilter) GetFromValue() *AudienceDimensionOrMetricFilter_NumericValue { + if x != nil { + return x.FromValue + } + return nil +} + +func (x *AudienceDimensionOrMetricFilter_BetweenFilter) GetToValue() *AudienceDimensionOrMetricFilter_NumericValue { + if x != nil { + return x.ToValue + } + return nil +} + +// A condition that must occur in the specified step order for this user +// to match the sequence. +type AudienceSequenceFilter_AudienceSequenceStep struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Immutable. Specifies the scope for this step. + Scope AudienceFilterScope `protobuf:"varint,1,opt,name=scope,proto3,enum=google.analytics.admin.v1alpha.AudienceFilterScope" json:"scope,omitempty"` + // Optional. If true, the event satisfying this step must be the very next event + // after the event satisfying the last step. If unset or false, this + // step indirectly follows the prior step; for example, there may be + // events between the prior step and this step. It is ignored for the + // first step. + ImmediatelyFollows bool `protobuf:"varint,2,opt,name=immediately_follows,json=immediatelyFollows,proto3" json:"immediately_follows,omitempty"` + // Optional. When set, this step must be satisfied within the constraint_duration of + // the previous step (i.e., t[i] - t[i-1] <= constraint_duration). If not + // set, there is no duration requirement (the duration is effectively + // unlimited). It is ignored for the first step. + ConstraintDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=constraint_duration,json=constraintDuration,proto3" json:"constraint_duration,omitempty"` + // Required. Immutable. A logical expression of Audience dimension, metric, or event filters in + // each step. + FilterExpression *AudienceFilterExpression `protobuf:"bytes,4,opt,name=filter_expression,json=filterExpression,proto3" json:"filter_expression,omitempty"` +} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) Reset() { + *x = AudienceSequenceFilter_AudienceSequenceStep{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AudienceSequenceFilter_AudienceSequenceStep) ProtoMessage() {} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AudienceSequenceFilter_AudienceSequenceStep.ProtoReflect.Descriptor instead. +func (*AudienceSequenceFilter_AudienceSequenceStep) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) GetScope() AudienceFilterScope { + if x != nil { + return x.Scope + } + return AudienceFilterScope_AUDIENCE_FILTER_SCOPE_UNSPECIFIED +} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) GetImmediatelyFollows() bool { + if x != nil { + return x.ImmediatelyFollows + } + return false +} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) GetConstraintDuration() *durationpb.Duration { + if x != nil { + return x.ConstraintDuration + } + return nil +} + +func (x *AudienceSequenceFilter_AudienceSequenceStep) GetFilterExpression() *AudienceFilterExpression { + if x != nil { + return x.FilterExpression + } + return nil +} + +var File_google_analytics_admin_v1alpha_audience_proto protoreflect.FileDescriptor + +var file_google_analytics_admin_v1alpha_audience_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x0e, 0x0a, 0x1f, + 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x73, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x74, 0x0a, 0x0e, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, + 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x49, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x76, 0x0a, 0x0e, 0x6e, 0x75, + 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x76, 0x0a, 0x0e, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x42, 0x65, 0x74, 0x77, + 0x65, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x65, 0x74, + 0x77, 0x65, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x33, 0x0a, 0x14, 0x61, 0x74, 0x5f, 0x61, 0x6e, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x61, 0x74, 0x41, 0x6e, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x49, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x13, 0x69, 0x6e, 0x5f, 0x61, 0x6e, 0x79, + 0x5f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x41, 0x6e, 0x79, 0x4e, + 0x44, 0x61, 0x79, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x1a, 0xd9, 0x02, 0x0a, 0x0c, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x7a, 0x0a, 0x0a, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x56, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, + 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x85, 0x01, + 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, + 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x58, 0x41, 0x43, 0x54, + 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x53, 0x5f, 0x57, 0x49, 0x54, + 0x48, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x44, 0x53, 0x5f, 0x57, 0x49, 0x54, 0x48, + 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x53, 0x10, 0x04, + 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x50, 0x10, + 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x47, + 0x45, 0x58, 0x50, 0x10, 0x06, 0x1a, 0x57, 0x0a, 0x0c, 0x49, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x63, + 0x0a, 0x0c, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6f, 0x6e, 0x65, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x1a, 0xfc, 0x02, 0x0a, 0x0d, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x7a, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x57, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, + 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x67, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x09, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, + 0x12, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, + 0x55, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, + 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, + 0x10, 0x05, 0x1a, 0xef, 0x01, 0x0a, 0x0d, 0x42, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, + 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x66, 0x72, 0x6f, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x6c, 0x0a, 0x08, 0x74, 0x6f, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, + 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x74, 0x6f, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x22, 0xc7, 0x01, 0x0a, 0x13, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x88, 0x01, 0x0a, 0x21, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1e, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x04, 0x0a, + 0x18, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, + 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x09, 0x61, 0x6e, 0x64, + 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x59, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x61, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x6f, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x1a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x17, 0x64, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x06, + 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x87, 0x01, 0x0a, 0x1c, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x67, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xd8, 0x01, 0x0a, 0x14, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x69, 0x6d, + 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, + 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x06, 0xe0, + 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x6d, 0x0a, 0x11, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x05, 0x0a, 0x16, + 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, + 0x41, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x19, 0x73, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x17, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x77, 0x0a, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0d, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x73, 0x1a, 0xdf, + 0x02, 0x0a, 0x14, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x12, 0x51, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x06, 0xe0, 0x41, 0x02, + 0xe0, 0x41, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x13, 0x69, 0x6d, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x5f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x69, 0x6d, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, + 0x12, 0x4f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x5f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x6d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x10, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xa5, 0x03, 0x0a, 0x14, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x73, 0x69, 0x6d, + 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x0b, 0x63, 0x6c, 0x61, + 0x75, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6c, + 0x61, 0x75, 0x73, 0x65, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6c, 0x61, + 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x63, 0x6c, + 0x61, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x54, 0x0a, 0x12, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, + 0x0a, 0x20, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x55, 0x53, + 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x02, 0x42, 0x08, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8c, 0x02, 0x0a, 0x14, 0x41, 0x75, 0x64, + 0x69, 0x65, 0x6e, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6b, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x47, 0x5f, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x4a, 0x4f, + 0x49, 0x4e, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, + 0x43, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x52, 0x45, + 0x4e, 0x45, 0x57, 0x45, 0x44, 0x10, 0x02, 0x22, 0xa6, 0x06, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x18, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, + 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x16, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x79, 0x73, 0x12, 0x43, + 0x0a, 0x1b, 0x61, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x61, 0x64, 0x73, 0x50, 0x65, 0x72, + 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x5e, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x83, 0x01, 0x0a, 0x17, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x2e, + 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x05, 0x52, 0x15, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x66, 0x0a, 0x0e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, 0x42, 0x09, 0xe0, 0x41, 0x05, 0xe0, 0x41, 0x02, 0xe0, + 0x41, 0x06, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x75, 0x73, 0x65, + 0x73, 0x22, 0x83, 0x01, 0x0a, 0x1d, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x45, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x2c, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, + 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, + 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x49, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, + 0x0a, 0x13, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, + 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, 0x02, 0x3a, 0x57, 0xea, 0x41, 0x54, 0x0a, 0x26, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x61, 0x75, 0x64, 0x69, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x7d, + 0x2a, 0xc7, 0x01, 0x0a, 0x13, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x41, 0x55, 0x44, 0x49, + 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x43, 0x4f, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x2b, 0x0a, 0x27, 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x49, 0x4e, 0x5f, + 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, + 0x41, 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, + 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x49, 0x4e, 0x5f, 0x53, 0x41, 0x4d, + 0x45, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x41, + 0x55, 0x44, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, + 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x03, 0x42, 0x7a, 0x0a, 0x22, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x42, 0x0d, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_analytics_admin_v1alpha_audience_proto_rawDescOnce sync.Once + file_google_analytics_admin_v1alpha_audience_proto_rawDescData = file_google_analytics_admin_v1alpha_audience_proto_rawDesc +) + +func file_google_analytics_admin_v1alpha_audience_proto_rawDescGZIP() []byte { + file_google_analytics_admin_v1alpha_audience_proto_rawDescOnce.Do(func() { + file_google_analytics_admin_v1alpha_audience_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_analytics_admin_v1alpha_audience_proto_rawDescData) + }) + return file_google_analytics_admin_v1alpha_audience_proto_rawDescData +} + +var file_google_analytics_admin_v1alpha_audience_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_google_analytics_admin_v1alpha_audience_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_google_analytics_admin_v1alpha_audience_proto_goTypes = []interface{}{ + (AudienceFilterScope)(0), // 0: google.analytics.admin.v1alpha.AudienceFilterScope + (AudienceDimensionOrMetricFilter_StringFilter_MatchType)(0), // 1: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType + (AudienceDimensionOrMetricFilter_NumericFilter_Operation)(0), // 2: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation + (AudienceFilterClause_AudienceClauseType)(0), // 3: google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType + (AudienceEventTrigger_LogCondition)(0), // 4: google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition + (Audience_AudienceExclusionDurationMode)(0), // 5: google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode + (*AudienceDimensionOrMetricFilter)(nil), // 6: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + (*AudienceEventFilter)(nil), // 7: google.analytics.admin.v1alpha.AudienceEventFilter + (*AudienceFilterExpression)(nil), // 8: google.analytics.admin.v1alpha.AudienceFilterExpression + (*AudienceFilterExpressionList)(nil), // 9: google.analytics.admin.v1alpha.AudienceFilterExpressionList + (*AudienceSimpleFilter)(nil), // 10: google.analytics.admin.v1alpha.AudienceSimpleFilter + (*AudienceSequenceFilter)(nil), // 11: google.analytics.admin.v1alpha.AudienceSequenceFilter + (*AudienceFilterClause)(nil), // 12: google.analytics.admin.v1alpha.AudienceFilterClause + (*AudienceEventTrigger)(nil), // 13: google.analytics.admin.v1alpha.AudienceEventTrigger + (*Audience)(nil), // 14: google.analytics.admin.v1alpha.Audience + (*AudienceDimensionOrMetricFilter_StringFilter)(nil), // 15: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + (*AudienceDimensionOrMetricFilter_InListFilter)(nil), // 16: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + (*AudienceDimensionOrMetricFilter_NumericValue)(nil), // 17: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + (*AudienceDimensionOrMetricFilter_NumericFilter)(nil), // 18: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + (*AudienceDimensionOrMetricFilter_BetweenFilter)(nil), // 19: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + (*AudienceSequenceFilter_AudienceSequenceStep)(nil), // 20: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration +} +var file_google_analytics_admin_v1alpha_audience_proto_depIdxs = []int32{ + 15, // 0: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.string_filter:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + 16, // 1: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.in_list_filter:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + 18, // 2: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.numeric_filter:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + 19, // 3: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.between_filter:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + 8, // 4: google.analytics.admin.v1alpha.AudienceEventFilter.event_parameter_filter_expression:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpression + 9, // 5: google.analytics.admin.v1alpha.AudienceFilterExpression.and_group:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpressionList + 9, // 6: google.analytics.admin.v1alpha.AudienceFilterExpression.or_group:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpressionList + 8, // 7: google.analytics.admin.v1alpha.AudienceFilterExpression.not_expression:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpression + 6, // 8: google.analytics.admin.v1alpha.AudienceFilterExpression.dimension_or_metric_filter:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + 7, // 9: google.analytics.admin.v1alpha.AudienceFilterExpression.event_filter:type_name -> google.analytics.admin.v1alpha.AudienceEventFilter + 8, // 10: google.analytics.admin.v1alpha.AudienceFilterExpressionList.filter_expressions:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpression + 0, // 11: google.analytics.admin.v1alpha.AudienceSimpleFilter.scope:type_name -> google.analytics.admin.v1alpha.AudienceFilterScope + 8, // 12: google.analytics.admin.v1alpha.AudienceSimpleFilter.filter_expression:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpression + 0, // 13: google.analytics.admin.v1alpha.AudienceSequenceFilter.scope:type_name -> google.analytics.admin.v1alpha.AudienceFilterScope + 21, // 14: google.analytics.admin.v1alpha.AudienceSequenceFilter.sequence_maximum_duration:type_name -> google.protobuf.Duration + 20, // 15: google.analytics.admin.v1alpha.AudienceSequenceFilter.sequence_steps:type_name -> google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + 10, // 16: google.analytics.admin.v1alpha.AudienceFilterClause.simple_filter:type_name -> google.analytics.admin.v1alpha.AudienceSimpleFilter + 11, // 17: google.analytics.admin.v1alpha.AudienceFilterClause.sequence_filter:type_name -> google.analytics.admin.v1alpha.AudienceSequenceFilter + 3, // 18: google.analytics.admin.v1alpha.AudienceFilterClause.clause_type:type_name -> google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType + 4, // 19: google.analytics.admin.v1alpha.AudienceEventTrigger.log_condition:type_name -> google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition + 13, // 20: google.analytics.admin.v1alpha.Audience.event_trigger:type_name -> google.analytics.admin.v1alpha.AudienceEventTrigger + 5, // 21: google.analytics.admin.v1alpha.Audience.exclusion_duration_mode:type_name -> google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode + 12, // 22: google.analytics.admin.v1alpha.Audience.filter_clauses:type_name -> google.analytics.admin.v1alpha.AudienceFilterClause + 1, // 23: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.match_type:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType + 2, // 24: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.operation:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation + 17, // 25: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.value:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + 17, // 26: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.from_value:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + 17, // 27: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.to_value:type_name -> google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + 0, // 28: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.scope:type_name -> google.analytics.admin.v1alpha.AudienceFilterScope + 21, // 29: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.constraint_duration:type_name -> google.protobuf.Duration + 8, // 30: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.filter_expression:type_name -> google.analytics.admin.v1alpha.AudienceFilterExpression + 31, // [31:31] is the sub-list for method output_type + 31, // [31:31] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name +} + +func init() { file_google_analytics_admin_v1alpha_audience_proto_init() } +func file_google_analytics_admin_v1alpha_audience_proto_init() { + if File_google_analytics_admin_v1alpha_audience_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceDimensionOrMetricFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceEventFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceFilterExpression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceFilterExpressionList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceSimpleFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceSequenceFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceFilterClause); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceEventTrigger); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Audience); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceDimensionOrMetricFilter_StringFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceDimensionOrMetricFilter_InListFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceDimensionOrMetricFilter_NumericValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceDimensionOrMetricFilter_NumericFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceDimensionOrMetricFilter_BetweenFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AudienceSequenceFilter_AudienceSequenceStep); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AudienceDimensionOrMetricFilter_StringFilter_)(nil), + (*AudienceDimensionOrMetricFilter_InListFilter_)(nil), + (*AudienceDimensionOrMetricFilter_NumericFilter_)(nil), + (*AudienceDimensionOrMetricFilter_BetweenFilter_)(nil), + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*AudienceFilterExpression_AndGroup)(nil), + (*AudienceFilterExpression_OrGroup)(nil), + (*AudienceFilterExpression_NotExpression)(nil), + (*AudienceFilterExpression_DimensionOrMetricFilter)(nil), + (*AudienceFilterExpression_EventFilter)(nil), + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*AudienceFilterClause_SimpleFilter)(nil), + (*AudienceFilterClause_SequenceFilter)(nil), + } + file_google_analytics_admin_v1alpha_audience_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*AudienceDimensionOrMetricFilter_NumericValue_Int64Value)(nil), + (*AudienceDimensionOrMetricFilter_NumericValue_DoubleValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_analytics_admin_v1alpha_audience_proto_rawDesc, + NumEnums: 6, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_analytics_admin_v1alpha_audience_proto_goTypes, + DependencyIndexes: file_google_analytics_admin_v1alpha_audience_proto_depIdxs, + EnumInfos: file_google_analytics_admin_v1alpha_audience_proto_enumTypes, + MessageInfos: file_google_analytics_admin_v1alpha_audience_proto_msgTypes, + }.Build() + File_google_analytics_admin_v1alpha_audience_proto = out.File + file_google_analytics_admin_v1alpha_audience_proto_rawDesc = nil + file_google_analytics_admin_v1alpha_audience_proto_goTypes = nil + file_google_analytics_admin_v1alpha_audience_proto_depIdxs = nil +} diff --git a/analytics/admin/apiv1alpha/adminpb/resources.pb.go b/analytics/admin/apiv1alpha/adminpb/resources.pb.go new file mode 100644 index 000000000000..ba7e71330edd --- /dev/null +++ b/analytics/admin/apiv1alpha/adminpb/resources.pb.go @@ -0,0 +1,5484 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/analytics/admin/v1alpha/resources.proto + +package adminpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The category selected for this property, used for industry benchmarking. +type IndustryCategory int32 + +const ( + // Industry category unspecified + IndustryCategory_INDUSTRY_CATEGORY_UNSPECIFIED IndustryCategory = 0 + // Automotive + IndustryCategory_AUTOMOTIVE IndustryCategory = 1 + // Business and industrial markets + IndustryCategory_BUSINESS_AND_INDUSTRIAL_MARKETS IndustryCategory = 2 + // Finance + IndustryCategory_FINANCE IndustryCategory = 3 + // Healthcare + IndustryCategory_HEALTHCARE IndustryCategory = 4 + // Technology + IndustryCategory_TECHNOLOGY IndustryCategory = 5 + // Travel + IndustryCategory_TRAVEL IndustryCategory = 6 + // Other + IndustryCategory_OTHER IndustryCategory = 7 + // Arts and entertainment + IndustryCategory_ARTS_AND_ENTERTAINMENT IndustryCategory = 8 + // Beauty and fitness + IndustryCategory_BEAUTY_AND_FITNESS IndustryCategory = 9 + // Books and literature + IndustryCategory_BOOKS_AND_LITERATURE IndustryCategory = 10 + // Food and drink + IndustryCategory_FOOD_AND_DRINK IndustryCategory = 11 + // Games + IndustryCategory_GAMES IndustryCategory = 12 + // Hobbies and leisure + IndustryCategory_HOBBIES_AND_LEISURE IndustryCategory = 13 + // Home and garden + IndustryCategory_HOME_AND_GARDEN IndustryCategory = 14 + // Internet and telecom + IndustryCategory_INTERNET_AND_TELECOM IndustryCategory = 15 + // Law and government + IndustryCategory_LAW_AND_GOVERNMENT IndustryCategory = 16 + // News + IndustryCategory_NEWS IndustryCategory = 17 + // Online communities + IndustryCategory_ONLINE_COMMUNITIES IndustryCategory = 18 + // People and society + IndustryCategory_PEOPLE_AND_SOCIETY IndustryCategory = 19 + // Pets and animals + IndustryCategory_PETS_AND_ANIMALS IndustryCategory = 20 + // Real estate + IndustryCategory_REAL_ESTATE IndustryCategory = 21 + // Reference + IndustryCategory_REFERENCE IndustryCategory = 22 + // Science + IndustryCategory_SCIENCE IndustryCategory = 23 + // Sports + IndustryCategory_SPORTS IndustryCategory = 24 + // Jobs and education + IndustryCategory_JOBS_AND_EDUCATION IndustryCategory = 25 + // Shopping + IndustryCategory_SHOPPING IndustryCategory = 26 +) + +// Enum value maps for IndustryCategory. +var ( + IndustryCategory_name = map[int32]string{ + 0: "INDUSTRY_CATEGORY_UNSPECIFIED", + 1: "AUTOMOTIVE", + 2: "BUSINESS_AND_INDUSTRIAL_MARKETS", + 3: "FINANCE", + 4: "HEALTHCARE", + 5: "TECHNOLOGY", + 6: "TRAVEL", + 7: "OTHER", + 8: "ARTS_AND_ENTERTAINMENT", + 9: "BEAUTY_AND_FITNESS", + 10: "BOOKS_AND_LITERATURE", + 11: "FOOD_AND_DRINK", + 12: "GAMES", + 13: "HOBBIES_AND_LEISURE", + 14: "HOME_AND_GARDEN", + 15: "INTERNET_AND_TELECOM", + 16: "LAW_AND_GOVERNMENT", + 17: "NEWS", + 18: "ONLINE_COMMUNITIES", + 19: "PEOPLE_AND_SOCIETY", + 20: "PETS_AND_ANIMALS", + 21: "REAL_ESTATE", + 22: "REFERENCE", + 23: "SCIENCE", + 24: "SPORTS", + 25: "JOBS_AND_EDUCATION", + 26: "SHOPPING", + } + IndustryCategory_value = map[string]int32{ + "INDUSTRY_CATEGORY_UNSPECIFIED": 0, + "AUTOMOTIVE": 1, + "BUSINESS_AND_INDUSTRIAL_MARKETS": 2, + "FINANCE": 3, + "HEALTHCARE": 4, + "TECHNOLOGY": 5, + "TRAVEL": 6, + "OTHER": 7, + "ARTS_AND_ENTERTAINMENT": 8, + "BEAUTY_AND_FITNESS": 9, + "BOOKS_AND_LITERATURE": 10, + "FOOD_AND_DRINK": 11, + "GAMES": 12, + "HOBBIES_AND_LEISURE": 13, + "HOME_AND_GARDEN": 14, + "INTERNET_AND_TELECOM": 15, + "LAW_AND_GOVERNMENT": 16, + "NEWS": 17, + "ONLINE_COMMUNITIES": 18, + "PEOPLE_AND_SOCIETY": 19, + "PETS_AND_ANIMALS": 20, + "REAL_ESTATE": 21, + "REFERENCE": 22, + "SCIENCE": 23, + "SPORTS": 24, + "JOBS_AND_EDUCATION": 25, + "SHOPPING": 26, + } +) + +func (x IndustryCategory) Enum() *IndustryCategory { + p := new(IndustryCategory) + *p = x + return p +} + +func (x IndustryCategory) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IndustryCategory) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[0].Descriptor() +} + +func (IndustryCategory) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[0] +} + +func (x IndustryCategory) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IndustryCategory.Descriptor instead. +func (IndustryCategory) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{0} +} + +// Various levels of service for Google Analytics. +type ServiceLevel int32 + +const ( + // Service level not specified or invalid. + ServiceLevel_SERVICE_LEVEL_UNSPECIFIED ServiceLevel = 0 + // The standard version of Google Analytics. + ServiceLevel_GOOGLE_ANALYTICS_STANDARD ServiceLevel = 1 + // The paid, premium version of Google Analytics. + ServiceLevel_GOOGLE_ANALYTICS_360 ServiceLevel = 2 +) + +// Enum value maps for ServiceLevel. +var ( + ServiceLevel_name = map[int32]string{ + 0: "SERVICE_LEVEL_UNSPECIFIED", + 1: "GOOGLE_ANALYTICS_STANDARD", + 2: "GOOGLE_ANALYTICS_360", + } + ServiceLevel_value = map[string]int32{ + "SERVICE_LEVEL_UNSPECIFIED": 0, + "GOOGLE_ANALYTICS_STANDARD": 1, + "GOOGLE_ANALYTICS_360": 2, + } +) + +func (x ServiceLevel) Enum() *ServiceLevel { + p := new(ServiceLevel) + *p = x + return p +} + +func (x ServiceLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ServiceLevel) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[1].Descriptor() +} + +func (ServiceLevel) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[1] +} + +func (x ServiceLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ServiceLevel.Descriptor instead. +func (ServiceLevel) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{1} +} + +// Different kinds of actors that can make changes to Google Analytics +// resources. +type ActorType int32 + +const ( + // Unknown or unspecified actor type. + ActorType_ACTOR_TYPE_UNSPECIFIED ActorType = 0 + // Changes made by the user specified in actor_email. + ActorType_USER ActorType = 1 + // Changes made by the Google Analytics system. + ActorType_SYSTEM ActorType = 2 + // Changes made by Google Analytics support team staff. + ActorType_SUPPORT ActorType = 3 +) + +// Enum value maps for ActorType. +var ( + ActorType_name = map[int32]string{ + 0: "ACTOR_TYPE_UNSPECIFIED", + 1: "USER", + 2: "SYSTEM", + 3: "SUPPORT", + } + ActorType_value = map[string]int32{ + "ACTOR_TYPE_UNSPECIFIED": 0, + "USER": 1, + "SYSTEM": 2, + "SUPPORT": 3, + } +) + +func (x ActorType) Enum() *ActorType { + p := new(ActorType) + *p = x + return p +} + +func (x ActorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActorType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[2].Descriptor() +} + +func (ActorType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[2] +} + +func (x ActorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActorType.Descriptor instead. +func (ActorType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{2} +} + +// Types of actions that may change a resource. +type ActionType int32 + +const ( + // Action type unknown or not specified. + ActionType_ACTION_TYPE_UNSPECIFIED ActionType = 0 + // Resource was created in this change. + ActionType_CREATED ActionType = 1 + // Resource was updated in this change. + ActionType_UPDATED ActionType = 2 + // Resource was deleted in this change. + ActionType_DELETED ActionType = 3 +) + +// Enum value maps for ActionType. +var ( + ActionType_name = map[int32]string{ + 0: "ACTION_TYPE_UNSPECIFIED", + 1: "CREATED", + 2: "UPDATED", + 3: "DELETED", + } + ActionType_value = map[string]int32{ + "ACTION_TYPE_UNSPECIFIED": 0, + "CREATED": 1, + "UPDATED": 2, + "DELETED": 3, + } +) + +func (x ActionType) Enum() *ActionType { + p := new(ActionType) + *p = x + return p +} + +func (x ActionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ActionType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[3].Descriptor() +} + +func (ActionType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[3] +} + +func (x ActionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ActionType.Descriptor instead. +func (ActionType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{3} +} + +// Types of resources whose changes may be returned from change history. +type ChangeHistoryResourceType int32 + +const ( + // Resource type unknown or not specified. + ChangeHistoryResourceType_CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED ChangeHistoryResourceType = 0 + // Account resource + ChangeHistoryResourceType_ACCOUNT ChangeHistoryResourceType = 1 + // Property resource + ChangeHistoryResourceType_PROPERTY ChangeHistoryResourceType = 2 + // FirebaseLink resource + ChangeHistoryResourceType_FIREBASE_LINK ChangeHistoryResourceType = 6 + // GoogleAdsLink resource + ChangeHistoryResourceType_GOOGLE_ADS_LINK ChangeHistoryResourceType = 7 + // GoogleSignalsSettings resource + ChangeHistoryResourceType_GOOGLE_SIGNALS_SETTINGS ChangeHistoryResourceType = 8 + // ConversionEvent resource + ChangeHistoryResourceType_CONVERSION_EVENT ChangeHistoryResourceType = 9 + // MeasurementProtocolSecret resource + ChangeHistoryResourceType_MEASUREMENT_PROTOCOL_SECRET ChangeHistoryResourceType = 10 + // CustomDimension resource + ChangeHistoryResourceType_CUSTOM_DIMENSION ChangeHistoryResourceType = 11 + // CustomMetric resource + ChangeHistoryResourceType_CUSTOM_METRIC ChangeHistoryResourceType = 12 + // DataRetentionSettings resource + ChangeHistoryResourceType_DATA_RETENTION_SETTINGS ChangeHistoryResourceType = 13 + // DisplayVideo360AdvertiserLink resource + ChangeHistoryResourceType_DISPLAY_VIDEO_360_ADVERTISER_LINK ChangeHistoryResourceType = 14 + // DisplayVideo360AdvertiserLinkProposal resource + ChangeHistoryResourceType_DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL ChangeHistoryResourceType = 15 + // SearchAds360Link resource + ChangeHistoryResourceType_SEARCH_ADS_360_LINK ChangeHistoryResourceType = 16 + // DataStream resource + ChangeHistoryResourceType_DATA_STREAM ChangeHistoryResourceType = 18 + // AttributionSettings resource + ChangeHistoryResourceType_ATTRIBUTION_SETTINGS ChangeHistoryResourceType = 20 +) + +// Enum value maps for ChangeHistoryResourceType. +var ( + ChangeHistoryResourceType_name = map[int32]string{ + 0: "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED", + 1: "ACCOUNT", + 2: "PROPERTY", + 6: "FIREBASE_LINK", + 7: "GOOGLE_ADS_LINK", + 8: "GOOGLE_SIGNALS_SETTINGS", + 9: "CONVERSION_EVENT", + 10: "MEASUREMENT_PROTOCOL_SECRET", + 11: "CUSTOM_DIMENSION", + 12: "CUSTOM_METRIC", + 13: "DATA_RETENTION_SETTINGS", + 14: "DISPLAY_VIDEO_360_ADVERTISER_LINK", + 15: "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL", + 16: "SEARCH_ADS_360_LINK", + 18: "DATA_STREAM", + 20: "ATTRIBUTION_SETTINGS", + } + ChangeHistoryResourceType_value = map[string]int32{ + "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": 0, + "ACCOUNT": 1, + "PROPERTY": 2, + "FIREBASE_LINK": 6, + "GOOGLE_ADS_LINK": 7, + "GOOGLE_SIGNALS_SETTINGS": 8, + "CONVERSION_EVENT": 9, + "MEASUREMENT_PROTOCOL_SECRET": 10, + "CUSTOM_DIMENSION": 11, + "CUSTOM_METRIC": 12, + "DATA_RETENTION_SETTINGS": 13, + "DISPLAY_VIDEO_360_ADVERTISER_LINK": 14, + "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL": 15, + "SEARCH_ADS_360_LINK": 16, + "DATA_STREAM": 18, + "ATTRIBUTION_SETTINGS": 20, + } +) + +func (x ChangeHistoryResourceType) Enum() *ChangeHistoryResourceType { + p := new(ChangeHistoryResourceType) + *p = x + return p +} + +func (x ChangeHistoryResourceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChangeHistoryResourceType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[4].Descriptor() +} + +func (ChangeHistoryResourceType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[4] +} + +func (x ChangeHistoryResourceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChangeHistoryResourceType.Descriptor instead. +func (ChangeHistoryResourceType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{4} +} + +// Status of the Google Signals settings (i.e., whether this feature has been +// enabled for the property). +type GoogleSignalsState int32 + +const ( + // Google Signals status defaults to GOOGLE_SIGNALS_STATE_UNSPECIFIED to + // represent that the user has not made an explicit choice. + GoogleSignalsState_GOOGLE_SIGNALS_STATE_UNSPECIFIED GoogleSignalsState = 0 + // Google Signals is enabled. + GoogleSignalsState_GOOGLE_SIGNALS_ENABLED GoogleSignalsState = 1 + // Google Signals is disabled. + GoogleSignalsState_GOOGLE_SIGNALS_DISABLED GoogleSignalsState = 2 +) + +// Enum value maps for GoogleSignalsState. +var ( + GoogleSignalsState_name = map[int32]string{ + 0: "GOOGLE_SIGNALS_STATE_UNSPECIFIED", + 1: "GOOGLE_SIGNALS_ENABLED", + 2: "GOOGLE_SIGNALS_DISABLED", + } + GoogleSignalsState_value = map[string]int32{ + "GOOGLE_SIGNALS_STATE_UNSPECIFIED": 0, + "GOOGLE_SIGNALS_ENABLED": 1, + "GOOGLE_SIGNALS_DISABLED": 2, + } +) + +func (x GoogleSignalsState) Enum() *GoogleSignalsState { + p := new(GoogleSignalsState) + *p = x + return p +} + +func (x GoogleSignalsState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GoogleSignalsState) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[5].Descriptor() +} + +func (GoogleSignalsState) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[5] +} + +func (x GoogleSignalsState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GoogleSignalsState.Descriptor instead. +func (GoogleSignalsState) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{5} +} + +// Consent field of the Google Signals settings (i.e., whether the user has +// consented to the Google Signals terms of service.) +type GoogleSignalsConsent int32 + +const ( + // Google Signals consent value defaults to + // GOOGLE_SIGNALS_CONSENT_UNSPECIFIED. This will be treated as + // GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED. + GoogleSignalsConsent_GOOGLE_SIGNALS_CONSENT_UNSPECIFIED GoogleSignalsConsent = 0 + // Terms of service have been accepted + GoogleSignalsConsent_GOOGLE_SIGNALS_CONSENT_CONSENTED GoogleSignalsConsent = 2 + // Terms of service have not been accepted + GoogleSignalsConsent_GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED GoogleSignalsConsent = 1 +) + +// Enum value maps for GoogleSignalsConsent. +var ( + GoogleSignalsConsent_name = map[int32]string{ + 0: "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED", + 2: "GOOGLE_SIGNALS_CONSENT_CONSENTED", + 1: "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED", + } + GoogleSignalsConsent_value = map[string]int32{ + "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED": 0, + "GOOGLE_SIGNALS_CONSENT_CONSENTED": 2, + "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED": 1, + } +) + +func (x GoogleSignalsConsent) Enum() *GoogleSignalsConsent { + p := new(GoogleSignalsConsent) + *p = x + return p +} + +func (x GoogleSignalsConsent) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GoogleSignalsConsent) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[6].Descriptor() +} + +func (GoogleSignalsConsent) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[6] +} + +func (x GoogleSignalsConsent) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GoogleSignalsConsent.Descriptor instead. +func (GoogleSignalsConsent) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{6} +} + +// An indication of which product the user initiated a link proposal from. +type LinkProposalInitiatingProduct int32 + +const ( + // Unspecified product. + LinkProposalInitiatingProduct_LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED LinkProposalInitiatingProduct = 0 + // This proposal was created by a user from Google Analytics. + LinkProposalInitiatingProduct_GOOGLE_ANALYTICS LinkProposalInitiatingProduct = 1 + // This proposal was created by a user from a linked product (not Google + // Analytics). + LinkProposalInitiatingProduct_LINKED_PRODUCT LinkProposalInitiatingProduct = 2 +) + +// Enum value maps for LinkProposalInitiatingProduct. +var ( + LinkProposalInitiatingProduct_name = map[int32]string{ + 0: "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED", + 1: "GOOGLE_ANALYTICS", + 2: "LINKED_PRODUCT", + } + LinkProposalInitiatingProduct_value = map[string]int32{ + "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED": 0, + "GOOGLE_ANALYTICS": 1, + "LINKED_PRODUCT": 2, + } +) + +func (x LinkProposalInitiatingProduct) Enum() *LinkProposalInitiatingProduct { + p := new(LinkProposalInitiatingProduct) + *p = x + return p +} + +func (x LinkProposalInitiatingProduct) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LinkProposalInitiatingProduct) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[7].Descriptor() +} + +func (LinkProposalInitiatingProduct) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[7] +} + +func (x LinkProposalInitiatingProduct) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LinkProposalInitiatingProduct.Descriptor instead. +func (LinkProposalInitiatingProduct) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{7} +} + +// The state of a link proposal resource. +type LinkProposalState int32 + +const ( + // Unspecified state + LinkProposalState_LINK_PROPOSAL_STATE_UNSPECIFIED LinkProposalState = 0 + // This proposal is awaiting review from a Google Analytics user. This + // proposal will automatically expire after some time. + LinkProposalState_AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS LinkProposalState = 1 + // This proposal is awaiting review from a user of a linked product. This + // proposal will automatically expire after some time. + LinkProposalState_AWAITING_REVIEW_FROM_LINKED_PRODUCT LinkProposalState = 2 + // This proposal has been withdrawn by an admin on the initiating product. + // This proposal will be automatically deleted after some time. + LinkProposalState_WITHDRAWN LinkProposalState = 3 + // This proposal has been declined by an admin on the receiving product. This + // proposal will be automatically deleted after some time. + LinkProposalState_DECLINED LinkProposalState = 4 + // This proposal expired due to lack of response from an admin on the + // receiving product. This proposal will be automatically deleted after some + // time. + LinkProposalState_EXPIRED LinkProposalState = 5 + // This proposal has become obsolete because a link was directly created to + // the same external product resource that this proposal specifies. This + // proposal will be automatically deleted after some time. + LinkProposalState_OBSOLETE LinkProposalState = 6 +) + +// Enum value maps for LinkProposalState. +var ( + LinkProposalState_name = map[int32]string{ + 0: "LINK_PROPOSAL_STATE_UNSPECIFIED", + 1: "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS", + 2: "AWAITING_REVIEW_FROM_LINKED_PRODUCT", + 3: "WITHDRAWN", + 4: "DECLINED", + 5: "EXPIRED", + 6: "OBSOLETE", + } + LinkProposalState_value = map[string]int32{ + "LINK_PROPOSAL_STATE_UNSPECIFIED": 0, + "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS": 1, + "AWAITING_REVIEW_FROM_LINKED_PRODUCT": 2, + "WITHDRAWN": 3, + "DECLINED": 4, + "EXPIRED": 5, + "OBSOLETE": 6, + } +) + +func (x LinkProposalState) Enum() *LinkProposalState { + p := new(LinkProposalState) + *p = x + return p +} + +func (x LinkProposalState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LinkProposalState) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[8].Descriptor() +} + +func (LinkProposalState) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[8] +} + +func (x LinkProposalState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LinkProposalState.Descriptor instead. +func (LinkProposalState) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{8} +} + +// Types of Property resources. +type PropertyType int32 + +const ( + // Unknown or unspecified property type + PropertyType_PROPERTY_TYPE_UNSPECIFIED PropertyType = 0 + // Ordinary GA4 property + PropertyType_PROPERTY_TYPE_ORDINARY PropertyType = 1 + // GA4 subproperty + PropertyType_PROPERTY_TYPE_SUBPROPERTY PropertyType = 2 + // GA4 rollup property + PropertyType_PROPERTY_TYPE_ROLLUP PropertyType = 3 +) + +// Enum value maps for PropertyType. +var ( + PropertyType_name = map[int32]string{ + 0: "PROPERTY_TYPE_UNSPECIFIED", + 1: "PROPERTY_TYPE_ORDINARY", + 2: "PROPERTY_TYPE_SUBPROPERTY", + 3: "PROPERTY_TYPE_ROLLUP", + } + PropertyType_value = map[string]int32{ + "PROPERTY_TYPE_UNSPECIFIED": 0, + "PROPERTY_TYPE_ORDINARY": 1, + "PROPERTY_TYPE_SUBPROPERTY": 2, + "PROPERTY_TYPE_ROLLUP": 3, + } +) + +func (x PropertyType) Enum() *PropertyType { + p := new(PropertyType) + *p = x + return p +} + +func (x PropertyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PropertyType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[9].Descriptor() +} + +func (PropertyType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[9] +} + +func (x PropertyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PropertyType.Descriptor instead. +func (PropertyType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{9} +} + +// The type of the data stream. +type DataStream_DataStreamType int32 + +const ( + // Type unknown or not specified. + DataStream_DATA_STREAM_TYPE_UNSPECIFIED DataStream_DataStreamType = 0 + // Web data stream. + DataStream_WEB_DATA_STREAM DataStream_DataStreamType = 1 + // Android app data stream. + DataStream_ANDROID_APP_DATA_STREAM DataStream_DataStreamType = 2 + // iOS app data stream. + DataStream_IOS_APP_DATA_STREAM DataStream_DataStreamType = 3 +) + +// Enum value maps for DataStream_DataStreamType. +var ( + DataStream_DataStreamType_name = map[int32]string{ + 0: "DATA_STREAM_TYPE_UNSPECIFIED", + 1: "WEB_DATA_STREAM", + 2: "ANDROID_APP_DATA_STREAM", + 3: "IOS_APP_DATA_STREAM", + } + DataStream_DataStreamType_value = map[string]int32{ + "DATA_STREAM_TYPE_UNSPECIFIED": 0, + "WEB_DATA_STREAM": 1, + "ANDROID_APP_DATA_STREAM": 2, + "IOS_APP_DATA_STREAM": 3, + } +) + +func (x DataStream_DataStreamType) Enum() *DataStream_DataStreamType { + p := new(DataStream_DataStreamType) + *p = x + return p +} + +func (x DataStream_DataStreamType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataStream_DataStreamType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[10].Descriptor() +} + +func (DataStream_DataStreamType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[10] +} + +func (x DataStream_DataStreamType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataStream_DataStreamType.Descriptor instead. +func (DataStream_DataStreamType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{2, 0} +} + +// Valid values for the scope of this dimension. +type CustomDimension_DimensionScope int32 + +const ( + // Scope unknown or not specified. + CustomDimension_DIMENSION_SCOPE_UNSPECIFIED CustomDimension_DimensionScope = 0 + // Dimension scoped to an event. + CustomDimension_EVENT CustomDimension_DimensionScope = 1 + // Dimension scoped to a user. + CustomDimension_USER CustomDimension_DimensionScope = 2 +) + +// Enum value maps for CustomDimension_DimensionScope. +var ( + CustomDimension_DimensionScope_name = map[int32]string{ + 0: "DIMENSION_SCOPE_UNSPECIFIED", + 1: "EVENT", + 2: "USER", + } + CustomDimension_DimensionScope_value = map[string]int32{ + "DIMENSION_SCOPE_UNSPECIFIED": 0, + "EVENT": 1, + "USER": 2, + } +) + +func (x CustomDimension_DimensionScope) Enum() *CustomDimension_DimensionScope { + p := new(CustomDimension_DimensionScope) + *p = x + return p +} + +func (x CustomDimension_DimensionScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomDimension_DimensionScope) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[11].Descriptor() +} + +func (CustomDimension_DimensionScope) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[11] +} + +func (x CustomDimension_DimensionScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomDimension_DimensionScope.Descriptor instead. +func (CustomDimension_DimensionScope) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{19, 0} +} + +// Possible types of representing the custom metric's value. +// +// Currency representation may change in the future, requiring a breaking API +// change. +type CustomMetric_MeasurementUnit int32 + +const ( + // MeasurementUnit unspecified or missing. + CustomMetric_MEASUREMENT_UNIT_UNSPECIFIED CustomMetric_MeasurementUnit = 0 + // This metric uses default units. + CustomMetric_STANDARD CustomMetric_MeasurementUnit = 1 + // This metric measures a currency. + CustomMetric_CURRENCY CustomMetric_MeasurementUnit = 2 + // This metric measures feet. + CustomMetric_FEET CustomMetric_MeasurementUnit = 3 + // This metric measures meters. + CustomMetric_METERS CustomMetric_MeasurementUnit = 4 + // This metric measures kilometers. + CustomMetric_KILOMETERS CustomMetric_MeasurementUnit = 5 + // This metric measures miles. + CustomMetric_MILES CustomMetric_MeasurementUnit = 6 + // This metric measures milliseconds. + CustomMetric_MILLISECONDS CustomMetric_MeasurementUnit = 7 + // This metric measures seconds. + CustomMetric_SECONDS CustomMetric_MeasurementUnit = 8 + // This metric measures minutes. + CustomMetric_MINUTES CustomMetric_MeasurementUnit = 9 + // This metric measures hours. + CustomMetric_HOURS CustomMetric_MeasurementUnit = 10 +) + +// Enum value maps for CustomMetric_MeasurementUnit. +var ( + CustomMetric_MeasurementUnit_name = map[int32]string{ + 0: "MEASUREMENT_UNIT_UNSPECIFIED", + 1: "STANDARD", + 2: "CURRENCY", + 3: "FEET", + 4: "METERS", + 5: "KILOMETERS", + 6: "MILES", + 7: "MILLISECONDS", + 8: "SECONDS", + 9: "MINUTES", + 10: "HOURS", + } + CustomMetric_MeasurementUnit_value = map[string]int32{ + "MEASUREMENT_UNIT_UNSPECIFIED": 0, + "STANDARD": 1, + "CURRENCY": 2, + "FEET": 3, + "METERS": 4, + "KILOMETERS": 5, + "MILES": 6, + "MILLISECONDS": 7, + "SECONDS": 8, + "MINUTES": 9, + "HOURS": 10, + } +) + +func (x CustomMetric_MeasurementUnit) Enum() *CustomMetric_MeasurementUnit { + p := new(CustomMetric_MeasurementUnit) + *p = x + return p +} + +func (x CustomMetric_MeasurementUnit) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomMetric_MeasurementUnit) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[12].Descriptor() +} + +func (CustomMetric_MeasurementUnit) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[12] +} + +func (x CustomMetric_MeasurementUnit) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomMetric_MeasurementUnit.Descriptor instead. +func (CustomMetric_MeasurementUnit) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{20, 0} +} + +// The scope of this metric. +type CustomMetric_MetricScope int32 + +const ( + // Scope unknown or not specified. + CustomMetric_METRIC_SCOPE_UNSPECIFIED CustomMetric_MetricScope = 0 + // Metric scoped to an event. + CustomMetric_EVENT CustomMetric_MetricScope = 1 +) + +// Enum value maps for CustomMetric_MetricScope. +var ( + CustomMetric_MetricScope_name = map[int32]string{ + 0: "METRIC_SCOPE_UNSPECIFIED", + 1: "EVENT", + } + CustomMetric_MetricScope_value = map[string]int32{ + "METRIC_SCOPE_UNSPECIFIED": 0, + "EVENT": 1, + } +) + +func (x CustomMetric_MetricScope) Enum() *CustomMetric_MetricScope { + p := new(CustomMetric_MetricScope) + *p = x + return p +} + +func (x CustomMetric_MetricScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomMetric_MetricScope) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[13].Descriptor() +} + +func (CustomMetric_MetricScope) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[13] +} + +func (x CustomMetric_MetricScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomMetric_MetricScope.Descriptor instead. +func (CustomMetric_MetricScope) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{20, 1} +} + +// Labels that mark the data in this custom metric as data that should be +// restricted to specific users. +type CustomMetric_RestrictedMetricType int32 + +const ( + // Type unknown or unspecified. + CustomMetric_RESTRICTED_METRIC_TYPE_UNSPECIFIED CustomMetric_RestrictedMetricType = 0 + // Metric reports cost data. + CustomMetric_COST_DATA CustomMetric_RestrictedMetricType = 1 + // Metric reports revenue data. + CustomMetric_REVENUE_DATA CustomMetric_RestrictedMetricType = 2 +) + +// Enum value maps for CustomMetric_RestrictedMetricType. +var ( + CustomMetric_RestrictedMetricType_name = map[int32]string{ + 0: "RESTRICTED_METRIC_TYPE_UNSPECIFIED", + 1: "COST_DATA", + 2: "REVENUE_DATA", + } + CustomMetric_RestrictedMetricType_value = map[string]int32{ + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2, + } +) + +func (x CustomMetric_RestrictedMetricType) Enum() *CustomMetric_RestrictedMetricType { + p := new(CustomMetric_RestrictedMetricType) + *p = x + return p +} + +func (x CustomMetric_RestrictedMetricType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomMetric_RestrictedMetricType) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[14].Descriptor() +} + +func (CustomMetric_RestrictedMetricType) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[14] +} + +func (x CustomMetric_RestrictedMetricType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomMetric_RestrictedMetricType.Descriptor instead. +func (CustomMetric_RestrictedMetricType) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{20, 2} +} + +// Valid values for the data retention duration. +type DataRetentionSettings_RetentionDuration int32 + +const ( + // Data retention time duration is not specified. + DataRetentionSettings_RETENTION_DURATION_UNSPECIFIED DataRetentionSettings_RetentionDuration = 0 + // The data retention time duration is 2 months. + DataRetentionSettings_TWO_MONTHS DataRetentionSettings_RetentionDuration = 1 + // The data retention time duration is 14 months. + DataRetentionSettings_FOURTEEN_MONTHS DataRetentionSettings_RetentionDuration = 3 + // The data retention time duration is 26 months. + // Available to 360 properties only. + DataRetentionSettings_TWENTY_SIX_MONTHS DataRetentionSettings_RetentionDuration = 4 + // The data retention time duration is 38 months. + // Available to 360 properties only. + DataRetentionSettings_THIRTY_EIGHT_MONTHS DataRetentionSettings_RetentionDuration = 5 + // The data retention time duration is 50 months. + // Available to 360 properties only. + DataRetentionSettings_FIFTY_MONTHS DataRetentionSettings_RetentionDuration = 6 +) + +// Enum value maps for DataRetentionSettings_RetentionDuration. +var ( + DataRetentionSettings_RetentionDuration_name = map[int32]string{ + 0: "RETENTION_DURATION_UNSPECIFIED", + 1: "TWO_MONTHS", + 3: "FOURTEEN_MONTHS", + 4: "TWENTY_SIX_MONTHS", + 5: "THIRTY_EIGHT_MONTHS", + 6: "FIFTY_MONTHS", + } + DataRetentionSettings_RetentionDuration_value = map[string]int32{ + "RETENTION_DURATION_UNSPECIFIED": 0, + "TWO_MONTHS": 1, + "FOURTEEN_MONTHS": 3, + "TWENTY_SIX_MONTHS": 4, + "THIRTY_EIGHT_MONTHS": 5, + "FIFTY_MONTHS": 6, + } +) + +func (x DataRetentionSettings_RetentionDuration) Enum() *DataRetentionSettings_RetentionDuration { + p := new(DataRetentionSettings_RetentionDuration) + *p = x + return p +} + +func (x DataRetentionSettings_RetentionDuration) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataRetentionSettings_RetentionDuration) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[15].Descriptor() +} + +func (DataRetentionSettings_RetentionDuration) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[15] +} + +func (x DataRetentionSettings_RetentionDuration) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataRetentionSettings_RetentionDuration.Descriptor instead. +func (DataRetentionSettings_RetentionDuration) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{21, 0} +} + +// How far back in time events should be considered for inclusion in a +// converting path which leads to the first install of an app or the first +// visit to a site. +type AttributionSettings_AcquisitionConversionEventLookbackWindow int32 + +const ( + // Lookback window size unspecified. + AttributionSettings_ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED AttributionSettings_AcquisitionConversionEventLookbackWindow = 0 + // 7-day lookback window. + AttributionSettings_ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS AttributionSettings_AcquisitionConversionEventLookbackWindow = 1 + // 30-day lookback window. + AttributionSettings_ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS AttributionSettings_AcquisitionConversionEventLookbackWindow = 2 +) + +// Enum value maps for AttributionSettings_AcquisitionConversionEventLookbackWindow. +var ( + AttributionSettings_AcquisitionConversionEventLookbackWindow_name = map[int32]string{ + 0: "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED", + 1: "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS", + 2: "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS", + } + AttributionSettings_AcquisitionConversionEventLookbackWindow_value = map[string]int32{ + "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": 0, + "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS": 1, + "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": 2, + } +) + +func (x AttributionSettings_AcquisitionConversionEventLookbackWindow) Enum() *AttributionSettings_AcquisitionConversionEventLookbackWindow { + p := new(AttributionSettings_AcquisitionConversionEventLookbackWindow) + *p = x + return p +} + +func (x AttributionSettings_AcquisitionConversionEventLookbackWindow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttributionSettings_AcquisitionConversionEventLookbackWindow) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[16].Descriptor() +} + +func (AttributionSettings_AcquisitionConversionEventLookbackWindow) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[16] +} + +func (x AttributionSettings_AcquisitionConversionEventLookbackWindow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttributionSettings_AcquisitionConversionEventLookbackWindow.Descriptor instead. +func (AttributionSettings_AcquisitionConversionEventLookbackWindow) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{22, 0} +} + +// How far back in time events should be considered for inclusion in a +// converting path for all conversions other than first app install/first site +// visit. +type AttributionSettings_OtherConversionEventLookbackWindow int32 + +const ( + // Lookback window size unspecified. + AttributionSettings_OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED AttributionSettings_OtherConversionEventLookbackWindow = 0 + // 30-day lookback window. + AttributionSettings_OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS AttributionSettings_OtherConversionEventLookbackWindow = 1 + // 60-day lookback window. + AttributionSettings_OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS AttributionSettings_OtherConversionEventLookbackWindow = 2 + // 90-day lookback window. + AttributionSettings_OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS AttributionSettings_OtherConversionEventLookbackWindow = 3 +) + +// Enum value maps for AttributionSettings_OtherConversionEventLookbackWindow. +var ( + AttributionSettings_OtherConversionEventLookbackWindow_name = map[int32]string{ + 0: "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED", + 1: "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS", + 2: "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS", + 3: "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS", + } + AttributionSettings_OtherConversionEventLookbackWindow_value = map[string]int32{ + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": 0, + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": 1, + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS": 2, + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS": 3, + } +) + +func (x AttributionSettings_OtherConversionEventLookbackWindow) Enum() *AttributionSettings_OtherConversionEventLookbackWindow { + p := new(AttributionSettings_OtherConversionEventLookbackWindow) + *p = x + return p +} + +func (x AttributionSettings_OtherConversionEventLookbackWindow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttributionSettings_OtherConversionEventLookbackWindow) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[17].Descriptor() +} + +func (AttributionSettings_OtherConversionEventLookbackWindow) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[17] +} + +func (x AttributionSettings_OtherConversionEventLookbackWindow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttributionSettings_OtherConversionEventLookbackWindow.Descriptor instead. +func (AttributionSettings_OtherConversionEventLookbackWindow) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{22, 1} +} + +// The reporting attribution model used to calculate conversion credit in this +// property's reports. +type AttributionSettings_ReportingAttributionModel int32 + +const ( + // Reporting attribution model unspecified. + AttributionSettings_REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED AttributionSettings_ReportingAttributionModel = 0 + // Data-driven attribution distributes credit for the conversion based on + // data for each conversion event. Each Data-driven model is specific to + // each advertiser and each conversion event. + AttributionSettings_CROSS_CHANNEL_DATA_DRIVEN AttributionSettings_ReportingAttributionModel = 1 + // Ignores direct traffic and attributes 100% of the conversion value to the + // last channel that the customer clicked through (or engaged view through + // for YouTube) before converting. + AttributionSettings_CROSS_CHANNEL_LAST_CLICK AttributionSettings_ReportingAttributionModel = 2 + // Gives all credit for the conversion to the first channel that a customer + // clicked (or engaged view through for YouTube) before converting. + AttributionSettings_CROSS_CHANNEL_FIRST_CLICK AttributionSettings_ReportingAttributionModel = 3 + // Distributes the credit for the conversion equally across all the channels + // a customer clicked (or engaged view through for YouTube) before + // converting. + AttributionSettings_CROSS_CHANNEL_LINEAR AttributionSettings_ReportingAttributionModel = 4 + // Attributes 40% credit to the first and last interaction, and the + // remaining 20% credit is distributed evenly to the middle interactions. + AttributionSettings_CROSS_CHANNEL_POSITION_BASED AttributionSettings_ReportingAttributionModel = 5 + // Gives more credit to the touchpoints that happened closer in time to + // the conversion. + AttributionSettings_CROSS_CHANNEL_TIME_DECAY AttributionSettings_ReportingAttributionModel = 6 + // Attributes 100% of the conversion value to the last Google Ads channel + // that the customer clicked through before converting. + AttributionSettings_ADS_PREFERRED_LAST_CLICK AttributionSettings_ReportingAttributionModel = 7 +) + +// Enum value maps for AttributionSettings_ReportingAttributionModel. +var ( + AttributionSettings_ReportingAttributionModel_name = map[int32]string{ + 0: "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED", + 1: "CROSS_CHANNEL_DATA_DRIVEN", + 2: "CROSS_CHANNEL_LAST_CLICK", + 3: "CROSS_CHANNEL_FIRST_CLICK", + 4: "CROSS_CHANNEL_LINEAR", + 5: "CROSS_CHANNEL_POSITION_BASED", + 6: "CROSS_CHANNEL_TIME_DECAY", + 7: "ADS_PREFERRED_LAST_CLICK", + } + AttributionSettings_ReportingAttributionModel_value = map[string]int32{ + "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED": 0, + "CROSS_CHANNEL_DATA_DRIVEN": 1, + "CROSS_CHANNEL_LAST_CLICK": 2, + "CROSS_CHANNEL_FIRST_CLICK": 3, + "CROSS_CHANNEL_LINEAR": 4, + "CROSS_CHANNEL_POSITION_BASED": 5, + "CROSS_CHANNEL_TIME_DECAY": 6, + "ADS_PREFERRED_LAST_CLICK": 7, + } +) + +func (x AttributionSettings_ReportingAttributionModel) Enum() *AttributionSettings_ReportingAttributionModel { + p := new(AttributionSettings_ReportingAttributionModel) + *p = x + return p +} + +func (x AttributionSettings_ReportingAttributionModel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttributionSettings_ReportingAttributionModel) Descriptor() protoreflect.EnumDescriptor { + return file_google_analytics_admin_v1alpha_resources_proto_enumTypes[18].Descriptor() +} + +func (AttributionSettings_ReportingAttributionModel) Type() protoreflect.EnumType { + return &file_google_analytics_admin_v1alpha_resources_proto_enumTypes[18] +} + +func (x AttributionSettings_ReportingAttributionModel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttributionSettings_ReportingAttributionModel.Descriptor instead. +func (AttributionSettings_ReportingAttributionModel) EnumDescriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{22, 2} +} + +// A resource message representing a Google Analytics account. +type Account struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this account. + // Format: accounts/{account} + // Example: "accounts/100" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. Time when this account was originally created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Time when account payload fields were last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Required. Human-readable display name for this account. + DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Country of business. Must be a Unicode CLDR region code. + RegionCode string `protobuf:"bytes,5,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"` + // Output only. Indicates whether this Account is soft-deleted or not. Deleted + // accounts are excluded from List results unless specifically requested. + Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"` +} + +func (x *Account) Reset() { + *x = Account{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{0} +} + +func (x *Account) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Account) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Account) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Account) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Account) GetRegionCode() string { + if x != nil { + return x.RegionCode + } + return "" +} + +func (x *Account) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +// A resource message representing a Google Analytics GA4 property. +type Property struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this property. + // Format: properties/{property_id} + // Example: "properties/1000" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. The property type for this Property resource. When creating a property, if + // the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be + // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created + // via Google Analytics Admin API. + PropertyType PropertyType `protobuf:"varint,14,opt,name=property_type,json=propertyType,proto3,enum=google.analytics.admin.v1alpha.PropertyType" json:"property_type,omitempty"` + // Output only. Time when the entity was originally created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Time when entity payload fields were last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Immutable. Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/101" + Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Human-readable display name for this property. + // + // The max allowed display name length is 100 UTF-16 code units. + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Industry associated with this property + // Example: AUTOMOTIVE, FOOD_AND_DRINK + IndustryCategory IndustryCategory `protobuf:"varint,6,opt,name=industry_category,json=industryCategory,proto3,enum=google.analytics.admin.v1alpha.IndustryCategory" json:"industry_category,omitempty"` + // Required. Reporting Time Zone, used as the day boundary for reports, regardless of + // where the data originates. If the time zone honors DST, Analytics will + // automatically adjust for the changes. + // + // NOTE: Changing the time zone only affects data going forward, and is not + // applied retroactively. + // + // Format: https://www.iana.org/time-zones + // Example: "America/Los_Angeles" + TimeZone string `protobuf:"bytes,7,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"` + // The currency type used in reports involving monetary values. + // + // Format: https://en.wikipedia.org/wiki/ISO_4217 + // Examples: "USD", "EUR", "JPY" + CurrencyCode string `protobuf:"bytes,8,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"` + // Output only. The Google Analytics service level that applies to this property. + ServiceLevel ServiceLevel `protobuf:"varint,10,opt,name=service_level,json=serviceLevel,proto3,enum=google.analytics.admin.v1alpha.ServiceLevel" json:"service_level,omitempty"` + // Output only. If set, the time at which this property was trashed. If not set, then this + // property is not currently in the trash can. + DeleteTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` + // Output only. If set, the time at which this trashed property will be permanently + // deleted. If not set, then this property is not currently in the trash can + // and is not slated to be deleted. + ExpireTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` + // Immutable. The resource name of the parent account + // Format: accounts/{account_id} + // Example: "accounts/123" + Account string `protobuf:"bytes,13,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *Property) Reset() { + *x = Property{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Property) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Property) ProtoMessage() {} + +func (x *Property) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Property.ProtoReflect.Descriptor instead. +func (*Property) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *Property) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Property) GetPropertyType() PropertyType { + if x != nil { + return x.PropertyType + } + return PropertyType_PROPERTY_TYPE_UNSPECIFIED +} + +func (x *Property) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Property) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Property) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *Property) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Property) GetIndustryCategory() IndustryCategory { + if x != nil { + return x.IndustryCategory + } + return IndustryCategory_INDUSTRY_CATEGORY_UNSPECIFIED +} + +func (x *Property) GetTimeZone() string { + if x != nil { + return x.TimeZone + } + return "" +} + +func (x *Property) GetCurrencyCode() string { + if x != nil { + return x.CurrencyCode + } + return "" +} + +func (x *Property) GetServiceLevel() ServiceLevel { + if x != nil { + return x.ServiceLevel + } + return ServiceLevel_SERVICE_LEVEL_UNSPECIFIED +} + +func (x *Property) GetDeleteTime() *timestamppb.Timestamp { + if x != nil { + return x.DeleteTime + } + return nil +} + +func (x *Property) GetExpireTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpireTime + } + return nil +} + +func (x *Property) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +// A resource message representing a data stream. +type DataStream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Data for specific data stream types. The message that will be + // set corresponds to the type of this stream. + // + // Types that are assignable to StreamData: + // + // *DataStream_WebStreamData_ + // *DataStream_AndroidAppStreamData_ + // *DataStream_IosAppStreamData_ + StreamData isDataStream_StreamData `protobuf_oneof:"stream_data"` + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/dataStreams/{stream_id} + // Example: "properties/1000/dataStreams/2000" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Immutable. The type of this DataStream resource. + Type DataStream_DataStreamType `protobuf:"varint,2,opt,name=type,proto3,enum=google.analytics.admin.v1alpha.DataStream_DataStreamType" json:"type,omitempty"` + // Human-readable display name for the Data Stream. + // + // Required for web data streams. + // + // The max allowed display name length is 255 UTF-16 code units. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. Time when this stream was originally created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Time when stream payload fields were last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *DataStream) Reset() { + *x = DataStream{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataStream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataStream) ProtoMessage() {} + +func (x *DataStream) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataStream.ProtoReflect.Descriptor instead. +func (*DataStream) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{2} +} + +func (m *DataStream) GetStreamData() isDataStream_StreamData { + if m != nil { + return m.StreamData + } + return nil +} + +func (x *DataStream) GetWebStreamData() *DataStream_WebStreamData { + if x, ok := x.GetStreamData().(*DataStream_WebStreamData_); ok { + return x.WebStreamData + } + return nil +} + +func (x *DataStream) GetAndroidAppStreamData() *DataStream_AndroidAppStreamData { + if x, ok := x.GetStreamData().(*DataStream_AndroidAppStreamData_); ok { + return x.AndroidAppStreamData + } + return nil +} + +func (x *DataStream) GetIosAppStreamData() *DataStream_IosAppStreamData { + if x, ok := x.GetStreamData().(*DataStream_IosAppStreamData_); ok { + return x.IosAppStreamData + } + return nil +} + +func (x *DataStream) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DataStream) GetType() DataStream_DataStreamType { + if x != nil { + return x.Type + } + return DataStream_DATA_STREAM_TYPE_UNSPECIFIED +} + +func (x *DataStream) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *DataStream) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *DataStream) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +type isDataStream_StreamData interface { + isDataStream_StreamData() +} + +type DataStream_WebStreamData_ struct { + // Data specific to web streams. Must be populated if type is + // WEB_DATA_STREAM. + WebStreamData *DataStream_WebStreamData `protobuf:"bytes,6,opt,name=web_stream_data,json=webStreamData,proto3,oneof"` +} + +type DataStream_AndroidAppStreamData_ struct { + // Data specific to Android app streams. Must be populated if type is + // ANDROID_APP_DATA_STREAM. + AndroidAppStreamData *DataStream_AndroidAppStreamData `protobuf:"bytes,7,opt,name=android_app_stream_data,json=androidAppStreamData,proto3,oneof"` +} + +type DataStream_IosAppStreamData_ struct { + // Data specific to iOS app streams. Must be populated if type is + // IOS_APP_DATA_STREAM. + IosAppStreamData *DataStream_IosAppStreamData `protobuf:"bytes,8,opt,name=ios_app_stream_data,json=iosAppStreamData,proto3,oneof"` +} + +func (*DataStream_WebStreamData_) isDataStream_StreamData() {} + +func (*DataStream_AndroidAppStreamData_) isDataStream_StreamData() {} + +func (*DataStream_IosAppStreamData_) isDataStream_StreamData() {} + +// A resource message representing a user's permissions on an Account or +// Property resource. +type UserLink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Example format: properties/1234/userLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. Email address of the user to link + EmailAddress string `protobuf:"bytes,2,opt,name=email_address,json=emailAddress,proto3" json:"email_address,omitempty"` + // Roles directly assigned to this user for this account or property. + // + // Valid values: + // predefinedRoles/viewer + // predefinedRoles/analyst + // predefinedRoles/editor + // predefinedRoles/admin + // predefinedRoles/no-cost-data + // predefinedRoles/no-revenue-data + // + // Excludes roles that are inherited from a higher-level entity, group, + // or organization admin role. + // + // A UserLink that is updated to have an empty list of direct_roles will be + // deleted. + DirectRoles []string `protobuf:"bytes,3,rep,name=direct_roles,json=directRoles,proto3" json:"direct_roles,omitempty"` +} + +func (x *UserLink) Reset() { + *x = UserLink{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserLink) ProtoMessage() {} + +func (x *UserLink) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserLink.ProtoReflect.Descriptor instead. +func (*UserLink) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{3} +} + +func (x *UserLink) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UserLink) GetEmailAddress() string { + if x != nil { + return x.EmailAddress + } + return "" +} + +func (x *UserLink) GetDirectRoles() []string { + if x != nil { + return x.DirectRoles + } + return nil +} + +// Read-only resource used to summarize a principal's effective roles. +type AuditUserLink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Example format: properties/1234/userLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Email address of the linked user + EmailAddress string `protobuf:"bytes,2,opt,name=email_address,json=emailAddress,proto3" json:"email_address,omitempty"` + // Roles directly assigned to this user for this entity. + // + // Format: predefinedRoles/viewer + // + // Excludes roles that are inherited from an account (if this is for a + // property), group, or organization admin role. + DirectRoles []string `protobuf:"bytes,3,rep,name=direct_roles,json=directRoles,proto3" json:"direct_roles,omitempty"` + // Union of all permissions a user has at this account or property (includes + // direct permissions, group-inherited permissions, etc.). + // + // Format: predefinedRoles/viewer + EffectiveRoles []string `protobuf:"bytes,4,rep,name=effective_roles,json=effectiveRoles,proto3" json:"effective_roles,omitempty"` +} + +func (x *AuditUserLink) Reset() { + *x = AuditUserLink{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuditUserLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuditUserLink) ProtoMessage() {} + +func (x *AuditUserLink) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuditUserLink.ProtoReflect.Descriptor instead. +func (*AuditUserLink) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{4} +} + +func (x *AuditUserLink) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AuditUserLink) GetEmailAddress() string { + if x != nil { + return x.EmailAddress + } + return "" +} + +func (x *AuditUserLink) GetDirectRoles() []string { + if x != nil { + return x.DirectRoles + } + return nil +} + +func (x *AuditUserLink) GetEffectiveRoles() []string { + if x != nil { + return x.EffectiveRoles + } + return nil +} + +// A link between a GA4 property and a Firebase project. +type FirebaseLink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Example format: properties/1234/firebaseLinks/5678 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. Firebase project resource name. When creating a FirebaseLink, you may + // provide this resource name using either a project number or project ID. + // Once this resource has been created, returned FirebaseLinks will always + // have a project_name that contains a project number. + // + // Format: 'projects/{project number}' + // Example: 'projects/1234' + Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` + // Output only. Time when this FirebaseLink was originally created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *FirebaseLink) Reset() { + *x = FirebaseLink{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FirebaseLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FirebaseLink) ProtoMessage() {} + +func (x *FirebaseLink) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FirebaseLink.ProtoReflect.Descriptor instead. +func (*FirebaseLink) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{5} +} + +func (x *FirebaseLink) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FirebaseLink) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +func (x *FirebaseLink) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +// Read-only resource with the tag for sending data from a website to a +// DataStream. Only present for web DataStream resources. +type GlobalSiteTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name for this GlobalSiteTag resource. + // Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + // Example: "properties/123/dataStreams/456/globalSiteTag" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. JavaScript code snippet to be pasted as the first item into the head tag of + // every webpage to measure. + Snippet string `protobuf:"bytes,2,opt,name=snippet,proto3" json:"snippet,omitempty"` +} + +func (x *GlobalSiteTag) Reset() { + *x = GlobalSiteTag{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GlobalSiteTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GlobalSiteTag) ProtoMessage() {} + +func (x *GlobalSiteTag) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GlobalSiteTag.ProtoReflect.Descriptor instead. +func (*GlobalSiteTag) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{6} +} + +func (x *GlobalSiteTag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GlobalSiteTag) GetSnippet() string { + if x != nil { + return x.Snippet + } + return "" +} + +// A link between a GA4 property and a Google Ads account. +type GoogleAdsLink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // + // Note: googleAdsLinkId is not the Google Ads customer ID. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. Google Ads customer ID. + CustomerId string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` + // Output only. If true, this link is for a Google Ads manager account. + CanManageClients bool `protobuf:"varint,4,opt,name=can_manage_clients,json=canManageClients,proto3" json:"can_manage_clients,omitempty"` + // Enable personalized advertising features with this integration. + // Automatically publish my Google Analytics audience lists and Google + // Analytics remarketing events/parameters to the linked Google Ads account. + // If this field is not set on create/update, it will be defaulted to true. + AdsPersonalizationEnabled *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=ads_personalization_enabled,json=adsPersonalizationEnabled,proto3" json:"ads_personalization_enabled,omitempty"` + // Output only. Time when this link was originally created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Time when this link was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. Email address of the user that created the link. + // An empty string will be returned if the email address can't be retrieved. + CreatorEmailAddress string `protobuf:"bytes,9,opt,name=creator_email_address,json=creatorEmailAddress,proto3" json:"creator_email_address,omitempty"` +} + +func (x *GoogleAdsLink) Reset() { + *x = GoogleAdsLink{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoogleAdsLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoogleAdsLink) ProtoMessage() {} + +func (x *GoogleAdsLink) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoogleAdsLink.ProtoReflect.Descriptor instead. +func (*GoogleAdsLink) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{7} +} + +func (x *GoogleAdsLink) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GoogleAdsLink) GetCustomerId() string { + if x != nil { + return x.CustomerId + } + return "" +} + +func (x *GoogleAdsLink) GetCanManageClients() bool { + if x != nil { + return x.CanManageClients + } + return false +} + +func (x *GoogleAdsLink) GetAdsPersonalizationEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.AdsPersonalizationEnabled + } + return nil +} + +func (x *GoogleAdsLink) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *GoogleAdsLink) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *GoogleAdsLink) GetCreatorEmailAddress() string { + if x != nil { + return x.CreatorEmailAddress + } + return "" +} + +// A resource message representing data sharing settings of a Google Analytics +// account. +type DataSharingSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Allows Google support to access the data in order to help troubleshoot + // issues. + SharingWithGoogleSupportEnabled bool `protobuf:"varint,2,opt,name=sharing_with_google_support_enabled,json=sharingWithGoogleSupportEnabled,proto3" json:"sharing_with_google_support_enabled,omitempty"` + // Allows Google sales teams that are assigned to the customer to access the + // data in order to suggest configuration changes to improve results. + // Sales team restrictions still apply when enabled. + SharingWithGoogleAssignedSalesEnabled bool `protobuf:"varint,3,opt,name=sharing_with_google_assigned_sales_enabled,json=sharingWithGoogleAssignedSalesEnabled,proto3" json:"sharing_with_google_assigned_sales_enabled,omitempty"` + // Allows any of Google sales to access the data in order to suggest + // configuration changes to improve results. + SharingWithGoogleAnySalesEnabled bool `protobuf:"varint,4,opt,name=sharing_with_google_any_sales_enabled,json=sharingWithGoogleAnySalesEnabled,proto3" json:"sharing_with_google_any_sales_enabled,omitempty"` + // Allows Google to use the data to improve other Google products or services. + SharingWithGoogleProductsEnabled bool `protobuf:"varint,5,opt,name=sharing_with_google_products_enabled,json=sharingWithGoogleProductsEnabled,proto3" json:"sharing_with_google_products_enabled,omitempty"` + // Allows Google to share the data anonymously in aggregate form with others. + SharingWithOthersEnabled bool `protobuf:"varint,6,opt,name=sharing_with_others_enabled,json=sharingWithOthersEnabled,proto3" json:"sharing_with_others_enabled,omitempty"` +} + +func (x *DataSharingSettings) Reset() { + *x = DataSharingSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataSharingSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataSharingSettings) ProtoMessage() {} + +func (x *DataSharingSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataSharingSettings.ProtoReflect.Descriptor instead. +func (*DataSharingSettings) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{8} +} + +func (x *DataSharingSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DataSharingSettings) GetSharingWithGoogleSupportEnabled() bool { + if x != nil { + return x.SharingWithGoogleSupportEnabled + } + return false +} + +func (x *DataSharingSettings) GetSharingWithGoogleAssignedSalesEnabled() bool { + if x != nil { + return x.SharingWithGoogleAssignedSalesEnabled + } + return false +} + +func (x *DataSharingSettings) GetSharingWithGoogleAnySalesEnabled() bool { + if x != nil { + return x.SharingWithGoogleAnySalesEnabled + } + return false +} + +func (x *DataSharingSettings) GetSharingWithGoogleProductsEnabled() bool { + if x != nil { + return x.SharingWithGoogleProductsEnabled + } + return false +} + +func (x *DataSharingSettings) GetSharingWithOthersEnabled() bool { + if x != nil { + return x.SharingWithOthersEnabled + } + return false +} + +// A virtual resource representing an overview of an account and +// all its child GA4 properties. +type AccountSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Resource name for this account summary. + // Format: accountSummaries/{account_id} + // Example: "accountSummaries/1000" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Resource name of account referred to by this account summary + // Format: accounts/{account_id} + // Example: "accounts/1000" + Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + // Display name for the account referred to in this account summary. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // List of summaries for child accounts of this account. + PropertySummaries []*PropertySummary `protobuf:"bytes,4,rep,name=property_summaries,json=propertySummaries,proto3" json:"property_summaries,omitempty"` +} + +func (x *AccountSummary) Reset() { + *x = AccountSummary{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountSummary) ProtoMessage() {} + +func (x *AccountSummary) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountSummary.ProtoReflect.Descriptor instead. +func (*AccountSummary) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{9} +} + +func (x *AccountSummary) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AccountSummary) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *AccountSummary) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *AccountSummary) GetPropertySummaries() []*PropertySummary { + if x != nil { + return x.PropertySummaries + } + return nil +} + +// A virtual resource representing metadata for a GA4 property. +type PropertySummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Resource name of property referred to by this property summary + // Format: properties/{property_id} + // Example: "properties/1000" + Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"` + // Display name for the property referred to in this property summary. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The property's property type. + PropertyType PropertyType `protobuf:"varint,3,opt,name=property_type,json=propertyType,proto3,enum=google.analytics.admin.v1alpha.PropertyType" json:"property_type,omitempty"` + // Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/200" + Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *PropertySummary) Reset() { + *x = PropertySummary{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PropertySummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PropertySummary) ProtoMessage() {} + +func (x *PropertySummary) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PropertySummary.ProtoReflect.Descriptor instead. +func (*PropertySummary) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{10} +} + +func (x *PropertySummary) GetProperty() string { + if x != nil { + return x.Property + } + return "" +} + +func (x *PropertySummary) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *PropertySummary) GetPropertyType() PropertyType { + if x != nil { + return x.PropertyType + } + return PropertyType_PROPERTY_TYPE_UNSPECIFIED +} + +func (x *PropertySummary) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +// A secret value used for sending hits to Measurement Protocol. +type MeasurementProtocolSecret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this secret. This secret may be a child of any type of + // stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Human-readable display name for this secret. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. The measurement protocol secret value. Pass this value to the api_secret + // field of the Measurement Protocol API when sending hits to this + // secret's parent property. + SecretValue string `protobuf:"bytes,3,opt,name=secret_value,json=secretValue,proto3" json:"secret_value,omitempty"` +} + +func (x *MeasurementProtocolSecret) Reset() { + *x = MeasurementProtocolSecret{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MeasurementProtocolSecret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MeasurementProtocolSecret) ProtoMessage() {} + +func (x *MeasurementProtocolSecret) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MeasurementProtocolSecret.ProtoReflect.Descriptor instead. +func (*MeasurementProtocolSecret) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{11} +} + +func (x *MeasurementProtocolSecret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MeasurementProtocolSecret) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *MeasurementProtocolSecret) GetSecretValue() string { + if x != nil { + return x.SecretValue + } + return "" +} + +// A set of changes within a Google Analytics account or its child properties +// that resulted from the same cause. Common causes would be updates made in the +// Google Analytics UI, changes from customer support, or automatic Google +// Analytics system changes. +type ChangeHistoryEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of this change history event. This ID is unique across Google Analytics. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Time when change was made. + ChangeTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=change_time,json=changeTime,proto3" json:"change_time,omitempty"` + // The type of actor that made this change. + ActorType ActorType `protobuf:"varint,3,opt,name=actor_type,json=actorType,proto3,enum=google.analytics.admin.v1alpha.ActorType" json:"actor_type,omitempty"` + // Email address of the Google account that made the change. This will be a + // valid email address if the actor field is set to USER, and empty otherwise. + // Google accounts that have been deleted will cause an error. + UserActorEmail string `protobuf:"bytes,4,opt,name=user_actor_email,json=userActorEmail,proto3" json:"user_actor_email,omitempty"` + // If true, then the list of changes returned was filtered, and does not + // represent all changes that occurred in this event. + ChangesFiltered bool `protobuf:"varint,5,opt,name=changes_filtered,json=changesFiltered,proto3" json:"changes_filtered,omitempty"` + // A list of changes made in this change history event that fit the filters + // specified in SearchChangeHistoryEventsRequest. + Changes []*ChangeHistoryChange `protobuf:"bytes,6,rep,name=changes,proto3" json:"changes,omitempty"` +} + +func (x *ChangeHistoryEvent) Reset() { + *x = ChangeHistoryEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeHistoryEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeHistoryEvent) ProtoMessage() {} + +func (x *ChangeHistoryEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeHistoryEvent.ProtoReflect.Descriptor instead. +func (*ChangeHistoryEvent) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{12} +} + +func (x *ChangeHistoryEvent) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangeHistoryEvent) GetChangeTime() *timestamppb.Timestamp { + if x != nil { + return x.ChangeTime + } + return nil +} + +func (x *ChangeHistoryEvent) GetActorType() ActorType { + if x != nil { + return x.ActorType + } + return ActorType_ACTOR_TYPE_UNSPECIFIED +} + +func (x *ChangeHistoryEvent) GetUserActorEmail() string { + if x != nil { + return x.UserActorEmail + } + return "" +} + +func (x *ChangeHistoryEvent) GetChangesFiltered() bool { + if x != nil { + return x.ChangesFiltered + } + return false +} + +func (x *ChangeHistoryEvent) GetChanges() []*ChangeHistoryChange { + if x != nil { + return x.Changes + } + return nil +} + +// A description of a change to a single Google Analytics resource. +type ChangeHistoryChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Resource name of the resource whose changes are described by this entry. + Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The type of action that changed this resource. + Action ActionType `protobuf:"varint,2,opt,name=action,proto3,enum=google.analytics.admin.v1alpha.ActionType" json:"action,omitempty"` + // Resource contents from before the change was made. If this resource was + // created in this change, this field will be missing. + ResourceBeforeChange *ChangeHistoryChange_ChangeHistoryResource `protobuf:"bytes,3,opt,name=resource_before_change,json=resourceBeforeChange,proto3" json:"resource_before_change,omitempty"` + // Resource contents from after the change was made. If this resource was + // deleted in this change, this field will be missing. + ResourceAfterChange *ChangeHistoryChange_ChangeHistoryResource `protobuf:"bytes,4,opt,name=resource_after_change,json=resourceAfterChange,proto3" json:"resource_after_change,omitempty"` +} + +func (x *ChangeHistoryChange) Reset() { + *x = ChangeHistoryChange{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeHistoryChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeHistoryChange) ProtoMessage() {} + +func (x *ChangeHistoryChange) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeHistoryChange.ProtoReflect.Descriptor instead. +func (*ChangeHistoryChange) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{13} +} + +func (x *ChangeHistoryChange) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *ChangeHistoryChange) GetAction() ActionType { + if x != nil { + return x.Action + } + return ActionType_ACTION_TYPE_UNSPECIFIED +} + +func (x *ChangeHistoryChange) GetResourceBeforeChange() *ChangeHistoryChange_ChangeHistoryResource { + if x != nil { + return x.ResourceBeforeChange + } + return nil +} + +func (x *ChangeHistoryChange) GetResourceAfterChange() *ChangeHistoryChange_ChangeHistoryResource { + if x != nil { + return x.ResourceAfterChange + } + return nil +} + +// A link between a GA4 property and a Display & Video 360 advertiser. +type DisplayVideo360AdvertiserLink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name for this DisplayVideo360AdvertiserLink resource. + // Format: properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} + // + // Note: linkId is not the Display & Video 360 Advertiser ID + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. The Display & Video 360 Advertiser's advertiser ID. + AdvertiserId string `protobuf:"bytes,2,opt,name=advertiser_id,json=advertiserId,proto3" json:"advertiser_id,omitempty"` + // Output only. The display name of the Display & Video 360 Advertiser. + AdvertiserDisplayName string `protobuf:"bytes,3,opt,name=advertiser_display_name,json=advertiserDisplayName,proto3" json:"advertiser_display_name,omitempty"` + // Enables personalized advertising features with this integration. + // If this field is not set on create/update, it will be defaulted to true. + AdsPersonalizationEnabled *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=ads_personalization_enabled,json=adsPersonalizationEnabled,proto3" json:"ads_personalization_enabled,omitempty"` + // Immutable. Enables the import of campaign data from Display & Video 360 into the GA4 + // property. After link creation, this can only be updated from the Display & + // Video 360 product. + // If this field is not set on create, it will be defaulted to true. + CampaignDataSharingEnabled *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=campaign_data_sharing_enabled,json=campaignDataSharingEnabled,proto3" json:"campaign_data_sharing_enabled,omitempty"` + // Immutable. Enables the import of cost data from Display & Video 360 into the GA4 + // property. This can only be enabled if campaign_data_sharing_enabled is + // enabled. After link creation, this can only be updated from the Display & + // Video 360 product. + // If this field is not set on create, it will be defaulted to true. + CostDataSharingEnabled *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=cost_data_sharing_enabled,json=costDataSharingEnabled,proto3" json:"cost_data_sharing_enabled,omitempty"` +} + +func (x *DisplayVideo360AdvertiserLink) Reset() { + *x = DisplayVideo360AdvertiserLink{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisplayVideo360AdvertiserLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisplayVideo360AdvertiserLink) ProtoMessage() {} + +func (x *DisplayVideo360AdvertiserLink) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisplayVideo360AdvertiserLink.ProtoReflect.Descriptor instead. +func (*DisplayVideo360AdvertiserLink) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{14} +} + +func (x *DisplayVideo360AdvertiserLink) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DisplayVideo360AdvertiserLink) GetAdvertiserId() string { + if x != nil { + return x.AdvertiserId + } + return "" +} + +func (x *DisplayVideo360AdvertiserLink) GetAdvertiserDisplayName() string { + if x != nil { + return x.AdvertiserDisplayName + } + return "" +} + +func (x *DisplayVideo360AdvertiserLink) GetAdsPersonalizationEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.AdsPersonalizationEnabled + } + return nil +} + +func (x *DisplayVideo360AdvertiserLink) GetCampaignDataSharingEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.CampaignDataSharingEnabled + } + return nil +} + +func (x *DisplayVideo360AdvertiserLink) GetCostDataSharingEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.CostDataSharingEnabled + } + return nil +} + +// A proposal for a link between a GA4 property and a Display & Video 360 +// advertiser. +// +// A proposal is converted to a DisplayVideo360AdvertiserLink once approved. +// Google Analytics admins approve inbound proposals while Display & Video 360 +// admins approve outbound proposals. +type DisplayVideo360AdvertiserLinkProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name for this DisplayVideo360AdvertiserLinkProposal resource. + // Format: + // properties/{propertyId}/displayVideo360AdvertiserLinkProposals/{proposalId} + // + // Note: proposalId is not the Display & Video 360 Advertiser ID + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. The Display & Video 360 Advertiser's advertiser ID. + AdvertiserId string `protobuf:"bytes,2,opt,name=advertiser_id,json=advertiserId,proto3" json:"advertiser_id,omitempty"` + // Output only. The status information for this link proposal. + LinkProposalStatusDetails *LinkProposalStatusDetails `protobuf:"bytes,3,opt,name=link_proposal_status_details,json=linkProposalStatusDetails,proto3" json:"link_proposal_status_details,omitempty"` + // Output only. The display name of the Display & Video Advertiser. + // Only populated for proposals that originated from Display & Video 360. + AdvertiserDisplayName string `protobuf:"bytes,4,opt,name=advertiser_display_name,json=advertiserDisplayName,proto3" json:"advertiser_display_name,omitempty"` + // Input only. On a proposal being sent to Display & Video 360, this field must be set to + // the email address of an admin on the target advertiser. This is used to + // verify that the Google Analytics admin is aware of at least one admin on + // the Display & Video 360 Advertiser. This does not restrict approval of the + // proposal to a single user. Any admin on the Display & Video 360 Advertiser + // may approve the proposal. + ValidationEmail string `protobuf:"bytes,5,opt,name=validation_email,json=validationEmail,proto3" json:"validation_email,omitempty"` + // Immutable. Enables personalized advertising features with this integration. + // If this field is not set on create, it will be defaulted to true. + AdsPersonalizationEnabled *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=ads_personalization_enabled,json=adsPersonalizationEnabled,proto3" json:"ads_personalization_enabled,omitempty"` + // Immutable. Enables the import of campaign data from Display & Video 360. + // If this field is not set on create, it will be defaulted to true. + CampaignDataSharingEnabled *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=campaign_data_sharing_enabled,json=campaignDataSharingEnabled,proto3" json:"campaign_data_sharing_enabled,omitempty"` + // Immutable. Enables the import of cost data from Display & Video 360. + // This can only be enabled if campaign_data_sharing_enabled is enabled. + // If this field is not set on create, it will be defaulted to true. + CostDataSharingEnabled *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=cost_data_sharing_enabled,json=costDataSharingEnabled,proto3" json:"cost_data_sharing_enabled,omitempty"` +} + +func (x *DisplayVideo360AdvertiserLinkProposal) Reset() { + *x = DisplayVideo360AdvertiserLinkProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisplayVideo360AdvertiserLinkProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisplayVideo360AdvertiserLinkProposal) ProtoMessage() {} + +func (x *DisplayVideo360AdvertiserLinkProposal) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisplayVideo360AdvertiserLinkProposal.ProtoReflect.Descriptor instead. +func (*DisplayVideo360AdvertiserLinkProposal) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{15} +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetAdvertiserId() string { + if x != nil { + return x.AdvertiserId + } + return "" +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetLinkProposalStatusDetails() *LinkProposalStatusDetails { + if x != nil { + return x.LinkProposalStatusDetails + } + return nil +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetAdvertiserDisplayName() string { + if x != nil { + return x.AdvertiserDisplayName + } + return "" +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetValidationEmail() string { + if x != nil { + return x.ValidationEmail + } + return "" +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetAdsPersonalizationEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.AdsPersonalizationEnabled + } + return nil +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetCampaignDataSharingEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.CampaignDataSharingEnabled + } + return nil +} + +func (x *DisplayVideo360AdvertiserLinkProposal) GetCostDataSharingEnabled() *wrapperspb.BoolValue { + if x != nil { + return x.CostDataSharingEnabled + } + return nil +} + +// Status information for a link proposal. +type LinkProposalStatusDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The source of this proposal. + LinkProposalInitiatingProduct LinkProposalInitiatingProduct `protobuf:"varint,1,opt,name=link_proposal_initiating_product,json=linkProposalInitiatingProduct,proto3,enum=google.analytics.admin.v1alpha.LinkProposalInitiatingProduct" json:"link_proposal_initiating_product,omitempty"` + // Output only. The email address of the user that proposed this linkage. + RequestorEmail string `protobuf:"bytes,2,opt,name=requestor_email,json=requestorEmail,proto3" json:"requestor_email,omitempty"` + // Output only. The state of this proposal. + LinkProposalState LinkProposalState `protobuf:"varint,3,opt,name=link_proposal_state,json=linkProposalState,proto3,enum=google.analytics.admin.v1alpha.LinkProposalState" json:"link_proposal_state,omitempty"` +} + +func (x *LinkProposalStatusDetails) Reset() { + *x = LinkProposalStatusDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LinkProposalStatusDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkProposalStatusDetails) ProtoMessage() {} + +func (x *LinkProposalStatusDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LinkProposalStatusDetails.ProtoReflect.Descriptor instead. +func (*LinkProposalStatusDetails) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{16} +} + +func (x *LinkProposalStatusDetails) GetLinkProposalInitiatingProduct() LinkProposalInitiatingProduct { + if x != nil { + return x.LinkProposalInitiatingProduct + } + return LinkProposalInitiatingProduct_LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED +} + +func (x *LinkProposalStatusDetails) GetRequestorEmail() string { + if x != nil { + return x.RequestorEmail + } + return "" +} + +func (x *LinkProposalStatusDetails) GetLinkProposalState() LinkProposalState { + if x != nil { + return x.LinkProposalState + } + return LinkProposalState_LINK_PROPOSAL_STATE_UNSPECIFIED +} + +// A conversion event in a Google Analytics property. +type ConversionEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this conversion event. + // Format: properties/{property}/conversionEvents/{conversion_event} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. The event name for this conversion event. + // Examples: 'click', 'purchase' + EventName string `protobuf:"bytes,2,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` + // Output only. Time when this conversion event was created in the property. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. If set, this event can currently be deleted via DeleteConversionEvent. + Deletable bool `protobuf:"varint,4,opt,name=deletable,proto3" json:"deletable,omitempty"` + // Output only. If set to true, this conversion event refers to a custom event. If set to + // false, this conversion event refers to a default event in GA. Default + // events typically have special meaning in GA. Default events are usually + // created for you by the GA system, but in some cases can be created by + // property admins. Custom events count towards the maximum number of + // custom conversion events that may be created per property. + Custom bool `protobuf:"varint,5,opt,name=custom,proto3" json:"custom,omitempty"` +} + +func (x *ConversionEvent) Reset() { + *x = ConversionEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConversionEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConversionEvent) ProtoMessage() {} + +func (x *ConversionEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConversionEvent.ProtoReflect.Descriptor instead. +func (*ConversionEvent) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{17} +} + +func (x *ConversionEvent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ConversionEvent) GetEventName() string { + if x != nil { + return x.EventName + } + return "" +} + +func (x *ConversionEvent) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ConversionEvent) GetDeletable() bool { + if x != nil { + return x.Deletable + } + return false +} + +func (x *ConversionEvent) GetCustom() bool { + if x != nil { + return x.Custom + } + return false +} + +// Settings values for Google Signals. This is a singleton resource. +type GoogleSignalsSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this setting. + // Format: properties/{property_id}/googleSignalsSettings + // Example: "properties/1000/googleSignalsSettings" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Status of this setting. + State GoogleSignalsState `protobuf:"varint,3,opt,name=state,proto3,enum=google.analytics.admin.v1alpha.GoogleSignalsState" json:"state,omitempty"` + // Output only. Terms of Service acceptance. + Consent GoogleSignalsConsent `protobuf:"varint,4,opt,name=consent,proto3,enum=google.analytics.admin.v1alpha.GoogleSignalsConsent" json:"consent,omitempty"` +} + +func (x *GoogleSignalsSettings) Reset() { + *x = GoogleSignalsSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoogleSignalsSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoogleSignalsSettings) ProtoMessage() {} + +func (x *GoogleSignalsSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoogleSignalsSettings.ProtoReflect.Descriptor instead. +func (*GoogleSignalsSettings) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{18} +} + +func (x *GoogleSignalsSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GoogleSignalsSettings) GetState() GoogleSignalsState { + if x != nil { + return x.State + } + return GoogleSignalsState_GOOGLE_SIGNALS_STATE_UNSPECIFIED +} + +func (x *GoogleSignalsSettings) GetConsent() GoogleSignalsConsent { + if x != nil { + return x.Consent + } + return GoogleSignalsConsent_GOOGLE_SIGNALS_CONSENT_UNSPECIFIED +} + +// A definition for a CustomDimension. +type CustomDimension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name for this CustomDimension resource. + // Format: properties/{property}/customDimensions/{customDimension} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Immutable. Tagging parameter name for this custom dimension. + // + // If this is a user-scoped dimension, then this is the user property name. + // If this is an event-scoped dimension, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore characters, starting with a + // letter. Max length of 24 characters for user-scoped dimensions, 40 + // characters for event-scoped dimensions. + ParameterName string `protobuf:"bytes,2,opt,name=parameter_name,json=parameterName,proto3" json:"parameter_name,omitempty"` + // Required. Display name for this custom dimension as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. Description for this custom dimension. Max length of 150 characters. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // Required. Immutable. The scope of this dimension. + Scope CustomDimension_DimensionScope `protobuf:"varint,5,opt,name=scope,proto3,enum=google.analytics.admin.v1alpha.CustomDimension_DimensionScope" json:"scope,omitempty"` + // Optional. If set to true, sets this dimension as NPA and excludes it from ads + // personalization. + // + // This is currently only supported by user-scoped custom dimensions. + DisallowAdsPersonalization bool `protobuf:"varint,6,opt,name=disallow_ads_personalization,json=disallowAdsPersonalization,proto3" json:"disallow_ads_personalization,omitempty"` +} + +func (x *CustomDimension) Reset() { + *x = CustomDimension{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomDimension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomDimension) ProtoMessage() {} + +func (x *CustomDimension) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomDimension.ProtoReflect.Descriptor instead. +func (*CustomDimension) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{19} +} + +func (x *CustomDimension) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CustomDimension) GetParameterName() string { + if x != nil { + return x.ParameterName + } + return "" +} + +func (x *CustomDimension) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *CustomDimension) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CustomDimension) GetScope() CustomDimension_DimensionScope { + if x != nil { + return x.Scope + } + return CustomDimension_DIMENSION_SCOPE_UNSPECIFIED +} + +func (x *CustomDimension) GetDisallowAdsPersonalization() bool { + if x != nil { + return x.DisallowAdsPersonalization + } + return false +} + +// A definition for a custom metric. +type CustomMetric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name for this CustomMetric resource. + // Format: properties/{property}/customMetrics/{customMetric} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Immutable. Tagging name for this custom metric. + // + // If this is an event-scoped metric, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore charactes, starting with a + // letter. Max length of 40 characters for event-scoped metrics. + ParameterName string `protobuf:"bytes,2,opt,name=parameter_name,json=parameterName,proto3" json:"parameter_name,omitempty"` + // Required. Display name for this custom metric as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. Description for this custom dimension. + // Max length of 150 characters. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // Required. The type for the custom metric's value. + MeasurementUnit CustomMetric_MeasurementUnit `protobuf:"varint,5,opt,name=measurement_unit,json=measurementUnit,proto3,enum=google.analytics.admin.v1alpha.CustomMetric_MeasurementUnit" json:"measurement_unit,omitempty"` + // Required. Immutable. The scope of this custom metric. + Scope CustomMetric_MetricScope `protobuf:"varint,6,opt,name=scope,proto3,enum=google.analytics.admin.v1alpha.CustomMetric_MetricScope" json:"scope,omitempty"` + // Optional. Types of restricted data that this metric may contain. Required for metrics + // with CURRENCY measurement unit. Must be empty for metrics with a + // non-CURRENCY measurement unit. + RestrictedMetricType []CustomMetric_RestrictedMetricType `protobuf:"varint,8,rep,packed,name=restricted_metric_type,json=restrictedMetricType,proto3,enum=google.analytics.admin.v1alpha.CustomMetric_RestrictedMetricType" json:"restricted_metric_type,omitempty"` +} + +func (x *CustomMetric) Reset() { + *x = CustomMetric{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomMetric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomMetric) ProtoMessage() {} + +func (x *CustomMetric) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomMetric.ProtoReflect.Descriptor instead. +func (*CustomMetric) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{20} +} + +func (x *CustomMetric) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CustomMetric) GetParameterName() string { + if x != nil { + return x.ParameterName + } + return "" +} + +func (x *CustomMetric) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *CustomMetric) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CustomMetric) GetMeasurementUnit() CustomMetric_MeasurementUnit { + if x != nil { + return x.MeasurementUnit + } + return CustomMetric_MEASUREMENT_UNIT_UNSPECIFIED +} + +func (x *CustomMetric) GetScope() CustomMetric_MetricScope { + if x != nil { + return x.Scope + } + return CustomMetric_METRIC_SCOPE_UNSPECIFIED +} + +func (x *CustomMetric) GetRestrictedMetricType() []CustomMetric_RestrictedMetricType { + if x != nil { + return x.RestrictedMetricType + } + return nil +} + +// Settings values for data retention. This is a singleton resource. +type DataRetentionSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name for this DataRetentionSetting resource. + // Format: properties/{property}/dataRetentionSettings + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The length of time that event-level data is retained. + EventDataRetention DataRetentionSettings_RetentionDuration `protobuf:"varint,2,opt,name=event_data_retention,json=eventDataRetention,proto3,enum=google.analytics.admin.v1alpha.DataRetentionSettings_RetentionDuration" json:"event_data_retention,omitempty"` + // If true, reset the retention period for the user identifier with every + // event from that user. + ResetUserDataOnNewActivity bool `protobuf:"varint,3,opt,name=reset_user_data_on_new_activity,json=resetUserDataOnNewActivity,proto3" json:"reset_user_data_on_new_activity,omitempty"` +} + +func (x *DataRetentionSettings) Reset() { + *x = DataRetentionSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataRetentionSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataRetentionSettings) ProtoMessage() {} + +func (x *DataRetentionSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataRetentionSettings.ProtoReflect.Descriptor instead. +func (*DataRetentionSettings) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{21} +} + +func (x *DataRetentionSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DataRetentionSettings) GetEventDataRetention() DataRetentionSettings_RetentionDuration { + if x != nil { + return x.EventDataRetention + } + return DataRetentionSettings_RETENTION_DURATION_UNSPECIFIED +} + +func (x *DataRetentionSettings) GetResetUserDataOnNewActivity() bool { + if x != nil { + return x.ResetUserDataOnNewActivity + } + return false +} + +// The attribution settings used for a given property. This is a singleton +// resource. +type AttributionSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this attribution settings resource. + // Format: properties/{property_id}/attributionSettings + // Example: "properties/1000/attributionSettings" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The lookback window configuration for acquisition conversion events. + // The default window size is 30 days. + AcquisitionConversionEventLookbackWindow AttributionSettings_AcquisitionConversionEventLookbackWindow `protobuf:"varint,2,opt,name=acquisition_conversion_event_lookback_window,json=acquisitionConversionEventLookbackWindow,proto3,enum=google.analytics.admin.v1alpha.AttributionSettings_AcquisitionConversionEventLookbackWindow" json:"acquisition_conversion_event_lookback_window,omitempty"` + // Required. The lookback window for all other, non-acquisition conversion events. + // The default window size is 90 days. + OtherConversionEventLookbackWindow AttributionSettings_OtherConversionEventLookbackWindow `protobuf:"varint,3,opt,name=other_conversion_event_lookback_window,json=otherConversionEventLookbackWindow,proto3,enum=google.analytics.admin.v1alpha.AttributionSettings_OtherConversionEventLookbackWindow" json:"other_conversion_event_lookback_window,omitempty"` + // Required. The reporting attribution model used to calculate conversion credit in this + // property's reports. + // + // Changing the attribution model will apply to both historical and future + // data. These changes will be reflected in reports with conversion and + // revenue data. User and session data will be unaffected. + ReportingAttributionModel AttributionSettings_ReportingAttributionModel `protobuf:"varint,4,opt,name=reporting_attribution_model,json=reportingAttributionModel,proto3,enum=google.analytics.admin.v1alpha.AttributionSettings_ReportingAttributionModel" json:"reporting_attribution_model,omitempty"` +} + +func (x *AttributionSettings) Reset() { + *x = AttributionSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributionSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributionSettings) ProtoMessage() {} + +func (x *AttributionSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttributionSettings.ProtoReflect.Descriptor instead. +func (*AttributionSettings) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{22} +} + +func (x *AttributionSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AttributionSettings) GetAcquisitionConversionEventLookbackWindow() AttributionSettings_AcquisitionConversionEventLookbackWindow { + if x != nil { + return x.AcquisitionConversionEventLookbackWindow + } + return AttributionSettings_ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED +} + +func (x *AttributionSettings) GetOtherConversionEventLookbackWindow() AttributionSettings_OtherConversionEventLookbackWindow { + if x != nil { + return x.OtherConversionEventLookbackWindow + } + return AttributionSettings_OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED +} + +func (x *AttributionSettings) GetReportingAttributionModel() AttributionSettings_ReportingAttributionModel { + if x != nil { + return x.ReportingAttributionModel + } + return AttributionSettings_REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED +} + +// Data specific to web streams. +type DataStream_WebStreamData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // Example: "G-1A2BCD345E" would just be "1A2BCD345E" + MeasurementId string `protobuf:"bytes,1,opt,name=measurement_id,json=measurementId,proto3" json:"measurement_id,omitempty"` + // Output only. ID of the corresponding web app in Firebase, if any. + // This ID can change if the web app is deleted and recreated. + FirebaseAppId string `protobuf:"bytes,2,opt,name=firebase_app_id,json=firebaseAppId,proto3" json:"firebase_app_id,omitempty"` + // Immutable. Domain name of the web app being measured, or empty. + // Example: "http://www.google.com", "https://www.google.com" + DefaultUri string `protobuf:"bytes,3,opt,name=default_uri,json=defaultUri,proto3" json:"default_uri,omitempty"` +} + +func (x *DataStream_WebStreamData) Reset() { + *x = DataStream_WebStreamData{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataStream_WebStreamData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataStream_WebStreamData) ProtoMessage() {} + +func (x *DataStream_WebStreamData) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataStream_WebStreamData.ProtoReflect.Descriptor instead. +func (*DataStream_WebStreamData) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *DataStream_WebStreamData) GetMeasurementId() string { + if x != nil { + return x.MeasurementId + } + return "" +} + +func (x *DataStream_WebStreamData) GetFirebaseAppId() string { + if x != nil { + return x.FirebaseAppId + } + return "" +} + +func (x *DataStream_WebStreamData) GetDefaultUri() string { + if x != nil { + return x.DefaultUri + } + return "" +} + +// Data specific to Android app streams. +type DataStream_AndroidAppStreamData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. ID of the corresponding Android app in Firebase, if any. + // This ID can change if the Android app is deleted and recreated. + FirebaseAppId string `protobuf:"bytes,1,opt,name=firebase_app_id,json=firebaseAppId,proto3" json:"firebase_app_id,omitempty"` + // Immutable. The package name for the app being measured. + // Example: "com.example.myandroidapp" + PackageName string `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` +} + +func (x *DataStream_AndroidAppStreamData) Reset() { + *x = DataStream_AndroidAppStreamData{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataStream_AndroidAppStreamData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataStream_AndroidAppStreamData) ProtoMessage() {} + +func (x *DataStream_AndroidAppStreamData) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataStream_AndroidAppStreamData.ProtoReflect.Descriptor instead. +func (*DataStream_AndroidAppStreamData) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *DataStream_AndroidAppStreamData) GetFirebaseAppId() string { + if x != nil { + return x.FirebaseAppId + } + return "" +} + +func (x *DataStream_AndroidAppStreamData) GetPackageName() string { + if x != nil { + return x.PackageName + } + return "" +} + +// Data specific to iOS app streams. +type DataStream_IosAppStreamData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. ID of the corresponding iOS app in Firebase, if any. + // This ID can change if the iOS app is deleted and recreated. + FirebaseAppId string `protobuf:"bytes,1,opt,name=firebase_app_id,json=firebaseAppId,proto3" json:"firebase_app_id,omitempty"` + // Required. Immutable. The Apple App Store Bundle ID for the app + // Example: "com.example.myiosapp" + BundleId string `protobuf:"bytes,2,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` +} + +func (x *DataStream_IosAppStreamData) Reset() { + *x = DataStream_IosAppStreamData{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataStream_IosAppStreamData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataStream_IosAppStreamData) ProtoMessage() {} + +func (x *DataStream_IosAppStreamData) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataStream_IosAppStreamData.ProtoReflect.Descriptor instead. +func (*DataStream_IosAppStreamData) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{2, 2} +} + +func (x *DataStream_IosAppStreamData) GetFirebaseAppId() string { + if x != nil { + return x.FirebaseAppId + } + return "" +} + +func (x *DataStream_IosAppStreamData) GetBundleId() string { + if x != nil { + return x.BundleId + } + return "" +} + +// A snapshot of a resource as before or after the result of a change in +// change history. +type ChangeHistoryChange_ChangeHistoryResource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Resource: + // + // *ChangeHistoryChange_ChangeHistoryResource_Account + // *ChangeHistoryChange_ChangeHistoryResource_Property + // *ChangeHistoryChange_ChangeHistoryResource_FirebaseLink + // *ChangeHistoryChange_ChangeHistoryResource_GoogleAdsLink + // *ChangeHistoryChange_ChangeHistoryResource_GoogleSignalsSettings + // *ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLink + // *ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLinkProposal + // *ChangeHistoryChange_ChangeHistoryResource_ConversionEvent + // *ChangeHistoryChange_ChangeHistoryResource_MeasurementProtocolSecret + // *ChangeHistoryChange_ChangeHistoryResource_CustomDimension + // *ChangeHistoryChange_ChangeHistoryResource_CustomMetric + // *ChangeHistoryChange_ChangeHistoryResource_DataRetentionSettings + // *ChangeHistoryChange_ChangeHistoryResource_DataStream + // *ChangeHistoryChange_ChangeHistoryResource_AttributionSettings + Resource isChangeHistoryChange_ChangeHistoryResource_Resource `protobuf_oneof:"resource"` +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) Reset() { + *x = ChangeHistoryChange_ChangeHistoryResource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeHistoryChange_ChangeHistoryResource) ProtoMessage() {} + +func (x *ChangeHistoryChange_ChangeHistoryResource) ProtoReflect() protoreflect.Message { + mi := &file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeHistoryChange_ChangeHistoryResource.ProtoReflect.Descriptor instead. +func (*ChangeHistoryChange_ChangeHistoryResource) Descriptor() ([]byte, []int) { + return file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP(), []int{13, 0} +} + +func (m *ChangeHistoryChange_ChangeHistoryResource) GetResource() isChangeHistoryChange_ChangeHistoryResource_Resource { + if m != nil { + return m.Resource + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetAccount() *Account { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_Account); ok { + return x.Account + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetProperty() *Property { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_Property); ok { + return x.Property + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetFirebaseLink() *FirebaseLink { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_FirebaseLink); ok { + return x.FirebaseLink + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetGoogleAdsLink() *GoogleAdsLink { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_GoogleAdsLink); ok { + return x.GoogleAdsLink + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetGoogleSignalsSettings() *GoogleSignalsSettings { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_GoogleSignalsSettings); ok { + return x.GoogleSignalsSettings + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetDisplayVideo_360AdvertiserLink() *DisplayVideo360AdvertiserLink { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLink); ok { + return x.DisplayVideo_360AdvertiserLink + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetDisplayVideo_360AdvertiserLinkProposal() *DisplayVideo360AdvertiserLinkProposal { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLinkProposal); ok { + return x.DisplayVideo_360AdvertiserLinkProposal + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetConversionEvent() *ConversionEvent { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_ConversionEvent); ok { + return x.ConversionEvent + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetMeasurementProtocolSecret() *MeasurementProtocolSecret { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_MeasurementProtocolSecret); ok { + return x.MeasurementProtocolSecret + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetCustomDimension() *CustomDimension { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_CustomDimension); ok { + return x.CustomDimension + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetCustomMetric() *CustomMetric { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_CustomMetric); ok { + return x.CustomMetric + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetDataRetentionSettings() *DataRetentionSettings { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_DataRetentionSettings); ok { + return x.DataRetentionSettings + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetDataStream() *DataStream { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_DataStream); ok { + return x.DataStream + } + return nil +} + +func (x *ChangeHistoryChange_ChangeHistoryResource) GetAttributionSettings() *AttributionSettings { + if x, ok := x.GetResource().(*ChangeHistoryChange_ChangeHistoryResource_AttributionSettings); ok { + return x.AttributionSettings + } + return nil +} + +type isChangeHistoryChange_ChangeHistoryResource_Resource interface { + isChangeHistoryChange_ChangeHistoryResource_Resource() +} + +type ChangeHistoryChange_ChangeHistoryResource_Account struct { + // A snapshot of an Account resource in change history. + Account *Account `protobuf:"bytes,1,opt,name=account,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_Property struct { + // A snapshot of a Property resource in change history. + Property *Property `protobuf:"bytes,2,opt,name=property,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_FirebaseLink struct { + // A snapshot of a FirebaseLink resource in change history. + FirebaseLink *FirebaseLink `protobuf:"bytes,6,opt,name=firebase_link,json=firebaseLink,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_GoogleAdsLink struct { + // A snapshot of a GoogleAdsLink resource in change history. + GoogleAdsLink *GoogleAdsLink `protobuf:"bytes,7,opt,name=google_ads_link,json=googleAdsLink,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_GoogleSignalsSettings struct { + // A snapshot of a GoogleSignalsSettings resource in change history. + GoogleSignalsSettings *GoogleSignalsSettings `protobuf:"bytes,8,opt,name=google_signals_settings,json=googleSignalsSettings,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLink struct { + // A snapshot of a DisplayVideo360AdvertiserLink resource in change + // history. + DisplayVideo_360AdvertiserLink *DisplayVideo360AdvertiserLink `protobuf:"bytes,9,opt,name=display_video_360_advertiser_link,json=displayVideo360AdvertiserLink,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLinkProposal struct { + // A snapshot of a DisplayVideo360AdvertiserLinkProposal resource in + // change history. + DisplayVideo_360AdvertiserLinkProposal *DisplayVideo360AdvertiserLinkProposal `protobuf:"bytes,10,opt,name=display_video_360_advertiser_link_proposal,json=displayVideo360AdvertiserLinkProposal,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_ConversionEvent struct { + // A snapshot of a ConversionEvent resource in change history. + ConversionEvent *ConversionEvent `protobuf:"bytes,11,opt,name=conversion_event,json=conversionEvent,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_MeasurementProtocolSecret struct { + // A snapshot of a MeasurementProtocolSecret resource in change history. + MeasurementProtocolSecret *MeasurementProtocolSecret `protobuf:"bytes,12,opt,name=measurement_protocol_secret,json=measurementProtocolSecret,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_CustomDimension struct { + // A snapshot of a CustomDimension resource in change history. + CustomDimension *CustomDimension `protobuf:"bytes,13,opt,name=custom_dimension,json=customDimension,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_CustomMetric struct { + // A snapshot of a CustomMetric resource in change history. + CustomMetric *CustomMetric `protobuf:"bytes,14,opt,name=custom_metric,json=customMetric,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_DataRetentionSettings struct { + // A snapshot of a data retention settings resource in change history. + DataRetentionSettings *DataRetentionSettings `protobuf:"bytes,15,opt,name=data_retention_settings,json=dataRetentionSettings,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_DataStream struct { + // A snapshot of a DataStream resource in change history. + DataStream *DataStream `protobuf:"bytes,18,opt,name=data_stream,json=dataStream,proto3,oneof"` +} + +type ChangeHistoryChange_ChangeHistoryResource_AttributionSettings struct { + // A snapshot of AttributionSettings resource in change history. + AttributionSettings *AttributionSettings `protobuf:"bytes,20,opt,name=attribution_settings,json=attributionSettings,proto3,oneof"` +} + +func (*ChangeHistoryChange_ChangeHistoryResource_Account) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_Property) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_FirebaseLink) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_GoogleAdsLink) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_GoogleSignalsSettings) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLink) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLinkProposal) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_ConversionEvent) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_MeasurementProtocolSecret) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_CustomDimension) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_CustomMetric) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_DataRetentionSettings) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_DataStream) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +func (*ChangeHistoryChange_ChangeHistoryResource_AttributionSettings) isChangeHistoryChange_ChangeHistoryResource_Resource() { +} + +var File_google_analytics_admin_v1alpha_resources_proto protoreflect.FileDescriptor + +var file_google_analytics_admin_v1alpha_resources_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x02, + 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x3a, 0x3e, + 0xea, 0x41, 0x3b, 0x0a, 0x25, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x22, 0xd3, + 0x06, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0c, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, + 0x79, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x52, 0x10, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x43, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x74, 0x69, + 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x05, 0xfa, 0x41, 0x27, + 0x0a, 0x25, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x3a, 0x42, 0xea, 0x41, 0x3f, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x15, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x7d, 0x22, 0xc1, 0x09, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x62, 0x0a, 0x0f, 0x77, 0x65, 0x62, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x57, 0x65, 0x62, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x78, 0x0a, 0x17, 0x61, 0x6e, 0x64, 0x72, 0x6f, + 0x69, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x41, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x41, 0x70, 0x70, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x61, 0x6e, 0x64, + 0x72, 0x6f, 0x69, 0x64, 0x41, 0x70, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x6c, 0x0a, 0x13, 0x69, 0x6f, 0x73, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x49, 0x6f, 0x73, 0x41, 0x70, + 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x10, 0x69, + 0x6f, 0x73, 0x41, 0x70, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x06, 0xe0, 0x41, 0x05, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x8e, 0x01, 0x0a, 0x0d, 0x57, 0x65, 0x62, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x0e, 0x6d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0d, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x41, 0x70, 0x70, 0x49, + 0x64, 0x12, 0x24, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x55, 0x72, 0x69, 0x1a, 0x6b, 0x0a, 0x14, 0x41, 0x6e, 0x64, 0x72, 0x6f, + 0x69, 0x64, 0x41, 0x70, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x2b, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x70, 0x70, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x66, + 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0c, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x64, 0x0a, 0x10, 0x49, 0x6f, 0x73, 0x41, 0x70, 0x70, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, + 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x05, 0xe0, 0x41, 0x02, + 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x0e, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, + 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x57, 0x45, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, + 0x4d, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x4e, 0x44, 0x52, 0x4f, 0x49, 0x44, 0x5f, 0x41, + 0x50, 0x50, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x02, + 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4f, 0x53, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x41, 0x54, 0x41, + 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x03, 0x3a, 0x5e, 0xea, 0x41, 0x5b, 0x0a, 0x28, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf5, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, + 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x82, 0x01, 0xea, 0x41, + 0x7f, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x28, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, + 0x6e, 0x6b, 0x7d, 0x12, 0x2b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x7d, + 0x22, 0x94, 0x01, 0x0a, 0x0d, 0x41, 0x75, 0x64, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x27, + 0x0a, 0x0f, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x72, 0x65, + 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x3a, 0x64, 0xea, 0x41, 0x61, 0x0a, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0x33, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x62, + 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x7b, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, + 0x73, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x7d, 0x22, 0xb8, 0x01, 0x0a, 0x0d, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x07, 0x73, 0x6e, 0x69, 0x70, 0x70, + 0x65, 0x74, 0x3a, 0x6f, 0xea, 0x41, 0x6c, 0x0a, 0x2b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x12, 0x3d, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x7d, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x69, 0x74, 0x65, + 0x54, 0x61, 0x67, 0x22, 0x84, 0x04, 0x0a, 0x0d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, + 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, + 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x12, 0x63, 0x61, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x63, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x1b, 0x61, 0x64, 0x73, 0x5f, 0x70, + 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x19, 0x61, 0x64, 0x73, 0x50, 0x65, 0x72, + 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x13, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x68, 0xea, 0x41, 0x65, 0x0a, 0x2b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x4c, 0x69, + 0x6e, 0x6b, 0x12, 0x36, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x7b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x7d, 0x22, 0x97, 0x04, 0x0a, 0x13, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x73, + 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, + 0x67, 0x57, 0x69, 0x74, 0x68, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x59, 0x0a, 0x2a, 0x73, 0x68, 0x61, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x6c, 0x65, 0x73, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x25, 0x73, + 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x4f, 0x0a, 0x25, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x5f, + 0x73, 0x61, 0x6c, 0x65, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x20, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x6e, 0x79, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x24, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x20, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x1b, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x73, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x5e, 0xea, 0x41, 0x5b, 0x0a, 0x31, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, + 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x26, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0xc4, 0x02, 0x0a, 0x0e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x41, + 0x27, 0x0a, 0x25, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x3a, 0x55, 0xea, 0x41, 0x52, 0x0a, 0x2c, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x7d, 0x22, 0xe8, 0x01, 0x0a, 0x0f, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x47, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2b, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0xae, 0x02, 0x0a, 0x19, 0x4d, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0xa7, 0x01, + 0xea, 0x41, 0xa3, 0x01, 0x0a, 0x37, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x68, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x7d, 0x2f, 0x6d, + 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x6d, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x7d, 0x22, 0xcf, 0x02, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x29, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x07, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xb0, 0x0e, 0x0a, 0x13, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x42, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x7f, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x14, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x7d, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x1a, 0xb8, 0x0b, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x46, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x48, 0x00, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x0d, 0x66, 0x69, 0x72, 0x65, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, + 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, + 0x0c, 0x66, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x57, 0x0a, + 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, + 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, + 0x64, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x6f, 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x00, + 0x52, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x21, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x12, 0xa2, 0x01, 0x0a, 0x2a, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x48, + 0x00, 0x52, 0x25, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, + 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x5c, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x7b, 0x0a, 0x1b, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x00, 0x52, 0x19, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x12, 0x5c, 0x0a, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, + 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x53, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x6f, 0x0a, 0x17, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x00, + 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x68, 0x0a, 0x14, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x00, 0x52, 0x13, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd9, 0x04, 0x0a, + 0x1d, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, + 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x61, 0x64, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x3b, 0x0a, 0x17, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5a, + 0x0a, 0x1b, 0x61, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x19, 0x61, 0x64, 0x73, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x1d, 0x63, 0x61, + 0x6d, 0x70, 0x61, 0x69, 0x67, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x05, 0x52, 0x1a, 0x63, 0x61, 0x6d, 0x70, 0x61, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5a, + 0x0a, 0x19, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x05, 0x52, 0x16, 0x63, 0x6f, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x9b, 0x01, 0xea, 0x41, 0x97, + 0x01, 0x0a, 0x3b, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, + 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x58, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x7b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x7d, 0x22, 0xb0, 0x06, 0x0a, 0x25, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, + 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x61, + 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0c, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x7f, 0x0a, 0x1c, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x6e, + 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x6c, 0x69, 0x6e, + 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x17, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x61, 0x64, + 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x04, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x5f, 0x0a, 0x1b, 0x61, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x19, 0x61, 0x64, 0x73, 0x50, 0x65, + 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x1d, 0x63, 0x61, 0x6d, 0x70, 0x61, 0x69, 0x67, 0x6e, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x1a, 0x63, 0x61, + 0x6d, 0x70, 0x61, 0x69, 0x67, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, + 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5a, 0x0a, 0x19, 0x63, 0x6f, 0x73, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x16, 0x63, 0x6f, + 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x3a, 0xb4, 0x01, 0xea, 0x41, 0xb0, 0x01, 0x0a, 0x43, 0x61, 0x6e, 0x61, + 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x69, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, + 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x33, 0x36, + 0x30, 0x5f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x7d, 0x22, 0xbf, 0x02, 0x0a, 0x19, + 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x20, 0x6c, 0x69, + 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1d, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x2c, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x66, 0x0a, 0x13, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x11, 0x6c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xbf, 0x02, + 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x05, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x3a, 0x6d, 0xea, 0x41, 0x6a, 0x0a, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x7d, 0x22, + 0xb6, 0x02, 0x0a, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, + 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x53, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x74, 0x3a, 0x65, 0xea, 0x41, 0x62, 0x0a, 0x33, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, + 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x7d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x84, 0x04, 0x0a, 0x0f, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, + 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x12, 0x45, 0x0a, 0x1c, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x64, + 0x73, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a, 0x64, 0x69, + 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x64, 0x73, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x0e, 0x44, 0x69, 0x6d, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, + 0x4d, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x02, + 0x3a, 0x6d, 0xea, 0x41, 0x6a, 0x0a, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x22, + 0xa2, 0x07, 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x0e, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6c, 0x0a, 0x10, 0x6d, 0x65, 0x61, 0x73, 0x75, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, + 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x56, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, + 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x42, 0x06, + 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x7c, 0x0a, + 0x16, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x41, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x74, + 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x14, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x0f, + 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x12, + 0x20, 0x0a, 0x1c, 0x4d, 0x45, 0x41, 0x53, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, + 0x4e, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, + 0x04, 0x46, 0x45, 0x45, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x54, 0x45, 0x52, + 0x53, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x49, 0x4c, 0x4f, 0x4d, 0x45, 0x54, 0x45, 0x52, + 0x53, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x49, 0x4c, 0x45, 0x53, 0x10, 0x06, 0x12, 0x10, + 0x0a, 0x0c, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x07, + 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x08, 0x12, 0x0b, 0x0a, + 0x07, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x53, 0x10, 0x09, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x4f, + 0x55, 0x52, 0x53, 0x10, 0x0a, 0x22, 0x36, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x22, 0x5f, 0x0a, + 0x14, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x52, 0x45, 0x53, 0x54, 0x52, 0x49, 0x43, + 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x43, 0x4f, 0x53, 0x54, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x52, 0x45, 0x56, 0x45, 0x4e, 0x55, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x02, 0x3a, 0x64, + 0xea, 0x41, 0x61, 0x0a, 0x2a, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, + 0x33, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x2f, 0x7b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x7d, 0x22, 0xf8, 0x03, 0x0a, 0x15, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x79, 0x0a, 0x14, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x1f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x22, 0x9e, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, + 0x1e, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x55, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x57, 0x4f, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x53, 0x10, + 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x55, 0x52, 0x54, 0x45, 0x45, 0x4e, 0x5f, 0x4d, 0x4f, + 0x4e, 0x54, 0x48, 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x57, 0x45, 0x4e, 0x54, 0x59, + 0x5f, 0x53, 0x49, 0x58, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x53, 0x10, 0x04, 0x12, 0x17, 0x0a, + 0x13, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59, 0x5f, 0x45, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x4d, 0x4f, + 0x4e, 0x54, 0x48, 0x53, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x49, 0x46, 0x54, 0x59, 0x5f, + 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x53, 0x10, 0x06, 0x3a, 0x65, 0xea, 0x41, 0x62, 0x0a, 0x33, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x2b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, + 0x94, 0x0b, 0x0a, 0x13, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xc1, 0x01, 0x0a, 0x2c, 0x61, 0x63, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x41, 0x63, 0x71, + 0x75, 0x69, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x57, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x28, 0x61, 0x63, 0x71, 0x75, + 0x69, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x57, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x12, 0xaf, 0x01, 0x0a, 0x26, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, + 0x6c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x56, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4f, 0x74, 0x68, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x22, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x92, 0x01, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xdb, 0x01, 0x0a, 0x28, + 0x41, 0x63, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, + 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x3c, 0x0a, 0x38, 0x41, 0x43, 0x51, 0x55, + 0x49, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x42, 0x41, 0x43, + 0x4b, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x37, 0x0a, 0x33, 0x41, 0x43, 0x51, 0x55, 0x49, 0x53, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x42, 0x41, 0x43, 0x4b, 0x5f, + 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x37, 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x01, 0x12, + 0x38, 0x0a, 0x34, 0x41, 0x43, 0x51, 0x55, 0x49, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, + 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, + 0x4c, 0x4f, 0x4f, 0x4b, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, + 0x33, 0x30, 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x02, 0x22, 0xf8, 0x01, 0x0a, 0x22, 0x4f, 0x74, + 0x68, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x62, 0x61, 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x12, 0x36, 0x0a, 0x32, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x42, + 0x41, 0x43, 0x4b, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x32, 0x0a, 0x2e, 0x4f, 0x54, 0x48, 0x45, + 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x57, 0x49, 0x4e, 0x44, + 0x4f, 0x57, 0x5f, 0x33, 0x30, 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x01, 0x12, 0x32, 0x0a, 0x2e, + 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x42, 0x41, 0x43, 0x4b, 0x5f, + 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x36, 0x30, 0x5f, 0x44, 0x41, 0x59, 0x53, 0x10, 0x02, + 0x12, 0x32, 0x0a, 0x2e, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x4b, 0x42, + 0x41, 0x43, 0x4b, 0x5f, 0x57, 0x49, 0x4e, 0x44, 0x4f, 0x57, 0x5f, 0x39, 0x30, 0x5f, 0x44, 0x41, + 0x59, 0x53, 0x10, 0x03, 0x22, 0x9c, 0x02, 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x12, 0x2b, 0x0a, 0x27, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x5f, + 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, + 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1d, 0x0a, 0x19, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, + 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x52, 0x49, 0x56, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x1c, + 0x0a, 0x18, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, + 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x43, 0x4c, 0x49, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, + 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x46, 0x49, + 0x52, 0x53, 0x54, 0x5f, 0x43, 0x4c, 0x49, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, + 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x4c, 0x49, 0x4e, + 0x45, 0x41, 0x52, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x52, 0x4f, 0x53, 0x53, 0x5f, 0x43, + 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x42, 0x41, 0x53, 0x45, 0x44, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x52, 0x4f, 0x53, 0x53, + 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x44, 0x45, + 0x43, 0x41, 0x59, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x44, 0x53, 0x5f, 0x50, 0x52, 0x45, + 0x46, 0x45, 0x52, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x41, 0x53, 0x54, 0x5f, 0x43, 0x4c, 0x49, 0x43, + 0x4b, 0x10, 0x07, 0x3a, 0x61, 0xea, 0x41, 0x5e, 0x0a, 0x31, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, + 0x69, 0x63, 0x73, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x7d, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2a, 0xaa, 0x04, 0x0a, 0x10, 0x49, 0x6e, 0x64, 0x75, 0x73, + 0x74, 0x72, 0x79, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x49, + 0x4e, 0x44, 0x55, 0x53, 0x54, 0x52, 0x59, 0x5f, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x4f, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x23, + 0x0a, 0x1f, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x49, + 0x4e, 0x44, 0x55, 0x53, 0x54, 0x52, 0x49, 0x41, 0x4c, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, + 0x53, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x49, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, + 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x43, 0x41, 0x52, 0x45, 0x10, 0x04, + 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x45, 0x43, 0x48, 0x4e, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x52, 0x41, 0x56, 0x45, 0x4c, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, + 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x52, 0x54, 0x53, 0x5f, + 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x54, 0x41, 0x49, 0x4e, 0x4d, 0x45, 0x4e, + 0x54, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x45, 0x41, 0x55, 0x54, 0x59, 0x5f, 0x41, 0x4e, + 0x44, 0x5f, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x42, + 0x4f, 0x4f, 0x4b, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x54, + 0x55, 0x52, 0x45, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x4f, 0x4f, 0x44, 0x5f, 0x41, 0x4e, + 0x44, 0x5f, 0x44, 0x52, 0x49, 0x4e, 0x4b, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x4d, + 0x45, 0x53, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x4f, 0x42, 0x42, 0x49, 0x45, 0x53, 0x5f, + 0x41, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x49, 0x53, 0x55, 0x52, 0x45, 0x10, 0x0d, 0x12, 0x13, 0x0a, + 0x0f, 0x48, 0x4f, 0x4d, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x47, 0x41, 0x52, 0x44, 0x45, 0x4e, + 0x10, 0x0e, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x45, 0x54, 0x5f, 0x41, + 0x4e, 0x44, 0x5f, 0x54, 0x45, 0x4c, 0x45, 0x43, 0x4f, 0x4d, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, + 0x4c, 0x41, 0x57, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x47, 0x4f, 0x56, 0x45, 0x52, 0x4e, 0x4d, 0x45, + 0x4e, 0x54, 0x10, 0x10, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x45, 0x57, 0x53, 0x10, 0x11, 0x12, 0x16, + 0x0a, 0x12, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, + 0x54, 0x49, 0x45, 0x53, 0x10, 0x12, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x45, 0x4f, 0x50, 0x4c, 0x45, + 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x4f, 0x43, 0x49, 0x45, 0x54, 0x59, 0x10, 0x13, 0x12, 0x14, + 0x0a, 0x10, 0x50, 0x45, 0x54, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x41, 0x4e, 0x49, 0x4d, 0x41, + 0x4c, 0x53, 0x10, 0x14, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x41, 0x4c, 0x5f, 0x45, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x10, 0x15, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, + 0x43, 0x45, 0x10, 0x16, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x43, 0x49, 0x45, 0x4e, 0x43, 0x45, 0x10, + 0x17, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x4f, 0x52, 0x54, 0x53, 0x10, 0x18, 0x12, 0x16, 0x0a, + 0x12, 0x4a, 0x4f, 0x42, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x45, 0x44, 0x55, 0x43, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x19, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, + 0x47, 0x10, 0x1a, 0x2a, 0x66, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x41, 0x4e, 0x41, + 0x4c, 0x59, 0x54, 0x49, 0x43, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, + 0x01, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x41, 0x4e, 0x41, 0x4c, + 0x59, 0x54, 0x49, 0x43, 0x53, 0x5f, 0x33, 0x36, 0x30, 0x10, 0x02, 0x2a, 0x4a, 0x0a, 0x09, 0x41, + 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x54, 0x4f, + 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x03, 0x2a, 0x50, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0xc1, 0x03, 0x0a, 0x19, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x48, 0x49, 0x53, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x54, 0x59, 0x10, 0x02, + 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x49, 0x52, 0x45, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x4c, 0x49, 0x4e, + 0x4b, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x41, 0x44, + 0x53, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x07, 0x12, 0x1b, 0x0a, 0x17, 0x47, 0x4f, 0x4f, 0x47, + 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, + 0x4e, 0x47, 0x53, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, + 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x10, 0x09, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, + 0x45, 0x41, 0x53, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x43, 0x4f, 0x4c, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, + 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x44, 0x49, 0x4d, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, + 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, + 0x52, 0x49, 0x43, 0x10, 0x0c, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x52, 0x45, + 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x53, + 0x10, 0x0d, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x56, 0x49, + 0x44, 0x45, 0x4f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x41, 0x44, 0x56, 0x45, 0x52, 0x54, 0x49, 0x53, + 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x0e, 0x12, 0x2e, 0x0a, 0x2a, 0x44, 0x49, 0x53, + 0x50, 0x4c, 0x41, 0x59, 0x5f, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x41, + 0x44, 0x56, 0x45, 0x52, 0x54, 0x49, 0x53, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x50, + 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x10, 0x0f, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x41, + 0x52, 0x43, 0x48, 0x5f, 0x41, 0x44, 0x53, 0x5f, 0x33, 0x36, 0x30, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, + 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, + 0x4d, 0x10, 0x12, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x53, 0x10, 0x14, 0x2a, 0x73, 0x0a, + 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, + 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x4f, 0x4f, + 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, + 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, + 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, + 0x10, 0x02, 0x2a, 0x8e, 0x01, 0x0a, 0x14, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x22, 0x47, + 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x43, 0x4f, + 0x4e, 0x53, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, + 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, + 0x4e, 0x53, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x47, 0x4f, 0x4f, + 0x47, 0x4c, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x4c, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x53, + 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x4e, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x2a, 0x7b, 0x0a, 0x1d, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x2c, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x50, 0x52, 0x4f, + 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x49, 0x4e, 0x47, + 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, + 0x5f, 0x41, 0x4e, 0x41, 0x4c, 0x59, 0x54, 0x49, 0x43, 0x53, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, + 0x4c, 0x49, 0x4e, 0x4b, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x02, + 0x2a, 0xc4, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x50, + 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x29, 0x0a, 0x25, 0x41, + 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, + 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x41, 0x4e, 0x41, 0x4c, 0x59, + 0x54, 0x49, 0x43, 0x53, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x57, 0x41, 0x49, 0x54, 0x49, + 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4c, + 0x49, 0x4e, 0x4b, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x0c, + 0x0a, 0x08, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, + 0x4f, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x06, 0x2a, 0x82, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, + 0x45, 0x52, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x45, + 0x52, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x49, 0x4e, 0x41, 0x52, + 0x59, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x54, 0x59, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x42, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x54, 0x59, + 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x54, 0x59, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x4c, 0x55, 0x50, 0x10, 0x03, 0x42, 0x7b, 0x0a, 0x22, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, + 0x74, 0x69, 0x63, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x42, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x6e, 0x61, 0x6c, + 0x79, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_analytics_admin_v1alpha_resources_proto_rawDescOnce sync.Once + file_google_analytics_admin_v1alpha_resources_proto_rawDescData = file_google_analytics_admin_v1alpha_resources_proto_rawDesc +) + +func file_google_analytics_admin_v1alpha_resources_proto_rawDescGZIP() []byte { + file_google_analytics_admin_v1alpha_resources_proto_rawDescOnce.Do(func() { + file_google_analytics_admin_v1alpha_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_analytics_admin_v1alpha_resources_proto_rawDescData) + }) + return file_google_analytics_admin_v1alpha_resources_proto_rawDescData +} + +var file_google_analytics_admin_v1alpha_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 19) +var file_google_analytics_admin_v1alpha_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_google_analytics_admin_v1alpha_resources_proto_goTypes = []interface{}{ + (IndustryCategory)(0), // 0: google.analytics.admin.v1alpha.IndustryCategory + (ServiceLevel)(0), // 1: google.analytics.admin.v1alpha.ServiceLevel + (ActorType)(0), // 2: google.analytics.admin.v1alpha.ActorType + (ActionType)(0), // 3: google.analytics.admin.v1alpha.ActionType + (ChangeHistoryResourceType)(0), // 4: google.analytics.admin.v1alpha.ChangeHistoryResourceType + (GoogleSignalsState)(0), // 5: google.analytics.admin.v1alpha.GoogleSignalsState + (GoogleSignalsConsent)(0), // 6: google.analytics.admin.v1alpha.GoogleSignalsConsent + (LinkProposalInitiatingProduct)(0), // 7: google.analytics.admin.v1alpha.LinkProposalInitiatingProduct + (LinkProposalState)(0), // 8: google.analytics.admin.v1alpha.LinkProposalState + (PropertyType)(0), // 9: google.analytics.admin.v1alpha.PropertyType + (DataStream_DataStreamType)(0), // 10: google.analytics.admin.v1alpha.DataStream.DataStreamType + (CustomDimension_DimensionScope)(0), // 11: google.analytics.admin.v1alpha.CustomDimension.DimensionScope + (CustomMetric_MeasurementUnit)(0), // 12: google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit + (CustomMetric_MetricScope)(0), // 13: google.analytics.admin.v1alpha.CustomMetric.MetricScope + (CustomMetric_RestrictedMetricType)(0), // 14: google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType + (DataRetentionSettings_RetentionDuration)(0), // 15: google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration + (AttributionSettings_AcquisitionConversionEventLookbackWindow)(0), // 16: google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow + (AttributionSettings_OtherConversionEventLookbackWindow)(0), // 17: google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow + (AttributionSettings_ReportingAttributionModel)(0), // 18: google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel + (*Account)(nil), // 19: google.analytics.admin.v1alpha.Account + (*Property)(nil), // 20: google.analytics.admin.v1alpha.Property + (*DataStream)(nil), // 21: google.analytics.admin.v1alpha.DataStream + (*UserLink)(nil), // 22: google.analytics.admin.v1alpha.UserLink + (*AuditUserLink)(nil), // 23: google.analytics.admin.v1alpha.AuditUserLink + (*FirebaseLink)(nil), // 24: google.analytics.admin.v1alpha.FirebaseLink + (*GlobalSiteTag)(nil), // 25: google.analytics.admin.v1alpha.GlobalSiteTag + (*GoogleAdsLink)(nil), // 26: google.analytics.admin.v1alpha.GoogleAdsLink + (*DataSharingSettings)(nil), // 27: google.analytics.admin.v1alpha.DataSharingSettings + (*AccountSummary)(nil), // 28: google.analytics.admin.v1alpha.AccountSummary + (*PropertySummary)(nil), // 29: google.analytics.admin.v1alpha.PropertySummary + (*MeasurementProtocolSecret)(nil), // 30: google.analytics.admin.v1alpha.MeasurementProtocolSecret + (*ChangeHistoryEvent)(nil), // 31: google.analytics.admin.v1alpha.ChangeHistoryEvent + (*ChangeHistoryChange)(nil), // 32: google.analytics.admin.v1alpha.ChangeHistoryChange + (*DisplayVideo360AdvertiserLink)(nil), // 33: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + (*DisplayVideo360AdvertiserLinkProposal)(nil), // 34: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + (*LinkProposalStatusDetails)(nil), // 35: google.analytics.admin.v1alpha.LinkProposalStatusDetails + (*ConversionEvent)(nil), // 36: google.analytics.admin.v1alpha.ConversionEvent + (*GoogleSignalsSettings)(nil), // 37: google.analytics.admin.v1alpha.GoogleSignalsSettings + (*CustomDimension)(nil), // 38: google.analytics.admin.v1alpha.CustomDimension + (*CustomMetric)(nil), // 39: google.analytics.admin.v1alpha.CustomMetric + (*DataRetentionSettings)(nil), // 40: google.analytics.admin.v1alpha.DataRetentionSettings + (*AttributionSettings)(nil), // 41: google.analytics.admin.v1alpha.AttributionSettings + (*DataStream_WebStreamData)(nil), // 42: google.analytics.admin.v1alpha.DataStream.WebStreamData + (*DataStream_AndroidAppStreamData)(nil), // 43: google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + (*DataStream_IosAppStreamData)(nil), // 44: google.analytics.admin.v1alpha.DataStream.IosAppStreamData + (*ChangeHistoryChange_ChangeHistoryResource)(nil), // 45: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + (*timestamppb.Timestamp)(nil), // 46: google.protobuf.Timestamp + (*wrapperspb.BoolValue)(nil), // 47: google.protobuf.BoolValue +} +var file_google_analytics_admin_v1alpha_resources_proto_depIdxs = []int32{ + 46, // 0: google.analytics.admin.v1alpha.Account.create_time:type_name -> google.protobuf.Timestamp + 46, // 1: google.analytics.admin.v1alpha.Account.update_time:type_name -> google.protobuf.Timestamp + 9, // 2: google.analytics.admin.v1alpha.Property.property_type:type_name -> google.analytics.admin.v1alpha.PropertyType + 46, // 3: google.analytics.admin.v1alpha.Property.create_time:type_name -> google.protobuf.Timestamp + 46, // 4: google.analytics.admin.v1alpha.Property.update_time:type_name -> google.protobuf.Timestamp + 0, // 5: google.analytics.admin.v1alpha.Property.industry_category:type_name -> google.analytics.admin.v1alpha.IndustryCategory + 1, // 6: google.analytics.admin.v1alpha.Property.service_level:type_name -> google.analytics.admin.v1alpha.ServiceLevel + 46, // 7: google.analytics.admin.v1alpha.Property.delete_time:type_name -> google.protobuf.Timestamp + 46, // 8: google.analytics.admin.v1alpha.Property.expire_time:type_name -> google.protobuf.Timestamp + 42, // 9: google.analytics.admin.v1alpha.DataStream.web_stream_data:type_name -> google.analytics.admin.v1alpha.DataStream.WebStreamData + 43, // 10: google.analytics.admin.v1alpha.DataStream.android_app_stream_data:type_name -> google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + 44, // 11: google.analytics.admin.v1alpha.DataStream.ios_app_stream_data:type_name -> google.analytics.admin.v1alpha.DataStream.IosAppStreamData + 10, // 12: google.analytics.admin.v1alpha.DataStream.type:type_name -> google.analytics.admin.v1alpha.DataStream.DataStreamType + 46, // 13: google.analytics.admin.v1alpha.DataStream.create_time:type_name -> google.protobuf.Timestamp + 46, // 14: google.analytics.admin.v1alpha.DataStream.update_time:type_name -> google.protobuf.Timestamp + 46, // 15: google.analytics.admin.v1alpha.FirebaseLink.create_time:type_name -> google.protobuf.Timestamp + 47, // 16: google.analytics.admin.v1alpha.GoogleAdsLink.ads_personalization_enabled:type_name -> google.protobuf.BoolValue + 46, // 17: google.analytics.admin.v1alpha.GoogleAdsLink.create_time:type_name -> google.protobuf.Timestamp + 46, // 18: google.analytics.admin.v1alpha.GoogleAdsLink.update_time:type_name -> google.protobuf.Timestamp + 29, // 19: google.analytics.admin.v1alpha.AccountSummary.property_summaries:type_name -> google.analytics.admin.v1alpha.PropertySummary + 9, // 20: google.analytics.admin.v1alpha.PropertySummary.property_type:type_name -> google.analytics.admin.v1alpha.PropertyType + 46, // 21: google.analytics.admin.v1alpha.ChangeHistoryEvent.change_time:type_name -> google.protobuf.Timestamp + 2, // 22: google.analytics.admin.v1alpha.ChangeHistoryEvent.actor_type:type_name -> google.analytics.admin.v1alpha.ActorType + 32, // 23: google.analytics.admin.v1alpha.ChangeHistoryEvent.changes:type_name -> google.analytics.admin.v1alpha.ChangeHistoryChange + 3, // 24: google.analytics.admin.v1alpha.ChangeHistoryChange.action:type_name -> google.analytics.admin.v1alpha.ActionType + 45, // 25: google.analytics.admin.v1alpha.ChangeHistoryChange.resource_before_change:type_name -> google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + 45, // 26: google.analytics.admin.v1alpha.ChangeHistoryChange.resource_after_change:type_name -> google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + 47, // 27: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.ads_personalization_enabled:type_name -> google.protobuf.BoolValue + 47, // 28: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.campaign_data_sharing_enabled:type_name -> google.protobuf.BoolValue + 47, // 29: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.cost_data_sharing_enabled:type_name -> google.protobuf.BoolValue + 35, // 30: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.link_proposal_status_details:type_name -> google.analytics.admin.v1alpha.LinkProposalStatusDetails + 47, // 31: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.ads_personalization_enabled:type_name -> google.protobuf.BoolValue + 47, // 32: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.campaign_data_sharing_enabled:type_name -> google.protobuf.BoolValue + 47, // 33: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.cost_data_sharing_enabled:type_name -> google.protobuf.BoolValue + 7, // 34: google.analytics.admin.v1alpha.LinkProposalStatusDetails.link_proposal_initiating_product:type_name -> google.analytics.admin.v1alpha.LinkProposalInitiatingProduct + 8, // 35: google.analytics.admin.v1alpha.LinkProposalStatusDetails.link_proposal_state:type_name -> google.analytics.admin.v1alpha.LinkProposalState + 46, // 36: google.analytics.admin.v1alpha.ConversionEvent.create_time:type_name -> google.protobuf.Timestamp + 5, // 37: google.analytics.admin.v1alpha.GoogleSignalsSettings.state:type_name -> google.analytics.admin.v1alpha.GoogleSignalsState + 6, // 38: google.analytics.admin.v1alpha.GoogleSignalsSettings.consent:type_name -> google.analytics.admin.v1alpha.GoogleSignalsConsent + 11, // 39: google.analytics.admin.v1alpha.CustomDimension.scope:type_name -> google.analytics.admin.v1alpha.CustomDimension.DimensionScope + 12, // 40: google.analytics.admin.v1alpha.CustomMetric.measurement_unit:type_name -> google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit + 13, // 41: google.analytics.admin.v1alpha.CustomMetric.scope:type_name -> google.analytics.admin.v1alpha.CustomMetric.MetricScope + 14, // 42: google.analytics.admin.v1alpha.CustomMetric.restricted_metric_type:type_name -> google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType + 15, // 43: google.analytics.admin.v1alpha.DataRetentionSettings.event_data_retention:type_name -> google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration + 16, // 44: google.analytics.admin.v1alpha.AttributionSettings.acquisition_conversion_event_lookback_window:type_name -> google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow + 17, // 45: google.analytics.admin.v1alpha.AttributionSettings.other_conversion_event_lookback_window:type_name -> google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow + 18, // 46: google.analytics.admin.v1alpha.AttributionSettings.reporting_attribution_model:type_name -> google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel + 19, // 47: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.account:type_name -> google.analytics.admin.v1alpha.Account + 20, // 48: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.property:type_name -> google.analytics.admin.v1alpha.Property + 24, // 49: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.firebase_link:type_name -> google.analytics.admin.v1alpha.FirebaseLink + 26, // 50: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.google_ads_link:type_name -> google.analytics.admin.v1alpha.GoogleAdsLink + 37, // 51: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.google_signals_settings:type_name -> google.analytics.admin.v1alpha.GoogleSignalsSettings + 33, // 52: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.display_video_360_advertiser_link:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + 34, // 53: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.display_video_360_advertiser_link_proposal:type_name -> google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + 36, // 54: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.conversion_event:type_name -> google.analytics.admin.v1alpha.ConversionEvent + 30, // 55: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.measurement_protocol_secret:type_name -> google.analytics.admin.v1alpha.MeasurementProtocolSecret + 38, // 56: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.custom_dimension:type_name -> google.analytics.admin.v1alpha.CustomDimension + 39, // 57: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.custom_metric:type_name -> google.analytics.admin.v1alpha.CustomMetric + 40, // 58: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.data_retention_settings:type_name -> google.analytics.admin.v1alpha.DataRetentionSettings + 21, // 59: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.data_stream:type_name -> google.analytics.admin.v1alpha.DataStream + 41, // 60: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.attribution_settings:type_name -> google.analytics.admin.v1alpha.AttributionSettings + 61, // [61:61] is the sub-list for method output_type + 61, // [61:61] is the sub-list for method input_type + 61, // [61:61] is the sub-list for extension type_name + 61, // [61:61] is the sub-list for extension extendee + 0, // [0:61] is the sub-list for field type_name +} + +func init() { file_google_analytics_admin_v1alpha_resources_proto_init() } +func file_google_analytics_admin_v1alpha_resources_proto_init() { + if File_google_analytics_admin_v1alpha_resources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Account); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Property); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataStream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserLink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuditUserLink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FirebaseLink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GlobalSiteTag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoogleAdsLink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataSharingSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PropertySummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MeasurementProtocolSecret); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeHistoryEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeHistoryChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisplayVideo360AdvertiserLink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisplayVideo360AdvertiserLinkProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkProposalStatusDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConversionEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoogleSignalsSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomDimension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomMetric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataRetentionSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributionSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataStream_WebStreamData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataStream_AndroidAppStreamData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataStream_IosAppStreamData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeHistoryChange_ChangeHistoryResource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*DataStream_WebStreamData_)(nil), + (*DataStream_AndroidAppStreamData_)(nil), + (*DataStream_IosAppStreamData_)(nil), + } + file_google_analytics_admin_v1alpha_resources_proto_msgTypes[26].OneofWrappers = []interface{}{ + (*ChangeHistoryChange_ChangeHistoryResource_Account)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_Property)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_FirebaseLink)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_GoogleAdsLink)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_GoogleSignalsSettings)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLink)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_DisplayVideo_360AdvertiserLinkProposal)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_ConversionEvent)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_MeasurementProtocolSecret)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_CustomDimension)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_CustomMetric)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_DataRetentionSettings)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_DataStream)(nil), + (*ChangeHistoryChange_ChangeHistoryResource_AttributionSettings)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_analytics_admin_v1alpha_resources_proto_rawDesc, + NumEnums: 19, + NumMessages: 27, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_analytics_admin_v1alpha_resources_proto_goTypes, + DependencyIndexes: file_google_analytics_admin_v1alpha_resources_proto_depIdxs, + EnumInfos: file_google_analytics_admin_v1alpha_resources_proto_enumTypes, + MessageInfos: file_google_analytics_admin_v1alpha_resources_proto_msgTypes, + }.Build() + File_google_analytics_admin_v1alpha_resources_proto = out.File + file_google_analytics_admin_v1alpha_resources_proto_rawDesc = nil + file_google_analytics_admin_v1alpha_resources_proto_goTypes = nil + file_google_analytics_admin_v1alpha_resources_proto_depIdxs = nil +} diff --git a/analytics/admin/apiv1alpha/analytics_admin_client.go b/analytics/admin/apiv1alpha/analytics_admin_client.go index ee5f6e8d12bc..3a535fb2deb4 100644 --- a/analytics/admin/apiv1alpha/analytics_admin_client.go +++ b/analytics/admin/apiv1alpha/analytics_admin_client.go @@ -116,6 +116,14 @@ type AnalyticsAdminCallOptions struct { UpdateDataStream []gax.CallOption ListDataStreams []gax.CallOption GetDataStream []gax.CallOption + GetAudience []gax.CallOption + ListAudiences []gax.CallOption + CreateAudience []gax.CallOption + UpdateAudience []gax.CallOption + ArchiveAudience []gax.CallOption + GetAttributionSettings []gax.CallOption + UpdateAttributionSettings []gax.CallOption + RunAccessReport []gax.CallOption } func defaultAnalyticsAdminGRPCClientOptions() []option.ClientOption { @@ -984,6 +992,102 @@ func defaultAnalyticsAdminCallOptions() *AnalyticsAdminCallOptions { }) }), }, + GetAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListAudiences: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ArchiveAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetAttributionSettings: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateAttributionSettings: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + RunAccessReport: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, } } @@ -1770,6 +1874,94 @@ func defaultAnalyticsAdminRESTCallOptions() *AnalyticsAdminCallOptions { http.StatusInternalServerError) }), }, + GetAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + ListAudiences: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + CreateAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + UpdateAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + ArchiveAudience: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + GetAttributionSettings: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + UpdateAttributionSettings: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, + RunAccessReport: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusInternalServerError) + }), + }, } } @@ -1849,6 +2041,14 @@ type internalAnalyticsAdminClient interface { UpdateDataStream(context.Context, *adminpb.UpdateDataStreamRequest, ...gax.CallOption) (*adminpb.DataStream, error) ListDataStreams(context.Context, *adminpb.ListDataStreamsRequest, ...gax.CallOption) *DataStreamIterator GetDataStream(context.Context, *adminpb.GetDataStreamRequest, ...gax.CallOption) (*adminpb.DataStream, error) + GetAudience(context.Context, *adminpb.GetAudienceRequest, ...gax.CallOption) (*adminpb.Audience, error) + ListAudiences(context.Context, *adminpb.ListAudiencesRequest, ...gax.CallOption) *AudienceIterator + CreateAudience(context.Context, *adminpb.CreateAudienceRequest, ...gax.CallOption) (*adminpb.Audience, error) + UpdateAudience(context.Context, *adminpb.UpdateAudienceRequest, ...gax.CallOption) (*adminpb.Audience, error) + ArchiveAudience(context.Context, *adminpb.ArchiveAudienceRequest, ...gax.CallOption) error + GetAttributionSettings(context.Context, *adminpb.GetAttributionSettingsRequest, ...gax.CallOption) (*adminpb.AttributionSettings, error) + UpdateAttributionSettings(context.Context, *adminpb.UpdateAttributionSettingsRequest, ...gax.CallOption) (*adminpb.AttributionSettings, error) + RunAccessReport(context.Context, *adminpb.RunAccessReportRequest, ...gax.CallOption) (*adminpb.RunAccessReportResponse, error) } // AnalyticsAdminClient is a client for interacting with Google Analytics Admin API. @@ -1880,7 +2080,8 @@ func (c *AnalyticsAdminClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AnalyticsAdminClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -2216,10 +2417,10 @@ func (c *AnalyticsAdminClient) ApproveDisplayVideo360AdvertiserLinkProposal(ctx // CancelDisplayVideo360AdvertiserLinkProposal cancels a DisplayVideo360AdvertiserLinkProposal. // Cancelling can mean either: // -// Declining a proposal initiated from Display & Video 360 +// Declining a proposal initiated from Display & Video 360 // -// Withdrawing a proposal initiated from Google Analytics -// After being cancelled, a proposal will eventually be deleted automatically. +// Withdrawing a proposal initiated from Google Analytics +// After being cancelled, a proposal will eventually be deleted automatically. func (c *AnalyticsAdminClient) CancelDisplayVideo360AdvertiserLinkProposal(ctx context.Context, req *adminpb.CancelDisplayVideo360AdvertiserLinkProposalRequest, opts ...gax.CallOption) (*adminpb.DisplayVideo360AdvertiserLinkProposal, error) { return c.internalClient.CancelDisplayVideo360AdvertiserLinkProposal(ctx, req, opts...) } @@ -2309,6 +2510,60 @@ func (c *AnalyticsAdminClient) GetDataStream(ctx context.Context, req *adminpb.G return c.internalClient.GetDataStream(ctx, req, opts...) } +// GetAudience lookup for a single Audience. +// Audiences created before 2020 may not be supported. +func (c *AnalyticsAdminClient) GetAudience(ctx context.Context, req *adminpb.GetAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + return c.internalClient.GetAudience(ctx, req, opts...) +} + +// ListAudiences lists Audiences on a property. +// Audiences created before 2020 may not be supported. +func (c *AnalyticsAdminClient) ListAudiences(ctx context.Context, req *adminpb.ListAudiencesRequest, opts ...gax.CallOption) *AudienceIterator { + return c.internalClient.ListAudiences(ctx, req, opts...) +} + +// CreateAudience creates an Audience. +func (c *AnalyticsAdminClient) CreateAudience(ctx context.Context, req *adminpb.CreateAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + return c.internalClient.CreateAudience(ctx, req, opts...) +} + +// UpdateAudience updates an Audience on a property. +func (c *AnalyticsAdminClient) UpdateAudience(ctx context.Context, req *adminpb.UpdateAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + return c.internalClient.UpdateAudience(ctx, req, opts...) +} + +// ArchiveAudience archives an Audience on a property. +func (c *AnalyticsAdminClient) ArchiveAudience(ctx context.Context, req *adminpb.ArchiveAudienceRequest, opts ...gax.CallOption) error { + return c.internalClient.ArchiveAudience(ctx, req, opts...) +} + +// GetAttributionSettings lookup for a AttributionSettings singleton. +func (c *AnalyticsAdminClient) GetAttributionSettings(ctx context.Context, req *adminpb.GetAttributionSettingsRequest, opts ...gax.CallOption) (*adminpb.AttributionSettings, error) { + return c.internalClient.GetAttributionSettings(ctx, req, opts...) +} + +// UpdateAttributionSettings updates attribution settings on a property. +func (c *AnalyticsAdminClient) UpdateAttributionSettings(ctx context.Context, req *adminpb.UpdateAttributionSettingsRequest, opts ...gax.CallOption) (*adminpb.AttributionSettings, error) { + return c.internalClient.UpdateAttributionSettings(ctx, req, opts...) +} + +// RunAccessReport returns a customized report of data access records. The report provides +// records of each time a user reads Google Analytics reporting data. Access +// records are retained for up to 2 years. +// +// Data Access Reports can be requested for a property. The property must be +// in Google Analytics 360. This method is only available to Administrators. +// +// These data access records include GA4 UI Reporting, GA4 UI Explorations, +// GA4 Data API, and other products like Firebase & Admob that can retrieve +// data from Google Analytics through a linkage. These records don’t include +// property configuration changes like adding a stream or changing a +// property’s time zone. For configuration change history, see +// searchChangeHistoryEvents (at https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +func (c *AnalyticsAdminClient) RunAccessReport(ctx context.Context, req *adminpb.RunAccessReportRequest, opts ...gax.CallOption) (*adminpb.RunAccessReportResponse, error) { + return c.internalClient.RunAccessReport(ctx, req, opts...) +} + // analyticsAdminGRPCClient is a client for interacting with Google Analytics Admin API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -2369,7 +2624,8 @@ func NewAnalyticsAdminClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *analyticsAdminGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -2453,7 +2709,7 @@ func (c *analyticsAdminRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *analyticsAdminRESTClient) Connection() *grpc.ClientConn { return nil } @@ -4306,70 +4562,37 @@ func (c *analyticsAdminGRPCClient) GetDataStream(ctx context.Context, req *admin return resp, nil } -// GetAccount lookup for a single Account. -func (c *analyticsAdminRESTClient) GetAccount(ctx context.Context, req *adminpb.GetAccountRequest, opts ...gax.CallOption) (*adminpb.Account, error) { - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err +func (c *analyticsAdminGRPCClient) GetAudience(ctx context.Context, req *adminpb.GetAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx } - baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetName()) - - // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) - headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) - opts = append((*c.CallOptions).GetAccount[0:len((*c.CallOptions).GetAccount):len((*c.CallOptions).GetAccount)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &adminpb.Account{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := ioutil.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return maybeUnknownEnum(err) - } - - return nil + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAudience[0:len((*c.CallOptions).GetAudience):len((*c.CallOptions).GetAudience)], opts...) + var resp *adminpb.Audience + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.GetAudience(ctx, req, settings.GRPC...) + return err }, opts...) - if e != nil { - return nil, e + if err != nil { + return nil, err } return resp, nil } -// ListAccounts returns all accounts accessible by the caller. -// -// Note that these accounts might not currently have GA4 properties. -// Soft-deleted (ie: “trashed”) accounts are excluded by default. -// Returns an empty list if no relevant accounts are found. -func (c *analyticsAdminRESTClient) ListAccounts(ctx context.Context, req *adminpb.ListAccountsRequest, opts ...gax.CallOption) *AccountIterator { - it := &AccountIterator{} - req = proto.Clone(req).(*adminpb.ListAccountsRequest) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - it.InternalFetch = func(pageSize int, pageToken string) ([]*adminpb.Account, string, error) { - resp := &adminpb.ListAccountsResponse{} +func (c *analyticsAdminGRPCClient) ListAudiences(ctx context.Context, req *adminpb.ListAudiencesRequest, opts ...gax.CallOption) *AudienceIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListAudiences[0:len((*c.CallOptions).ListAudiences):len((*c.CallOptions).ListAudiences)], opts...) + it := &AudienceIterator{} + req = proto.Clone(req).(*adminpb.ListAudiencesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*adminpb.Audience, string, error) { + resp := &adminpb.ListAudiencesResponse{} if pageToken != "" { req.PageToken = pageToken } @@ -4378,7 +4601,235 @@ func (c *analyticsAdminRESTClient) ListAccounts(ctx context.Context, req *adminp } else if pageSize != 0 { req.PageSize = int32(pageSize) } - baseUrl, err := url.Parse(c.endpoint) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.ListAudiences(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAudiences(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *analyticsAdminGRPCClient) CreateAudience(ctx context.Context, req *adminpb.CreateAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateAudience[0:len((*c.CallOptions).CreateAudience):len((*c.CallOptions).CreateAudience)], opts...) + var resp *adminpb.Audience + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.CreateAudience(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *analyticsAdminGRPCClient) UpdateAudience(ctx context.Context, req *adminpb.UpdateAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "audience.name", url.QueryEscape(req.GetAudience().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateAudience[0:len((*c.CallOptions).UpdateAudience):len((*c.CallOptions).UpdateAudience)], opts...) + var resp *adminpb.Audience + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.UpdateAudience(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *analyticsAdminGRPCClient) ArchiveAudience(ctx context.Context, req *adminpb.ArchiveAudienceRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ArchiveAudience[0:len((*c.CallOptions).ArchiveAudience):len((*c.CallOptions).ArchiveAudience)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.analyticsAdminClient.ArchiveAudience(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *analyticsAdminGRPCClient) GetAttributionSettings(ctx context.Context, req *adminpb.GetAttributionSettingsRequest, opts ...gax.CallOption) (*adminpb.AttributionSettings, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAttributionSettings[0:len((*c.CallOptions).GetAttributionSettings):len((*c.CallOptions).GetAttributionSettings)], opts...) + var resp *adminpb.AttributionSettings + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.GetAttributionSettings(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *analyticsAdminGRPCClient) UpdateAttributionSettings(ctx context.Context, req *adminpb.UpdateAttributionSettingsRequest, opts ...gax.CallOption) (*adminpb.AttributionSettings, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "attribution_settings.name", url.QueryEscape(req.GetAttributionSettings().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateAttributionSettings[0:len((*c.CallOptions).UpdateAttributionSettings):len((*c.CallOptions).UpdateAttributionSettings)], opts...) + var resp *adminpb.AttributionSettings + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.UpdateAttributionSettings(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *analyticsAdminGRPCClient) RunAccessReport(ctx context.Context, req *adminpb.RunAccessReportRequest, opts ...gax.CallOption) (*adminpb.RunAccessReportResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity", url.QueryEscape(req.GetEntity()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RunAccessReport[0:len((*c.CallOptions).RunAccessReport):len((*c.CallOptions).RunAccessReport)], opts...) + var resp *adminpb.RunAccessReportResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.analyticsAdminClient.RunAccessReport(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// GetAccount lookup for a single Account. +func (c *analyticsAdminRESTClient) GetAccount(ctx context.Context, req *adminpb.GetAccountRequest, opts ...gax.CallOption) (*adminpb.Account, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAccount[0:len((*c.CallOptions).GetAccount):len((*c.CallOptions).GetAccount)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.Account{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAccounts returns all accounts accessible by the caller. +// +// Note that these accounts might not currently have GA4 properties. +// Soft-deleted (ie: “trashed”) accounts are excluded by default. +// Returns an empty list if no relevant accounts are found. +func (c *analyticsAdminRESTClient) ListAccounts(ctx context.Context, req *adminpb.ListAccountsRequest, opts ...gax.CallOption) *AccountIterator { + it := &AccountIterator{} + req = proto.Clone(req).(*adminpb.ListAccountsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*adminpb.Account, string, error) { + resp := &adminpb.ListAccountsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) if err != nil { return nil, "", err } @@ -4514,8 +4965,12 @@ func (c *analyticsAdminRESTClient) UpdateAccount(ctx context.Context, req *admin baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetAccount().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -4995,8 +5450,12 @@ func (c *analyticsAdminRESTClient) UpdateProperty(ctx context.Context, req *admi baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetProperty().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -5980,8 +6439,12 @@ func (c *analyticsAdminRESTClient) UpdateGoogleAdsLink(ctx context.Context, req baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetGoogleAdsLink().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -6459,8 +6922,12 @@ func (c *analyticsAdminRESTClient) UpdateMeasurementProtocolSecret(ctx context.C baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetMeasurementProtocolSecret().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -6725,8 +7192,12 @@ func (c *analyticsAdminRESTClient) UpdateGoogleSignalsSettings(ctx context.Conte baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetGoogleSignalsSettings().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -7268,8 +7739,12 @@ func (c *analyticsAdminRESTClient) UpdateDisplayVideo360AdvertiserLink(ctx conte baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetDisplayVideo_360AdvertiserLink().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -7619,10 +8094,10 @@ func (c *analyticsAdminRESTClient) ApproveDisplayVideo360AdvertiserLinkProposal( // CancelDisplayVideo360AdvertiserLinkProposal cancels a DisplayVideo360AdvertiserLinkProposal. // Cancelling can mean either: // -// Declining a proposal initiated from Display & Video 360 +// Declining a proposal initiated from Display & Video 360 // -// Withdrawing a proposal initiated from Google Analytics -// After being cancelled, a proposal will eventually be deleted automatically. +// Withdrawing a proposal initiated from Google Analytics +// After being cancelled, a proposal will eventually be deleted automatically. func (c *analyticsAdminRESTClient) CancelDisplayVideo360AdvertiserLinkProposal(ctx context.Context, req *adminpb.CancelDisplayVideo360AdvertiserLinkProposalRequest, opts ...gax.CallOption) (*adminpb.DisplayVideo360AdvertiserLinkProposal, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -7757,8 +8232,12 @@ func (c *analyticsAdminRESTClient) UpdateCustomDimension(ctx context.Context, re baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetCustomDimension().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -8065,8 +8544,12 @@ func (c *analyticsAdminRESTClient) UpdateCustomMetric(ctx context.Context, req * baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetCustomMetric().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -8366,8 +8849,12 @@ func (c *analyticsAdminRESTClient) UpdateDataRetentionSettings(ctx context.Conte baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetDataRetentionSettings().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -8528,8 +9015,12 @@ func (c *analyticsAdminRESTClient) UpdateDataStream(ctx context.Context, req *ad baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetDataStream().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -8719,25 +9210,534 @@ func (c *analyticsAdminRESTClient) GetDataStream(ctx context.Context, req *admin return resp, nil } -// AccountIterator manages a stream of *adminpb.Account. -type AccountIterator struct { - items []*adminpb.Account - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} +// GetAudience lookup for a single Audience. +// Audiences created before 2020 may not be supported. +func (c *analyticsAdminRESTClient) GetAudience(ctx context.Context, req *adminpb.GetAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetName()) - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*adminpb.Account, nextPageToken string, err error) -} + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAudience[0:len((*c.CallOptions).GetAudience):len((*c.CallOptions).GetAudience)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.Audience{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAudiences lists Audiences on a property. +// Audiences created before 2020 may not be supported. +func (c *analyticsAdminRESTClient) ListAudiences(ctx context.Context, req *adminpb.ListAudiencesRequest, opts ...gax.CallOption) *AudienceIterator { + it := &AudienceIterator{} + req = proto.Clone(req).(*adminpb.ListAudiencesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*adminpb.Audience, string, error) { + resp := &adminpb.ListAudiencesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v/audiences", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAudiences(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateAudience creates an Audience. +func (c *analyticsAdminRESTClient) CreateAudience(ctx context.Context, req *adminpb.CreateAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetAudience() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v/audiences", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateAudience[0:len((*c.CallOptions).CreateAudience):len((*c.CallOptions).CreateAudience)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.Audience{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateAudience updates an Audience on a property. +func (c *analyticsAdminRESTClient) UpdateAudience(ctx context.Context, req *adminpb.UpdateAudienceRequest, opts ...gax.CallOption) (*adminpb.Audience, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetAudience() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetAudience().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "audience.name", url.QueryEscape(req.GetAudience().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateAudience[0:len((*c.CallOptions).UpdateAudience):len((*c.CallOptions).UpdateAudience)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.Audience{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ArchiveAudience archives an Audience on a property. +func (c *analyticsAdminRESTClient) ArchiveAudience(ctx context.Context, req *adminpb.ArchiveAudienceRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v:archive", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetAttributionSettings lookup for a AttributionSettings singleton. +func (c *analyticsAdminRESTClient) GetAttributionSettings(ctx context.Context, req *adminpb.GetAttributionSettingsRequest, opts ...gax.CallOption) (*adminpb.AttributionSettings, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAttributionSettings[0:len((*c.CallOptions).GetAttributionSettings):len((*c.CallOptions).GetAttributionSettings)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.AttributionSettings{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateAttributionSettings updates attribution settings on a property. +func (c *analyticsAdminRESTClient) UpdateAttributionSettings(ctx context.Context, req *adminpb.UpdateAttributionSettingsRequest, opts ...gax.CallOption) (*adminpb.AttributionSettings, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetAttributionSettings() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetAttributionSettings().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "attribution_settings.name", url.QueryEscape(req.GetAttributionSettings().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateAttributionSettings[0:len((*c.CallOptions).UpdateAttributionSettings):len((*c.CallOptions).UpdateAttributionSettings)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.AttributionSettings{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RunAccessReport returns a customized report of data access records. The report provides +// records of each time a user reads Google Analytics reporting data. Access +// records are retained for up to 2 years. +// +// Data Access Reports can be requested for a property. The property must be +// in Google Analytics 360. This method is only available to Administrators. +// +// These data access records include GA4 UI Reporting, GA4 UI Explorations, +// GA4 Data API, and other products like Firebase & Admob that can retrieve +// data from Google Analytics through a linkage. These records don’t include +// property configuration changes like adding a stream or changing a +// property’s time zone. For configuration change history, see +// searchChangeHistoryEvents (at https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +func (c *analyticsAdminRESTClient) RunAccessReport(ctx context.Context, req *adminpb.RunAccessReportRequest, opts ...gax.CallOption) (*adminpb.RunAccessReportResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha/%v:runAccessReport", req.GetEntity()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity", url.QueryEscape(req.GetEntity()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).RunAccessReport[0:len((*c.CallOptions).RunAccessReport):len((*c.CallOptions).RunAccessReport)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &adminpb.RunAccessReportResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// AccountIterator manages a stream of *adminpb.Account. +type AccountIterator struct { + items []*adminpb.Account + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*adminpb.Account, nextPageToken string, err error) +} // PageInfo supports pagination. See the google.golang.org/api/iterator package for details. func (it *AccountIterator) PageInfo() *iterator.PageInfo { @@ -8813,6 +9813,53 @@ func (it *AccountSummaryIterator) takeBuf() interface{} { return b } +// AudienceIterator manages a stream of *adminpb.Audience. +type AudienceIterator struct { + items []*adminpb.Audience + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*adminpb.Audience, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *AudienceIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *AudienceIterator) Next() (*adminpb.Audience, error) { + var item *adminpb.Audience + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *AudienceIterator) bufLen() int { + return len(it.items) +} + +func (it *AudienceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // AuditUserLinkIterator manages a stream of *adminpb.AuditUserLink. type AuditUserLinkIterator struct { items []*adminpb.AuditUserLink diff --git a/analytics/admin/apiv1alpha/analytics_admin_client_example_test.go b/analytics/admin/apiv1alpha/analytics_admin_client_example_test.go index c5183221f6ca..86d8ed4da82e 100644 --- a/analytics/admin/apiv1alpha/analytics_admin_client_example_test.go +++ b/analytics/admin/apiv1alpha/analytics_admin_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAnalyticsAdminClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAnalyticsAdminClient() { func ExampleNewAnalyticsAdminRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewAnalyticsAdminRESTClient() { func ExampleAnalyticsAdminClient_GetAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleAnalyticsAdminClient_GetAccount() { func ExampleAnalyticsAdminClient_ListAccounts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +116,11 @@ func ExampleAnalyticsAdminClient_ListAccounts() { func ExampleAnalyticsAdminClient_DeleteAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -114,6 +139,11 @@ func ExampleAnalyticsAdminClient_DeleteAccount() { func ExampleAnalyticsAdminClient_UpdateAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +164,11 @@ func ExampleAnalyticsAdminClient_UpdateAccount() { func ExampleAnalyticsAdminClient_ProvisionAccountTicket() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -154,6 +189,11 @@ func ExampleAnalyticsAdminClient_ProvisionAccountTicket() { func ExampleAnalyticsAdminClient_ListAccountSummaries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +220,11 @@ func ExampleAnalyticsAdminClient_ListAccountSummaries() { func ExampleAnalyticsAdminClient_GetProperty() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -200,6 +245,11 @@ func ExampleAnalyticsAdminClient_GetProperty() { func ExampleAnalyticsAdminClient_ListProperties() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +276,11 @@ func ExampleAnalyticsAdminClient_ListProperties() { func ExampleAnalyticsAdminClient_CreateProperty() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +301,11 @@ func ExampleAnalyticsAdminClient_CreateProperty() { func ExampleAnalyticsAdminClient_DeleteProperty() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +326,11 @@ func ExampleAnalyticsAdminClient_DeleteProperty() { func ExampleAnalyticsAdminClient_UpdateProperty() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -286,6 +351,11 @@ func ExampleAnalyticsAdminClient_UpdateProperty() { func ExampleAnalyticsAdminClient_GetUserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -306,6 +376,11 @@ func ExampleAnalyticsAdminClient_GetUserLink() { func ExampleAnalyticsAdminClient_BatchGetUserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -326,6 +401,11 @@ func ExampleAnalyticsAdminClient_BatchGetUserLinks() { func ExampleAnalyticsAdminClient_ListUserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -352,6 +432,11 @@ func ExampleAnalyticsAdminClient_ListUserLinks() { func ExampleAnalyticsAdminClient_AuditUserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -378,6 +463,11 @@ func ExampleAnalyticsAdminClient_AuditUserLinks() { func ExampleAnalyticsAdminClient_CreateUserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -398,6 +488,11 @@ func ExampleAnalyticsAdminClient_CreateUserLink() { func ExampleAnalyticsAdminClient_BatchCreateUserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -418,6 +513,11 @@ func ExampleAnalyticsAdminClient_BatchCreateUserLinks() { func ExampleAnalyticsAdminClient_UpdateUserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +538,11 @@ func ExampleAnalyticsAdminClient_UpdateUserLink() { func ExampleAnalyticsAdminClient_BatchUpdateUserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -458,6 +563,11 @@ func ExampleAnalyticsAdminClient_BatchUpdateUserLinks() { func ExampleAnalyticsAdminClient_DeleteUserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -476,6 +586,11 @@ func ExampleAnalyticsAdminClient_DeleteUserLink() { func ExampleAnalyticsAdminClient_BatchDeleteUserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -494,6 +609,11 @@ func ExampleAnalyticsAdminClient_BatchDeleteUserLinks() { func ExampleAnalyticsAdminClient_CreateFirebaseLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -514,6 +634,11 @@ func ExampleAnalyticsAdminClient_CreateFirebaseLink() { func ExampleAnalyticsAdminClient_DeleteFirebaseLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -532,6 +657,11 @@ func ExampleAnalyticsAdminClient_DeleteFirebaseLink() { func ExampleAnalyticsAdminClient_ListFirebaseLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -558,6 +688,11 @@ func ExampleAnalyticsAdminClient_ListFirebaseLinks() { func ExampleAnalyticsAdminClient_GetGlobalSiteTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -578,6 +713,11 @@ func ExampleAnalyticsAdminClient_GetGlobalSiteTag() { func ExampleAnalyticsAdminClient_CreateGoogleAdsLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -598,6 +738,11 @@ func ExampleAnalyticsAdminClient_CreateGoogleAdsLink() { func ExampleAnalyticsAdminClient_UpdateGoogleAdsLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -618,6 +763,11 @@ func ExampleAnalyticsAdminClient_UpdateGoogleAdsLink() { func ExampleAnalyticsAdminClient_DeleteGoogleAdsLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -636,6 +786,11 @@ func ExampleAnalyticsAdminClient_DeleteGoogleAdsLink() { func ExampleAnalyticsAdminClient_ListGoogleAdsLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -662,6 +817,11 @@ func ExampleAnalyticsAdminClient_ListGoogleAdsLinks() { func ExampleAnalyticsAdminClient_GetDataSharingSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -682,6 +842,11 @@ func ExampleAnalyticsAdminClient_GetDataSharingSettings() { func ExampleAnalyticsAdminClient_GetMeasurementProtocolSecret() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -702,6 +867,11 @@ func ExampleAnalyticsAdminClient_GetMeasurementProtocolSecret() { func ExampleAnalyticsAdminClient_ListMeasurementProtocolSecrets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -728,6 +898,11 @@ func ExampleAnalyticsAdminClient_ListMeasurementProtocolSecrets() { func ExampleAnalyticsAdminClient_CreateMeasurementProtocolSecret() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -748,6 +923,11 @@ func ExampleAnalyticsAdminClient_CreateMeasurementProtocolSecret() { func ExampleAnalyticsAdminClient_DeleteMeasurementProtocolSecret() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -766,6 +946,11 @@ func ExampleAnalyticsAdminClient_DeleteMeasurementProtocolSecret() { func ExampleAnalyticsAdminClient_UpdateMeasurementProtocolSecret() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -786,6 +971,11 @@ func ExampleAnalyticsAdminClient_UpdateMeasurementProtocolSecret() { func ExampleAnalyticsAdminClient_AcknowledgeUserDataCollection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -806,6 +996,11 @@ func ExampleAnalyticsAdminClient_AcknowledgeUserDataCollection() { func ExampleAnalyticsAdminClient_SearchChangeHistoryEvents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -832,6 +1027,11 @@ func ExampleAnalyticsAdminClient_SearchChangeHistoryEvents() { func ExampleAnalyticsAdminClient_GetGoogleSignalsSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -852,6 +1052,11 @@ func ExampleAnalyticsAdminClient_GetGoogleSignalsSettings() { func ExampleAnalyticsAdminClient_UpdateGoogleSignalsSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -872,6 +1077,11 @@ func ExampleAnalyticsAdminClient_UpdateGoogleSignalsSettings() { func ExampleAnalyticsAdminClient_CreateConversionEvent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -892,6 +1102,11 @@ func ExampleAnalyticsAdminClient_CreateConversionEvent() { func ExampleAnalyticsAdminClient_GetConversionEvent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -912,6 +1127,11 @@ func ExampleAnalyticsAdminClient_GetConversionEvent() { func ExampleAnalyticsAdminClient_DeleteConversionEvent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -930,6 +1150,11 @@ func ExampleAnalyticsAdminClient_DeleteConversionEvent() { func ExampleAnalyticsAdminClient_ListConversionEvents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -956,6 +1181,11 @@ func ExampleAnalyticsAdminClient_ListConversionEvents() { func ExampleAnalyticsAdminClient_GetDisplayVideo360AdvertiserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -976,6 +1206,11 @@ func ExampleAnalyticsAdminClient_GetDisplayVideo360AdvertiserLink() { func ExampleAnalyticsAdminClient_ListDisplayVideo360AdvertiserLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1002,6 +1237,11 @@ func ExampleAnalyticsAdminClient_ListDisplayVideo360AdvertiserLinks() { func ExampleAnalyticsAdminClient_CreateDisplayVideo360AdvertiserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1022,6 +1262,11 @@ func ExampleAnalyticsAdminClient_CreateDisplayVideo360AdvertiserLink() { func ExampleAnalyticsAdminClient_DeleteDisplayVideo360AdvertiserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1040,6 +1285,11 @@ func ExampleAnalyticsAdminClient_DeleteDisplayVideo360AdvertiserLink() { func ExampleAnalyticsAdminClient_UpdateDisplayVideo360AdvertiserLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1060,6 +1310,11 @@ func ExampleAnalyticsAdminClient_UpdateDisplayVideo360AdvertiserLink() { func ExampleAnalyticsAdminClient_GetDisplayVideo360AdvertiserLinkProposal() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1080,6 +1335,11 @@ func ExampleAnalyticsAdminClient_GetDisplayVideo360AdvertiserLinkProposal() { func ExampleAnalyticsAdminClient_ListDisplayVideo360AdvertiserLinkProposals() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1106,6 +1366,11 @@ func ExampleAnalyticsAdminClient_ListDisplayVideo360AdvertiserLinkProposals() { func ExampleAnalyticsAdminClient_CreateDisplayVideo360AdvertiserLinkProposal() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1126,6 +1391,11 @@ func ExampleAnalyticsAdminClient_CreateDisplayVideo360AdvertiserLinkProposal() { func ExampleAnalyticsAdminClient_DeleteDisplayVideo360AdvertiserLinkProposal() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1144,6 +1414,11 @@ func ExampleAnalyticsAdminClient_DeleteDisplayVideo360AdvertiserLinkProposal() { func ExampleAnalyticsAdminClient_ApproveDisplayVideo360AdvertiserLinkProposal() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1164,6 +1439,11 @@ func ExampleAnalyticsAdminClient_ApproveDisplayVideo360AdvertiserLinkProposal() func ExampleAnalyticsAdminClient_CancelDisplayVideo360AdvertiserLinkProposal() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1184,6 +1464,11 @@ func ExampleAnalyticsAdminClient_CancelDisplayVideo360AdvertiserLinkProposal() { func ExampleAnalyticsAdminClient_CreateCustomDimension() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1204,6 +1489,11 @@ func ExampleAnalyticsAdminClient_CreateCustomDimension() { func ExampleAnalyticsAdminClient_UpdateCustomDimension() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1224,6 +1514,11 @@ func ExampleAnalyticsAdminClient_UpdateCustomDimension() { func ExampleAnalyticsAdminClient_ListCustomDimensions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1250,6 +1545,11 @@ func ExampleAnalyticsAdminClient_ListCustomDimensions() { func ExampleAnalyticsAdminClient_ArchiveCustomDimension() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1268,6 +1568,11 @@ func ExampleAnalyticsAdminClient_ArchiveCustomDimension() { func ExampleAnalyticsAdminClient_GetCustomDimension() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1288,6 +1593,11 @@ func ExampleAnalyticsAdminClient_GetCustomDimension() { func ExampleAnalyticsAdminClient_CreateCustomMetric() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1308,6 +1618,11 @@ func ExampleAnalyticsAdminClient_CreateCustomMetric() { func ExampleAnalyticsAdminClient_UpdateCustomMetric() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1328,6 +1643,11 @@ func ExampleAnalyticsAdminClient_UpdateCustomMetric() { func ExampleAnalyticsAdminClient_ListCustomMetrics() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1354,6 +1674,11 @@ func ExampleAnalyticsAdminClient_ListCustomMetrics() { func ExampleAnalyticsAdminClient_ArchiveCustomMetric() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1372,6 +1697,11 @@ func ExampleAnalyticsAdminClient_ArchiveCustomMetric() { func ExampleAnalyticsAdminClient_GetCustomMetric() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1392,6 +1722,11 @@ func ExampleAnalyticsAdminClient_GetCustomMetric() { func ExampleAnalyticsAdminClient_GetDataRetentionSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1412,6 +1747,11 @@ func ExampleAnalyticsAdminClient_GetDataRetentionSettings() { func ExampleAnalyticsAdminClient_UpdateDataRetentionSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1432,6 +1772,11 @@ func ExampleAnalyticsAdminClient_UpdateDataRetentionSettings() { func ExampleAnalyticsAdminClient_CreateDataStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1452,6 +1797,11 @@ func ExampleAnalyticsAdminClient_CreateDataStream() { func ExampleAnalyticsAdminClient_DeleteDataStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1470,6 +1820,11 @@ func ExampleAnalyticsAdminClient_DeleteDataStream() { func ExampleAnalyticsAdminClient_UpdateDataStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1490,6 +1845,11 @@ func ExampleAnalyticsAdminClient_UpdateDataStream() { func ExampleAnalyticsAdminClient_ListDataStreams() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1516,6 +1876,11 @@ func ExampleAnalyticsAdminClient_ListDataStreams() { func ExampleAnalyticsAdminClient_GetDataStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewAnalyticsAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -1533,3 +1898,207 @@ func ExampleAnalyticsAdminClient_GetDataStream() { // TODO: Use resp. _ = resp } + +func ExampleAnalyticsAdminClient_GetAudience() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.GetAudienceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAudienceRequest. + } + resp, err := c.GetAudience(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnalyticsAdminClient_ListAudiences() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.ListAudiencesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ListAudiencesRequest. + } + it := c.ListAudiences(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAnalyticsAdminClient_CreateAudience() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.CreateAudienceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#CreateAudienceRequest. + } + resp, err := c.CreateAudience(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnalyticsAdminClient_UpdateAudience() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.UpdateAudienceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateAudienceRequest. + } + resp, err := c.UpdateAudience(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnalyticsAdminClient_ArchiveAudience() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.ArchiveAudienceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#ArchiveAudienceRequest. + } + err = c.ArchiveAudience(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAnalyticsAdminClient_GetAttributionSettings() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.GetAttributionSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAttributionSettingsRequest. + } + resp, err := c.GetAttributionSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnalyticsAdminClient_UpdateAttributionSettings() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.UpdateAttributionSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#UpdateAttributionSettingsRequest. + } + resp, err := c.UpdateAttributionSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnalyticsAdminClient_RunAccessReport() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := admin.NewAnalyticsAdminClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &adminpb.RunAccessReportRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#RunAccessReportRequest. + } + resp, err := c.RunAccessReport(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/analytics/admin/apiv1alpha/doc.go b/analytics/admin/apiv1alpha/doc.go index f11b4c761a23..01201b755eed 100644 --- a/analytics/admin/apiv1alpha/doc.go +++ b/analytics/admin/apiv1alpha/doc.go @@ -17,47 +17,58 @@ // Package admin is an auto-generated package for the // Google Analytics Admin API. // -// NOTE: This package is in alpha. It is not stable, and is likely to change. +// NOTE: This package is in alpha. It is not stable, and is likely to change. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := admin.NewAnalyticsAdminClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := admin.NewAnalyticsAdminClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := admin.NewAnalyticsAdminClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &adminpb.GetAccountRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAccountRequest. -// } -// resp, err := c.GetAccount(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := admin.NewAnalyticsAdminClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &adminpb.GetAccountRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/analytics/admin/v1alpha#GetAccountRequest. +// } +// resp, err := c.GetAccount(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewAnalyticsAdminClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/analytics/admin/apiv1alpha/gapic_metadata.json b/analytics/admin/apiv1alpha/gapic_metadata.json index 2d48d9f6a985..610a0f2de8ed 100644 --- a/analytics/admin/apiv1alpha/gapic_metadata.json +++ b/analytics/admin/apiv1alpha/gapic_metadata.json @@ -20,6 +20,11 @@ "ApproveDisplayVideo360AdvertiserLinkProposal" ] }, + "ArchiveAudience": { + "methods": [ + "ArchiveAudience" + ] + }, "ArchiveCustomDimension": { "methods": [ "ArchiveCustomDimension" @@ -60,6 +65,11 @@ "CancelDisplayVideo360AdvertiserLinkProposal" ] }, + "CreateAudience": { + "methods": [ + "CreateAudience" + ] + }, "CreateConversionEvent": { "methods": [ "CreateConversionEvent" @@ -170,6 +180,16 @@ "GetAccount" ] }, + "GetAttributionSettings": { + "methods": [ + "GetAttributionSettings" + ] + }, + "GetAudience": { + "methods": [ + "GetAudience" + ] + }, "GetConversionEvent": { "methods": [ "GetConversionEvent" @@ -245,6 +265,11 @@ "ListAccounts" ] }, + "ListAudiences": { + "methods": [ + "ListAudiences" + ] + }, "ListConversionEvents": { "methods": [ "ListConversionEvents" @@ -305,6 +330,11 @@ "ProvisionAccountTicket" ] }, + "RunAccessReport": { + "methods": [ + "RunAccessReport" + ] + }, "SearchChangeHistoryEvents": { "methods": [ "SearchChangeHistoryEvents" @@ -315,6 +345,16 @@ "UpdateAccount" ] }, + "UpdateAttributionSettings": { + "methods": [ + "UpdateAttributionSettings" + ] + }, + "UpdateAudience": { + "methods": [ + "UpdateAudience" + ] + }, "UpdateCustomDimension": { "methods": [ "UpdateCustomDimension" @@ -380,6 +420,11 @@ "ApproveDisplayVideo360AdvertiserLinkProposal" ] }, + "ArchiveAudience": { + "methods": [ + "ArchiveAudience" + ] + }, "ArchiveCustomDimension": { "methods": [ "ArchiveCustomDimension" @@ -420,6 +465,11 @@ "CancelDisplayVideo360AdvertiserLinkProposal" ] }, + "CreateAudience": { + "methods": [ + "CreateAudience" + ] + }, "CreateConversionEvent": { "methods": [ "CreateConversionEvent" @@ -530,6 +580,16 @@ "GetAccount" ] }, + "GetAttributionSettings": { + "methods": [ + "GetAttributionSettings" + ] + }, + "GetAudience": { + "methods": [ + "GetAudience" + ] + }, "GetConversionEvent": { "methods": [ "GetConversionEvent" @@ -605,6 +665,11 @@ "ListAccounts" ] }, + "ListAudiences": { + "methods": [ + "ListAudiences" + ] + }, "ListConversionEvents": { "methods": [ "ListConversionEvents" @@ -665,6 +730,11 @@ "ProvisionAccountTicket" ] }, + "RunAccessReport": { + "methods": [ + "RunAccessReport" + ] + }, "SearchChangeHistoryEvents": { "methods": [ "SearchChangeHistoryEvents" @@ -675,6 +745,16 @@ "UpdateAccount" ] }, + "UpdateAttributionSettings": { + "methods": [ + "UpdateAttributionSettings" + ] + }, + "UpdateAudience": { + "methods": [ + "UpdateAudience" + ] + }, "UpdateCustomDimension": { "methods": [ "UpdateCustomDimension" diff --git a/analytics/go.mod b/analytics/go.mod index e3b5786b8922..b263b53284e7 100644 --- a/analytics/go.mod +++ b/analytics/go.mod @@ -1,12 +1,25 @@ module cloud.google.com/go/analytics -go 1.16 +go 1.17 require ( - cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.96.0 + google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/analytics/go.sum b/analytics/go.sum index ece2e0dfe308..676579e3fa7e 100644 --- a/analytics/go.sum +++ b/analytics/go.sum @@ -30,6 +30,7 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -50,6 +51,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -162,6 +164,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +293,9 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +315,11 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +390,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +505,9 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -586,8 +595,10 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694 h1:itnFmgk4Ls5nT+mYO2ZK6F0DpKsGZLhB5BB9y5ZL2HA= -google.golang.org/genproto v0.0.0-20220623142657-077d458a5694/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de h1:5ANeKFmGdtiputJJYeUVg8nTGA/1bEirx4CgzcnPSx8= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -618,8 +629,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -634,8 +646,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/analytics/go_mod_tidy_hack.go b/analytics/go_mod_tidy_hack.go deleted file mode 100644 index 21ab77910ea1..000000000000 --- a/analytics/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package analytics - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/analytics/internal/version.go b/analytics/internal/version.go index 13047498bea9..fa4dc39c746e 100644 --- a/analytics/internal/version.go +++ b/analytics/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.8.0" +const Version = "0.11.0" diff --git a/apigateway/apiv1/api_gateway_client.go b/apigateway/apiv1/api_gateway_client.go index 7e68151886c9..84cb1325a945 100644 --- a/apigateway/apiv1/api_gateway_client.go +++ b/apigateway/apiv1/api_gateway_client.go @@ -255,7 +255,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -465,7 +466,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/apigateway/apiv1/api_gateway_client_example_test.go b/apigateway/apiv1/api_gateway_client_example_test.go index 8609cddb2ba2..956d9d5c9589 100644 --- a/apigateway/apiv1/api_gateway_client_example_test.go +++ b/apigateway/apiv1/api_gateway_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_ListGateways() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleClient_ListGateways() { func ExampleClient_GetGateway() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleClient_GetGateway() { func ExampleClient_CreateGateway() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleClient_CreateGateway() { func ExampleClient_UpdateGateway() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +159,11 @@ func ExampleClient_UpdateGateway() { func ExampleClient_DeleteGateway() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +187,11 @@ func ExampleClient_DeleteGateway() { func ExampleClient_ListApis() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +218,11 @@ func ExampleClient_ListApis() { func ExampleClient_GetApi() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +243,11 @@ func ExampleClient_GetApi() { func ExampleClient_CreateApi() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +273,11 @@ func ExampleClient_CreateApi() { func ExampleClient_UpdateApi() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -253,6 +303,11 @@ func ExampleClient_UpdateApi() { func ExampleClient_DeleteApi() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +331,11 @@ func ExampleClient_DeleteApi() { func ExampleClient_ListApiConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +362,11 @@ func ExampleClient_ListApiConfigs() { func ExampleClient_GetApiConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +387,11 @@ func ExampleClient_GetApiConfig() { func ExampleClient_CreateApiConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +417,11 @@ func ExampleClient_CreateApiConfig() { func ExampleClient_UpdateApiConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +447,11 @@ func ExampleClient_UpdateApiConfig() { func ExampleClient_DeleteApiConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigateway.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/apigateway/apiv1/doc.go b/apigateway/apiv1/doc.go index 8c071ead5150..a08c0c3775eb 100644 --- a/apigateway/apiv1/doc.go +++ b/apigateway/apiv1/doc.go @@ -17,49 +17,60 @@ // Package apigateway is an auto-generated package for the // API Gateway API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := apigateway.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apigateway.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := apigateway.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apigateway.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &apigatewaypb.ListGatewaysRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigateway/v1#ListGatewaysRequest. -// } -// it := c.ListGateways(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } +// req := &apigatewaypb.ListGatewaysRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigateway/v1#ListGatewaysRequest. +// } +// it := c.ListGateways(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } // -// Use of Context +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/apigateway/go.mod b/apigateway/go.mod index cb3b5f6f3b80..d97a0c733bbe 100644 --- a/apigateway/go.mod +++ b/apigateway/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/apigateway -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/apigateway/go.sum b/apigateway/go.sum index f00d995cec43..fe8755ea9d8f 100644 --- a/apigateway/go.sum +++ b/apigateway/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +621,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +638,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/apigeeconnect/apiv1/connection_client.go b/apigeeconnect/apiv1/connection_client.go index aa7269a35686..17c0e62ab7bd 100644 --- a/apigeeconnect/apiv1/connection_client.go +++ b/apigeeconnect/apiv1/connection_client.go @@ -108,7 +108,8 @@ func (c *ConnectionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ConnectionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -179,7 +180,8 @@ func NewConnectionClient(ctx context.Context, opts ...option.ClientOption) (*Con // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *connectionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/apigeeconnect/apiv1/connection_client_example_test.go b/apigeeconnect/apiv1/connection_client_example_test.go index ea8be46b7238..25a736036f43 100644 --- a/apigeeconnect/apiv1/connection_client_example_test.go +++ b/apigeeconnect/apiv1/connection_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewConnectionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigeeconnect.NewConnectionClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewConnectionClient() { func ExampleConnectionClient_ListConnections() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigeeconnect.NewConnectionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/apigeeconnect/apiv1/doc.go b/apigeeconnect/apiv1/doc.go index 496baad05120..3d3be378fae7 100644 --- a/apigeeconnect/apiv1/doc.go +++ b/apigeeconnect/apiv1/doc.go @@ -17,51 +17,62 @@ // Package apigeeconnect is an auto-generated package for the // Apigee Connect API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := apigeeconnect.NewConnectionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apigeeconnect.NewConnectionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := apigeeconnect.NewConnectionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apigeeconnect.NewConnectionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &apigeeconnectpb.ListConnectionsRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeconnect/v1#ListConnectionsRequest. -// } -// it := c.ListConnections(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } +// req := &apigeeconnectpb.ListConnectionsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeconnect/v1#ListConnectionsRequest. +// } +// it := c.ListConnections(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } // -// Use of Context +// # Use of Context // -// The ctx passed to NewClient is used for authentication requests and +// The ctx passed to NewConnectionClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/apigeeconnect/apiv1/tether_client.go b/apigeeconnect/apiv1/tether_client.go index b6d8ef68c8be..c644e8b2c776 100644 --- a/apigeeconnect/apiv1/tether_client.go +++ b/apigeeconnect/apiv1/tether_client.go @@ -93,7 +93,8 @@ func (c *TetherClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TetherClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -171,7 +172,8 @@ func NewTetherClient(ctx context.Context, opts ...option.ClientOption) (*TetherC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *tetherGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/apigeeconnect/apiv1/tether_client_example_test.go b/apigeeconnect/apiv1/tether_client_example_test.go index 28c2744a1d9c..0c98681c5a56 100644 --- a/apigeeconnect/apiv1/tether_client_example_test.go +++ b/apigeeconnect/apiv1/tether_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTetherClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigeeconnect.NewTetherClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTetherClient() { func ExampleTetherClient_Egress() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := apigeeconnect.NewTetherClient(ctx) if err != nil { // TODO: Handle error. diff --git a/apigeeconnect/go.mod b/apigeeconnect/go.mod index fd44d8a15ac1..2b28c00169ff 100644 --- a/apigeeconnect/go.mod +++ b/apigeeconnect/go.mod @@ -1,11 +1,25 @@ module cloud.google.com/go/apigeeconnect -go 1.16 +go 1.17 require ( github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/apigeeconnect/go.sum b/apigeeconnect/go.sum index a7f80a16a22d..e75fb777b024 100644 --- a/apigeeconnect/go.sum +++ b/apigeeconnect/go.sum @@ -161,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -289,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -310,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -496,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -584,8 +587,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -616,8 +620,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -632,8 +637,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/apigeeregistry/CHANGES.md b/apigeeregistry/CHANGES.md new file mode 100644 index 000000000000..9304dae298b7 --- /dev/null +++ b/apigeeregistry/CHANGES.md @@ -0,0 +1,22 @@ +# Changelog + +## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/apigeeregistry/v0.2.0...apigeeregistry/v0.2.1) (2022-09-08) + + +### Bug Fixes + +* **apigeeregistry:** additional error codes added to service configuration for retry ([e45ad9a](https://github.com/googleapis/google-cloud-go/commit/e45ad9af568c59151decc0dacedf137653b576dd)) + +## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/apigeeregistry/v0.1.0...apigeeregistry/v0.2.0) (2022-08-23) + + +### Features + +* **apigeeregistry:** added support for `force` field for API and API version deletion docs: updated proto comments to align with the public documentation ([a810c78](https://github.com/googleapis/google-cloud-go/commit/a810c7819a1671573aa3a3051c8830e5904f488e)) + +## 0.1.0 (2022-08-02) + + +### Features + +* **apigeeregistry:** start generating apiv1 ([#6463](https://github.com/googleapis/google-cloud-go/issues/6463)) ([55385cb](https://github.com/googleapis/google-cloud-go/commit/55385cbd1a324745b2f2f7b72b2fa33cb34c9cb5)) diff --git a/apigeeregistry/README.md b/apigeeregistry/README.md new file mode 100644 index 000000000000..b2f5b6e10a12 --- /dev/null +++ b/apigeeregistry/README.md @@ -0,0 +1,44 @@ +# Apigee Registry API + +[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/apigeeregistry.svg)](https://pkg.go.dev/cloud.google.com/go/apigeeregistry) + +Go Client Library for Apigee Registry API. + +## Install + +```bash +go get cloud.google.com/go/apigeeregistry +``` + +## Stability + +The stability of this module is indicated by SemVer. + +However, a `v1+` module may have breaking changes in two scenarios: + +* Packages with `alpha` or `beta` in the import path +* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). + +## Go Version Support + +See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) +section in the root directory's README. + +## Authorization + +See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) +section in the root directory's README. + +## Contributing + +Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) +document for details. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. See +[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. diff --git a/apigeeregistry/apiv1/doc.go b/apigeeregistry/apiv1/doc.go new file mode 100644 index 000000000000..de5cb3edfee3 --- /dev/null +++ b/apigeeregistry/apiv1/doc.go @@ -0,0 +1,175 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package apigeeregistry is an auto-generated package for the +// Apigee Registry API. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apigeeregistry.NewProvisioningClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apigeeregistry.NewProvisioningClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &apigeeregistrypb.CreateInstanceRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateInstanceRequest. +// } +// op, err := c.CreateInstance(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewProvisioningClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package apigeeregistry // import "cloud.google.com/go/apigeeregistry/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/apigeeregistry/apiv1/gapic_metadata.json b/apigeeregistry/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..6bad74acdc91 --- /dev/null +++ b/apigeeregistry/apiv1/gapic_metadata.json @@ -0,0 +1,307 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.apigeeregistry.v1", + "libraryPackage": "cloud.google.com/go/apigeeregistry/apiv1", + "services": { + "Provisioning": { + "clients": { + "grpc": { + "libraryClient": "ProvisioningClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateInstance": { + "methods": [ + "CreateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "DeleteInstance" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetInstance": { + "methods": [ + "GetInstance" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + } + } + } + } + }, + "Registry": { + "clients": { + "grpc": { + "libraryClient": "RegistryClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateApi": { + "methods": [ + "CreateApi" + ] + }, + "CreateApiDeployment": { + "methods": [ + "CreateApiDeployment" + ] + }, + "CreateApiSpec": { + "methods": [ + "CreateApiSpec" + ] + }, + "CreateApiVersion": { + "methods": [ + "CreateApiVersion" + ] + }, + "CreateArtifact": { + "methods": [ + "CreateArtifact" + ] + }, + "DeleteApi": { + "methods": [ + "DeleteApi" + ] + }, + "DeleteApiDeployment": { + "methods": [ + "DeleteApiDeployment" + ] + }, + "DeleteApiDeploymentRevision": { + "methods": [ + "DeleteApiDeploymentRevision" + ] + }, + "DeleteApiSpec": { + "methods": [ + "DeleteApiSpec" + ] + }, + "DeleteApiSpecRevision": { + "methods": [ + "DeleteApiSpecRevision" + ] + }, + "DeleteApiVersion": { + "methods": [ + "DeleteApiVersion" + ] + }, + "DeleteArtifact": { + "methods": [ + "DeleteArtifact" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetApi": { + "methods": [ + "GetApi" + ] + }, + "GetApiDeployment": { + "methods": [ + "GetApiDeployment" + ] + }, + "GetApiSpec": { + "methods": [ + "GetApiSpec" + ] + }, + "GetApiSpecContents": { + "methods": [ + "GetApiSpecContents" + ] + }, + "GetApiVersion": { + "methods": [ + "GetApiVersion" + ] + }, + "GetArtifact": { + "methods": [ + "GetArtifact" + ] + }, + "GetArtifactContents": { + "methods": [ + "GetArtifactContents" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListApiDeploymentRevisions": { + "methods": [ + "ListApiDeploymentRevisions" + ] + }, + "ListApiDeployments": { + "methods": [ + "ListApiDeployments" + ] + }, + "ListApiSpecRevisions": { + "methods": [ + "ListApiSpecRevisions" + ] + }, + "ListApiSpecs": { + "methods": [ + "ListApiSpecs" + ] + }, + "ListApiVersions": { + "methods": [ + "ListApiVersions" + ] + }, + "ListApis": { + "methods": [ + "ListApis" + ] + }, + "ListArtifacts": { + "methods": [ + "ListArtifacts" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ReplaceArtifact": { + "methods": [ + "ReplaceArtifact" + ] + }, + "RollbackApiDeployment": { + "methods": [ + "RollbackApiDeployment" + ] + }, + "RollbackApiSpec": { + "methods": [ + "RollbackApiSpec" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TagApiDeploymentRevision": { + "methods": [ + "TagApiDeploymentRevision" + ] + }, + "TagApiSpecRevision": { + "methods": [ + "TagApiSpecRevision" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateApi": { + "methods": [ + "UpdateApi" + ] + }, + "UpdateApiDeployment": { + "methods": [ + "UpdateApiDeployment" + ] + }, + "UpdateApiSpec": { + "methods": [ + "UpdateApiSpec" + ] + }, + "UpdateApiVersion": { + "methods": [ + "UpdateApiVersion" + ] + } + } + } + } + } + } +} diff --git a/apigeeregistry/apiv1/provisioning_client.go b/apigeeregistry/apiv1/provisioning_client.go new file mode 100644 index 000000000000..63159a0e1f17 --- /dev/null +++ b/apigeeregistry/apiv1/provisioning_client.go @@ -0,0 +1,816 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package apigeeregistry + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + apigeeregistrypb "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newProvisioningClientHook clientHook + +// ProvisioningCallOptions contains the retry settings for each method of ProvisioningClient. +type ProvisioningCallOptions struct { + CreateInstance []gax.CallOption + DeleteInstance []gax.CallOption + GetInstance []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultProvisioningGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("apigeeregistry.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("apigeeregistry.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://apigeeregistry.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultProvisioningCallOptions() *ProvisioningCallOptions { + return &ProvisioningCallOptions{ + CreateInstance: []gax.CallOption{}, + DeleteInstance: []gax.CallOption{}, + GetInstance: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalProvisioningClient is an interface that defines the methods available from Apigee Registry API. +type internalProvisioningClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateInstance(context.Context, *apigeeregistrypb.CreateInstanceRequest, ...gax.CallOption) (*CreateInstanceOperation, error) + CreateInstanceOperation(name string) *CreateInstanceOperation + DeleteInstance(context.Context, *apigeeregistrypb.DeleteInstanceRequest, ...gax.CallOption) (*DeleteInstanceOperation, error) + DeleteInstanceOperation(name string) *DeleteInstanceOperation + GetInstance(context.Context, *apigeeregistrypb.GetInstanceRequest, ...gax.CallOption) (*apigeeregistrypb.Instance, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// ProvisioningClient is a client for interacting with Apigee Registry API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// The service that is used for managing the data plane provisioning of the +// Registry. +type ProvisioningClient struct { + // The internal transport-dependent client. + internalClient internalProvisioningClient + + // The call options for this service. + CallOptions *ProvisioningCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *ProvisioningClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *ProvisioningClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *ProvisioningClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateInstance provisions instance resources for the Registry. +func (c *ProvisioningClient) CreateInstance(ctx context.Context, req *apigeeregistrypb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) { + return c.internalClient.CreateInstance(ctx, req, opts...) +} + +// CreateInstanceOperation returns a new CreateInstanceOperation from a given name. +// The name must be that of a previously created CreateInstanceOperation, possibly from a different process. +func (c *ProvisioningClient) CreateInstanceOperation(name string) *CreateInstanceOperation { + return c.internalClient.CreateInstanceOperation(name) +} + +// DeleteInstance deletes the Registry instance. +func (c *ProvisioningClient) DeleteInstance(ctx context.Context, req *apigeeregistrypb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error) { + return c.internalClient.DeleteInstance(ctx, req, opts...) +} + +// DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. +// The name must be that of a previously created DeleteInstanceOperation, possibly from a different process. +func (c *ProvisioningClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation { + return c.internalClient.DeleteInstanceOperation(name) +} + +// GetInstance gets details of a single Instance. +func (c *ProvisioningClient) GetInstance(ctx context.Context, req *apigeeregistrypb.GetInstanceRequest, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error) { + return c.internalClient.GetInstance(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *ProvisioningClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ProvisioningClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *ProvisioningClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *ProvisioningClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *ProvisioningClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ProvisioningClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *ProvisioningClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ProvisioningClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ProvisioningClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// provisioningGRPCClient is a client for interacting with Apigee Registry API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type provisioningGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing ProvisioningClient + CallOptions **ProvisioningCallOptions + + // The gRPC API client. + provisioningClient apigeeregistrypb.ProvisioningClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewProvisioningClient creates a new provisioning client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// The service that is used for managing the data plane provisioning of the +// Registry. +func NewProvisioningClient(ctx context.Context, opts ...option.ClientOption) (*ProvisioningClient, error) { + clientOpts := defaultProvisioningGRPCClientOptions() + if newProvisioningClientHook != nil { + hookOpts, err := newProvisioningClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := ProvisioningClient{CallOptions: defaultProvisioningCallOptions()} + + c := &provisioningGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + provisioningClient: apigeeregistrypb.NewProvisioningClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *provisioningGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *provisioningGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *provisioningGRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *provisioningGRPCClient) CreateInstance(ctx context.Context, req *apigeeregistrypb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateInstance[0:len((*c.CallOptions).CreateInstance):len((*c.CallOptions).CreateInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.provisioningClient.CreateInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *provisioningGRPCClient) DeleteInstance(ctx context.Context, req *apigeeregistrypb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteInstance[0:len((*c.CallOptions).DeleteInstance):len((*c.CallOptions).DeleteInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.provisioningClient.DeleteInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *provisioningGRPCClient) GetInstance(ctx context.Context, req *apigeeregistrypb.GetInstanceRequest, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetInstance[0:len((*c.CallOptions).GetInstance):len((*c.CallOptions).GetInstance)], opts...) + var resp *apigeeregistrypb.Instance + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.provisioningClient.GetInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *provisioningGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *provisioningGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *provisioningGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *provisioningGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *provisioningGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *provisioningGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *provisioningGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *provisioningGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *provisioningGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateInstanceOperation manages a long-running operation from CreateInstance. +type CreateInstanceOperation struct { + lro *longrunning.Operation +} + +// CreateInstanceOperation returns a new CreateInstanceOperation from a given name. +// The name must be that of a previously created CreateInstanceOperation, possibly from a different process. +func (c *provisioningGRPCClient) CreateInstanceOperation(name string) *CreateInstanceOperation { + return &CreateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error) { + var resp apigeeregistrypb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apigeeregistrypb.Instance, error) { + var resp apigeeregistrypb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateInstanceOperation) Metadata() (*apigeeregistrypb.OperationMetadata, error) { + var meta apigeeregistrypb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateInstanceOperation) Name() string { + return op.lro.Name() +} + +// DeleteInstanceOperation manages a long-running operation from DeleteInstance. +type DeleteInstanceOperation struct { + lro *longrunning.Operation +} + +// DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. +// The name must be that of a previously created DeleteInstanceOperation, possibly from a different process. +func (c *provisioningGRPCClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation { + return &DeleteInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteInstanceOperation) Metadata() (*apigeeregistrypb.OperationMetadata, error) { + var meta apigeeregistrypb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteInstanceOperation) Name() string { + return op.lro.Name() +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/apigeeregistry/apiv1/provisioning_client_example_test.go b/apigeeregistry/apiv1/provisioning_client_example_test.go new file mode 100644 index 000000000000..d2f94534293f --- /dev/null +++ b/apigeeregistry/apiv1/provisioning_client_example_test.go @@ -0,0 +1,361 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package apigeeregistry_test + +import ( + "context" + + apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" + "google.golang.org/api/iterator" + apigeeregistrypb "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewProvisioningClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleProvisioningClient_CreateInstance() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.CreateInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateInstanceRequest. + } + op, err := c.CreateInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_DeleteInstance() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteInstanceRequest. + } + op, err := c.DeleteInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleProvisioningClient_GetInstance() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetInstanceRequest. + } + resp, err := c.GetInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleProvisioningClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleProvisioningClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleProvisioningClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleProvisioningClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewProvisioningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/apigeeregistry/apiv1/registry_client.go b/apigeeregistry/apiv1/registry_client.go new file mode 100644 index 000000000000..2b702151c6d3 --- /dev/null +++ b/apigeeregistry/apiv1/registry_client.go @@ -0,0 +1,2349 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package apigeeregistry + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httpbodypb "google.golang.org/genproto/googleapis/api/httpbody" + apigeeregistrypb "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newRegistryClientHook clientHook + +// RegistryCallOptions contains the retry settings for each method of RegistryClient. +type RegistryCallOptions struct { + ListApis []gax.CallOption + GetApi []gax.CallOption + CreateApi []gax.CallOption + UpdateApi []gax.CallOption + DeleteApi []gax.CallOption + ListApiVersions []gax.CallOption + GetApiVersion []gax.CallOption + CreateApiVersion []gax.CallOption + UpdateApiVersion []gax.CallOption + DeleteApiVersion []gax.CallOption + ListApiSpecs []gax.CallOption + GetApiSpec []gax.CallOption + GetApiSpecContents []gax.CallOption + CreateApiSpec []gax.CallOption + UpdateApiSpec []gax.CallOption + DeleteApiSpec []gax.CallOption + TagApiSpecRevision []gax.CallOption + ListApiSpecRevisions []gax.CallOption + RollbackApiSpec []gax.CallOption + DeleteApiSpecRevision []gax.CallOption + ListApiDeployments []gax.CallOption + GetApiDeployment []gax.CallOption + CreateApiDeployment []gax.CallOption + UpdateApiDeployment []gax.CallOption + DeleteApiDeployment []gax.CallOption + TagApiDeploymentRevision []gax.CallOption + ListApiDeploymentRevisions []gax.CallOption + RollbackApiDeployment []gax.CallOption + DeleteApiDeploymentRevision []gax.CallOption + ListArtifacts []gax.CallOption + GetArtifact []gax.CallOption + GetArtifactContents []gax.CallOption + CreateArtifact []gax.CallOption + ReplaceArtifact []gax.CallOption + DeleteArtifact []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultRegistryGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("apigeeregistry.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("apigeeregistry.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://apigeeregistry.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultRegistryCallOptions() *RegistryCallOptions { + return &RegistryCallOptions{ + ListApis: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetApi: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateApi: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateApi: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteApi: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListApiVersions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetApiVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateApiVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateApiVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteApiVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListApiSpecs: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetApiSpec: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetApiSpecContents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateApiSpec: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateApiSpec: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteApiSpec: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + TagApiSpecRevision: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListApiSpecRevisions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + RollbackApiSpec: []gax.CallOption{}, + DeleteApiSpecRevision: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListApiDeployments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetApiDeployment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateApiDeployment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateApiDeployment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteApiDeployment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + TagApiDeploymentRevision: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListApiDeploymentRevisions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + RollbackApiDeployment: []gax.CallOption{}, + DeleteApiDeploymentRevision: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListArtifacts: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetArtifact: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetArtifactContents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateArtifact: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ReplaceArtifact: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteArtifact: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalRegistryClient is an interface that defines the methods available from Apigee Registry API. +type internalRegistryClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListApis(context.Context, *apigeeregistrypb.ListApisRequest, ...gax.CallOption) *ApiIterator + GetApi(context.Context, *apigeeregistrypb.GetApiRequest, ...gax.CallOption) (*apigeeregistrypb.Api, error) + CreateApi(context.Context, *apigeeregistrypb.CreateApiRequest, ...gax.CallOption) (*apigeeregistrypb.Api, error) + UpdateApi(context.Context, *apigeeregistrypb.UpdateApiRequest, ...gax.CallOption) (*apigeeregistrypb.Api, error) + DeleteApi(context.Context, *apigeeregistrypb.DeleteApiRequest, ...gax.CallOption) error + ListApiVersions(context.Context, *apigeeregistrypb.ListApiVersionsRequest, ...gax.CallOption) *ApiVersionIterator + GetApiVersion(context.Context, *apigeeregistrypb.GetApiVersionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) + CreateApiVersion(context.Context, *apigeeregistrypb.CreateApiVersionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) + UpdateApiVersion(context.Context, *apigeeregistrypb.UpdateApiVersionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) + DeleteApiVersion(context.Context, *apigeeregistrypb.DeleteApiVersionRequest, ...gax.CallOption) error + ListApiSpecs(context.Context, *apigeeregistrypb.ListApiSpecsRequest, ...gax.CallOption) *ApiSpecIterator + GetApiSpec(context.Context, *apigeeregistrypb.GetApiSpecRequest, ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) + GetApiSpecContents(context.Context, *apigeeregistrypb.GetApiSpecContentsRequest, ...gax.CallOption) (*httpbodypb.HttpBody, error) + CreateApiSpec(context.Context, *apigeeregistrypb.CreateApiSpecRequest, ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) + UpdateApiSpec(context.Context, *apigeeregistrypb.UpdateApiSpecRequest, ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) + DeleteApiSpec(context.Context, *apigeeregistrypb.DeleteApiSpecRequest, ...gax.CallOption) error + TagApiSpecRevision(context.Context, *apigeeregistrypb.TagApiSpecRevisionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) + ListApiSpecRevisions(context.Context, *apigeeregistrypb.ListApiSpecRevisionsRequest, ...gax.CallOption) *ApiSpecIterator + RollbackApiSpec(context.Context, *apigeeregistrypb.RollbackApiSpecRequest, ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) + DeleteApiSpecRevision(context.Context, *apigeeregistrypb.DeleteApiSpecRevisionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) + ListApiDeployments(context.Context, *apigeeregistrypb.ListApiDeploymentsRequest, ...gax.CallOption) *ApiDeploymentIterator + GetApiDeployment(context.Context, *apigeeregistrypb.GetApiDeploymentRequest, ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) + CreateApiDeployment(context.Context, *apigeeregistrypb.CreateApiDeploymentRequest, ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) + UpdateApiDeployment(context.Context, *apigeeregistrypb.UpdateApiDeploymentRequest, ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) + DeleteApiDeployment(context.Context, *apigeeregistrypb.DeleteApiDeploymentRequest, ...gax.CallOption) error + TagApiDeploymentRevision(context.Context, *apigeeregistrypb.TagApiDeploymentRevisionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) + ListApiDeploymentRevisions(context.Context, *apigeeregistrypb.ListApiDeploymentRevisionsRequest, ...gax.CallOption) *ApiDeploymentIterator + RollbackApiDeployment(context.Context, *apigeeregistrypb.RollbackApiDeploymentRequest, ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) + DeleteApiDeploymentRevision(context.Context, *apigeeregistrypb.DeleteApiDeploymentRevisionRequest, ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) + ListArtifacts(context.Context, *apigeeregistrypb.ListArtifactsRequest, ...gax.CallOption) *ArtifactIterator + GetArtifact(context.Context, *apigeeregistrypb.GetArtifactRequest, ...gax.CallOption) (*apigeeregistrypb.Artifact, error) + GetArtifactContents(context.Context, *apigeeregistrypb.GetArtifactContentsRequest, ...gax.CallOption) (*httpbodypb.HttpBody, error) + CreateArtifact(context.Context, *apigeeregistrypb.CreateArtifactRequest, ...gax.CallOption) (*apigeeregistrypb.Artifact, error) + ReplaceArtifact(context.Context, *apigeeregistrypb.ReplaceArtifactRequest, ...gax.CallOption) (*apigeeregistrypb.Artifact, error) + DeleteArtifact(context.Context, *apigeeregistrypb.DeleteArtifactRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// RegistryClient is a client for interacting with Apigee Registry API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// The Registry service allows teams to manage descriptions of APIs. +type RegistryClient struct { + // The internal transport-dependent client. + internalClient internalRegistryClient + + // The call options for this service. + CallOptions *RegistryCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *RegistryClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *RegistryClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *RegistryClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListApis returns matching APIs. +func (c *RegistryClient) ListApis(ctx context.Context, req *apigeeregistrypb.ListApisRequest, opts ...gax.CallOption) *ApiIterator { + return c.internalClient.ListApis(ctx, req, opts...) +} + +// GetApi returns a specified API. +func (c *RegistryClient) GetApi(ctx context.Context, req *apigeeregistrypb.GetApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error) { + return c.internalClient.GetApi(ctx, req, opts...) +} + +// CreateApi creates a specified API. +func (c *RegistryClient) CreateApi(ctx context.Context, req *apigeeregistrypb.CreateApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error) { + return c.internalClient.CreateApi(ctx, req, opts...) +} + +// UpdateApi used to modify a specified API. +func (c *RegistryClient) UpdateApi(ctx context.Context, req *apigeeregistrypb.UpdateApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error) { + return c.internalClient.UpdateApi(ctx, req, opts...) +} + +// DeleteApi removes a specified API and all of the resources that it +// owns. +func (c *RegistryClient) DeleteApi(ctx context.Context, req *apigeeregistrypb.DeleteApiRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteApi(ctx, req, opts...) +} + +// ListApiVersions returns matching versions. +func (c *RegistryClient) ListApiVersions(ctx context.Context, req *apigeeregistrypb.ListApiVersionsRequest, opts ...gax.CallOption) *ApiVersionIterator { + return c.internalClient.ListApiVersions(ctx, req, opts...) +} + +// GetApiVersion returns a specified version. +func (c *RegistryClient) GetApiVersion(ctx context.Context, req *apigeeregistrypb.GetApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) { + return c.internalClient.GetApiVersion(ctx, req, opts...) +} + +// CreateApiVersion creates a specified version. +func (c *RegistryClient) CreateApiVersion(ctx context.Context, req *apigeeregistrypb.CreateApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) { + return c.internalClient.CreateApiVersion(ctx, req, opts...) +} + +// UpdateApiVersion used to modify a specified version. +func (c *RegistryClient) UpdateApiVersion(ctx context.Context, req *apigeeregistrypb.UpdateApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) { + return c.internalClient.UpdateApiVersion(ctx, req, opts...) +} + +// DeleteApiVersion removes a specified version and all of the resources that +// it owns. +func (c *RegistryClient) DeleteApiVersion(ctx context.Context, req *apigeeregistrypb.DeleteApiVersionRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteApiVersion(ctx, req, opts...) +} + +// ListApiSpecs returns matching specs. +func (c *RegistryClient) ListApiSpecs(ctx context.Context, req *apigeeregistrypb.ListApiSpecsRequest, opts ...gax.CallOption) *ApiSpecIterator { + return c.internalClient.ListApiSpecs(ctx, req, opts...) +} + +// GetApiSpec returns a specified spec. +func (c *RegistryClient) GetApiSpec(ctx context.Context, req *apigeeregistrypb.GetApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + return c.internalClient.GetApiSpec(ctx, req, opts...) +} + +// GetApiSpecContents returns the contents of a specified spec. +// If specs are stored with GZip compression, the default behavior +// is to return the spec uncompressed (the mime_type response field +// indicates the exact format returned). +func (c *RegistryClient) GetApiSpecContents(ctx context.Context, req *apigeeregistrypb.GetApiSpecContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { + return c.internalClient.GetApiSpecContents(ctx, req, opts...) +} + +// CreateApiSpec creates a specified spec. +func (c *RegistryClient) CreateApiSpec(ctx context.Context, req *apigeeregistrypb.CreateApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + return c.internalClient.CreateApiSpec(ctx, req, opts...) +} + +// UpdateApiSpec used to modify a specified spec. +func (c *RegistryClient) UpdateApiSpec(ctx context.Context, req *apigeeregistrypb.UpdateApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + return c.internalClient.UpdateApiSpec(ctx, req, opts...) +} + +// DeleteApiSpec removes a specified spec, all revisions, and all child +// resources (e.g., artifacts). +func (c *RegistryClient) DeleteApiSpec(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteApiSpec(ctx, req, opts...) +} + +// TagApiSpecRevision adds a tag to a specified revision of a spec. +func (c *RegistryClient) TagApiSpecRevision(ctx context.Context, req *apigeeregistrypb.TagApiSpecRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + return c.internalClient.TagApiSpecRevision(ctx, req, opts...) +} + +// ListApiSpecRevisions lists all revisions of a spec. +// Revisions are returned in descending order of revision creation time. +func (c *RegistryClient) ListApiSpecRevisions(ctx context.Context, req *apigeeregistrypb.ListApiSpecRevisionsRequest, opts ...gax.CallOption) *ApiSpecIterator { + return c.internalClient.ListApiSpecRevisions(ctx, req, opts...) +} + +// RollbackApiSpec sets the current revision to a specified prior revision. +// Note that this creates a new revision with a new revision ID. +func (c *RegistryClient) RollbackApiSpec(ctx context.Context, req *apigeeregistrypb.RollbackApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + return c.internalClient.RollbackApiSpec(ctx, req, opts...) +} + +// DeleteApiSpecRevision deletes a revision of a spec. +func (c *RegistryClient) DeleteApiSpecRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + return c.internalClient.DeleteApiSpecRevision(ctx, req, opts...) +} + +// ListApiDeployments returns matching deployments. +func (c *RegistryClient) ListApiDeployments(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentsRequest, opts ...gax.CallOption) *ApiDeploymentIterator { + return c.internalClient.ListApiDeployments(ctx, req, opts...) +} + +// GetApiDeployment returns a specified deployment. +func (c *RegistryClient) GetApiDeployment(ctx context.Context, req *apigeeregistrypb.GetApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + return c.internalClient.GetApiDeployment(ctx, req, opts...) +} + +// CreateApiDeployment creates a specified deployment. +func (c *RegistryClient) CreateApiDeployment(ctx context.Context, req *apigeeregistrypb.CreateApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + return c.internalClient.CreateApiDeployment(ctx, req, opts...) +} + +// UpdateApiDeployment used to modify a specified deployment. +func (c *RegistryClient) UpdateApiDeployment(ctx context.Context, req *apigeeregistrypb.UpdateApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + return c.internalClient.UpdateApiDeployment(ctx, req, opts...) +} + +// DeleteApiDeployment removes a specified deployment, all revisions, and all +// child resources (e.g., artifacts). +func (c *RegistryClient) DeleteApiDeployment(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteApiDeployment(ctx, req, opts...) +} + +// TagApiDeploymentRevision adds a tag to a specified revision of a +// deployment. +func (c *RegistryClient) TagApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.TagApiDeploymentRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + return c.internalClient.TagApiDeploymentRevision(ctx, req, opts...) +} + +// ListApiDeploymentRevisions lists all revisions of a deployment. +// Revisions are returned in descending order of revision creation time. +func (c *RegistryClient) ListApiDeploymentRevisions(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentRevisionsRequest, opts ...gax.CallOption) *ApiDeploymentIterator { + return c.internalClient.ListApiDeploymentRevisions(ctx, req, opts...) +} + +// RollbackApiDeployment sets the current revision to a specified prior +// revision. Note that this creates a new revision with a new revision ID. +func (c *RegistryClient) RollbackApiDeployment(ctx context.Context, req *apigeeregistrypb.RollbackApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + return c.internalClient.RollbackApiDeployment(ctx, req, opts...) +} + +// DeleteApiDeploymentRevision deletes a revision of a deployment. +func (c *RegistryClient) DeleteApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + return c.internalClient.DeleteApiDeploymentRevision(ctx, req, opts...) +} + +// ListArtifacts returns matching artifacts. +func (c *RegistryClient) ListArtifacts(ctx context.Context, req *apigeeregistrypb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator { + return c.internalClient.ListArtifacts(ctx, req, opts...) +} + +// GetArtifact returns a specified artifact. +func (c *RegistryClient) GetArtifact(ctx context.Context, req *apigeeregistrypb.GetArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error) { + return c.internalClient.GetArtifact(ctx, req, opts...) +} + +// GetArtifactContents returns the contents of a specified artifact. +// If artifacts are stored with GZip compression, the default behavior +// is to return the artifact uncompressed (the mime_type response field +// indicates the exact format returned). +func (c *RegistryClient) GetArtifactContents(ctx context.Context, req *apigeeregistrypb.GetArtifactContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { + return c.internalClient.GetArtifactContents(ctx, req, opts...) +} + +// CreateArtifact creates a specified artifact. +func (c *RegistryClient) CreateArtifact(ctx context.Context, req *apigeeregistrypb.CreateArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error) { + return c.internalClient.CreateArtifact(ctx, req, opts...) +} + +// ReplaceArtifact used to replace a specified artifact. +func (c *RegistryClient) ReplaceArtifact(ctx context.Context, req *apigeeregistrypb.ReplaceArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error) { + return c.internalClient.ReplaceArtifact(ctx, req, opts...) +} + +// DeleteArtifact removes a specified artifact. +func (c *RegistryClient) DeleteArtifact(ctx context.Context, req *apigeeregistrypb.DeleteArtifactRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteArtifact(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *RegistryClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *RegistryClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *RegistryClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *RegistryClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *RegistryClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *RegistryClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *RegistryClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *RegistryClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *RegistryClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// registryGRPCClient is a client for interacting with Apigee Registry API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type registryGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing RegistryClient + CallOptions **RegistryCallOptions + + // The gRPC API client. + registryClient apigeeregistrypb.RegistryClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewRegistryClient creates a new registry client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// The Registry service allows teams to manage descriptions of APIs. +func NewRegistryClient(ctx context.Context, opts ...option.ClientOption) (*RegistryClient, error) { + clientOpts := defaultRegistryGRPCClientOptions() + if newRegistryClientHook != nil { + hookOpts, err := newRegistryClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := RegistryClient{CallOptions: defaultRegistryCallOptions()} + + c := ®istryGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + registryClient: apigeeregistrypb.NewRegistryClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *registryGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *registryGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *registryGRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *registryGRPCClient) ListApis(ctx context.Context, req *apigeeregistrypb.ListApisRequest, opts ...gax.CallOption) *ApiIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListApis[0:len((*c.CallOptions).ListApis):len((*c.CallOptions).ListApis)], opts...) + it := &ApiIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListApisRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.Api, string, error) { + resp := &apigeeregistrypb.ListApisResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListApis(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetApis(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) GetApi(ctx context.Context, req *apigeeregistrypb.GetApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetApi[0:len((*c.CallOptions).GetApi):len((*c.CallOptions).GetApi)], opts...) + var resp *apigeeregistrypb.Api + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetApi(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) CreateApi(ctx context.Context, req *apigeeregistrypb.CreateApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateApi[0:len((*c.CallOptions).CreateApi):len((*c.CallOptions).CreateApi)], opts...) + var resp *apigeeregistrypb.Api + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.CreateApi(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) UpdateApi(ctx context.Context, req *apigeeregistrypb.UpdateApiRequest, opts ...gax.CallOption) (*apigeeregistrypb.Api, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "api.name", url.QueryEscape(req.GetApi().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateApi[0:len((*c.CallOptions).UpdateApi):len((*c.CallOptions).UpdateApi)], opts...) + var resp *apigeeregistrypb.Api + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.UpdateApi(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteApi(ctx context.Context, req *apigeeregistrypb.DeleteApiRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteApi[0:len((*c.CallOptions).DeleteApi):len((*c.CallOptions).DeleteApi)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registryClient.DeleteApi(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) ListApiVersions(ctx context.Context, req *apigeeregistrypb.ListApiVersionsRequest, opts ...gax.CallOption) *ApiVersionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListApiVersions[0:len((*c.CallOptions).ListApiVersions):len((*c.CallOptions).ListApiVersions)], opts...) + it := &ApiVersionIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListApiVersionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.ApiVersion, string, error) { + resp := &apigeeregistrypb.ListApiVersionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListApiVersions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetApiVersions(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) GetApiVersion(ctx context.Context, req *apigeeregistrypb.GetApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetApiVersion[0:len((*c.CallOptions).GetApiVersion):len((*c.CallOptions).GetApiVersion)], opts...) + var resp *apigeeregistrypb.ApiVersion + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetApiVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) CreateApiVersion(ctx context.Context, req *apigeeregistrypb.CreateApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateApiVersion[0:len((*c.CallOptions).CreateApiVersion):len((*c.CallOptions).CreateApiVersion)], opts...) + var resp *apigeeregistrypb.ApiVersion + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.CreateApiVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) UpdateApiVersion(ctx context.Context, req *apigeeregistrypb.UpdateApiVersionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiVersion, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "api_version.name", url.QueryEscape(req.GetApiVersion().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateApiVersion[0:len((*c.CallOptions).UpdateApiVersion):len((*c.CallOptions).UpdateApiVersion)], opts...) + var resp *apigeeregistrypb.ApiVersion + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.UpdateApiVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteApiVersion(ctx context.Context, req *apigeeregistrypb.DeleteApiVersionRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteApiVersion[0:len((*c.CallOptions).DeleteApiVersion):len((*c.CallOptions).DeleteApiVersion)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registryClient.DeleteApiVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) ListApiSpecs(ctx context.Context, req *apigeeregistrypb.ListApiSpecsRequest, opts ...gax.CallOption) *ApiSpecIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListApiSpecs[0:len((*c.CallOptions).ListApiSpecs):len((*c.CallOptions).ListApiSpecs)], opts...) + it := &ApiSpecIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListApiSpecsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.ApiSpec, string, error) { + resp := &apigeeregistrypb.ListApiSpecsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListApiSpecs(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetApiSpecs(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) GetApiSpec(ctx context.Context, req *apigeeregistrypb.GetApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetApiSpec[0:len((*c.CallOptions).GetApiSpec):len((*c.CallOptions).GetApiSpec)], opts...) + var resp *apigeeregistrypb.ApiSpec + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetApiSpec(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) GetApiSpecContents(ctx context.Context, req *apigeeregistrypb.GetApiSpecContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetApiSpecContents[0:len((*c.CallOptions).GetApiSpecContents):len((*c.CallOptions).GetApiSpecContents)], opts...) + var resp *httpbodypb.HttpBody + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetApiSpecContents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) CreateApiSpec(ctx context.Context, req *apigeeregistrypb.CreateApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateApiSpec[0:len((*c.CallOptions).CreateApiSpec):len((*c.CallOptions).CreateApiSpec)], opts...) + var resp *apigeeregistrypb.ApiSpec + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.CreateApiSpec(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) UpdateApiSpec(ctx context.Context, req *apigeeregistrypb.UpdateApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "api_spec.name", url.QueryEscape(req.GetApiSpec().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateApiSpec[0:len((*c.CallOptions).UpdateApiSpec):len((*c.CallOptions).UpdateApiSpec)], opts...) + var resp *apigeeregistrypb.ApiSpec + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.UpdateApiSpec(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteApiSpec(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteApiSpec[0:len((*c.CallOptions).DeleteApiSpec):len((*c.CallOptions).DeleteApiSpec)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registryClient.DeleteApiSpec(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) TagApiSpecRevision(ctx context.Context, req *apigeeregistrypb.TagApiSpecRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TagApiSpecRevision[0:len((*c.CallOptions).TagApiSpecRevision):len((*c.CallOptions).TagApiSpecRevision)], opts...) + var resp *apigeeregistrypb.ApiSpec + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.TagApiSpecRevision(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ListApiSpecRevisions(ctx context.Context, req *apigeeregistrypb.ListApiSpecRevisionsRequest, opts ...gax.CallOption) *ApiSpecIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListApiSpecRevisions[0:len((*c.CallOptions).ListApiSpecRevisions):len((*c.CallOptions).ListApiSpecRevisions)], opts...) + it := &ApiSpecIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListApiSpecRevisionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.ApiSpec, string, error) { + resp := &apigeeregistrypb.ListApiSpecRevisionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListApiSpecRevisions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetApiSpecs(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) RollbackApiSpec(ctx context.Context, req *apigeeregistrypb.RollbackApiSpecRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RollbackApiSpec[0:len((*c.CallOptions).RollbackApiSpec):len((*c.CallOptions).RollbackApiSpec)], opts...) + var resp *apigeeregistrypb.ApiSpec + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.RollbackApiSpec(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteApiSpecRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiSpecRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiSpec, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteApiSpecRevision[0:len((*c.CallOptions).DeleteApiSpecRevision):len((*c.CallOptions).DeleteApiSpecRevision)], opts...) + var resp *apigeeregistrypb.ApiSpec + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.DeleteApiSpecRevision(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ListApiDeployments(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentsRequest, opts ...gax.CallOption) *ApiDeploymentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListApiDeployments[0:len((*c.CallOptions).ListApiDeployments):len((*c.CallOptions).ListApiDeployments)], opts...) + it := &ApiDeploymentIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListApiDeploymentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.ApiDeployment, string, error) { + resp := &apigeeregistrypb.ListApiDeploymentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListApiDeployments(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetApiDeployments(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) GetApiDeployment(ctx context.Context, req *apigeeregistrypb.GetApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetApiDeployment[0:len((*c.CallOptions).GetApiDeployment):len((*c.CallOptions).GetApiDeployment)], opts...) + var resp *apigeeregistrypb.ApiDeployment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetApiDeployment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) CreateApiDeployment(ctx context.Context, req *apigeeregistrypb.CreateApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateApiDeployment[0:len((*c.CallOptions).CreateApiDeployment):len((*c.CallOptions).CreateApiDeployment)], opts...) + var resp *apigeeregistrypb.ApiDeployment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.CreateApiDeployment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) UpdateApiDeployment(ctx context.Context, req *apigeeregistrypb.UpdateApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "api_deployment.name", url.QueryEscape(req.GetApiDeployment().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateApiDeployment[0:len((*c.CallOptions).UpdateApiDeployment):len((*c.CallOptions).UpdateApiDeployment)], opts...) + var resp *apigeeregistrypb.ApiDeployment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.UpdateApiDeployment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteApiDeployment(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteApiDeployment[0:len((*c.CallOptions).DeleteApiDeployment):len((*c.CallOptions).DeleteApiDeployment)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registryClient.DeleteApiDeployment(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) TagApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.TagApiDeploymentRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TagApiDeploymentRevision[0:len((*c.CallOptions).TagApiDeploymentRevision):len((*c.CallOptions).TagApiDeploymentRevision)], opts...) + var resp *apigeeregistrypb.ApiDeployment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.TagApiDeploymentRevision(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ListApiDeploymentRevisions(ctx context.Context, req *apigeeregistrypb.ListApiDeploymentRevisionsRequest, opts ...gax.CallOption) *ApiDeploymentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListApiDeploymentRevisions[0:len((*c.CallOptions).ListApiDeploymentRevisions):len((*c.CallOptions).ListApiDeploymentRevisions)], opts...) + it := &ApiDeploymentIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListApiDeploymentRevisionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.ApiDeployment, string, error) { + resp := &apigeeregistrypb.ListApiDeploymentRevisionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListApiDeploymentRevisions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetApiDeployments(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) RollbackApiDeployment(ctx context.Context, req *apigeeregistrypb.RollbackApiDeploymentRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RollbackApiDeployment[0:len((*c.CallOptions).RollbackApiDeployment):len((*c.CallOptions).RollbackApiDeployment)], opts...) + var resp *apigeeregistrypb.ApiDeployment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.RollbackApiDeployment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteApiDeploymentRevision(ctx context.Context, req *apigeeregistrypb.DeleteApiDeploymentRevisionRequest, opts ...gax.CallOption) (*apigeeregistrypb.ApiDeployment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteApiDeploymentRevision[0:len((*c.CallOptions).DeleteApiDeploymentRevision):len((*c.CallOptions).DeleteApiDeploymentRevision)], opts...) + var resp *apigeeregistrypb.ApiDeployment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.DeleteApiDeploymentRevision(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ListArtifacts(ctx context.Context, req *apigeeregistrypb.ListArtifactsRequest, opts ...gax.CallOption) *ArtifactIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListArtifacts[0:len((*c.CallOptions).ListArtifacts):len((*c.CallOptions).ListArtifacts)], opts...) + it := &ArtifactIterator{} + req = proto.Clone(req).(*apigeeregistrypb.ListArtifactsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apigeeregistrypb.Artifact, string, error) { + resp := &apigeeregistrypb.ListArtifactsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ListArtifacts(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetArtifacts(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) GetArtifact(ctx context.Context, req *apigeeregistrypb.GetArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetArtifact[0:len((*c.CallOptions).GetArtifact):len((*c.CallOptions).GetArtifact)], opts...) + var resp *apigeeregistrypb.Artifact + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetArtifact(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) GetArtifactContents(ctx context.Context, req *apigeeregistrypb.GetArtifactContentsRequest, opts ...gax.CallOption) (*httpbodypb.HttpBody, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetArtifactContents[0:len((*c.CallOptions).GetArtifactContents):len((*c.CallOptions).GetArtifactContents)], opts...) + var resp *httpbodypb.HttpBody + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.GetArtifactContents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) CreateArtifact(ctx context.Context, req *apigeeregistrypb.CreateArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateArtifact[0:len((*c.CallOptions).CreateArtifact):len((*c.CallOptions).CreateArtifact)], opts...) + var resp *apigeeregistrypb.Artifact + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.CreateArtifact(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ReplaceArtifact(ctx context.Context, req *apigeeregistrypb.ReplaceArtifactRequest, opts ...gax.CallOption) (*apigeeregistrypb.Artifact, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "artifact.name", url.QueryEscape(req.GetArtifact().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ReplaceArtifact[0:len((*c.CallOptions).ReplaceArtifact):len((*c.CallOptions).ReplaceArtifact)], opts...) + var resp *apigeeregistrypb.Artifact + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registryClient.ReplaceArtifact(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) DeleteArtifact(ctx context.Context, req *apigeeregistrypb.DeleteArtifactRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteArtifact[0:len((*c.CallOptions).DeleteArtifact):len((*c.CallOptions).DeleteArtifact)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registryClient.DeleteArtifact(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *registryGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *registryGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *registryGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ApiDeploymentIterator manages a stream of *apigeeregistrypb.ApiDeployment. +type ApiDeploymentIterator struct { + items []*apigeeregistrypb.ApiDeployment + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apigeeregistrypb.ApiDeployment, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ApiDeploymentIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ApiDeploymentIterator) Next() (*apigeeregistrypb.ApiDeployment, error) { + var item *apigeeregistrypb.ApiDeployment + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ApiDeploymentIterator) bufLen() int { + return len(it.items) +} + +func (it *ApiDeploymentIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ApiIterator manages a stream of *apigeeregistrypb.Api. +type ApiIterator struct { + items []*apigeeregistrypb.Api + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apigeeregistrypb.Api, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ApiIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ApiIterator) Next() (*apigeeregistrypb.Api, error) { + var item *apigeeregistrypb.Api + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ApiIterator) bufLen() int { + return len(it.items) +} + +func (it *ApiIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ApiSpecIterator manages a stream of *apigeeregistrypb.ApiSpec. +type ApiSpecIterator struct { + items []*apigeeregistrypb.ApiSpec + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apigeeregistrypb.ApiSpec, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ApiSpecIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ApiSpecIterator) Next() (*apigeeregistrypb.ApiSpec, error) { + var item *apigeeregistrypb.ApiSpec + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ApiSpecIterator) bufLen() int { + return len(it.items) +} + +func (it *ApiSpecIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ApiVersionIterator manages a stream of *apigeeregistrypb.ApiVersion. +type ApiVersionIterator struct { + items []*apigeeregistrypb.ApiVersion + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apigeeregistrypb.ApiVersion, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ApiVersionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ApiVersionIterator) Next() (*apigeeregistrypb.ApiVersion, error) { + var item *apigeeregistrypb.ApiVersion + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ApiVersionIterator) bufLen() int { + return len(it.items) +} + +func (it *ApiVersionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ArtifactIterator manages a stream of *apigeeregistrypb.Artifact. +type ArtifactIterator struct { + items []*apigeeregistrypb.Artifact + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apigeeregistrypb.Artifact, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ArtifactIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ArtifactIterator) Next() (*apigeeregistrypb.Artifact, error) { + var item *apigeeregistrypb.Artifact + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ArtifactIterator) bufLen() int { + return len(it.items) +} + +func (it *ArtifactIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/apigeeregistry/apiv1/registry_client_example_test.go b/apigeeregistry/apiv1/registry_client_example_test.go new file mode 100644 index 000000000000..db3a8405bb27 --- /dev/null +++ b/apigeeregistry/apiv1/registry_client_example_test.go @@ -0,0 +1,1185 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package apigeeregistry_test + +import ( + "context" + + apigeeregistry "cloud.google.com/go/apigeeregistry/apiv1" + "google.golang.org/api/iterator" + apigeeregistrypb "google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewRegistryClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleRegistryClient_ListApis() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListApisRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListApisRequest. + } + it := c.ListApis(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_GetApi() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetApiRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiRequest. + } + resp, err := c.GetApi(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_CreateApi() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.CreateApiRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiRequest. + } + resp, err := c.CreateApi(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_UpdateApi() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.UpdateApiRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiRequest. + } + resp, err := c.UpdateApi(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteApi() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteApiRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiRequest. + } + err = c.DeleteApi(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_ListApiVersions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListApiVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListApiVersionsRequest. + } + it := c.ListApiVersions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_GetApiVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetApiVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiVersionRequest. + } + resp, err := c.GetApiVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_CreateApiVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.CreateApiVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiVersionRequest. + } + resp, err := c.CreateApiVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_UpdateApiVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.UpdateApiVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiVersionRequest. + } + resp, err := c.UpdateApiVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteApiVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteApiVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiVersionRequest. + } + err = c.DeleteApiVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_ListApiSpecs() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListApiSpecsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListApiSpecsRequest. + } + it := c.ListApiSpecs(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_GetApiSpec() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetApiSpecRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiSpecRequest. + } + resp, err := c.GetApiSpec(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_GetApiSpecContents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetApiSpecContentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiSpecContentsRequest. + } + resp, err := c.GetApiSpecContents(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_CreateApiSpec() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.CreateApiSpecRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiSpecRequest. + } + resp, err := c.CreateApiSpec(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_UpdateApiSpec() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.UpdateApiSpecRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiSpecRequest. + } + resp, err := c.UpdateApiSpec(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteApiSpec() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteApiSpecRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiSpecRequest. + } + err = c.DeleteApiSpec(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_TagApiSpecRevision() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.TagApiSpecRevisionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#TagApiSpecRevisionRequest. + } + resp, err := c.TagApiSpecRevision(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ListApiSpecRevisions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListApiSpecRevisionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListApiSpecRevisionsRequest. + } + it := c.ListApiSpecRevisions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_RollbackApiSpec() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.RollbackApiSpecRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#RollbackApiSpecRequest. + } + resp, err := c.RollbackApiSpec(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteApiSpecRevision() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteApiSpecRevisionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiSpecRevisionRequest. + } + resp, err := c.DeleteApiSpecRevision(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ListApiDeployments() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListApiDeploymentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListApiDeploymentsRequest. + } + it := c.ListApiDeployments(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_GetApiDeployment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetApiDeploymentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetApiDeploymentRequest. + } + resp, err := c.GetApiDeployment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_CreateApiDeployment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.CreateApiDeploymentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateApiDeploymentRequest. + } + resp, err := c.CreateApiDeployment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_UpdateApiDeployment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.UpdateApiDeploymentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#UpdateApiDeploymentRequest. + } + resp, err := c.UpdateApiDeployment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteApiDeployment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteApiDeploymentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiDeploymentRequest. + } + err = c.DeleteApiDeployment(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_TagApiDeploymentRevision() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.TagApiDeploymentRevisionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#TagApiDeploymentRevisionRequest. + } + resp, err := c.TagApiDeploymentRevision(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ListApiDeploymentRevisions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListApiDeploymentRevisionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListApiDeploymentRevisionsRequest. + } + it := c.ListApiDeploymentRevisions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_RollbackApiDeployment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.RollbackApiDeploymentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#RollbackApiDeploymentRequest. + } + resp, err := c.RollbackApiDeployment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteApiDeploymentRevision() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteApiDeploymentRevisionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteApiDeploymentRevisionRequest. + } + resp, err := c.DeleteApiDeploymentRevision(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ListArtifacts() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ListArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ListArtifactsRequest. + } + it := c.ListArtifacts(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_GetArtifact() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetArtifactRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetArtifactRequest. + } + resp, err := c.GetArtifact(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_GetArtifactContents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.GetArtifactContentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#GetArtifactContentsRequest. + } + resp, err := c.GetArtifactContents(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_CreateArtifact() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.CreateArtifactRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#CreateArtifactRequest. + } + resp, err := c.CreateArtifact(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ReplaceArtifact() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.ReplaceArtifactRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#ReplaceArtifactRequest. + } + resp, err := c.ReplaceArtifact(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_DeleteArtifact() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apigeeregistrypb.DeleteArtifactRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/apigeeregistry/v1#DeleteArtifactRequest. + } + err = c.DeleteArtifact(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistryClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistryClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistryClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apigeeregistry.NewRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/compute/go_mod_tidy_hack.go b/apigeeregistry/apiv1/version.go similarity index 63% rename from compute/go_mod_tidy_hack.go rename to apigeeregistry/apiv1/version.go index 4e4f5e50220f..c58c3c83e7f0 100644 --- a/compute/go_mod_tidy_hack.go +++ b/apigeeregistry/apiv1/version.go @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack +// Code generated by gapicgen. DO NOT EDIT. -package compute +package apigeeregistry -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" +import "cloud.google.com/go/apigeeregistry/internal" + +func init() { + versionClient = internal.Version +} diff --git a/apigeeregistry/go.mod b/apigeeregistry/go.mod new file mode 100644 index 000000000000..53cd66d4bcbf --- /dev/null +++ b/apigeeregistry/go.mod @@ -0,0 +1,26 @@ +module cloud.google.com/go/apigeeregistry + +go 1.18 + +require ( + cloud.google.com/go v0.103.0 + github.com/googleapis/gax-go/v2 v2.4.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220902135211-223410557253 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect +) diff --git a/apigeeregistry/go.sum b/apigeeregistry/go.sum new file mode 100644 index 000000000000..2a090c1b7bef --- /dev/null +++ b/apigeeregistry/go.sum @@ -0,0 +1,668 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.103.0 h1:YXtxp9ymmZjlGzxV7VrYQ8aaQuAgcqxSy6YhDX4I458= +cloud.google.com/go v0.103.0/go.mod h1:vwLx1nqLrzLX/fpwSMOXmFIqBOyHsvHbnAdbGSJ+mKk= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +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= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +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/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +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= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/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= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +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-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220902135211-223410557253 h1:vXJMM8Shg7TGaYxZsQ++A/FOSlbDmDtWhS/o+3w/hj4= +google.golang.org/genproto v0.0.0-20220902135211-223410557253/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/pubsub/go_mod_tidy_hack.go b/apigeeregistry/internal/version.go similarity index 60% rename from pubsub/go_mod_tidy_hack.go rename to apigeeregistry/internal/version.go index 9e87975b0a37..6469702c6a64 100644 --- a/pubsub/go_mod_tidy_hack.go +++ b/apigeeregistry/internal/version.go @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,12 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack +// Code generated by gapicgen. DO NOT EDIT. -package pubsub +package internal -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" +// Version is the current tagged release of the library. +const Version = "0.2.1" diff --git a/apikeys/CHANGES.md b/apikeys/CHANGES.md new file mode 100644 index 000000000000..13e6a006feab --- /dev/null +++ b/apikeys/CHANGES.md @@ -0,0 +1,15 @@ +# Changelog + +## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/apikeys/v0.1.0...apikeys/v0.2.0) (2022-09-19) + + +### Features + +* **apikeys:** enable REST transport for Python Preview clients ([ef2b0b1](https://github.com/googleapis/google-cloud-go/commit/ef2b0b1d4de9beb9005537ae48d7d8e1c0f23b98)) + +## 0.1.0 (2022-08-18) + + +### Features + +* **apikeys:** start generating apiv2 ([#6524](https://github.com/googleapis/google-cloud-go/issues/6524)) ([8b140fa](https://github.com/googleapis/google-cloud-go/commit/8b140fa8a490d7f2e038ca8a776a1dfd46b74b4f)) diff --git a/apikeys/README.md b/apikeys/README.md new file mode 100644 index 000000000000..871031d558a2 --- /dev/null +++ b/apikeys/README.md @@ -0,0 +1,44 @@ +# API Keys API + +[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/apikeys.svg)](https://pkg.go.dev/cloud.google.com/go/apikeys) + +Go Client Library for API Keys API. + +## Install + +```bash +go get cloud.google.com/go/apikeys +``` + +## Stability + +The stability of this module is indicated by SemVer. + +However, a `v1+` module may have breaking changes in two scenarios: + +* Packages with `alpha` or `beta` in the import path +* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). + +## Go Version Support + +See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) +section in the root directory's README. + +## Authorization + +See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) +section in the root directory's README. + +## Contributing + +Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) +document for details. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. See +[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. diff --git a/apikeys/apiv2/api_keys_client.go b/apikeys/apiv2/api_keys_client.go new file mode 100644 index 000000000000..3122ef6d7bd1 --- /dev/null +++ b/apikeys/apiv2/api_keys_client.go @@ -0,0 +1,883 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package apikeys + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + emptypb "github.com/golang/protobuf/ptypes/empty" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + apikeyspb "google.golang.org/genproto/googleapis/api/apikeys/v2" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + CreateKey []gax.CallOption + ListKeys []gax.CallOption + GetKey []gax.CallOption + GetKeyString []gax.CallOption + UpdateKey []gax.CallOption + DeleteKey []gax.CallOption + UndeleteKey []gax.CallOption + LookupKey []gax.CallOption + GetOperation []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("apikeys.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("apikeys.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://apikeys.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + CreateKey: []gax.CallOption{}, + ListKeys: []gax.CallOption{}, + GetKey: []gax.CallOption{}, + GetKeyString: []gax.CallOption{}, + UpdateKey: []gax.CallOption{}, + DeleteKey: []gax.CallOption{}, + UndeleteKey: []gax.CallOption{}, + LookupKey: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from API Keys API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateKey(context.Context, *apikeyspb.CreateKeyRequest, ...gax.CallOption) (*CreateKeyOperation, error) + CreateKeyOperation(name string) *CreateKeyOperation + ListKeys(context.Context, *apikeyspb.ListKeysRequest, ...gax.CallOption) *KeyIterator + GetKey(context.Context, *apikeyspb.GetKeyRequest, ...gax.CallOption) (*apikeyspb.Key, error) + GetKeyString(context.Context, *apikeyspb.GetKeyStringRequest, ...gax.CallOption) (*apikeyspb.GetKeyStringResponse, error) + UpdateKey(context.Context, *apikeyspb.UpdateKeyRequest, ...gax.CallOption) (*UpdateKeyOperation, error) + UpdateKeyOperation(name string) *UpdateKeyOperation + DeleteKey(context.Context, *apikeyspb.DeleteKeyRequest, ...gax.CallOption) (*DeleteKeyOperation, error) + DeleteKeyOperation(name string) *DeleteKeyOperation + UndeleteKey(context.Context, *apikeyspb.UndeleteKeyRequest, ...gax.CallOption) (*UndeleteKeyOperation, error) + UndeleteKeyOperation(name string) *UndeleteKeyOperation + LookupKey(context.Context, *apikeyspb.LookupKeyRequest, ...gax.CallOption) (*apikeyspb.LookupKeyResponse, error) + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) +} + +// Client is a client for interacting with API Keys API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Manages the API keys associated with projects. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateKey creates a new API key. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) CreateKey(ctx context.Context, req *apikeyspb.CreateKeyRequest, opts ...gax.CallOption) (*CreateKeyOperation, error) { + return c.internalClient.CreateKey(ctx, req, opts...) +} + +// CreateKeyOperation returns a new CreateKeyOperation from a given name. +// The name must be that of a previously created CreateKeyOperation, possibly from a different process. +func (c *Client) CreateKeyOperation(name string) *CreateKeyOperation { + return c.internalClient.CreateKeyOperation(name) +} + +// ListKeys lists the API keys owned by a project. The key string of the API key +// isn’t included in the response. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) ListKeys(ctx context.Context, req *apikeyspb.ListKeysRequest, opts ...gax.CallOption) *KeyIterator { + return c.internalClient.ListKeys(ctx, req, opts...) +} + +// GetKey gets the metadata for an API key. The key string of the API key +// isn’t included in the response. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) GetKey(ctx context.Context, req *apikeyspb.GetKeyRequest, opts ...gax.CallOption) (*apikeyspb.Key, error) { + return c.internalClient.GetKey(ctx, req, opts...) +} + +// GetKeyString get the key string for an API key. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) GetKeyString(ctx context.Context, req *apikeyspb.GetKeyStringRequest, opts ...gax.CallOption) (*apikeyspb.GetKeyStringResponse, error) { + return c.internalClient.GetKeyString(ctx, req, opts...) +} + +// UpdateKey patches the modifiable fields of an API key. +// The key string of the API key isn’t included in the response. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) UpdateKey(ctx context.Context, req *apikeyspb.UpdateKeyRequest, opts ...gax.CallOption) (*UpdateKeyOperation, error) { + return c.internalClient.UpdateKey(ctx, req, opts...) +} + +// UpdateKeyOperation returns a new UpdateKeyOperation from a given name. +// The name must be that of a previously created UpdateKeyOperation, possibly from a different process. +func (c *Client) UpdateKeyOperation(name string) *UpdateKeyOperation { + return c.internalClient.UpdateKeyOperation(name) +} + +// DeleteKey deletes an API key. Deleted key can be retrieved within 30 days of +// deletion. Afterward, key will be purged from the project. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) DeleteKey(ctx context.Context, req *apikeyspb.DeleteKeyRequest, opts ...gax.CallOption) (*DeleteKeyOperation, error) { + return c.internalClient.DeleteKey(ctx, req, opts...) +} + +// DeleteKeyOperation returns a new DeleteKeyOperation from a given name. +// The name must be that of a previously created DeleteKeyOperation, possibly from a different process. +func (c *Client) DeleteKeyOperation(name string) *DeleteKeyOperation { + return c.internalClient.DeleteKeyOperation(name) +} + +// UndeleteKey undeletes an API key which was deleted within 30 days. +// +// NOTE: Key is a global resource; hence the only supported value for +// location is global. +func (c *Client) UndeleteKey(ctx context.Context, req *apikeyspb.UndeleteKeyRequest, opts ...gax.CallOption) (*UndeleteKeyOperation, error) { + return c.internalClient.UndeleteKey(ctx, req, opts...) +} + +// UndeleteKeyOperation returns a new UndeleteKeyOperation from a given name. +// The name must be that of a previously created UndeleteKeyOperation, possibly from a different process. +func (c *Client) UndeleteKeyOperation(name string) *UndeleteKeyOperation { + return c.internalClient.UndeleteKeyOperation(name) +} + +// LookupKey find the parent project and resource name of the API +// key that matches the key string in the request. If the API key has been +// purged, resource name will not be set. +// The service account must have the apikeys.keys.lookup permission +// on the parent project. +func (c *Client) LookupKey(ctx context.Context, req *apikeyspb.LookupKeyRequest, opts ...gax.CallOption) (*apikeyspb.LookupKeyResponse, error) { + return c.internalClient.LookupKey(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with API Keys API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client apikeyspb.ApiKeysClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new api keys client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Manages the API keys associated with projects. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: apikeyspb.NewApiKeysClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) CreateKey(ctx context.Context, req *apikeyspb.CreateKeyRequest, opts ...gax.CallOption) (*CreateKeyOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateKey[0:len((*c.CallOptions).CreateKey):len((*c.CallOptions).CreateKey)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateKey(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListKeys(ctx context.Context, req *apikeyspb.ListKeysRequest, opts ...gax.CallOption) *KeyIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListKeys[0:len((*c.CallOptions).ListKeys):len((*c.CallOptions).ListKeys)], opts...) + it := &KeyIterator{} + req = proto.Clone(req).(*apikeyspb.ListKeysRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apikeyspb.Key, string, error) { + resp := &apikeyspb.ListKeysResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListKeys(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetKeys(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetKey(ctx context.Context, req *apikeyspb.GetKeyRequest, opts ...gax.CallOption) (*apikeyspb.Key, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetKey[0:len((*c.CallOptions).GetKey):len((*c.CallOptions).GetKey)], opts...) + var resp *apikeyspb.Key + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetKey(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) GetKeyString(ctx context.Context, req *apikeyspb.GetKeyStringRequest, opts ...gax.CallOption) (*apikeyspb.GetKeyStringResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetKeyString[0:len((*c.CallOptions).GetKeyString):len((*c.CallOptions).GetKeyString)], opts...) + var resp *apikeyspb.GetKeyStringResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetKeyString(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateKey(ctx context.Context, req *apikeyspb.UpdateKeyRequest, opts ...gax.CallOption) (*UpdateKeyOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "key.name", url.QueryEscape(req.GetKey().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateKey[0:len((*c.CallOptions).UpdateKey):len((*c.CallOptions).UpdateKey)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateKey(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteKey(ctx context.Context, req *apikeyspb.DeleteKeyRequest, opts ...gax.CallOption) (*DeleteKeyOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteKey[0:len((*c.CallOptions).DeleteKey):len((*c.CallOptions).DeleteKey)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteKey(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) UndeleteKey(ctx context.Context, req *apikeyspb.UndeleteKeyRequest, opts ...gax.CallOption) (*UndeleteKeyOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UndeleteKey[0:len((*c.CallOptions).UndeleteKey):len((*c.CallOptions).UndeleteKey)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UndeleteKey(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UndeleteKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) LookupKey(ctx context.Context, req *apikeyspb.LookupKeyRequest, opts ...gax.CallOption) (*apikeyspb.LookupKeyResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 10000*time.Millisecond) + defer cancel() + ctx = cctx + } + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).LookupKey[0:len((*c.CallOptions).LookupKey):len((*c.CallOptions).LookupKey)], opts...) + var resp *apikeyspb.LookupKeyResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.LookupKey(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// CreateKeyOperation manages a long-running operation from CreateKey. +type CreateKeyOperation struct { + lro *longrunning.Operation +} + +// CreateKeyOperation returns a new CreateKeyOperation from a given name. +// The name must be that of a previously created CreateKeyOperation, possibly from a different process. +func (c *gRPCClient) CreateKeyOperation(name string) *CreateKeyOperation { + return &CreateKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateKeyOperation) Metadata() (*emptypb.Empty, error) { + var meta emptypb.Empty + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateKeyOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateKeyOperation) Name() string { + return op.lro.Name() +} + +// DeleteKeyOperation manages a long-running operation from DeleteKey. +type DeleteKeyOperation struct { + lro *longrunning.Operation +} + +// DeleteKeyOperation returns a new DeleteKeyOperation from a given name. +// The name must be that of a previously created DeleteKeyOperation, possibly from a different process. +func (c *gRPCClient) DeleteKeyOperation(name string) *DeleteKeyOperation { + return &DeleteKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteKeyOperation) Metadata() (*emptypb.Empty, error) { + var meta emptypb.Empty + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteKeyOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteKeyOperation) Name() string { + return op.lro.Name() +} + +// UndeleteKeyOperation manages a long-running operation from UndeleteKey. +type UndeleteKeyOperation struct { + lro *longrunning.Operation +} + +// UndeleteKeyOperation returns a new UndeleteKeyOperation from a given name. +// The name must be that of a previously created UndeleteKeyOperation, possibly from a different process. +func (c *gRPCClient) UndeleteKeyOperation(name string) *UndeleteKeyOperation { + return &UndeleteKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UndeleteKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UndeleteKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UndeleteKeyOperation) Metadata() (*emptypb.Empty, error) { + var meta emptypb.Empty + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UndeleteKeyOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UndeleteKeyOperation) Name() string { + return op.lro.Name() +} + +// UpdateKeyOperation manages a long-running operation from UpdateKey. +type UpdateKeyOperation struct { + lro *longrunning.Operation +} + +// UpdateKeyOperation returns a new UpdateKeyOperation from a given name. +// The name must be that of a previously created UpdateKeyOperation, possibly from a different process. +func (c *gRPCClient) UpdateKeyOperation(name string) *UpdateKeyOperation { + return &UpdateKeyOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateKeyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateKeyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*apikeyspb.Key, error) { + var resp apikeyspb.Key + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateKeyOperation) Metadata() (*emptypb.Empty, error) { + var meta emptypb.Empty + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateKeyOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateKeyOperation) Name() string { + return op.lro.Name() +} + +// KeyIterator manages a stream of *apikeyspb.Key. +type KeyIterator struct { + items []*apikeyspb.Key + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apikeyspb.Key, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *KeyIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *KeyIterator) Next() (*apikeyspb.Key, error) { + var item *apikeyspb.Key + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *KeyIterator) bufLen() int { + return len(it.items) +} + +func (it *KeyIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/apikeys/apiv2/api_keys_client_example_test.go b/apikeys/apiv2/api_keys_client_example_test.go new file mode 100644 index 000000000000..240c32554c71 --- /dev/null +++ b/apikeys/apiv2/api_keys_client_example_test.go @@ -0,0 +1,294 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package apikeys_test + +import ( + "context" + + apikeys "cloud.google.com/go/apikeys/apiv2" + "google.golang.org/api/iterator" + apikeyspb "google.golang.org/genproto/googleapis/api/apikeys/v2" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_CreateKey() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.CreateKeyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#CreateKeyRequest. + } + op, err := c.CreateKey(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListKeys() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.ListKeysRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#ListKeysRequest. + } + it := c.ListKeys(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetKey() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.GetKeyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#GetKeyRequest. + } + resp, err := c.GetKey(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetKeyString() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.GetKeyStringRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#GetKeyStringRequest. + } + resp, err := c.GetKeyString(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateKey() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.UpdateKeyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#UpdateKeyRequest. + } + op, err := c.UpdateKey(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteKey() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.DeleteKeyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#DeleteKeyRequest. + } + op, err := c.DeleteKey(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UndeleteKey() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.UndeleteKeyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#UndeleteKeyRequest. + } + op, err := c.UndeleteKey(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_LookupKey() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apikeyspb.LookupKeyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#LookupKeyRequest. + } + resp, err := c.LookupKey(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apikeys.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/apikeys/apiv2/doc.go b/apikeys/apiv2/doc.go new file mode 100644 index 000000000000..7dccd3d485a5 --- /dev/null +++ b/apikeys/apiv2/doc.go @@ -0,0 +1,178 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package apikeys is an auto-generated package for the +// API Keys API. +// +// Manages the API keys associated with developer projects. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apikeys.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := apikeys.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &apikeyspb.CreateKeyRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/api/apikeys/v2#CreateKeyRequest. +// } +// op, err := c.CreateKey(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package apikeys // import "cloud.google.com/go/apikeys/apiv2" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/apikeys/apiv2/gapic_metadata.json b/apikeys/apiv2/gapic_metadata.json new file mode 100644 index 000000000000..3915363f5880 --- /dev/null +++ b/apikeys/apiv2/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.api.apikeys.v2", + "libraryPackage": "cloud.google.com/go/apikeys/apiv2", + "services": { + "ApiKeys": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CreateKey": { + "methods": [ + "CreateKey" + ] + }, + "DeleteKey": { + "methods": [ + "DeleteKey" + ] + }, + "GetKey": { + "methods": [ + "GetKey" + ] + }, + "GetKeyString": { + "methods": [ + "GetKeyString" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListKeys": { + "methods": [ + "ListKeys" + ] + }, + "LookupKey": { + "methods": [ + "LookupKey" + ] + }, + "UndeleteKey": { + "methods": [ + "UndeleteKey" + ] + }, + "UpdateKey": { + "methods": [ + "UpdateKey" + ] + } + } + } + } + } + } +} diff --git a/apikeys/apiv2/version.go b/apikeys/apiv2/version.go new file mode 100644 index 000000000000..2841291e38b0 --- /dev/null +++ b/apikeys/apiv2/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package apikeys + +import "cloud.google.com/go/apikeys/internal" + +func init() { + versionClient = internal.Version +} diff --git a/apikeys/go.mod b/apikeys/go.mod new file mode 100644 index 000000000000..6dc3bfb369c5 --- /dev/null +++ b/apikeys/go.mod @@ -0,0 +1,26 @@ +module cloud.google.com/go/apikeys + +go 1.19 + +require ( + cloud.google.com/go v0.103.0 + github.com/golang/protobuf v1.5.2 + github.com/googleapis/gax-go/v2 v2.5.1 + google.golang.org/api v0.96.0 + google.golang.org/genproto v0.0.0-20220916134934-764224ccc2d1 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect +) diff --git a/apikeys/go.sum b/apikeys/go.sum new file mode 100644 index 000000000000..907f82e7eaae --- /dev/null +++ b/apikeys/go.sum @@ -0,0 +1,671 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.103.0 h1:YXtxp9ymmZjlGzxV7VrYQ8aaQuAgcqxSy6YhDX4I458= +cloud.google.com/go v0.103.0/go.mod h1:vwLx1nqLrzLX/fpwSMOXmFIqBOyHsvHbnAdbGSJ+mKk= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +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= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +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/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +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= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049pKTiw= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/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= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +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-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220916134934-764224ccc2d1 h1:f+XAjNNl0e5qs8BbB5iQMTYGQjpDbsG4nyAyAuKg3M4= +google.golang.org/genproto v0.0.0-20220916134934-764224ccc2d1/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/apikeys/internal/version.go b/apikeys/internal/version.go new file mode 100644 index 000000000000..8ed44effcd0f --- /dev/null +++ b/apikeys/internal/version.go @@ -0,0 +1,20 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package internal + +// Version is the current tagged release of the library. +const Version = "0.2.0" diff --git a/appengine/apiv1/applications_client.go b/appengine/apiv1/applications_client.go index b26d785f1455..2bfe97673eb9 100644 --- a/appengine/apiv1/applications_client.go +++ b/appengine/apiv1/applications_client.go @@ -114,7 +114,8 @@ func (c *ApplicationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ApplicationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -127,9 +128,9 @@ func (c *ApplicationsClient) GetApplication(ctx context.Context, req *appenginep // CreateApplication creates an App Engine application for a Google Cloud Platform project. // Required fields: // -// id - The ID of the target Cloud Platform project. +// id - The ID of the target Cloud Platform project. // -// location - The region (at https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. +// location - The region (at https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located. // // For more information about App Engine applications, see Managing Projects, Applications, and Billing (at https://cloud.google.com/appengine/docs/standard/python/console/). func (c *ApplicationsClient) CreateApplication(ctx context.Context, req *appenginepb.CreateApplicationRequest, opts ...gax.CallOption) (*CreateApplicationOperation, error) { @@ -145,11 +146,11 @@ func (c *ApplicationsClient) CreateApplicationOperation(name string) *CreateAppl // UpdateApplication updates the specified Application resource. // You can update the following fields: // -// auth_domain - Google authentication domain for controlling user access to the application. +// auth_domain - Google authentication domain for controlling user access to the application. // -// default_cookie_expiration - Cookie expiration policy for the application. +// default_cookie_expiration - Cookie expiration policy for the application. // -// iap - Identity-Aware Proxy properties for the application. +// iap - Identity-Aware Proxy properties for the application. func (c *ApplicationsClient) UpdateApplication(ctx context.Context, req *appenginepb.UpdateApplicationRequest, opts ...gax.CallOption) (*UpdateApplicationOperation, error) { return c.internalClient.UpdateApplication(ctx, req, opts...) } @@ -256,7 +257,8 @@ func NewApplicationsClient(ctx context.Context, opts ...option.ClientOption) (*A // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *applicationsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/applications_client_example_test.go b/appengine/apiv1/applications_client_example_test.go index 3d4d8934fbaf..72c6a6f85674 100644 --- a/appengine/apiv1/applications_client_example_test.go +++ b/appengine/apiv1/applications_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewApplicationsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewApplicationsClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewApplicationsClient() { func ExampleApplicationsClient_GetApplication() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewApplicationsClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExampleApplicationsClient_GetApplication() { func ExampleApplicationsClient_CreateApplication() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewApplicationsClient(ctx) if err != nil { // TODO: Handle error. @@ -82,6 +97,11 @@ func ExampleApplicationsClient_CreateApplication() { func ExampleApplicationsClient_UpdateApplication() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewApplicationsClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleApplicationsClient_UpdateApplication() { func ExampleApplicationsClient_RepairApplication() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewApplicationsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/authorized_certificates_client.go b/appengine/apiv1/authorized_certificates_client.go index 52571d675211..dd92b612c9d0 100644 --- a/appengine/apiv1/authorized_certificates_client.go +++ b/appengine/apiv1/authorized_certificates_client.go @@ -108,7 +108,8 @@ func (c *AuthorizedCertificatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AuthorizedCertificatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -203,7 +204,8 @@ func NewAuthorizedCertificatesClient(ctx context.Context, opts ...option.ClientO // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *authorizedCertificatesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/authorized_certificates_client_example_test.go b/appengine/apiv1/authorized_certificates_client_example_test.go index b0dc32311d41..d669ecee918a 100644 --- a/appengine/apiv1/authorized_certificates_client_example_test.go +++ b/appengine/apiv1/authorized_certificates_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAuthorizedCertificatesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedCertificatesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAuthorizedCertificatesClient() { func ExampleAuthorizedCertificatesClient_ListAuthorizedCertificates() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedCertificatesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleAuthorizedCertificatesClient_ListAuthorizedCertificates() { func ExampleAuthorizedCertificatesClient_GetAuthorizedCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedCertificatesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleAuthorizedCertificatesClient_GetAuthorizedCertificate() { func ExampleAuthorizedCertificatesClient_CreateAuthorizedCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedCertificatesClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleAuthorizedCertificatesClient_CreateAuthorizedCertificate() { func ExampleAuthorizedCertificatesClient_UpdateAuthorizedCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedCertificatesClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleAuthorizedCertificatesClient_UpdateAuthorizedCertificate() { func ExampleAuthorizedCertificatesClient_DeleteAuthorizedCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedCertificatesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/authorized_domains_client.go b/appengine/apiv1/authorized_domains_client.go index 3f0fd7c944fd..3f900f7e3404 100644 --- a/appengine/apiv1/authorized_domains_client.go +++ b/appengine/apiv1/authorized_domains_client.go @@ -97,7 +97,8 @@ func (c *AuthorizedDomainsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AuthorizedDomainsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -169,7 +170,8 @@ func NewAuthorizedDomainsClient(ctx context.Context, opts ...option.ClientOption // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *authorizedDomainsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/authorized_domains_client_example_test.go b/appengine/apiv1/authorized_domains_client_example_test.go index 9e2a28626ae8..79ece0c98eb5 100644 --- a/appengine/apiv1/authorized_domains_client_example_test.go +++ b/appengine/apiv1/authorized_domains_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAuthorizedDomainsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedDomainsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAuthorizedDomainsClient() { func ExampleAuthorizedDomainsClient_ListAuthorizedDomains() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewAuthorizedDomainsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/doc.go b/appengine/apiv1/doc.go index d85f7e80eeea..823aa0917e46 100644 --- a/appengine/apiv1/doc.go +++ b/appengine/apiv1/doc.go @@ -19,45 +19,56 @@ // // Provisions and manages developers’ App Engine applications. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := appengine.NewApplicationsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appengine.NewApplicationsClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := appengine.NewApplicationsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &appenginepb.GetApplicationRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/appengine/v1#GetApplicationRequest. -// } -// resp, err := c.GetApplication(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appengine.NewApplicationsClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &appenginepb.GetApplicationRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/appengine/v1#GetApplicationRequest. +// } +// resp, err := c.GetApplication(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewApplicationsClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/appengine/apiv1/domain_mappings_client.go b/appengine/apiv1/domain_mappings_client.go index 5f08927f3866..6b7d377c4573 100644 --- a/appengine/apiv1/domain_mappings_client.go +++ b/appengine/apiv1/domain_mappings_client.go @@ -119,7 +119,8 @@ func (c *DomainMappingsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DomainMappingsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -250,7 +251,8 @@ func NewDomainMappingsClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *domainMappingsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/domain_mappings_client_example_test.go b/appengine/apiv1/domain_mappings_client_example_test.go index 00a08a1654d7..3022a344c9f3 100644 --- a/appengine/apiv1/domain_mappings_client_example_test.go +++ b/appengine/apiv1/domain_mappings_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewDomainMappingsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewDomainMappingsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewDomainMappingsClient() { func ExampleDomainMappingsClient_ListDomainMappings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewDomainMappingsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleDomainMappingsClient_ListDomainMappings() { func ExampleDomainMappingsClient_GetDomainMapping() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewDomainMappingsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleDomainMappingsClient_GetDomainMapping() { func ExampleDomainMappingsClient_CreateDomainMapping() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewDomainMappingsClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleDomainMappingsClient_CreateDomainMapping() { func ExampleDomainMappingsClient_UpdateDomainMapping() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewDomainMappingsClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +159,11 @@ func ExampleDomainMappingsClient_UpdateDomainMapping() { func ExampleDomainMappingsClient_DeleteDomainMapping() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewDomainMappingsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/firewall_client.go b/appengine/apiv1/firewall_client.go index dfd7ca09782e..a0513318306d 100644 --- a/appengine/apiv1/firewall_client.go +++ b/appengine/apiv1/firewall_client.go @@ -119,7 +119,8 @@ func (c *FirewallClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FirewallClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -227,7 +228,8 @@ func NewFirewallClient(ctx context.Context, opts ...option.ClientOption) (*Firew // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *firewallGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/firewall_client_example_test.go b/appengine/apiv1/firewall_client_example_test.go index 58124e49dee8..6fdc07b78ea6 100644 --- a/appengine/apiv1/firewall_client_example_test.go +++ b/appengine/apiv1/firewall_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewFirewallClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewFirewallClient() { func ExampleFirewallClient_ListIngressRules() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleFirewallClient_ListIngressRules() { func ExampleFirewallClient_BatchUpdateIngressRules() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleFirewallClient_BatchUpdateIngressRules() { func ExampleFirewallClient_CreateIngressRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleFirewallClient_CreateIngressRule() { func ExampleFirewallClient_GetIngressRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleFirewallClient_GetIngressRule() { func ExampleFirewallClient_UpdateIngressRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleFirewallClient_UpdateIngressRule() { func ExampleFirewallClient_DeleteIngressRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewFirewallClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/instances_client.go b/appengine/apiv1/instances_client.go index 834407f0604a..79a4e708c046 100644 --- a/appengine/apiv1/instances_client.go +++ b/appengine/apiv1/instances_client.go @@ -115,7 +115,8 @@ func (c *InstancesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InstancesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -249,7 +250,8 @@ func NewInstancesClient(ctx context.Context, opts ...option.ClientOption) (*Inst // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *instancesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/instances_client_example_test.go b/appengine/apiv1/instances_client_example_test.go index ba76af5c2ebb..6a40e1427744 100644 --- a/appengine/apiv1/instances_client_example_test.go +++ b/appengine/apiv1/instances_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInstancesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewInstancesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInstancesClient() { func ExampleInstancesClient_ListInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewInstancesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleInstancesClient_ListInstances() { func ExampleInstancesClient_GetInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewInstancesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleInstancesClient_GetInstance() { func ExampleInstancesClient_DeleteInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewInstancesClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleInstancesClient_DeleteInstance() { func ExampleInstancesClient_DebugInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewInstancesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/services_client.go b/appengine/apiv1/services_client.go index 304e3cc278ea..85f298e1fe68 100644 --- a/appengine/apiv1/services_client.go +++ b/appengine/apiv1/services_client.go @@ -115,7 +115,8 @@ func (c *ServicesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ServicesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -228,7 +229,8 @@ func NewServicesClient(ctx context.Context, opts ...option.ClientOption) (*Servi // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *servicesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/services_client_example_test.go b/appengine/apiv1/services_client_example_test.go index 4c9d2f24321f..c45f1c58f1f2 100644 --- a/appengine/apiv1/services_client_example_test.go +++ b/appengine/apiv1/services_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewServicesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewServicesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewServicesClient() { func ExampleServicesClient_ListServices() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewServicesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleServicesClient_ListServices() { func ExampleServicesClient_GetService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewServicesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleServicesClient_GetService() { func ExampleServicesClient_UpdateService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewServicesClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleServicesClient_UpdateService() { func ExampleServicesClient_DeleteService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewServicesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/apiv1/versions_client.go b/appengine/apiv1/versions_client.go index 06c42085853f..34aee811a046 100644 --- a/appengine/apiv1/versions_client.go +++ b/appengine/apiv1/versions_client.go @@ -119,7 +119,8 @@ func (c *VersionsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VersionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -153,45 +154,45 @@ func (c *VersionsClient) CreateVersionOperation(name string) *CreateVersionOpera // // Standard environment // -// instance_class (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) +// instance_class (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class) // // automatic scaling in the standard environment: // -// automatic_scaling.min_idle_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) +// automatic_scaling.min_idle_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) // -// automatic_scaling.max_idle_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) +// automatic_scaling.max_idle_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) // -// automaticScaling.standard_scheduler_settings.max_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) +// automaticScaling.standard_scheduler_settings.max_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) // -// automaticScaling.standard_scheduler_settings.min_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) +// automaticScaling.standard_scheduler_settings.min_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) // -// automaticScaling.standard_scheduler_settings.target_cpu_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) +// automaticScaling.standard_scheduler_settings.target_cpu_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) // -// automaticScaling.standard_scheduler_settings.target_throughput_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) +// automaticScaling.standard_scheduler_settings.target_throughput_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) // // basic scaling or manual scaling in the standard environment: // -// serving_status (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) +// serving_status (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) // -// manual_scaling.instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) +// manual_scaling.instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) // // Flexible environment // -// serving_status (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) +// serving_status (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) // // automatic scaling in the flexible environment: // -// automatic_scaling.min_total_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) +// automatic_scaling.min_total_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) // -// automatic_scaling.max_total_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) +// automatic_scaling.max_total_instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) // -// automatic_scaling.cool_down_period_sec (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) +// automatic_scaling.cool_down_period_sec (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) // -// automatic_scaling.cpu_utilization.target_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) +// automatic_scaling.cpu_utilization.target_utilization (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) // // manual scaling in the flexible environment: // -// manual_scaling.instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) +// manual_scaling.instances (at https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) func (c *VersionsClient) UpdateVersion(ctx context.Context, req *appenginepb.UpdateVersionRequest, opts ...gax.CallOption) (*UpdateVersionOperation, error) { return c.internalClient.UpdateVersion(ctx, req, opts...) } @@ -289,7 +290,8 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *versionsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/appengine/apiv1/versions_client_example_test.go b/appengine/apiv1/versions_client_example_test.go index 217a92613e65..e5bb80ebcf7c 100644 --- a/appengine/apiv1/versions_client_example_test.go +++ b/appengine/apiv1/versions_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewVersionsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewVersionsClient() { func ExampleVersionsClient_ListVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleVersionsClient_ListVersions() { func ExampleVersionsClient_GetVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleVersionsClient_GetVersion() { func ExampleVersionsClient_CreateVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleVersionsClient_CreateVersion() { func ExampleVersionsClient_UpdateVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +159,11 @@ func ExampleVersionsClient_UpdateVersion() { func ExampleVersionsClient_DeleteVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := appengine.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/appengine/go.mod b/appengine/go.mod index 31df1c862f2d..efa2dda934b5 100644 --- a/appengine/go.mod +++ b/appengine/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/appengine -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/appengine/go.sum b/appengine/go.sum index f00d995cec43..c796dcdc6677 100644 --- a/appengine/go.sum +++ b/appengine/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/area120/CHANGES.md b/area120/CHANGES.md index b3cd415b4f25..1e494367cc3f 100644 --- a/area120/CHANGES.md +++ b/area120/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/area120/v0.4.0...area120/v0.5.0) (2022-09-19) + + +### Features + +* **area120:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + ## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/area120/v0.3.0...area120/v0.4.0) (2022-06-29) diff --git a/area120/go.mod b/area120/go.mod index 8042b462af9f..636994948920 100644 --- a/area120/go.mod +++ b/area120/go.mod @@ -1,12 +1,25 @@ module cloud.google.com/go/area120 -go 1.16 +go 1.17 require ( - cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/area120/go.sum b/area120/go.sum index f00d995cec43..b56eeb960121 100644 --- a/area120/go.sum +++ b/area120/go.sum @@ -27,9 +27,8 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0 h1:DAq3r8y4mDgyB/ZPJ9v/5VJNqjgJAxTn6ZYLlUywOu8= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -162,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +587,8 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +619,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +636,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/area120/go_mod_tidy_hack.go b/area120/go_mod_tidy_hack.go deleted file mode 100644 index 95639e0a8f51..000000000000 --- a/area120/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package area120 - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/area120/internal/version.go b/area120/internal/version.go index 3f98e7de6063..d0d3f79115b7 100644 --- a/area120/internal/version.go +++ b/area120/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.4.0" +const Version = "0.5.0" diff --git a/area120/tables/apiv1alpha1/doc.go b/area120/tables/apiv1alpha1/doc.go index 3f852c638aa7..e98535f84ec3 100644 --- a/area120/tables/apiv1alpha1/doc.go +++ b/area120/tables/apiv1alpha1/doc.go @@ -17,45 +17,56 @@ // Package tables is an auto-generated package for the // Area120 Tables API. // -// NOTE: This package is in alpha. It is not stable, and is likely to change. +// NOTE: This package is in alpha. It is not stable, and is likely to change. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := tables.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := tables.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := tables.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &tablespb.GetTableRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/area120/tables/v1alpha1#GetTableRequest. -// } -// resp, err := c.GetTable(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := tables.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &tablespb.GetTableRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/area120/tables/v1alpha1#GetTableRequest. +// } +// resp, err := c.GetTable(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/area120/tables/apiv1alpha1/tables_client.go b/area120/tables/apiv1alpha1/tables_client.go index b8f457c9006c..28ebe78d8197 100644 --- a/area120/tables/apiv1alpha1/tables_client.go +++ b/area120/tables/apiv1alpha1/tables_client.go @@ -129,15 +129,15 @@ type internalClient interface { // The Tables Service provides an API for reading and updating tables. // It defines the following resource model: // -// The API has a collection of [Table][google.area120.tables.v1alpha1.Table] -// resources, named tables/* +// The API has a collection of [Table][google.area120.tables.v1alpha1.Table] +// resources, named tables/* // -// Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] -// resources, named tables/*/rows/* +// Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] +// resources, named tables/*/rows/* // -// The API has a collection of -// [Workspace][google.area120.tables.v1alpha1.Workspace] -// resources, named workspaces/*. +// The API has a collection of +// [Workspace][google.area120.tables.v1alpha1.Workspace] +// resources, named workspaces/*. type Client struct { // The internal transport-dependent client. internalClient internalClient @@ -163,7 +163,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -254,15 +255,15 @@ type gRPCClient struct { // The Tables Service provides an API for reading and updating tables. // It defines the following resource model: // -// The API has a collection of [Table][google.area120.tables.v1alpha1.Table] -// resources, named tables/* +// The API has a collection of [Table][google.area120.tables.v1alpha1.Table] +// resources, named tables/* // -// Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] -// resources, named tables/*/rows/* +// Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] +// resources, named tables/*/rows/* // -// The API has a collection of -// [Workspace][google.area120.tables.v1alpha1.Workspace] -// resources, named workspaces/*. +// The API has a collection of +// [Workspace][google.area120.tables.v1alpha1.Workspace] +// resources, named workspaces/*. func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := defaultGRPCClientOptions() if newClientHook != nil { @@ -299,7 +300,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -339,15 +341,15 @@ type restClient struct { // The Tables Service provides an API for reading and updating tables. // It defines the following resource model: // -// The API has a collection of [Table][google.area120.tables.v1alpha1.Table] -// resources, named tables/* +// The API has a collection of [Table][google.area120.tables.v1alpha1.Table] +// resources, named tables/* // -// Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] -// resources, named tables/*/rows/* +// Each Table has a collection of [Row][google.area120.tables.v1alpha1.Row] +// resources, named tables/*/rows/* // -// The API has a collection of -// [Workspace][google.area120.tables.v1alpha1.Workspace] -// resources, named workspaces/*. +// The API has a collection of +// [Workspace][google.area120.tables.v1alpha1.Workspace] +// resources, named workspaces/*. func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := append(defaultRESTClientOptions(), opts...) httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) @@ -394,7 +396,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -1294,8 +1296,12 @@ func (c *restClient) UpdateRow(ctx context.Context, req *tablespb.UpdateRowReque baseUrl.Path += fmt.Sprintf("/v1alpha1/%v", req.GetRow().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } if req.GetView() != 0 { params.Add("view", fmt.Sprintf("%v", req.GetView())) diff --git a/area120/tables/apiv1alpha1/tables_client_example_test.go b/area120/tables/apiv1alpha1/tables_client_example_test.go index b81b87eb8d23..4acd69c4bf6e 100644 --- a/area120/tables/apiv1alpha1/tables_client_example_test.go +++ b/area120/tables/apiv1alpha1/tables_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewRESTClient() { func ExampleClient_GetTable() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleClient_GetTable() { func ExampleClient_ListTables() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +116,11 @@ func ExampleClient_ListTables() { func ExampleClient_GetWorkspace() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -116,6 +141,11 @@ func ExampleClient_GetWorkspace() { func ExampleClient_ListWorkspaces() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +172,11 @@ func ExampleClient_ListWorkspaces() { func ExampleClient_GetRow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +197,11 @@ func ExampleClient_GetRow() { func ExampleClient_ListRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +228,11 @@ func ExampleClient_ListRows() { func ExampleClient_CreateRow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleClient_CreateRow() { func ExampleClient_BatchCreateRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleClient_BatchCreateRows() { func ExampleClient_UpdateRow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -248,6 +303,11 @@ func ExampleClient_UpdateRow() { func ExampleClient_BatchUpdateRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +328,11 @@ func ExampleClient_BatchUpdateRows() { func ExampleClient_DeleteRow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -286,6 +351,11 @@ func ExampleClient_DeleteRow() { func ExampleClient_BatchDeleteRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := tables.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/area120/tables/apiv1alpha1/tablespb/tables.pb.go b/area120/tables/apiv1alpha1/tablespb/tables.pb.go new file mode 100644 index 000000000000..62fade461838 --- /dev/null +++ b/area120/tables/apiv1alpha1/tablespb/tables.pb.go @@ -0,0 +1,2899 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/area120/tables/v1alpha1/tables.proto + +package tablespb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Column identifier used for the values in the row. +type View int32 + +const ( + // Defaults to user entered text. + View_VIEW_UNSPECIFIED View = 0 + // Uses internally generated column id to identify values. + View_COLUMN_ID_VIEW View = 1 +) + +// Enum value maps for View. +var ( + View_name = map[int32]string{ + 0: "VIEW_UNSPECIFIED", + 1: "COLUMN_ID_VIEW", + } + View_value = map[string]int32{ + "VIEW_UNSPECIFIED": 0, + "COLUMN_ID_VIEW": 1, + } +) + +func (x View) Enum() *View { + p := new(View) + *p = x + return p +} + +func (x View) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (View) Descriptor() protoreflect.EnumDescriptor { + return file_google_area120_tables_v1alpha1_tables_proto_enumTypes[0].Descriptor() +} + +func (View) Type() protoreflect.EnumType { + return &file_google_area120_tables_v1alpha1_tables_proto_enumTypes[0] +} + +func (x View) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use View.Descriptor instead. +func (View) EnumDescriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{0} +} + +// Request message for TablesService.GetTable. +type GetTableRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the table to retrieve. + // Format: tables/{table} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetTableRequest) Reset() { + *x = GetTableRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTableRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTableRequest) ProtoMessage() {} + +func (x *GetTableRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTableRequest.ProtoReflect.Descriptor instead. +func (*GetTableRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTableRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for TablesService.ListTables. +type ListTablesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of tables to return. The service may return fewer than + // this value. + // + // If unspecified, at most 20 tables are returned. The maximum value is 100; + // values above 100 are coerced to 100. + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListTables` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListTables` must match + // the call that provided the page token. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTablesRequest) Reset() { + *x = ListTablesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTablesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTablesRequest) ProtoMessage() {} + +func (x *ListTablesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTablesRequest.ProtoReflect.Descriptor instead. +func (*ListTablesRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTablesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTablesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for TablesService.ListTables. +type ListTablesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of tables. + Tables []*Table `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is empty, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTablesResponse) Reset() { + *x = ListTablesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTablesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTablesResponse) ProtoMessage() {} + +func (x *ListTablesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTablesResponse.ProtoReflect.Descriptor instead. +func (*ListTablesResponse) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTablesResponse) GetTables() []*Table { + if x != nil { + return x.Tables + } + return nil +} + +func (x *ListTablesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for TablesService.GetWorkspace. +type GetWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the workspace to retrieve. + // Format: workspaces/{workspace} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetWorkspaceRequest) Reset() { + *x = GetWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceRequest) ProtoMessage() {} + +func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{3} +} + +func (x *GetWorkspaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for TablesService.ListWorkspaces. +type ListWorkspacesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of workspaces to return. The service may return fewer + // than this value. + // + // If unspecified, at most 10 workspaces are returned. The maximum value is + // 25; values above 25 are coerced to 25. + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` must + // match the call that provided the page token. + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListWorkspacesRequest) Reset() { + *x = ListWorkspacesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesRequest) ProtoMessage() {} + +func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspacesRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{4} +} + +func (x *ListWorkspacesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkspacesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for TablesService.ListWorkspaces. +type ListWorkspacesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of workspaces. + Workspaces []*Workspace `protobuf:"bytes,1,rep,name=workspaces,proto3" json:"workspaces,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is empty, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListWorkspacesResponse) Reset() { + *x = ListWorkspacesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesResponse) ProtoMessage() {} + +func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspacesResponse) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{5} +} + +func (x *ListWorkspacesResponse) GetWorkspaces() []*Workspace { + if x != nil { + return x.Workspaces + } + return nil +} + +func (x *ListWorkspacesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for TablesService.GetRow. +type GetRowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the row to retrieve. + // Format: tables/{table}/rows/{row} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Column key to use for values in the row. + // Defaults to user entered name. + View View `protobuf:"varint,2,opt,name=view,proto3,enum=google.area120.tables.v1alpha1.View" json:"view,omitempty"` +} + +func (x *GetRowRequest) Reset() { + *x = GetRowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRowRequest) ProtoMessage() {} + +func (x *GetRowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRowRequest.ProtoReflect.Descriptor instead. +func (*GetRowRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{6} +} + +func (x *GetRowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetRowRequest) GetView() View { + if x != nil { + return x.View + } + return View_VIEW_UNSPECIFIED +} + +// Request message for TablesService.ListRows. +type ListRowsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent table. + // Format: tables/{table} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of rows to return. The service may return fewer than + // this value. + // + // If unspecified, at most 50 rows are returned. The maximum value is 1,000; + // values above 1,000 are coerced to 1,000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListRows` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRows` must match + // the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Column key to use for values in the row. + // Defaults to user entered name. + View View `protobuf:"varint,4,opt,name=view,proto3,enum=google.area120.tables.v1alpha1.View" json:"view,omitempty"` + // Optional. Raw text query to search for in rows of the table. + // Special characters must be escaped. Logical operators and field specific + // filtering not supported. + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListRowsRequest) Reset() { + *x = ListRowsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRowsRequest) ProtoMessage() {} + +func (x *ListRowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRowsRequest.ProtoReflect.Descriptor instead. +func (*ListRowsRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{7} +} + +func (x *ListRowsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListRowsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRowsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRowsRequest) GetView() View { + if x != nil { + return x.View + } + return View_VIEW_UNSPECIFIED +} + +func (x *ListRowsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Response message for TablesService.ListRows. +type ListRowsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The rows from the specified table. + Rows []*Row `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is empty, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListRowsResponse) Reset() { + *x = ListRowsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRowsResponse) ProtoMessage() {} + +func (x *ListRowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRowsResponse.ProtoReflect.Descriptor instead. +func (*ListRowsResponse) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{8} +} + +func (x *ListRowsResponse) GetRows() []*Row { + if x != nil { + return x.Rows + } + return nil +} + +func (x *ListRowsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for TablesService.CreateRow. +type CreateRowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent table where this row will be created. + // Format: tables/{table} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The row to create. + Row *Row `protobuf:"bytes,2,opt,name=row,proto3" json:"row,omitempty"` + // Optional. Column key to use for values in the row. + // Defaults to user entered name. + View View `protobuf:"varint,3,opt,name=view,proto3,enum=google.area120.tables.v1alpha1.View" json:"view,omitempty"` +} + +func (x *CreateRowRequest) Reset() { + *x = CreateRowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRowRequest) ProtoMessage() {} + +func (x *CreateRowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRowRequest.ProtoReflect.Descriptor instead. +func (*CreateRowRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateRowRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateRowRequest) GetRow() *Row { + if x != nil { + return x.Row + } + return nil +} + +func (x *CreateRowRequest) GetView() View { + if x != nil { + return x.View + } + return View_VIEW_UNSPECIFIED +} + +// Request message for TablesService.BatchCreateRows. +type BatchCreateRowsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent table where the rows will be created. + // Format: tables/{table} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The request message specifying the rows to create. + // + // A maximum of 500 rows can be created in a single batch. + Requests []*CreateRowRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchCreateRowsRequest) Reset() { + *x = BatchCreateRowsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchCreateRowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateRowsRequest) ProtoMessage() {} + +func (x *BatchCreateRowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchCreateRowsRequest.ProtoReflect.Descriptor instead. +func (*BatchCreateRowsRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{10} +} + +func (x *BatchCreateRowsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchCreateRowsRequest) GetRequests() []*CreateRowRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response message for TablesService.BatchCreateRows. +type BatchCreateRowsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The created rows. + Rows []*Row `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` +} + +func (x *BatchCreateRowsResponse) Reset() { + *x = BatchCreateRowsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchCreateRowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateRowsResponse) ProtoMessage() {} + +func (x *BatchCreateRowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchCreateRowsResponse.ProtoReflect.Descriptor instead. +func (*BatchCreateRowsResponse) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{11} +} + +func (x *BatchCreateRowsResponse) GetRows() []*Row { + if x != nil { + return x.Rows + } + return nil +} + +// Request message for TablesService.UpdateRow. +type UpdateRowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The row to update. + Row *Row `protobuf:"bytes,1,opt,name=row,proto3" json:"row,omitempty"` + // The list of fields to update. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Optional. Column key to use for values in the row. + // Defaults to user entered name. + View View `protobuf:"varint,3,opt,name=view,proto3,enum=google.area120.tables.v1alpha1.View" json:"view,omitempty"` +} + +func (x *UpdateRowRequest) Reset() { + *x = UpdateRowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateRowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRowRequest) ProtoMessage() {} + +func (x *UpdateRowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRowRequest.ProtoReflect.Descriptor instead. +func (*UpdateRowRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateRowRequest) GetRow() *Row { + if x != nil { + return x.Row + } + return nil +} + +func (x *UpdateRowRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateRowRequest) GetView() View { + if x != nil { + return x.View + } + return View_VIEW_UNSPECIFIED +} + +// Request message for TablesService.BatchUpdateRows. +type BatchUpdateRowsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent table shared by all rows being updated. + // Format: tables/{table} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The request messages specifying the rows to update. + // + // A maximum of 500 rows can be modified in a single batch. + Requests []*UpdateRowRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchUpdateRowsRequest) Reset() { + *x = BatchUpdateRowsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchUpdateRowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUpdateRowsRequest) ProtoMessage() {} + +func (x *BatchUpdateRowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUpdateRowsRequest.ProtoReflect.Descriptor instead. +func (*BatchUpdateRowsRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{13} +} + +func (x *BatchUpdateRowsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchUpdateRowsRequest) GetRequests() []*UpdateRowRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response message for TablesService.BatchUpdateRows. +type BatchUpdateRowsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The updated rows. + Rows []*Row `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` +} + +func (x *BatchUpdateRowsResponse) Reset() { + *x = BatchUpdateRowsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchUpdateRowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUpdateRowsResponse) ProtoMessage() {} + +func (x *BatchUpdateRowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUpdateRowsResponse.ProtoReflect.Descriptor instead. +func (*BatchUpdateRowsResponse) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{14} +} + +func (x *BatchUpdateRowsResponse) GetRows() []*Row { + if x != nil { + return x.Rows + } + return nil +} + +// Request message for TablesService.DeleteRow +type DeleteRowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the row to delete. + // Format: tables/{table}/rows/{row} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteRowRequest) Reset() { + *x = DeleteRowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRowRequest) ProtoMessage() {} + +func (x *DeleteRowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRowRequest.ProtoReflect.Descriptor instead. +func (*DeleteRowRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{15} +} + +func (x *DeleteRowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for TablesService.BatchDeleteRows +type BatchDeleteRowsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent table shared by all rows being deleted. + // Format: tables/{table} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The names of the rows to delete. All rows must belong to the parent table + // or else the entire batch will fail. A maximum of 500 rows can be deleted + // in a batch. + // Format: tables/{table}/rows/{row} + Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` +} + +func (x *BatchDeleteRowsRequest) Reset() { + *x = BatchDeleteRowsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchDeleteRowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchDeleteRowsRequest) ProtoMessage() {} + +func (x *BatchDeleteRowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchDeleteRowsRequest.ProtoReflect.Descriptor instead. +func (*BatchDeleteRowsRequest) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{16} +} + +func (x *BatchDeleteRowsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchDeleteRowsRequest) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +// A single table. +type Table struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the table. + // Table names have the form `tables/{table}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The human readable title of the table. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // List of columns in this table. + // Order of columns matches the display order. + Columns []*ColumnDescription `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"` +} + +func (x *Table) Reset() { + *x = Table{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Table) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Table) ProtoMessage() {} + +func (x *Table) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Table.ProtoReflect.Descriptor instead. +func (*Table) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{17} +} + +func (x *Table) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Table) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Table) GetColumns() []*ColumnDescription { + if x != nil { + return x.Columns + } + return nil +} + +// Details on a column in the table. +type ColumnDescription struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // column name + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Data type of the column + // Supported types are auto_id, boolean, boolean_list, creator, + // create_timestamp, date, dropdown, location, integer, + // integer_list, number, number_list, person, person_list, tags, check_list, + // text, text_list, update_timestamp, updater, relationship, + // file_attachment_list. + // These types directly map to the column types supported on Tables website. + DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + // Internal id for a column. + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + // Optional. Range of labeled values for the column. + // Some columns like tags and drop-downs limit the values to a set of + // possible values. We return the range of values in such cases to help + // clients implement better user data validation. + Labels []*LabeledItem `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` + // Optional. Additional details about a relationship column. Specified when data_type + // is relationship. + RelationshipDetails *RelationshipDetails `protobuf:"bytes,5,opt,name=relationship_details,json=relationshipDetails,proto3" json:"relationship_details,omitempty"` + // Optional. Indicates that this is a lookup column whose value is derived from the + // relationship column specified in the details. Lookup columns can not be + // updated directly. To change the value you must update the associated + // relationship column. + LookupDetails *LookupDetails `protobuf:"bytes,6,opt,name=lookup_details,json=lookupDetails,proto3" json:"lookup_details,omitempty"` +} + +func (x *ColumnDescription) Reset() { + *x = ColumnDescription{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnDescription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnDescription) ProtoMessage() {} + +func (x *ColumnDescription) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnDescription.ProtoReflect.Descriptor instead. +func (*ColumnDescription) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{18} +} + +func (x *ColumnDescription) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ColumnDescription) GetDataType() string { + if x != nil { + return x.DataType + } + return "" +} + +func (x *ColumnDescription) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ColumnDescription) GetLabels() []*LabeledItem { + if x != nil { + return x.Labels + } + return nil +} + +func (x *ColumnDescription) GetRelationshipDetails() *RelationshipDetails { + if x != nil { + return x.RelationshipDetails + } + return nil +} + +func (x *ColumnDescription) GetLookupDetails() *LookupDetails { + if x != nil { + return x.LookupDetails + } + return nil +} + +// A single item in a labeled column. +type LabeledItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Display string as entered by user. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Internal id associated with the item. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *LabeledItem) Reset() { + *x = LabeledItem{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabeledItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabeledItem) ProtoMessage() {} + +func (x *LabeledItem) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabeledItem.ProtoReflect.Descriptor instead. +func (*LabeledItem) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{19} +} + +func (x *LabeledItem) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LabeledItem) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Details about a relationship column. +type RelationshipDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the table this relationship is linked to. + LinkedTable string `protobuf:"bytes,1,opt,name=linked_table,json=linkedTable,proto3" json:"linked_table,omitempty"` +} + +func (x *RelationshipDetails) Reset() { + *x = RelationshipDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelationshipDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationshipDetails) ProtoMessage() {} + +func (x *RelationshipDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelationshipDetails.ProtoReflect.Descriptor instead. +func (*RelationshipDetails) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{20} +} + +func (x *RelationshipDetails) GetLinkedTable() string { + if x != nil { + return x.LinkedTable + } + return "" +} + +// Details about a lookup column whose value comes from the associated +// relationship. +type LookupDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the relationship column associated with the lookup. + RelationshipColumn string `protobuf:"bytes,1,opt,name=relationship_column,json=relationshipColumn,proto3" json:"relationship_column,omitempty"` + // The id of the relationship column. + RelationshipColumnId string `protobuf:"bytes,2,opt,name=relationship_column_id,json=relationshipColumnId,proto3" json:"relationship_column_id,omitempty"` +} + +func (x *LookupDetails) Reset() { + *x = LookupDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupDetails) ProtoMessage() {} + +func (x *LookupDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupDetails.ProtoReflect.Descriptor instead. +func (*LookupDetails) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{21} +} + +func (x *LookupDetails) GetRelationshipColumn() string { + if x != nil { + return x.RelationshipColumn + } + return "" +} + +func (x *LookupDetails) GetRelationshipColumnId() string { + if x != nil { + return x.RelationshipColumnId + } + return "" +} + +// A single row in a table. +type Row struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the row. + // Row names have the form `tables/{table}/rows/{row}`. + // The name is ignored when creating a row. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The values of the row. This is a map of column key to value. + // Key is user entered name(default) or the internal column id based on + // the view in the request. + Values map[string]*structpb.Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Row) Reset() { + *x = Row{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Row) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Row) ProtoMessage() {} + +func (x *Row) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Row.ProtoReflect.Descriptor instead. +func (*Row) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{22} +} + +func (x *Row) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Row) GetValues() map[string]*structpb.Value { + if x != nil { + return x.Values + } + return nil +} + +// A single workspace. +type Workspace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the workspace. + // Workspace names have the form `workspaces/{workspace}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The human readable title of the workspace. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The list of tables in the workspace. + Tables []*Table `protobuf:"bytes,3,rep,name=tables,proto3" json:"tables,omitempty"` +} + +func (x *Workspace) Reset() { + *x = Workspace{} + if protoimpl.UnsafeEnabled { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workspace) ProtoMessage() {} + +func (x *Workspace) ProtoReflect() protoreflect.Message { + mi := &file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workspace.ProtoReflect.Descriptor instead. +func (*Workspace) Descriptor() ([]byte, []int) { + return file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP(), []int{23} +} + +func (x *Workspace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workspace) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Workspace) GetTables() []*Table { + if x != nil { + return x.Tables + } + return nil +} + +var File_google_area120_tables_v1alpha1_tables_proto protoreflect.FileDescriptor + +var file_google_area120_tables_v1alpha1_tables_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, + 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x4f, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x7b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x59, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x61, 0x72, 0x65, + 0x61, 0x31, 0x32, 0x30, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8b, + 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x01, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x04, + 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0xc6, 0x01, 0x0a, 0x0f, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3d, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x22, 0x73, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x77, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x01, 0x0a, 0x10, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x03, 0x72, + 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x12, 0x3d, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x88, 0x01, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x51, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, + 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x22, 0x52, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, + 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x03, 0x72, 0x6f, + 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x61, 0x73, 0x6b, 0x12, 0x3d, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, + 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x76, 0x69, + 0x65, 0x77, 0x22, 0x88, 0x01, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x52, 0x0a, + 0x17, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, + 0x73, 0x22, 0x50, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x61, 0x72, 0x65, + 0x61, 0x31, 0x32, 0x30, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x61, 0x72, 0x65, 0x61, 0x31, + 0x32, 0x30, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x77, 0x52, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, + 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x3a, 0x37, 0xea, 0x41, 0x34, 0x0a, 0x22, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x7d, 0x22, 0xe6, 0x02, 0x0a, 0x11, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x48, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, + 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x6b, 0x0a, 0x14, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x59, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x22, 0x31, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x65, 0x64, 0x49, 0x74, 0x65, + 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, + 0x76, 0x0a, 0x0d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, + 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, + 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x64, 0x22, 0xf7, 0x01, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, + 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x51, 0x0a, 0x0b, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, + 0x40, 0xea, 0x41, 0x3d, 0x0a, 0x20, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x77, 0x12, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x7b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x7d, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x77, + 0x7d, 0x22, 0xc6, 0x01, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x3a, 0x43, 0xea, 0x41, 0x40, 0x0a, 0x26, 0x61, 0x72, 0x65, 0x61, + 0x31, 0x32, 0x30, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x16, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2a, 0x30, 0x0a, 0x04, 0x56, 0x69, + 0x65, 0x77, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4c, 0x55, + 0x4d, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x01, 0x32, 0xbc, 0x11, 0x0a, + 0x0d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, + 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8d, 0x01, + 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x9c, 0x01, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x33, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, + 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x2c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x9d, 0x01, 0x0a, + 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x8d, 0x01, 0x0a, + 0x06, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x77, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x22, 0x2f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, + 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa0, 0x01, 0x0a, + 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x9e, 0x01, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x12, 0x30, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, + 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x52, 0x6f, 0x77, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x20, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x3a, 0x03, + 0x72, 0x6f, 0x77, 0xda, 0x41, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x6f, 0x77, + 0x12, 0xbb, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x77, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, + 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2c, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x3a, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xa7, + 0x01, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x12, 0x30, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x52, 0x6f, 0x77, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x32, 0x24, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x6f, 0x77, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x03, 0x72, 0x6f, 0x77, 0xda, 0x41, 0x0f, 0x72, 0x6f, 0x77, 0x2c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xbb, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x36, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, + 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x86, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x6f, 0x77, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, + 0x65, 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x9a, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x6f, 0x77, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, + 0x61, 0x31, 0x32, 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2c, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x77, 0x73, 0x3a, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x1a, 0xac, 0x02, 0xca, + 0x41, 0x1c, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, + 0x89, 0x02, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, + 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2c, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, + 0x70, 0x72, 0x65, 0x61, 0x64, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, + 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x0a, 0x22, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, + 0x30, 0x2e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x42, 0x0b, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x72, 0x65, 0x61, 0x31, 0x32, 0x30, 0x2f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_area120_tables_v1alpha1_tables_proto_rawDescOnce sync.Once + file_google_area120_tables_v1alpha1_tables_proto_rawDescData = file_google_area120_tables_v1alpha1_tables_proto_rawDesc +) + +func file_google_area120_tables_v1alpha1_tables_proto_rawDescGZIP() []byte { + file_google_area120_tables_v1alpha1_tables_proto_rawDescOnce.Do(func() { + file_google_area120_tables_v1alpha1_tables_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_area120_tables_v1alpha1_tables_proto_rawDescData) + }) + return file_google_area120_tables_v1alpha1_tables_proto_rawDescData +} + +var file_google_area120_tables_v1alpha1_tables_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_area120_tables_v1alpha1_tables_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_google_area120_tables_v1alpha1_tables_proto_goTypes = []interface{}{ + (View)(0), // 0: google.area120.tables.v1alpha1.View + (*GetTableRequest)(nil), // 1: google.area120.tables.v1alpha1.GetTableRequest + (*ListTablesRequest)(nil), // 2: google.area120.tables.v1alpha1.ListTablesRequest + (*ListTablesResponse)(nil), // 3: google.area120.tables.v1alpha1.ListTablesResponse + (*GetWorkspaceRequest)(nil), // 4: google.area120.tables.v1alpha1.GetWorkspaceRequest + (*ListWorkspacesRequest)(nil), // 5: google.area120.tables.v1alpha1.ListWorkspacesRequest + (*ListWorkspacesResponse)(nil), // 6: google.area120.tables.v1alpha1.ListWorkspacesResponse + (*GetRowRequest)(nil), // 7: google.area120.tables.v1alpha1.GetRowRequest + (*ListRowsRequest)(nil), // 8: google.area120.tables.v1alpha1.ListRowsRequest + (*ListRowsResponse)(nil), // 9: google.area120.tables.v1alpha1.ListRowsResponse + (*CreateRowRequest)(nil), // 10: google.area120.tables.v1alpha1.CreateRowRequest + (*BatchCreateRowsRequest)(nil), // 11: google.area120.tables.v1alpha1.BatchCreateRowsRequest + (*BatchCreateRowsResponse)(nil), // 12: google.area120.tables.v1alpha1.BatchCreateRowsResponse + (*UpdateRowRequest)(nil), // 13: google.area120.tables.v1alpha1.UpdateRowRequest + (*BatchUpdateRowsRequest)(nil), // 14: google.area120.tables.v1alpha1.BatchUpdateRowsRequest + (*BatchUpdateRowsResponse)(nil), // 15: google.area120.tables.v1alpha1.BatchUpdateRowsResponse + (*DeleteRowRequest)(nil), // 16: google.area120.tables.v1alpha1.DeleteRowRequest + (*BatchDeleteRowsRequest)(nil), // 17: google.area120.tables.v1alpha1.BatchDeleteRowsRequest + (*Table)(nil), // 18: google.area120.tables.v1alpha1.Table + (*ColumnDescription)(nil), // 19: google.area120.tables.v1alpha1.ColumnDescription + (*LabeledItem)(nil), // 20: google.area120.tables.v1alpha1.LabeledItem + (*RelationshipDetails)(nil), // 21: google.area120.tables.v1alpha1.RelationshipDetails + (*LookupDetails)(nil), // 22: google.area120.tables.v1alpha1.LookupDetails + (*Row)(nil), // 23: google.area120.tables.v1alpha1.Row + (*Workspace)(nil), // 24: google.area120.tables.v1alpha1.Workspace + nil, // 25: google.area120.tables.v1alpha1.Row.ValuesEntry + (*fieldmaskpb.FieldMask)(nil), // 26: google.protobuf.FieldMask + (*structpb.Value)(nil), // 27: google.protobuf.Value + (*emptypb.Empty)(nil), // 28: google.protobuf.Empty +} +var file_google_area120_tables_v1alpha1_tables_proto_depIdxs = []int32{ + 18, // 0: google.area120.tables.v1alpha1.ListTablesResponse.tables:type_name -> google.area120.tables.v1alpha1.Table + 24, // 1: google.area120.tables.v1alpha1.ListWorkspacesResponse.workspaces:type_name -> google.area120.tables.v1alpha1.Workspace + 0, // 2: google.area120.tables.v1alpha1.GetRowRequest.view:type_name -> google.area120.tables.v1alpha1.View + 0, // 3: google.area120.tables.v1alpha1.ListRowsRequest.view:type_name -> google.area120.tables.v1alpha1.View + 23, // 4: google.area120.tables.v1alpha1.ListRowsResponse.rows:type_name -> google.area120.tables.v1alpha1.Row + 23, // 5: google.area120.tables.v1alpha1.CreateRowRequest.row:type_name -> google.area120.tables.v1alpha1.Row + 0, // 6: google.area120.tables.v1alpha1.CreateRowRequest.view:type_name -> google.area120.tables.v1alpha1.View + 10, // 7: google.area120.tables.v1alpha1.BatchCreateRowsRequest.requests:type_name -> google.area120.tables.v1alpha1.CreateRowRequest + 23, // 8: google.area120.tables.v1alpha1.BatchCreateRowsResponse.rows:type_name -> google.area120.tables.v1alpha1.Row + 23, // 9: google.area120.tables.v1alpha1.UpdateRowRequest.row:type_name -> google.area120.tables.v1alpha1.Row + 26, // 10: google.area120.tables.v1alpha1.UpdateRowRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 11: google.area120.tables.v1alpha1.UpdateRowRequest.view:type_name -> google.area120.tables.v1alpha1.View + 13, // 12: google.area120.tables.v1alpha1.BatchUpdateRowsRequest.requests:type_name -> google.area120.tables.v1alpha1.UpdateRowRequest + 23, // 13: google.area120.tables.v1alpha1.BatchUpdateRowsResponse.rows:type_name -> google.area120.tables.v1alpha1.Row + 19, // 14: google.area120.tables.v1alpha1.Table.columns:type_name -> google.area120.tables.v1alpha1.ColumnDescription + 20, // 15: google.area120.tables.v1alpha1.ColumnDescription.labels:type_name -> google.area120.tables.v1alpha1.LabeledItem + 21, // 16: google.area120.tables.v1alpha1.ColumnDescription.relationship_details:type_name -> google.area120.tables.v1alpha1.RelationshipDetails + 22, // 17: google.area120.tables.v1alpha1.ColumnDescription.lookup_details:type_name -> google.area120.tables.v1alpha1.LookupDetails + 25, // 18: google.area120.tables.v1alpha1.Row.values:type_name -> google.area120.tables.v1alpha1.Row.ValuesEntry + 18, // 19: google.area120.tables.v1alpha1.Workspace.tables:type_name -> google.area120.tables.v1alpha1.Table + 27, // 20: google.area120.tables.v1alpha1.Row.ValuesEntry.value:type_name -> google.protobuf.Value + 1, // 21: google.area120.tables.v1alpha1.TablesService.GetTable:input_type -> google.area120.tables.v1alpha1.GetTableRequest + 2, // 22: google.area120.tables.v1alpha1.TablesService.ListTables:input_type -> google.area120.tables.v1alpha1.ListTablesRequest + 4, // 23: google.area120.tables.v1alpha1.TablesService.GetWorkspace:input_type -> google.area120.tables.v1alpha1.GetWorkspaceRequest + 5, // 24: google.area120.tables.v1alpha1.TablesService.ListWorkspaces:input_type -> google.area120.tables.v1alpha1.ListWorkspacesRequest + 7, // 25: google.area120.tables.v1alpha1.TablesService.GetRow:input_type -> google.area120.tables.v1alpha1.GetRowRequest + 8, // 26: google.area120.tables.v1alpha1.TablesService.ListRows:input_type -> google.area120.tables.v1alpha1.ListRowsRequest + 10, // 27: google.area120.tables.v1alpha1.TablesService.CreateRow:input_type -> google.area120.tables.v1alpha1.CreateRowRequest + 11, // 28: google.area120.tables.v1alpha1.TablesService.BatchCreateRows:input_type -> google.area120.tables.v1alpha1.BatchCreateRowsRequest + 13, // 29: google.area120.tables.v1alpha1.TablesService.UpdateRow:input_type -> google.area120.tables.v1alpha1.UpdateRowRequest + 14, // 30: google.area120.tables.v1alpha1.TablesService.BatchUpdateRows:input_type -> google.area120.tables.v1alpha1.BatchUpdateRowsRequest + 16, // 31: google.area120.tables.v1alpha1.TablesService.DeleteRow:input_type -> google.area120.tables.v1alpha1.DeleteRowRequest + 17, // 32: google.area120.tables.v1alpha1.TablesService.BatchDeleteRows:input_type -> google.area120.tables.v1alpha1.BatchDeleteRowsRequest + 18, // 33: google.area120.tables.v1alpha1.TablesService.GetTable:output_type -> google.area120.tables.v1alpha1.Table + 3, // 34: google.area120.tables.v1alpha1.TablesService.ListTables:output_type -> google.area120.tables.v1alpha1.ListTablesResponse + 24, // 35: google.area120.tables.v1alpha1.TablesService.GetWorkspace:output_type -> google.area120.tables.v1alpha1.Workspace + 6, // 36: google.area120.tables.v1alpha1.TablesService.ListWorkspaces:output_type -> google.area120.tables.v1alpha1.ListWorkspacesResponse + 23, // 37: google.area120.tables.v1alpha1.TablesService.GetRow:output_type -> google.area120.tables.v1alpha1.Row + 9, // 38: google.area120.tables.v1alpha1.TablesService.ListRows:output_type -> google.area120.tables.v1alpha1.ListRowsResponse + 23, // 39: google.area120.tables.v1alpha1.TablesService.CreateRow:output_type -> google.area120.tables.v1alpha1.Row + 12, // 40: google.area120.tables.v1alpha1.TablesService.BatchCreateRows:output_type -> google.area120.tables.v1alpha1.BatchCreateRowsResponse + 23, // 41: google.area120.tables.v1alpha1.TablesService.UpdateRow:output_type -> google.area120.tables.v1alpha1.Row + 15, // 42: google.area120.tables.v1alpha1.TablesService.BatchUpdateRows:output_type -> google.area120.tables.v1alpha1.BatchUpdateRowsResponse + 28, // 43: google.area120.tables.v1alpha1.TablesService.DeleteRow:output_type -> google.protobuf.Empty + 28, // 44: google.area120.tables.v1alpha1.TablesService.BatchDeleteRows:output_type -> google.protobuf.Empty + 33, // [33:45] is the sub-list for method output_type + 21, // [21:33] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_google_area120_tables_v1alpha1_tables_proto_init() } +func file_google_area120_tables_v1alpha1_tables_proto_init() { + if File_google_area120_tables_v1alpha1_tables_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTableRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTablesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTablesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspacesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspacesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRowsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRowsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchCreateRowsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchCreateRowsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateRowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchUpdateRowsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchUpdateRowsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchDeleteRowsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Table); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnDescription); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabeledItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationshipDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_area120_tables_v1alpha1_tables_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workspace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_area120_tables_v1alpha1_tables_proto_rawDesc, + NumEnums: 1, + NumMessages: 25, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_area120_tables_v1alpha1_tables_proto_goTypes, + DependencyIndexes: file_google_area120_tables_v1alpha1_tables_proto_depIdxs, + EnumInfos: file_google_area120_tables_v1alpha1_tables_proto_enumTypes, + MessageInfos: file_google_area120_tables_v1alpha1_tables_proto_msgTypes, + }.Build() + File_google_area120_tables_v1alpha1_tables_proto = out.File + file_google_area120_tables_v1alpha1_tables_proto_rawDesc = nil + file_google_area120_tables_v1alpha1_tables_proto_goTypes = nil + file_google_area120_tables_v1alpha1_tables_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// TablesServiceClient is the client API for TablesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TablesServiceClient interface { + // Gets a table. Returns NOT_FOUND if the table does not exist. + GetTable(ctx context.Context, in *GetTableRequest, opts ...grpc.CallOption) (*Table, error) + // Lists tables for the user. + ListTables(ctx context.Context, in *ListTablesRequest, opts ...grpc.CallOption) (*ListTablesResponse, error) + // Gets a workspace. Returns NOT_FOUND if the workspace does not exist. + GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) + // Lists workspaces for the user. + ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) + // Gets a row. Returns NOT_FOUND if the row does not exist in the table. + GetRow(ctx context.Context, in *GetRowRequest, opts ...grpc.CallOption) (*Row, error) + // Lists rows in a table. Returns NOT_FOUND if the table does not exist. + ListRows(ctx context.Context, in *ListRowsRequest, opts ...grpc.CallOption) (*ListRowsResponse, error) + // Creates a row. + CreateRow(ctx context.Context, in *CreateRowRequest, opts ...grpc.CallOption) (*Row, error) + // Creates multiple rows. + BatchCreateRows(ctx context.Context, in *BatchCreateRowsRequest, opts ...grpc.CallOption) (*BatchCreateRowsResponse, error) + // Updates a row. + UpdateRow(ctx context.Context, in *UpdateRowRequest, opts ...grpc.CallOption) (*Row, error) + // Updates multiple rows. + BatchUpdateRows(ctx context.Context, in *BatchUpdateRowsRequest, opts ...grpc.CallOption) (*BatchUpdateRowsResponse, error) + // Deletes a row. + DeleteRow(ctx context.Context, in *DeleteRowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes multiple rows. + BatchDeleteRows(ctx context.Context, in *BatchDeleteRowsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type tablesServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTablesServiceClient(cc grpc.ClientConnInterface) TablesServiceClient { + return &tablesServiceClient{cc} +} + +func (c *tablesServiceClient) GetTable(ctx context.Context, in *GetTableRequest, opts ...grpc.CallOption) (*Table, error) { + out := new(Table) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/GetTable", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) ListTables(ctx context.Context, in *ListTablesRequest, opts ...grpc.CallOption) (*ListTablesResponse, error) { + out := new(ListTablesResponse) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/ListTables", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { + out := new(Workspace) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/GetWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) { + out := new(ListWorkspacesResponse) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/ListWorkspaces", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) GetRow(ctx context.Context, in *GetRowRequest, opts ...grpc.CallOption) (*Row, error) { + out := new(Row) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/GetRow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) ListRows(ctx context.Context, in *ListRowsRequest, opts ...grpc.CallOption) (*ListRowsResponse, error) { + out := new(ListRowsResponse) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/ListRows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) CreateRow(ctx context.Context, in *CreateRowRequest, opts ...grpc.CallOption) (*Row, error) { + out := new(Row) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/CreateRow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) BatchCreateRows(ctx context.Context, in *BatchCreateRowsRequest, opts ...grpc.CallOption) (*BatchCreateRowsResponse, error) { + out := new(BatchCreateRowsResponse) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/BatchCreateRows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) UpdateRow(ctx context.Context, in *UpdateRowRequest, opts ...grpc.CallOption) (*Row, error) { + out := new(Row) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/UpdateRow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) BatchUpdateRows(ctx context.Context, in *BatchUpdateRowsRequest, opts ...grpc.CallOption) (*BatchUpdateRowsResponse, error) { + out := new(BatchUpdateRowsResponse) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/BatchUpdateRows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) DeleteRow(ctx context.Context, in *DeleteRowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/DeleteRow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tablesServiceClient) BatchDeleteRows(ctx context.Context, in *BatchDeleteRowsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.area120.tables.v1alpha1.TablesService/BatchDeleteRows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TablesServiceServer is the server API for TablesService service. +type TablesServiceServer interface { + // Gets a table. Returns NOT_FOUND if the table does not exist. + GetTable(context.Context, *GetTableRequest) (*Table, error) + // Lists tables for the user. + ListTables(context.Context, *ListTablesRequest) (*ListTablesResponse, error) + // Gets a workspace. Returns NOT_FOUND if the workspace does not exist. + GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) + // Lists workspaces for the user. + ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) + // Gets a row. Returns NOT_FOUND if the row does not exist in the table. + GetRow(context.Context, *GetRowRequest) (*Row, error) + // Lists rows in a table. Returns NOT_FOUND if the table does not exist. + ListRows(context.Context, *ListRowsRequest) (*ListRowsResponse, error) + // Creates a row. + CreateRow(context.Context, *CreateRowRequest) (*Row, error) + // Creates multiple rows. + BatchCreateRows(context.Context, *BatchCreateRowsRequest) (*BatchCreateRowsResponse, error) + // Updates a row. + UpdateRow(context.Context, *UpdateRowRequest) (*Row, error) + // Updates multiple rows. + BatchUpdateRows(context.Context, *BatchUpdateRowsRequest) (*BatchUpdateRowsResponse, error) + // Deletes a row. + DeleteRow(context.Context, *DeleteRowRequest) (*emptypb.Empty, error) + // Deletes multiple rows. + BatchDeleteRows(context.Context, *BatchDeleteRowsRequest) (*emptypb.Empty, error) +} + +// UnimplementedTablesServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTablesServiceServer struct { +} + +func (*UnimplementedTablesServiceServer) GetTable(context.Context, *GetTableRequest) (*Table, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTable not implemented") +} +func (*UnimplementedTablesServiceServer) ListTables(context.Context, *ListTablesRequest) (*ListTablesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTables not implemented") +} +func (*UnimplementedTablesServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented") +} +func (*UnimplementedTablesServiceServer) ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaces not implemented") +} +func (*UnimplementedTablesServiceServer) GetRow(context.Context, *GetRowRequest) (*Row, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRow not implemented") +} +func (*UnimplementedTablesServiceServer) ListRows(context.Context, *ListRowsRequest) (*ListRowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRows not implemented") +} +func (*UnimplementedTablesServiceServer) CreateRow(context.Context, *CreateRowRequest) (*Row, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRow not implemented") +} +func (*UnimplementedTablesServiceServer) BatchCreateRows(context.Context, *BatchCreateRowsRequest) (*BatchCreateRowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCreateRows not implemented") +} +func (*UnimplementedTablesServiceServer) UpdateRow(context.Context, *UpdateRowRequest) (*Row, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRow not implemented") +} +func (*UnimplementedTablesServiceServer) BatchUpdateRows(context.Context, *BatchUpdateRowsRequest) (*BatchUpdateRowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateRows not implemented") +} +func (*UnimplementedTablesServiceServer) DeleteRow(context.Context, *DeleteRowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRow not implemented") +} +func (*UnimplementedTablesServiceServer) BatchDeleteRows(context.Context, *BatchDeleteRowsRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchDeleteRows not implemented") +} + +func RegisterTablesServiceServer(s *grpc.Server, srv TablesServiceServer) { + s.RegisterService(&_TablesService_serviceDesc, srv) +} + +func _TablesService_GetTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTableRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).GetTable(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/GetTable", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).GetTable(ctx, req.(*GetTableRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_ListTables_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTablesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).ListTables(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/ListTables", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).ListTables(ctx, req.(*ListTablesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).GetWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/GetWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkspacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).ListWorkspaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/ListWorkspaces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).ListWorkspaces(ctx, req.(*ListWorkspacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_GetRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).GetRow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/GetRow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).GetRow(ctx, req.(*GetRowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_ListRows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRowsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).ListRows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/ListRows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).ListRows(ctx, req.(*ListRowsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_CreateRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).CreateRow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/CreateRow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).CreateRow(ctx, req.(*CreateRowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_BatchCreateRows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchCreateRowsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).BatchCreateRows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/BatchCreateRows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).BatchCreateRows(ctx, req.(*BatchCreateRowsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_UpdateRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).UpdateRow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/UpdateRow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).UpdateRow(ctx, req.(*UpdateRowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_BatchUpdateRows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchUpdateRowsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).BatchUpdateRows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/BatchUpdateRows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).BatchUpdateRows(ctx, req.(*BatchUpdateRowsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_DeleteRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).DeleteRow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/DeleteRow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).DeleteRow(ctx, req.(*DeleteRowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TablesService_BatchDeleteRows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchDeleteRowsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TablesServiceServer).BatchDeleteRows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.area120.tables.v1alpha1.TablesService/BatchDeleteRows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TablesServiceServer).BatchDeleteRows(ctx, req.(*BatchDeleteRowsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _TablesService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.area120.tables.v1alpha1.TablesService", + HandlerType: (*TablesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetTable", + Handler: _TablesService_GetTable_Handler, + }, + { + MethodName: "ListTables", + Handler: _TablesService_ListTables_Handler, + }, + { + MethodName: "GetWorkspace", + Handler: _TablesService_GetWorkspace_Handler, + }, + { + MethodName: "ListWorkspaces", + Handler: _TablesService_ListWorkspaces_Handler, + }, + { + MethodName: "GetRow", + Handler: _TablesService_GetRow_Handler, + }, + { + MethodName: "ListRows", + Handler: _TablesService_ListRows_Handler, + }, + { + MethodName: "CreateRow", + Handler: _TablesService_CreateRow_Handler, + }, + { + MethodName: "BatchCreateRows", + Handler: _TablesService_BatchCreateRows_Handler, + }, + { + MethodName: "UpdateRow", + Handler: _TablesService_UpdateRow_Handler, + }, + { + MethodName: "BatchUpdateRows", + Handler: _TablesService_BatchUpdateRows_Handler, + }, + { + MethodName: "DeleteRow", + Handler: _TablesService_DeleteRow_Handler, + }, + { + MethodName: "BatchDeleteRows", + Handler: _TablesService_BatchDeleteRows_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/area120/tables/v1alpha1/tables.proto", +} diff --git a/artifactregistry/CHANGES.md b/artifactregistry/CHANGES.md index 8268a7c311f7..44d9651a5ea8 100644 --- a/artifactregistry/CHANGES.md +++ b/artifactregistry/CHANGES.md @@ -1,5 +1,26 @@ # Changes +## [1.6.0](https://github.com/googleapis/google-cloud-go/compare/artifactregistry/v1.5.0...artifactregistry/v1.6.0) (2022-09-19) + + +### Features + +* **artifactregistry:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/artifactregistry/v1.4.0...artifactregistry/v1.5.0) (2022-09-15) + + +### Features + +* **artifactregistry/apiv1beta2:** add REST transport ([f7b0822](https://github.com/googleapis/google-cloud-go/commit/f7b082212b1e46ff2f4126b52d49618785c2e8ca)) + +## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/artifactregistry/v1.3.0...artifactregistry/v1.4.0) (2022-07-26) + + +### Features + +* **artifactregistry:** start generating apiv1 ([#6403](https://github.com/googleapis/google-cloud-go/issues/6403)) ([045b544](https://github.com/googleapis/google-cloud-go/commit/045b544619f6199acefe454b015bc6b30d595bf3)) + ## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/artifactregistry/v1.2.0...artifactregistry/v1.3.0) (2022-02-23) diff --git a/artifactregistry/apiv1/artifact_registry_client.go b/artifactregistry/apiv1/artifact_registry_client.go new file mode 100644 index 000000000000..108d79ef296a --- /dev/null +++ b/artifactregistry/apiv1/artifact_registry_client.go @@ -0,0 +1,1910 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package artifactregistry + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListDockerImages []gax.CallOption + GetDockerImage []gax.CallOption + ImportAptArtifacts []gax.CallOption + ImportYumArtifacts []gax.CallOption + ListRepositories []gax.CallOption + GetRepository []gax.CallOption + CreateRepository []gax.CallOption + UpdateRepository []gax.CallOption + DeleteRepository []gax.CallOption + ListPackages []gax.CallOption + GetPackage []gax.CallOption + DeletePackage []gax.CallOption + ListVersions []gax.CallOption + GetVersion []gax.CallOption + DeleteVersion []gax.CallOption + ListFiles []gax.CallOption + GetFile []gax.CallOption + ListTags []gax.CallOption + GetTag []gax.CallOption + CreateTag []gax.CallOption + UpdateTag []gax.CallOption + DeleteTag []gax.CallOption + SetIamPolicy []gax.CallOption + GetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + GetProjectSettings []gax.CallOption + UpdateProjectSettings []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("artifactregistry.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("artifactregistry.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://artifactregistry.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListDockerImages: []gax.CallOption{}, + GetDockerImage: []gax.CallOption{}, + ImportAptArtifacts: []gax.CallOption{}, + ImportYumArtifacts: []gax.CallOption{}, + ListRepositories: []gax.CallOption{}, + GetRepository: []gax.CallOption{}, + CreateRepository: []gax.CallOption{}, + UpdateRepository: []gax.CallOption{}, + DeleteRepository: []gax.CallOption{}, + ListPackages: []gax.CallOption{}, + GetPackage: []gax.CallOption{}, + DeletePackage: []gax.CallOption{}, + ListVersions: []gax.CallOption{}, + GetVersion: []gax.CallOption{}, + DeleteVersion: []gax.CallOption{}, + ListFiles: []gax.CallOption{}, + GetFile: []gax.CallOption{}, + ListTags: []gax.CallOption{}, + GetTag: []gax.CallOption{}, + CreateTag: []gax.CallOption{}, + UpdateTag: []gax.CallOption{}, + DeleteTag: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + GetProjectSettings: []gax.CallOption{}, + UpdateProjectSettings: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from Artifact Registry API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListDockerImages(context.Context, *artifactregistrypb.ListDockerImagesRequest, ...gax.CallOption) *DockerImageIterator + GetDockerImage(context.Context, *artifactregistrypb.GetDockerImageRequest, ...gax.CallOption) (*artifactregistrypb.DockerImage, error) + ImportAptArtifacts(context.Context, *artifactregistrypb.ImportAptArtifactsRequest, ...gax.CallOption) (*ImportAptArtifactsOperation, error) + ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation + ImportYumArtifacts(context.Context, *artifactregistrypb.ImportYumArtifactsRequest, ...gax.CallOption) (*ImportYumArtifactsOperation, error) + ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation + ListRepositories(context.Context, *artifactregistrypb.ListRepositoriesRequest, ...gax.CallOption) *RepositoryIterator + GetRepository(context.Context, *artifactregistrypb.GetRepositoryRequest, ...gax.CallOption) (*artifactregistrypb.Repository, error) + CreateRepository(context.Context, *artifactregistrypb.CreateRepositoryRequest, ...gax.CallOption) (*CreateRepositoryOperation, error) + CreateRepositoryOperation(name string) *CreateRepositoryOperation + UpdateRepository(context.Context, *artifactregistrypb.UpdateRepositoryRequest, ...gax.CallOption) (*artifactregistrypb.Repository, error) + DeleteRepository(context.Context, *artifactregistrypb.DeleteRepositoryRequest, ...gax.CallOption) (*DeleteRepositoryOperation, error) + DeleteRepositoryOperation(name string) *DeleteRepositoryOperation + ListPackages(context.Context, *artifactregistrypb.ListPackagesRequest, ...gax.CallOption) *PackageIterator + GetPackage(context.Context, *artifactregistrypb.GetPackageRequest, ...gax.CallOption) (*artifactregistrypb.Package, error) + DeletePackage(context.Context, *artifactregistrypb.DeletePackageRequest, ...gax.CallOption) (*DeletePackageOperation, error) + DeletePackageOperation(name string) *DeletePackageOperation + ListVersions(context.Context, *artifactregistrypb.ListVersionsRequest, ...gax.CallOption) *VersionIterator + GetVersion(context.Context, *artifactregistrypb.GetVersionRequest, ...gax.CallOption) (*artifactregistrypb.Version, error) + DeleteVersion(context.Context, *artifactregistrypb.DeleteVersionRequest, ...gax.CallOption) (*DeleteVersionOperation, error) + DeleteVersionOperation(name string) *DeleteVersionOperation + ListFiles(context.Context, *artifactregistrypb.ListFilesRequest, ...gax.CallOption) *FileIterator + GetFile(context.Context, *artifactregistrypb.GetFileRequest, ...gax.CallOption) (*artifactregistrypb.File, error) + ListTags(context.Context, *artifactregistrypb.ListTagsRequest, ...gax.CallOption) *TagIterator + GetTag(context.Context, *artifactregistrypb.GetTagRequest, ...gax.CallOption) (*artifactregistrypb.Tag, error) + CreateTag(context.Context, *artifactregistrypb.CreateTagRequest, ...gax.CallOption) (*artifactregistrypb.Tag, error) + UpdateTag(context.Context, *artifactregistrypb.UpdateTagRequest, ...gax.CallOption) (*artifactregistrypb.Tag, error) + DeleteTag(context.Context, *artifactregistrypb.DeleteTagRequest, ...gax.CallOption) error + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + GetProjectSettings(context.Context, *artifactregistrypb.GetProjectSettingsRequest, ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) + UpdateProjectSettings(context.Context, *artifactregistrypb.UpdateProjectSettingsRequest, ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) +} + +// Client is a client for interacting with Artifact Registry API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// The Artifact Registry API service. +// +// Artifact Registry is an artifact management system for storing artifacts +// from different package management systems. +// +// The resources managed by this API are: +// +// Repositories, which group packages and their data. +// +// Packages, which group versions and their tags. +// +// Versions, which are specific forms of a package. +// +// Tags, which represent alternative names for versions. +// +// Files, which contain content and are optionally associated with a Package +// or Version. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListDockerImages lists docker images. +func (c *Client) ListDockerImages(ctx context.Context, req *artifactregistrypb.ListDockerImagesRequest, opts ...gax.CallOption) *DockerImageIterator { + return c.internalClient.ListDockerImages(ctx, req, opts...) +} + +// GetDockerImage gets a docker image. +func (c *Client) GetDockerImage(ctx context.Context, req *artifactregistrypb.GetDockerImageRequest, opts ...gax.CallOption) (*artifactregistrypb.DockerImage, error) { + return c.internalClient.GetDockerImage(ctx, req, opts...) +} + +// ImportAptArtifacts imports Apt artifacts. The returned Operation will complete once the +// resources are imported. Package, Version, and File resources are created +// based on the imported artifacts. Imported artifacts that conflict with +// existing resources are ignored. +func (c *Client) ImportAptArtifacts(ctx context.Context, req *artifactregistrypb.ImportAptArtifactsRequest, opts ...gax.CallOption) (*ImportAptArtifactsOperation, error) { + return c.internalClient.ImportAptArtifacts(ctx, req, opts...) +} + +// ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name. +// The name must be that of a previously created ImportAptArtifactsOperation, possibly from a different process. +func (c *Client) ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation { + return c.internalClient.ImportAptArtifactsOperation(name) +} + +// ImportYumArtifacts imports Yum (RPM) artifacts. The returned Operation will complete once the +// resources are imported. Package, Version, and File resources are created +// based on the imported artifacts. Imported artifacts that conflict with +// existing resources are ignored. +func (c *Client) ImportYumArtifacts(ctx context.Context, req *artifactregistrypb.ImportYumArtifactsRequest, opts ...gax.CallOption) (*ImportYumArtifactsOperation, error) { + return c.internalClient.ImportYumArtifacts(ctx, req, opts...) +} + +// ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name. +// The name must be that of a previously created ImportYumArtifactsOperation, possibly from a different process. +func (c *Client) ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation { + return c.internalClient.ImportYumArtifactsOperation(name) +} + +// ListRepositories lists repositories. +func (c *Client) ListRepositories(ctx context.Context, req *artifactregistrypb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { + return c.internalClient.ListRepositories(ctx, req, opts...) +} + +// GetRepository gets a repository. +func (c *Client) GetRepository(ctx context.Context, req *artifactregistrypb.GetRepositoryRequest, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + return c.internalClient.GetRepository(ctx, req, opts...) +} + +// CreateRepository creates a repository. The returned Operation will finish once the +// repository has been created. Its response will be the created Repository. +func (c *Client) CreateRepository(ctx context.Context, req *artifactregistrypb.CreateRepositoryRequest, opts ...gax.CallOption) (*CreateRepositoryOperation, error) { + return c.internalClient.CreateRepository(ctx, req, opts...) +} + +// CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. +// The name must be that of a previously created CreateRepositoryOperation, possibly from a different process. +func (c *Client) CreateRepositoryOperation(name string) *CreateRepositoryOperation { + return c.internalClient.CreateRepositoryOperation(name) +} + +// UpdateRepository updates a repository. +func (c *Client) UpdateRepository(ctx context.Context, req *artifactregistrypb.UpdateRepositoryRequest, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + return c.internalClient.UpdateRepository(ctx, req, opts...) +} + +// DeleteRepository deletes a repository and all of its contents. The returned Operation will +// finish once the repository has been deleted. It will not have any Operation +// metadata and will return a google.protobuf.Empty response. +func (c *Client) DeleteRepository(ctx context.Context, req *artifactregistrypb.DeleteRepositoryRequest, opts ...gax.CallOption) (*DeleteRepositoryOperation, error) { + return c.internalClient.DeleteRepository(ctx, req, opts...) +} + +// DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. +// The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process. +func (c *Client) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation { + return c.internalClient.DeleteRepositoryOperation(name) +} + +// ListPackages lists packages. +func (c *Client) ListPackages(ctx context.Context, req *artifactregistrypb.ListPackagesRequest, opts ...gax.CallOption) *PackageIterator { + return c.internalClient.ListPackages(ctx, req, opts...) +} + +// GetPackage gets a package. +func (c *Client) GetPackage(ctx context.Context, req *artifactregistrypb.GetPackageRequest, opts ...gax.CallOption) (*artifactregistrypb.Package, error) { + return c.internalClient.GetPackage(ctx, req, opts...) +} + +// DeletePackage deletes a package and all of its versions and tags. The returned operation +// will complete once the package has been deleted. +func (c *Client) DeletePackage(ctx context.Context, req *artifactregistrypb.DeletePackageRequest, opts ...gax.CallOption) (*DeletePackageOperation, error) { + return c.internalClient.DeletePackage(ctx, req, opts...) +} + +// DeletePackageOperation returns a new DeletePackageOperation from a given name. +// The name must be that of a previously created DeletePackageOperation, possibly from a different process. +func (c *Client) DeletePackageOperation(name string) *DeletePackageOperation { + return c.internalClient.DeletePackageOperation(name) +} + +// ListVersions lists versions. +func (c *Client) ListVersions(ctx context.Context, req *artifactregistrypb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { + return c.internalClient.ListVersions(ctx, req, opts...) +} + +// GetVersion gets a version +func (c *Client) GetVersion(ctx context.Context, req *artifactregistrypb.GetVersionRequest, opts ...gax.CallOption) (*artifactregistrypb.Version, error) { + return c.internalClient.GetVersion(ctx, req, opts...) +} + +// DeleteVersion deletes a version and all of its content. The returned operation will +// complete once the version has been deleted. +func (c *Client) DeleteVersion(ctx context.Context, req *artifactregistrypb.DeleteVersionRequest, opts ...gax.CallOption) (*DeleteVersionOperation, error) { + return c.internalClient.DeleteVersion(ctx, req, opts...) +} + +// DeleteVersionOperation returns a new DeleteVersionOperation from a given name. +// The name must be that of a previously created DeleteVersionOperation, possibly from a different process. +func (c *Client) DeleteVersionOperation(name string) *DeleteVersionOperation { + return c.internalClient.DeleteVersionOperation(name) +} + +// ListFiles lists files. +func (c *Client) ListFiles(ctx context.Context, req *artifactregistrypb.ListFilesRequest, opts ...gax.CallOption) *FileIterator { + return c.internalClient.ListFiles(ctx, req, opts...) +} + +// GetFile gets a file. +func (c *Client) GetFile(ctx context.Context, req *artifactregistrypb.GetFileRequest, opts ...gax.CallOption) (*artifactregistrypb.File, error) { + return c.internalClient.GetFile(ctx, req, opts...) +} + +// ListTags lists tags. +func (c *Client) ListTags(ctx context.Context, req *artifactregistrypb.ListTagsRequest, opts ...gax.CallOption) *TagIterator { + return c.internalClient.ListTags(ctx, req, opts...) +} + +// GetTag gets a tag. +func (c *Client) GetTag(ctx context.Context, req *artifactregistrypb.GetTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + return c.internalClient.GetTag(ctx, req, opts...) +} + +// CreateTag creates a tag. +func (c *Client) CreateTag(ctx context.Context, req *artifactregistrypb.CreateTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + return c.internalClient.CreateTag(ctx, req, opts...) +} + +// UpdateTag updates a tag. +func (c *Client) UpdateTag(ctx context.Context, req *artifactregistrypb.UpdateTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + return c.internalClient.UpdateTag(ctx, req, opts...) +} + +// DeleteTag deletes a tag. +func (c *Client) DeleteTag(ctx context.Context, req *artifactregistrypb.DeleteTagRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteTag(ctx, req, opts...) +} + +// SetIamPolicy updates the IAM policy for a given resource. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// GetIamPolicy gets the IAM policy for a given resource. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions tests if the caller has a list of permissions on a resource. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// GetProjectSettings retrieves the Settings for the Project. +func (c *Client) GetProjectSettings(ctx context.Context, req *artifactregistrypb.GetProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + return c.internalClient.GetProjectSettings(ctx, req, opts...) +} + +// UpdateProjectSettings updates the Settings for the Project. +func (c *Client) UpdateProjectSettings(ctx context.Context, req *artifactregistrypb.UpdateProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + return c.internalClient.UpdateProjectSettings(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with Artifact Registry API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client artifactregistrypb.ArtifactRegistryClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new artifact registry client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// The Artifact Registry API service. +// +// Artifact Registry is an artifact management system for storing artifacts +// from different package management systems. +// +// The resources managed by this API are: +// +// Repositories, which group packages and their data. +// +// Packages, which group versions and their tags. +// +// Versions, which are specific forms of a package. +// +// Tags, which represent alternative names for versions. +// +// Files, which contain content and are optionally associated with a Package +// or Version. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: artifactregistrypb.NewArtifactRegistryClient(connPool), + CallOptions: &client.CallOptions, + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) ListDockerImages(ctx context.Context, req *artifactregistrypb.ListDockerImagesRequest, opts ...gax.CallOption) *DockerImageIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListDockerImages[0:len((*c.CallOptions).ListDockerImages):len((*c.CallOptions).ListDockerImages)], opts...) + it := &DockerImageIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListDockerImagesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.DockerImage, string, error) { + resp := &artifactregistrypb.ListDockerImagesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListDockerImages(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetDockerImages(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetDockerImage(ctx context.Context, req *artifactregistrypb.GetDockerImageRequest, opts ...gax.CallOption) (*artifactregistrypb.DockerImage, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetDockerImage[0:len((*c.CallOptions).GetDockerImage):len((*c.CallOptions).GetDockerImage)], opts...) + var resp *artifactregistrypb.DockerImage + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetDockerImage(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ImportAptArtifacts(ctx context.Context, req *artifactregistrypb.ImportAptArtifactsRequest, opts ...gax.CallOption) (*ImportAptArtifactsOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ImportAptArtifacts[0:len((*c.CallOptions).ImportAptArtifacts):len((*c.CallOptions).ImportAptArtifacts)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ImportAptArtifacts(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportAptArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ImportYumArtifacts(ctx context.Context, req *artifactregistrypb.ImportYumArtifactsRequest, opts ...gax.CallOption) (*ImportYumArtifactsOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ImportYumArtifacts[0:len((*c.CallOptions).ImportYumArtifacts):len((*c.CallOptions).ImportYumArtifacts)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ImportYumArtifacts(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportYumArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListRepositories(ctx context.Context, req *artifactregistrypb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListRepositories[0:len((*c.CallOptions).ListRepositories):len((*c.CallOptions).ListRepositories)], opts...) + it := &RepositoryIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListRepositoriesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Repository, string, error) { + resp := &artifactregistrypb.ListRepositoriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetRepositories(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetRepository(ctx context.Context, req *artifactregistrypb.GetRepositoryRequest, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetRepository[0:len((*c.CallOptions).GetRepository):len((*c.CallOptions).GetRepository)], opts...) + var resp *artifactregistrypb.Repository + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateRepository(ctx context.Context, req *artifactregistrypb.CreateRepositoryRequest, opts ...gax.CallOption) (*CreateRepositoryOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateRepository[0:len((*c.CallOptions).CreateRepository):len((*c.CallOptions).CreateRepository)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) UpdateRepository(ctx context.Context, req *artifactregistrypb.UpdateRepositoryRequest, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "repository.name", url.QueryEscape(req.GetRepository().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateRepository[0:len((*c.CallOptions).UpdateRepository):len((*c.CallOptions).UpdateRepository)], opts...) + var resp *artifactregistrypb.Repository + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteRepository(ctx context.Context, req *artifactregistrypb.DeleteRepositoryRequest, opts ...gax.CallOption) (*DeleteRepositoryOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteRepository[0:len((*c.CallOptions).DeleteRepository):len((*c.CallOptions).DeleteRepository)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListPackages(ctx context.Context, req *artifactregistrypb.ListPackagesRequest, opts ...gax.CallOption) *PackageIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListPackages[0:len((*c.CallOptions).ListPackages):len((*c.CallOptions).ListPackages)], opts...) + it := &PackageIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListPackagesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Package, string, error) { + resp := &artifactregistrypb.ListPackagesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListPackages(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetPackages(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetPackage(ctx context.Context, req *artifactregistrypb.GetPackageRequest, opts ...gax.CallOption) (*artifactregistrypb.Package, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetPackage[0:len((*c.CallOptions).GetPackage):len((*c.CallOptions).GetPackage)], opts...) + var resp *artifactregistrypb.Package + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetPackage(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeletePackage(ctx context.Context, req *artifactregistrypb.DeletePackageRequest, opts ...gax.CallOption) (*DeletePackageOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeletePackage[0:len((*c.CallOptions).DeletePackage):len((*c.CallOptions).DeletePackage)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeletePackage(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeletePackageOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListVersions(ctx context.Context, req *artifactregistrypb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListVersions[0:len((*c.CallOptions).ListVersions):len((*c.CallOptions).ListVersions)], opts...) + it := &VersionIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListVersionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Version, string, error) { + resp := &artifactregistrypb.ListVersionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListVersions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetVersions(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetVersion(ctx context.Context, req *artifactregistrypb.GetVersionRequest, opts ...gax.CallOption) (*artifactregistrypb.Version, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetVersion[0:len((*c.CallOptions).GetVersion):len((*c.CallOptions).GetVersion)], opts...) + var resp *artifactregistrypb.Version + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteVersion(ctx context.Context, req *artifactregistrypb.DeleteVersionRequest, opts ...gax.CallOption) (*DeleteVersionOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteVersion[0:len((*c.CallOptions).DeleteVersion):len((*c.CallOptions).DeleteVersion)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListFiles(ctx context.Context, req *artifactregistrypb.ListFilesRequest, opts ...gax.CallOption) *FileIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListFiles[0:len((*c.CallOptions).ListFiles):len((*c.CallOptions).ListFiles)], opts...) + it := &FileIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListFilesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.File, string, error) { + resp := &artifactregistrypb.ListFilesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListFiles(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetFiles(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetFile(ctx context.Context, req *artifactregistrypb.GetFileRequest, opts ...gax.CallOption) (*artifactregistrypb.File, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetFile[0:len((*c.CallOptions).GetFile):len((*c.CallOptions).GetFile)], opts...) + var resp *artifactregistrypb.File + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetFile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListTags(ctx context.Context, req *artifactregistrypb.ListTagsRequest, opts ...gax.CallOption) *TagIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListTags[0:len((*c.CallOptions).ListTags):len((*c.CallOptions).ListTags)], opts...) + it := &TagIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListTagsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Tag, string, error) { + resp := &artifactregistrypb.ListTagsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListTags(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTags(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetTag(ctx context.Context, req *artifactregistrypb.GetTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetTag[0:len((*c.CallOptions).GetTag):len((*c.CallOptions).GetTag)], opts...) + var resp *artifactregistrypb.Tag + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetTag(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateTag(ctx context.Context, req *artifactregistrypb.CreateTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateTag[0:len((*c.CallOptions).CreateTag):len((*c.CallOptions).CreateTag)], opts...) + var resp *artifactregistrypb.Tag + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateTag(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateTag(ctx context.Context, req *artifactregistrypb.UpdateTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tag.name", url.QueryEscape(req.GetTag().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateTag[0:len((*c.CallOptions).UpdateTag):len((*c.CallOptions).UpdateTag)], opts...) + var resp *artifactregistrypb.Tag + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateTag(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteTag(ctx context.Context, req *artifactregistrypb.DeleteTagRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteTag[0:len((*c.CallOptions).DeleteTag):len((*c.CallOptions).DeleteTag)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.DeleteTag(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) GetProjectSettings(ctx context.Context, req *artifactregistrypb.GetProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetProjectSettings[0:len((*c.CallOptions).GetProjectSettings):len((*c.CallOptions).GetProjectSettings)], opts...) + var resp *artifactregistrypb.ProjectSettings + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetProjectSettings(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateProjectSettings(ctx context.Context, req *artifactregistrypb.UpdateProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project_settings.name", url.QueryEscape(req.GetProjectSettings().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateProjectSettings[0:len((*c.CallOptions).UpdateProjectSettings):len((*c.CallOptions).UpdateProjectSettings)], opts...) + var resp *artifactregistrypb.ProjectSettings + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateProjectSettings(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// CreateRepositoryOperation manages a long-running operation from CreateRepository. +type CreateRepositoryOperation struct { + lro *longrunning.Operation +} + +// CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. +// The name must be that of a previously created CreateRepositoryOperation, possibly from a different process. +func (c *gRPCClient) CreateRepositoryOperation(name string) *CreateRepositoryOperation { + return &CreateRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + var resp artifactregistrypb.Repository + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + var resp artifactregistrypb.Repository + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateRepositoryOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { + var meta artifactregistrypb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateRepositoryOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateRepositoryOperation) Name() string { + return op.lro.Name() +} + +// DeletePackageOperation manages a long-running operation from DeletePackage. +type DeletePackageOperation struct { + lro *longrunning.Operation +} + +// DeletePackageOperation returns a new DeletePackageOperation from a given name. +// The name must be that of a previously created DeletePackageOperation, possibly from a different process. +func (c *gRPCClient) DeletePackageOperation(name string) *DeletePackageOperation { + return &DeletePackageOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeletePackageOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeletePackageOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeletePackageOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { + var meta artifactregistrypb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeletePackageOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeletePackageOperation) Name() string { + return op.lro.Name() +} + +// DeleteRepositoryOperation manages a long-running operation from DeleteRepository. +type DeleteRepositoryOperation struct { + lro *longrunning.Operation +} + +// DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. +// The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process. +func (c *gRPCClient) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation { + return &DeleteRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteRepositoryOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { + var meta artifactregistrypb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteRepositoryOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteRepositoryOperation) Name() string { + return op.lro.Name() +} + +// DeleteVersionOperation manages a long-running operation from DeleteVersion. +type DeleteVersionOperation struct { + lro *longrunning.Operation +} + +// DeleteVersionOperation returns a new DeleteVersionOperation from a given name. +// The name must be that of a previously created DeleteVersionOperation, possibly from a different process. +func (c *gRPCClient) DeleteVersionOperation(name string) *DeleteVersionOperation { + return &DeleteVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteVersionOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { + var meta artifactregistrypb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteVersionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteVersionOperation) Name() string { + return op.lro.Name() +} + +// ImportAptArtifactsOperation manages a long-running operation from ImportAptArtifacts. +type ImportAptArtifactsOperation struct { + lro *longrunning.Operation +} + +// ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name. +// The name must be that of a previously created ImportAptArtifactsOperation, possibly from a different process. +func (c *gRPCClient) ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation { + return &ImportAptArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ImportAptArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { + var resp artifactregistrypb.ImportAptArtifactsResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ImportAptArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { + var resp artifactregistrypb.ImportAptArtifactsResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ImportAptArtifactsOperation) Metadata() (*artifactregistrypb.ImportAptArtifactsMetadata, error) { + var meta artifactregistrypb.ImportAptArtifactsMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ImportAptArtifactsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ImportAptArtifactsOperation) Name() string { + return op.lro.Name() +} + +// ImportYumArtifactsOperation manages a long-running operation from ImportYumArtifacts. +type ImportYumArtifactsOperation struct { + lro *longrunning.Operation +} + +// ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name. +// The name must be that of a previously created ImportYumArtifactsOperation, possibly from a different process. +func (c *gRPCClient) ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation { + return &ImportYumArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ImportYumArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { + var resp artifactregistrypb.ImportYumArtifactsResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ImportYumArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { + var resp artifactregistrypb.ImportYumArtifactsResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ImportYumArtifactsOperation) Metadata() (*artifactregistrypb.ImportYumArtifactsMetadata, error) { + var meta artifactregistrypb.ImportYumArtifactsMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ImportYumArtifactsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ImportYumArtifactsOperation) Name() string { + return op.lro.Name() +} + +// DockerImageIterator manages a stream of *artifactregistrypb.DockerImage. +type DockerImageIterator struct { + items []*artifactregistrypb.DockerImage + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.DockerImage, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *DockerImageIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *DockerImageIterator) Next() (*artifactregistrypb.DockerImage, error) { + var item *artifactregistrypb.DockerImage + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *DockerImageIterator) bufLen() int { + return len(it.items) +} + +func (it *DockerImageIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// FileIterator manages a stream of *artifactregistrypb.File. +type FileIterator struct { + items []*artifactregistrypb.File + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.File, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *FileIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *FileIterator) Next() (*artifactregistrypb.File, error) { + var item *artifactregistrypb.File + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *FileIterator) bufLen() int { + return len(it.items) +} + +func (it *FileIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// PackageIterator manages a stream of *artifactregistrypb.Package. +type PackageIterator struct { + items []*artifactregistrypb.Package + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Package, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *PackageIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *PackageIterator) Next() (*artifactregistrypb.Package, error) { + var item *artifactregistrypb.Package + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *PackageIterator) bufLen() int { + return len(it.items) +} + +func (it *PackageIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// RepositoryIterator manages a stream of *artifactregistrypb.Repository. +type RepositoryIterator struct { + items []*artifactregistrypb.Repository + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Repository, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *RepositoryIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *RepositoryIterator) Next() (*artifactregistrypb.Repository, error) { + var item *artifactregistrypb.Repository + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *RepositoryIterator) bufLen() int { + return len(it.items) +} + +func (it *RepositoryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TagIterator manages a stream of *artifactregistrypb.Tag. +type TagIterator struct { + items []*artifactregistrypb.Tag + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Tag, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TagIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *TagIterator) Next() (*artifactregistrypb.Tag, error) { + var item *artifactregistrypb.Tag + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TagIterator) bufLen() int { + return len(it.items) +} + +func (it *TagIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// VersionIterator manages a stream of *artifactregistrypb.Version. +type VersionIterator struct { + items []*artifactregistrypb.Version + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Version, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *VersionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *VersionIterator) Next() (*artifactregistrypb.Version, error) { + var item *artifactregistrypb.Version + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *VersionIterator) bufLen() int { + return len(it.items) +} + +func (it *VersionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/artifactregistry/apiv1/artifact_registry_client_example_test.go b/artifactregistry/apiv1/artifact_registry_client_example_test.go new file mode 100644 index 000000000000..87245887e430 --- /dev/null +++ b/artifactregistry/apiv1/artifact_registry_client_example_test.go @@ -0,0 +1,776 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package artifactregistry_test + +import ( + "context" + + artifactregistry "cloud.google.com/go/artifactregistry/apiv1" + "google.golang.org/api/iterator" + artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListDockerImages() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ListDockerImagesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListDockerImagesRequest. + } + it := c.ListDockerImages(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetDockerImage() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetDockerImageRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetDockerImageRequest. + } + resp, err := c.GetDockerImage(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ImportAptArtifacts() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ImportAptArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ImportAptArtifactsRequest. + } + op, err := c.ImportAptArtifacts(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ImportYumArtifacts() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ImportYumArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ImportYumArtifactsRequest. + } + op, err := c.ImportYumArtifacts(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListRepositories() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ListRepositoriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListRepositoriesRequest. + } + it := c.ListRepositories(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetRepositoryRequest. + } + resp, err := c.GetRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.CreateRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#CreateRepositoryRequest. + } + op, err := c.CreateRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.UpdateRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#UpdateRepositoryRequest. + } + resp, err := c.UpdateRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.DeleteRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#DeleteRepositoryRequest. + } + op, err := c.DeleteRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ListPackages() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ListPackagesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListPackagesRequest. + } + it := c.ListPackages(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetPackage() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetPackageRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetPackageRequest. + } + resp, err := c.GetPackage(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeletePackage() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.DeletePackageRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#DeletePackageRequest. + } + op, err := c.DeletePackage(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ListVersions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ListVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListVersionsRequest. + } + it := c.ListVersions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetVersionRequest. + } + resp, err := c.GetVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.DeleteVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#DeleteVersionRequest. + } + op, err := c.DeleteVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ListFiles() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ListFilesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListFilesRequest. + } + it := c.ListFiles(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetFile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetFileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetFileRequest. + } + resp, err := c.GetFile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListTags() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ListTagsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListTagsRequest. + } + it := c.ListTags(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetTag() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetTagRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetTagRequest. + } + resp, err := c.GetTag(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateTag() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.CreateTagRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#CreateTagRequest. + } + resp, err := c.CreateTag(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateTag() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.UpdateTagRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#UpdateTagRequest. + } + resp, err := c.UpdateTag(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteTag() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.DeleteTagRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#DeleteTagRequest. + } + err = c.DeleteTag(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetProjectSettings() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetProjectSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#GetProjectSettingsRequest. + } + resp, err := c.GetProjectSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateProjectSettings() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.UpdateProjectSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#UpdateProjectSettingsRequest. + } + resp, err := c.UpdateProjectSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/artifactregistry/apiv1/doc.go b/artifactregistry/apiv1/doc.go new file mode 100644 index 000000000000..f65adaf40899 --- /dev/null +++ b/artifactregistry/apiv1/doc.go @@ -0,0 +1,180 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package artifactregistry is an auto-generated package for the +// Artifact Registry API. +// +// Store and manage build artifacts in a scalable and integrated service +// built on Google infrastructure. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := artifactregistry.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := artifactregistry.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &artifactregistrypb.ListDockerImagesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1#ListDockerImagesRequest. +// } +// it := c.ListDockerImages(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package artifactregistry // import "cloud.google.com/go/artifactregistry/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/artifactregistry/apiv1/gapic_metadata.json b/artifactregistry/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..a2a38b874a0a --- /dev/null +++ b/artifactregistry/apiv1/gapic_metadata.json @@ -0,0 +1,153 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.devtools.artifactregistry.v1", + "libraryPackage": "cloud.google.com/go/artifactregistry/apiv1", + "services": { + "ArtifactRegistry": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CreateRepository": { + "methods": [ + "CreateRepository" + ] + }, + "CreateTag": { + "methods": [ + "CreateTag" + ] + }, + "DeletePackage": { + "methods": [ + "DeletePackage" + ] + }, + "DeleteRepository": { + "methods": [ + "DeleteRepository" + ] + }, + "DeleteTag": { + "methods": [ + "DeleteTag" + ] + }, + "DeleteVersion": { + "methods": [ + "DeleteVersion" + ] + }, + "GetDockerImage": { + "methods": [ + "GetDockerImage" + ] + }, + "GetFile": { + "methods": [ + "GetFile" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetPackage": { + "methods": [ + "GetPackage" + ] + }, + "GetProjectSettings": { + "methods": [ + "GetProjectSettings" + ] + }, + "GetRepository": { + "methods": [ + "GetRepository" + ] + }, + "GetTag": { + "methods": [ + "GetTag" + ] + }, + "GetVersion": { + "methods": [ + "GetVersion" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "ImportAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "ImportYumArtifacts" + ] + }, + "ListDockerImages": { + "methods": [ + "ListDockerImages" + ] + }, + "ListFiles": { + "methods": [ + "ListFiles" + ] + }, + "ListPackages": { + "methods": [ + "ListPackages" + ] + }, + "ListRepositories": { + "methods": [ + "ListRepositories" + ] + }, + "ListTags": { + "methods": [ + "ListTags" + ] + }, + "ListVersions": { + "methods": [ + "ListVersions" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "UpdateProjectSettings" + ] + }, + "UpdateRepository": { + "methods": [ + "UpdateRepository" + ] + }, + "UpdateTag": { + "methods": [ + "UpdateTag" + ] + } + } + } + } + } + } +} diff --git a/artifactregistry/apiv1/version.go b/artifactregistry/apiv1/version.go new file mode 100644 index 000000000000..baeed369a753 --- /dev/null +++ b/artifactregistry/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package artifactregistry + +import "cloud.google.com/go/artifactregistry/internal" + +func init() { + versionClient = internal.Version +} diff --git a/artifactregistry/apiv1beta2/artifact_registry_client.go b/artifactregistry/apiv1beta2/artifact_registry_client.go index 6702bee6b51e..fe74ef87c375 100644 --- a/artifactregistry/apiv1beta2/artifact_registry_client.go +++ b/artifactregistry/apiv1beta2/artifact_registry_client.go @@ -17,25 +17,31 @@ package artifactregistry import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2" iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -262,6 +268,171 @@ func defaultCallOptions() *CallOptions { } } +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + ImportAptArtifacts: []gax.CallOption{}, + ImportYumArtifacts: []gax.CallOption{}, + ListRepositories: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetRepository: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateRepository: []gax.CallOption{}, + UpdateRepository: []gax.CallOption{}, + DeleteRepository: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListPackages: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetPackage: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeletePackage: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListVersions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListFiles: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetFile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListTags: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetTag: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateTag: []gax.CallOption{}, + UpdateTag: []gax.CallOption{}, + DeleteTag: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + SetIamPolicy: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + TestIamPermissions: []gax.CallOption{}, + GetProjectSettings: []gax.CallOption{}, + UpdateProjectSettings: []gax.CallOption{}, + } +} + // internalClient is an interface that defines the methods available from Artifact Registry API. type internalClient interface { Close() error @@ -310,16 +481,16 @@ type internalClient interface { // // The resources managed by this API are: // -// Repositories, which group packages and their data. +// Repositories, which group packages and their data. // -// Packages, which group versions and their tags. +// Packages, which group versions and their tags. // -// Versions, which are specific forms of a package. +// Versions, which are specific forms of a package. // -// Tags, which represent alternative names for versions. +// Tags, which represent alternative names for versions. // -// Files, which contain content and are optionally associated with a Package -// or Version. +// Files, which contain content and are optionally associated with a Package +// or Version. type Client struct { // The internal transport-dependent client. internalClient internalClient @@ -350,7 +521,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -562,16 +734,16 @@ type gRPCClient struct { // // The resources managed by this API are: // -// Repositories, which group packages and their data. +// Repositories, which group packages and their data. // -// Packages, which group versions and their tags. +// Packages, which group versions and their tags. // -// Versions, which are specific forms of a package. +// Versions, which are specific forms of a package. // -// Tags, which represent alternative names for versions. +// Tags, which represent alternative names for versions. // -// Files, which contain content and are optionally associated with a Package -// or Version. +// Files, which contain content and are optionally associated with a Package +// or Version. func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := defaultGRPCClientOptions() if newClientHook != nil { @@ -619,7 +791,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -639,6 +812,105 @@ func (c *gRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions +} + +// NewRESTClient creates a new artifact registry rest client. +// +// The Artifact Registry API service. +// +// Artifact Registry is an artifact management system for storing artifacts +// from different package management systems. +// +// The resources managed by this API are: +// +// Repositories, which group packages and their data. +// +// Packages, which group versions and their tags. +// +// Versions, which are specific forms of a package. +// +// Tags, which represent alternative names for versions. +// +// Files, which contain content and are optionally associated with a Package +// or Version. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://artifactregistry.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://artifactregistry.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://artifactregistry.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} func (c *gRPCClient) ImportAptArtifacts(ctx context.Context, req *artifactregistrypb.ImportAptArtifactsRequest, opts ...gax.CallOption) (*ImportAptArtifactsOperation, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -1287,52 +1559,1716 @@ func (c *gRPCClient) UpdateProjectSettings(ctx context.Context, req *artifactreg return resp, nil } -// CreateRepositoryOperation manages a long-running operation from CreateRepository. -type CreateRepositoryOperation struct { - lro *longrunning.Operation -} - -// CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. -// The name must be that of a previously created CreateRepositoryOperation, possibly from a different process. -func (c *gRPCClient) CreateRepositoryOperation(name string) *CreateRepositoryOperation { - return &CreateRepositoryOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), +// ImportAptArtifacts imports Apt artifacts. The returned Operation will complete once the +// resources are imported. Package, Version, and File resources are created +// based on the imported artifacts. Imported artifacts that conflict with +// existing resources are ignored. +func (c *restClient) ImportAptArtifacts(ctx context.Context, req *artifactregistrypb.ImportAptArtifactsRequest, opts ...gax.CallOption) (*ImportAptArtifactsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err } -} -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { - var resp artifactregistrypb.Repository - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - return &resp, nil + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/aptArtifacts:import", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta2/%s", resp.GetName()) + return &ImportAptArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil } -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { - var resp artifactregistrypb.Repository - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { +// ImportYumArtifacts imports Yum (RPM) artifacts. The returned Operation will complete once the +// resources are imported. Package, Version, and File resources are created +// based on the imported artifacts. Imported artifacts that conflict with +// existing resources are ignored. +func (c *restClient) ImportYumArtifacts(ctx context.Context, req *artifactregistrypb.ImportYumArtifactsRequest, opts ...gax.CallOption) (*ImportYumArtifactsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/yumArtifacts:import", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. -// Metadata itself does not contact the server, but Poll does. + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta2/%s", resp.GetName()) + return &ImportYumArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListRepositories lists repositories. +func (c *restClient) ListRepositories(ctx context.Context, req *artifactregistrypb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { + it := &RepositoryIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListRepositoriesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Repository, string, error) { + resp := &artifactregistrypb.ListRepositoriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/repositories", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetRepositories(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetRepository gets a repository. +func (c *restClient) GetRepository(ctx context.Context, req *artifactregistrypb.GetRepositoryRequest, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetRepository[0:len((*c.CallOptions).GetRepository):len((*c.CallOptions).GetRepository)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Repository{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateRepository creates a repository. The returned Operation will finish once the +// repository has been created. Its response will be the created Repository. +func (c *restClient) CreateRepository(ctx context.Context, req *artifactregistrypb.CreateRepositoryRequest, opts ...gax.CallOption) (*CreateRepositoryOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetRepository() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/repositories", req.GetParent()) + + params := url.Values{} + if req.GetRepositoryId() != "" { + params.Add("repositoryId", fmt.Sprintf("%v", req.GetRepositoryId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta2/%s", resp.GetName()) + return &CreateRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UpdateRepository updates a repository. +func (c *restClient) UpdateRepository(ctx context.Context, req *artifactregistrypb.UpdateRepositoryRequest, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetRepository() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetRepository().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "repository.name", url.QueryEscape(req.GetRepository().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateRepository[0:len((*c.CallOptions).UpdateRepository):len((*c.CallOptions).UpdateRepository)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Repository{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteRepository deletes a repository and all of its contents. The returned Operation will +// finish once the repository has been deleted. It will not have any Operation +// metadata and will return a google.protobuf.Empty response. +func (c *restClient) DeleteRepository(ctx context.Context, req *artifactregistrypb.DeleteRepositoryRequest, opts ...gax.CallOption) (*DeleteRepositoryOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta2/%s", resp.GetName()) + return &DeleteRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListPackages lists packages. +func (c *restClient) ListPackages(ctx context.Context, req *artifactregistrypb.ListPackagesRequest, opts ...gax.CallOption) *PackageIterator { + it := &PackageIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListPackagesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Package, string, error) { + resp := &artifactregistrypb.ListPackagesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/packages", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetPackages(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetPackage gets a package. +func (c *restClient) GetPackage(ctx context.Context, req *artifactregistrypb.GetPackageRequest, opts ...gax.CallOption) (*artifactregistrypb.Package, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetPackage[0:len((*c.CallOptions).GetPackage):len((*c.CallOptions).GetPackage)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Package{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeletePackage deletes a package and all of its versions and tags. The returned operation +// will complete once the package has been deleted. +func (c *restClient) DeletePackage(ctx context.Context, req *artifactregistrypb.DeletePackageRequest, opts ...gax.CallOption) (*DeletePackageOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta2/%s", resp.GetName()) + return &DeletePackageOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListVersions lists versions. +func (c *restClient) ListVersions(ctx context.Context, req *artifactregistrypb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { + it := &VersionIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListVersionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Version, string, error) { + resp := &artifactregistrypb.ListVersionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/versions", req.GetParent()) + + params := url.Values{} + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetView() != 0 { + params.Add("view", fmt.Sprintf("%v", req.GetView())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetVersions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetVersion gets a version +func (c *restClient) GetVersion(ctx context.Context, req *artifactregistrypb.GetVersionRequest, opts ...gax.CallOption) (*artifactregistrypb.Version, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + params := url.Values{} + if req.GetView() != 0 { + params.Add("view", fmt.Sprintf("%v", req.GetView())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetVersion[0:len((*c.CallOptions).GetVersion):len((*c.CallOptions).GetVersion)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Version{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteVersion deletes a version and all of its content. The returned operation will +// complete once the version has been deleted. +func (c *restClient) DeleteVersion(ctx context.Context, req *artifactregistrypb.DeleteVersionRequest, opts ...gax.CallOption) (*DeleteVersionOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta2/%s", resp.GetName()) + return &DeleteVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListFiles lists files. +func (c *restClient) ListFiles(ctx context.Context, req *artifactregistrypb.ListFilesRequest, opts ...gax.CallOption) *FileIterator { + it := &FileIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListFilesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.File, string, error) { + resp := &artifactregistrypb.ListFilesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/files", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetFiles(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetFile gets a file. +func (c *restClient) GetFile(ctx context.Context, req *artifactregistrypb.GetFileRequest, opts ...gax.CallOption) (*artifactregistrypb.File, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetFile[0:len((*c.CallOptions).GetFile):len((*c.CallOptions).GetFile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.File{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTags lists tags. +func (c *restClient) ListTags(ctx context.Context, req *artifactregistrypb.ListTagsRequest, opts ...gax.CallOption) *TagIterator { + it := &TagIterator{} + req = proto.Clone(req).(*artifactregistrypb.ListTagsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*artifactregistrypb.Tag, string, error) { + resp := &artifactregistrypb.ListTagsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/tags", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTags(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetTag gets a tag. +func (c *restClient) GetTag(ctx context.Context, req *artifactregistrypb.GetTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTag[0:len((*c.CallOptions).GetTag):len((*c.CallOptions).GetTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Tag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateTag creates a tag. +func (c *restClient) CreateTag(ctx context.Context, req *artifactregistrypb.CreateTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTag() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v/tags", req.GetParent()) + + params := url.Values{} + if req.GetTagId() != "" { + params.Add("tagId", fmt.Sprintf("%v", req.GetTagId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTag[0:len((*c.CallOptions).CreateTag):len((*c.CallOptions).CreateTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Tag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTag updates a tag. +func (c *restClient) UpdateTag(ctx context.Context, req *artifactregistrypb.UpdateTagRequest, opts ...gax.CallOption) (*artifactregistrypb.Tag, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTag() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetTag().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tag.name", url.QueryEscape(req.GetTag().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTag[0:len((*c.CallOptions).UpdateTag):len((*c.CallOptions).UpdateTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.Tag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteTag deletes a tag. +func (c *restClient) DeleteTag(ctx context.Context, req *artifactregistrypb.DeleteTagRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// SetIamPolicy updates the IAM policy for a given resource. +func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetIamPolicy gets the IAM policy for a given resource. +func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v:getIamPolicy", req.GetResource()) + + params := url.Values{} + if req.GetOptions().GetRequestedPolicyVersion() != 0 { + params.Add("options.requestedPolicyVersion", fmt.Sprintf("%v", req.GetOptions().GetRequestedPolicyVersion())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions tests if the caller has a list of permissions on a resource. +func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetProjectSettings retrieves the Settings for the Project. +func (c *restClient) GetProjectSettings(ctx context.Context, req *artifactregistrypb.GetProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetProjectSettings[0:len((*c.CallOptions).GetProjectSettings):len((*c.CallOptions).GetProjectSettings)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.ProjectSettings{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateProjectSettings updates the Settings for the Project. +func (c *restClient) UpdateProjectSettings(ctx context.Context, req *artifactregistrypb.UpdateProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetProjectSettings() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta2/%v", req.GetProjectSettings().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project_settings.name", url.QueryEscape(req.GetProjectSettings().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateProjectSettings[0:len((*c.CallOptions).UpdateProjectSettings):len((*c.CallOptions).UpdateProjectSettings)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &artifactregistrypb.ProjectSettings{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateRepositoryOperation manages a long-running operation from CreateRepository. +type CreateRepositoryOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. +// The name must be that of a previously created CreateRepositoryOperation, possibly from a different process. +func (c *gRPCClient) CreateRepositoryOperation(name string) *CreateRepositoryOperation { + return &CreateRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name. +// The name must be that of a previously created CreateRepositoryOperation, possibly from a different process. +func (c *restClient) CreateRepositoryOperation(name string) *CreateRepositoryOperation { + override := fmt.Sprintf("/v1beta2/%s", name) + return &CreateRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp artifactregistrypb.Repository + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp artifactregistrypb.Repository + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. // To get the latest metadata, call this method after a successful call to Poll. // If the metadata is not available, the returned metadata and error are both nil. func (op *CreateRepositoryOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { @@ -1358,7 +3294,8 @@ func (op *CreateRepositoryOperation) Name() string { // DeletePackageOperation manages a long-running operation from DeletePackage. type DeletePackageOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeletePackageOperation returns a new DeletePackageOperation from a given name. @@ -1369,10 +3306,21 @@ func (c *gRPCClient) DeletePackageOperation(name string) *DeletePackageOperation } } +// DeletePackageOperation returns a new DeletePackageOperation from a given name. +// The name must be that of a previously created DeletePackageOperation, possibly from a different process. +func (c *restClient) DeletePackageOperation(name string) *DeletePackageOperation { + override := fmt.Sprintf("/v1beta2/%s", name) + return &DeletePackageOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeletePackageOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1386,6 +3334,7 @@ func (op *DeletePackageOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeletePackageOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1416,7 +3365,8 @@ func (op *DeletePackageOperation) Name() string { // DeleteRepositoryOperation manages a long-running operation from DeleteRepository. type DeleteRepositoryOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. @@ -1427,10 +3377,21 @@ func (c *gRPCClient) DeleteRepositoryOperation(name string) *DeleteRepositoryOpe } } +// DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name. +// The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process. +func (c *restClient) DeleteRepositoryOperation(name string) *DeleteRepositoryOperation { + override := fmt.Sprintf("/v1beta2/%s", name) + return &DeleteRepositoryOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1444,6 +3405,7 @@ func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallO // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1474,7 +3436,8 @@ func (op *DeleteRepositoryOperation) Name() string { // DeleteVersionOperation manages a long-running operation from DeleteVersion. type DeleteVersionOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // DeleteVersionOperation returns a new DeleteVersionOperation from a given name. @@ -1485,10 +3448,21 @@ func (c *gRPCClient) DeleteVersionOperation(name string) *DeleteVersionOperation } } +// DeleteVersionOperation returns a new DeleteVersionOperation from a given name. +// The name must be that of a previously created DeleteVersionOperation, possibly from a different process. +func (c *restClient) DeleteVersionOperation(name string) *DeleteVersionOperation { + override := fmt.Sprintf("/v1beta2/%s", name) + return &DeleteVersionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *DeleteVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) } @@ -1502,6 +3476,7 @@ func (op *DeleteVersionOperation) Wait(ctx context.Context, opts ...gax.CallOpti // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *DeleteVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) return op.lro.Poll(ctx, nil, opts...) } @@ -1532,7 +3507,8 @@ func (op *DeleteVersionOperation) Name() string { // ImportAptArtifactsOperation manages a long-running operation from ImportAptArtifacts. type ImportAptArtifactsOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name. @@ -1543,10 +3519,21 @@ func (c *gRPCClient) ImportAptArtifactsOperation(name string) *ImportAptArtifact } } +// ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name. +// The name must be that of a previously created ImportAptArtifactsOperation, possibly from a different process. +func (c *restClient) ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation { + override := fmt.Sprintf("/v1beta2/%s", name) + return &ImportAptArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ImportAptArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp artifactregistrypb.ImportAptArtifactsResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1564,6 +3551,7 @@ func (op *ImportAptArtifactsOperation) Wait(ctx context.Context, opts ...gax.Cal // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ImportAptArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp artifactregistrypb.ImportAptArtifactsResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1601,7 +3589,8 @@ func (op *ImportAptArtifactsOperation) Name() string { // ImportYumArtifactsOperation manages a long-running operation from ImportYumArtifacts. type ImportYumArtifactsOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name. @@ -1612,10 +3601,21 @@ func (c *gRPCClient) ImportYumArtifactsOperation(name string) *ImportYumArtifact } } +// ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name. +// The name must be that of a previously created ImportYumArtifactsOperation, possibly from a different process. +func (c *restClient) ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation { + override := fmt.Sprintf("/v1beta2/%s", name) + return &ImportYumArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ImportYumArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp artifactregistrypb.ImportYumArtifactsResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1633,6 +3633,7 @@ func (op *ImportYumArtifactsOperation) Wait(ctx context.Context, opts ...gax.Cal // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ImportYumArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp artifactregistrypb.ImportYumArtifactsResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go b/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go index eb78ea6d39ab..0aa0e08d01f5 100644 --- a/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go +++ b/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -37,8 +42,30 @@ func ExampleNewClient() { _ = c } +func ExampleNewRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := artifactregistry.NewRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleClient_ImportAptArtifacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +91,11 @@ func ExampleClient_ImportAptArtifacts() { func ExampleClient_ImportYumArtifacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -89,6 +121,11 @@ func ExampleClient_ImportYumArtifacts() { func ExampleClient_ListRepositories() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -115,6 +152,11 @@ func ExampleClient_ListRepositories() { func ExampleClient_GetRepository() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +177,11 @@ func ExampleClient_GetRepository() { func ExampleClient_CreateRepository() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +207,11 @@ func ExampleClient_CreateRepository() { func ExampleClient_UpdateRepository() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +232,11 @@ func ExampleClient_UpdateRepository() { func ExampleClient_DeleteRepository() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +260,11 @@ func ExampleClient_DeleteRepository() { func ExampleClient_ListPackages() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -229,6 +291,11 @@ func ExampleClient_ListPackages() { func ExampleClient_GetPackage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -249,6 +316,11 @@ func ExampleClient_GetPackage() { func ExampleClient_DeletePackage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -272,6 +344,11 @@ func ExampleClient_DeletePackage() { func ExampleClient_ListVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -298,6 +375,11 @@ func ExampleClient_ListVersions() { func ExampleClient_GetVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -318,6 +400,11 @@ func ExampleClient_GetVersion() { func ExampleClient_DeleteVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -341,6 +428,11 @@ func ExampleClient_DeleteVersion() { func ExampleClient_ListFiles() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -367,6 +459,11 @@ func ExampleClient_ListFiles() { func ExampleClient_GetFile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -387,6 +484,11 @@ func ExampleClient_GetFile() { func ExampleClient_ListTags() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -413,6 +515,11 @@ func ExampleClient_ListTags() { func ExampleClient_GetTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -433,6 +540,11 @@ func ExampleClient_GetTag() { func ExampleClient_CreateTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -453,6 +565,11 @@ func ExampleClient_CreateTag() { func ExampleClient_UpdateTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -473,6 +590,11 @@ func ExampleClient_UpdateTag() { func ExampleClient_DeleteTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -491,6 +613,11 @@ func ExampleClient_DeleteTag() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -511,6 +638,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -531,6 +663,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -551,6 +688,11 @@ func ExampleClient_TestIamPermissions() { func ExampleClient_GetProjectSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -571,6 +713,11 @@ func ExampleClient_GetProjectSettings() { func ExampleClient_UpdateProjectSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := artifactregistry.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go new file mode 100644 index 000000000000..0ab85079a252 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/apt_artifact.pb.go @@ -0,0 +1,757 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/apt_artifact.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Package type is either binary or source. +type AptArtifact_PackageType int32 + +const ( + // Package type is not specified. + AptArtifact_PACKAGE_TYPE_UNSPECIFIED AptArtifact_PackageType = 0 + // Binary package. + AptArtifact_BINARY AptArtifact_PackageType = 1 + // Source package. + AptArtifact_SOURCE AptArtifact_PackageType = 2 +) + +// Enum value maps for AptArtifact_PackageType. +var ( + AptArtifact_PackageType_name = map[int32]string{ + 0: "PACKAGE_TYPE_UNSPECIFIED", + 1: "BINARY", + 2: "SOURCE", + } + AptArtifact_PackageType_value = map[string]int32{ + "PACKAGE_TYPE_UNSPECIFIED": 0, + "BINARY": 1, + "SOURCE": 2, + } +) + +func (x AptArtifact_PackageType) Enum() *AptArtifact_PackageType { + p := new(AptArtifact_PackageType) + *p = x + return p +} + +func (x AptArtifact_PackageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AptArtifact_PackageType) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_enumTypes[0].Descriptor() +} + +func (AptArtifact_PackageType) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_enumTypes[0] +} + +func (x AptArtifact_PackageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AptArtifact_PackageType.Descriptor instead. +func (AptArtifact_PackageType) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{0, 0} +} + +// A detailed representation of an Apt artifact. Information in the record +// is derived from the archive's control file. +// See https://www.debian.org/doc/debian-policy/ch-controlfields.html +type AptArtifact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The Artifact Registry resource name of the artifact. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The Apt package name of the artifact. + PackageName string `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` + // Output only. An artifact is a binary or source package. + PackageType AptArtifact_PackageType `protobuf:"varint,3,opt,name=package_type,json=packageType,proto3,enum=google.devtools.artifactregistry.v1beta2.AptArtifact_PackageType" json:"package_type,omitempty"` + // Output only. Operating system architecture of the artifact. + Architecture string `protobuf:"bytes,4,opt,name=architecture,proto3" json:"architecture,omitempty"` + // Output only. Repository component of the artifact. + Component string `protobuf:"bytes,5,opt,name=component,proto3" json:"component,omitempty"` + // Output only. Contents of the artifact's control metadata file. + ControlFile []byte `protobuf:"bytes,6,opt,name=control_file,json=controlFile,proto3" json:"control_file,omitempty"` +} + +func (x *AptArtifact) Reset() { + *x = AptArtifact{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AptArtifact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AptArtifact) ProtoMessage() {} + +func (x *AptArtifact) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AptArtifact.ProtoReflect.Descriptor instead. +func (*AptArtifact) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{0} +} + +func (x *AptArtifact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AptArtifact) GetPackageName() string { + if x != nil { + return x.PackageName + } + return "" +} + +func (x *AptArtifact) GetPackageType() AptArtifact_PackageType { + if x != nil { + return x.PackageType + } + return AptArtifact_PACKAGE_TYPE_UNSPECIFIED +} + +func (x *AptArtifact) GetArchitecture() string { + if x != nil { + return x.Architecture + } + return "" +} + +func (x *AptArtifact) GetComponent() string { + if x != nil { + return x.Component + } + return "" +} + +func (x *AptArtifact) GetControlFile() []byte { + if x != nil { + return x.ControlFile + } + return nil +} + +// Google Cloud Storage location where the artifacts currently reside. +type ImportAptArtifactsGcsSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + Uris []string `protobuf:"bytes,1,rep,name=uris,proto3" json:"uris,omitempty"` + // Supports URI wildcards for matching multiple objects from a single URI. + UseWildcards bool `protobuf:"varint,2,opt,name=use_wildcards,json=useWildcards,proto3" json:"use_wildcards,omitempty"` +} + +func (x *ImportAptArtifactsGcsSource) Reset() { + *x = ImportAptArtifactsGcsSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportAptArtifactsGcsSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportAptArtifactsGcsSource) ProtoMessage() {} + +func (x *ImportAptArtifactsGcsSource) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportAptArtifactsGcsSource.ProtoReflect.Descriptor instead. +func (*ImportAptArtifactsGcsSource) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{1} +} + +func (x *ImportAptArtifactsGcsSource) GetUris() []string { + if x != nil { + return x.Uris + } + return nil +} + +func (x *ImportAptArtifactsGcsSource) GetUseWildcards() bool { + if x != nil { + return x.UseWildcards + } + return false +} + +// The request to import new apt artifacts. +type ImportAptArtifactsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source location of the package binaries. + // + // Types that are assignable to Source: + // + // *ImportAptArtifactsRequest_GcsSource + Source isImportAptArtifactsRequest_Source `protobuf_oneof:"source"` + // The name of the parent resource where the artifacts will be imported. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *ImportAptArtifactsRequest) Reset() { + *x = ImportAptArtifactsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportAptArtifactsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportAptArtifactsRequest) ProtoMessage() {} + +func (x *ImportAptArtifactsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportAptArtifactsRequest.ProtoReflect.Descriptor instead. +func (*ImportAptArtifactsRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{2} +} + +func (m *ImportAptArtifactsRequest) GetSource() isImportAptArtifactsRequest_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *ImportAptArtifactsRequest) GetGcsSource() *ImportAptArtifactsGcsSource { + if x, ok := x.GetSource().(*ImportAptArtifactsRequest_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *ImportAptArtifactsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +type isImportAptArtifactsRequest_Source interface { + isImportAptArtifactsRequest_Source() +} + +type ImportAptArtifactsRequest_GcsSource struct { + // Google Cloud Storage location where input content is located. + GcsSource *ImportAptArtifactsGcsSource `protobuf:"bytes,2,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +func (*ImportAptArtifactsRequest_GcsSource) isImportAptArtifactsRequest_Source() {} + +// Error information explaining why a package was not imported. +type ImportAptArtifactsErrorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source that was not imported. + // + // Types that are assignable to Source: + // + // *ImportAptArtifactsErrorInfo_GcsSource + Source isImportAptArtifactsErrorInfo_Source `protobuf_oneof:"source"` + // The detailed error status. + Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ImportAptArtifactsErrorInfo) Reset() { + *x = ImportAptArtifactsErrorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportAptArtifactsErrorInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportAptArtifactsErrorInfo) ProtoMessage() {} + +func (x *ImportAptArtifactsErrorInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportAptArtifactsErrorInfo.ProtoReflect.Descriptor instead. +func (*ImportAptArtifactsErrorInfo) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{3} +} + +func (m *ImportAptArtifactsErrorInfo) GetSource() isImportAptArtifactsErrorInfo_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *ImportAptArtifactsErrorInfo) GetGcsSource() *ImportAptArtifactsGcsSource { + if x, ok := x.GetSource().(*ImportAptArtifactsErrorInfo_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *ImportAptArtifactsErrorInfo) GetError() *status.Status { + if x != nil { + return x.Error + } + return nil +} + +type isImportAptArtifactsErrorInfo_Source interface { + isImportAptArtifactsErrorInfo_Source() +} + +type ImportAptArtifactsErrorInfo_GcsSource struct { + // Google Cloud Storage location requested. + GcsSource *ImportAptArtifactsGcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +func (*ImportAptArtifactsErrorInfo_GcsSource) isImportAptArtifactsErrorInfo_Source() {} + +// The response message from importing APT artifacts. +type ImportAptArtifactsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Apt artifacts imported. + AptArtifacts []*AptArtifact `protobuf:"bytes,1,rep,name=apt_artifacts,json=aptArtifacts,proto3" json:"apt_artifacts,omitempty"` + // Detailed error info for artifacts that were not imported. + Errors []*ImportAptArtifactsErrorInfo `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *ImportAptArtifactsResponse) Reset() { + *x = ImportAptArtifactsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportAptArtifactsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportAptArtifactsResponse) ProtoMessage() {} + +func (x *ImportAptArtifactsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportAptArtifactsResponse.ProtoReflect.Descriptor instead. +func (*ImportAptArtifactsResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{4} +} + +func (x *ImportAptArtifactsResponse) GetAptArtifacts() []*AptArtifact { + if x != nil { + return x.AptArtifacts + } + return nil +} + +func (x *ImportAptArtifactsResponse) GetErrors() []*ImportAptArtifactsErrorInfo { + if x != nil { + return x.Errors + } + return nil +} + +// The operation metadata for importing artifacts. +type ImportAptArtifactsMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ImportAptArtifactsMetadata) Reset() { + *x = ImportAptArtifactsMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportAptArtifactsMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportAptArtifactsMetadata) ProtoMessage() {} + +func (x *ImportAptArtifactsMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportAptArtifactsMetadata.ProtoReflect.Descriptor instead. +func (*ImportAptArtifactsMetadata) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP(), []int{5} +} + +var File_google_devtools_artifactregistry_v1beta2_apt_artifact_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x61, 0x70, 0x74, 0x5f, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x04, 0x0a, + 0x0b, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x69, 0x0a, + 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, + 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, + 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x43, 0x0a, 0x0b, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x50, + 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, + 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, + 0x02, 0x3a, 0x90, 0x01, 0xea, 0x41, 0x8c, 0x01, 0x0a, 0x2b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x5d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x2f, 0x61, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x7d, 0x22, 0x56, 0x0a, 0x1b, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, + 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x69, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x75, 0x72, 0x69, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x5f, 0x77, + 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x75, 0x73, 0x65, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x73, 0x22, 0xa5, 0x01, 0x0a, + 0x19, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x0a, 0x67, 0x63, + 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, + 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x47, 0x63, 0x73, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x1b, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x66, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, + 0x00, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0xd7, 0x01, 0x0a, 0x1a, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x0d, 0x61, 0x70, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0c, 0x61, + 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x06, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x97, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, + 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x10, 0x41, 0x70, 0x74, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x32, 0xca, + 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_goTypes = []interface{}{ + (AptArtifact_PackageType)(0), // 0: google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType + (*AptArtifact)(nil), // 1: google.devtools.artifactregistry.v1beta2.AptArtifact + (*ImportAptArtifactsGcsSource)(nil), // 2: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + (*ImportAptArtifactsRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + (*ImportAptArtifactsErrorInfo)(nil), // 4: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + (*ImportAptArtifactsResponse)(nil), // 5: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse + (*ImportAptArtifactsMetadata)(nil), // 6: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsMetadata + (*status.Status)(nil), // 7: google.rpc.Status +} +var file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_depIdxs = []int32{ + 0, // 0: google.devtools.artifactregistry.v1beta2.AptArtifact.package_type:type_name -> google.devtools.artifactregistry.v1beta2.AptArtifact.PackageType + 2, // 1: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest.gcs_source:type_name -> google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + 2, // 2: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.gcs_source:type_name -> google.devtools.artifactregistry.v1beta2.ImportAptArtifactsGcsSource + 7, // 3: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo.error:type_name -> google.rpc.Status + 1, // 4: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.apt_artifacts:type_name -> google.devtools.artifactregistry.v1beta2.AptArtifact + 4, // 5: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse.errors:type_name -> google.devtools.artifactregistry.v1beta2.ImportAptArtifactsErrorInfo + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_apt_artifact_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AptArtifact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportAptArtifactsGcsSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportAptArtifactsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportAptArtifactsErrorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportAptArtifactsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportAptArtifactsMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ImportAptArtifactsRequest_GcsSource)(nil), + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*ImportAptArtifactsErrorInfo_GcsSource)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_depIdxs, + EnumInfos: file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_enumTypes, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_apt_artifact_proto = out.File + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go new file mode 100644 index 000000000000..4502e479d6a3 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/file.pb.go @@ -0,0 +1,654 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/file.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The algorithm used to compute the hash. +type Hash_HashType int32 + +const ( + // Unspecified. + Hash_HASH_TYPE_UNSPECIFIED Hash_HashType = 0 + // SHA256 hash. + Hash_SHA256 Hash_HashType = 1 + // MD5 hash. + Hash_MD5 Hash_HashType = 2 +) + +// Enum value maps for Hash_HashType. +var ( + Hash_HashType_name = map[int32]string{ + 0: "HASH_TYPE_UNSPECIFIED", + 1: "SHA256", + 2: "MD5", + } + Hash_HashType_value = map[string]int32{ + "HASH_TYPE_UNSPECIFIED": 0, + "SHA256": 1, + "MD5": 2, + } +) + +func (x Hash_HashType) Enum() *Hash_HashType { + p := new(Hash_HashType) + *p = x + return p +} + +func (x Hash_HashType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Hash_HashType) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_file_proto_enumTypes[0].Descriptor() +} + +func (Hash_HashType) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_file_proto_enumTypes[0] +} + +func (x Hash_HashType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Hash_HashType.Descriptor instead. +func (Hash_HashType) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP(), []int{0, 0} +} + +// A hash of file content. +type Hash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The algorithm used to compute the hash value. + Type Hash_HashType `protobuf:"varint,1,opt,name=type,proto3,enum=google.devtools.artifactregistry.v1beta2.Hash_HashType" json:"type,omitempty"` + // The hash value. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Hash) Reset() { + *x = Hash{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Hash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hash) ProtoMessage() {} + +func (x *Hash) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hash.ProtoReflect.Descriptor instead. +func (*Hash) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP(), []int{0} +} + +func (x *Hash) GetType() Hash_HashType { + if x != nil { + return x.Type + } + return Hash_HASH_TYPE_UNSPECIFIED +} + +func (x *Hash) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// Files store content that is potentially associated with Packages or Versions. +type File struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the file, for example: + // "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". + // If the file ID part contains slashes, they are escaped. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The size of the File in bytes. + SizeBytes int64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // The hashes of the file content. + Hashes []*Hash `protobuf:"bytes,4,rep,name=hashes,proto3" json:"hashes,omitempty"` + // The time when the File was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The time when the File was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // The name of the Package or Version that owns this file, if any. + Owner string `protobuf:"bytes,7,opt,name=owner,proto3" json:"owner,omitempty"` +} + +func (x *File) Reset() { + *x = File{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *File) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*File) ProtoMessage() {} + +func (x *File) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use File.ProtoReflect.Descriptor instead. +func (*File) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP(), []int{1} +} + +func (x *File) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *File) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *File) GetHashes() []*Hash { + if x != nil { + return x.Hashes + } + return nil +} + +func (x *File) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *File) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *File) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +// The request to list files. +type ListFilesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the repository whose files will be listed. For example: + // "projects/p1/locations/us-central1/repositories/repo1 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // - `name` + // + // - `owner` + // + // An example of using a filter: + // + // - `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an + // ID starting with "a/b/". + // + // - `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> + // Files owned by the version `1.0` in package `pkg1`. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // The maximum number of files to return. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request, if any. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListFilesRequest) Reset() { + *x = ListFilesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesRequest) ProtoMessage() {} + +func (x *ListFilesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead. +func (*ListFilesRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP(), []int{2} +} + +func (x *ListFilesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListFilesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListFilesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFilesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response from listing files. +type ListFilesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The files returned. + Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` + // The token to retrieve the next page of files, or empty if there are no + // more files to return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFilesResponse) Reset() { + *x = ListFilesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesResponse) ProtoMessage() {} + +func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead. +func (*ListFilesResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP(), []int{3} +} + +func (x *ListFilesResponse) GetFiles() []*File { + if x != nil { + return x.Files + } + return nil +} + +func (x *ListFilesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request to retrieve a file. +type GetFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the file to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetFileRequest) Reset() { + *x = GetFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileRequest) ProtoMessage() {} + +func (x *GetFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead. +func (*GetFileRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP(), []int{4} +} + +func (x *GetFileRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_devtools_artifactregistry_v1beta2_file_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_file_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, + 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x01, 0x0a, 0x04, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x4b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x48, 0x61, + 0x73, 0x68, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x0a, 0x08, 0x48, 0x61, 0x73, 0x68, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x44, + 0x35, 0x10, 0x02, 0x22, 0x8c, 0x03, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x46, 0x0a, 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, + 0x06, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x79, 0xea, 0x41, 0x76, 0x0a, 0x24, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, + 0x6c, 0x65, 0x12, 0x4e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x66, 0x69, 0x6c, + 0x65, 0x7d, 0x22, 0x7e, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x90, 0x02, 0x0a, + 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x09, 0x46, + 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, + 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, 0x25, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_file_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_file_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_file_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_devtools_artifactregistry_v1beta2_file_proto_goTypes = []interface{}{ + (Hash_HashType)(0), // 0: google.devtools.artifactregistry.v1beta2.Hash.HashType + (*Hash)(nil), // 1: google.devtools.artifactregistry.v1beta2.Hash + (*File)(nil), // 2: google.devtools.artifactregistry.v1beta2.File + (*ListFilesRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.ListFilesRequest + (*ListFilesResponse)(nil), // 4: google.devtools.artifactregistry.v1beta2.ListFilesResponse + (*GetFileRequest)(nil), // 5: google.devtools.artifactregistry.v1beta2.GetFileRequest + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_google_devtools_artifactregistry_v1beta2_file_proto_depIdxs = []int32{ + 0, // 0: google.devtools.artifactregistry.v1beta2.Hash.type:type_name -> google.devtools.artifactregistry.v1beta2.Hash.HashType + 1, // 1: google.devtools.artifactregistry.v1beta2.File.hashes:type_name -> google.devtools.artifactregistry.v1beta2.Hash + 6, // 2: google.devtools.artifactregistry.v1beta2.File.create_time:type_name -> google.protobuf.Timestamp + 6, // 3: google.devtools.artifactregistry.v1beta2.File.update_time:type_name -> google.protobuf.Timestamp + 2, // 4: google.devtools.artifactregistry.v1beta2.ListFilesResponse.files:type_name -> google.devtools.artifactregistry.v1beta2.File + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_file_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_file_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_file_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Hash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*File); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFilesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFilesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_file_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_file_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_file_proto_depIdxs, + EnumInfos: file_google_devtools_artifactregistry_v1beta2_file_proto_enumTypes, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_file_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_file_proto = out.File + file_google_devtools_artifactregistry_v1beta2_file_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_file_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_file_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go new file mode 100644 index 000000000000..9af2c3bc6e08 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/package.pb.go @@ -0,0 +1,523 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/package.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Packages are named collections of versions. +type Package struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the package, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The display name of the package. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The time when the package was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The time when the package was last updated. This includes publishing a new + // version of the package. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *Package) Reset() { + *x = Package{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Package) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Package) ProtoMessage() {} + +func (x *Package) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Package.ProtoReflect.Descriptor instead. +func (*Package) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescGZIP(), []int{0} +} + +func (x *Package) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Package) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Package) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Package) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// The request to list packages. +type ListPackagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the parent resource whose packages will be listed. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of packages to return. + // Maximum page size is 10,000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request, if any. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListPackagesRequest) Reset() { + *x = ListPackagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPackagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPackagesRequest) ProtoMessage() {} + +func (x *ListPackagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPackagesRequest.ProtoReflect.Descriptor instead. +func (*ListPackagesRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescGZIP(), []int{1} +} + +func (x *ListPackagesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListPackagesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPackagesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response from listing packages. +type ListPackagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The packages returned. + Packages []*Package `protobuf:"bytes,1,rep,name=packages,proto3" json:"packages,omitempty"` + // The token to retrieve the next page of packages, or empty if there are no + // more packages to return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPackagesResponse) Reset() { + *x = ListPackagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPackagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPackagesResponse) ProtoMessage() {} + +func (x *ListPackagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPackagesResponse.ProtoReflect.Descriptor instead. +func (*ListPackagesResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescGZIP(), []int{2} +} + +func (x *ListPackagesResponse) GetPackages() []*Package { + if x != nil { + return x.Packages + } + return nil +} + +func (x *ListPackagesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request to retrieve a package. +type GetPackageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the package to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPackageRequest) Reset() { + *x = GetPackageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPackageRequest) ProtoMessage() {} + +func (x *GetPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPackageRequest.ProtoReflect.Descriptor instead. +func (*GetPackageRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescGZIP(), []int{3} +} + +func (x *GetPackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request to delete a package. +type DeletePackageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the package to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeletePackageRequest) Reset() { + *x = DeletePackageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePackageRequest) ProtoMessage() {} + +func (x *DeletePackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePackageRequest.ProtoReflect.Descriptor instead. +func (*DeletePackageRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescGZIP(), []int{4} +} + +func (x *DeletePackageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_devtools_artifactregistry_v1beta2_package_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_package_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x69, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x14, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x93, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x42, 0x0c, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x58, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, 0x65, + 0x74, 0x61, 0x32, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_package_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_package_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_devtools_artifactregistry_v1beta2_package_proto_goTypes = []interface{}{ + (*Package)(nil), // 0: google.devtools.artifactregistry.v1beta2.Package + (*ListPackagesRequest)(nil), // 1: google.devtools.artifactregistry.v1beta2.ListPackagesRequest + (*ListPackagesResponse)(nil), // 2: google.devtools.artifactregistry.v1beta2.ListPackagesResponse + (*GetPackageRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.GetPackageRequest + (*DeletePackageRequest)(nil), // 4: google.devtools.artifactregistry.v1beta2.DeletePackageRequest + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_google_devtools_artifactregistry_v1beta2_package_proto_depIdxs = []int32{ + 5, // 0: google.devtools.artifactregistry.v1beta2.Package.create_time:type_name -> google.protobuf.Timestamp + 5, // 1: google.devtools.artifactregistry.v1beta2.Package.update_time:type_name -> google.protobuf.Timestamp + 0, // 2: google.devtools.artifactregistry.v1beta2.ListPackagesResponse.packages:type_name -> google.devtools.artifactregistry.v1beta2.Package + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_package_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_package_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_package_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Package); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPackagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPackagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPackageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePackageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_package_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_package_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_package_proto_depIdxs, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_package_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_package_proto = out.File + file_google_devtools_artifactregistry_v1beta2_package_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_package_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_package_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go new file mode 100644 index 000000000000..66dc02ee4021 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/repository.pb.go @@ -0,0 +1,1056 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/repository.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A package format. +type Repository_Format int32 + +const ( + // Unspecified package format. + Repository_FORMAT_UNSPECIFIED Repository_Format = 0 + // Docker package format. + Repository_DOCKER Repository_Format = 1 + // Maven package format. + Repository_MAVEN Repository_Format = 2 + // NPM package format. + Repository_NPM Repository_Format = 3 + // APT package format. + Repository_APT Repository_Format = 5 + // YUM package format. + Repository_YUM Repository_Format = 6 + // Python package format. + Repository_PYTHON Repository_Format = 8 +) + +// Enum value maps for Repository_Format. +var ( + Repository_Format_name = map[int32]string{ + 0: "FORMAT_UNSPECIFIED", + 1: "DOCKER", + 2: "MAVEN", + 3: "NPM", + 5: "APT", + 6: "YUM", + 8: "PYTHON", + } + Repository_Format_value = map[string]int32{ + "FORMAT_UNSPECIFIED": 0, + "DOCKER": 1, + "MAVEN": 2, + "NPM": 3, + "APT": 5, + "YUM": 6, + "PYTHON": 8, + } +) + +func (x Repository_Format) Enum() *Repository_Format { + p := new(Repository_Format) + *p = x + return p +} + +func (x Repository_Format) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Repository_Format) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_enumTypes[0].Descriptor() +} + +func (Repository_Format) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_repository_proto_enumTypes[0] +} + +func (x Repository_Format) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Repository_Format.Descriptor instead. +func (Repository_Format) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{0, 0} +} + +// VersionPolicy is the version policy for the repository. +type Repository_MavenRepositoryConfig_VersionPolicy int32 + +const ( + // VERSION_POLICY_UNSPECIFIED - the version policy is not defined. + // When the version policy is not defined, no validation is performed + // for the versions. + Repository_MavenRepositoryConfig_VERSION_POLICY_UNSPECIFIED Repository_MavenRepositoryConfig_VersionPolicy = 0 + // RELEASE - repository will accept only Release versions. + Repository_MavenRepositoryConfig_RELEASE Repository_MavenRepositoryConfig_VersionPolicy = 1 + // SNAPSHOT - repository will accept only Snapshot versions. + Repository_MavenRepositoryConfig_SNAPSHOT Repository_MavenRepositoryConfig_VersionPolicy = 2 +) + +// Enum value maps for Repository_MavenRepositoryConfig_VersionPolicy. +var ( + Repository_MavenRepositoryConfig_VersionPolicy_name = map[int32]string{ + 0: "VERSION_POLICY_UNSPECIFIED", + 1: "RELEASE", + 2: "SNAPSHOT", + } + Repository_MavenRepositoryConfig_VersionPolicy_value = map[string]int32{ + "VERSION_POLICY_UNSPECIFIED": 0, + "RELEASE": 1, + "SNAPSHOT": 2, + } +) + +func (x Repository_MavenRepositoryConfig_VersionPolicy) Enum() *Repository_MavenRepositoryConfig_VersionPolicy { + p := new(Repository_MavenRepositoryConfig_VersionPolicy) + *p = x + return p +} + +func (x Repository_MavenRepositoryConfig_VersionPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Repository_MavenRepositoryConfig_VersionPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_enumTypes[1].Descriptor() +} + +func (Repository_MavenRepositoryConfig_VersionPolicy) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_repository_proto_enumTypes[1] +} + +func (x Repository_MavenRepositoryConfig_VersionPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Repository_MavenRepositoryConfig_VersionPolicy.Descriptor instead. +func (Repository_MavenRepositoryConfig_VersionPolicy) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// A Repository for storing artifacts with a specific format. +type Repository struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Repository-specific configurations. + // + // Types that are assignable to FormatConfig: + // + // *Repository_MavenConfig + FormatConfig isRepository_FormatConfig `protobuf_oneof:"format_config"` + // The name of the repository, for example: + // "projects/p1/locations/us-central1/repositories/repo1". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The format of packages that are stored in the repository. + Format Repository_Format `protobuf:"varint,2,opt,name=format,proto3,enum=google.devtools.artifactregistry.v1beta2.Repository_Format" json:"format,omitempty"` + // The user-provided description of the repository. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Labels with user-defined metadata. + // This field may contain up to 64 entries. Label keys and values may be no + // longer than 63 characters. Label keys must begin with a lowercase letter + // and may only contain lowercase letters, numeric characters, underscores, + // and dashes. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The time when the repository was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The time when the repository was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // The Cloud KMS resource name of the customer managed encryption key that’s + // used to encrypt the contents of the Repository. Has the form: + // `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. + // This value may not be changed after the Repository has been created. + KmsKeyName string `protobuf:"bytes,8,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"` +} + +func (x *Repository) Reset() { + *x = Repository{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Repository) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repository) ProtoMessage() {} + +func (x *Repository) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Repository.ProtoReflect.Descriptor instead. +func (*Repository) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{0} +} + +func (m *Repository) GetFormatConfig() isRepository_FormatConfig { + if m != nil { + return m.FormatConfig + } + return nil +} + +func (x *Repository) GetMavenConfig() *Repository_MavenRepositoryConfig { + if x, ok := x.GetFormatConfig().(*Repository_MavenConfig); ok { + return x.MavenConfig + } + return nil +} + +func (x *Repository) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Repository) GetFormat() Repository_Format { + if x != nil { + return x.Format + } + return Repository_FORMAT_UNSPECIFIED +} + +func (x *Repository) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Repository) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Repository) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Repository) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Repository) GetKmsKeyName() string { + if x != nil { + return x.KmsKeyName + } + return "" +} + +type isRepository_FormatConfig interface { + isRepository_FormatConfig() +} + +type Repository_MavenConfig struct { + // Maven repository config contains repository level configuration + // for the repositories of maven type. + MavenConfig *Repository_MavenRepositoryConfig `protobuf:"bytes,9,opt,name=maven_config,json=mavenConfig,proto3,oneof"` +} + +func (*Repository_MavenConfig) isRepository_FormatConfig() {} + +// The request to list repositories. +type ListRepositoriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the parent resource whose repositories will be listed. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of repositories to return. Maximum page size is 1,000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request, if any. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListRepositoriesRequest) Reset() { + *x = ListRepositoriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRepositoriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRepositoriesRequest) ProtoMessage() {} + +func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRepositoriesRequest.ProtoReflect.Descriptor instead. +func (*ListRepositoriesRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{1} +} + +func (x *ListRepositoriesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListRepositoriesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRepositoriesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response from listing repositories. +type ListRepositoriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The repositories returned. + Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"` + // The token to retrieve the next page of repositories, or empty if there are + // no more repositories to return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListRepositoriesResponse) Reset() { + *x = ListRepositoriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRepositoriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRepositoriesResponse) ProtoMessage() {} + +func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRepositoriesResponse.ProtoReflect.Descriptor instead. +func (*ListRepositoriesResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{2} +} + +func (x *ListRepositoriesResponse) GetRepositories() []*Repository { + if x != nil { + return x.Repositories + } + return nil +} + +func (x *ListRepositoriesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request to retrieve a repository. +type GetRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the repository to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetRepositoryRequest) Reset() { + *x = GetRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRepositoryRequest) ProtoMessage() {} + +func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRepositoryRequest.ProtoReflect.Descriptor instead. +func (*GetRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{3} +} + +func (x *GetRepositoryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request to create a new repository. +type CreateRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the parent resource where the repository will be created. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The repository id to use for this repository. + RepositoryId string `protobuf:"bytes,2,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` + // The repository to be created. + Repository *Repository `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"` +} + +func (x *CreateRepositoryRequest) Reset() { + *x = CreateRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRepositoryRequest) ProtoMessage() {} + +func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRepositoryRequest.ProtoReflect.Descriptor instead. +func (*CreateRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateRepositoryRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateRepositoryRequest) GetRepositoryId() string { + if x != nil { + return x.RepositoryId + } + return "" +} + +func (x *CreateRepositoryRequest) GetRepository() *Repository { + if x != nil { + return x.Repository + } + return nil +} + +// The request to update a repository. +type UpdateRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The repository that replaces the resource on the server. + Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateRepositoryRequest) Reset() { + *x = UpdateRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRepositoryRequest) ProtoMessage() {} + +func (x *UpdateRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRepositoryRequest.ProtoReflect.Descriptor instead. +func (*UpdateRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateRepositoryRequest) GetRepository() *Repository { + if x != nil { + return x.Repository + } + return nil +} + +func (x *UpdateRepositoryRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request to delete a repository. +type DeleteRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the repository to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteRepositoryRequest) Reset() { + *x = DeleteRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRepositoryRequest) ProtoMessage() {} + +func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRepositoryRequest.ProtoReflect.Descriptor instead. +func (*DeleteRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteRepositoryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// MavenRepositoryConfig is maven related repository details. +// Provides additional configuration details for repositories of the maven +// format type. +type Repository_MavenRepositoryConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The repository with this flag will allow publishing + // the same snapshot versions. + AllowSnapshotOverwrites bool `protobuf:"varint,1,opt,name=allow_snapshot_overwrites,json=allowSnapshotOverwrites,proto3" json:"allow_snapshot_overwrites,omitempty"` + // Version policy defines the versions that the registry will accept. + VersionPolicy Repository_MavenRepositoryConfig_VersionPolicy `protobuf:"varint,2,opt,name=version_policy,json=versionPolicy,proto3,enum=google.devtools.artifactregistry.v1beta2.Repository_MavenRepositoryConfig_VersionPolicy" json:"version_policy,omitempty"` +} + +func (x *Repository_MavenRepositoryConfig) Reset() { + *x = Repository_MavenRepositoryConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Repository_MavenRepositoryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repository_MavenRepositoryConfig) ProtoMessage() {} + +func (x *Repository_MavenRepositoryConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Repository_MavenRepositoryConfig.ProtoReflect.Descriptor instead. +func (*Repository_MavenRepositoryConfig) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Repository_MavenRepositoryConfig) GetAllowSnapshotOverwrites() bool { + if x != nil { + return x.AllowSnapshotOverwrites + } + return false +} + +func (x *Repository_MavenRepositoryConfig) GetVersionPolicy() Repository_MavenRepositoryConfig_VersionPolicy { + if x != nil { + return x.VersionPolicy + } + return Repository_MavenRepositoryConfig_VERSION_POLICY_UNSPECIFIED +} + +var File_google_devtools_artifactregistry_v1beta2_repository_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x08, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x6f, 0x0a, 0x0c, 0x6d, 0x61, 0x76, 0x65, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x4d, 0x61, 0x76, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x76, 0x65, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x58, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x6d, 0x73, 0x4b, 0x65, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xa0, 0x02, 0x0a, 0x15, 0x4d, 0x61, 0x76, 0x65, 0x6e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x3a, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x4f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x12, 0x7f, 0x0a, 0x0e, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x58, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4d, 0x61, 0x76, 0x65, 0x6e, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x4a, 0x0a, 0x0d, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1e, 0x0a, + 0x1a, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4e, + 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x10, 0x02, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x5e, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, + 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x43, 0x4b, 0x45, 0x52, 0x10, + 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x41, 0x56, 0x45, 0x4e, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, + 0x4e, 0x50, 0x4d, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x50, 0x54, 0x10, 0x05, 0x12, 0x07, + 0x0a, 0x03, 0x59, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x59, 0x54, 0x48, 0x4f, + 0x4e, 0x10, 0x08, 0x3a, 0x72, 0xea, 0x41, 0x6f, 0x0a, 0x2a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x41, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x42, 0x0f, 0x0a, 0x0d, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa1, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x12, 0x2a, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9c, 0x01, 0x0a, + 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5e, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x17, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x12, + 0x2a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xac, + 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0a, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, + 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x61, 0x0a, + 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x96, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x42, 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, + 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, + 0x31, 0x42, 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, + 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_repository_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_devtools_artifactregistry_v1beta2_repository_proto_goTypes = []interface{}{ + (Repository_Format)(0), // 0: google.devtools.artifactregistry.v1beta2.Repository.Format + (Repository_MavenRepositoryConfig_VersionPolicy)(0), // 1: google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy + (*Repository)(nil), // 2: google.devtools.artifactregistry.v1beta2.Repository + (*ListRepositoriesRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + (*ListRepositoriesResponse)(nil), // 4: google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + (*GetRepositoryRequest)(nil), // 5: google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + (*CreateRepositoryRequest)(nil), // 6: google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + (*UpdateRepositoryRequest)(nil), // 7: google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + (*DeleteRepositoryRequest)(nil), // 8: google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + (*Repository_MavenRepositoryConfig)(nil), // 9: google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + nil, // 10: google.devtools.artifactregistry.v1beta2.Repository.LabelsEntry + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask +} +var file_google_devtools_artifactregistry_v1beta2_repository_proto_depIdxs = []int32{ + 9, // 0: google.devtools.artifactregistry.v1beta2.Repository.maven_config:type_name -> google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig + 0, // 1: google.devtools.artifactregistry.v1beta2.Repository.format:type_name -> google.devtools.artifactregistry.v1beta2.Repository.Format + 10, // 2: google.devtools.artifactregistry.v1beta2.Repository.labels:type_name -> google.devtools.artifactregistry.v1beta2.Repository.LabelsEntry + 11, // 3: google.devtools.artifactregistry.v1beta2.Repository.create_time:type_name -> google.protobuf.Timestamp + 11, // 4: google.devtools.artifactregistry.v1beta2.Repository.update_time:type_name -> google.protobuf.Timestamp + 2, // 5: google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse.repositories:type_name -> google.devtools.artifactregistry.v1beta2.Repository + 2, // 6: google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest.repository:type_name -> google.devtools.artifactregistry.v1beta2.Repository + 2, // 7: google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.repository:type_name -> google.devtools.artifactregistry.v1beta2.Repository + 12, // 8: google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 9: google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.version_policy:type_name -> google.devtools.artifactregistry.v1beta2.Repository.MavenRepositoryConfig.VersionPolicy + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_repository_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_repository_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_repository_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Repository); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRepositoriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRepositoriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Repository_MavenRepositoryConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Repository_MavenConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_repository_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_repository_proto_depIdxs, + EnumInfos: file_google_devtools_artifactregistry_v1beta2_repository_proto_enumTypes, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_repository_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_repository_proto = out.File + file_google_devtools_artifactregistry_v1beta2_repository_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_repository_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_repository_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go new file mode 100644 index 000000000000..5603760e7969 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/service.pb.go @@ -0,0 +1,1713 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/service.proto + +package artifactregistrypb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + v1 "google.golang.org/genproto/googleapis/iam/v1" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Metadata type for longrunning-operations, currently empty. +type OperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OperationMetadata) Reset() { + *x = OperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationMetadata) ProtoMessage() {} + +func (x *OperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. +func (*OperationMetadata) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescGZIP(), []int{0} +} + +var File_google_devtools_artifactregistry_v1beta2_service_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_service_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2f, 0x61, 0x70, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, + 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x79, 0x75, + 0x6d, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, + 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x32, 0xe6, 0x2f, 0x0a, 0x10, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0xdf, 0x02, 0x0a, 0x12, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, + 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xe4, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x22, 0x4b, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x73, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x8a, 0x01, + 0x0a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x70, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xdf, 0x02, 0x0a, 0x12, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x12, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, + 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe4, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x22, 0x4b, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x79, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x73, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, + 0x8a, 0x01, 0x0a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, + 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xe1, 0x01, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, + 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, + 0x12, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0xcb, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, + 0x12, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd6, + 0x02, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xdf, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, 0x35, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0xda, 0x41, 0x1f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0xca, 0x41, 0x71, 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x3a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xfa, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x41, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x32, 0x40, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0xda, 0x41, 0x16, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x91, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x37, 0x2a, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0xca, 0x41, 0x53, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3a, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xe0, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, + 0x12, 0x40, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xcd, 0x01, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x42, 0x12, 0x40, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x96, 0x02, 0x0a, 0x0d, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x2a, 0x40, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, + 0x53, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0xeb, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0xd8, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, + 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, + 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa1, 0x02, + 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb0, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x2a, 0x4b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x53, 0x0a, 0x15, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0xd4, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, + 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, + 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, + 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x4d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x2f, 0x2a, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xdb, 0x01, + 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x12, 0x47, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, + 0x67, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xc8, 0x01, 0x0a, 0x06, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x22, 0x56, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x12, 0x47, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe0, 0x01, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, + 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x22, + 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x22, 0x47, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, + 0x3a, 0x03, 0x74, 0x61, 0x67, 0xda, 0x41, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x74, + 0x61, 0x67, 0x2c, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x12, 0xe2, 0x01, 0x0a, 0x09, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, + 0x61, 0x67, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x32, 0x4b, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x03, 0x74, 0x61, 0x67, 0xda, 0x41, 0x0f, 0x74, + 0x61, 0x67, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xb7, + 0x01, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x3a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x2a, 0x47, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, + 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x9c, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, + 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x22, 0x46, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0x99, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, + 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0xc2, 0x01, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, + 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x22, 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xcf, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, + 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x90, 0x02, 0x0a, 0x15, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x32, + 0x3b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x7d, 0x3a, 0x10, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0xda, 0x41, + 0x1c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x8c, 0x01, + 0xca, 0x41, 0x1f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0xd2, 0x41, 0x67, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x42, 0x93, 0x02, 0x0a, + 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x0c, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x32, 0xca, + 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_service_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_service_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_devtools_artifactregistry_v1beta2_service_proto_goTypes = []interface{}{ + (*OperationMetadata)(nil), // 0: google.devtools.artifactregistry.v1beta2.OperationMetadata + (*ImportAptArtifactsRequest)(nil), // 1: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + (*ImportYumArtifactsRequest)(nil), // 2: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + (*ListRepositoriesRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + (*GetRepositoryRequest)(nil), // 4: google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + (*CreateRepositoryRequest)(nil), // 5: google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + (*UpdateRepositoryRequest)(nil), // 6: google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + (*DeleteRepositoryRequest)(nil), // 7: google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + (*ListPackagesRequest)(nil), // 8: google.devtools.artifactregistry.v1beta2.ListPackagesRequest + (*GetPackageRequest)(nil), // 9: google.devtools.artifactregistry.v1beta2.GetPackageRequest + (*DeletePackageRequest)(nil), // 10: google.devtools.artifactregistry.v1beta2.DeletePackageRequest + (*ListVersionsRequest)(nil), // 11: google.devtools.artifactregistry.v1beta2.ListVersionsRequest + (*GetVersionRequest)(nil), // 12: google.devtools.artifactregistry.v1beta2.GetVersionRequest + (*DeleteVersionRequest)(nil), // 13: google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + (*ListFilesRequest)(nil), // 14: google.devtools.artifactregistry.v1beta2.ListFilesRequest + (*GetFileRequest)(nil), // 15: google.devtools.artifactregistry.v1beta2.GetFileRequest + (*ListTagsRequest)(nil), // 16: google.devtools.artifactregistry.v1beta2.ListTagsRequest + (*GetTagRequest)(nil), // 17: google.devtools.artifactregistry.v1beta2.GetTagRequest + (*CreateTagRequest)(nil), // 18: google.devtools.artifactregistry.v1beta2.CreateTagRequest + (*UpdateTagRequest)(nil), // 19: google.devtools.artifactregistry.v1beta2.UpdateTagRequest + (*DeleteTagRequest)(nil), // 20: google.devtools.artifactregistry.v1beta2.DeleteTagRequest + (*v1.SetIamPolicyRequest)(nil), // 21: google.iam.v1.SetIamPolicyRequest + (*v1.GetIamPolicyRequest)(nil), // 22: google.iam.v1.GetIamPolicyRequest + (*v1.TestIamPermissionsRequest)(nil), // 23: google.iam.v1.TestIamPermissionsRequest + (*GetProjectSettingsRequest)(nil), // 24: google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + (*UpdateProjectSettingsRequest)(nil), // 25: google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + (*longrunning.Operation)(nil), // 26: google.longrunning.Operation + (*ListRepositoriesResponse)(nil), // 27: google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + (*Repository)(nil), // 28: google.devtools.artifactregistry.v1beta2.Repository + (*ListPackagesResponse)(nil), // 29: google.devtools.artifactregistry.v1beta2.ListPackagesResponse + (*Package)(nil), // 30: google.devtools.artifactregistry.v1beta2.Package + (*ListVersionsResponse)(nil), // 31: google.devtools.artifactregistry.v1beta2.ListVersionsResponse + (*Version)(nil), // 32: google.devtools.artifactregistry.v1beta2.Version + (*ListFilesResponse)(nil), // 33: google.devtools.artifactregistry.v1beta2.ListFilesResponse + (*File)(nil), // 34: google.devtools.artifactregistry.v1beta2.File + (*ListTagsResponse)(nil), // 35: google.devtools.artifactregistry.v1beta2.ListTagsResponse + (*Tag)(nil), // 36: google.devtools.artifactregistry.v1beta2.Tag + (*emptypb.Empty)(nil), // 37: google.protobuf.Empty + (*v1.Policy)(nil), // 38: google.iam.v1.Policy + (*v1.TestIamPermissionsResponse)(nil), // 39: google.iam.v1.TestIamPermissionsResponse + (*ProjectSettings)(nil), // 40: google.devtools.artifactregistry.v1beta2.ProjectSettings +} +var file_google_devtools_artifactregistry_v1beta2_service_proto_depIdxs = []int32{ + 1, // 0: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts:input_type -> google.devtools.artifactregistry.v1beta2.ImportAptArtifactsRequest + 2, // 1: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts:input_type -> google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + 3, // 2: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories:input_type -> google.devtools.artifactregistry.v1beta2.ListRepositoriesRequest + 4, // 3: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository:input_type -> google.devtools.artifactregistry.v1beta2.GetRepositoryRequest + 5, // 4: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository:input_type -> google.devtools.artifactregistry.v1beta2.CreateRepositoryRequest + 6, // 5: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository:input_type -> google.devtools.artifactregistry.v1beta2.UpdateRepositoryRequest + 7, // 6: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository:input_type -> google.devtools.artifactregistry.v1beta2.DeleteRepositoryRequest + 8, // 7: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages:input_type -> google.devtools.artifactregistry.v1beta2.ListPackagesRequest + 9, // 8: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage:input_type -> google.devtools.artifactregistry.v1beta2.GetPackageRequest + 10, // 9: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage:input_type -> google.devtools.artifactregistry.v1beta2.DeletePackageRequest + 11, // 10: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions:input_type -> google.devtools.artifactregistry.v1beta2.ListVersionsRequest + 12, // 11: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion:input_type -> google.devtools.artifactregistry.v1beta2.GetVersionRequest + 13, // 12: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion:input_type -> google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + 14, // 13: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles:input_type -> google.devtools.artifactregistry.v1beta2.ListFilesRequest + 15, // 14: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile:input_type -> google.devtools.artifactregistry.v1beta2.GetFileRequest + 16, // 15: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags:input_type -> google.devtools.artifactregistry.v1beta2.ListTagsRequest + 17, // 16: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag:input_type -> google.devtools.artifactregistry.v1beta2.GetTagRequest + 18, // 17: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag:input_type -> google.devtools.artifactregistry.v1beta2.CreateTagRequest + 19, // 18: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag:input_type -> google.devtools.artifactregistry.v1beta2.UpdateTagRequest + 20, // 19: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag:input_type -> google.devtools.artifactregistry.v1beta2.DeleteTagRequest + 21, // 20: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest + 22, // 21: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest + 23, // 22: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest + 24, // 23: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings:input_type -> google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + 25, // 24: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings:input_type -> google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + 26, // 25: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportAptArtifacts:output_type -> google.longrunning.Operation + 26, // 26: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ImportYumArtifacts:output_type -> google.longrunning.Operation + 27, // 27: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListRepositories:output_type -> google.devtools.artifactregistry.v1beta2.ListRepositoriesResponse + 28, // 28: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetRepository:output_type -> google.devtools.artifactregistry.v1beta2.Repository + 26, // 29: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository:output_type -> google.longrunning.Operation + 28, // 30: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository:output_type -> google.devtools.artifactregistry.v1beta2.Repository + 26, // 31: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository:output_type -> google.longrunning.Operation + 29, // 32: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListPackages:output_type -> google.devtools.artifactregistry.v1beta2.ListPackagesResponse + 30, // 33: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetPackage:output_type -> google.devtools.artifactregistry.v1beta2.Package + 26, // 34: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage:output_type -> google.longrunning.Operation + 31, // 35: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListVersions:output_type -> google.devtools.artifactregistry.v1beta2.ListVersionsResponse + 32, // 36: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetVersion:output_type -> google.devtools.artifactregistry.v1beta2.Version + 26, // 37: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion:output_type -> google.longrunning.Operation + 33, // 38: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListFiles:output_type -> google.devtools.artifactregistry.v1beta2.ListFilesResponse + 34, // 39: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetFile:output_type -> google.devtools.artifactregistry.v1beta2.File + 35, // 40: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.ListTags:output_type -> google.devtools.artifactregistry.v1beta2.ListTagsResponse + 36, // 41: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetTag:output_type -> google.devtools.artifactregistry.v1beta2.Tag + 36, // 42: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag:output_type -> google.devtools.artifactregistry.v1beta2.Tag + 36, // 43: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag:output_type -> google.devtools.artifactregistry.v1beta2.Tag + 37, // 44: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag:output_type -> google.protobuf.Empty + 38, // 45: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy:output_type -> google.iam.v1.Policy + 38, // 46: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetIamPolicy:output_type -> google.iam.v1.Policy + 39, // 47: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse + 40, // 48: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.GetProjectSettings:output_type -> google.devtools.artifactregistry.v1beta2.ProjectSettings + 40, // 49: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateProjectSettings:output_type -> google.devtools.artifactregistry.v1beta2.ProjectSettings + 25, // [25:50] is the sub-list for method output_type + 0, // [0:25] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_service_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_service_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_service_proto != nil { + return + } + file_google_devtools_artifactregistry_v1beta2_apt_artifact_proto_init() + file_google_devtools_artifactregistry_v1beta2_file_proto_init() + file_google_devtools_artifactregistry_v1beta2_package_proto_init() + file_google_devtools_artifactregistry_v1beta2_repository_proto_init() + file_google_devtools_artifactregistry_v1beta2_settings_proto_init() + file_google_devtools_artifactregistry_v1beta2_tag_proto_init() + file_google_devtools_artifactregistry_v1beta2_version_proto_init() + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_service_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_service_proto_depIdxs, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_service_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_service_proto = out.File + file_google_devtools_artifactregistry_v1beta2_service_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_service_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ArtifactRegistryClient is the client API for ArtifactRegistry service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ArtifactRegistryClient interface { + // Imports Apt artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + ImportAptArtifacts(ctx context.Context, in *ImportAptArtifactsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Imports Yum (RPM) artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + ImportYumArtifacts(ctx context.Context, in *ImportYumArtifactsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Lists repositories. + ListRepositories(ctx context.Context, in *ListRepositoriesRequest, opts ...grpc.CallOption) (*ListRepositoriesResponse, error) + // Gets a repository. + GetRepository(ctx context.Context, in *GetRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) + // Creates a repository. The returned Operation will finish once the + // repository has been created. Its response will be the created Repository. + CreateRepository(ctx context.Context, in *CreateRepositoryRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Updates a repository. + UpdateRepository(ctx context.Context, in *UpdateRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) + // Deletes a repository and all of its contents. The returned Operation will + // finish once the repository has been deleted. It will not have any Operation + // metadata and will return a google.protobuf.Empty response. + DeleteRepository(ctx context.Context, in *DeleteRepositoryRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Lists packages. + ListPackages(ctx context.Context, in *ListPackagesRequest, opts ...grpc.CallOption) (*ListPackagesResponse, error) + // Gets a package. + GetPackage(ctx context.Context, in *GetPackageRequest, opts ...grpc.CallOption) (*Package, error) + // Deletes a package and all of its versions and tags. The returned operation + // will complete once the package has been deleted. + DeletePackage(ctx context.Context, in *DeletePackageRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Lists versions. + ListVersions(ctx context.Context, in *ListVersionsRequest, opts ...grpc.CallOption) (*ListVersionsResponse, error) + // Gets a version + GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*Version, error) + // Deletes a version and all of its content. The returned operation will + // complete once the version has been deleted. + DeleteVersion(ctx context.Context, in *DeleteVersionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Lists files. + ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) + // Gets a file. + GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*File, error) + // Lists tags. + ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) + // Gets a tag. + GetTag(ctx context.Context, in *GetTagRequest, opts ...grpc.CallOption) (*Tag, error) + // Creates a tag. + CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*Tag, error) + // Updates a tag. + UpdateTag(ctx context.Context, in *UpdateTagRequest, opts ...grpc.CallOption) (*Tag, error) + // Deletes a tag. + DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates the IAM policy for a given resource. + SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Gets the IAM policy for a given resource. + GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Tests if the caller has a list of permissions on a resource. + TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) + // Retrieves the Settings for the Project. + GetProjectSettings(ctx context.Context, in *GetProjectSettingsRequest, opts ...grpc.CallOption) (*ProjectSettings, error) + // Updates the Settings for the Project. + UpdateProjectSettings(ctx context.Context, in *UpdateProjectSettingsRequest, opts ...grpc.CallOption) (*ProjectSettings, error) +} + +type artifactRegistryClient struct { + cc grpc.ClientConnInterface +} + +func NewArtifactRegistryClient(cc grpc.ClientConnInterface) ArtifactRegistryClient { + return &artifactRegistryClient{cc} +} + +func (c *artifactRegistryClient) ImportAptArtifacts(ctx context.Context, in *ImportAptArtifactsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ImportAptArtifacts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) ImportYumArtifacts(ctx context.Context, in *ImportYumArtifactsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ImportYumArtifacts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) ListRepositories(ctx context.Context, in *ListRepositoriesRequest, opts ...grpc.CallOption) (*ListRepositoriesResponse, error) { + out := new(ListRepositoriesResponse) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListRepositories", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetRepository(ctx context.Context, in *GetRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) { + out := new(Repository) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) CreateRepository(ctx context.Context, in *CreateRepositoryRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/CreateRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) UpdateRepository(ctx context.Context, in *UpdateRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) { + out := new(Repository) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/UpdateRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) DeleteRepository(ctx context.Context, in *DeleteRepositoryRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeleteRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) ListPackages(ctx context.Context, in *ListPackagesRequest, opts ...grpc.CallOption) (*ListPackagesResponse, error) { + out := new(ListPackagesResponse) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListPackages", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetPackage(ctx context.Context, in *GetPackageRequest, opts ...grpc.CallOption) (*Package, error) { + out := new(Package) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetPackage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) DeletePackage(ctx context.Context, in *DeletePackageRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeletePackage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) ListVersions(ctx context.Context, in *ListVersionsRequest, opts ...grpc.CallOption) (*ListVersionsResponse, error) { + out := new(ListVersionsResponse) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListVersions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*Version, error) { + out := new(Version) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) DeleteVersion(ctx context.Context, in *DeleteVersionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeleteVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { + out := new(ListFilesResponse) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListFiles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*File, error) { + out := new(File) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetFile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) { + out := new(ListTagsResponse) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListTags", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetTag(ctx context.Context, in *GetTagRequest, opts ...grpc.CallOption) (*Tag, error) { + out := new(Tag) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*Tag, error) { + out := new(Tag) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/CreateTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) UpdateTag(ctx context.Context, in *UpdateTagRequest, opts ...grpc.CallOption) (*Tag, error) { + out := new(Tag) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/UpdateTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeleteTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/SetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) { + out := new(v1.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/TestIamPermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) GetProjectSettings(ctx context.Context, in *GetProjectSettingsRequest, opts ...grpc.CallOption) (*ProjectSettings, error) { + out := new(ProjectSettings) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetProjectSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *artifactRegistryClient) UpdateProjectSettings(ctx context.Context, in *UpdateProjectSettingsRequest, opts ...grpc.CallOption) (*ProjectSettings, error) { + out := new(ProjectSettings) + err := c.cc.Invoke(ctx, "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/UpdateProjectSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ArtifactRegistryServer is the server API for ArtifactRegistry service. +type ArtifactRegistryServer interface { + // Imports Apt artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + ImportAptArtifacts(context.Context, *ImportAptArtifactsRequest) (*longrunning.Operation, error) + // Imports Yum (RPM) artifacts. The returned Operation will complete once the + // resources are imported. Package, Version, and File resources are created + // based on the imported artifacts. Imported artifacts that conflict with + // existing resources are ignored. + ImportYumArtifacts(context.Context, *ImportYumArtifactsRequest) (*longrunning.Operation, error) + // Lists repositories. + ListRepositories(context.Context, *ListRepositoriesRequest) (*ListRepositoriesResponse, error) + // Gets a repository. + GetRepository(context.Context, *GetRepositoryRequest) (*Repository, error) + // Creates a repository. The returned Operation will finish once the + // repository has been created. Its response will be the created Repository. + CreateRepository(context.Context, *CreateRepositoryRequest) (*longrunning.Operation, error) + // Updates a repository. + UpdateRepository(context.Context, *UpdateRepositoryRequest) (*Repository, error) + // Deletes a repository and all of its contents. The returned Operation will + // finish once the repository has been deleted. It will not have any Operation + // metadata and will return a google.protobuf.Empty response. + DeleteRepository(context.Context, *DeleteRepositoryRequest) (*longrunning.Operation, error) + // Lists packages. + ListPackages(context.Context, *ListPackagesRequest) (*ListPackagesResponse, error) + // Gets a package. + GetPackage(context.Context, *GetPackageRequest) (*Package, error) + // Deletes a package and all of its versions and tags. The returned operation + // will complete once the package has been deleted. + DeletePackage(context.Context, *DeletePackageRequest) (*longrunning.Operation, error) + // Lists versions. + ListVersions(context.Context, *ListVersionsRequest) (*ListVersionsResponse, error) + // Gets a version + GetVersion(context.Context, *GetVersionRequest) (*Version, error) + // Deletes a version and all of its content. The returned operation will + // complete once the version has been deleted. + DeleteVersion(context.Context, *DeleteVersionRequest) (*longrunning.Operation, error) + // Lists files. + ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) + // Gets a file. + GetFile(context.Context, *GetFileRequest) (*File, error) + // Lists tags. + ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) + // Gets a tag. + GetTag(context.Context, *GetTagRequest) (*Tag, error) + // Creates a tag. + CreateTag(context.Context, *CreateTagRequest) (*Tag, error) + // Updates a tag. + UpdateTag(context.Context, *UpdateTagRequest) (*Tag, error) + // Deletes a tag. + DeleteTag(context.Context, *DeleteTagRequest) (*emptypb.Empty, error) + // Updates the IAM policy for a given resource. + SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) + // Gets the IAM policy for a given resource. + GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) + // Tests if the caller has a list of permissions on a resource. + TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) + // Retrieves the Settings for the Project. + GetProjectSettings(context.Context, *GetProjectSettingsRequest) (*ProjectSettings, error) + // Updates the Settings for the Project. + UpdateProjectSettings(context.Context, *UpdateProjectSettingsRequest) (*ProjectSettings, error) +} + +// UnimplementedArtifactRegistryServer can be embedded to have forward compatible implementations. +type UnimplementedArtifactRegistryServer struct { +} + +func (*UnimplementedArtifactRegistryServer) ImportAptArtifacts(context.Context, *ImportAptArtifactsRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportAptArtifacts not implemented") +} +func (*UnimplementedArtifactRegistryServer) ImportYumArtifacts(context.Context, *ImportYumArtifactsRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportYumArtifacts not implemented") +} +func (*UnimplementedArtifactRegistryServer) ListRepositories(context.Context, *ListRepositoriesRequest) (*ListRepositoriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRepositories not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetRepository(context.Context, *GetRepositoryRequest) (*Repository, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRepository not implemented") +} +func (*UnimplementedArtifactRegistryServer) CreateRepository(context.Context, *CreateRepositoryRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRepository not implemented") +} +func (*UnimplementedArtifactRegistryServer) UpdateRepository(context.Context, *UpdateRepositoryRequest) (*Repository, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRepository not implemented") +} +func (*UnimplementedArtifactRegistryServer) DeleteRepository(context.Context, *DeleteRepositoryRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRepository not implemented") +} +func (*UnimplementedArtifactRegistryServer) ListPackages(context.Context, *ListPackagesRequest) (*ListPackagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPackages not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetPackage(context.Context, *GetPackageRequest) (*Package, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPackage not implemented") +} +func (*UnimplementedArtifactRegistryServer) DeletePackage(context.Context, *DeletePackageRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePackage not implemented") +} +func (*UnimplementedArtifactRegistryServer) ListVersions(context.Context, *ListVersionsRequest) (*ListVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVersions not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetVersion(context.Context, *GetVersionRequest) (*Version, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") +} +func (*UnimplementedArtifactRegistryServer) DeleteVersion(context.Context, *DeleteVersionRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteVersion not implemented") +} +func (*UnimplementedArtifactRegistryServer) ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFiles not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetFile(context.Context, *GetFileRequest) (*File, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFile not implemented") +} +func (*UnimplementedArtifactRegistryServer) ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTags not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetTag(context.Context, *GetTagRequest) (*Tag, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTag not implemented") +} +func (*UnimplementedArtifactRegistryServer) CreateTag(context.Context, *CreateTagRequest) (*Tag, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTag not implemented") +} +func (*UnimplementedArtifactRegistryServer) UpdateTag(context.Context, *UpdateTagRequest) (*Tag, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTag not implemented") +} +func (*UnimplementedArtifactRegistryServer) DeleteTag(context.Context, *DeleteTagRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTag not implemented") +} +func (*UnimplementedArtifactRegistryServer) SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (*UnimplementedArtifactRegistryServer) TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} +func (*UnimplementedArtifactRegistryServer) GetProjectSettings(context.Context, *GetProjectSettingsRequest) (*ProjectSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProjectSettings not implemented") +} +func (*UnimplementedArtifactRegistryServer) UpdateProjectSettings(context.Context, *UpdateProjectSettingsRequest) (*ProjectSettings, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateProjectSettings not implemented") +} + +func RegisterArtifactRegistryServer(s *grpc.Server, srv ArtifactRegistryServer) { + s.RegisterService(&_ArtifactRegistry_serviceDesc, srv) +} + +func _ArtifactRegistry_ImportAptArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportAptArtifactsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ImportAptArtifacts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ImportAptArtifacts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ImportAptArtifacts(ctx, req.(*ImportAptArtifactsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_ImportYumArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportYumArtifactsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ImportYumArtifacts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ImportYumArtifacts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ImportYumArtifacts(ctx, req.(*ImportYumArtifactsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_ListRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRepositoriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ListRepositories(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListRepositories", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ListRepositories(ctx, req.(*ListRepositoriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetRepository(ctx, req.(*GetRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_CreateRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).CreateRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/CreateRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).CreateRepository(ctx, req.(*CreateRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_UpdateRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).UpdateRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/UpdateRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).UpdateRepository(ctx, req.(*UpdateRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_DeleteRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).DeleteRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeleteRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).DeleteRepository(ctx, req.(*DeleteRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_ListPackages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPackagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ListPackages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListPackages", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ListPackages(ctx, req.(*ListPackagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetPackage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetPackage(ctx, req.(*GetPackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_DeletePackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).DeletePackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeletePackage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).DeletePackage(ctx, req.(*DeletePackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_ListVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ListVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListVersions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ListVersions(ctx, req.(*ListVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetVersion(ctx, req.(*GetVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_DeleteVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).DeleteVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeleteVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).DeleteVersion(ctx, req.(*DeleteVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_ListFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ListFiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListFiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ListFiles(ctx, req.(*ListFilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetFile(ctx, req.(*GetFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_ListTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTagsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).ListTags(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/ListTags", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).ListTags(ctx, req.(*ListTagsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetTag(ctx, req.(*GetTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_CreateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).CreateTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/CreateTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).CreateTag(ctx, req.(*CreateTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_UpdateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).UpdateTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/UpdateTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).UpdateTag(ctx, req.(*UpdateTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_DeleteTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).DeleteTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/DeleteTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).DeleteTag(ctx, req.(*DeleteTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/SetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/TestIamPermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_GetProjectSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProjectSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).GetProjectSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/GetProjectSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).GetProjectSettings(ctx, req.(*GetProjectSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ArtifactRegistry_UpdateProjectSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateProjectSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ArtifactRegistryServer).UpdateProjectSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.devtools.artifactregistry.v1beta2.ArtifactRegistry/UpdateProjectSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ArtifactRegistryServer).UpdateProjectSettings(ctx, req.(*UpdateProjectSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ArtifactRegistry_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.devtools.artifactregistry.v1beta2.ArtifactRegistry", + HandlerType: (*ArtifactRegistryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ImportAptArtifacts", + Handler: _ArtifactRegistry_ImportAptArtifacts_Handler, + }, + { + MethodName: "ImportYumArtifacts", + Handler: _ArtifactRegistry_ImportYumArtifacts_Handler, + }, + { + MethodName: "ListRepositories", + Handler: _ArtifactRegistry_ListRepositories_Handler, + }, + { + MethodName: "GetRepository", + Handler: _ArtifactRegistry_GetRepository_Handler, + }, + { + MethodName: "CreateRepository", + Handler: _ArtifactRegistry_CreateRepository_Handler, + }, + { + MethodName: "UpdateRepository", + Handler: _ArtifactRegistry_UpdateRepository_Handler, + }, + { + MethodName: "DeleteRepository", + Handler: _ArtifactRegistry_DeleteRepository_Handler, + }, + { + MethodName: "ListPackages", + Handler: _ArtifactRegistry_ListPackages_Handler, + }, + { + MethodName: "GetPackage", + Handler: _ArtifactRegistry_GetPackage_Handler, + }, + { + MethodName: "DeletePackage", + Handler: _ArtifactRegistry_DeletePackage_Handler, + }, + { + MethodName: "ListVersions", + Handler: _ArtifactRegistry_ListVersions_Handler, + }, + { + MethodName: "GetVersion", + Handler: _ArtifactRegistry_GetVersion_Handler, + }, + { + MethodName: "DeleteVersion", + Handler: _ArtifactRegistry_DeleteVersion_Handler, + }, + { + MethodName: "ListFiles", + Handler: _ArtifactRegistry_ListFiles_Handler, + }, + { + MethodName: "GetFile", + Handler: _ArtifactRegistry_GetFile_Handler, + }, + { + MethodName: "ListTags", + Handler: _ArtifactRegistry_ListTags_Handler, + }, + { + MethodName: "GetTag", + Handler: _ArtifactRegistry_GetTag_Handler, + }, + { + MethodName: "CreateTag", + Handler: _ArtifactRegistry_CreateTag_Handler, + }, + { + MethodName: "UpdateTag", + Handler: _ArtifactRegistry_UpdateTag_Handler, + }, + { + MethodName: "DeleteTag", + Handler: _ArtifactRegistry_DeleteTag_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _ArtifactRegistry_SetIamPolicy_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _ArtifactRegistry_GetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _ArtifactRegistry_TestIamPermissions_Handler, + }, + { + MethodName: "GetProjectSettings", + Handler: _ArtifactRegistry_GetProjectSettings_Handler, + }, + { + MethodName: "UpdateProjectSettings", + Handler: _ArtifactRegistry_UpdateProjectSettings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/devtools/artifactregistry/v1beta2/service.proto", +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go new file mode 100644 index 000000000000..c5eab8dbc983 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/settings.pb.go @@ -0,0 +1,444 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/settings.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The possible redirection states for legacy repositories. +type ProjectSettings_RedirectionState int32 + +const ( + // No redirection status has been set. + ProjectSettings_REDIRECTION_STATE_UNSPECIFIED ProjectSettings_RedirectionState = 0 + // Redirection is disabled. + ProjectSettings_REDIRECTION_FROM_GCR_IO_DISABLED ProjectSettings_RedirectionState = 1 + // Redirection is enabled. + ProjectSettings_REDIRECTION_FROM_GCR_IO_ENABLED ProjectSettings_RedirectionState = 2 + // Redirection is enabled, and has been finalized so cannot be reverted. + ProjectSettings_REDIRECTION_FROM_GCR_IO_FINALIZED ProjectSettings_RedirectionState = 3 +) + +// Enum value maps for ProjectSettings_RedirectionState. +var ( + ProjectSettings_RedirectionState_name = map[int32]string{ + 0: "REDIRECTION_STATE_UNSPECIFIED", + 1: "REDIRECTION_FROM_GCR_IO_DISABLED", + 2: "REDIRECTION_FROM_GCR_IO_ENABLED", + 3: "REDIRECTION_FROM_GCR_IO_FINALIZED", + } + ProjectSettings_RedirectionState_value = map[string]int32{ + "REDIRECTION_STATE_UNSPECIFIED": 0, + "REDIRECTION_FROM_GCR_IO_DISABLED": 1, + "REDIRECTION_FROM_GCR_IO_ENABLED": 2, + "REDIRECTION_FROM_GCR_IO_FINALIZED": 3, + } +) + +func (x ProjectSettings_RedirectionState) Enum() *ProjectSettings_RedirectionState { + p := new(ProjectSettings_RedirectionState) + *p = x + return p +} + +func (x ProjectSettings_RedirectionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProjectSettings_RedirectionState) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_settings_proto_enumTypes[0].Descriptor() +} + +func (ProjectSettings_RedirectionState) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_settings_proto_enumTypes[0] +} + +func (x ProjectSettings_RedirectionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProjectSettings_RedirectionState.Descriptor instead. +func (ProjectSettings_RedirectionState) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescGZIP(), []int{0, 0} +} + +// The Artifact Registry settings that apply to a Project. +type ProjectSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the project's settings. + // + // Always of the form: + // projects/{project-id}/projectSettings + // + // In update request: never set + // In response: always set + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The redirection state of the legacy repositories in this project. + LegacyRedirectionState ProjectSettings_RedirectionState `protobuf:"varint,2,opt,name=legacy_redirection_state,json=legacyRedirectionState,proto3,enum=google.devtools.artifactregistry.v1beta2.ProjectSettings_RedirectionState" json:"legacy_redirection_state,omitempty"` +} + +func (x *ProjectSettings) Reset() { + *x = ProjectSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProjectSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectSettings) ProtoMessage() {} + +func (x *ProjectSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectSettings.ProtoReflect.Descriptor instead. +func (*ProjectSettings) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescGZIP(), []int{0} +} + +func (x *ProjectSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ProjectSettings) GetLegacyRedirectionState() ProjectSettings_RedirectionState { + if x != nil { + return x.LegacyRedirectionState + } + return ProjectSettings_REDIRECTION_STATE_UNSPECIFIED +} + +// Gets the redirection status for a project. +type GetProjectSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the projectSettings resource. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetProjectSettingsRequest) Reset() { + *x = GetProjectSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetProjectSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProjectSettingsRequest) ProtoMessage() {} + +func (x *GetProjectSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProjectSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetProjectSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescGZIP(), []int{1} +} + +func (x *GetProjectSettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Sets the settings of the project. +type UpdateProjectSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The project settings. + ProjectSettings *ProjectSettings `protobuf:"bytes,2,opt,name=project_settings,json=projectSettings,proto3" json:"project_settings,omitempty"` + // Field mask to support partial updates. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateProjectSettingsRequest) Reset() { + *x = UpdateProjectSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateProjectSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProjectSettingsRequest) ProtoMessage() {} + +func (x *UpdateProjectSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProjectSettingsRequest.ProtoReflect.Descriptor instead. +func (*UpdateProjectSettingsRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescGZIP(), []int{2} +} + +func (x *UpdateProjectSettingsRequest) GetProjectSettings() *ProjectSettings { + if x != nil { + return x.ProjectSettings + } + return nil +} + +func (x *UpdateProjectSettingsRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +var File_google_devtools_artifactregistry_v1beta2_settings_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xb0, 0x03, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x18, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x22, 0xa7, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x52, 0x45, 0x44, 0x49, + 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x43, 0x52, + 0x5f, 0x49, 0x4f, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, + 0x0a, 0x1f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x52, + 0x4f, 0x4d, 0x5f, 0x47, 0x43, 0x52, 0x5f, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x47, 0x43, 0x52, 0x5f, 0x49, 0x4f, 0x5f, 0x46, + 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x58, 0xea, 0x41, 0x55, 0x0a, + 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x22, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x37, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x31, 0x0a, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc1, + 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x64, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x42, 0x94, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x42, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, + 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, + 0x31, 0x42, 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, + 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_settings_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_devtools_artifactregistry_v1beta2_settings_proto_goTypes = []interface{}{ + (ProjectSettings_RedirectionState)(0), // 0: google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState + (*ProjectSettings)(nil), // 1: google.devtools.artifactregistry.v1beta2.ProjectSettings + (*GetProjectSettingsRequest)(nil), // 2: google.devtools.artifactregistry.v1beta2.GetProjectSettingsRequest + (*UpdateProjectSettingsRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest + (*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask +} +var file_google_devtools_artifactregistry_v1beta2_settings_proto_depIdxs = []int32{ + 0, // 0: google.devtools.artifactregistry.v1beta2.ProjectSettings.legacy_redirection_state:type_name -> google.devtools.artifactregistry.v1beta2.ProjectSettings.RedirectionState + 1, // 1: google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.project_settings:type_name -> google.devtools.artifactregistry.v1beta2.ProjectSettings + 4, // 2: google.devtools.artifactregistry.v1beta2.UpdateProjectSettingsRequest.update_mask:type_name -> google.protobuf.FieldMask + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_settings_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_settings_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_settings_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProjectSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetProjectSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateProjectSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_settings_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_settings_proto_depIdxs, + EnumInfos: file_google_devtools_artifactregistry_v1beta2_settings_proto_enumTypes, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_settings_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_settings_proto = out.File + file_google_devtools_artifactregistry_v1beta2_settings_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_settings_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_settings_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go new file mode 100644 index 000000000000..5cd36709d5be --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/tag.pb.go @@ -0,0 +1,701 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/tag.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Tags point to a version and represent an alternative name that can be used +// to access the version. +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the tag, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1". + // If the package part contains slashes, the slashes are escaped. + // The tag part can only have characters in [a-zA-Z0-9\-._~:@], anything else + // must be URL encoded. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The name of the version the tag refers to, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" + // If the package or version ID parts contain slashes, the slashes are + // escaped. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{0} +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// The request to list tags. +type ListTagsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the parent resource whose tags will be listed. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // An expression for filtering the results of the request. Filter rules are + // case insensitive. The fields eligible for filtering are: + // + // - `version` + // + // An example of using a filter: + // + // - `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` + // --> Tags that are applied to the version `1.0` in package `pkg1`. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // The maximum number of tags to return. Maximum page size is 10,000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request, if any. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTagsRequest) Reset() { + *x = ListTagsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTagsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTagsRequest) ProtoMessage() {} + +func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead. +func (*ListTagsRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTagsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTagsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListTagsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTagsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response from listing tags. +type ListTagsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The tags returned. + Tags []*Tag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // The token to retrieve the next page of tags, or empty if there are no + // more tags to return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTagsResponse) Reset() { + *x = ListTagsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTagsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTagsResponse) ProtoMessage() {} + +func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead. +func (*ListTagsResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTagsResponse) GetTags() []*Tag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *ListTagsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request to retrieve a tag. +type GetTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the tag to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetTagRequest) Reset() { + *x = GetTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTagRequest) ProtoMessage() {} + +func (x *GetTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTagRequest.ProtoReflect.Descriptor instead. +func (*GetTagRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{3} +} + +func (x *GetTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request to create a new tag. +type CreateTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the parent resource where the tag will be created. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The tag id to use for this repository. + TagId string `protobuf:"bytes,2,opt,name=tag_id,json=tagId,proto3" json:"tag_id,omitempty"` + // The tag to be created. + Tag *Tag `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *CreateTagRequest) Reset() { + *x = CreateTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTagRequest) ProtoMessage() {} + +func (x *CreateTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTagRequest.ProtoReflect.Descriptor instead. +func (*CreateTagRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateTagRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTagRequest) GetTagId() string { + if x != nil { + return x.TagId + } + return "" +} + +func (x *CreateTagRequest) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + +// The request to create or update a tag. +type UpdateTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The tag that replaces the resource on the server. + Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateTagRequest) Reset() { + *x = UpdateTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTagRequest) ProtoMessage() {} + +func (x *UpdateTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTagRequest.ProtoReflect.Descriptor instead. +func (*UpdateTagRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateTagRequest) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + +func (x *UpdateTagRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request to delete a tag. +type DeleteTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the tag to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteTagRequest) Reset() { + *x = DeleteTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTagRequest) ProtoMessage() {} + +func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTagRequest.ProtoReflect.Descriptor instead. +func (*DeleteTagRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_devtools_artifactregistry_v1beta2_tag_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x19, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x03, + 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x3a, 0x8a, 0x01, 0xea, 0x41, 0x86, 0x01, 0x0a, 0x23, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x12, 0x5f, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, + 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x7d, 0x22, 0x7d, + 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7d, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x23, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x15, + 0x0a, 0x06, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x61, 0x67, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, + 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x03, 0x74, + 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x3b, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x8f, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x42, 0x08, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x32, + 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_google_devtools_artifactregistry_v1beta2_tag_proto_goTypes = []interface{}{ + (*Tag)(nil), // 0: google.devtools.artifactregistry.v1beta2.Tag + (*ListTagsRequest)(nil), // 1: google.devtools.artifactregistry.v1beta2.ListTagsRequest + (*ListTagsResponse)(nil), // 2: google.devtools.artifactregistry.v1beta2.ListTagsResponse + (*GetTagRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.GetTagRequest + (*CreateTagRequest)(nil), // 4: google.devtools.artifactregistry.v1beta2.CreateTagRequest + (*UpdateTagRequest)(nil), // 5: google.devtools.artifactregistry.v1beta2.UpdateTagRequest + (*DeleteTagRequest)(nil), // 6: google.devtools.artifactregistry.v1beta2.DeleteTagRequest + (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask +} +var file_google_devtools_artifactregistry_v1beta2_tag_proto_depIdxs = []int32{ + 0, // 0: google.devtools.artifactregistry.v1beta2.ListTagsResponse.tags:type_name -> google.devtools.artifactregistry.v1beta2.Tag + 0, // 1: google.devtools.artifactregistry.v1beta2.CreateTagRequest.tag:type_name -> google.devtools.artifactregistry.v1beta2.Tag + 0, // 2: google.devtools.artifactregistry.v1beta2.UpdateTagRequest.tag:type_name -> google.devtools.artifactregistry.v1beta2.Tag + 7, // 3: google.devtools.artifactregistry.v1beta2.UpdateTagRequest.update_mask:type_name -> google.protobuf.FieldMask + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_tag_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_tag_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_tag_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTagsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTagsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_tag_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_tag_proto_depIdxs, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_tag_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_tag_proto = out.File + file_google_devtools_artifactregistry_v1beta2_tag_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_tag_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_tag_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go new file mode 100644 index 000000000000..01e698986797 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/version.pb.go @@ -0,0 +1,695 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/version.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The view, which determines what version information is returned in a +// response. +type VersionView int32 + +const ( + // The default / unset value. + // The API will default to the BASIC view. + VersionView_VERSION_VIEW_UNSPECIFIED VersionView = 0 + // Includes basic information about the version, but not any related tags. + VersionView_BASIC VersionView = 1 + // Include everything. + VersionView_FULL VersionView = 2 +) + +// Enum value maps for VersionView. +var ( + VersionView_name = map[int32]string{ + 0: "VERSION_VIEW_UNSPECIFIED", + 1: "BASIC", + 2: "FULL", + } + VersionView_value = map[string]int32{ + "VERSION_VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2, + } +) + +func (x VersionView) Enum() *VersionView { + p := new(VersionView) + *p = x + return p +} + +func (x VersionView) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VersionView) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_version_proto_enumTypes[0].Descriptor() +} + +func (VersionView) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_version_proto_enumTypes[0] +} + +func (x VersionView) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VersionView.Descriptor instead. +func (VersionView) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP(), []int{0} +} + +// The body of a version resource. A version resource represents a +// collection of components, such as files and other data. This may correspond +// to a version in many package management schemes. +type Version struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the version, for example: + // "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1". + // If the package or version ID parts contain slashes, the slashes are + // escaped. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Description of the version, as specified in its metadata. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // The time when the version was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The time when the version was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. A list of related tags. Will contain up to 100 tags that + // reference this version. + RelatedTags []*Tag `protobuf:"bytes,7,rep,name=related_tags,json=relatedTags,proto3" json:"related_tags,omitempty"` + // Output only. Repository-specific Metadata stored against this version. + // The fields returned are defined by the underlying repository-specific + // resource. Currently, the only resource in use is + // [DockerImage][google.devtools.artifactregistry.v1.DockerImage] + Metadata *structpb.Struct `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *Version) Reset() { + *x = Version{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Version) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Version) ProtoMessage() {} + +func (x *Version) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Version.ProtoReflect.Descriptor instead. +func (*Version) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP(), []int{0} +} + +func (x *Version) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Version) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Version) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Version) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Version) GetRelatedTags() []*Tag { + if x != nil { + return x.RelatedTags + } + return nil +} + +func (x *Version) GetMetadata() *structpb.Struct { + if x != nil { + return x.Metadata + } + return nil +} + +// The request to list versions. +type ListVersionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the parent resource whose versions will be listed. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of versions to return. Maximum page size is 1,000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request, if any. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // The view that should be returned in the response. + View VersionView `protobuf:"varint,4,opt,name=view,proto3,enum=google.devtools.artifactregistry.v1beta2.VersionView" json:"view,omitempty"` + // Optional. The field to order the results by. + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListVersionsRequest) Reset() { + *x = ListVersionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVersionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVersionsRequest) ProtoMessage() {} + +func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVersionsRequest.ProtoReflect.Descriptor instead. +func (*ListVersionsRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP(), []int{1} +} + +func (x *ListVersionsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListVersionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListVersionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListVersionsRequest) GetView() VersionView { + if x != nil { + return x.View + } + return VersionView_VERSION_VIEW_UNSPECIFIED +} + +func (x *ListVersionsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// The response from listing versions. +type ListVersionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The versions returned. + Versions []*Version `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` + // The token to retrieve the next page of versions, or empty if there are no + // more versions to return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListVersionsResponse) Reset() { + *x = ListVersionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVersionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVersionsResponse) ProtoMessage() {} + +func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVersionsResponse.ProtoReflect.Descriptor instead. +func (*ListVersionsResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP(), []int{2} +} + +func (x *ListVersionsResponse) GetVersions() []*Version { + if x != nil { + return x.Versions + } + return nil +} + +func (x *ListVersionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request to retrieve a version. +type GetVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the version to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The view that should be returned in the response. + View VersionView `protobuf:"varint,2,opt,name=view,proto3,enum=google.devtools.artifactregistry.v1beta2.VersionView" json:"view,omitempty"` +} + +func (x *GetVersionRequest) Reset() { + *x = GetVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVersionRequest) ProtoMessage() {} + +func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead. +func (*GetVersionRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP(), []int{3} +} + +func (x *GetVersionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetVersionRequest) GetView() VersionView { + if x != nil { + return x.View + } + return VersionView_VERSION_VIEW_UNSPECIFIED +} + +// The request to delete a version. +type DeleteVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the version to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // By default, a version that is tagged may not be deleted. If force=true, the + // version and any tags pointing to the version are deleted. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteVersionRequest) Reset() { + *x = DeleteVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVersionRequest) ProtoMessage() {} + +func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVersionRequest.ProtoReflect.Descriptor instead. +func (*DeleteVersionRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteVersionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteVersionRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +var File_google_devtools_artifactregistry_v1beta2_version_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_version_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xde, 0x03, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x50, 0x0a, + 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, + 0x61, 0x67, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, 0x12, + 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x96, 0x01, 0xea, 0x41, 0x92, 0x01, + 0x0a, 0x27, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x2f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x7d, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x7d, 0x22, 0xd4, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x49, + 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, + 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, + 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x72, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, + 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x40, 0x0a, + 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x2a, + 0x40, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1c, + 0x0a, 0x18, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, + 0x02, 0x42, 0x93, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x42, 0x0c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x58, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, + 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, + 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_version_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_version_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_version_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_devtools_artifactregistry_v1beta2_version_proto_goTypes = []interface{}{ + (VersionView)(0), // 0: google.devtools.artifactregistry.v1beta2.VersionView + (*Version)(nil), // 1: google.devtools.artifactregistry.v1beta2.Version + (*ListVersionsRequest)(nil), // 2: google.devtools.artifactregistry.v1beta2.ListVersionsRequest + (*ListVersionsResponse)(nil), // 3: google.devtools.artifactregistry.v1beta2.ListVersionsResponse + (*GetVersionRequest)(nil), // 4: google.devtools.artifactregistry.v1beta2.GetVersionRequest + (*DeleteVersionRequest)(nil), // 5: google.devtools.artifactregistry.v1beta2.DeleteVersionRequest + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*Tag)(nil), // 7: google.devtools.artifactregistry.v1beta2.Tag + (*structpb.Struct)(nil), // 8: google.protobuf.Struct +} +var file_google_devtools_artifactregistry_v1beta2_version_proto_depIdxs = []int32{ + 6, // 0: google.devtools.artifactregistry.v1beta2.Version.create_time:type_name -> google.protobuf.Timestamp + 6, // 1: google.devtools.artifactregistry.v1beta2.Version.update_time:type_name -> google.protobuf.Timestamp + 7, // 2: google.devtools.artifactregistry.v1beta2.Version.related_tags:type_name -> google.devtools.artifactregistry.v1beta2.Tag + 8, // 3: google.devtools.artifactregistry.v1beta2.Version.metadata:type_name -> google.protobuf.Struct + 0, // 4: google.devtools.artifactregistry.v1beta2.ListVersionsRequest.view:type_name -> google.devtools.artifactregistry.v1beta2.VersionView + 1, // 5: google.devtools.artifactregistry.v1beta2.ListVersionsResponse.versions:type_name -> google.devtools.artifactregistry.v1beta2.Version + 0, // 6: google.devtools.artifactregistry.v1beta2.GetVersionRequest.view:type_name -> google.devtools.artifactregistry.v1beta2.VersionView + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_version_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_version_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_version_proto != nil { + return + } + file_google_devtools_artifactregistry_v1beta2_tag_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Version); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVersionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVersionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_version_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_version_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_version_proto_depIdxs, + EnumInfos: file_google_devtools_artifactregistry_v1beta2_version_proto_enumTypes, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_version_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_version_proto = out.File + file_google_devtools_artifactregistry_v1beta2_version_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_version_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_version_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go b/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go new file mode 100644 index 000000000000..6c7f7c2e57a7 --- /dev/null +++ b/artifactregistry/apiv1beta2/artifactregistrypb/yum_artifact.pb.go @@ -0,0 +1,732 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/devtools/artifactregistry/v1beta2/yum_artifact.proto + +package artifactregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Package type is either binary or source. +type YumArtifact_PackageType int32 + +const ( + // Package type is not specified. + YumArtifact_PACKAGE_TYPE_UNSPECIFIED YumArtifact_PackageType = 0 + // Binary package (.rpm). + YumArtifact_BINARY YumArtifact_PackageType = 1 + // Source package (.srpm). + YumArtifact_SOURCE YumArtifact_PackageType = 2 +) + +// Enum value maps for YumArtifact_PackageType. +var ( + YumArtifact_PackageType_name = map[int32]string{ + 0: "PACKAGE_TYPE_UNSPECIFIED", + 1: "BINARY", + 2: "SOURCE", + } + YumArtifact_PackageType_value = map[string]int32{ + "PACKAGE_TYPE_UNSPECIFIED": 0, + "BINARY": 1, + "SOURCE": 2, + } +) + +func (x YumArtifact_PackageType) Enum() *YumArtifact_PackageType { + p := new(YumArtifact_PackageType) + *p = x + return p +} + +func (x YumArtifact_PackageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (YumArtifact_PackageType) Descriptor() protoreflect.EnumDescriptor { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_enumTypes[0].Descriptor() +} + +func (YumArtifact_PackageType) Type() protoreflect.EnumType { + return &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_enumTypes[0] +} + +func (x YumArtifact_PackageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use YumArtifact_PackageType.Descriptor instead. +func (YumArtifact_PackageType) EnumDescriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{0, 0} +} + +// A detailed representation of a Yum artifact. +type YumArtifact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The Artifact Registry resource name of the artifact. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The yum package name of the artifact. + PackageName string `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` + // Output only. An artifact is a binary or source package. + PackageType YumArtifact_PackageType `protobuf:"varint,3,opt,name=package_type,json=packageType,proto3,enum=google.devtools.artifactregistry.v1beta2.YumArtifact_PackageType" json:"package_type,omitempty"` + // Output only. Operating system architecture of the artifact. + Architecture string `protobuf:"bytes,4,opt,name=architecture,proto3" json:"architecture,omitempty"` +} + +func (x *YumArtifact) Reset() { + *x = YumArtifact{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *YumArtifact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*YumArtifact) ProtoMessage() {} + +func (x *YumArtifact) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use YumArtifact.ProtoReflect.Descriptor instead. +func (*YumArtifact) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{0} +} + +func (x *YumArtifact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *YumArtifact) GetPackageName() string { + if x != nil { + return x.PackageName + } + return "" +} + +func (x *YumArtifact) GetPackageType() YumArtifact_PackageType { + if x != nil { + return x.PackageType + } + return YumArtifact_PACKAGE_TYPE_UNSPECIFIED +} + +func (x *YumArtifact) GetArchitecture() string { + if x != nil { + return x.Architecture + } + return "" +} + +// Google Cloud Storage location where the artifacts currently reside. +type ImportYumArtifactsGcsSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Cloud Storage paths URI (e.g., gs://my_bucket//my_object). + Uris []string `protobuf:"bytes,1,rep,name=uris,proto3" json:"uris,omitempty"` + // Supports URI wildcards for matching multiple objects from a single URI. + UseWildcards bool `protobuf:"varint,2,opt,name=use_wildcards,json=useWildcards,proto3" json:"use_wildcards,omitempty"` +} + +func (x *ImportYumArtifactsGcsSource) Reset() { + *x = ImportYumArtifactsGcsSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportYumArtifactsGcsSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportYumArtifactsGcsSource) ProtoMessage() {} + +func (x *ImportYumArtifactsGcsSource) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportYumArtifactsGcsSource.ProtoReflect.Descriptor instead. +func (*ImportYumArtifactsGcsSource) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{1} +} + +func (x *ImportYumArtifactsGcsSource) GetUris() []string { + if x != nil { + return x.Uris + } + return nil +} + +func (x *ImportYumArtifactsGcsSource) GetUseWildcards() bool { + if x != nil { + return x.UseWildcards + } + return false +} + +// The request to import new yum artifacts. +type ImportYumArtifactsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source location of the package binaries. + // + // Types that are assignable to Source: + // + // *ImportYumArtifactsRequest_GcsSource + Source isImportYumArtifactsRequest_Source `protobuf_oneof:"source"` + // The name of the parent resource where the artifacts will be imported. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *ImportYumArtifactsRequest) Reset() { + *x = ImportYumArtifactsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportYumArtifactsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportYumArtifactsRequest) ProtoMessage() {} + +func (x *ImportYumArtifactsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportYumArtifactsRequest.ProtoReflect.Descriptor instead. +func (*ImportYumArtifactsRequest) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{2} +} + +func (m *ImportYumArtifactsRequest) GetSource() isImportYumArtifactsRequest_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *ImportYumArtifactsRequest) GetGcsSource() *ImportYumArtifactsGcsSource { + if x, ok := x.GetSource().(*ImportYumArtifactsRequest_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *ImportYumArtifactsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +type isImportYumArtifactsRequest_Source interface { + isImportYumArtifactsRequest_Source() +} + +type ImportYumArtifactsRequest_GcsSource struct { + // Google Cloud Storage location where input content is located. + GcsSource *ImportYumArtifactsGcsSource `protobuf:"bytes,2,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +func (*ImportYumArtifactsRequest_GcsSource) isImportYumArtifactsRequest_Source() {} + +// Error information explaining why a package was not imported. +type ImportYumArtifactsErrorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source that was not imported. + // + // Types that are assignable to Source: + // + // *ImportYumArtifactsErrorInfo_GcsSource + Source isImportYumArtifactsErrorInfo_Source `protobuf_oneof:"source"` + // The detailed error status. + Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ImportYumArtifactsErrorInfo) Reset() { + *x = ImportYumArtifactsErrorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportYumArtifactsErrorInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportYumArtifactsErrorInfo) ProtoMessage() {} + +func (x *ImportYumArtifactsErrorInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportYumArtifactsErrorInfo.ProtoReflect.Descriptor instead. +func (*ImportYumArtifactsErrorInfo) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{3} +} + +func (m *ImportYumArtifactsErrorInfo) GetSource() isImportYumArtifactsErrorInfo_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *ImportYumArtifactsErrorInfo) GetGcsSource() *ImportYumArtifactsGcsSource { + if x, ok := x.GetSource().(*ImportYumArtifactsErrorInfo_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *ImportYumArtifactsErrorInfo) GetError() *status.Status { + if x != nil { + return x.Error + } + return nil +} + +type isImportYumArtifactsErrorInfo_Source interface { + isImportYumArtifactsErrorInfo_Source() +} + +type ImportYumArtifactsErrorInfo_GcsSource struct { + // Google Cloud Storage location requested. + GcsSource *ImportYumArtifactsGcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +func (*ImportYumArtifactsErrorInfo_GcsSource) isImportYumArtifactsErrorInfo_Source() {} + +// The response message from importing YUM artifacts. +type ImportYumArtifactsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The yum artifacts imported. + YumArtifacts []*YumArtifact `protobuf:"bytes,1,rep,name=yum_artifacts,json=yumArtifacts,proto3" json:"yum_artifacts,omitempty"` + // Detailed error info for artifacts that were not imported. + Errors []*ImportYumArtifactsErrorInfo `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *ImportYumArtifactsResponse) Reset() { + *x = ImportYumArtifactsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportYumArtifactsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportYumArtifactsResponse) ProtoMessage() {} + +func (x *ImportYumArtifactsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportYumArtifactsResponse.ProtoReflect.Descriptor instead. +func (*ImportYumArtifactsResponse) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{4} +} + +func (x *ImportYumArtifactsResponse) GetYumArtifacts() []*YumArtifact { + if x != nil { + return x.YumArtifacts + } + return nil +} + +func (x *ImportYumArtifactsResponse) GetErrors() []*ImportYumArtifactsErrorInfo { + if x != nil { + return x.Errors + } + return nil +} + +// The operation metadata for importing artifacts. +type ImportYumArtifactsMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ImportYumArtifactsMetadata) Reset() { + *x = ImportYumArtifactsMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportYumArtifactsMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportYumArtifactsMetadata) ProtoMessage() {} + +func (x *ImportYumArtifactsMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportYumArtifactsMetadata.ProtoReflect.Descriptor instead. +func (*ImportYumArtifactsMetadata) Descriptor() ([]byte, []int) { + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP(), []int{5} +} + +var File_google_devtools_artifactregistry_v1beta2_yum_artifact_proto protoreflect.FileDescriptor + +var file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x79, 0x75, 0x6d, 0x5f, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x03, 0x0a, + 0x0b, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x69, 0x0a, + 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x59, + 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, + 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x22, 0x43, 0x0a, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x4f, + 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x3a, 0x90, 0x01, 0xea, 0x41, 0x8c, 0x01, 0x0a, 0x2b, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x59, + 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x5d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x2f, 0x79, 0x75, + 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x79, 0x75, 0x6d, 0x5f, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x7d, 0x22, 0x56, 0x0a, 0x1b, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x47, + 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x69, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75, 0x72, 0x69, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x75, 0x73, 0x65, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, + 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x66, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x67, 0x63, + 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, + 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x1b, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x66, 0x0a, 0x0a, 0x67, 0x63, 0x73, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x59, + 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x47, 0x63, 0x73, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1a, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0d, 0x79, 0x75, 0x6d, 0x5f, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x52, 0x0c, 0x79, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x12, 0x5d, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, + 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, + 0x1c, 0x0a, 0x1a, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x97, 0x02, + 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, + 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x10, + 0x59, 0x75, 0x6d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x58, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, + 0x6c, 0x73, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xaa, 0x02, 0x25, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, + 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0xea, 0x02, 0x28, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescOnce sync.Once + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescData = file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDesc +) + +func file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescGZIP() []byte { + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescOnce.Do(func() { + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescData) + }) + return file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDescData +} + +var file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_goTypes = []interface{}{ + (YumArtifact_PackageType)(0), // 0: google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType + (*YumArtifact)(nil), // 1: google.devtools.artifactregistry.v1beta2.YumArtifact + (*ImportYumArtifactsGcsSource)(nil), // 2: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + (*ImportYumArtifactsRequest)(nil), // 3: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest + (*ImportYumArtifactsErrorInfo)(nil), // 4: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo + (*ImportYumArtifactsResponse)(nil), // 5: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse + (*ImportYumArtifactsMetadata)(nil), // 6: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsMetadata + (*status.Status)(nil), // 7: google.rpc.Status +} +var file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_depIdxs = []int32{ + 0, // 0: google.devtools.artifactregistry.v1beta2.YumArtifact.package_type:type_name -> google.devtools.artifactregistry.v1beta2.YumArtifact.PackageType + 2, // 1: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsRequest.gcs_source:type_name -> google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + 2, // 2: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo.gcs_source:type_name -> google.devtools.artifactregistry.v1beta2.ImportYumArtifactsGcsSource + 7, // 3: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo.error:type_name -> google.rpc.Status + 1, // 4: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse.yum_artifacts:type_name -> google.devtools.artifactregistry.v1beta2.YumArtifact + 4, // 5: google.devtools.artifactregistry.v1beta2.ImportYumArtifactsResponse.errors:type_name -> google.devtools.artifactregistry.v1beta2.ImportYumArtifactsErrorInfo + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_init() } +func file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_init() { + if File_google_devtools_artifactregistry_v1beta2_yum_artifact_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*YumArtifact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportYumArtifactsGcsSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportYumArtifactsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportYumArtifactsErrorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportYumArtifactsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportYumArtifactsMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ImportYumArtifactsRequest_GcsSource)(nil), + } + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*ImportYumArtifactsErrorInfo_GcsSource)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_goTypes, + DependencyIndexes: file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_depIdxs, + EnumInfos: file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_enumTypes, + MessageInfos: file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_msgTypes, + }.Build() + File_google_devtools_artifactregistry_v1beta2_yum_artifact_proto = out.File + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_rawDesc = nil + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_goTypes = nil + file_google_devtools_artifactregistry_v1beta2_yum_artifact_proto_depIdxs = nil +} diff --git a/artifactregistry/apiv1beta2/doc.go b/artifactregistry/apiv1beta2/doc.go index eb679ef17c1a..10b7cd7ce15d 100644 --- a/artifactregistry/apiv1beta2/doc.go +++ b/artifactregistry/apiv1beta2/doc.go @@ -20,48 +20,59 @@ // Store and manage build artifacts in a scalable and integrated service // built on Google infrastructure. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := artifactregistry.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := artifactregistry.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := artifactregistry.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &artifactregistrypb.ImportAptArtifactsRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportAptArtifactsRequest. -// } -// op, err := c.ImportAptArtifacts(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := artifactregistry.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &artifactregistrypb.ImportAptArtifactsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportAptArtifactsRequest. +// } +// op, err := c.ImportAptArtifacts(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. @@ -75,6 +86,8 @@ package artifactregistry // import "cloud.google.com/go/artifactregistry/apiv1be import ( "context" + "fmt" + "net/http" "os" "runtime" "strconv" @@ -164,3 +177,22 @@ func versionGo() string { } return "UNKNOWN" } + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/artifactregistry/apiv1beta2/gapic_metadata.json b/artifactregistry/apiv1beta2/gapic_metadata.json index 706eee7427ea..cb6478919a7b 100644 --- a/artifactregistry/apiv1beta2/gapic_metadata.json +++ b/artifactregistry/apiv1beta2/gapic_metadata.json @@ -136,6 +136,136 @@ ] } } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CreateRepository": { + "methods": [ + "CreateRepository" + ] + }, + "CreateTag": { + "methods": [ + "CreateTag" + ] + }, + "DeletePackage": { + "methods": [ + "DeletePackage" + ] + }, + "DeleteRepository": { + "methods": [ + "DeleteRepository" + ] + }, + "DeleteTag": { + "methods": [ + "DeleteTag" + ] + }, + "DeleteVersion": { + "methods": [ + "DeleteVersion" + ] + }, + "GetFile": { + "methods": [ + "GetFile" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetPackage": { + "methods": [ + "GetPackage" + ] + }, + "GetProjectSettings": { + "methods": [ + "GetProjectSettings" + ] + }, + "GetRepository": { + "methods": [ + "GetRepository" + ] + }, + "GetTag": { + "methods": [ + "GetTag" + ] + }, + "GetVersion": { + "methods": [ + "GetVersion" + ] + }, + "ImportAptArtifacts": { + "methods": [ + "ImportAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "ImportYumArtifacts" + ] + }, + "ListFiles": { + "methods": [ + "ListFiles" + ] + }, + "ListPackages": { + "methods": [ + "ListPackages" + ] + }, + "ListRepositories": { + "methods": [ + "ListRepositories" + ] + }, + "ListTags": { + "methods": [ + "ListTags" + ] + }, + "ListVersions": { + "methods": [ + "ListVersions" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateProjectSettings": { + "methods": [ + "UpdateProjectSettings" + ] + }, + "UpdateRepository": { + "methods": [ + "UpdateRepository" + ] + }, + "UpdateTag": { + "methods": [ + "UpdateTag" + ] + } + } } } } diff --git a/artifactregistry/go.mod b/artifactregistry/go.mod index e66536ea4367..f10773764b64 100644 --- a/artifactregistry/go.mod +++ b/artifactregistry/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/artifactregistry -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/artifactregistry/go.sum b/artifactregistry/go.sum index f00d995cec43..fe8755ea9d8f 100644 --- a/artifactregistry/go.sum +++ b/artifactregistry/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +621,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +638,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/artifactregistry/internal/version.go b/artifactregistry/internal/version.go index bb0feadfd279..05d3396f1001 100644 --- a/artifactregistry/internal/version.go +++ b/artifactregistry/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.3.0" +const Version = "1.6.0" diff --git a/asset/CHANGES.md b/asset/CHANGES.md index bef73da3377a..c70ce4d1f86a 100644 --- a/asset/CHANGES.md +++ b/asset/CHANGES.md @@ -1,5 +1,27 @@ # Changes +## [1.6.0](https://github.com/googleapis/google-cloud-go/compare/asset/v1.5.0...asset/v1.6.0) (2022-09-08) + + +### Features + +* **asset:** Rewrite signatures in terms of new types for betas ([#6624](https://github.com/googleapis/google-cloud-go/issues/6624)) ([1ad1aba](https://github.com/googleapis/google-cloud-go/commit/1ad1aba985d58e45774c27aa07cab446c6055ab0)) + +## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/asset/v1.4.0...asset/v1.5.0) (2022-09-06) + + +### Features + +* **asset:** start generating stubs dirs for betas ([#6617](https://github.com/googleapis/google-cloud-go/issues/6617)) ([bb4a220](https://github.com/googleapis/google-cloud-go/commit/bb4a2205c65e9d030abbb73ebec040e0a13fa731)) + +## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/asset/v1.3.0...asset/v1.4.0) (2022-08-18) + + +### Features + +* **asset:** Add client library support for AssetService v1 BatchGetEffectiveIamPolicies API Committer: haochunzhang@ ([370e23e](https://github.com/googleapis/google-cloud-go/commit/370e23eaa342a7055a8d8b6f8fe9420f83afe43e)) +* **asset:** Release of query system Committer: lvv@ ([370e23e](https://github.com/googleapis/google-cloud-go/commit/370e23eaa342a7055a8d8b6f8fe9420f83afe43e)) + ## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/asset/v1.2.0...asset/v1.3.0) (2022-06-29) diff --git a/gkehub/go_mod_tidy_hack.go b/asset/aliasshim/aliasshim.go similarity index 60% rename from gkehub/go_mod_tidy_hack.go rename to asset/aliasshim/aliasshim.go index 58a7a5f33482..0a02061ceeb4 100644 --- a/gkehub/go_mod_tidy_hack.go +++ b/asset/aliasshim/aliasshim.go @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,12 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack +// Code generated by gapicgen. DO NOT EDIT. -package gkehub +//go:build aliasshim +// +build aliasshim -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" +// Package aliasshim is used to keep the dependency on go-genproto during our +// go-genproto to google-cloud-go stubs migration window. +package aliasshim + +import _ "google.golang.org/genproto/protobuf/api" diff --git a/asset/apiv1/asset_client.go b/asset/apiv1/asset_client.go index c057fd04b12b..37655e5c87dc 100644 --- a/asset/apiv1/asset_client.go +++ b/asset/apiv1/asset_client.go @@ -55,12 +55,14 @@ type CallOptions struct { AnalyzeIamPolicy []gax.CallOption AnalyzeIamPolicyLongrunning []gax.CallOption AnalyzeMove []gax.CallOption + QueryAssets []gax.CallOption CreateSavedQuery []gax.CallOption GetSavedQuery []gax.CallOption ListSavedQueries []gax.CallOption UpdateSavedQuery []gax.CallOption DeleteSavedQuery []gax.CallOption BatchGetEffectiveIamPolicies []gax.CallOption + GetOperation []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -173,14 +175,36 @@ func defaultCallOptions() *CallOptions { }) }), }, - AnalyzeIamPolicyLongrunning: []gax.CallOption{}, - AnalyzeMove: []gax.CallOption{}, - CreateSavedQuery: []gax.CallOption{}, - GetSavedQuery: []gax.CallOption{}, - ListSavedQueries: []gax.CallOption{}, - UpdateSavedQuery: []gax.CallOption{}, - DeleteSavedQuery: []gax.CallOption{}, - BatchGetEffectiveIamPolicies: []gax.CallOption{}, + AnalyzeIamPolicyLongrunning: []gax.CallOption{}, + AnalyzeMove: []gax.CallOption{}, + QueryAssets: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateSavedQuery: []gax.CallOption{}, + GetSavedQuery: []gax.CallOption{}, + ListSavedQueries: []gax.CallOption{}, + UpdateSavedQuery: []gax.CallOption{}, + DeleteSavedQuery: []gax.CallOption{}, + BatchGetEffectiveIamPolicies: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetOperation: []gax.CallOption{}, } } @@ -204,12 +228,14 @@ type internalClient interface { AnalyzeIamPolicyLongrunning(context.Context, *assetpb.AnalyzeIamPolicyLongrunningRequest, ...gax.CallOption) (*AnalyzeIamPolicyLongrunningOperation, error) AnalyzeIamPolicyLongrunningOperation(name string) *AnalyzeIamPolicyLongrunningOperation AnalyzeMove(context.Context, *assetpb.AnalyzeMoveRequest, ...gax.CallOption) (*assetpb.AnalyzeMoveResponse, error) + QueryAssets(context.Context, *assetpb.QueryAssetsRequest, ...gax.CallOption) (*assetpb.QueryAssetsResponse, error) CreateSavedQuery(context.Context, *assetpb.CreateSavedQueryRequest, ...gax.CallOption) (*assetpb.SavedQuery, error) GetSavedQuery(context.Context, *assetpb.GetSavedQueryRequest, ...gax.CallOption) (*assetpb.SavedQuery, error) ListSavedQueries(context.Context, *assetpb.ListSavedQueriesRequest, ...gax.CallOption) *SavedQueryIterator UpdateSavedQuery(context.Context, *assetpb.UpdateSavedQueryRequest, ...gax.CallOption) (*assetpb.SavedQuery, error) DeleteSavedQuery(context.Context, *assetpb.DeleteSavedQueryRequest, ...gax.CallOption) error BatchGetEffectiveIamPolicies(context.Context, *assetpb.BatchGetEffectiveIamPoliciesRequest, ...gax.CallOption) (*assetpb.BatchGetEffectiveIamPoliciesResponse, error) + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // Client is a client for interacting with Cloud Asset API. @@ -246,7 +272,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -366,6 +393,24 @@ func (c *Client) AnalyzeMove(ctx context.Context, req *assetpb.AnalyzeMoveReques return c.internalClient.AnalyzeMove(ctx, req, opts...) } +// QueryAssets issue a job that queries assets using a SQL statement compatible with +// BigQuery Standard +// SQL (at http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). +// +// If the query execution finishes within timeout and there’s no pagination, +// the full query results will be returned in the QueryAssetsResponse. +// +// Otherwise, full query results can be obtained by issuing extra requests +// with the job_reference from the a previous QueryAssets call. +// +// Note, the query result has approximately 10 GB limitation enforced by +// BigQuery +// https://cloud.google.com/bigquery/docs/best-practices-performance-output (at https://cloud.google.com/bigquery/docs/best-practices-performance-output), +// queries return larger results will result in errors. +func (c *Client) QueryAssets(ctx context.Context, req *assetpb.QueryAssetsRequest, opts ...gax.CallOption) (*assetpb.QueryAssetsResponse, error) { + return c.internalClient.QueryAssets(ctx, req, opts...) +} + // CreateSavedQuery creates a saved query in a parent project/folder/organization. func (c *Client) CreateSavedQuery(ctx context.Context, req *assetpb.CreateSavedQueryRequest, opts ...gax.CallOption) (*assetpb.SavedQuery, error) { return c.internalClient.CreateSavedQuery(ctx, req, opts...) @@ -396,6 +441,11 @@ func (c *Client) BatchGetEffectiveIamPolicies(ctx context.Context, req *assetpb. return c.internalClient.BatchGetEffectiveIamPolicies(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Cloud Asset API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -417,6 +467,8 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -451,6 +503,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: assetpb.NewAssetServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -472,7 +525,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -842,6 +896,28 @@ func (c *gRPCClient) AnalyzeMove(ctx context.Context, req *assetpb.AnalyzeMoveRe return resp, nil } +func (c *gRPCClient) QueryAssets(ctx context.Context, req *assetpb.QueryAssetsRequest, opts ...gax.CallOption) (*assetpb.QueryAssetsResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 200000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).QueryAssets[0:len((*c.CallOptions).QueryAssets):len((*c.CallOptions).QueryAssets)], opts...) + var resp *assetpb.QueryAssetsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.QueryAssets(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *gRPCClient) CreateSavedQuery(ctx context.Context, req *assetpb.CreateSavedQueryRequest, opts ...gax.CallOption) (*assetpb.SavedQuery, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -952,6 +1028,11 @@ func (c *gRPCClient) DeleteSavedQuery(ctx context.Context, req *assetpb.DeleteSa } func (c *gRPCClient) BatchGetEffectiveIamPolicies(ctx context.Context, req *assetpb.BatchGetEffectiveIamPoliciesRequest, opts ...gax.CallOption) (*assetpb.BatchGetEffectiveIamPoliciesResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 300000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "scope", url.QueryEscape(req.GetScope()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -968,6 +1049,23 @@ func (c *gRPCClient) BatchGetEffectiveIamPolicies(ctx context.Context, req *asse return resp, nil } +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // AnalyzeIamPolicyLongrunningOperation manages a long-running operation from AnalyzeIamPolicyLongrunning. type AnalyzeIamPolicyLongrunningOperation struct { lro *longrunning.Operation diff --git a/asset/apiv1/asset_client_example_test.go b/asset/apiv1/asset_client_example_test.go index fee01cdc23ab..5bb62ae4a0cc 100644 --- a/asset/apiv1/asset_client_example_test.go +++ b/asset/apiv1/asset_client_example_test.go @@ -22,10 +22,16 @@ import ( asset "cloud.google.com/go/asset/apiv1" "google.golang.org/api/iterator" assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +44,11 @@ func ExampleNewClient() { func ExampleClient_ExportAssets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +74,11 @@ func ExampleClient_ExportAssets() { func ExampleClient_ListAssets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -89,6 +105,11 @@ func ExampleClient_ListAssets() { func ExampleClient_BatchGetAssetsHistory() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +130,11 @@ func ExampleClient_BatchGetAssetsHistory() { func ExampleClient_CreateFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -129,6 +155,11 @@ func ExampleClient_CreateFeed() { func ExampleClient_GetFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -149,6 +180,11 @@ func ExampleClient_GetFeed() { func ExampleClient_ListFeeds() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +205,11 @@ func ExampleClient_ListFeeds() { func ExampleClient_UpdateFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -189,6 +230,11 @@ func ExampleClient_UpdateFeed() { func ExampleClient_DeleteFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +253,11 @@ func ExampleClient_DeleteFeed() { func ExampleClient_SearchAllResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -233,6 +284,11 @@ func ExampleClient_SearchAllResources() { func ExampleClient_SearchAllIamPolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -259,6 +315,11 @@ func ExampleClient_SearchAllIamPolicies() { func ExampleClient_AnalyzeIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -279,6 +340,11 @@ func ExampleClient_AnalyzeIamPolicy() { func ExampleClient_AnalyzeIamPolicyLongrunning() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -304,6 +370,11 @@ func ExampleClient_AnalyzeIamPolicyLongrunning() { func ExampleClient_AnalyzeMove() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -322,8 +393,38 @@ func ExampleClient_AnalyzeMove() { _ = resp } +func ExampleClient_QueryAssets() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := asset.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &assetpb.QueryAssetsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1#QueryAssetsRequest. + } + resp, err := c.QueryAssets(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_CreateSavedQuery() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -344,6 +445,11 @@ func ExampleClient_CreateSavedQuery() { func ExampleClient_GetSavedQuery() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -364,6 +470,11 @@ func ExampleClient_GetSavedQuery() { func ExampleClient_ListSavedQueries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -390,6 +501,11 @@ func ExampleClient_ListSavedQueries() { func ExampleClient_UpdateSavedQuery() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -410,6 +526,11 @@ func ExampleClient_UpdateSavedQuery() { func ExampleClient_DeleteSavedQuery() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -428,6 +549,11 @@ func ExampleClient_DeleteSavedQuery() { func ExampleClient_BatchGetEffectiveIamPolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -445,3 +571,28 @@ func ExampleClient_BatchGetEffectiveIamPolicies() { // TODO: Use resp. _ = resp } + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := asset.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/asset/apiv1/doc.go b/asset/apiv1/doc.go index 1323d8084f77..599f176b186d 100644 --- a/asset/apiv1/doc.go +++ b/asset/apiv1/doc.go @@ -19,48 +19,59 @@ // // The cloud asset API manages the history and inventory of cloud resources. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := asset.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := asset.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := asset.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &assetpb.ExportAssetsRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1#ExportAssetsRequest. -// } -// op, err := c.ExportAssets(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := asset.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &assetpb.ExportAssetsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1#ExportAssetsRequest. +// } +// op, err := c.ExportAssets(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/asset/apiv1/gapic_metadata.json b/asset/apiv1/gapic_metadata.json index a2646d4354f7..10fd5089523c 100644 --- a/asset/apiv1/gapic_metadata.json +++ b/asset/apiv1/gapic_metadata.json @@ -65,6 +65,11 @@ "GetFeed" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetSavedQuery": { "methods": [ "GetSavedQuery" @@ -85,6 +90,11 @@ "ListSavedQueries" ] }, + "QueryAssets": { + "methods": [ + "QueryAssets" + ] + }, "SearchAllIamPolicies": { "methods": [ "SearchAllIamPolicies" diff --git a/asset/apiv1/mock_test.go b/asset/apiv1/mock_test.go deleted file mode 100644 index 61ae4b99f9cc..000000000000 --- a/asset/apiv1/mock_test.go +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package asset - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - "google.golang.org/api/option" - assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1" - longrunningpb "google.golang.org/genproto/googleapis/longrunning" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockAssetServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - assetpb.AssetServiceServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockAssetServer) ExportAssets(ctx context.Context, req *assetpb.ExportAssetsRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAssetServer) BatchGetAssetsHistory(ctx context.Context, req *assetpb.BatchGetAssetsHistoryRequest) (*assetpb.BatchGetAssetsHistoryResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*assetpb.BatchGetAssetsHistoryResponse), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockAsset mockAssetServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - assetpb.RegisterAssetServiceServer(serv, &mockAsset) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestAssetServiceExportAssets(t *testing.T) { - var expectedResponse *assetpb.ExportAssetsResponse = &assetpb.ExportAssetsResponse{} - - mockAsset.err = nil - mockAsset.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAsset.resps = append(mockAsset.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var parent string = "parent-995424086" - var outputConfig *assetpb.OutputConfig = &assetpb.OutputConfig{} - var request = &assetpb.ExportAssetsRequest{ - Parent: parent, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportAssets(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAssetServiceExportAssetsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = nil - mockAsset.resps = append(mockAsset.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var parent string = "parent-995424086" - var outputConfig *assetpb.OutputConfig = &assetpb.OutputConfig{} - var request = &assetpb.ExportAssetsRequest{ - Parent: parent, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportAssets(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAssetServiceBatchGetAssetsHistory(t *testing.T) { - var expectedResponse *assetpb.BatchGetAssetsHistoryResponse = &assetpb.BatchGetAssetsHistoryResponse{} - - mockAsset.err = nil - mockAsset.reqs = nil - - mockAsset.resps = append(mockAsset.resps[:0], expectedResponse) - - var parent string = "parent-995424086" - var contentType assetpb.ContentType = assetpb.ContentType_CONTENT_TYPE_UNSPECIFIED - var readTimeWindow *assetpb.TimeWindow = &assetpb.TimeWindow{} - var request = &assetpb.BatchGetAssetsHistoryRequest{ - Parent: parent, - ContentType: contentType, - ReadTimeWindow: readTimeWindow, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchGetAssetsHistory(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAssetServiceBatchGetAssetsHistoryError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = gstatus.Error(errCode, "test error") - - var parent string = "parent-995424086" - var contentType assetpb.ContentType = assetpb.ContentType_CONTENT_TYPE_UNSPECIFIED - var readTimeWindow *assetpb.TimeWindow = &assetpb.TimeWindow{} - var request = &assetpb.BatchGetAssetsHistoryRequest{ - Parent: parent, - ContentType: contentType, - ReadTimeWindow: readTimeWindow, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchGetAssetsHistory(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/asset/apiv1p2beta1/asset_client.go b/asset/apiv1p2beta1/asset_client.go index 20da0e89af6d..46c017cdfd7e 100644 --- a/asset/apiv1p2beta1/asset_client.go +++ b/asset/apiv1p2beta1/asset_client.go @@ -26,13 +26,13 @@ import ( "net/url" "time" + assetpb "cloud.google.com/go/asset/apiv1p2beta1/assetpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" httptransport "google.golang.org/api/transport/http" - assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -186,7 +186,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -277,7 +278,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -361,7 +363,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } diff --git a/asset/apiv1p2beta1/asset_client_example_test.go b/asset/apiv1p2beta1/asset_client_example_test.go index 69426fb2a61d..115295176be2 100644 --- a/asset/apiv1p2beta1/asset_client_example_test.go +++ b/asset/apiv1p2beta1/asset_client_example_test.go @@ -20,11 +20,16 @@ import ( "context" asset "cloud.google.com/go/asset/apiv1p2beta1" - assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1" + assetpb "cloud.google.com/go/asset/apiv1p2beta1/assetpb" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewRESTClient() { func ExampleClient_CreateFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -57,7 +72,7 @@ func ExampleClient_CreateFeed() { req := &assetpb.CreateFeedRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1#CreateFeedRequest. + // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p2beta1/assetpb#CreateFeedRequest. } resp, err := c.CreateFeed(ctx, req) if err != nil { @@ -69,6 +84,11 @@ func ExampleClient_CreateFeed() { func ExampleClient_GetFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -77,7 +97,7 @@ func ExampleClient_GetFeed() { req := &assetpb.GetFeedRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1#GetFeedRequest. + // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p2beta1/assetpb#GetFeedRequest. } resp, err := c.GetFeed(ctx, req) if err != nil { @@ -89,6 +109,11 @@ func ExampleClient_GetFeed() { func ExampleClient_ListFeeds() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -97,7 +122,7 @@ func ExampleClient_ListFeeds() { req := &assetpb.ListFeedsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1#ListFeedsRequest. + // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p2beta1/assetpb#ListFeedsRequest. } resp, err := c.ListFeeds(ctx, req) if err != nil { @@ -109,6 +134,11 @@ func ExampleClient_ListFeeds() { func ExampleClient_UpdateFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -117,7 +147,7 @@ func ExampleClient_UpdateFeed() { req := &assetpb.UpdateFeedRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1#UpdateFeedRequest. + // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p2beta1/assetpb#UpdateFeedRequest. } resp, err := c.UpdateFeed(ctx, req) if err != nil { @@ -129,6 +159,11 @@ func ExampleClient_UpdateFeed() { func ExampleClient_DeleteFeed() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -137,7 +172,7 @@ func ExampleClient_DeleteFeed() { req := &assetpb.DeleteFeedRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1#DeleteFeedRequest. + // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p2beta1/assetpb#DeleteFeedRequest. } err = c.DeleteFeed(ctx, req) if err != nil { diff --git a/asset/apiv1p2beta1/assetpb/asset_service.pb.go b/asset/apiv1p2beta1/assetpb/asset_service.pb.go new file mode 100644 index 000000000000..0cd051d3c92e --- /dev/null +++ b/asset/apiv1p2beta1/assetpb/asset_service.pb.go @@ -0,0 +1,1456 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.2 +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package assetpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + empty "github.com/golang/protobuf/ptypes/empty" + _ "google.golang.org/genproto/googleapis/api/annotations" + field_mask "google.golang.org/genproto/protobuf/field_mask" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Asset content type. +type ContentType int32 + +const ( + // Unspecified content type. + ContentType_CONTENT_TYPE_UNSPECIFIED ContentType = 0 + // Resource metadata. + ContentType_RESOURCE ContentType = 1 + // The actual IAM policy set on a resource. + ContentType_IAM_POLICY ContentType = 2 +) + +// Enum value maps for ContentType. +var ( + ContentType_name = map[int32]string{ + 0: "CONTENT_TYPE_UNSPECIFIED", + 1: "RESOURCE", + 2: "IAM_POLICY", + } + ContentType_value = map[string]int32{ + "CONTENT_TYPE_UNSPECIFIED": 0, + "RESOURCE": 1, + "IAM_POLICY": 2, + } +) + +func (x ContentType) Enum() *ContentType { + p := new(ContentType) + *p = x + return p +} + +func (x ContentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ContentType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_enumTypes[0].Descriptor() +} + +func (ContentType) Type() protoreflect.EnumType { + return &file_google_cloud_asset_v1p2beta1_asset_service_proto_enumTypes[0] +} + +func (x ContentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ContentType.Descriptor instead. +func (ContentType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{0} +} + +// Create asset feed request. +type CreateFeedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the project/folder/organization where this feed + // should be created in. It can only be an organization number (such as + // "organizations/123"), a folder number (such as "folders/123"), a project ID + // (such as "projects/my-project-id")", or a project number (such as + // "projects/12345"). + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. This is the client-assigned asset feed identifier and it needs to + // be unique under a specific parent project/folder/organization. + FeedId string `protobuf:"bytes,2,opt,name=feed_id,json=feedId,proto3" json:"feed_id,omitempty"` + // Required. The feed details. The field `name` must be empty and it will be generated + // in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Feed *Feed `protobuf:"bytes,3,opt,name=feed,proto3" json:"feed,omitempty"` +} + +func (x *CreateFeedRequest) Reset() { + *x = CreateFeedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFeedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFeedRequest) ProtoMessage() {} + +func (x *CreateFeedRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFeedRequest.ProtoReflect.Descriptor instead. +func (*CreateFeedRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateFeedRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateFeedRequest) GetFeedId() string { + if x != nil { + return x.FeedId + } + return "" +} + +func (x *CreateFeedRequest) GetFeed() *Feed { + if x != nil { + return x.Feed + } + return nil +} + +// Get asset feed request. +type GetFeedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetFeedRequest) Reset() { + *x = GetFeedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFeedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFeedRequest) ProtoMessage() {} + +func (x *GetFeedRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFeedRequest.ProtoReflect.Descriptor instead. +func (*GetFeedRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetFeedRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// List asset feeds request. +type ListFeedsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent project/folder/organization whose feeds are to be + // listed. It can only be using project/folder/organization number (such as + // "folders/12345")", or a project ID (such as "projects/my-project-id"). + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *ListFeedsRequest) Reset() { + *x = ListFeedsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFeedsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFeedsRequest) ProtoMessage() {} + +func (x *ListFeedsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFeedsRequest.ProtoReflect.Descriptor instead. +func (*ListFeedsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListFeedsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +type ListFeedsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of feeds. + Feeds []*Feed `protobuf:"bytes,1,rep,name=feeds,proto3" json:"feeds,omitempty"` +} + +func (x *ListFeedsResponse) Reset() { + *x = ListFeedsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFeedsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFeedsResponse) ProtoMessage() {} + +func (x *ListFeedsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFeedsResponse.ProtoReflect.Descriptor instead. +func (*ListFeedsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListFeedsResponse) GetFeeds() []*Feed { + if x != nil { + return x.Feeds + } + return nil +} + +// Update asset feed request. +type UpdateFeedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The new values of feed details. It must match an existing feed and the + // field `name` must be in the format of: + // projects/project_number/feeds/feed_id or + // folders/folder_number/feeds/feed_id or + // organizations/organization_number/feeds/feed_id. + Feed *Feed `protobuf:"bytes,1,opt,name=feed,proto3" json:"feed,omitempty"` + // Required. Only updates the `feed` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateFeedRequest) Reset() { + *x = UpdateFeedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFeedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFeedRequest) ProtoMessage() {} + +func (x *UpdateFeedRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFeedRequest.ProtoReflect.Descriptor instead. +func (*UpdateFeedRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateFeedRequest) GetFeed() *Feed { + if x != nil { + return x.Feed + } + return nil +} + +func (x *UpdateFeedRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type DeleteFeedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteFeedRequest) Reset() { + *x = DeleteFeedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFeedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFeedRequest) ProtoMessage() {} + +func (x *DeleteFeedRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFeedRequest.ProtoReflect.Descriptor instead. +func (*DeleteFeedRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteFeedRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Output configuration for export assets destination. +type OutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Asset export destination. + // + // Types that are assignable to Destination: + // + // *OutputConfig_GcsDestination + Destination isOutputConfig_Destination `protobuf_oneof:"destination"` +} + +func (x *OutputConfig) Reset() { + *x = OutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputConfig) ProtoMessage() {} + +func (x *OutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead. +func (*OutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{6} +} + +func (m *OutputConfig) GetDestination() isOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *OutputConfig) GetGcsDestination() *GcsDestination { + if x, ok := x.GetDestination().(*OutputConfig_GcsDestination); ok { + return x.GcsDestination + } + return nil +} + +type isOutputConfig_Destination interface { + isOutputConfig_Destination() +} + +type OutputConfig_GcsDestination struct { + // Destination on Cloud Storage. + GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"` +} + +func (*OutputConfig_GcsDestination) isOutputConfig_Destination() {} + +// A Cloud Storage location. +type GcsDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. + // + // Types that are assignable to ObjectUri: + // + // *GcsDestination_Uri + ObjectUri isGcsDestination_ObjectUri `protobuf_oneof:"object_uri"` +} + +func (x *GcsDestination) Reset() { + *x = GcsDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsDestination) ProtoMessage() {} + +func (x *GcsDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsDestination.ProtoReflect.Descriptor instead. +func (*GcsDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{7} +} + +func (m *GcsDestination) GetObjectUri() isGcsDestination_ObjectUri { + if m != nil { + return m.ObjectUri + } + return nil +} + +func (x *GcsDestination) GetUri() string { + if x, ok := x.GetObjectUri().(*GcsDestination_Uri); ok { + return x.Uri + } + return "" +} + +type isGcsDestination_ObjectUri interface { + isGcsDestination_ObjectUri() +} + +type GcsDestination_Uri struct { + // The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"` +} + +func (*GcsDestination_Uri) isGcsDestination_ObjectUri() {} + +// A Cloud Pubsub destination. +type PubsubDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the Cloud Pub/Sub topic to publish to. + // For example: `projects/PROJECT_ID/topics/TOPIC_ID`. + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *PubsubDestination) Reset() { + *x = PubsubDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubsubDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubsubDestination) ProtoMessage() {} + +func (x *PubsubDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubsubDestination.ProtoReflect.Descriptor instead. +func (*PubsubDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{8} +} + +func (x *PubsubDestination) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +// Output configuration for asset feed destination. +type FeedOutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Asset feed destination. + // + // Types that are assignable to Destination: + // + // *FeedOutputConfig_PubsubDestination + Destination isFeedOutputConfig_Destination `protobuf_oneof:"destination"` +} + +func (x *FeedOutputConfig) Reset() { + *x = FeedOutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeedOutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeedOutputConfig) ProtoMessage() {} + +func (x *FeedOutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeedOutputConfig.ProtoReflect.Descriptor instead. +func (*FeedOutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{9} +} + +func (m *FeedOutputConfig) GetDestination() isFeedOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *FeedOutputConfig) GetPubsubDestination() *PubsubDestination { + if x, ok := x.GetDestination().(*FeedOutputConfig_PubsubDestination); ok { + return x.PubsubDestination + } + return nil +} + +type isFeedOutputConfig_Destination interface { + isFeedOutputConfig_Destination() +} + +type FeedOutputConfig_PubsubDestination struct { + // Destination on Cloud Pubsub. + PubsubDestination *PubsubDestination `protobuf:"bytes,1,opt,name=pubsub_destination,json=pubsubDestination,proto3,oneof"` +} + +func (*FeedOutputConfig_PubsubDestination) isFeedOutputConfig_Destination() {} + +// An asset feed used to export asset updates to a destinations. +// An asset feed filter controls what updates are exported. +// The asset feed must be created within a project, organization, or +// folder. Supported destinations are: +// Cloud Pub/Sub topics. +type Feed struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The format will be + // projects/{project_number}/feeds/{client-assigned_feed_identifier} or + // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or + // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} + // + // The client-assigned feed identifier must be unique within the parent + // project/folder/organization. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A list of the full names of the assets to receive updates. You must specify + // either or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. For + // example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more info. + AssetNames []string `protobuf:"bytes,2,rep,name=asset_names,json=assetNames,proto3" json:"asset_names,omitempty"` + // A list of types of the assets to receive updates. You must specify either + // or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. + // For example: + // "compute.googleapis.com/Disk" See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // for all supported asset types. + AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"` + // Asset content type. If not specified, no content but the asset name and + // type will be returned. + ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1p2beta1.ContentType" json:"content_type,omitempty"` + // Required. Feed output configuration defining where the asset updates are + // published to. + FeedOutputConfig *FeedOutputConfig `protobuf:"bytes,5,opt,name=feed_output_config,json=feedOutputConfig,proto3" json:"feed_output_config,omitempty"` +} + +func (x *Feed) Reset() { + *x = Feed{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Feed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Feed) ProtoMessage() {} + +func (x *Feed) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Feed.ProtoReflect.Descriptor instead. +func (*Feed) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP(), []int{10} +} + +func (x *Feed) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Feed) GetAssetNames() []string { + if x != nil { + return x.AssetNames + } + return nil +} + +func (x *Feed) GetAssetTypes() []string { + if x != nil { + return x.AssetTypes + } + return nil +} + +func (x *Feed) GetContentType() ContentType { + if x != nil { + return x.ContentType + } + return ContentType_CONTENT_TYPE_UNSPECIFIED +} + +func (x *Feed) GetFeedOutputConfig() *FeedOutputConfig { + if x != nil { + return x.FeedOutputConfig + } + return nil +} + +var File_google_cloud_asset_v1p2beta1_asset_service_proto protoreflect.FileDescriptor + +var file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, + 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x1c, 0x0a, 0x07, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x66, 0x65, 0x65, 0x64, 0x49, 0x64, 0x12, 0x3b, + 0x0a, 0x04, 0x66, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x66, 0x65, 0x65, 0x64, 0x22, 0x4c, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, + 0x65, 0x65, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x10, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x38, 0x0a, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, + 0x65, 0x64, 0x52, 0x05, 0x66, 0x65, 0x65, 0x64, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x11, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3b, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, + 0x64, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x66, 0x65, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4f, + 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x65, 0x65, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x76, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x57, 0x0a, 0x0f, 0x67, 0x63, 0x73, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x63, 0x73, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x0e, 0x47, 0x63, 0x73, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x42, 0x0c, 0x0a, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x22, 0x29, 0x0a, 0x11, 0x50, + 0x75, 0x62, 0x73, 0x75, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x65, 0x64, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x12, 0x70, + 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, + 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x70, 0x75, 0x62, 0x73, + 0x75, 0x62, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x03, 0x0a, + 0x04, 0x46, 0x65, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x61, + 0x0a, 0x12, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x10, 0x66, 0x65, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x3a, 0x91, 0x01, 0xea, 0x41, 0x8d, 0x01, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x65, 0x65, 0x64, 0x12, 0x1f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x66, 0x65, 0x65, + 0x64, 0x73, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x7d, 0x12, 0x1d, 0x66, 0x6f, 0x6c, 0x64, 0x65, + 0x72, 0x73, 0x2f, 0x7b, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x64, + 0x73, 0x2f, 0x7b, 0x66, 0x65, 0x65, 0x64, 0x7d, 0x12, 0x29, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x7b, 0x66, 0x65, + 0x65, 0x64, 0x7d, 0x20, 0x01, 0x2a, 0x49, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x01, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x41, 0x4d, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, + 0x32, 0xbf, 0x06, 0x0a, 0x0c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x94, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, + 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x46, 0x65, 0x65, 0x64, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, + 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x2a, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x3a, 0x01, 0x2a, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x89, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, + 0x46, 0x65, 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, + 0x2f, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x2a, 0x2f, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x9c, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x65, + 0x64, 0x73, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, + 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x2a, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x97, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, + 0x65, 0x64, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x64, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x32, + 0x22, 0x2f, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x66, 0x65, 0x65, + 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x2a, 0x2f, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x66, 0x65, 0x65, 0x64, 0x12, 0x83, 0x01, + 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x12, 0x2f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x2a, 0x1d, 0x2f, + 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x2a, 0x2f, 0x2a, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x42, 0xb8, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2f, + 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x65, 0x74, 0xaa, + 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x2e, 0x56, 0x31, 0x70, 0x32, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, + 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescOnce sync.Once + file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescData = file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDesc +) + +func file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescGZIP() []byte { + file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescOnce.Do(func() { + file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescData) + }) + return file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDescData +} + +var file_google_cloud_asset_v1p2beta1_asset_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_google_cloud_asset_v1p2beta1_asset_service_proto_goTypes = []interface{}{ + (ContentType)(0), // 0: google.cloud.asset.v1p2beta1.ContentType + (*CreateFeedRequest)(nil), // 1: google.cloud.asset.v1p2beta1.CreateFeedRequest + (*GetFeedRequest)(nil), // 2: google.cloud.asset.v1p2beta1.GetFeedRequest + (*ListFeedsRequest)(nil), // 3: google.cloud.asset.v1p2beta1.ListFeedsRequest + (*ListFeedsResponse)(nil), // 4: google.cloud.asset.v1p2beta1.ListFeedsResponse + (*UpdateFeedRequest)(nil), // 5: google.cloud.asset.v1p2beta1.UpdateFeedRequest + (*DeleteFeedRequest)(nil), // 6: google.cloud.asset.v1p2beta1.DeleteFeedRequest + (*OutputConfig)(nil), // 7: google.cloud.asset.v1p2beta1.OutputConfig + (*GcsDestination)(nil), // 8: google.cloud.asset.v1p2beta1.GcsDestination + (*PubsubDestination)(nil), // 9: google.cloud.asset.v1p2beta1.PubsubDestination + (*FeedOutputConfig)(nil), // 10: google.cloud.asset.v1p2beta1.FeedOutputConfig + (*Feed)(nil), // 11: google.cloud.asset.v1p2beta1.Feed + (*field_mask.FieldMask)(nil), // 12: google.protobuf.FieldMask + (*empty.Empty)(nil), // 13: google.protobuf.Empty +} +var file_google_cloud_asset_v1p2beta1_asset_service_proto_depIdxs = []int32{ + 11, // 0: google.cloud.asset.v1p2beta1.CreateFeedRequest.feed:type_name -> google.cloud.asset.v1p2beta1.Feed + 11, // 1: google.cloud.asset.v1p2beta1.ListFeedsResponse.feeds:type_name -> google.cloud.asset.v1p2beta1.Feed + 11, // 2: google.cloud.asset.v1p2beta1.UpdateFeedRequest.feed:type_name -> google.cloud.asset.v1p2beta1.Feed + 12, // 3: google.cloud.asset.v1p2beta1.UpdateFeedRequest.update_mask:type_name -> google.protobuf.FieldMask + 8, // 4: google.cloud.asset.v1p2beta1.OutputConfig.gcs_destination:type_name -> google.cloud.asset.v1p2beta1.GcsDestination + 9, // 5: google.cloud.asset.v1p2beta1.FeedOutputConfig.pubsub_destination:type_name -> google.cloud.asset.v1p2beta1.PubsubDestination + 0, // 6: google.cloud.asset.v1p2beta1.Feed.content_type:type_name -> google.cloud.asset.v1p2beta1.ContentType + 10, // 7: google.cloud.asset.v1p2beta1.Feed.feed_output_config:type_name -> google.cloud.asset.v1p2beta1.FeedOutputConfig + 1, // 8: google.cloud.asset.v1p2beta1.AssetService.CreateFeed:input_type -> google.cloud.asset.v1p2beta1.CreateFeedRequest + 2, // 9: google.cloud.asset.v1p2beta1.AssetService.GetFeed:input_type -> google.cloud.asset.v1p2beta1.GetFeedRequest + 3, // 10: google.cloud.asset.v1p2beta1.AssetService.ListFeeds:input_type -> google.cloud.asset.v1p2beta1.ListFeedsRequest + 5, // 11: google.cloud.asset.v1p2beta1.AssetService.UpdateFeed:input_type -> google.cloud.asset.v1p2beta1.UpdateFeedRequest + 6, // 12: google.cloud.asset.v1p2beta1.AssetService.DeleteFeed:input_type -> google.cloud.asset.v1p2beta1.DeleteFeedRequest + 11, // 13: google.cloud.asset.v1p2beta1.AssetService.CreateFeed:output_type -> google.cloud.asset.v1p2beta1.Feed + 11, // 14: google.cloud.asset.v1p2beta1.AssetService.GetFeed:output_type -> google.cloud.asset.v1p2beta1.Feed + 4, // 15: google.cloud.asset.v1p2beta1.AssetService.ListFeeds:output_type -> google.cloud.asset.v1p2beta1.ListFeedsResponse + 11, // 16: google.cloud.asset.v1p2beta1.AssetService.UpdateFeed:output_type -> google.cloud.asset.v1p2beta1.Feed + 13, // 17: google.cloud.asset.v1p2beta1.AssetService.DeleteFeed:output_type -> google.protobuf.Empty + 13, // [13:18] is the sub-list for method output_type + 8, // [8:13] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_asset_v1p2beta1_asset_service_proto_init() } +func file_google_cloud_asset_v1p2beta1_asset_service_proto_init() { + if File_google_cloud_asset_v1p2beta1_asset_service_proto != nil { + return + } + file_google_cloud_asset_v1p2beta1_assets_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateFeedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFeedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFeedsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFeedsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateFeedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteFeedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubsubDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeedOutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Feed); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*OutputConfig_GcsDestination)(nil), + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*GcsDestination_Uri)(nil), + } + file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*FeedOutputConfig_PubsubDestination)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_asset_v1p2beta1_asset_service_proto_goTypes, + DependencyIndexes: file_google_cloud_asset_v1p2beta1_asset_service_proto_depIdxs, + EnumInfos: file_google_cloud_asset_v1p2beta1_asset_service_proto_enumTypes, + MessageInfos: file_google_cloud_asset_v1p2beta1_asset_service_proto_msgTypes, + }.Build() + File_google_cloud_asset_v1p2beta1_asset_service_proto = out.File + file_google_cloud_asset_v1p2beta1_asset_service_proto_rawDesc = nil + file_google_cloud_asset_v1p2beta1_asset_service_proto_goTypes = nil + file_google_cloud_asset_v1p2beta1_asset_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AssetServiceClient is the client API for AssetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AssetServiceClient interface { + // Creates a feed in a parent project/folder/organization to listen to its + // asset updates. + CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error) + // Gets details about an asset feed. + GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) + // Lists all asset feeds in a parent project/folder/organization. + ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) + // Updates an asset feed configuration. + UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error) + // Deletes an asset feed. + DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*empty.Empty, error) +} + +type assetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient { + return &assetServiceClient{cc} +} + +func (c *assetServiceClient) CreateFeed(ctx context.Context, in *CreateFeedRequest, opts ...grpc.CallOption) (*Feed, error) { + out := new(Feed) + err := c.cc.Invoke(ctx, "/google.cloud.asset.v1p2beta1.AssetService/CreateFeed", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assetServiceClient) GetFeed(ctx context.Context, in *GetFeedRequest, opts ...grpc.CallOption) (*Feed, error) { + out := new(Feed) + err := c.cc.Invoke(ctx, "/google.cloud.asset.v1p2beta1.AssetService/GetFeed", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assetServiceClient) ListFeeds(ctx context.Context, in *ListFeedsRequest, opts ...grpc.CallOption) (*ListFeedsResponse, error) { + out := new(ListFeedsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.asset.v1p2beta1.AssetService/ListFeeds", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assetServiceClient) UpdateFeed(ctx context.Context, in *UpdateFeedRequest, opts ...grpc.CallOption) (*Feed, error) { + out := new(Feed) + err := c.cc.Invoke(ctx, "/google.cloud.asset.v1p2beta1.AssetService/UpdateFeed", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assetServiceClient) DeleteFeed(ctx context.Context, in *DeleteFeedRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.asset.v1p2beta1.AssetService/DeleteFeed", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AssetServiceServer is the server API for AssetService service. +type AssetServiceServer interface { + // Creates a feed in a parent project/folder/organization to listen to its + // asset updates. + CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error) + // Gets details about an asset feed. + GetFeed(context.Context, *GetFeedRequest) (*Feed, error) + // Lists all asset feeds in a parent project/folder/organization. + ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) + // Updates an asset feed configuration. + UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error) + // Deletes an asset feed. + DeleteFeed(context.Context, *DeleteFeedRequest) (*empty.Empty, error) +} + +// UnimplementedAssetServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAssetServiceServer struct { +} + +func (*UnimplementedAssetServiceServer) CreateFeed(context.Context, *CreateFeedRequest) (*Feed, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateFeed not implemented") +} +func (*UnimplementedAssetServiceServer) GetFeed(context.Context, *GetFeedRequest) (*Feed, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFeed not implemented") +} +func (*UnimplementedAssetServiceServer) ListFeeds(context.Context, *ListFeedsRequest) (*ListFeedsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFeeds not implemented") +} +func (*UnimplementedAssetServiceServer) UpdateFeed(context.Context, *UpdateFeedRequest) (*Feed, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateFeed not implemented") +} +func (*UnimplementedAssetServiceServer) DeleteFeed(context.Context, *DeleteFeedRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteFeed not implemented") +} + +func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer) { + s.RegisterService(&_AssetService_serviceDesc, srv) +} + +func _AssetService_CreateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFeedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssetServiceServer).CreateFeed(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.asset.v1p2beta1.AssetService/CreateFeed", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssetServiceServer).CreateFeed(ctx, req.(*CreateFeedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssetService_GetFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFeedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssetServiceServer).GetFeed(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.asset.v1p2beta1.AssetService/GetFeed", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssetServiceServer).GetFeed(ctx, req.(*GetFeedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssetService_ListFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFeedsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssetServiceServer).ListFeeds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.asset.v1p2beta1.AssetService/ListFeeds", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssetServiceServer).ListFeeds(ctx, req.(*ListFeedsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssetService_UpdateFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFeedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssetServiceServer).UpdateFeed(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.asset.v1p2beta1.AssetService/UpdateFeed", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssetServiceServer).UpdateFeed(ctx, req.(*UpdateFeedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssetService_DeleteFeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFeedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssetServiceServer).DeleteFeed(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.asset.v1p2beta1.AssetService/DeleteFeed", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssetServiceServer).DeleteFeed(ctx, req.(*DeleteFeedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AssetService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.asset.v1p2beta1.AssetService", + HandlerType: (*AssetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateFeed", + Handler: _AssetService_CreateFeed_Handler, + }, + { + MethodName: "GetFeed", + Handler: _AssetService_GetFeed_Handler, + }, + { + MethodName: "ListFeeds", + Handler: _AssetService_ListFeeds_Handler, + }, + { + MethodName: "UpdateFeed", + Handler: _AssetService_UpdateFeed_Handler, + }, + { + MethodName: "DeleteFeed", + Handler: _AssetService_DeleteFeed_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/asset/v1p2beta1/asset_service.proto", +} diff --git a/asset/apiv1p2beta1/assetpb/assets.pb.go b/asset/apiv1p2beta1/assetpb/assets.pb.go new file mode 100644 index 000000000000..c7f656241006 --- /dev/null +++ b/asset/apiv1p2beta1/assetpb/assets.pb.go @@ -0,0 +1,564 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.2 +// source: google/cloud/asset/v1p2beta1/assets.proto + +package assetpb + +import ( + reflect "reflect" + sync "sync" + + _struct "github.com/golang/protobuf/ptypes/struct" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + v1 "google.golang.org/genproto/googleapis/iam/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Temporal asset. In addition to the asset, the temporal asset includes the +// status of the asset and valid from and to time of it. +type TemporalAsset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time window when the asset data and state was observed. + Window *TimeWindow `protobuf:"bytes,1,opt,name=window,proto3" json:"window,omitempty"` + // If the asset is deleted or not. + Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"` + // Asset. + Asset *Asset `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` +} + +func (x *TemporalAsset) Reset() { + *x = TemporalAsset{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemporalAsset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemporalAsset) ProtoMessage() {} + +func (x *TemporalAsset) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemporalAsset.ProtoReflect.Descriptor instead. +func (*TemporalAsset) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_assets_proto_rawDescGZIP(), []int{0} +} + +func (x *TemporalAsset) GetWindow() *TimeWindow { + if x != nil { + return x.Window + } + return nil +} + +func (x *TemporalAsset) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +func (x *TemporalAsset) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +// A time window of (start_time, end_time]. +type TimeWindow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start time of the time window (exclusive). + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // End time of the time window (inclusive). + // Current timestamp if not specified. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` +} + +func (x *TimeWindow) Reset() { + *x = TimeWindow{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeWindow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeWindow) ProtoMessage() {} + +func (x *TimeWindow) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeWindow.ProtoReflect.Descriptor instead. +func (*TimeWindow) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_assets_proto_rawDescGZIP(), []int{1} +} + +func (x *TimeWindow) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *TimeWindow) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +// Cloud asset. This includes all Google Cloud Platform resources, +// Cloud IAM policies, and other non-GCP assets. +type Asset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The full name of the asset. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Type of the asset. Example: "compute.googleapis.com/Disk". + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + // Representation of the resource. + Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + // Representation of the actual Cloud IAM policy set on a cloud resource. For + // each resource, there must be at most one Cloud IAM policy set on it. + IamPolicy *v1.Policy `protobuf:"bytes,4,opt,name=iam_policy,json=iamPolicy,proto3" json:"iam_policy,omitempty"` + // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + // represented as a list of relative resource names. Ancestry path starts with + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. + // + // Example: ["projects/123456789", "folders/5432", "organizations/1234"] + Ancestors []string `protobuf:"bytes,6,rep,name=ancestors,proto3" json:"ancestors,omitempty"` +} + +func (x *Asset) Reset() { + *x = Asset{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Asset) ProtoMessage() {} + +func (x *Asset) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Asset.ProtoReflect.Descriptor instead. +func (*Asset) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_assets_proto_rawDescGZIP(), []int{2} +} + +func (x *Asset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Asset) GetAssetType() string { + if x != nil { + return x.AssetType + } + return "" +} + +func (x *Asset) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Asset) GetIamPolicy() *v1.Policy { + if x != nil { + return x.IamPolicy + } + return nil +} + +func (x *Asset) GetAncestors() []string { + if x != nil { + return x.Ancestors + } + return nil +} + +// Representation of a cloud resource. +type Resource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The API version. Example: "v1". + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // The URL of the discovery document containing the resource's JSON schema. + // For example: + // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + // It will be left unspecified for resources without a discovery-based API, + // such as Cloud Bigtable. + DiscoveryDocumentUri string `protobuf:"bytes,2,opt,name=discovery_document_uri,json=discoveryDocumentUri,proto3" json:"discovery_document_uri,omitempty"` + // The JSON schema name listed in the discovery document. + // Example: "Project". It will be left unspecified for resources (such as + // Cloud Bigtable) without a discovery-based API. + DiscoveryName string `protobuf:"bytes,3,opt,name=discovery_name,json=discoveryName,proto3" json:"discovery_name,omitempty"` + // The REST URL for accessing the resource. An HTTP GET operation using this + // URL returns the resource itself. + // Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + // It will be left unspecified for resources without a REST API. + ResourceUrl string `protobuf:"bytes,4,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"` + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For GCP assets, it is the parent resource defined in the [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // For example: + // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + // + // For third-party assets, it is up to the users to define. + Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` + // The content of the resource, in which some sensitive fields are scrubbed + // away and may not be present. + Data *_struct.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Resource) Reset() { + *x = Resource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resource) ProtoMessage() {} + +func (x *Resource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Resource.ProtoReflect.Descriptor instead. +func (*Resource) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p2beta1_assets_proto_rawDescGZIP(), []int{3} +} + +func (x *Resource) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Resource) GetDiscoveryDocumentUri() string { + if x != nil { + return x.DiscoveryDocumentUri + } + return "" +} + +func (x *Resource) GetDiscoveryName() string { + if x != nil { + return x.DiscoveryName + } + return "" +} + +func (x *Resource) GetResourceUrl() string { + if x != nil { + return x.ResourceUrl + } + return "" +} + +func (x *Resource) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *Resource) GetData() *_struct.Struct { + if x != nil { + return x.Data + } + return nil +} + +var File_google_cloud_asset_v1p2beta1_assets_proto protoreflect.FileDescriptor + +var file_google_cloud_asset_v1p2beta1_assets_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x0d, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, + 0x6c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x12, 0x39, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0x7e, 0x0a, + 0x0a, 0x54, 0x69, 0x6d, 0x65, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x39, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd2, 0x01, + 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, + 0x0a, 0x0a, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x09, 0x69, 0x61, 0x6d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x73, 0x22, 0xe9, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, + 0x25, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0xb4, + 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, + 0x73, 0x73, 0x65, 0x74, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, + 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x70, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_asset_v1p2beta1_assets_proto_rawDescOnce sync.Once + file_google_cloud_asset_v1p2beta1_assets_proto_rawDescData = file_google_cloud_asset_v1p2beta1_assets_proto_rawDesc +) + +func file_google_cloud_asset_v1p2beta1_assets_proto_rawDescGZIP() []byte { + file_google_cloud_asset_v1p2beta1_assets_proto_rawDescOnce.Do(func() { + file_google_cloud_asset_v1p2beta1_assets_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_asset_v1p2beta1_assets_proto_rawDescData) + }) + return file_google_cloud_asset_v1p2beta1_assets_proto_rawDescData +} + +var file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_asset_v1p2beta1_assets_proto_goTypes = []interface{}{ + (*TemporalAsset)(nil), // 0: google.cloud.asset.v1p2beta1.TemporalAsset + (*TimeWindow)(nil), // 1: google.cloud.asset.v1p2beta1.TimeWindow + (*Asset)(nil), // 2: google.cloud.asset.v1p2beta1.Asset + (*Resource)(nil), // 3: google.cloud.asset.v1p2beta1.Resource + (*timestamp.Timestamp)(nil), // 4: google.protobuf.Timestamp + (*v1.Policy)(nil), // 5: google.iam.v1.Policy + (*_struct.Struct)(nil), // 6: google.protobuf.Struct +} +var file_google_cloud_asset_v1p2beta1_assets_proto_depIdxs = []int32{ + 1, // 0: google.cloud.asset.v1p2beta1.TemporalAsset.window:type_name -> google.cloud.asset.v1p2beta1.TimeWindow + 2, // 1: google.cloud.asset.v1p2beta1.TemporalAsset.asset:type_name -> google.cloud.asset.v1p2beta1.Asset + 4, // 2: google.cloud.asset.v1p2beta1.TimeWindow.start_time:type_name -> google.protobuf.Timestamp + 4, // 3: google.cloud.asset.v1p2beta1.TimeWindow.end_time:type_name -> google.protobuf.Timestamp + 3, // 4: google.cloud.asset.v1p2beta1.Asset.resource:type_name -> google.cloud.asset.v1p2beta1.Resource + 5, // 5: google.cloud.asset.v1p2beta1.Asset.iam_policy:type_name -> google.iam.v1.Policy + 6, // 6: google.cloud.asset.v1p2beta1.Resource.data:type_name -> google.protobuf.Struct + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_asset_v1p2beta1_assets_proto_init() } +func file_google_cloud_asset_v1p2beta1_assets_proto_init() { + if File_google_cloud_asset_v1p2beta1_assets_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TemporalAsset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeWindow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Asset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_asset_v1p2beta1_assets_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_asset_v1p2beta1_assets_proto_goTypes, + DependencyIndexes: file_google_cloud_asset_v1p2beta1_assets_proto_depIdxs, + MessageInfos: file_google_cloud_asset_v1p2beta1_assets_proto_msgTypes, + }.Build() + File_google_cloud_asset_v1p2beta1_assets_proto = out.File + file_google_cloud_asset_v1p2beta1_assets_proto_rawDesc = nil + file_google_cloud_asset_v1p2beta1_assets_proto_goTypes = nil + file_google_cloud_asset_v1p2beta1_assets_proto_depIdxs = nil +} diff --git a/asset/apiv1p2beta1/doc.go b/asset/apiv1p2beta1/doc.go index b481cc8d3a32..9f9e3a82911e 100644 --- a/asset/apiv1p2beta1/doc.go +++ b/asset/apiv1p2beta1/doc.go @@ -19,45 +19,56 @@ // // The cloud asset API manages the history and inventory of cloud resources. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := asset.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := asset.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := asset.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &assetpb.CreateFeedRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1#CreateFeedRequest. -// } -// resp, err := c.CreateFeed(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := asset.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &assetpb.CreateFeedRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p2beta1/assetpb#CreateFeedRequest. +// } +// resp, err := c.CreateFeed(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/asset/apiv1p2beta1/mock_test.go b/asset/apiv1p2beta1/mock_test.go deleted file mode 100644 index 5908702e67e8..000000000000 --- a/asset/apiv1p2beta1/mock_test.go +++ /dev/null @@ -1,449 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package asset - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1" - field_maskpb "google.golang.org/genproto/protobuf/field_mask" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockAssetServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - assetpb.AssetServiceServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockAssetServer) CreateFeed(ctx context.Context, req *assetpb.CreateFeedRequest) (*assetpb.Feed, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*assetpb.Feed), nil -} - -func (s *mockAssetServer) GetFeed(ctx context.Context, req *assetpb.GetFeedRequest) (*assetpb.Feed, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*assetpb.Feed), nil -} - -func (s *mockAssetServer) ListFeeds(ctx context.Context, req *assetpb.ListFeedsRequest) (*assetpb.ListFeedsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*assetpb.ListFeedsResponse), nil -} - -func (s *mockAssetServer) UpdateFeed(ctx context.Context, req *assetpb.UpdateFeedRequest) (*assetpb.Feed, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*assetpb.Feed), nil -} - -func (s *mockAssetServer) DeleteFeed(ctx context.Context, req *assetpb.DeleteFeedRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockAsset mockAssetServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - assetpb.RegisterAssetServiceServer(serv, &mockAsset) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestAssetServiceCreateFeed(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &assetpb.Feed{ - Name: name, - } - - mockAsset.err = nil - mockAsset.reqs = nil - - mockAsset.resps = append(mockAsset.resps[:0], expectedResponse) - - var parent string = "parent-995424086" - var feedId string = "feedId-976011428" - var feed *assetpb.Feed = &assetpb.Feed{} - var request = &assetpb.CreateFeedRequest{ - Parent: parent, - FeedId: feedId, - Feed: feed, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateFeed(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAssetServiceCreateFeedError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = gstatus.Error(errCode, "test error") - - var parent string = "parent-995424086" - var feedId string = "feedId-976011428" - var feed *assetpb.Feed = &assetpb.Feed{} - var request = &assetpb.CreateFeedRequest{ - Parent: parent, - FeedId: feedId, - Feed: feed, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateFeed(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAssetServiceGetFeed(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &assetpb.Feed{ - Name: name2, - } - - mockAsset.err = nil - mockAsset.reqs = nil - - mockAsset.resps = append(mockAsset.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/feeds/%s", "[PROJECT]", "[FEED]") - var request = &assetpb.GetFeedRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetFeed(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAssetServiceGetFeedError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/feeds/%s", "[PROJECT]", "[FEED]") - var request = &assetpb.GetFeedRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetFeed(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAssetServiceListFeeds(t *testing.T) { - var expectedResponse *assetpb.ListFeedsResponse = &assetpb.ListFeedsResponse{} - - mockAsset.err = nil - mockAsset.reqs = nil - - mockAsset.resps = append(mockAsset.resps[:0], expectedResponse) - - var parent string = "parent-995424086" - var request = &assetpb.ListFeedsRequest{ - Parent: parent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListFeeds(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAssetServiceListFeedsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = gstatus.Error(errCode, "test error") - - var parent string = "parent-995424086" - var request = &assetpb.ListFeedsRequest{ - Parent: parent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListFeeds(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAssetServiceUpdateFeed(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &assetpb.Feed{ - Name: name, - } - - mockAsset.err = nil - mockAsset.reqs = nil - - mockAsset.resps = append(mockAsset.resps[:0], expectedResponse) - - var feed *assetpb.Feed = &assetpb.Feed{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &assetpb.UpdateFeedRequest{ - Feed: feed, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateFeed(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAssetServiceUpdateFeedError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = gstatus.Error(errCode, "test error") - - var feed *assetpb.Feed = &assetpb.Feed{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &assetpb.UpdateFeedRequest{ - Feed: feed, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateFeed(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAssetServiceDeleteFeed(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAsset.err = nil - mockAsset.reqs = nil - - mockAsset.resps = append(mockAsset.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/feeds/%s", "[PROJECT]", "[FEED]") - var request = &assetpb.DeleteFeedRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteFeed(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAsset.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAssetServiceDeleteFeedError(t *testing.T) { - errCode := codes.PermissionDenied - mockAsset.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/feeds/%s", "[PROJECT]", "[FEED]") - var request = &assetpb.DeleteFeedRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteFeed(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} diff --git a/asset/apiv1p5beta1/asset_client.go b/asset/apiv1p5beta1/asset_client.go index ea104b3755f2..08d65d0c6797 100644 --- a/asset/apiv1p5beta1/asset_client.go +++ b/asset/apiv1p5beta1/asset_client.go @@ -25,6 +25,7 @@ import ( "net/url" "time" + assetpb "cloud.google.com/go/asset/apiv1p5beta1/assetpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" @@ -32,7 +33,6 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" httptransport "google.golang.org/api/transport/http" - assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -129,7 +129,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -200,7 +201,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -284,7 +286,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -368,11 +370,12 @@ func (c *restClient) ListAssets(ctx context.Context, req *assetpb.ListAssetsRequ if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } - if req.GetReadTime().GetNanos() != 0 { - params.Add("readTime.nanos", fmt.Sprintf("%v", req.GetReadTime().GetNanos())) - } - if req.GetReadTime().GetSeconds() != 0 { - params.Add("readTime.seconds", fmt.Sprintf("%v", req.GetReadTime().GetSeconds())) + if req.GetReadTime() != nil { + readTime, err := protojson.Marshal(req.GetReadTime()) + if err != nil { + return nil, "", err + } + params.Add("readTime", string(readTime)) } baseUrl.RawQuery = params.Encode() diff --git a/asset/apiv1p5beta1/asset_client_example_test.go b/asset/apiv1p5beta1/asset_client_example_test.go index b28c5fe9b8a0..19338047bdb2 100644 --- a/asset/apiv1p5beta1/asset_client_example_test.go +++ b/asset/apiv1p5beta1/asset_client_example_test.go @@ -20,12 +20,17 @@ import ( "context" asset "cloud.google.com/go/asset/apiv1p5beta1" + assetpb "cloud.google.com/go/asset/apiv1p5beta1/assetpb" "google.golang.org/api/iterator" - assetpb "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewRESTClient() { func ExampleClient_ListAssets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := asset.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,7 +73,7 @@ func ExampleClient_ListAssets() { req := &assetpb.ListAssetsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1#ListAssetsRequest. + // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p5beta1/assetpb#ListAssetsRequest. } it := c.ListAssets(ctx, req) for { diff --git a/asset/apiv1p5beta1/assetpb/asset_service.pb.go b/asset/apiv1p5beta1/assetpb/asset_service.pb.go new file mode 100644 index 000000000000..b200ca93959b --- /dev/null +++ b/asset/apiv1p5beta1/assetpb/asset_service.pb.go @@ -0,0 +1,536 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.2 +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package assetpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Asset content type. +type ContentType int32 + +const ( + // Unspecified content type. + ContentType_CONTENT_TYPE_UNSPECIFIED ContentType = 0 + // Resource metadata. + ContentType_RESOURCE ContentType = 1 + // The actual IAM policy set on a resource. + ContentType_IAM_POLICY ContentType = 2 + // The Cloud Organization Policy set on an asset. + ContentType_ORG_POLICY ContentType = 4 + // The Cloud Access context mananger Policy set on an asset. + ContentType_ACCESS_POLICY ContentType = 5 +) + +// Enum value maps for ContentType. +var ( + ContentType_name = map[int32]string{ + 0: "CONTENT_TYPE_UNSPECIFIED", + 1: "RESOURCE", + 2: "IAM_POLICY", + 4: "ORG_POLICY", + 5: "ACCESS_POLICY", + } + ContentType_value = map[string]int32{ + "CONTENT_TYPE_UNSPECIFIED": 0, + "RESOURCE": 1, + "IAM_POLICY": 2, + "ORG_POLICY": 4, + "ACCESS_POLICY": 5, + } +) + +func (x ContentType) Enum() *ContentType { + p := new(ContentType) + *p = x + return p +} + +func (x ContentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ContentType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_asset_v1p5beta1_asset_service_proto_enumTypes[0].Descriptor() +} + +func (ContentType) Type() protoreflect.EnumType { + return &file_google_cloud_asset_v1p5beta1_asset_service_proto_enumTypes[0] +} + +func (x ContentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ContentType.Descriptor instead. +func (ContentType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP(), []int{0} +} + +// ListAssets request. +type ListAssetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the organization or project the assets belong to. Format: + // "organizations/[organization-number]" (such as "organizations/123"), + // "projects/[project-number]" (such as "projects/my-project-id"), or + // "projects/[project-id]" (such as "projects/12345"). + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between 2018-10-02 UTC (inclusive) and the current time. If not specified, + // the current time will be used. Due to delays in resource data collection + // and indexing, there is a volatile window during which running the same + // query may get different results. + ReadTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"` + // A list of asset types of which to take a snapshot for. For example: + // "compute.googleapis.com/Disk". If specified, only matching assets will be + // returned. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // for all supported asset types. + AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"` + // Asset content type. If not specified, no content but the asset name will + // be returned. + ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1p5beta1.ContentType" json:"content_type,omitempty"` + // The maximum number of assets to be returned in a single response. Default + // is 100, minimum is 1, and maximum is 1000. + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The `next_page_token` returned from the previous `ListAssetsResponse`, or + // unspecified for the first `ListAssetsRequest`. It is a continuation of a + // prior `ListAssets` call, and the API should return the next page of assets. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAssetsRequest) Reset() { + *x = ListAssetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAssetsRequest) ProtoMessage() {} + +func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAssetsRequest.ProtoReflect.Descriptor instead. +func (*ListAssetsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ListAssetsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListAssetsRequest) GetReadTime() *timestamp.Timestamp { + if x != nil { + return x.ReadTime + } + return nil +} + +func (x *ListAssetsRequest) GetAssetTypes() []string { + if x != nil { + return x.AssetTypes + } + return nil +} + +func (x *ListAssetsRequest) GetContentType() ContentType { + if x != nil { + return x.ContentType + } + return ContentType_CONTENT_TYPE_UNSPECIFIED +} + +func (x *ListAssetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAssetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// ListAssets response. +type ListAssetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Time the snapshot was taken. + ReadTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"` + // Assets. + Assets []*Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty"` + // Token to retrieve the next page of results. Set to empty if there are no + // remaining results. + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAssetsResponse) Reset() { + *x = ListAssetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAssetsResponse) ProtoMessage() {} + +func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAssetsResponse.ProtoReflect.Descriptor instead. +func (*ListAssetsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListAssetsResponse) GetReadTime() *timestamp.Timestamp { + if x != nil { + return x.ReadTime + } + return nil +} + +func (x *ListAssetsResponse) GetAssets() []*Asset { + if x != nil { + return x.Assets + } + return nil +} + +func (x *ListAssetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_google_cloud_asset_v1p5beta1_asset_service_proto protoreflect.FileDescriptor + +var file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, + 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, + 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x2a, 0x6c, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, + 0x41, 0x4d, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, + 0x52, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x41, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x05, 0x32, 0xf7, + 0x01, 0x0a, 0x0c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x97, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x70, 0x35, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x2a, 0x2f, + 0x2a, 0x7d, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xb8, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x11, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x61, 0x73, 0x73, 0x65, 0x74, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x56, 0x31, 0x50, 0x35, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x70, 0x35, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescOnce sync.Once + file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData = file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDesc +) + +func file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescGZIP() []byte { + file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescOnce.Do(func() { + file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData) + }) + return file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDescData +} + +var file_google_cloud_asset_v1p5beta1_asset_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_asset_v1p5beta1_asset_service_proto_goTypes = []interface{}{ + (ContentType)(0), // 0: google.cloud.asset.v1p5beta1.ContentType + (*ListAssetsRequest)(nil), // 1: google.cloud.asset.v1p5beta1.ListAssetsRequest + (*ListAssetsResponse)(nil), // 2: google.cloud.asset.v1p5beta1.ListAssetsResponse + (*timestamp.Timestamp)(nil), // 3: google.protobuf.Timestamp + (*Asset)(nil), // 4: google.cloud.asset.v1p5beta1.Asset +} +var file_google_cloud_asset_v1p5beta1_asset_service_proto_depIdxs = []int32{ + 3, // 0: google.cloud.asset.v1p5beta1.ListAssetsRequest.read_time:type_name -> google.protobuf.Timestamp + 0, // 1: google.cloud.asset.v1p5beta1.ListAssetsRequest.content_type:type_name -> google.cloud.asset.v1p5beta1.ContentType + 3, // 2: google.cloud.asset.v1p5beta1.ListAssetsResponse.read_time:type_name -> google.protobuf.Timestamp + 4, // 3: google.cloud.asset.v1p5beta1.ListAssetsResponse.assets:type_name -> google.cloud.asset.v1p5beta1.Asset + 1, // 4: google.cloud.asset.v1p5beta1.AssetService.ListAssets:input_type -> google.cloud.asset.v1p5beta1.ListAssetsRequest + 2, // 5: google.cloud.asset.v1p5beta1.AssetService.ListAssets:output_type -> google.cloud.asset.v1p5beta1.ListAssetsResponse + 5, // [5:6] is the sub-list for method output_type + 4, // [4:5] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_asset_v1p5beta1_asset_service_proto_init() } +func file_google_cloud_asset_v1p5beta1_asset_service_proto_init() { + if File_google_cloud_asset_v1p5beta1_asset_service_proto != nil { + return + } + file_google_cloud_asset_v1p5beta1_assets_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAssetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAssetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_asset_v1p5beta1_asset_service_proto_goTypes, + DependencyIndexes: file_google_cloud_asset_v1p5beta1_asset_service_proto_depIdxs, + EnumInfos: file_google_cloud_asset_v1p5beta1_asset_service_proto_enumTypes, + MessageInfos: file_google_cloud_asset_v1p5beta1_asset_service_proto_msgTypes, + }.Build() + File_google_cloud_asset_v1p5beta1_asset_service_proto = out.File + file_google_cloud_asset_v1p5beta1_asset_service_proto_rawDesc = nil + file_google_cloud_asset_v1p5beta1_asset_service_proto_goTypes = nil + file_google_cloud_asset_v1p5beta1_asset_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AssetServiceClient is the client API for AssetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AssetServiceClient interface { + // Lists assets with time and resource types and returns paged results in + // response. + ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error) +} + +type assetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAssetServiceClient(cc grpc.ClientConnInterface) AssetServiceClient { + return &assetServiceClient{cc} +} + +func (c *assetServiceClient) ListAssets(ctx context.Context, in *ListAssetsRequest, opts ...grpc.CallOption) (*ListAssetsResponse, error) { + out := new(ListAssetsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.asset.v1p5beta1.AssetService/ListAssets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AssetServiceServer is the server API for AssetService service. +type AssetServiceServer interface { + // Lists assets with time and resource types and returns paged results in + // response. + ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error) +} + +// UnimplementedAssetServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAssetServiceServer struct { +} + +func (*UnimplementedAssetServiceServer) ListAssets(context.Context, *ListAssetsRequest) (*ListAssetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAssets not implemented") +} + +func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer) { + s.RegisterService(&_AssetService_serviceDesc, srv) +} + +func _AssetService_ListAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAssetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssetServiceServer).ListAssets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.asset.v1p5beta1.AssetService/ListAssets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssetServiceServer).ListAssets(ctx, req.(*ListAssetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AssetService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.asset.v1p5beta1.AssetService", + HandlerType: (*AssetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListAssets", + Handler: _AssetService_ListAssets_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/asset/v1p5beta1/asset_service.proto", +} diff --git a/asset/apiv1p5beta1/assetpb/assets.pb.go b/asset/apiv1p5beta1/assetpb/assets.pb.go new file mode 100644 index 000000000000..38b274724dec --- /dev/null +++ b/asset/apiv1p5beta1/assetpb/assets.pb.go @@ -0,0 +1,511 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.2 +// source: google/cloud/asset/v1p5beta1/assets.proto + +package assetpb + +import ( + reflect "reflect" + sync "sync" + + _struct "github.com/golang/protobuf/ptypes/struct" + _ "google.golang.org/genproto/googleapis/api/annotations" + v11 "google.golang.org/genproto/googleapis/cloud/orgpolicy/v1" + v1 "google.golang.org/genproto/googleapis/iam/v1" + v12 "google.golang.org/genproto/googleapis/identity/accesscontextmanager/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Cloud asset. This includes all Google Cloud Platform resources, +// Cloud IAM policies, and other non-GCP assets. +type Asset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The full name of the asset. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Type of the asset. Example: "compute.googleapis.com/Disk". + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + // Representation of the resource. + Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + // Representation of the actual Cloud IAM policy set on a cloud resource. For + // each resource, there must be at most one Cloud IAM policy set on it. + IamPolicy *v1.Policy `protobuf:"bytes,4,opt,name=iam_policy,json=iamPolicy,proto3" json:"iam_policy,omitempty"` + // Representation of the Cloud Organization Policy set on an asset. For each + // asset, there could be multiple Organization policies with different + // constraints. + OrgPolicy []*v11.Policy `protobuf:"bytes,6,rep,name=org_policy,json=orgPolicy,proto3" json:"org_policy,omitempty"` + // Representation of the Cloud Organization access policy. + // + // Types that are assignable to AccessContextPolicy: + // + // *Asset_AccessPolicy + // *Asset_AccessLevel + // *Asset_ServicePerimeter + AccessContextPolicy isAsset_AccessContextPolicy `protobuf_oneof:"access_context_policy"` + // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + // represented as a list of relative resource names. Ancestry path starts with + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. + // + // Example: ["projects/123456789", "folders/5432", "organizations/1234"] + Ancestors []string `protobuf:"bytes,10,rep,name=ancestors,proto3" json:"ancestors,omitempty"` +} + +func (x *Asset) Reset() { + *x = Asset{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Asset) ProtoMessage() {} + +func (x *Asset) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Asset.ProtoReflect.Descriptor instead. +func (*Asset) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p5beta1_assets_proto_rawDescGZIP(), []int{0} +} + +func (x *Asset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Asset) GetAssetType() string { + if x != nil { + return x.AssetType + } + return "" +} + +func (x *Asset) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Asset) GetIamPolicy() *v1.Policy { + if x != nil { + return x.IamPolicy + } + return nil +} + +func (x *Asset) GetOrgPolicy() []*v11.Policy { + if x != nil { + return x.OrgPolicy + } + return nil +} + +func (m *Asset) GetAccessContextPolicy() isAsset_AccessContextPolicy { + if m != nil { + return m.AccessContextPolicy + } + return nil +} + +func (x *Asset) GetAccessPolicy() *v12.AccessPolicy { + if x, ok := x.GetAccessContextPolicy().(*Asset_AccessPolicy); ok { + return x.AccessPolicy + } + return nil +} + +func (x *Asset) GetAccessLevel() *v12.AccessLevel { + if x, ok := x.GetAccessContextPolicy().(*Asset_AccessLevel); ok { + return x.AccessLevel + } + return nil +} + +func (x *Asset) GetServicePerimeter() *v12.ServicePerimeter { + if x, ok := x.GetAccessContextPolicy().(*Asset_ServicePerimeter); ok { + return x.ServicePerimeter + } + return nil +} + +func (x *Asset) GetAncestors() []string { + if x != nil { + return x.Ancestors + } + return nil +} + +type isAsset_AccessContextPolicy interface { + isAsset_AccessContextPolicy() +} + +type Asset_AccessPolicy struct { + AccessPolicy *v12.AccessPolicy `protobuf:"bytes,7,opt,name=access_policy,json=accessPolicy,proto3,oneof"` +} + +type Asset_AccessLevel struct { + AccessLevel *v12.AccessLevel `protobuf:"bytes,8,opt,name=access_level,json=accessLevel,proto3,oneof"` +} + +type Asset_ServicePerimeter struct { + ServicePerimeter *v12.ServicePerimeter `protobuf:"bytes,9,opt,name=service_perimeter,json=servicePerimeter,proto3,oneof"` +} + +func (*Asset_AccessPolicy) isAsset_AccessContextPolicy() {} + +func (*Asset_AccessLevel) isAsset_AccessContextPolicy() {} + +func (*Asset_ServicePerimeter) isAsset_AccessContextPolicy() {} + +// Representation of a cloud resource. +type Resource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The API version. Example: "v1". + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // The URL of the discovery document containing the resource's JSON schema. + // For example: + // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + // It will be left unspecified for resources without a discovery-based API, + // such as Cloud Bigtable. + DiscoveryDocumentUri string `protobuf:"bytes,2,opt,name=discovery_document_uri,json=discoveryDocumentUri,proto3" json:"discovery_document_uri,omitempty"` + // The JSON schema name listed in the discovery document. + // Example: "Project". It will be left unspecified for resources (such as + // Cloud Bigtable) without a discovery-based API. + DiscoveryName string `protobuf:"bytes,3,opt,name=discovery_name,json=discoveryName,proto3" json:"discovery_name,omitempty"` + // The REST URL for accessing the resource. An HTTP GET operation using this + // URL returns the resource itself. + // Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + // It will be left unspecified for resources without a REST API. + ResourceUrl string `protobuf:"bytes,4,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"` + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For GCP assets, it is the parent resource defined in the [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // For example: + // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + // + // For third-party assets, it is up to the users to define. + Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` + // The content of the resource, in which some sensitive fields are scrubbed + // away and may not be present. + Data *_struct.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Resource) Reset() { + *x = Resource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resource) ProtoMessage() {} + +func (x *Resource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Resource.ProtoReflect.Descriptor instead. +func (*Resource) Descriptor() ([]byte, []int) { + return file_google_cloud_asset_v1p5beta1_assets_proto_rawDescGZIP(), []int{1} +} + +func (x *Resource) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Resource) GetDiscoveryDocumentUri() string { + if x != nil { + return x.DiscoveryDocumentUri + } + return "" +} + +func (x *Resource) GetDiscoveryName() string { + if x != nil { + return x.DiscoveryName + } + return "" +} + +func (x *Resource) GetResourceUrl() string { + if x != nil { + return x.ResourceUrl + } + return "" +} + +func (x *Resource) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *Resource) GetData() *_struct.Struct { + if x != nil { + return x.Data + } + return nil +} + +var File_google_cloud_asset_v1p5beta1_assets_proto protoreflect.FileDescriptor + +var file_google_cloud_asset_v1p5beta1_assets_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x04, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x09, 0x69, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x6f, 0x72, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x72, + 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x09, 0x6f, 0x72, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5c, 0x0a, 0x0d, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x59, 0x0a, 0x0c, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x68, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x3a, 0x27, 0xea, + 0x41, 0x24, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x12, 0x01, 0x2a, 0x42, 0x17, 0x0a, 0x15, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, + 0xe9, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, 0x25, 0x0a, 0x0e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x2b, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0xb4, 0x01, 0x0a, 0x20, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0a, 0x41, 0x73, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x2f, 0x76, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x65, + 0x74, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x2e, 0x56, 0x31, 0x70, 0x35, 0x42, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x41, 0x73, 0x73, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x70, 0x35, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_asset_v1p5beta1_assets_proto_rawDescOnce sync.Once + file_google_cloud_asset_v1p5beta1_assets_proto_rawDescData = file_google_cloud_asset_v1p5beta1_assets_proto_rawDesc +) + +func file_google_cloud_asset_v1p5beta1_assets_proto_rawDescGZIP() []byte { + file_google_cloud_asset_v1p5beta1_assets_proto_rawDescOnce.Do(func() { + file_google_cloud_asset_v1p5beta1_assets_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_asset_v1p5beta1_assets_proto_rawDescData) + }) + return file_google_cloud_asset_v1p5beta1_assets_proto_rawDescData +} + +var file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_asset_v1p5beta1_assets_proto_goTypes = []interface{}{ + (*Asset)(nil), // 0: google.cloud.asset.v1p5beta1.Asset + (*Resource)(nil), // 1: google.cloud.asset.v1p5beta1.Resource + (*v1.Policy)(nil), // 2: google.iam.v1.Policy + (*v11.Policy)(nil), // 3: google.cloud.orgpolicy.v1.Policy + (*v12.AccessPolicy)(nil), // 4: google.identity.accesscontextmanager.v1.AccessPolicy + (*v12.AccessLevel)(nil), // 5: google.identity.accesscontextmanager.v1.AccessLevel + (*v12.ServicePerimeter)(nil), // 6: google.identity.accesscontextmanager.v1.ServicePerimeter + (*_struct.Struct)(nil), // 7: google.protobuf.Struct +} +var file_google_cloud_asset_v1p5beta1_assets_proto_depIdxs = []int32{ + 1, // 0: google.cloud.asset.v1p5beta1.Asset.resource:type_name -> google.cloud.asset.v1p5beta1.Resource + 2, // 1: google.cloud.asset.v1p5beta1.Asset.iam_policy:type_name -> google.iam.v1.Policy + 3, // 2: google.cloud.asset.v1p5beta1.Asset.org_policy:type_name -> google.cloud.orgpolicy.v1.Policy + 4, // 3: google.cloud.asset.v1p5beta1.Asset.access_policy:type_name -> google.identity.accesscontextmanager.v1.AccessPolicy + 5, // 4: google.cloud.asset.v1p5beta1.Asset.access_level:type_name -> google.identity.accesscontextmanager.v1.AccessLevel + 6, // 5: google.cloud.asset.v1p5beta1.Asset.service_perimeter:type_name -> google.identity.accesscontextmanager.v1.ServicePerimeter + 7, // 6: google.cloud.asset.v1p5beta1.Resource.data:type_name -> google.protobuf.Struct + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_asset_v1p5beta1_assets_proto_init() } +func file_google_cloud_asset_v1p5beta1_assets_proto_init() { + if File_google_cloud_asset_v1p5beta1_assets_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Asset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Asset_AccessPolicy)(nil), + (*Asset_AccessLevel)(nil), + (*Asset_ServicePerimeter)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_asset_v1p5beta1_assets_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_asset_v1p5beta1_assets_proto_goTypes, + DependencyIndexes: file_google_cloud_asset_v1p5beta1_assets_proto_depIdxs, + MessageInfos: file_google_cloud_asset_v1p5beta1_assets_proto_msgTypes, + }.Build() + File_google_cloud_asset_v1p5beta1_assets_proto = out.File + file_google_cloud_asset_v1p5beta1_assets_proto_rawDesc = nil + file_google_cloud_asset_v1p5beta1_assets_proto_goTypes = nil + file_google_cloud_asset_v1p5beta1_assets_proto_depIdxs = nil +} diff --git a/asset/apiv1p5beta1/doc.go b/asset/apiv1p5beta1/doc.go index 0ae7b8b98b0b..22684796e80c 100644 --- a/asset/apiv1p5beta1/doc.go +++ b/asset/apiv1p5beta1/doc.go @@ -19,51 +19,62 @@ // // The cloud asset API manages the history and inventory of cloud resources. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := asset.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := asset.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := asset.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &assetpb.ListAssetsRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1#ListAssetsRequest. -// } -// it := c.ListAssets(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := asset.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &assetpb.ListAssetsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/asset/apiv1p5beta1/assetpb#ListAssetsRequest. +// } +// it := c.ListAssets(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/asset/go.mod b/asset/go.mod index 6194d63d40ca..ca6ba30a2e6b 100644 --- a/asset/go.mod +++ b/asset/go.mod @@ -1,13 +1,26 @@ module cloud.google.com/go/asset -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/asset/go.sum b/asset/go.sum index f00d995cec43..9197a83fecf4 100644 --- a/asset/go.sum +++ b/asset/go.sum @@ -30,6 +30,7 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -162,6 +163,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +292,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +313,11 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +388,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +502,9 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +591,11 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0 h1:bMz0aY2wd9TwUp9M7QfjBWuQqaFD/ZaTtvDpPDCo2Ow= +google.golang.org/genproto v0.0.0-20220908141613-51c1cc9bc6d0/go.mod h1:rQWNQYp1kbHR3+n5cARSTCF5rlJOttUn8yIhRklGAWQ= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +626,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +643,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/asset/internal/version.go b/asset/internal/version.go index bb0feadfd279..05d3396f1001 100644 --- a/asset/internal/version.go +++ b/asset/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.3.0" +const Version = "1.6.0" diff --git a/assuredworkloads/CHANGES.md b/assuredworkloads/CHANGES.md index 16b66a5a0725..9e157975b940 100644 --- a/assuredworkloads/CHANGES.md +++ b/assuredworkloads/CHANGES.md @@ -1,6 +1,42 @@ # Changes +## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/assuredworkloads/v1.4.0...assuredworkloads/v1.5.0) (2022-09-19) + + +### Features + +* **assuredworkloads:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/assuredworkloads/v1.3.0...assuredworkloads/v1.4.0) (2022-09-15) + + +### Features + +* **assuredworkloads:** Add compliant_but_disallowed_services field to the v1beta1 Workload proto ([6a0080a](https://github.com/googleapis/google-cloud-go/commit/6a0080ad69398c572d856886293e19c79cf0fc0e)) + +## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/assuredworkloads/v1.2.0...assuredworkloads/v1.3.0) (2022-09-06) + + +### Features + +* **assuredworkloads:** Updated v1beta1 analyzeWorkloadMove documentation ([3bc37e2](https://github.com/googleapis/google-cloud-go/commit/3bc37e28626df5f7ec37b00c0c2f0bfb91c30495)) + +## [1.2.0](https://github.com/googleapis/google-cloud-go/compare/assuredworkloads/v1.1.0...assuredworkloads/v1.2.0) (2022-07-19) + + +### Features + +* **assuredworkloads:** Updated the method signature of analyzeWorkloadMove for v1beta API ([53246aa](https://github.com/googleapis/google-cloud-go/commit/53246aa18cb9c79471ecc84878b5e3f166086404)) +* **assuredworkloads:** Updated the method signature of analyzeWorkloadMove for v1beta API to accept project as source. AnalyzeWorkloadMove now also returns information about org policy differences between the project and target folder ([53246aa](https://github.com/googleapis/google-cloud-go/commit/53246aa18cb9c79471ecc84878b5e3f166086404)) + +## [1.1.0](https://github.com/googleapis/google-cloud-go/compare/assuredworkloads/v1.0.0...assuredworkloads/v1.1.0) (2022-07-12) + + +### Features + +* **assuredworkloads:** ITAR June Preview Launch ([963efe2](https://github.com/googleapis/google-cloud-go/commit/963efe22cf67bc04fed09b5fa8f9cb20b9edf1a3)) + ## [1.0.0](https://github.com/googleapis/google-cloud-go/compare/assuredworkloads/v0.6.0...assuredworkloads/v1.0.0) (2022-06-29) diff --git a/assuredworkloads/apiv1/assured_workloads_client.go b/assuredworkloads/apiv1/assured_workloads_client.go index 1ab476c5d9fc..3d8948331929 100644 --- a/assuredworkloads/apiv1/assured_workloads_client.go +++ b/assuredworkloads/apiv1/assured_workloads_client.go @@ -117,7 +117,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -234,7 +235,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/assuredworkloads/apiv1/assured_workloads_client_example_test.go b/assuredworkloads/apiv1/assured_workloads_client_example_test.go index acc14a42a75e..6a4ede2194f3 100644 --- a/assuredworkloads/apiv1/assured_workloads_client_example_test.go +++ b/assuredworkloads/apiv1/assured_workloads_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_CreateWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +73,11 @@ func ExampleClient_CreateWorkload() { func ExampleClient_UpdateWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +98,11 @@ func ExampleClient_UpdateWorkload() { func ExampleClient_DeleteWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleClient_DeleteWorkload() { func ExampleClient_GetWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -121,6 +146,11 @@ func ExampleClient_GetWorkload() { func ExampleClient_ListWorkloads() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/assuredworkloads/apiv1/doc.go b/assuredworkloads/apiv1/doc.go index 7f5e1ad9fe74..56331c88e27f 100644 --- a/assuredworkloads/apiv1/doc.go +++ b/assuredworkloads/apiv1/doc.go @@ -17,48 +17,59 @@ // Package assuredworkloads is an auto-generated package for the // Assured Workloads API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := assuredworkloads.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := assuredworkloads.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := assuredworkloads.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &assuredworkloadspb.CreateWorkloadRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1#CreateWorkloadRequest. -// } -// op, err := c.CreateWorkload(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := assuredworkloads.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &assuredworkloadspb.CreateWorkloadRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1#CreateWorkloadRequest. +// } +// op, err := c.CreateWorkload(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/assuredworkloads/apiv1beta1/assured_workloads_client.go b/assuredworkloads/apiv1beta1/assured_workloads_client.go index 2ebf6c9c18d1..be763117b6e2 100644 --- a/assuredworkloads/apiv1beta1/assured_workloads_client.go +++ b/assuredworkloads/apiv1beta1/assured_workloads_client.go @@ -48,11 +48,15 @@ var newClientHook clientHook // CallOptions contains the retry settings for each method of Client. type CallOptions struct { - CreateWorkload []gax.CallOption - UpdateWorkload []gax.CallOption - DeleteWorkload []gax.CallOption - GetWorkload []gax.CallOption - ListWorkloads []gax.CallOption + CreateWorkload []gax.CallOption + UpdateWorkload []gax.CallOption + RestrictAllowedResources []gax.CallOption + DeleteWorkload []gax.CallOption + GetWorkload []gax.CallOption + AnalyzeWorkloadMove []gax.CallOption + ListWorkloads []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -69,8 +73,9 @@ func defaultGRPCClientOptions() []option.ClientOption { func defaultCallOptions() *CallOptions { return &CallOptions{ - CreateWorkload: []gax.CallOption{}, - UpdateWorkload: []gax.CallOption{}, + CreateWorkload: []gax.CallOption{}, + UpdateWorkload: []gax.CallOption{}, + RestrictAllowedResources: []gax.CallOption{}, DeleteWorkload: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ @@ -93,6 +98,17 @@ func defaultCallOptions() *CallOptions { }) }), }, + AnalyzeWorkloadMove: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, ListWorkloads: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ @@ -104,13 +120,36 @@ func defaultCallOptions() *CallOptions { }) }), }, + GetOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListOperations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, } } func defaultRESTCallOptions() *CallOptions { return &CallOptions{ - CreateWorkload: []gax.CallOption{}, - UpdateWorkload: []gax.CallOption{}, + CreateWorkload: []gax.CallOption{}, + UpdateWorkload: []gax.CallOption{}, + RestrictAllowedResources: []gax.CallOption{}, DeleteWorkload: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnHTTPCodes(gax.Backoff{ @@ -131,6 +170,16 @@ func defaultRESTCallOptions() *CallOptions { http.StatusServiceUnavailable) }), }, + AnalyzeWorkloadMove: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, ListWorkloads: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnHTTPCodes(gax.Backoff{ @@ -141,6 +190,26 @@ func defaultRESTCallOptions() *CallOptions { http.StatusServiceUnavailable) }), }, + GetOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListOperations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, } } @@ -152,9 +221,13 @@ type internalClient interface { CreateWorkload(context.Context, *assuredworkloadspb.CreateWorkloadRequest, ...gax.CallOption) (*CreateWorkloadOperation, error) CreateWorkloadOperation(name string) *CreateWorkloadOperation UpdateWorkload(context.Context, *assuredworkloadspb.UpdateWorkloadRequest, ...gax.CallOption) (*assuredworkloadspb.Workload, error) + RestrictAllowedResources(context.Context, *assuredworkloadspb.RestrictAllowedResourcesRequest, ...gax.CallOption) (*assuredworkloadspb.RestrictAllowedResourcesResponse, error) DeleteWorkload(context.Context, *assuredworkloadspb.DeleteWorkloadRequest, ...gax.CallOption) error GetWorkload(context.Context, *assuredworkloadspb.GetWorkloadRequest, ...gax.CallOption) (*assuredworkloadspb.Workload, error) + AnalyzeWorkloadMove(context.Context, *assuredworkloadspb.AnalyzeWorkloadMoveRequest, ...gax.CallOption) (*assuredworkloadspb.AnalyzeWorkloadMoveResponse, error) ListWorkloads(context.Context, *assuredworkloadspb.ListWorkloadsRequest, ...gax.CallOption) *WorkloadIterator + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // Client is a client for interacting with Assured Workloads API. @@ -191,7 +264,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -215,9 +289,22 @@ func (c *Client) UpdateWorkload(ctx context.Context, req *assuredworkloadspb.Upd return c.internalClient.UpdateWorkload(ctx, req, opts...) } +// RestrictAllowedResources restrict the list of resources allowed in the Workload environment. +// The current list of allowed products can be found at +// https://cloud.google.com/assured-workloads/docs/supported-products (at https://cloud.google.com/assured-workloads/docs/supported-products) +// In addition to assuredworkloads.workload.update permission, the user should +// also have orgpolicy.policy.set permission on the folder resource +// to use this functionality. +func (c *Client) RestrictAllowedResources(ctx context.Context, req *assuredworkloadspb.RestrictAllowedResourcesRequest, opts ...gax.CallOption) (*assuredworkloadspb.RestrictAllowedResourcesResponse, error) { + return c.internalClient.RestrictAllowedResources(ctx, req, opts...) +} + // DeleteWorkload deletes the workload. Make sure that workload’s direct children are already // in a deleted state, otherwise the request will fail with a // FAILED_PRECONDITION error. +// In addition to assuredworkloads.workload.delete permission, the user should +// also have orgpolicy.policy.set permission on the deleted folder to remove +// Assured Workloads OrgPolicies. func (c *Client) DeleteWorkload(ctx context.Context, req *assuredworkloadspb.DeleteWorkloadRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteWorkload(ctx, req, opts...) } @@ -227,11 +314,27 @@ func (c *Client) GetWorkload(ctx context.Context, req *assuredworkloadspb.GetWor return c.internalClient.GetWorkload(ctx, req, opts...) } +// AnalyzeWorkloadMove analyze if the source Assured Workloads can be moved to the target Assured +// Workload +func (c *Client) AnalyzeWorkloadMove(ctx context.Context, req *assuredworkloadspb.AnalyzeWorkloadMoveRequest, opts ...gax.CallOption) (*assuredworkloadspb.AnalyzeWorkloadMoveResponse, error) { + return c.internalClient.AnalyzeWorkloadMove(ctx, req, opts...) +} + // ListWorkloads lists Assured Workloads under a CRM Node. func (c *Client) ListWorkloads(ctx context.Context, req *assuredworkloadspb.ListWorkloadsRequest, opts ...gax.CallOption) *WorkloadIterator { return c.internalClient.ListWorkloads(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Assured Workloads API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -253,6 +356,8 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -287,6 +392,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: assuredworkloadspb.NewAssuredWorkloadsServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -308,7 +414,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -407,7 +514,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -441,9 +548,7 @@ func (c *gRPCClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb defer cancel() ctx = cctx } - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workload.name", url.QueryEscape(req.GetWorkload().GetName()))) - - ctx = insertMetadata(ctx, c.xGoogMetadata, md) + ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append((*c.CallOptions).UpdateWorkload[0:len((*c.CallOptions).UpdateWorkload):len((*c.CallOptions).UpdateWorkload)], opts...) var resp *assuredworkloadspb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -457,6 +562,23 @@ func (c *gRPCClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb return resp, nil } +func (c *gRPCClient) RestrictAllowedResources(ctx context.Context, req *assuredworkloadspb.RestrictAllowedResourcesRequest, opts ...gax.CallOption) (*assuredworkloadspb.RestrictAllowedResourcesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RestrictAllowedResources[0:len((*c.CallOptions).RestrictAllowedResources):len((*c.CallOptions).RestrictAllowedResources)], opts...) + var resp *assuredworkloadspb.RestrictAllowedResourcesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.RestrictAllowedResources(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *gRPCClient) DeleteWorkload(ctx context.Context, req *assuredworkloadspb.DeleteWorkloadRequest, opts ...gax.CallOption) error { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) @@ -481,9 +603,7 @@ func (c *gRPCClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge defer cancel() ctx = cctx } - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) - - ctx = insertMetadata(ctx, c.xGoogMetadata, md) + ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append((*c.CallOptions).GetWorkload[0:len((*c.CallOptions).GetWorkload):len((*c.CallOptions).GetWorkload)], opts...) var resp *assuredworkloadspb.Workload err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { @@ -497,10 +617,28 @@ func (c *gRPCClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge return resp, nil } -func (c *gRPCClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb.ListWorkloadsRequest, opts ...gax.CallOption) *WorkloadIterator { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) +func (c *gRPCClient) AnalyzeWorkloadMove(ctx context.Context, req *assuredworkloadspb.AnalyzeWorkloadMoveRequest, opts ...gax.CallOption) (*assuredworkloadspb.AnalyzeWorkloadMoveResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).AnalyzeWorkloadMove[0:len((*c.CallOptions).AnalyzeWorkloadMove):len((*c.CallOptions).AnalyzeWorkloadMove)], opts...) + var resp *assuredworkloadspb.AnalyzeWorkloadMoveResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.AnalyzeWorkloadMove(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} - ctx = insertMetadata(ctx, c.xGoogMetadata, md) +func (c *gRPCClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb.ListWorkloadsRequest, opts ...gax.CallOption) *WorkloadIterator { + ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append((*c.CallOptions).ListWorkloads[0:len((*c.CallOptions).ListWorkloads):len((*c.CallOptions).ListWorkloads)], opts...) it := &WorkloadIterator{} req = proto.Clone(req).(*assuredworkloadspb.ListWorkloadsRequest) @@ -542,6 +680,73 @@ func (c *gRPCClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. return it } +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateWorkload creates Assured Workload. func (c *restClient) CreateWorkload(ctx context.Context, req *assuredworkloadspb.CreateWorkloadRequest, opts ...gax.CallOption) (*CreateWorkloadOperation, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} @@ -618,30 +823,131 @@ func (c *restClient) CreateWorkload(ctx context.Context, req *assuredworkloadspb // For force updates don’t set etag field in the Workload. // Only one update operation per workload can be in progress. func (c *restClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb.UpdateWorkloadRequest, opts ...gax.CallOption) (*assuredworkloadspb.Workload, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - body := req.GetWorkload() - jsonReq, err := m.Marshal(body) - if err != nil { - return nil, err - } - baseUrl, err := url.Parse(c.endpoint) if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetWorkload().GetName()) + baseUrl.Path += fmt.Sprintf("") params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + if req.GetWorkload().GetBillingAccount() != "" { + params.Add("workload.billingAccount", fmt.Sprintf("%v", req.GetWorkload().GetBillingAccount())) + } + if req.GetWorkload().GetCjisSettings().GetKmsSettings().GetNextRotationTime() != nil { + nextRotationTime, err := protojson.Marshal(req.GetWorkload().GetCjisSettings().GetKmsSettings().GetNextRotationTime()) + if err != nil { + return nil, err + } + params.Add("workload.cjisSettings.kmsSettings.nextRotationTime", string(nextRotationTime)) + } + if req.GetWorkload().GetCjisSettings().GetKmsSettings().GetRotationPeriod() != nil { + rotationPeriod, err := protojson.Marshal(req.GetWorkload().GetCjisSettings().GetKmsSettings().GetRotationPeriod()) + if err != nil { + return nil, err + } + params.Add("workload.cjisSettings.kmsSettings.rotationPeriod", string(rotationPeriod)) + } + params.Add("workload.complianceRegime", fmt.Sprintf("%v", req.GetWorkload().GetComplianceRegime())) + if req.GetWorkload().GetCompliantButDisallowedServices() != nil { + params.Add("workload.compliantButDisallowedServices", fmt.Sprintf("%v", req.GetWorkload().GetCompliantButDisallowedServices())) + } + if req.GetWorkload().GetCreateTime() != nil { + createTime, err := protojson.Marshal(req.GetWorkload().GetCreateTime()) + if err != nil { + return nil, err + } + params.Add("workload.createTime", string(createTime)) + } + params.Add("workload.displayName", fmt.Sprintf("%v", req.GetWorkload().GetDisplayName())) + if req.GetWorkload().GetEnableSovereignControls() { + params.Add("workload.enableSovereignControls", fmt.Sprintf("%v", req.GetWorkload().GetEnableSovereignControls())) + } + if req.GetWorkload().GetEtag() != "" { + params.Add("workload.etag", fmt.Sprintf("%v", req.GetWorkload().GetEtag())) + } + if req.GetWorkload().GetFedrampHighSettings().GetKmsSettings().GetNextRotationTime() != nil { + nextRotationTime, err := protojson.Marshal(req.GetWorkload().GetFedrampHighSettings().GetKmsSettings().GetNextRotationTime()) + if err != nil { + return nil, err + } + params.Add("workload.fedrampHighSettings.kmsSettings.nextRotationTime", string(nextRotationTime)) + } + if req.GetWorkload().GetFedrampHighSettings().GetKmsSettings().GetRotationPeriod() != nil { + rotationPeriod, err := protojson.Marshal(req.GetWorkload().GetFedrampHighSettings().GetKmsSettings().GetRotationPeriod()) + if err != nil { + return nil, err + } + params.Add("workload.fedrampHighSettings.kmsSettings.rotationPeriod", string(rotationPeriod)) + } + if req.GetWorkload().GetFedrampModerateSettings().GetKmsSettings().GetNextRotationTime() != nil { + nextRotationTime, err := protojson.Marshal(req.GetWorkload().GetFedrampModerateSettings().GetKmsSettings().GetNextRotationTime()) + if err != nil { + return nil, err + } + params.Add("workload.fedrampModerateSettings.kmsSettings.nextRotationTime", string(nextRotationTime)) + } + if req.GetWorkload().GetFedrampModerateSettings().GetKmsSettings().GetRotationPeriod() != nil { + rotationPeriod, err := protojson.Marshal(req.GetWorkload().GetFedrampModerateSettings().GetKmsSettings().GetRotationPeriod()) + if err != nil { + return nil, err + } + params.Add("workload.fedrampModerateSettings.kmsSettings.rotationPeriod", string(rotationPeriod)) + } + if req.GetWorkload().GetIl4Settings().GetKmsSettings().GetNextRotationTime() != nil { + nextRotationTime, err := protojson.Marshal(req.GetWorkload().GetIl4Settings().GetKmsSettings().GetNextRotationTime()) + if err != nil { + return nil, err + } + params.Add("workload.il4Settings.kmsSettings.nextRotationTime", string(nextRotationTime)) + } + if req.GetWorkload().GetIl4Settings().GetKmsSettings().GetRotationPeriod() != nil { + rotationPeriod, err := protojson.Marshal(req.GetWorkload().GetIl4Settings().GetKmsSettings().GetRotationPeriod()) + if err != nil { + return nil, err + } + params.Add("workload.il4Settings.kmsSettings.rotationPeriod", string(rotationPeriod)) + } + if req.GetWorkload().GetKajEnrollmentState() != 0 { + params.Add("workload.kajEnrollmentState", fmt.Sprintf("%v", req.GetWorkload().GetKajEnrollmentState())) + } + if req.GetWorkload().GetKmsSettings().GetNextRotationTime() != nil { + nextRotationTime, err := protojson.Marshal(req.GetWorkload().GetKmsSettings().GetNextRotationTime()) + if err != nil { + return nil, err + } + params.Add("workload.kmsSettings.nextRotationTime", string(nextRotationTime)) + } + if req.GetWorkload().GetKmsSettings().GetRotationPeriod() != nil { + rotationPeriod, err := protojson.Marshal(req.GetWorkload().GetKmsSettings().GetRotationPeriod()) + if err != nil { + return nil, err + } + params.Add("workload.kmsSettings.rotationPeriod", string(rotationPeriod)) + } + if req.GetWorkload().GetName() != "" { + params.Add("workload.name", fmt.Sprintf("%v", req.GetWorkload().GetName())) + } + if req.GetWorkload().GetProvisionedResourcesParent() != "" { + params.Add("workload.provisionedResourcesParent", fmt.Sprintf("%v", req.GetWorkload().GetProvisionedResourcesParent())) + } + if req.GetWorkload().GetSaaEnrollmentResponse().GetSetupErrors() != nil { + params.Add("workload.saaEnrollmentResponse.setupErrors", fmt.Sprintf("%v", req.GetWorkload().GetSaaEnrollmentResponse().GetSetupErrors())) + } + if req.GetWorkload().GetSaaEnrollmentResponse() != nil && req.GetWorkload().GetSaaEnrollmentResponse().SetupStatus != nil { + params.Add("workload.saaEnrollmentResponse.setupStatus", fmt.Sprintf("%v", req.GetWorkload().GetSaaEnrollmentResponse().GetSetupStatus())) } baseUrl.RawQuery = params.Encode() // Build HTTP headers from client and context metadata. - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workload.name", url.QueryEscape(req.GetWorkload().GetName()))) - - headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) opts = append((*c.CallOptions).UpdateWorkload[0:len((*c.CallOptions).UpdateWorkload):len((*c.CallOptions).UpdateWorkload)], opts...) unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} resp := &assuredworkloadspb.Workload{} @@ -649,7 +955,71 @@ func (c *restClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb if settings.Path != "" { baseUrl.Path = settings.Path } - httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + httpReq, err := http.NewRequest("", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RestrictAllowedResources restrict the list of resources allowed in the Workload environment. +// The current list of allowed products can be found at +// https://cloud.google.com/assured-workloads/docs/supported-products (at https://cloud.google.com/assured-workloads/docs/supported-products) +// In addition to assuredworkloads.workload.update permission, the user should +// also have orgpolicy.policy.set permission on the folder resource +// to use this functionality. +func (c *restClient) RestrictAllowedResources(ctx context.Context, req *assuredworkloadspb.RestrictAllowedResourcesRequest, opts ...gax.CallOption) (*assuredworkloadspb.RestrictAllowedResourcesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:restrictAllowedResources", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).RestrictAllowedResources[0:len((*c.CallOptions).RestrictAllowedResources):len((*c.CallOptions).RestrictAllowedResources)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &assuredworkloadspb.RestrictAllowedResourcesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) if err != nil { return err } @@ -686,6 +1056,9 @@ func (c *restClient) UpdateWorkload(ctx context.Context, req *assuredworkloadspb // DeleteWorkload deletes the workload. Make sure that workload’s direct children are already // in a deleted state, otherwise the request will fail with a // FAILED_PRECONDITION error. +// In addition to assuredworkloads.workload.delete permission, the user should +// also have orgpolicy.policy.set permission on the deleted folder to remove +// Assured Workloads OrgPolicies. func (c *restClient) DeleteWorkload(ctx context.Context, req *assuredworkloadspb.DeleteWorkloadRequest, opts ...gax.CallOption) error { baseUrl, err := url.Parse(c.endpoint) if err != nil { @@ -733,12 +1106,15 @@ func (c *restClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + baseUrl.Path += fmt.Sprintf("") - // Build HTTP headers from client and context metadata. - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + params := url.Values{} + params.Add("name", fmt.Sprintf("%v", req.GetName())) - headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) opts = append((*c.CallOptions).GetWorkload[0:len((*c.CallOptions).GetWorkload):len((*c.CallOptions).GetWorkload)], opts...) unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} resp := &assuredworkloadspb.Workload{} @@ -746,7 +1122,70 @@ func (c *restClient) GetWorkload(ctx context.Context, req *assuredworkloadspb.Ge if settings.Path != "" { baseUrl.Path = settings.Path } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + httpReq, err := http.NewRequest("", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// AnalyzeWorkloadMove analyze if the source Assured Workloads can be moved to the target Assured +// Workload +func (c *restClient) AnalyzeWorkloadMove(ctx context.Context, req *assuredworkloadspb.AnalyzeWorkloadMoveRequest, opts ...gax.CallOption) (*assuredworkloadspb.AnalyzeWorkloadMoveResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("") + + params := url.Values{} + if req.GetProject() != "" { + params.Add("project", fmt.Sprintf("%v", req.GetProject())) + } + if req.GetSource() != "" { + params.Add("source", fmt.Sprintf("%v", req.GetSource())) + } + params.Add("target", fmt.Sprintf("%v", req.GetTarget())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).AnalyzeWorkloadMove[0:len((*c.CallOptions).AnalyzeWorkloadMove):len((*c.CallOptions).AnalyzeWorkloadMove)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &assuredworkloadspb.AnalyzeWorkloadMoveResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("", baseUrl.String(), nil) if err != nil { return err } @@ -799,7 +1238,7 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. if err != nil { return nil, "", err } - baseUrl.Path += fmt.Sprintf("/v1beta1/%v/workloads", req.GetParent()) + baseUrl.Path += fmt.Sprintf("") params := url.Values{} if req.GetFilter() != "" { @@ -811,6 +1250,7 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } + params.Add("parent", fmt.Sprintf("%v", req.GetParent())) baseUrl.RawQuery = params.Encode() @@ -820,7 +1260,7 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. if settings.Path != "" { baseUrl.Path = settings.Path } - httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + httpReq, err := http.NewRequest("", baseUrl.String(), nil) if err != nil { return err } @@ -870,6 +1310,149 @@ func (c *restClient) ListWorkloads(ctx context.Context, req *assuredworkloadspb. return it } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateWorkloadOperation manages a long-running operation from CreateWorkload. type CreateWorkloadOperation struct { lro *longrunning.Operation @@ -952,6 +1535,53 @@ func (op *CreateWorkloadOperation) Name() string { return op.lro.Name() } +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // WorkloadIterator manages a stream of *assuredworkloadspb.Workload. type WorkloadIterator struct { items []*assuredworkloadspb.Workload diff --git a/assuredworkloads/apiv1beta1/assured_workloads_client_example_test.go b/assuredworkloads/apiv1beta1/assured_workloads_client_example_test.go index 6ace5c594f94..f5068c3f7fd1 100644 --- a/assuredworkloads/apiv1beta1/assured_workloads_client_example_test.go +++ b/assuredworkloads/apiv1beta1/assured_workloads_client_example_test.go @@ -22,10 +22,16 @@ import ( assuredworkloads "cloud.google.com/go/assuredworkloads/apiv1beta1" "google.golang.org/api/iterator" assuredworkloadspb "google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +44,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +61,11 @@ func ExampleNewRESTClient() { func ExampleClient_CreateWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -75,6 +91,11 @@ func ExampleClient_CreateWorkload() { func ExampleClient_UpdateWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -93,8 +114,38 @@ func ExampleClient_UpdateWorkload() { _ = resp } +func ExampleClient_RestrictAllowedResources() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := assuredworkloads.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &assuredworkloadspb.RestrictAllowedResourcesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1beta1#RestrictAllowedResourcesRequest. + } + resp, err := c.RestrictAllowedResources(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_DeleteWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -113,6 +164,11 @@ func ExampleClient_DeleteWorkload() { func ExampleClient_GetWorkload() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -131,8 +187,38 @@ func ExampleClient_GetWorkload() { _ = resp } +func ExampleClient_AnalyzeWorkloadMove() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := assuredworkloads.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &assuredworkloadspb.AnalyzeWorkloadMoveRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1beta1#AnalyzeWorkloadMoveRequest. + } + resp, err := c.AnalyzeWorkloadMove(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_ListWorkloads() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := assuredworkloads.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -156,3 +242,59 @@ func ExampleClient_ListWorkloads() { _ = resp } } + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := assuredworkloads.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := assuredworkloads.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go new file mode 100644 index 000000000000..40737b726b9c --- /dev/null +++ b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads.pb.go @@ -0,0 +1,2696 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/assuredworkloads/v1beta1/assuredworkloads.proto + +package assuredworkloadspb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The type of restriction. +type RestrictAllowedResourcesRequest_RestrictionType int32 + +const ( + // Unknown restriction type. + RestrictAllowedResourcesRequest_RESTRICTION_TYPE_UNSPECIFIED RestrictAllowedResourcesRequest_RestrictionType = 0 + // Allow the use all of all gcp products, irrespective of the compliance + // posture. This effectively removes gcp.restrictServiceUsage OrgPolicy + // on the AssuredWorkloads Folder. + RestrictAllowedResourcesRequest_ALLOW_ALL_GCP_RESOURCES RestrictAllowedResourcesRequest_RestrictionType = 1 + // Based on Workload's compliance regime, allowed list changes. + // See - https://cloud.google.com/assured-workloads/docs/supported-products + // for the list of supported resources. + RestrictAllowedResourcesRequest_ALLOW_COMPLIANT_RESOURCES RestrictAllowedResourcesRequest_RestrictionType = 2 +) + +// Enum value maps for RestrictAllowedResourcesRequest_RestrictionType. +var ( + RestrictAllowedResourcesRequest_RestrictionType_name = map[int32]string{ + 0: "RESTRICTION_TYPE_UNSPECIFIED", + 1: "ALLOW_ALL_GCP_RESOURCES", + 2: "ALLOW_COMPLIANT_RESOURCES", + } + RestrictAllowedResourcesRequest_RestrictionType_value = map[string]int32{ + "RESTRICTION_TYPE_UNSPECIFIED": 0, + "ALLOW_ALL_GCP_RESOURCES": 1, + "ALLOW_COMPLIANT_RESOURCES": 2, + } +) + +func (x RestrictAllowedResourcesRequest_RestrictionType) Enum() *RestrictAllowedResourcesRequest_RestrictionType { + p := new(RestrictAllowedResourcesRequest_RestrictionType) + *p = x + return p +} + +func (x RestrictAllowedResourcesRequest_RestrictionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RestrictAllowedResourcesRequest_RestrictionType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[0].Descriptor() +} + +func (RestrictAllowedResourcesRequest_RestrictionType) Type() protoreflect.EnumType { + return &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[0] +} + +func (x RestrictAllowedResourcesRequest_RestrictionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RestrictAllowedResourcesRequest_RestrictionType.Descriptor instead. +func (RestrictAllowedResourcesRequest_RestrictionType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{2, 0} +} + +// Supported Compliance Regimes. +type Workload_ComplianceRegime int32 + +const ( + // Unknown compliance regime. + Workload_COMPLIANCE_REGIME_UNSPECIFIED Workload_ComplianceRegime = 0 + // Information protection as per DoD IL4 requirements. + Workload_IL4 Workload_ComplianceRegime = 1 + // Criminal Justice Information Services (CJIS) Security policies. + Workload_CJIS Workload_ComplianceRegime = 2 + // FedRAMP High data protection controls + Workload_FEDRAMP_HIGH Workload_ComplianceRegime = 3 + // FedRAMP Moderate data protection controls + Workload_FEDRAMP_MODERATE Workload_ComplianceRegime = 4 + // Assured Workloads For US Regions data protection controls + Workload_US_REGIONAL_ACCESS Workload_ComplianceRegime = 5 + // Health Insurance Portability and Accountability Act controls + Workload_HIPAA Workload_ComplianceRegime = 6 + // Health Information Trust Alliance controls + Workload_HITRUST Workload_ComplianceRegime = 7 + // Assured Workloads For EU Regions and Support controls + Workload_EU_REGIONS_AND_SUPPORT Workload_ComplianceRegime = 8 + // Assured Workloads For Canada Regions and Support controls + Workload_CA_REGIONS_AND_SUPPORT Workload_ComplianceRegime = 9 + // International Traffic in Arms Regulations + Workload_ITAR Workload_ComplianceRegime = 10 + // Assured Workloads for Australia Regions and Support controls + Workload_AU_REGIONS_AND_US_SUPPORT Workload_ComplianceRegime = 11 +) + +// Enum value maps for Workload_ComplianceRegime. +var ( + Workload_ComplianceRegime_name = map[int32]string{ + 0: "COMPLIANCE_REGIME_UNSPECIFIED", + 1: "IL4", + 2: "CJIS", + 3: "FEDRAMP_HIGH", + 4: "FEDRAMP_MODERATE", + 5: "US_REGIONAL_ACCESS", + 6: "HIPAA", + 7: "HITRUST", + 8: "EU_REGIONS_AND_SUPPORT", + 9: "CA_REGIONS_AND_SUPPORT", + 10: "ITAR", + 11: "AU_REGIONS_AND_US_SUPPORT", + } + Workload_ComplianceRegime_value = map[string]int32{ + "COMPLIANCE_REGIME_UNSPECIFIED": 0, + "IL4": 1, + "CJIS": 2, + "FEDRAMP_HIGH": 3, + "FEDRAMP_MODERATE": 4, + "US_REGIONAL_ACCESS": 5, + "HIPAA": 6, + "HITRUST": 7, + "EU_REGIONS_AND_SUPPORT": 8, + "CA_REGIONS_AND_SUPPORT": 9, + "ITAR": 10, + "AU_REGIONS_AND_US_SUPPORT": 11, + } +) + +func (x Workload_ComplianceRegime) Enum() *Workload_ComplianceRegime { + p := new(Workload_ComplianceRegime) + *p = x + return p +} + +func (x Workload_ComplianceRegime) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Workload_ComplianceRegime) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[1].Descriptor() +} + +func (Workload_ComplianceRegime) Type() protoreflect.EnumType { + return &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[1] +} + +func (x Workload_ComplianceRegime) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Workload_ComplianceRegime.Descriptor instead. +func (Workload_ComplianceRegime) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 0} +} + +// Key Access Justifications(KAJ) Enrollment State. +type Workload_KajEnrollmentState int32 + +const ( + // Default State for KAJ Enrollment. + Workload_KAJ_ENROLLMENT_STATE_UNSPECIFIED Workload_KajEnrollmentState = 0 + // Pending State for KAJ Enrollment. + Workload_KAJ_ENROLLMENT_STATE_PENDING Workload_KajEnrollmentState = 1 + // Complete State for KAJ Enrollment. + Workload_KAJ_ENROLLMENT_STATE_COMPLETE Workload_KajEnrollmentState = 2 +) + +// Enum value maps for Workload_KajEnrollmentState. +var ( + Workload_KajEnrollmentState_name = map[int32]string{ + 0: "KAJ_ENROLLMENT_STATE_UNSPECIFIED", + 1: "KAJ_ENROLLMENT_STATE_PENDING", + 2: "KAJ_ENROLLMENT_STATE_COMPLETE", + } + Workload_KajEnrollmentState_value = map[string]int32{ + "KAJ_ENROLLMENT_STATE_UNSPECIFIED": 0, + "KAJ_ENROLLMENT_STATE_PENDING": 1, + "KAJ_ENROLLMENT_STATE_COMPLETE": 2, + } +) + +func (x Workload_KajEnrollmentState) Enum() *Workload_KajEnrollmentState { + p := new(Workload_KajEnrollmentState) + *p = x + return p +} + +func (x Workload_KajEnrollmentState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Workload_KajEnrollmentState) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[2].Descriptor() +} + +func (Workload_KajEnrollmentState) Type() protoreflect.EnumType { + return &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[2] +} + +func (x Workload_KajEnrollmentState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Workload_KajEnrollmentState.Descriptor instead. +func (Workload_KajEnrollmentState) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 1} +} + +// The type of resource. +type Workload_ResourceInfo_ResourceType int32 + +const ( + // Unknown resource type. + Workload_ResourceInfo_RESOURCE_TYPE_UNSPECIFIED Workload_ResourceInfo_ResourceType = 0 + // Deprecated. Existing workloads will continue to support this, but new + // CreateWorkloadRequests should not specify this as an input value. + // + // Deprecated: Do not use. + Workload_ResourceInfo_CONSUMER_PROJECT Workload_ResourceInfo_ResourceType = 1 + // Consumer Folder. + Workload_ResourceInfo_CONSUMER_FOLDER Workload_ResourceInfo_ResourceType = 4 + // Consumer project containing encryption keys. + Workload_ResourceInfo_ENCRYPTION_KEYS_PROJECT Workload_ResourceInfo_ResourceType = 2 + // Keyring resource that hosts encryption keys. + Workload_ResourceInfo_KEYRING Workload_ResourceInfo_ResourceType = 3 +) + +// Enum value maps for Workload_ResourceInfo_ResourceType. +var ( + Workload_ResourceInfo_ResourceType_name = map[int32]string{ + 0: "RESOURCE_TYPE_UNSPECIFIED", + 1: "CONSUMER_PROJECT", + 4: "CONSUMER_FOLDER", + 2: "ENCRYPTION_KEYS_PROJECT", + 3: "KEYRING", + } + Workload_ResourceInfo_ResourceType_value = map[string]int32{ + "RESOURCE_TYPE_UNSPECIFIED": 0, + "CONSUMER_PROJECT": 1, + "CONSUMER_FOLDER": 4, + "ENCRYPTION_KEYS_PROJECT": 2, + "KEYRING": 3, + } +) + +func (x Workload_ResourceInfo_ResourceType) Enum() *Workload_ResourceInfo_ResourceType { + p := new(Workload_ResourceInfo_ResourceType) + *p = x + return p +} + +func (x Workload_ResourceInfo_ResourceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Workload_ResourceInfo_ResourceType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[3].Descriptor() +} + +func (Workload_ResourceInfo_ResourceType) Type() protoreflect.EnumType { + return &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[3] +} + +func (x Workload_ResourceInfo_ResourceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Workload_ResourceInfo_ResourceType.Descriptor instead. +func (Workload_ResourceInfo_ResourceType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 0, 0} +} + +// Setup state of SAA enrollment. +type Workload_SaaEnrollmentResponse_SetupState int32 + +const ( + // Unspecified. + Workload_SaaEnrollmentResponse_SETUP_STATE_UNSPECIFIED Workload_SaaEnrollmentResponse_SetupState = 0 + // SAA enrollment pending. + Workload_SaaEnrollmentResponse_STATUS_PENDING Workload_SaaEnrollmentResponse_SetupState = 1 + // SAA enrollment comopleted. + Workload_SaaEnrollmentResponse_STATUS_COMPLETE Workload_SaaEnrollmentResponse_SetupState = 2 +) + +// Enum value maps for Workload_SaaEnrollmentResponse_SetupState. +var ( + Workload_SaaEnrollmentResponse_SetupState_name = map[int32]string{ + 0: "SETUP_STATE_UNSPECIFIED", + 1: "STATUS_PENDING", + 2: "STATUS_COMPLETE", + } + Workload_SaaEnrollmentResponse_SetupState_value = map[string]int32{ + "SETUP_STATE_UNSPECIFIED": 0, + "STATUS_PENDING": 1, + "STATUS_COMPLETE": 2, + } +) + +func (x Workload_SaaEnrollmentResponse_SetupState) Enum() *Workload_SaaEnrollmentResponse_SetupState { + p := new(Workload_SaaEnrollmentResponse_SetupState) + *p = x + return p +} + +func (x Workload_SaaEnrollmentResponse_SetupState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Workload_SaaEnrollmentResponse_SetupState) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[4].Descriptor() +} + +func (Workload_SaaEnrollmentResponse_SetupState) Type() protoreflect.EnumType { + return &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[4] +} + +func (x Workload_SaaEnrollmentResponse_SetupState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Workload_SaaEnrollmentResponse_SetupState.Descriptor instead. +func (Workload_SaaEnrollmentResponse_SetupState) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 7, 0} +} + +// Setup error of SAA enrollment. +type Workload_SaaEnrollmentResponse_SetupError int32 + +const ( + // Unspecified. + Workload_SaaEnrollmentResponse_SETUP_ERROR_UNSPECIFIED Workload_SaaEnrollmentResponse_SetupError = 0 + // Invalid states for all customers, to be redirected to AA UI for + // additional details. + Workload_SaaEnrollmentResponse_ERROR_INVALID_BASE_SETUP Workload_SaaEnrollmentResponse_SetupError = 1 + // Returned when there is not an EKM key configured. + Workload_SaaEnrollmentResponse_ERROR_MISSING_EXTERNAL_SIGNING_KEY Workload_SaaEnrollmentResponse_SetupError = 2 + // Returned when there are no enrolled services or the customer is + // enrolled in CAA only for a subset of services. + Workload_SaaEnrollmentResponse_ERROR_NOT_ALL_SERVICES_ENROLLED Workload_SaaEnrollmentResponse_SetupError = 3 + // Returned when exception was encountered during evaluation of other + // criteria. + Workload_SaaEnrollmentResponse_ERROR_SETUP_CHECK_FAILED Workload_SaaEnrollmentResponse_SetupError = 4 +) + +// Enum value maps for Workload_SaaEnrollmentResponse_SetupError. +var ( + Workload_SaaEnrollmentResponse_SetupError_name = map[int32]string{ + 0: "SETUP_ERROR_UNSPECIFIED", + 1: "ERROR_INVALID_BASE_SETUP", + 2: "ERROR_MISSING_EXTERNAL_SIGNING_KEY", + 3: "ERROR_NOT_ALL_SERVICES_ENROLLED", + 4: "ERROR_SETUP_CHECK_FAILED", + } + Workload_SaaEnrollmentResponse_SetupError_value = map[string]int32{ + "SETUP_ERROR_UNSPECIFIED": 0, + "ERROR_INVALID_BASE_SETUP": 1, + "ERROR_MISSING_EXTERNAL_SIGNING_KEY": 2, + "ERROR_NOT_ALL_SERVICES_ENROLLED": 3, + "ERROR_SETUP_CHECK_FAILED": 4, + } +) + +func (x Workload_SaaEnrollmentResponse_SetupError) Enum() *Workload_SaaEnrollmentResponse_SetupError { + p := new(Workload_SaaEnrollmentResponse_SetupError) + *p = x + return p +} + +func (x Workload_SaaEnrollmentResponse_SetupError) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Workload_SaaEnrollmentResponse_SetupError) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[5].Descriptor() +} + +func (Workload_SaaEnrollmentResponse_SetupError) Type() protoreflect.EnumType { + return &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes[5] +} + +func (x Workload_SaaEnrollmentResponse_SetupError) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Workload_SaaEnrollmentResponse_SetupError.Descriptor instead. +func (Workload_SaaEnrollmentResponse_SetupError) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 7, 1} +} + +// Request for creating a workload. +type CreateWorkloadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the new Workload's parent. + // Must be of the form `organizations/{org_id}/locations/{location_id}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Assured Workload to create + Workload *Workload `protobuf:"bytes,2,opt,name=workload,proto3" json:"workload,omitempty"` + // Optional. A identifier associated with the workload and underlying projects which + // allows for the break down of billing costs for a workload. The value + // provided for the identifier will add a label to the workload and contained + // projects with the identifier as the value. + ExternalId string `protobuf:"bytes,3,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"` +} + +func (x *CreateWorkloadRequest) Reset() { + *x = CreateWorkloadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkloadRequest) ProtoMessage() {} + +func (x *CreateWorkloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkloadRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkloadRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateWorkloadRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateWorkloadRequest) GetWorkload() *Workload { + if x != nil { + return x.Workload + } + return nil +} + +func (x *CreateWorkloadRequest) GetExternalId() string { + if x != nil { + return x.ExternalId + } + return "" +} + +// Request for Updating a workload. +type UpdateWorkloadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workload to update. + // The workload's `name` field is used to identify the workload to be updated. + // Format: + // organizations/{org_id}/locations/{location_id}/workloads/{workload_id} + Workload *Workload `protobuf:"bytes,1,opt,name=workload,proto3" json:"workload,omitempty"` + // Required. The list of fields to be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateWorkloadRequest) Reset() { + *x = UpdateWorkloadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkloadRequest) ProtoMessage() {} + +func (x *UpdateWorkloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateWorkloadRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkloadRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{1} +} + +func (x *UpdateWorkloadRequest) GetWorkload() *Workload { + if x != nil { + return x.Workload + } + return nil +} + +func (x *UpdateWorkloadRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request for restricting list of available resources in Workload environment. +type RestrictAllowedResourcesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Workload. This is the workloads's + // relative path in the API, formatted as + // "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". + // For example, + // "organizations/123/locations/us-east1/workloads/assured-workload-1". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The type of restriction for using gcp products in the Workload environment. + RestrictionType RestrictAllowedResourcesRequest_RestrictionType `protobuf:"varint,2,opt,name=restriction_type,json=restrictionType,proto3,enum=google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest_RestrictionType" json:"restriction_type,omitempty"` +} + +func (x *RestrictAllowedResourcesRequest) Reset() { + *x = RestrictAllowedResourcesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestrictAllowedResourcesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestrictAllowedResourcesRequest) ProtoMessage() {} + +func (x *RestrictAllowedResourcesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestrictAllowedResourcesRequest.ProtoReflect.Descriptor instead. +func (*RestrictAllowedResourcesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{2} +} + +func (x *RestrictAllowedResourcesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RestrictAllowedResourcesRequest) GetRestrictionType() RestrictAllowedResourcesRequest_RestrictionType { + if x != nil { + return x.RestrictionType + } + return RestrictAllowedResourcesRequest_RESTRICTION_TYPE_UNSPECIFIED +} + +// Response for restricting the list of allowed resources. +type RestrictAllowedResourcesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RestrictAllowedResourcesResponse) Reset() { + *x = RestrictAllowedResourcesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestrictAllowedResourcesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestrictAllowedResourcesResponse) ProtoMessage() {} + +func (x *RestrictAllowedResourcesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestrictAllowedResourcesResponse.ProtoReflect.Descriptor instead. +func (*RestrictAllowedResourcesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{3} +} + +// Request for deleting a Workload. +type DeleteWorkloadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The `name` field is used to identify the workload. + // Format: + // organizations/{org_id}/locations/{location_id}/workloads/{workload_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The etag of the workload. + // If this is provided, it must match the server's etag. + Etag string `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *DeleteWorkloadRequest) Reset() { + *x = DeleteWorkloadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteWorkloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWorkloadRequest) ProtoMessage() {} + +func (x *DeleteWorkloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteWorkloadRequest.ProtoReflect.Descriptor instead. +func (*DeleteWorkloadRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteWorkloadRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteWorkloadRequest) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// Request for fetching a workload. +type GetWorkloadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Workload to fetch. This is the workloads's + // relative path in the API, formatted as + // "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". + // For example, + // "organizations/123/locations/us-east1/workloads/assured-workload-1". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetWorkloadRequest) Reset() { + *x = GetWorkloadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkloadRequest) ProtoMessage() {} + +func (x *GetWorkloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkloadRequest.ProtoReflect.Descriptor instead. +func (*GetWorkloadRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{5} +} + +func (x *GetWorkloadRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// A request to analyze a hypothetical move of a source project or project-based +// workload to a target (destination) folder-based workload. +type AnalyzeWorkloadMoveRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource type to be moved to the destination workload. It can be either + // an existing project or a project-based workload. + // + // Types that are assignable to ProjectOrWorkloadResource: + // + // *AnalyzeWorkloadMoveRequest_Source + // *AnalyzeWorkloadMoveRequest_Project + ProjectOrWorkloadResource isAnalyzeWorkloadMoveRequest_ProjectOrWorkloadResource `protobuf_oneof:"projectOrWorkloadResource"` + // Required. The resource ID of the folder-based destination workload. This workload is + // where the source project will hypothetically be moved to. Specify the + // workload's relative resource name, formatted as: + // "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" + // For example: + // "organizations/123/locations/us-east1/workloads/assured-workload-2" + Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` +} + +func (x *AnalyzeWorkloadMoveRequest) Reset() { + *x = AnalyzeWorkloadMoveRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnalyzeWorkloadMoveRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeWorkloadMoveRequest) ProtoMessage() {} + +func (x *AnalyzeWorkloadMoveRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalyzeWorkloadMoveRequest.ProtoReflect.Descriptor instead. +func (*AnalyzeWorkloadMoveRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{6} +} + +func (m *AnalyzeWorkloadMoveRequest) GetProjectOrWorkloadResource() isAnalyzeWorkloadMoveRequest_ProjectOrWorkloadResource { + if m != nil { + return m.ProjectOrWorkloadResource + } + return nil +} + +func (x *AnalyzeWorkloadMoveRequest) GetSource() string { + if x, ok := x.GetProjectOrWorkloadResource().(*AnalyzeWorkloadMoveRequest_Source); ok { + return x.Source + } + return "" +} + +func (x *AnalyzeWorkloadMoveRequest) GetProject() string { + if x, ok := x.GetProjectOrWorkloadResource().(*AnalyzeWorkloadMoveRequest_Project); ok { + return x.Project + } + return "" +} + +func (x *AnalyzeWorkloadMoveRequest) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +type isAnalyzeWorkloadMoveRequest_ProjectOrWorkloadResource interface { + isAnalyzeWorkloadMoveRequest_ProjectOrWorkloadResource() +} + +type AnalyzeWorkloadMoveRequest_Source struct { + // The source type is a project-based workload. Specify the workloads's + // relative resource name, formatted as: + // "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}" + // For example: + // "organizations/123/locations/us-east1/workloads/assured-workload-1" + Source string `protobuf:"bytes,1,opt,name=source,proto3,oneof"` +} + +type AnalyzeWorkloadMoveRequest_Project struct { + // The source type is a project. Specify the project's relative resource + // name, formatted as either a project number or a project ID: + // "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}" + // For example: + // "projects/951040570662" when specifying a project number, or + // "projects/my-project-123" when specifying a project ID. + Project string `protobuf:"bytes,3,opt,name=project,proto3,oneof"` +} + +func (*AnalyzeWorkloadMoveRequest_Source) isAnalyzeWorkloadMoveRequest_ProjectOrWorkloadResource() {} + +func (*AnalyzeWorkloadMoveRequest_Project) isAnalyzeWorkloadMoveRequest_ProjectOrWorkloadResource() {} + +// A response that includes the analysis of the hypothetical resource move. +type AnalyzeWorkloadMoveResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of blockers that should be addressed before moving the source + // project or project-based workload to the destination folder-based workload. + Blockers []string `protobuf:"bytes,1,rep,name=blockers,proto3" json:"blockers,omitempty"` +} + +func (x *AnalyzeWorkloadMoveResponse) Reset() { + *x = AnalyzeWorkloadMoveResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnalyzeWorkloadMoveResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeWorkloadMoveResponse) ProtoMessage() {} + +func (x *AnalyzeWorkloadMoveResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnalyzeWorkloadMoveResponse.ProtoReflect.Descriptor instead. +func (*AnalyzeWorkloadMoveResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{7} +} + +func (x *AnalyzeWorkloadMoveResponse) GetBlockers() []string { + if x != nil { + return x.Blockers + } + return nil +} + +// Request for fetching workloads in an organization. +type ListWorkloadsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Parent Resource to list workloads from. + // Must be of the form `organizations/{org_id}/locations/{location}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Page size. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token returned from previous request. Page token contains context from + // previous request. Page token needs to be passed in the second and following + // requests. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // A custom filter for filtering by properties of a workload. At this time, + // only filtering by labels is supported. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListWorkloadsRequest) Reset() { + *x = ListWorkloadsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkloadsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkloadsRequest) ProtoMessage() {} + +func (x *ListWorkloadsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkloadsRequest.ProtoReflect.Descriptor instead. +func (*ListWorkloadsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{8} +} + +func (x *ListWorkloadsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListWorkloadsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkloadsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListWorkloadsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Response of ListWorkloads endpoint. +type ListWorkloadsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of Workloads under a given parent. + Workloads []*Workload `protobuf:"bytes,1,rep,name=workloads,proto3" json:"workloads,omitempty"` + // The next page token. Return empty if reached the last page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListWorkloadsResponse) Reset() { + *x = ListWorkloadsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkloadsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkloadsResponse) ProtoMessage() {} + +func (x *ListWorkloadsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkloadsResponse.ProtoReflect.Descriptor instead. +func (*ListWorkloadsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{9} +} + +func (x *ListWorkloadsResponse) GetWorkloads() []*Workload { + if x != nil { + return x.Workloads + } + return nil +} + +func (x *ListWorkloadsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// An Workload object for managing highly regulated workloads of cloud +// customers. +type Workload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The resource name of the workload. + // Format: + // organizations/{organization}/locations/{location}/workloads/{workload} + // + // Read-only. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The user-assigned display name of the Workload. + // When present it must be between 4 to 30 characters. + // Allowed characters are: lowercase and uppercase letters, numbers, + // hyphen, and spaces. + // + // Example: My Workload + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. The resources associated with this workload. + // These resources will be created when creating the workload. + // If any of the projects already exist, the workload creation will fail. + // Always read only. + Resources []*Workload_ResourceInfo `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` + // Required. Immutable. Compliance Regime associated with this workload. + ComplianceRegime Workload_ComplianceRegime `protobuf:"varint,4,opt,name=compliance_regime,json=complianceRegime,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_ComplianceRegime" json:"compliance_regime,omitempty"` + // Output only. Immutable. The Workload creation timestamp. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The billing account used for the resources which are + // direct children of workload. This billing account is initially associated + // with the resources created as part of Workload creation. + // After the initial creation of these resources, the customer can change + // the assigned billing account. + // The resource name has the form + // `billingAccounts/{billing_account_id}`. For example, + // `billingAccounts/012345-567890-ABCDEF`. + BillingAccount string `protobuf:"bytes,6,opt,name=billing_account,json=billingAccount,proto3" json:"billing_account,omitempty"` + // Settings specific to the selected [compliance_regime] + // + // Types that are assignable to ComplianceRegimeSettings: + // + // *Workload_Il4Settings + // *Workload_CjisSettings + // *Workload_FedrampHighSettings_ + // *Workload_FedrampModerateSettings_ + ComplianceRegimeSettings isWorkload_ComplianceRegimeSettings `protobuf_oneof:"compliance_regime_settings"` + // Optional. ETag of the workload, it is calculated on the basis + // of the Workload contents. It will be used in Update & Delete operations. + Etag string `protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"` + // Optional. Labels applied to the workload. + Labels map[string]string `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Input only. The parent resource for the resources managed by this Assured Workload. May + // be either empty or a folder resource which is a child of the + // Workload parent. If not specified all resources are created under the + // parent organization. + // Format: + // folders/{folder_id} + ProvisionedResourcesParent string `protobuf:"bytes,13,opt,name=provisioned_resources_parent,json=provisionedResourcesParent,proto3" json:"provisioned_resources_parent,omitempty"` + // Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS + // CMEK key is provisioned. + // This field is deprecated as of Feb 28, 2022. + // In order to create a Keyring, callers should specify, + // ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + // + // Deprecated: Do not use. + KmsSettings *Workload_KMSSettings `protobuf:"bytes,14,opt,name=kms_settings,json=kmsSettings,proto3" json:"kms_settings,omitempty"` + // Input only. Resource properties that are used to customize workload resources. + // These properties (such as custom project id) will be used to create + // workload resources if possible. This field is optional. + ResourceSettings []*Workload_ResourceSettings `protobuf:"bytes,15,rep,name=resource_settings,json=resourceSettings,proto3" json:"resource_settings,omitempty"` + // Output only. Represents the KAJ enrollment state of the given workload. + KajEnrollmentState Workload_KajEnrollmentState `protobuf:"varint,17,opt,name=kaj_enrollment_state,json=kajEnrollmentState,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_KajEnrollmentState" json:"kaj_enrollment_state,omitempty"` + // Optional. Indicates the sovereignty status of the given workload. + // Currently meant to be used by Europe/Canada customers. + EnableSovereignControls bool `protobuf:"varint,18,opt,name=enable_sovereign_controls,json=enableSovereignControls,proto3" json:"enable_sovereign_controls,omitempty"` + // Output only. Represents the SAA enrollment response of the given workload. + // SAA enrollment response is queried during GetWorkload call. + // In failure cases, user friendly error message is shown in SAA details page. + SaaEnrollmentResponse *Workload_SaaEnrollmentResponse `protobuf:"bytes,20,opt,name=saa_enrollment_response,json=saaEnrollmentResponse,proto3" json:"saa_enrollment_response,omitempty"` + // Output only. Urls for services which are compliant for this Assured Workload, but which + // are currently disallowed by the ResourceUsageRestriction org policy. + // Invoke RestrictAllowedResources endpoint to allow your project developers + // to use these services in their environment." + CompliantButDisallowedServices []string `protobuf:"bytes,24,rep,name=compliant_but_disallowed_services,json=compliantButDisallowedServices,proto3" json:"compliant_but_disallowed_services,omitempty"` +} + +func (x *Workload) Reset() { + *x = Workload{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload) ProtoMessage() {} + +func (x *Workload) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload.ProtoReflect.Descriptor instead. +func (*Workload) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10} +} + +func (x *Workload) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workload) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Workload) GetResources() []*Workload_ResourceInfo { + if x != nil { + return x.Resources + } + return nil +} + +func (x *Workload) GetComplianceRegime() Workload_ComplianceRegime { + if x != nil { + return x.ComplianceRegime + } + return Workload_COMPLIANCE_REGIME_UNSPECIFIED +} + +func (x *Workload) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Workload) GetBillingAccount() string { + if x != nil { + return x.BillingAccount + } + return "" +} + +func (m *Workload) GetComplianceRegimeSettings() isWorkload_ComplianceRegimeSettings { + if m != nil { + return m.ComplianceRegimeSettings + } + return nil +} + +// Deprecated: Do not use. +func (x *Workload) GetIl4Settings() *Workload_IL4Settings { + if x, ok := x.GetComplianceRegimeSettings().(*Workload_Il4Settings); ok { + return x.Il4Settings + } + return nil +} + +// Deprecated: Do not use. +func (x *Workload) GetCjisSettings() *Workload_CJISSettings { + if x, ok := x.GetComplianceRegimeSettings().(*Workload_CjisSettings); ok { + return x.CjisSettings + } + return nil +} + +// Deprecated: Do not use. +func (x *Workload) GetFedrampHighSettings() *Workload_FedrampHighSettings { + if x, ok := x.GetComplianceRegimeSettings().(*Workload_FedrampHighSettings_); ok { + return x.FedrampHighSettings + } + return nil +} + +// Deprecated: Do not use. +func (x *Workload) GetFedrampModerateSettings() *Workload_FedrampModerateSettings { + if x, ok := x.GetComplianceRegimeSettings().(*Workload_FedrampModerateSettings_); ok { + return x.FedrampModerateSettings + } + return nil +} + +func (x *Workload) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +func (x *Workload) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Workload) GetProvisionedResourcesParent() string { + if x != nil { + return x.ProvisionedResourcesParent + } + return "" +} + +// Deprecated: Do not use. +func (x *Workload) GetKmsSettings() *Workload_KMSSettings { + if x != nil { + return x.KmsSettings + } + return nil +} + +func (x *Workload) GetResourceSettings() []*Workload_ResourceSettings { + if x != nil { + return x.ResourceSettings + } + return nil +} + +func (x *Workload) GetKajEnrollmentState() Workload_KajEnrollmentState { + if x != nil { + return x.KajEnrollmentState + } + return Workload_KAJ_ENROLLMENT_STATE_UNSPECIFIED +} + +func (x *Workload) GetEnableSovereignControls() bool { + if x != nil { + return x.EnableSovereignControls + } + return false +} + +func (x *Workload) GetSaaEnrollmentResponse() *Workload_SaaEnrollmentResponse { + if x != nil { + return x.SaaEnrollmentResponse + } + return nil +} + +func (x *Workload) GetCompliantButDisallowedServices() []string { + if x != nil { + return x.CompliantButDisallowedServices + } + return nil +} + +type isWorkload_ComplianceRegimeSettings interface { + isWorkload_ComplianceRegimeSettings() +} + +type Workload_Il4Settings struct { + // Input only. Immutable. Settings specific to resources needed for IL4. + // + // Deprecated: Do not use. + Il4Settings *Workload_IL4Settings `protobuf:"bytes,7,opt,name=il4_settings,json=il4Settings,proto3,oneof"` +} + +type Workload_CjisSettings struct { + // Input only. Immutable. Settings specific to resources needed for CJIS. + // + // Deprecated: Do not use. + CjisSettings *Workload_CJISSettings `protobuf:"bytes,8,opt,name=cjis_settings,json=cjisSettings,proto3,oneof"` +} + +type Workload_FedrampHighSettings_ struct { + // Input only. Immutable. Settings specific to resources needed for FedRAMP High. + // + // Deprecated: Do not use. + FedrampHighSettings *Workload_FedrampHighSettings `protobuf:"bytes,11,opt,name=fedramp_high_settings,json=fedrampHighSettings,proto3,oneof"` +} + +type Workload_FedrampModerateSettings_ struct { + // Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. + // + // Deprecated: Do not use. + FedrampModerateSettings *Workload_FedrampModerateSettings `protobuf:"bytes,12,opt,name=fedramp_moderate_settings,json=fedrampModerateSettings,proto3,oneof"` +} + +func (*Workload_Il4Settings) isWorkload_ComplianceRegimeSettings() {} + +func (*Workload_CjisSettings) isWorkload_ComplianceRegimeSettings() {} + +func (*Workload_FedrampHighSettings_) isWorkload_ComplianceRegimeSettings() {} + +func (*Workload_FedrampModerateSettings_) isWorkload_ComplianceRegimeSettings() {} + +// Operation metadata to give request details of CreateWorkload. +type CreateWorkloadOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Time when the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Optional. The display name of the workload. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. The parent of the workload. + Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Compliance controls that should be applied to the resources managed by + // the workload. + ComplianceRegime Workload_ComplianceRegime `protobuf:"varint,4,opt,name=compliance_regime,json=complianceRegime,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_ComplianceRegime" json:"compliance_regime,omitempty"` + // Optional. Resource properties in the input that are used for creating/customizing + // workload resources. + ResourceSettings []*Workload_ResourceSettings `protobuf:"bytes,5,rep,name=resource_settings,json=resourceSettings,proto3" json:"resource_settings,omitempty"` +} + +func (x *CreateWorkloadOperationMetadata) Reset() { + *x = CreateWorkloadOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkloadOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkloadOperationMetadata) ProtoMessage() {} + +func (x *CreateWorkloadOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkloadOperationMetadata.ProtoReflect.Descriptor instead. +func (*CreateWorkloadOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateWorkloadOperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *CreateWorkloadOperationMetadata) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *CreateWorkloadOperationMetadata) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateWorkloadOperationMetadata) GetComplianceRegime() Workload_ComplianceRegime { + if x != nil { + return x.ComplianceRegime + } + return Workload_COMPLIANCE_REGIME_UNSPECIFIED +} + +func (x *CreateWorkloadOperationMetadata) GetResourceSettings() []*Workload_ResourceSettings { + if x != nil { + return x.ResourceSettings + } + return nil +} + +// Represent the resources that are children of this Workload. +type Workload_ResourceInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Resource identifier. + // For a project this represents project_number. + ResourceId int64 `protobuf:"varint,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Indicates the type of resource. + ResourceType Workload_ResourceInfo_ResourceType `protobuf:"varint,2,opt,name=resource_type,json=resourceType,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_ResourceInfo_ResourceType" json:"resource_type,omitempty"` +} + +func (x *Workload_ResourceInfo) Reset() { + *x = Workload_ResourceInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_ResourceInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_ResourceInfo) ProtoMessage() {} + +func (x *Workload_ResourceInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_ResourceInfo.ProtoReflect.Descriptor instead. +func (*Workload_ResourceInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 0} +} + +func (x *Workload_ResourceInfo) GetResourceId() int64 { + if x != nil { + return x.ResourceId + } + return 0 +} + +func (x *Workload_ResourceInfo) GetResourceType() Workload_ResourceInfo_ResourceType { + if x != nil { + return x.ResourceType + } + return Workload_ResourceInfo_RESOURCE_TYPE_UNSPECIFIED +} + +// Settings specific to the Key Management Service. +// +// Deprecated: Do not use. +type Workload_KMSSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Input only. Immutable. The time at which the Key Management Service will automatically create a + // new version of the crypto key and mark it as the primary. + NextRotationTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=next_rotation_time,json=nextRotationTime,proto3" json:"next_rotation_time,omitempty"` + // Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key + // Management Service automatically rotates a key. Must be at least 24 hours + // and at most 876,000 hours. + RotationPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=rotation_period,json=rotationPeriod,proto3" json:"rotation_period,omitempty"` +} + +func (x *Workload_KMSSettings) Reset() { + *x = Workload_KMSSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_KMSSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_KMSSettings) ProtoMessage() {} + +func (x *Workload_KMSSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_KMSSettings.ProtoReflect.Descriptor instead. +func (*Workload_KMSSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 1} +} + +func (x *Workload_KMSSettings) GetNextRotationTime() *timestamppb.Timestamp { + if x != nil { + return x.NextRotationTime + } + return nil +} + +func (x *Workload_KMSSettings) GetRotationPeriod() *durationpb.Duration { + if x != nil { + return x.RotationPeriod + } + return nil +} + +// Settings specific to resources needed for IL4. +// +// Deprecated: Do not use. +type Workload_IL4Settings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. Immutable. Settings used to create a CMEK crypto key. + KmsSettings *Workload_KMSSettings `protobuf:"bytes,1,opt,name=kms_settings,json=kmsSettings,proto3" json:"kms_settings,omitempty"` +} + +func (x *Workload_IL4Settings) Reset() { + *x = Workload_IL4Settings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_IL4Settings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_IL4Settings) ProtoMessage() {} + +func (x *Workload_IL4Settings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_IL4Settings.ProtoReflect.Descriptor instead. +func (*Workload_IL4Settings) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 2} +} + +func (x *Workload_IL4Settings) GetKmsSettings() *Workload_KMSSettings { + if x != nil { + return x.KmsSettings + } + return nil +} + +// Settings specific to resources needed for CJIS. +// +// Deprecated: Do not use. +type Workload_CJISSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. Immutable. Settings used to create a CMEK crypto key. + KmsSettings *Workload_KMSSettings `protobuf:"bytes,1,opt,name=kms_settings,json=kmsSettings,proto3" json:"kms_settings,omitempty"` +} + +func (x *Workload_CJISSettings) Reset() { + *x = Workload_CJISSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_CJISSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_CJISSettings) ProtoMessage() {} + +func (x *Workload_CJISSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_CJISSettings.ProtoReflect.Descriptor instead. +func (*Workload_CJISSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 3} +} + +func (x *Workload_CJISSettings) GetKmsSettings() *Workload_KMSSettings { + if x != nil { + return x.KmsSettings + } + return nil +} + +// Settings specific to resources needed for FedRAMP High. +// +// Deprecated: Do not use. +type Workload_FedrampHighSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. Immutable. Settings used to create a CMEK crypto key. + KmsSettings *Workload_KMSSettings `protobuf:"bytes,1,opt,name=kms_settings,json=kmsSettings,proto3" json:"kms_settings,omitempty"` +} + +func (x *Workload_FedrampHighSettings) Reset() { + *x = Workload_FedrampHighSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_FedrampHighSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_FedrampHighSettings) ProtoMessage() {} + +func (x *Workload_FedrampHighSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_FedrampHighSettings.ProtoReflect.Descriptor instead. +func (*Workload_FedrampHighSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 4} +} + +func (x *Workload_FedrampHighSettings) GetKmsSettings() *Workload_KMSSettings { + if x != nil { + return x.KmsSettings + } + return nil +} + +// Settings specific to resources needed for FedRAMP Moderate. +// +// Deprecated: Do not use. +type Workload_FedrampModerateSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. Immutable. Settings used to create a CMEK crypto key. + KmsSettings *Workload_KMSSettings `protobuf:"bytes,1,opt,name=kms_settings,json=kmsSettings,proto3" json:"kms_settings,omitempty"` +} + +func (x *Workload_FedrampModerateSettings) Reset() { + *x = Workload_FedrampModerateSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_FedrampModerateSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_FedrampModerateSettings) ProtoMessage() {} + +func (x *Workload_FedrampModerateSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_FedrampModerateSettings.ProtoReflect.Descriptor instead. +func (*Workload_FedrampModerateSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 5} +} + +func (x *Workload_FedrampModerateSettings) GetKmsSettings() *Workload_KMSSettings { + if x != nil { + return x.KmsSettings + } + return nil +} + +// Represent the custom settings for the resources to be created. +type Workload_ResourceSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Resource identifier. + // For a project this represents project_id. If the project is already + // taken, the workload creation will fail. + // For KeyRing, this represents the keyring_id. + // For a folder, don't set this value as folder_id is assigned by Google. + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Indicates the type of resource. This field should be specified to + // correspond the id to the right project type (CONSUMER_PROJECT or + // ENCRYPTION_KEYS_PROJECT) + ResourceType Workload_ResourceInfo_ResourceType `protobuf:"varint,2,opt,name=resource_type,json=resourceType,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_ResourceInfo_ResourceType" json:"resource_type,omitempty"` + // User-assigned resource display name. + // If not empty it will be used to create a resource with the specified + // name. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` +} + +func (x *Workload_ResourceSettings) Reset() { + *x = Workload_ResourceSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_ResourceSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_ResourceSettings) ProtoMessage() {} + +func (x *Workload_ResourceSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_ResourceSettings.ProtoReflect.Descriptor instead. +func (*Workload_ResourceSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 6} +} + +func (x *Workload_ResourceSettings) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *Workload_ResourceSettings) GetResourceType() Workload_ResourceInfo_ResourceType { + if x != nil { + return x.ResourceType + } + return Workload_ResourceInfo_RESOURCE_TYPE_UNSPECIFIED +} + +func (x *Workload_ResourceSettings) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +// Signed Access Approvals (SAA) enrollment response. +type Workload_SaaEnrollmentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates SAA enrollment status of a given workload. + SetupStatus *Workload_SaaEnrollmentResponse_SetupState `protobuf:"varint,1,opt,name=setup_status,json=setupStatus,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_SaaEnrollmentResponse_SetupState,oneof" json:"setup_status,omitempty"` + // Indicates SAA enrollment setup error if any. + SetupErrors []Workload_SaaEnrollmentResponse_SetupError `protobuf:"varint,2,rep,packed,name=setup_errors,json=setupErrors,proto3,enum=google.cloud.assuredworkloads.v1beta1.Workload_SaaEnrollmentResponse_SetupError" json:"setup_errors,omitempty"` +} + +func (x *Workload_SaaEnrollmentResponse) Reset() { + *x = Workload_SaaEnrollmentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload_SaaEnrollmentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload_SaaEnrollmentResponse) ProtoMessage() {} + +func (x *Workload_SaaEnrollmentResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload_SaaEnrollmentResponse.ProtoReflect.Descriptor instead. +func (*Workload_SaaEnrollmentResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP(), []int{10, 7} +} + +func (x *Workload_SaaEnrollmentResponse) GetSetupStatus() Workload_SaaEnrollmentResponse_SetupState { + if x != nil && x.SetupStatus != nil { + return *x.SetupStatus + } + return Workload_SaaEnrollmentResponse_SETUP_STATE_UNSPECIFIED +} + +func (x *Workload_SaaEnrollmentResponse) GetSetupErrors() []Workload_SaaEnrollmentResponse_SetupError { + if x != nil { + return x.SetupErrors + } + return nil +} + +var File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto protoreflect.FileDescriptor + +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, + 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x12, 0x28, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, + 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, + 0x22, 0xab, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x40, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xb4, + 0x02, 0x0a, 0x1f, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x56, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, + 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x6f, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x53, 0x54, 0x52, + 0x49, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x4c, 0x4c, + 0x4f, 0x57, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x47, 0x43, 0x50, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, + 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, + 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x53, 0x10, 0x02, 0x22, 0x22, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, 0x0a, 0x15, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x44, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x0a, 0x28, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, + 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, + 0x67, 0x22, 0x5a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x0a, 0x28, 0x61, + 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8c, 0x01, + 0x0a, 0x1a, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, + 0x1b, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x57, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x39, 0x0a, 0x1b, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, + 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x48, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x12, 0x28, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, + 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x8e, + 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, + 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x09, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0xd6, 0x1f, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5f, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x75, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x67, + 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x69, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6d, 0x65, 0x42, 0x06, 0xe0, 0x41, 0x02, + 0xe0, 0x41, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x67, 0x69, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x06, 0xe0, 0x41, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x62, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x6a, 0x0a, 0x0c, 0x69, 0x6c, 0x34, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x49, 0x4c, 0x34, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0x18, 0x01, 0xe0, + 0x41, 0x04, 0xe0, 0x41, 0x05, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6c, 0x34, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x6d, 0x0a, 0x0d, 0x63, 0x6a, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, + 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x43, 0x4a, 0x49, + 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0x18, 0x01, 0xe0, 0x41, 0x04, + 0xe0, 0x41, 0x05, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6a, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x15, 0x66, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x5f, + 0x68, 0x69, 0x67, 0x68, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x46, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x48, 0x69, 0x67, 0x68, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0x18, 0x01, 0xe0, 0x41, 0x04, 0xe0, + 0x41, 0x05, 0x48, 0x00, 0x52, 0x13, 0x66, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x48, 0x69, 0x67, + 0x68, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x19, 0x66, 0x65, + 0x64, 0x72, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, + 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x46, + 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x08, 0x18, 0x01, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, + 0x48, 0x00, 0x52, 0x17, 0x66, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x65, + 0x74, 0x61, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, + 0x65, 0x74, 0x61, 0x67, 0x12, 0x58, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x45, + 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x1a, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, + 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4b, 0x4d, 0x53, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x05, 0x18, 0x01, 0xe0, 0x41, 0x04, 0x52, + 0x0b, 0x6b, 0x6d, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x72, 0x0a, 0x11, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x10, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x79, 0x0a, 0x14, 0x6b, 0x61, 0x6a, 0x5f, 0x65, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x4b, 0x61, 0x6a, 0x45, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x12, 0x6b, 0x61, 0x6a, 0x45, 0x6e, 0x72, 0x6f, + 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x19, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x6f, 0x76, 0x65, 0x72, + 0x65, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x82, 0x01, 0x0a, + 0x17, 0x73, 0x61, 0x61, 0x5f, 0x65, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x53, 0x61, 0x61, 0x45, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x73, 0x61, 0x61, 0x45, + 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4e, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x62, + 0x75, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x1e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x74, 0x42, 0x75, 0x74, 0x44, + 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x1a, 0xa8, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x6e, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, + 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x52, 0x5f, + 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x52, 0x5f, 0x46, 0x4f, 0x4c, 0x44, 0x45, 0x52, + 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x4b, 0x45, 0x59, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x1a, 0xb5, 0x01, 0x0a, + 0x0b, 0x4b, 0x4d, 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x53, 0x0a, 0x12, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, 0x52, + 0x10, 0x6e, 0x65, 0x78, 0x74, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, + 0x52, 0x0e, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x3a, 0x02, 0x18, 0x01, 0x1a, 0x79, 0x0a, 0x0b, 0x49, 0x4c, 0x34, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x66, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4b, 0x4d, 0x53, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, 0x52, 0x0b, + 0x6b, 0x6d, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x1a, + 0x7a, 0x0a, 0x0c, 0x43, 0x4a, 0x49, 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x66, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4b, 0x4d, 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, 0x52, 0x0b, 0x6b, 0x6d, 0x73, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x1a, 0x81, 0x01, 0x0a, 0x13, + 0x46, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x48, 0x69, 0x67, 0x68, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x66, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4b, 0x4d, 0x53, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, 0x52, 0x0b, + 0x6b, 0x6d, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x1a, + 0x85, 0x01, 0x0a, 0x17, 0x46, 0x65, 0x64, 0x72, 0x61, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x66, 0x0a, 0x0c, 0x6b, + 0x6d, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x2e, 0x4b, 0x4d, 0x53, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x06, + 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x05, 0x52, 0x0b, 0x6b, 0x6d, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x1a, 0xc6, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x6e, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x1a, 0xa0, 0x04, 0x0a, 0x15, 0x53, 0x61, 0x61, 0x45, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x0c, 0x73, 0x65, + 0x74, 0x75, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x50, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x2e, 0x53, 0x61, 0x61, 0x45, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x88, 0x01, 0x01, 0x12, 0x73, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x50, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, + 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x53, 0x61, 0x61, 0x45, + 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x65, + 0x74, 0x75, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x53, 0x65, 0x74, + 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x45, 0x54, 0x55, 0x50, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x22, 0xb2, 0x01, + 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x75, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x17, + 0x53, 0x45, 0x54, 0x55, 0x50, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, + 0x53, 0x45, 0x54, 0x55, 0x50, 0x10, 0x01, 0x12, 0x26, 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, + 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, + 0x23, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x4c, 0x4c, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x5f, 0x45, 0x4e, 0x52, 0x4f, 0x4c, 0x4c, + 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x45, + 0x54, 0x55, 0x50, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x04, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x81, + 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x67, + 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x49, 0x41, 0x4e, 0x43, + 0x45, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4c, 0x34, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x43, 0x4a, 0x49, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x45, 0x44, + 0x52, 0x41, 0x4d, 0x50, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, + 0x45, 0x44, 0x52, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x52, 0x41, 0x54, 0x45, 0x10, + 0x04, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x4f, 0x4e, 0x41, 0x4c, + 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x49, 0x50, + 0x41, 0x41, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x49, 0x54, 0x52, 0x55, 0x53, 0x54, 0x10, + 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x55, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x4f, 0x4e, 0x53, 0x5f, + 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x08, 0x12, 0x1a, 0x0a, + 0x16, 0x43, 0x41, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x54, 0x41, + 0x52, 0x10, 0x0a, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x55, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x4f, 0x4e, + 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x55, 0x53, 0x5f, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, + 0x10, 0x0b, 0x22, 0x7f, 0x0a, 0x12, 0x4b, 0x61, 0x6a, 0x45, 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x4b, 0x41, 0x4a, 0x5f, + 0x45, 0x4e, 0x52, 0x4f, 0x4c, 0x4c, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, + 0x0a, 0x1c, 0x4b, 0x41, 0x4a, 0x5f, 0x45, 0x4e, 0x52, 0x4f, 0x4c, 0x4c, 0x4d, 0x45, 0x4e, 0x54, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x21, 0x0a, 0x1d, 0x4b, 0x41, 0x4a, 0x5f, 0x45, 0x4e, 0x52, 0x4f, 0x4c, 0x4c, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, + 0x45, 0x10, 0x02, 0x3a, 0x75, 0xea, 0x41, 0x72, 0x0a, 0x28, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, + 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x46, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2f, + 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x7d, 0x42, 0x1c, 0x0a, 0x1a, 0x63, 0x6f, + 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6d, 0x65, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x90, 0x03, 0x0a, 0x1f, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, + 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x72, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6d, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x6d, 0x65, 0x12, 0x72, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0xf6, 0x02, 0x0a, 0x29, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x15, 0x41, 0x73, 0x73, 0x75, 0x72, + 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x55, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0xaa, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x41, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x73, 0x73, 0x75, 0x72, + 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xea, 0x41, 0x5d, 0x0a, 0x28, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x31, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescOnce sync.Once + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescData = file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDesc +) + +func file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescGZIP() []byte { + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescOnce.Do(func() { + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescData) + }) + return file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDescData +} + +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_goTypes = []interface{}{ + (RestrictAllowedResourcesRequest_RestrictionType)(0), // 0: google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.RestrictionType + (Workload_ComplianceRegime)(0), // 1: google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime + (Workload_KajEnrollmentState)(0), // 2: google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState + (Workload_ResourceInfo_ResourceType)(0), // 3: google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType + (Workload_SaaEnrollmentResponse_SetupState)(0), // 4: google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState + (Workload_SaaEnrollmentResponse_SetupError)(0), // 5: google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError + (*CreateWorkloadRequest)(nil), // 6: google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest + (*UpdateWorkloadRequest)(nil), // 7: google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest + (*RestrictAllowedResourcesRequest)(nil), // 8: google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest + (*RestrictAllowedResourcesResponse)(nil), // 9: google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse + (*DeleteWorkloadRequest)(nil), // 10: google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest + (*GetWorkloadRequest)(nil), // 11: google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest + (*AnalyzeWorkloadMoveRequest)(nil), // 12: google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest + (*AnalyzeWorkloadMoveResponse)(nil), // 13: google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse + (*ListWorkloadsRequest)(nil), // 14: google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest + (*ListWorkloadsResponse)(nil), // 15: google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse + (*Workload)(nil), // 16: google.cloud.assuredworkloads.v1beta1.Workload + (*CreateWorkloadOperationMetadata)(nil), // 17: google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata + (*Workload_ResourceInfo)(nil), // 18: google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo + (*Workload_KMSSettings)(nil), // 19: google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings + (*Workload_IL4Settings)(nil), // 20: google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings + (*Workload_CJISSettings)(nil), // 21: google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings + (*Workload_FedrampHighSettings)(nil), // 22: google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings + (*Workload_FedrampModerateSettings)(nil), // 23: google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings + (*Workload_ResourceSettings)(nil), // 24: google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings + (*Workload_SaaEnrollmentResponse)(nil), // 25: google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse + nil, // 26: google.cloud.assuredworkloads.v1beta1.Workload.LabelsEntry + (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask + (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 29: google.protobuf.Duration +} +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_depIdxs = []int32{ + 16, // 0: google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest.workload:type_name -> google.cloud.assuredworkloads.v1beta1.Workload + 16, // 1: google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest.workload:type_name -> google.cloud.assuredworkloads.v1beta1.Workload + 27, // 2: google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 3: google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.restriction_type:type_name -> google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest.RestrictionType + 16, // 4: google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse.workloads:type_name -> google.cloud.assuredworkloads.v1beta1.Workload + 18, // 5: google.cloud.assuredworkloads.v1beta1.Workload.resources:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo + 1, // 6: google.cloud.assuredworkloads.v1beta1.Workload.compliance_regime:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime + 28, // 7: google.cloud.assuredworkloads.v1beta1.Workload.create_time:type_name -> google.protobuf.Timestamp + 20, // 8: google.cloud.assuredworkloads.v1beta1.Workload.il4_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings + 21, // 9: google.cloud.assuredworkloads.v1beta1.Workload.cjis_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings + 22, // 10: google.cloud.assuredworkloads.v1beta1.Workload.fedramp_high_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings + 23, // 11: google.cloud.assuredworkloads.v1beta1.Workload.fedramp_moderate_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings + 26, // 12: google.cloud.assuredworkloads.v1beta1.Workload.labels:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.LabelsEntry + 19, // 13: google.cloud.assuredworkloads.v1beta1.Workload.kms_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings + 24, // 14: google.cloud.assuredworkloads.v1beta1.Workload.resource_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings + 2, // 15: google.cloud.assuredworkloads.v1beta1.Workload.kaj_enrollment_state:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.KajEnrollmentState + 25, // 16: google.cloud.assuredworkloads.v1beta1.Workload.saa_enrollment_response:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse + 28, // 17: google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 1, // 18: google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata.compliance_regime:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime + 24, // 19: google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata.resource_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings + 3, // 20: google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.resource_type:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType + 28, // 21: google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings.next_rotation_time:type_name -> google.protobuf.Timestamp + 29, // 22: google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings.rotation_period:type_name -> google.protobuf.Duration + 19, // 23: google.cloud.assuredworkloads.v1beta1.Workload.IL4Settings.kms_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings + 19, // 24: google.cloud.assuredworkloads.v1beta1.Workload.CJISSettings.kms_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings + 19, // 25: google.cloud.assuredworkloads.v1beta1.Workload.FedrampHighSettings.kms_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings + 19, // 26: google.cloud.assuredworkloads.v1beta1.Workload.FedrampModerateSettings.kms_settings:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings + 3, // 27: google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings.resource_type:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType + 4, // 28: google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.setup_status:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState + 5, // 29: google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.setup_errors:type_name -> google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError + 30, // [30:30] is the sub-list for method output_type + 30, // [30:30] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_init() } +func file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_init() { + if File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestrictAllowedResourcesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestrictAllowedResourcesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteWorkloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnalyzeWorkloadMoveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnalyzeWorkloadMoveResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkloadsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkloadsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkloadOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_ResourceInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_KMSSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_IL4Settings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_CJISSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_FedrampHighSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_FedrampModerateSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_ResourceSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload_SaaEnrollmentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*AnalyzeWorkloadMoveRequest_Source)(nil), + (*AnalyzeWorkloadMoveRequest_Project)(nil), + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*Workload_Il4Settings)(nil), + (*Workload_CjisSettings)(nil), + (*Workload_FedrampHighSettings_)(nil), + (*Workload_FedrampModerateSettings_)(nil), + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes[19].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDesc, + NumEnums: 6, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_goTypes, + DependencyIndexes: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_depIdxs, + EnumInfos: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_enumTypes, + MessageInfos: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_msgTypes, + }.Build() + File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto = out.File + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_rawDesc = nil + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_goTypes = nil + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_depIdxs = nil +} diff --git a/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go new file mode 100644 index 000000000000..0f977c6f8984 --- /dev/null +++ b/assuredworkloads/apiv1beta1/assuredworkloadspb/assuredworkloads_service.pb.go @@ -0,0 +1,573 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto + +package assuredworkloadspb + +import ( + context "context" + reflect "reflect" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto protoreflect.FileDescriptor + +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x90, 0x0b, 0x0a, 0x17, 0x41, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0xf9, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x89, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, 0x37, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x73, 0x3a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0xda, 0x41, 0x0f, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0xca, 0x41, + 0x2b, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x98, 0x01, 0x0a, + 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, + 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x17, + 0xda, 0x41, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x88, 0x02, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x74, + 0x72, 0x69, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x74, 0x72, 0x69, 0x63, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x55, 0x22, 0x50, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x41, + 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, + 0x01, 0x2a, 0x12, 0xae, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x46, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, + 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x22, + 0x07, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x13, 0x41, 0x6e, 0x61, + 0x6c, 0x79, 0x7a, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x76, 0x65, + 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, + 0x79, 0x7a, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x76, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0xda, 0x41, 0x0e, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x4c, + 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x3b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x1a, 0x53, 0xca, 0x41, 0x1f, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x9d, 0x02, 0x0a, 0x29, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x73, 0x73, + 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x1c, 0x41, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0xaa, 0x02, 0x25, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x73, 0x73, 0x75, + 0x72, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x2e, 0x56, 0x31, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x25, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x73, 0x73, 0x75, 0x72, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x28, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x73, + 0x73, 0x75, 0x72, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_goTypes = []interface{}{ + (*CreateWorkloadRequest)(nil), // 0: google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest + (*UpdateWorkloadRequest)(nil), // 1: google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest + (*RestrictAllowedResourcesRequest)(nil), // 2: google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest + (*DeleteWorkloadRequest)(nil), // 3: google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest + (*GetWorkloadRequest)(nil), // 4: google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest + (*AnalyzeWorkloadMoveRequest)(nil), // 5: google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest + (*ListWorkloadsRequest)(nil), // 6: google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest + (*longrunning.Operation)(nil), // 7: google.longrunning.Operation + (*Workload)(nil), // 8: google.cloud.assuredworkloads.v1beta1.Workload + (*RestrictAllowedResourcesResponse)(nil), // 9: google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse + (*emptypb.Empty)(nil), // 10: google.protobuf.Empty + (*AnalyzeWorkloadMoveResponse)(nil), // 11: google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse + (*ListWorkloadsResponse)(nil), // 12: google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse +} +var file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_depIdxs = []int32{ + 0, // 0: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.CreateWorkload:input_type -> google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest + 1, // 1: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.UpdateWorkload:input_type -> google.cloud.assuredworkloads.v1beta1.UpdateWorkloadRequest + 2, // 2: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.RestrictAllowedResources:input_type -> google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesRequest + 3, // 3: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.DeleteWorkload:input_type -> google.cloud.assuredworkloads.v1beta1.DeleteWorkloadRequest + 4, // 4: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.GetWorkload:input_type -> google.cloud.assuredworkloads.v1beta1.GetWorkloadRequest + 5, // 5: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.AnalyzeWorkloadMove:input_type -> google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveRequest + 6, // 6: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.ListWorkloads:input_type -> google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest + 7, // 7: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.CreateWorkload:output_type -> google.longrunning.Operation + 8, // 8: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.UpdateWorkload:output_type -> google.cloud.assuredworkloads.v1beta1.Workload + 9, // 9: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.RestrictAllowedResources:output_type -> google.cloud.assuredworkloads.v1beta1.RestrictAllowedResourcesResponse + 10, // 10: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.DeleteWorkload:output_type -> google.protobuf.Empty + 8, // 11: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.GetWorkload:output_type -> google.cloud.assuredworkloads.v1beta1.Workload + 11, // 12: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.AnalyzeWorkloadMove:output_type -> google.cloud.assuredworkloads.v1beta1.AnalyzeWorkloadMoveResponse + 12, // 13: google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService.ListWorkloads:output_type -> google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse + 7, // [7:14] is the sub-list for method output_type + 0, // [0:7] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_init() } +func file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_init() { + if File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto != nil { + return + } + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_goTypes, + DependencyIndexes: file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_depIdxs, + }.Build() + File_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto = out.File + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_rawDesc = nil + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_goTypes = nil + file_google_cloud_assuredworkloads_v1beta1_assuredworkloads_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AssuredWorkloadsServiceClient is the client API for AssuredWorkloadsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AssuredWorkloadsServiceClient interface { + // Creates Assured Workload. + CreateWorkload(ctx context.Context, in *CreateWorkloadRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Updates an existing workload. + // Currently allows updating of workload display_name and labels. + // For force updates don't set etag field in the Workload. + // Only one update operation per workload can be in progress. + UpdateWorkload(ctx context.Context, in *UpdateWorkloadRequest, opts ...grpc.CallOption) (*Workload, error) + // Restrict the list of resources allowed in the Workload environment. + // The current list of allowed products can be found at + // https://cloud.google.com/assured-workloads/docs/supported-products + // In addition to assuredworkloads.workload.update permission, the user should + // also have orgpolicy.policy.set permission on the folder resource + // to use this functionality. + RestrictAllowedResources(ctx context.Context, in *RestrictAllowedResourcesRequest, opts ...grpc.CallOption) (*RestrictAllowedResourcesResponse, error) + // Deletes the workload. Make sure that workload's direct children are already + // in a deleted state, otherwise the request will fail with a + // FAILED_PRECONDITION error. + // In addition to assuredworkloads.workload.delete permission, the user should + // also have orgpolicy.policy.set permission on the deleted folder to remove + // Assured Workloads OrgPolicies. + DeleteWorkload(ctx context.Context, in *DeleteWorkloadRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Gets Assured Workload associated with a CRM Node + GetWorkload(ctx context.Context, in *GetWorkloadRequest, opts ...grpc.CallOption) (*Workload, error) + // Analyze if the source Assured Workloads can be moved to the target Assured + // Workload + AnalyzeWorkloadMove(ctx context.Context, in *AnalyzeWorkloadMoveRequest, opts ...grpc.CallOption) (*AnalyzeWorkloadMoveResponse, error) + // Lists Assured Workloads under a CRM Node. + ListWorkloads(ctx context.Context, in *ListWorkloadsRequest, opts ...grpc.CallOption) (*ListWorkloadsResponse, error) +} + +type assuredWorkloadsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAssuredWorkloadsServiceClient(cc grpc.ClientConnInterface) AssuredWorkloadsServiceClient { + return &assuredWorkloadsServiceClient{cc} +} + +func (c *assuredWorkloadsServiceClient) CreateWorkload(ctx context.Context, in *CreateWorkloadRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/CreateWorkload", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assuredWorkloadsServiceClient) UpdateWorkload(ctx context.Context, in *UpdateWorkloadRequest, opts ...grpc.CallOption) (*Workload, error) { + out := new(Workload) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/UpdateWorkload", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assuredWorkloadsServiceClient) RestrictAllowedResources(ctx context.Context, in *RestrictAllowedResourcesRequest, opts ...grpc.CallOption) (*RestrictAllowedResourcesResponse, error) { + out := new(RestrictAllowedResourcesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/RestrictAllowedResources", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assuredWorkloadsServiceClient) DeleteWorkload(ctx context.Context, in *DeleteWorkloadRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/DeleteWorkload", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assuredWorkloadsServiceClient) GetWorkload(ctx context.Context, in *GetWorkloadRequest, opts ...grpc.CallOption) (*Workload, error) { + out := new(Workload) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/GetWorkload", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assuredWorkloadsServiceClient) AnalyzeWorkloadMove(ctx context.Context, in *AnalyzeWorkloadMoveRequest, opts ...grpc.CallOption) (*AnalyzeWorkloadMoveResponse, error) { + out := new(AnalyzeWorkloadMoveResponse) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/AnalyzeWorkloadMove", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *assuredWorkloadsServiceClient) ListWorkloads(ctx context.Context, in *ListWorkloadsRequest, opts ...grpc.CallOption) (*ListWorkloadsResponse, error) { + out := new(ListWorkloadsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/ListWorkloads", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AssuredWorkloadsServiceServer is the server API for AssuredWorkloadsService service. +type AssuredWorkloadsServiceServer interface { + // Creates Assured Workload. + CreateWorkload(context.Context, *CreateWorkloadRequest) (*longrunning.Operation, error) + // Updates an existing workload. + // Currently allows updating of workload display_name and labels. + // For force updates don't set etag field in the Workload. + // Only one update operation per workload can be in progress. + UpdateWorkload(context.Context, *UpdateWorkloadRequest) (*Workload, error) + // Restrict the list of resources allowed in the Workload environment. + // The current list of allowed products can be found at + // https://cloud.google.com/assured-workloads/docs/supported-products + // In addition to assuredworkloads.workload.update permission, the user should + // also have orgpolicy.policy.set permission on the folder resource + // to use this functionality. + RestrictAllowedResources(context.Context, *RestrictAllowedResourcesRequest) (*RestrictAllowedResourcesResponse, error) + // Deletes the workload. Make sure that workload's direct children are already + // in a deleted state, otherwise the request will fail with a + // FAILED_PRECONDITION error. + // In addition to assuredworkloads.workload.delete permission, the user should + // also have orgpolicy.policy.set permission on the deleted folder to remove + // Assured Workloads OrgPolicies. + DeleteWorkload(context.Context, *DeleteWorkloadRequest) (*emptypb.Empty, error) + // Gets Assured Workload associated with a CRM Node + GetWorkload(context.Context, *GetWorkloadRequest) (*Workload, error) + // Analyze if the source Assured Workloads can be moved to the target Assured + // Workload + AnalyzeWorkloadMove(context.Context, *AnalyzeWorkloadMoveRequest) (*AnalyzeWorkloadMoveResponse, error) + // Lists Assured Workloads under a CRM Node. + ListWorkloads(context.Context, *ListWorkloadsRequest) (*ListWorkloadsResponse, error) +} + +// UnimplementedAssuredWorkloadsServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAssuredWorkloadsServiceServer struct { +} + +func (*UnimplementedAssuredWorkloadsServiceServer) CreateWorkload(context.Context, *CreateWorkloadRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkload not implemented") +} +func (*UnimplementedAssuredWorkloadsServiceServer) UpdateWorkload(context.Context, *UpdateWorkloadRequest) (*Workload, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkload not implemented") +} +func (*UnimplementedAssuredWorkloadsServiceServer) RestrictAllowedResources(context.Context, *RestrictAllowedResourcesRequest) (*RestrictAllowedResourcesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestrictAllowedResources not implemented") +} +func (*UnimplementedAssuredWorkloadsServiceServer) DeleteWorkload(context.Context, *DeleteWorkloadRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkload not implemented") +} +func (*UnimplementedAssuredWorkloadsServiceServer) GetWorkload(context.Context, *GetWorkloadRequest) (*Workload, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkload not implemented") +} +func (*UnimplementedAssuredWorkloadsServiceServer) AnalyzeWorkloadMove(context.Context, *AnalyzeWorkloadMoveRequest) (*AnalyzeWorkloadMoveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnalyzeWorkloadMove not implemented") +} +func (*UnimplementedAssuredWorkloadsServiceServer) ListWorkloads(context.Context, *ListWorkloadsRequest) (*ListWorkloadsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkloads not implemented") +} + +func RegisterAssuredWorkloadsServiceServer(s *grpc.Server, srv AssuredWorkloadsServiceServer) { + s.RegisterService(&_AssuredWorkloadsService_serviceDesc, srv) +} + +func _AssuredWorkloadsService_CreateWorkload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkloadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).CreateWorkload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/CreateWorkload", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).CreateWorkload(ctx, req.(*CreateWorkloadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssuredWorkloadsService_UpdateWorkload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkloadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).UpdateWorkload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/UpdateWorkload", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).UpdateWorkload(ctx, req.(*UpdateWorkloadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssuredWorkloadsService_RestrictAllowedResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestrictAllowedResourcesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).RestrictAllowedResources(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/RestrictAllowedResources", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).RestrictAllowedResources(ctx, req.(*RestrictAllowedResourcesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssuredWorkloadsService_DeleteWorkload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteWorkloadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).DeleteWorkload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/DeleteWorkload", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).DeleteWorkload(ctx, req.(*DeleteWorkloadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssuredWorkloadsService_GetWorkload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkloadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).GetWorkload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/GetWorkload", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).GetWorkload(ctx, req.(*GetWorkloadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssuredWorkloadsService_AnalyzeWorkloadMove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AnalyzeWorkloadMoveRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).AnalyzeWorkloadMove(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/AnalyzeWorkloadMove", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).AnalyzeWorkloadMove(ctx, req.(*AnalyzeWorkloadMoveRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AssuredWorkloadsService_ListWorkloads_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkloadsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AssuredWorkloadsServiceServer).ListWorkloads(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService/ListWorkloads", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AssuredWorkloadsServiceServer).ListWorkloads(ctx, req.(*ListWorkloadsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AssuredWorkloadsService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService", + HandlerType: (*AssuredWorkloadsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateWorkload", + Handler: _AssuredWorkloadsService_CreateWorkload_Handler, + }, + { + MethodName: "UpdateWorkload", + Handler: _AssuredWorkloadsService_UpdateWorkload_Handler, + }, + { + MethodName: "RestrictAllowedResources", + Handler: _AssuredWorkloadsService_RestrictAllowedResources_Handler, + }, + { + MethodName: "DeleteWorkload", + Handler: _AssuredWorkloadsService_DeleteWorkload_Handler, + }, + { + MethodName: "GetWorkload", + Handler: _AssuredWorkloadsService_GetWorkload_Handler, + }, + { + MethodName: "AnalyzeWorkloadMove", + Handler: _AssuredWorkloadsService_AnalyzeWorkloadMove_Handler, + }, + { + MethodName: "ListWorkloads", + Handler: _AssuredWorkloadsService_ListWorkloads_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto", +} diff --git a/assuredworkloads/apiv1beta1/doc.go b/assuredworkloads/apiv1beta1/doc.go index b0d529cac149..8417adf76683 100644 --- a/assuredworkloads/apiv1beta1/doc.go +++ b/assuredworkloads/apiv1beta1/doc.go @@ -17,50 +17,61 @@ // Package assuredworkloads is an auto-generated package for the // Assured Workloads API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := assuredworkloads.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := assuredworkloads.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := assuredworkloads.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &assuredworkloadspb.CreateWorkloadRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1beta1#CreateWorkloadRequest. -// } -// op, err := c.CreateWorkload(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := assuredworkloads.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &assuredworkloadspb.CreateWorkloadRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1beta1#CreateWorkloadRequest. +// } +// op, err := c.CreateWorkload(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/assuredworkloads/apiv1beta1/gapic_metadata.json b/assuredworkloads/apiv1beta1/gapic_metadata.json index dd0ab7e9c5a7..d914a4d09ce3 100644 --- a/assuredworkloads/apiv1beta1/gapic_metadata.json +++ b/assuredworkloads/apiv1beta1/gapic_metadata.json @@ -10,6 +10,11 @@ "grpc": { "libraryClient": "Client", "rpcs": { + "AnalyzeWorkloadMove": { + "methods": [ + "AnalyzeWorkloadMove" + ] + }, "CreateWorkload": { "methods": [ "CreateWorkload" @@ -20,16 +25,31 @@ "DeleteWorkload" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetWorkload": { "methods": [ "GetWorkload" ] }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListWorkloads": { "methods": [ "ListWorkloads" ] }, + "RestrictAllowedResources": { + "methods": [ + "RestrictAllowedResources" + ] + }, "UpdateWorkload": { "methods": [ "UpdateWorkload" @@ -40,6 +60,11 @@ "rest": { "libraryClient": "Client", "rpcs": { + "AnalyzeWorkloadMove": { + "methods": [ + "AnalyzeWorkloadMove" + ] + }, "CreateWorkload": { "methods": [ "CreateWorkload" @@ -50,16 +75,31 @@ "DeleteWorkload" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetWorkload": { "methods": [ "GetWorkload" ] }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListWorkloads": { "methods": [ "ListWorkloads" ] }, + "RestrictAllowedResources": { + "methods": [ + "RestrictAllowedResources" + ] + }, "UpdateWorkload": { "methods": [ "UpdateWorkload" diff --git a/assuredworkloads/go.mod b/assuredworkloads/go.mod index 9ab9c7570b76..1654b41bc395 100644 --- a/assuredworkloads/go.mod +++ b/assuredworkloads/go.mod @@ -5,10 +5,10 @@ go 1.18 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/assuredworkloads/go.sum b/assuredworkloads/go.sum index f00d995cec43..8bfc50c41a3e 100644 --- a/assuredworkloads/go.sum +++ b/assuredworkloads/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5 h1:ou3VRVAif8UJqz3l1r4Isoz7rrUWHWDHBonShMNYoQs= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/assuredworkloads/go_mod_tidy_hack.go b/assuredworkloads/go_mod_tidy_hack.go deleted file mode 100644 index d91c28a56686..000000000000 --- a/assuredworkloads/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package assuredworkloads - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/assuredworkloads/internal/version.go b/assuredworkloads/internal/version.go index db6d2e3e99d1..e93235c20322 100644 --- a/assuredworkloads/internal/version.go +++ b/assuredworkloads/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.0.0" +const Version = "1.5.0" diff --git a/automl/CHANGES.md b/automl/CHANGES.md index b55830c18430..680d90353ea9 100644 --- a/automl/CHANGES.md +++ b/automl/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/automl/v1.4.0...automl/v1.5.0) (2022-09-19) + + +### Features + +* **automl:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + ## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/automl/v1.3.0...automl/v1.4.0) (2022-06-29) diff --git a/automl/apiv1/auto_ml_client.go b/automl/apiv1/auto_ml_client.go index a1442f25af57..63e6e634d6a7 100644 --- a/automl/apiv1/auto_ml_client.go +++ b/automl/apiv1/auto_ml_client.go @@ -277,7 +277,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -328,11 +329,11 @@ func (c *Client) DeleteDatasetOperation(name string) *DeleteDatasetOperation { // // For Tables: // -// A -// schema_inference_version -// parameter must be explicitly set. -// Returns an empty response in the -// response field when it completes. +// A +// schema_inference_version +// parameter must be explicitly set. +// Returns an empty response in the +// response field when it completes. func (c *Client) ImportData(ctx context.Context, req *automlpb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error) { return c.internalClient.ImportData(ctx, req, opts...) } @@ -560,7 +561,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/automl/apiv1/auto_ml_client_example_test.go b/automl/apiv1/auto_ml_client_example_test.go index 338980b38f9d..201d077dfe43 100644 --- a/automl/apiv1/auto_ml_client_example_test.go +++ b/automl/apiv1/auto_ml_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_CreateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +73,11 @@ func ExampleClient_CreateDataset() { func ExampleClient_GetDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +98,11 @@ func ExampleClient_GetDataset() { func ExampleClient_ListDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleClient_ListDatasets() { func ExampleClient_UpdateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -129,6 +154,11 @@ func ExampleClient_UpdateDataset() { func ExampleClient_DeleteDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -152,6 +182,11 @@ func ExampleClient_DeleteDataset() { func ExampleClient_ImportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -175,6 +210,11 @@ func ExampleClient_ImportData() { func ExampleClient_ExportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -198,6 +238,11 @@ func ExampleClient_ExportData() { func ExampleClient_GetAnnotationSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -218,6 +263,11 @@ func ExampleClient_GetAnnotationSpec() { func ExampleClient_CreateModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -243,6 +293,11 @@ func ExampleClient_CreateModel() { func ExampleClient_GetModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -263,6 +318,11 @@ func ExampleClient_GetModel() { func ExampleClient_ListModels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +349,11 @@ func ExampleClient_ListModels() { func ExampleClient_DeleteModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -312,6 +377,11 @@ func ExampleClient_DeleteModel() { func ExampleClient_UpdateModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -332,6 +402,11 @@ func ExampleClient_UpdateModel() { func ExampleClient_DeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -355,6 +430,11 @@ func ExampleClient_DeployModel() { func ExampleClient_UndeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -378,6 +458,11 @@ func ExampleClient_UndeployModel() { func ExampleClient_ExportModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -401,6 +486,11 @@ func ExampleClient_ExportModel() { func ExampleClient_GetModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -421,6 +511,11 @@ func ExampleClient_GetModelEvaluation() { func ExampleClient_ListModelEvaluations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/automl/apiv1/doc.go b/automl/apiv1/doc.go index 23f5f976094f..7c61b79ec9ee 100644 --- a/automl/apiv1/doc.go +++ b/automl/apiv1/doc.go @@ -20,45 +20,56 @@ // Train high-quality custom machine learning models with minimum effort and // machine learning expertise. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := automl.NewPredictionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := automl.NewPredictionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := automl.NewPredictionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &automlpb.PredictRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/automl/v1#PredictRequest. -// } -// resp, err := c.Predict(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := automl.NewPredictionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &automlpb.PredictRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/automl/v1#PredictRequest. +// } +// resp, err := c.Predict(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewPredictionClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/automl/apiv1/mock_test.go b/automl/apiv1/mock_test.go deleted file mode 100644 index 59548484f4d3..000000000000 --- a/automl/apiv1/mock_test.go +++ /dev/null @@ -1,1870 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package automl - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - automlpb "google.golang.org/genproto/googleapis/cloud/automl/v1" - longrunningpb "google.golang.org/genproto/googleapis/longrunning" - field_maskpb "google.golang.org/genproto/protobuf/field_mask" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockAutoMlServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - automlpb.AutoMlServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockAutoMlServer) CreateDataset(ctx context.Context, req *automlpb.CreateDatasetRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetDataset(ctx context.Context, req *automlpb.GetDatasetRequest) (*automlpb.Dataset, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Dataset), nil -} - -func (s *mockAutoMlServer) ListDatasets(ctx context.Context, req *automlpb.ListDatasetsRequest) (*automlpb.ListDatasetsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListDatasetsResponse), nil -} - -func (s *mockAutoMlServer) UpdateDataset(ctx context.Context, req *automlpb.UpdateDatasetRequest) (*automlpb.Dataset, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Dataset), nil -} - -func (s *mockAutoMlServer) DeleteDataset(ctx context.Context, req *automlpb.DeleteDatasetRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ImportData(ctx context.Context, req *automlpb.ImportDataRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ExportData(ctx context.Context, req *automlpb.ExportDataRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetAnnotationSpec(ctx context.Context, req *automlpb.GetAnnotationSpecRequest) (*automlpb.AnnotationSpec, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.AnnotationSpec), nil -} - -func (s *mockAutoMlServer) CreateModel(ctx context.Context, req *automlpb.CreateModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetModel(ctx context.Context, req *automlpb.GetModelRequest) (*automlpb.Model, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Model), nil -} - -func (s *mockAutoMlServer) ListModels(ctx context.Context, req *automlpb.ListModelsRequest) (*automlpb.ListModelsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListModelsResponse), nil -} - -func (s *mockAutoMlServer) DeleteModel(ctx context.Context, req *automlpb.DeleteModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) UpdateModel(ctx context.Context, req *automlpb.UpdateModelRequest) (*automlpb.Model, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Model), nil -} - -func (s *mockAutoMlServer) DeployModel(ctx context.Context, req *automlpb.DeployModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) UndeployModel(ctx context.Context, req *automlpb.UndeployModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ExportModel(ctx context.Context, req *automlpb.ExportModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetModelEvaluation(ctx context.Context, req *automlpb.GetModelEvaluationRequest) (*automlpb.ModelEvaluation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ModelEvaluation), nil -} - -func (s *mockAutoMlServer) ListModelEvaluations(ctx context.Context, req *automlpb.ListModelEvaluationsRequest) (*automlpb.ListModelEvaluationsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListModelEvaluationsResponse), nil -} - -type mockPredictionServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - automlpb.PredictionServiceServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockPredictionServer) Predict(ctx context.Context, req *automlpb.PredictRequest) (*automlpb.PredictResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.PredictResponse), nil -} - -func (s *mockPredictionServer) BatchPredict(ctx context.Context, req *automlpb.BatchPredictRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockAutoMl mockAutoMlServer - mockPrediction mockPredictionServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - automlpb.RegisterAutoMlServer(serv, &mockAutoMl) - automlpb.RegisterPredictionServiceServer(serv, &mockPrediction) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestAutoMlCreateDataset(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var exampleCount int32 = 1517063674 - var etag string = "etag3123477" - var expectedResponse = &automlpb.Dataset{ - Name: name, - DisplayName: displayName, - Description: description, - ExampleCount: exampleCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var request = &automlpb.CreateDatasetRequest{ - Parent: formattedParent, - Dataset: dataset, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateDataset(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlCreateDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var request = &automlpb.CreateDatasetRequest{ - Parent: formattedParent, - Dataset: dataset, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateDataset(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlUpdateDataset(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var exampleCount int32 = 1517063674 - var etag string = "etag3123477" - var expectedResponse = &automlpb.Dataset{ - Name: name, - DisplayName: displayName, - Description: description, - ExampleCount: exampleCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &automlpb.UpdateDatasetRequest{ - Dataset: dataset, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateDataset(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlUpdateDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &automlpb.UpdateDatasetRequest{ - Dataset: dataset, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateDataset(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetDataset(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var exampleCount int32 = 1517063674 - var etag string = "etag3123477" - var expectedResponse = &automlpb.Dataset{ - Name: name2, - DisplayName: displayName, - Description: description, - ExampleCount: exampleCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.GetDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetDataset(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.GetDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetDataset(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListDatasets(t *testing.T) { - var nextPageToken string = "" - var datasetsElement *automlpb.Dataset = &automlpb.Dataset{} - var datasets = []*automlpb.Dataset{datasetsElement} - var expectedResponse = &automlpb.ListDatasetsResponse{ - NextPageToken: nextPageToken, - Datasets: datasets, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListDatasetsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListDatasets(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Datasets[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListDatasetsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListDatasetsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListDatasets(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlDeleteDataset(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.DeleteDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteDataset(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlDeleteDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.DeleteDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteDataset(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlImportData(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var inputConfig *automlpb.InputConfig = &automlpb.InputConfig{} - var request = &automlpb.ImportDataRequest{ - Name: formattedName, - InputConfig: inputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ImportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlImportDataError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var inputConfig *automlpb.InputConfig = &automlpb.InputConfig{} - var request = &automlpb.ImportDataRequest{ - Name: formattedName, - InputConfig: inputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ImportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlExportData(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var outputConfig *automlpb.OutputConfig = &automlpb.OutputConfig{} - var request = &automlpb.ExportDataRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlExportDataError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var outputConfig *automlpb.OutputConfig = &automlpb.OutputConfig{} - var request = &automlpb.ExportDataRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlGetAnnotationSpec(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var exampleCount int32 = 1517063674 - var expectedResponse = &automlpb.AnnotationSpec{ - Name: name2, - DisplayName: displayName, - ExampleCount: exampleCount, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/annotationSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]") - var request = &automlpb.GetAnnotationSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetAnnotationSpec(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetAnnotationSpecError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/annotationSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]") - var request = &automlpb.GetAnnotationSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetAnnotationSpec(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlCreateModel(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var datasetId string = "datasetId-2115646910" - var etag string = "etag3123477" - var expectedResponse = &automlpb.Model{ - Name: name, - DisplayName: displayName, - DatasetId: datasetId, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var model *automlpb.Model = &automlpb.Model{} - var request = &automlpb.CreateModelRequest{ - Parent: formattedParent, - Model: model, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlCreateModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var model *automlpb.Model = &automlpb.Model{} - var request = &automlpb.CreateModelRequest{ - Parent: formattedParent, - Model: model, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetModel(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var datasetId string = "datasetId-2115646910" - var etag string = "etag3123477" - var expectedResponse = &automlpb.Model{ - Name: name2, - DisplayName: displayName, - DatasetId: datasetId, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.GetModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModel(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.GetModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModel(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlUpdateModel(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var datasetId string = "datasetId-2115646910" - var etag string = "etag3123477" - var expectedResponse = &automlpb.Model{ - Name: name, - DisplayName: displayName, - DatasetId: datasetId, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var model *automlpb.Model = &automlpb.Model{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &automlpb.UpdateModelRequest{ - Model: model, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateModel(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlUpdateModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var model *automlpb.Model = &automlpb.Model{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &automlpb.UpdateModelRequest{ - Model: model, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateModel(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListModels(t *testing.T) { - var nextPageToken string = "" - var modelElement *automlpb.Model = &automlpb.Model{} - var model = []*automlpb.Model{modelElement} - var expectedResponse = &automlpb.ListModelsResponse{ - NextPageToken: nextPageToken, - Model: model, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListModelsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModels(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Model[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListModelsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListModelsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModels(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlDeleteModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeleteModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlDeleteModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeleteModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlDeployModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlDeployModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlUndeployModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.UndeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.UndeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlUndeployModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.UndeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.UndeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlExportModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var outputConfig *automlpb.ModelExportOutputConfig = &automlpb.ModelExportOutputConfig{} - var request = &automlpb.ExportModelRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlExportModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var outputConfig *automlpb.ModelExportOutputConfig = &automlpb.ModelExportOutputConfig{} - var request = &automlpb.ExportModelRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlGetModelEvaluation(t *testing.T) { - var name2 string = "name2-1052831874" - var annotationSpecId string = "annotationSpecId60690191" - var displayName string = "displayName1615086568" - var evaluatedExampleCount int32 = 277565350 - var expectedResponse = &automlpb.ModelEvaluation{ - Name: name2, - AnnotationSpecId: annotationSpecId, - DisplayName: displayName, - EvaluatedExampleCount: evaluatedExampleCount, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s/modelEvaluations/%s", "[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]") - var request = &automlpb.GetModelEvaluationRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModelEvaluation(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetModelEvaluationError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s/modelEvaluations/%s", "[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]") - var request = &automlpb.GetModelEvaluationRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModelEvaluation(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListModelEvaluations(t *testing.T) { - var nextPageToken string = "" - var modelEvaluationElement *automlpb.ModelEvaluation = &automlpb.ModelEvaluation{} - var modelEvaluation = []*automlpb.ModelEvaluation{modelEvaluationElement} - var expectedResponse = &automlpb.ListModelEvaluationsResponse{ - NextPageToken: nextPageToken, - ModelEvaluation: modelEvaluation, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var filter string = "filter-1274492040" - var request = &automlpb.ListModelEvaluationsRequest{ - Parent: formattedParent, - Filter: filter, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModelEvaluations(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.ModelEvaluation[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListModelEvaluationsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var filter string = "filter-1274492040" - var request = &automlpb.ListModelEvaluationsRequest{ - Parent: formattedParent, - Filter: filter, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModelEvaluations(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestPredictionServicePredict(t *testing.T) { - var expectedResponse *automlpb.PredictResponse = &automlpb.PredictResponse{} - - mockPrediction.err = nil - mockPrediction.reqs = nil - - mockPrediction.resps = append(mockPrediction.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var payload *automlpb.ExamplePayload = &automlpb.ExamplePayload{} - var request = &automlpb.PredictRequest{ - Name: formattedName, - Payload: payload, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.Predict(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockPrediction.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestPredictionServicePredictError(t *testing.T) { - errCode := codes.PermissionDenied - mockPrediction.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var payload *automlpb.ExamplePayload = &automlpb.ExamplePayload{} - var request = &automlpb.PredictRequest{ - Name: formattedName, - Payload: payload, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.Predict(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestPredictionServiceBatchPredict(t *testing.T) { - var expectedResponse *automlpb.BatchPredictResult = &automlpb.BatchPredictResult{} - - mockPrediction.err = nil - mockPrediction.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockPrediction.resps = append(mockPrediction.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var inputConfig *automlpb.BatchPredictInputConfig = &automlpb.BatchPredictInputConfig{} - var outputConfig *automlpb.BatchPredictOutputConfig = &automlpb.BatchPredictOutputConfig{} - var request = &automlpb.BatchPredictRequest{ - Name: formattedName, - InputConfig: inputConfig, - OutputConfig: outputConfig, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchPredict(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockPrediction.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestPredictionServiceBatchPredictError(t *testing.T) { - errCode := codes.PermissionDenied - mockPrediction.err = nil - mockPrediction.resps = append(mockPrediction.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var inputConfig *automlpb.BatchPredictInputConfig = &automlpb.BatchPredictInputConfig{} - var outputConfig *automlpb.BatchPredictOutputConfig = &automlpb.BatchPredictOutputConfig{} - var request = &automlpb.BatchPredictRequest{ - Name: formattedName, - InputConfig: inputConfig, - OutputConfig: outputConfig, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchPredict(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/automl/apiv1/prediction_client.go b/automl/apiv1/prediction_client.go index f1d87569bd3d..95d04d899e83 100644 --- a/automl/apiv1/prediction_client.go +++ b/automl/apiv1/prediction_client.go @@ -109,7 +109,8 @@ func (c *PredictionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PredictionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -120,36 +121,36 @@ func (c *PredictionClient) Connection() *grpc.ClientConn { // // AutoML Vision Classification // -// An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. +// An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. // // AutoML Vision Object Detection // -// An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. +// An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. // // AutoML Natural Language Classification // -// A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in -// .PDF, .TIF or .TIFF format with size upto 2MB. +// A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in +// .PDF, .TIF or .TIFF format with size upto 2MB. // // AutoML Natural Language Entity Extraction // -// A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document -// in .PDF, .TIF or .TIFF format with size upto 20MB. +// A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document +// in .PDF, .TIF or .TIFF format with size upto 20MB. // // AutoML Natural Language Sentiment Analysis // -// A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in -// .PDF, .TIF or .TIFF format with size upto 2MB. +// A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in +// .PDF, .TIF or .TIFF format with size upto 2MB. // // AutoML Translation // -// A TextSnippet up to 25,000 characters, UTF-8 encoded. +// A TextSnippet up to 25,000 characters, UTF-8 encoded. // // AutoML Tables // -// A row with column values matching -// the columns of the model, up to 5MB. Not available for FORECASTING -// prediction_type. +// A row with column values matching +// the columns of the model, up to 5MB. Not available for FORECASTING +// prediction_type. func (c *PredictionClient) Predict(ctx context.Context, req *automlpb.PredictRequest, opts ...gax.CallOption) (*automlpb.PredictResponse, error) { return c.internalClient.Predict(ctx, req, opts...) } @@ -162,19 +163,19 @@ func (c *PredictionClient) Predict(ctx context.Context, req *automlpb.PredictReq // the response field. // Available for following ML scenarios: // -// AutoML Vision Classification +// AutoML Vision Classification // -// AutoML Vision Object Detection +// AutoML Vision Object Detection // -// AutoML Video Intelligence Classification +// AutoML Video Intelligence Classification // -// AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification +// AutoML Video Intelligence Object Tracking * AutoML Natural Language Classification // -// AutoML Natural Language Entity Extraction +// AutoML Natural Language Entity Extraction // -// AutoML Natural Language Sentiment Analysis +// AutoML Natural Language Sentiment Analysis // -// AutoML Tables +// AutoML Tables func (c *PredictionClient) BatchPredict(ctx context.Context, req *automlpb.BatchPredictRequest, opts ...gax.CallOption) (*BatchPredictOperation, error) { return c.internalClient.BatchPredict(ctx, req, opts...) } @@ -264,7 +265,8 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *predictionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/automl/apiv1/prediction_client_example_test.go b/automl/apiv1/prediction_client_example_test.go index b93bad46b27f..53e145088756 100644 --- a/automl/apiv1/prediction_client_example_test.go +++ b/automl/apiv1/prediction_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewPredictionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewPredictionClient() { func ExamplePredictionClient_Predict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExamplePredictionClient_Predict() { func ExamplePredictionClient_BatchPredict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/automl/apiv1beta1/auto_ml_client.go b/automl/apiv1beta1/auto_ml_client.go index 94534d855881..5b991abd393d 100644 --- a/automl/apiv1beta1/auto_ml_client.go +++ b/automl/apiv1beta1/auto_ml_client.go @@ -483,7 +483,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -528,11 +529,11 @@ func (c *Client) DeleteDatasetOperation(name string) *DeleteDatasetOperation { // // For Tables: // -// A -// schema_inference_version -// parameter must be explicitly set. -// Returns an empty response in the -// response field when it completes. +// A +// schema_inference_version +// parameter must be explicitly set. +// Returns an empty response in the +// response field when it completes. func (c *Client) ImportData(ctx context.Context, req *automlpb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error) { return c.internalClient.ImportData(ctx, req, opts...) } @@ -811,7 +812,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -923,7 +925,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -1807,8 +1809,12 @@ func (c *restClient) UpdateDataset(ctx context.Context, req *automlpb.UpdateData baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetDataset().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1924,11 +1930,11 @@ func (c *restClient) DeleteDataset(ctx context.Context, req *automlpb.DeleteData // // For Tables: // -// A -// schema_inference_version -// parameter must be explicitly set. -// Returns an empty response in the -// response field when it completes. +// A +// schema_inference_version +// parameter must be explicitly set. +// Returns an empty response in the +// response field when it completes. func (c *restClient) ImportData(ctx context.Context, req *automlpb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -2118,8 +2124,12 @@ func (c *restClient) GetTableSpec(ctx context.Context, req *automlpb.GetTableSpe baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) params := url.Values{} - if req.GetFieldMask().GetPaths() != nil { - params.Add("fieldMask.paths", fmt.Sprintf("%v", req.GetFieldMask().GetPaths())) + if req.GetFieldMask() != nil { + fieldMask, err := protojson.Marshal(req.GetFieldMask()) + if err != nil { + return nil, err + } + params.Add("fieldMask", string(fieldMask)) } baseUrl.RawQuery = params.Encode() @@ -2191,8 +2201,12 @@ func (c *restClient) ListTableSpecs(ctx context.Context, req *automlpb.ListTable baseUrl.Path += fmt.Sprintf("/v1beta1/%v/tableSpecs", req.GetParent()) params := url.Values{} - if req.GetFieldMask().GetPaths() != nil { - params.Add("fieldMask.paths", fmt.Sprintf("%v", req.GetFieldMask().GetPaths())) + if req.GetFieldMask() != nil { + fieldMask, err := protojson.Marshal(req.GetFieldMask()) + if err != nil { + return nil, "", err + } + params.Add("fieldMask", string(fieldMask)) } if req.GetFilter() != "" { params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) @@ -2278,8 +2292,12 @@ func (c *restClient) UpdateTableSpec(ctx context.Context, req *automlpb.UpdateTa baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTableSpec().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -2338,8 +2356,12 @@ func (c *restClient) GetColumnSpec(ctx context.Context, req *automlpb.GetColumnS baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) params := url.Values{} - if req.GetFieldMask().GetPaths() != nil { - params.Add("fieldMask.paths", fmt.Sprintf("%v", req.GetFieldMask().GetPaths())) + if req.GetFieldMask() != nil { + fieldMask, err := protojson.Marshal(req.GetFieldMask()) + if err != nil { + return nil, err + } + params.Add("fieldMask", string(fieldMask)) } baseUrl.RawQuery = params.Encode() @@ -2411,8 +2433,12 @@ func (c *restClient) ListColumnSpecs(ctx context.Context, req *automlpb.ListColu baseUrl.Path += fmt.Sprintf("/v1beta1/%v/columnSpecs", req.GetParent()) params := url.Values{} - if req.GetFieldMask().GetPaths() != nil { - params.Add("fieldMask.paths", fmt.Sprintf("%v", req.GetFieldMask().GetPaths())) + if req.GetFieldMask() != nil { + fieldMask, err := protojson.Marshal(req.GetFieldMask()) + if err != nil { + return nil, "", err + } + params.Add("fieldMask", string(fieldMask)) } if req.GetFilter() != "" { params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) @@ -2498,8 +2524,12 @@ func (c *restClient) UpdateColumnSpec(ctx context.Context, req *automlpb.UpdateC baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetColumnSpec().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() diff --git a/automl/apiv1beta1/auto_ml_client_example_test.go b/automl/apiv1beta1/auto_ml_client_example_test.go index 7d1227b110c3..28d91c700821 100644 --- a/automl/apiv1beta1/auto_ml_client_example_test.go +++ b/automl/apiv1beta1/auto_ml_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewRESTClient() { func ExampleClient_CreateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleClient_CreateDataset() { func ExampleClient_GetDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -90,6 +110,11 @@ func ExampleClient_GetDataset() { func ExampleClient_ListDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -116,6 +141,11 @@ func ExampleClient_ListDatasets() { func ExampleClient_UpdateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -136,6 +166,11 @@ func ExampleClient_UpdateDataset() { func ExampleClient_DeleteDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -159,6 +194,11 @@ func ExampleClient_DeleteDataset() { func ExampleClient_ImportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -182,6 +222,11 @@ func ExampleClient_ImportData() { func ExampleClient_ExportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +250,11 @@ func ExampleClient_ExportData() { func ExampleClient_GetAnnotationSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +275,11 @@ func ExampleClient_GetAnnotationSpec() { func ExampleClient_GetTableSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +300,11 @@ func ExampleClient_GetTableSpec() { func ExampleClient_ListTableSpecs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +331,11 @@ func ExampleClient_ListTableSpecs() { func ExampleClient_UpdateTableSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +356,11 @@ func ExampleClient_UpdateTableSpec() { func ExampleClient_GetColumnSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -311,6 +381,11 @@ func ExampleClient_GetColumnSpec() { func ExampleClient_ListColumnSpecs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -337,6 +412,11 @@ func ExampleClient_ListColumnSpecs() { func ExampleClient_UpdateColumnSpec() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -357,6 +437,11 @@ func ExampleClient_UpdateColumnSpec() { func ExampleClient_CreateModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -382,6 +467,11 @@ func ExampleClient_CreateModel() { func ExampleClient_GetModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -402,6 +492,11 @@ func ExampleClient_GetModel() { func ExampleClient_ListModels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -428,6 +523,11 @@ func ExampleClient_ListModels() { func ExampleClient_DeleteModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -451,6 +551,11 @@ func ExampleClient_DeleteModel() { func ExampleClient_DeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -474,6 +579,11 @@ func ExampleClient_DeployModel() { func ExampleClient_UndeployModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -497,6 +607,11 @@ func ExampleClient_UndeployModel() { func ExampleClient_ExportModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -520,6 +635,11 @@ func ExampleClient_ExportModel() { func ExampleClient_ExportEvaluatedExamples() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -543,6 +663,11 @@ func ExampleClient_ExportEvaluatedExamples() { func ExampleClient_GetModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -563,6 +688,11 @@ func ExampleClient_GetModelEvaluation() { func ExampleClient_ListModelEvaluations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/automl/apiv1beta1/automlpb/annotation_payload.pb.go b/automl/apiv1beta1/automlpb/annotation_payload.pb.go new file mode 100644 index 000000000000..fa8989ef0ceb --- /dev/null +++ b/automl/apiv1beta1/automlpb/annotation_payload.pb.go @@ -0,0 +1,430 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/annotation_payload.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Contains annotation information that is relevant to AutoML. +type AnnotationPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only . Additional information about the annotation + // specific to the AutoML domain. + // + // Types that are assignable to Detail: + // + // *AnnotationPayload_Translation + // *AnnotationPayload_Classification + // *AnnotationPayload_ImageObjectDetection + // *AnnotationPayload_VideoClassification + // *AnnotationPayload_VideoObjectTracking + // *AnnotationPayload_TextExtraction + // *AnnotationPayload_TextSentiment + // *AnnotationPayload_Tables + Detail isAnnotationPayload_Detail `protobuf_oneof:"detail"` + // Output only . The resource ID of the annotation spec that + // this annotation pertains to. The annotation spec comes from either an + // ancestor dataset, or the dataset that was used to train the model in use. + AnnotationSpecId string `protobuf:"bytes,1,opt,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"` + // Output only. The value of + // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] + // when the model was trained. Because this field returns a value at model + // training time, for different models trained using the same dataset, the + // returned value could be different as model owner could update the + // `display_name` between any two model training. + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` +} + +func (x *AnnotationPayload) Reset() { + *x = AnnotationPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotationPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotationPayload) ProtoMessage() {} + +func (x *AnnotationPayload) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotationPayload.ProtoReflect.Descriptor instead. +func (*AnnotationPayload) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescGZIP(), []int{0} +} + +func (m *AnnotationPayload) GetDetail() isAnnotationPayload_Detail { + if m != nil { + return m.Detail + } + return nil +} + +func (x *AnnotationPayload) GetTranslation() *TranslationAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_Translation); ok { + return x.Translation + } + return nil +} + +func (x *AnnotationPayload) GetClassification() *ClassificationAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_Classification); ok { + return x.Classification + } + return nil +} + +func (x *AnnotationPayload) GetImageObjectDetection() *ImageObjectDetectionAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_ImageObjectDetection); ok { + return x.ImageObjectDetection + } + return nil +} + +func (x *AnnotationPayload) GetVideoClassification() *VideoClassificationAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_VideoClassification); ok { + return x.VideoClassification + } + return nil +} + +func (x *AnnotationPayload) GetVideoObjectTracking() *VideoObjectTrackingAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_VideoObjectTracking); ok { + return x.VideoObjectTracking + } + return nil +} + +func (x *AnnotationPayload) GetTextExtraction() *TextExtractionAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_TextExtraction); ok { + return x.TextExtraction + } + return nil +} + +func (x *AnnotationPayload) GetTextSentiment() *TextSentimentAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_TextSentiment); ok { + return x.TextSentiment + } + return nil +} + +func (x *AnnotationPayload) GetTables() *TablesAnnotation { + if x, ok := x.GetDetail().(*AnnotationPayload_Tables); ok { + return x.Tables + } + return nil +} + +func (x *AnnotationPayload) GetAnnotationSpecId() string { + if x != nil { + return x.AnnotationSpecId + } + return "" +} + +func (x *AnnotationPayload) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +type isAnnotationPayload_Detail interface { + isAnnotationPayload_Detail() +} + +type AnnotationPayload_Translation struct { + // Annotation details for translation. + Translation *TranslationAnnotation `protobuf:"bytes,2,opt,name=translation,proto3,oneof"` +} + +type AnnotationPayload_Classification struct { + // Annotation details for content or image classification. + Classification *ClassificationAnnotation `protobuf:"bytes,3,opt,name=classification,proto3,oneof"` +} + +type AnnotationPayload_ImageObjectDetection struct { + // Annotation details for image object detection. + ImageObjectDetection *ImageObjectDetectionAnnotation `protobuf:"bytes,4,opt,name=image_object_detection,json=imageObjectDetection,proto3,oneof"` +} + +type AnnotationPayload_VideoClassification struct { + // Annotation details for video classification. + // Returned for Video Classification predictions. + VideoClassification *VideoClassificationAnnotation `protobuf:"bytes,9,opt,name=video_classification,json=videoClassification,proto3,oneof"` +} + +type AnnotationPayload_VideoObjectTracking struct { + // Annotation details for video object tracking. + VideoObjectTracking *VideoObjectTrackingAnnotation `protobuf:"bytes,8,opt,name=video_object_tracking,json=videoObjectTracking,proto3,oneof"` +} + +type AnnotationPayload_TextExtraction struct { + // Annotation details for text extraction. + TextExtraction *TextExtractionAnnotation `protobuf:"bytes,6,opt,name=text_extraction,json=textExtraction,proto3,oneof"` +} + +type AnnotationPayload_TextSentiment struct { + // Annotation details for text sentiment. + TextSentiment *TextSentimentAnnotation `protobuf:"bytes,7,opt,name=text_sentiment,json=textSentiment,proto3,oneof"` +} + +type AnnotationPayload_Tables struct { + // Annotation details for Tables. + Tables *TablesAnnotation `protobuf:"bytes,10,opt,name=tables,proto3,oneof"` +} + +func (*AnnotationPayload_Translation) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_Classification) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_ImageObjectDetection) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_VideoClassification) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_VideoObjectTracking) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_TextExtraction) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_TextSentiment) isAnnotationPayload_Detail() {} + +func (*AnnotationPayload_Tables) isAnnotationPayload_Detail() {} + +var File_google_cloud_automl_v1beta1_annotation_payload_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x78, + 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x89, 0x07, 0x0a, 0x11, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x56, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, + 0x0a, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x73, 0x0a, 0x16, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6f, 0x0a, 0x14, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, 0x15, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x0f, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x65, 0x78, 0x74, 0x45, + 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x0e, 0x74, 0x65, 0x78, + 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x65, 0x78, 0x74, 0x53, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x42, 0xa5, 0x01, 0x0a, + 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescData = file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_annotation_payload_proto_goTypes = []interface{}{ + (*AnnotationPayload)(nil), // 0: google.cloud.automl.v1beta1.AnnotationPayload + (*TranslationAnnotation)(nil), // 1: google.cloud.automl.v1beta1.TranslationAnnotation + (*ClassificationAnnotation)(nil), // 2: google.cloud.automl.v1beta1.ClassificationAnnotation + (*ImageObjectDetectionAnnotation)(nil), // 3: google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + (*VideoClassificationAnnotation)(nil), // 4: google.cloud.automl.v1beta1.VideoClassificationAnnotation + (*VideoObjectTrackingAnnotation)(nil), // 5: google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + (*TextExtractionAnnotation)(nil), // 6: google.cloud.automl.v1beta1.TextExtractionAnnotation + (*TextSentimentAnnotation)(nil), // 7: google.cloud.automl.v1beta1.TextSentimentAnnotation + (*TablesAnnotation)(nil), // 8: google.cloud.automl.v1beta1.TablesAnnotation +} +var file_google_cloud_automl_v1beta1_annotation_payload_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.AnnotationPayload.translation:type_name -> google.cloud.automl.v1beta1.TranslationAnnotation + 2, // 1: google.cloud.automl.v1beta1.AnnotationPayload.classification:type_name -> google.cloud.automl.v1beta1.ClassificationAnnotation + 3, // 2: google.cloud.automl.v1beta1.AnnotationPayload.image_object_detection:type_name -> google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + 4, // 3: google.cloud.automl.v1beta1.AnnotationPayload.video_classification:type_name -> google.cloud.automl.v1beta1.VideoClassificationAnnotation + 5, // 4: google.cloud.automl.v1beta1.AnnotationPayload.video_object_tracking:type_name -> google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + 6, // 5: google.cloud.automl.v1beta1.AnnotationPayload.text_extraction:type_name -> google.cloud.automl.v1beta1.TextExtractionAnnotation + 7, // 6: google.cloud.automl.v1beta1.AnnotationPayload.text_sentiment:type_name -> google.cloud.automl.v1beta1.TextSentimentAnnotation + 8, // 7: google.cloud.automl.v1beta1.AnnotationPayload.tables:type_name -> google.cloud.automl.v1beta1.TablesAnnotation + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_annotation_payload_proto_init() } +func file_google_cloud_automl_v1beta1_annotation_payload_proto_init() { + if File_google_cloud_automl_v1beta1_annotation_payload_proto != nil { + return + } + file_google_cloud_automl_v1beta1_classification_proto_init() + file_google_cloud_automl_v1beta1_detection_proto_init() + file_google_cloud_automl_v1beta1_tables_proto_init() + file_google_cloud_automl_v1beta1_text_extraction_proto_init() + file_google_cloud_automl_v1beta1_text_sentiment_proto_init() + file_google_cloud_automl_v1beta1_translation_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotationPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AnnotationPayload_Translation)(nil), + (*AnnotationPayload_Classification)(nil), + (*AnnotationPayload_ImageObjectDetection)(nil), + (*AnnotationPayload_VideoClassification)(nil), + (*AnnotationPayload_VideoObjectTracking)(nil), + (*AnnotationPayload_TextExtraction)(nil), + (*AnnotationPayload_TextSentiment)(nil), + (*AnnotationPayload_Tables)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_annotation_payload_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_annotation_payload_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_annotation_payload_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_annotation_payload_proto = out.File + file_google_cloud_automl_v1beta1_annotation_payload_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_annotation_payload_proto_goTypes = nil + file_google_cloud_automl_v1beta1_annotation_payload_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/annotation_spec.pb.go b/automl/apiv1beta1/automlpb/annotation_spec.pb.go new file mode 100644 index 000000000000..649fb019aa0f --- /dev/null +++ b/automl/apiv1beta1/automlpb/annotation_spec.pb.go @@ -0,0 +1,211 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/annotation_spec.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A definition of an annotation spec. +type AnnotationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of the annotation spec. + // Form: + // + // 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}' + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The name of the annotation spec to show in the interface. The name can be + // up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. The number of examples in the parent dataset + // labeled by the annotation spec. + ExampleCount int32 `protobuf:"varint,9,opt,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"` +} + +func (x *AnnotationSpec) Reset() { + *x = AnnotationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotationSpec) ProtoMessage() {} + +func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotationSpec.ProtoReflect.Descriptor instead. +func (*AnnotationSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescGZIP(), []int{0} +} + +func (x *AnnotationSpec) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AnnotationSpec) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *AnnotationSpec) GetExampleCount() int32 { + if x != nil { + return x.ExampleCount + } + return 0 +} + +var File_google_cloud_automl_v1beta1_annotation_spec_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x0e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x88, 0x01, 0xea, 0x41, 0x84, + 0x01, 0x0a, 0x24, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x5c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x7d, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x73, 0x2f, 0x7b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x7d, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, + 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, + 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescData = file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_annotation_spec_proto_goTypes = []interface{}{ + (*AnnotationSpec)(nil), // 0: google.cloud.automl.v1beta1.AnnotationSpec +} +var file_google_cloud_automl_v1beta1_annotation_spec_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_annotation_spec_proto_init() } +func file_google_cloud_automl_v1beta1_annotation_spec_proto_init() { + if File_google_cloud_automl_v1beta1_annotation_spec_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_annotation_spec_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_annotation_spec_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_annotation_spec_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_annotation_spec_proto = out.File + file_google_cloud_automl_v1beta1_annotation_spec_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_annotation_spec_proto_goTypes = nil + file_google_cloud_automl_v1beta1_annotation_spec_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/classification.pb.go b/automl/apiv1beta1/automlpb/classification.pb.go new file mode 100644 index 000000000000..d527c6ead309 --- /dev/null +++ b/automl/apiv1beta1/automlpb/classification.pb.go @@ -0,0 +1,935 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/classification.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Type of the classification problem. +type ClassificationType int32 + +const ( + // An un-set value of this enum. + ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED ClassificationType = 0 + // At most one label is allowed per example. + ClassificationType_MULTICLASS ClassificationType = 1 + // Multiple labels are allowed for one example. + ClassificationType_MULTILABEL ClassificationType = 2 +) + +// Enum value maps for ClassificationType. +var ( + ClassificationType_name = map[int32]string{ + 0: "CLASSIFICATION_TYPE_UNSPECIFIED", + 1: "MULTICLASS", + 2: "MULTILABEL", + } + ClassificationType_value = map[string]int32{ + "CLASSIFICATION_TYPE_UNSPECIFIED": 0, + "MULTICLASS": 1, + "MULTILABEL": 2, + } +) + +func (x ClassificationType) Enum() *ClassificationType { + p := new(ClassificationType) + *p = x + return p +} + +func (x ClassificationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClassificationType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_automl_v1beta1_classification_proto_enumTypes[0].Descriptor() +} + +func (ClassificationType) Type() protoreflect.EnumType { + return &file_google_cloud_automl_v1beta1_classification_proto_enumTypes[0] +} + +func (x ClassificationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClassificationType.Descriptor instead. +func (ClassificationType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{0} +} + +// Contains annotation details specific to classification. +type ClassificationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. A confidence estimate between 0.0 and 1.0. A higher value + // means greater confidence that the annotation is positive. If a user + // approves an annotation as negative or positive, the score value remains + // unchanged. If a user creates an annotation, the score is 0 for negative or + // 1 for positive. + Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"` +} + +func (x *ClassificationAnnotation) Reset() { + *x = ClassificationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationAnnotation) ProtoMessage() {} + +func (x *ClassificationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationAnnotation.ProtoReflect.Descriptor instead. +func (*ClassificationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{0} +} + +func (x *ClassificationAnnotation) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +// Contains annotation details specific to video classification. +type VideoClassificationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Expresses the type of video classification. Possible values: + // + // - `segment` - Classification done on a specified by user + // time segment of a video. AnnotationSpec is answered to be present + // in that time segment, if it is present in any part of it. The video + // ML model evaluations are done only for this type of classification. + // + // - `shot`- Shot-level classification. + // AutoML Video Intelligence determines the boundaries + // for each camera shot in the entire segment of the video that user + // specified in the request configuration. AutoML Video Intelligence + // then returns labels and their confidence scores for each detected + // shot, along with the start and end time of the shot. + // WARNING: Model evaluation is not done for this classification type, + // the quality of it depends on training data, but there are no + // metrics provided to describe that quality. + // + // - `1s_interval` - AutoML Video Intelligence returns labels and their + // confidence scores for each second of the entire segment of the video + // that user specified in the request configuration. + // WARNING: Model evaluation is not done for this classification type, + // the quality of it depends on training data, but there are no + // metrics provided to describe that quality. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Output only . The classification details of this annotation. + ClassificationAnnotation *ClassificationAnnotation `protobuf:"bytes,2,opt,name=classification_annotation,json=classificationAnnotation,proto3" json:"classification_annotation,omitempty"` + // Output only . The time segment of the video to which the + // annotation applies. + TimeSegment *TimeSegment `protobuf:"bytes,3,opt,name=time_segment,json=timeSegment,proto3" json:"time_segment,omitempty"` +} + +func (x *VideoClassificationAnnotation) Reset() { + *x = VideoClassificationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoClassificationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoClassificationAnnotation) ProtoMessage() {} + +func (x *VideoClassificationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoClassificationAnnotation.ProtoReflect.Descriptor instead. +func (*VideoClassificationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{1} +} + +func (x *VideoClassificationAnnotation) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *VideoClassificationAnnotation) GetClassificationAnnotation() *ClassificationAnnotation { + if x != nil { + return x.ClassificationAnnotation + } + return nil +} + +func (x *VideoClassificationAnnotation) GetTimeSegment() *TimeSegment { + if x != nil { + return x.TimeSegment + } + return nil +} + +// Model evaluation metrics for classification problems. +// Note: For Video Classification this metrics only describe quality of the +// Video Classification predictions of "segment_classification" type. +type ClassificationEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The Area Under Precision-Recall Curve metric. Micro-averaged + // for the overall evaluation. + AuPrc float32 `protobuf:"fixed32,1,opt,name=au_prc,json=auPrc,proto3" json:"au_prc,omitempty"` + // Output only. The Area Under Precision-Recall Curve metric based on priors. + // Micro-averaged for the overall evaluation. + // Deprecated. + // + // Deprecated: Do not use. + BaseAuPrc float32 `protobuf:"fixed32,2,opt,name=base_au_prc,json=baseAuPrc,proto3" json:"base_au_prc,omitempty"` + // Output only. The Area Under Receiver Operating Characteristic curve metric. + // Micro-averaged for the overall evaluation. + AuRoc float32 `protobuf:"fixed32,6,opt,name=au_roc,json=auRoc,proto3" json:"au_roc,omitempty"` + // Output only. The Log Loss metric. + LogLoss float32 `protobuf:"fixed32,7,opt,name=log_loss,json=logLoss,proto3" json:"log_loss,omitempty"` + // Output only. Metrics for each confidence_threshold in + // 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and + // position_threshold = INT32_MAX_VALUE. + // ROC and precision-recall curves, and other aggregated metrics are derived + // from them. The confidence metrics entries may also be supplied for + // additional values of position_threshold, but from these no aggregated + // metrics are computed. + ConfidenceMetricsEntry []*ClassificationEvaluationMetrics_ConfidenceMetricsEntry `protobuf:"bytes,3,rep,name=confidence_metrics_entry,json=confidenceMetricsEntry,proto3" json:"confidence_metrics_entry,omitempty"` + // Output only. Confusion matrix of the evaluation. + // Only set for MULTICLASS classification problems where number + // of labels is no more than 10. + // Only set for model level evaluation, not for evaluation per label. + ConfusionMatrix *ClassificationEvaluationMetrics_ConfusionMatrix `protobuf:"bytes,4,opt,name=confusion_matrix,json=confusionMatrix,proto3" json:"confusion_matrix,omitempty"` + // Output only. The annotation spec ids used for this evaluation. + AnnotationSpecId []string `protobuf:"bytes,5,rep,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"` +} + +func (x *ClassificationEvaluationMetrics) Reset() { + *x = ClassificationEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationEvaluationMetrics) ProtoMessage() {} + +func (x *ClassificationEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*ClassificationEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{2} +} + +func (x *ClassificationEvaluationMetrics) GetAuPrc() float32 { + if x != nil { + return x.AuPrc + } + return 0 +} + +// Deprecated: Do not use. +func (x *ClassificationEvaluationMetrics) GetBaseAuPrc() float32 { + if x != nil { + return x.BaseAuPrc + } + return 0 +} + +func (x *ClassificationEvaluationMetrics) GetAuRoc() float32 { + if x != nil { + return x.AuRoc + } + return 0 +} + +func (x *ClassificationEvaluationMetrics) GetLogLoss() float32 { + if x != nil { + return x.LogLoss + } + return 0 +} + +func (x *ClassificationEvaluationMetrics) GetConfidenceMetricsEntry() []*ClassificationEvaluationMetrics_ConfidenceMetricsEntry { + if x != nil { + return x.ConfidenceMetricsEntry + } + return nil +} + +func (x *ClassificationEvaluationMetrics) GetConfusionMatrix() *ClassificationEvaluationMetrics_ConfusionMatrix { + if x != nil { + return x.ConfusionMatrix + } + return nil +} + +func (x *ClassificationEvaluationMetrics) GetAnnotationSpecId() []string { + if x != nil { + return x.AnnotationSpecId + } + return nil +} + +// Metrics for a single confidence threshold. +type ClassificationEvaluationMetrics_ConfidenceMetricsEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Metrics are computed with an assumption that the model + // never returns predictions with score lower than this value. + ConfidenceThreshold float32 `protobuf:"fixed32,1,opt,name=confidence_threshold,json=confidenceThreshold,proto3" json:"confidence_threshold,omitempty"` + // Output only. Metrics are computed with an assumption that the model + // always returns at most this many predictions (ordered by their score, + // descendingly), but they all still need to meet the confidence_threshold. + PositionThreshold int32 `protobuf:"varint,14,opt,name=position_threshold,json=positionThreshold,proto3" json:"position_threshold,omitempty"` + // Output only. Recall (True Positive Rate) for the given confidence + // threshold. + Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"` + // Output only. Precision for the given confidence threshold. + Precision float32 `protobuf:"fixed32,3,opt,name=precision,proto3" json:"precision,omitempty"` + // Output only. False Positive Rate for the given confidence threshold. + FalsePositiveRate float32 `protobuf:"fixed32,8,opt,name=false_positive_rate,json=falsePositiveRate,proto3" json:"false_positive_rate,omitempty"` + // Output only. The harmonic mean of recall and precision. + F1Score float32 `protobuf:"fixed32,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` + // Output only. The Recall (True Positive Rate) when only considering the + // label that has the highest prediction score and not below the confidence + // threshold for each example. + RecallAt1 float32 `protobuf:"fixed32,5,opt,name=recall_at1,json=recallAt1,proto3" json:"recall_at1,omitempty"` + // Output only. The precision when only considering the label that has the + // highest prediction score and not below the confidence threshold for each + // example. + PrecisionAt1 float32 `protobuf:"fixed32,6,opt,name=precision_at1,json=precisionAt1,proto3" json:"precision_at1,omitempty"` + // Output only. The False Positive Rate when only considering the label that + // has the highest prediction score and not below the confidence threshold + // for each example. + FalsePositiveRateAt1 float32 `protobuf:"fixed32,9,opt,name=false_positive_rate_at1,json=falsePositiveRateAt1,proto3" json:"false_positive_rate_at1,omitempty"` + // Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1]. + F1ScoreAt1 float32 `protobuf:"fixed32,7,opt,name=f1_score_at1,json=f1ScoreAt1,proto3" json:"f1_score_at1,omitempty"` + // Output only. The number of model created labels that match a ground truth + // label. + TruePositiveCount int64 `protobuf:"varint,10,opt,name=true_positive_count,json=truePositiveCount,proto3" json:"true_positive_count,omitempty"` + // Output only. The number of model created labels that do not match a + // ground truth label. + FalsePositiveCount int64 `protobuf:"varint,11,opt,name=false_positive_count,json=falsePositiveCount,proto3" json:"false_positive_count,omitempty"` + // Output only. The number of ground truth labels that are not matched + // by a model created label. + FalseNegativeCount int64 `protobuf:"varint,12,opt,name=false_negative_count,json=falseNegativeCount,proto3" json:"false_negative_count,omitempty"` + // Output only. The number of labels that were not created by the model, + // but if they would, they would not match a ground truth label. + TrueNegativeCount int64 `protobuf:"varint,13,opt,name=true_negative_count,json=trueNegativeCount,proto3" json:"true_negative_count,omitempty"` +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) Reset() { + *x = ClassificationEvaluationMetrics_ConfidenceMetricsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationEvaluationMetrics_ConfidenceMetricsEntry.ProtoReflect.Descriptor instead. +func (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetConfidenceThreshold() float32 { + if x != nil { + return x.ConfidenceThreshold + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetPositionThreshold() int32 { + if x != nil { + return x.PositionThreshold + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetRecall() float32 { + if x != nil { + return x.Recall + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetPrecision() float32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetFalsePositiveRate() float32 { + if x != nil { + return x.FalsePositiveRate + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetF1Score() float32 { + if x != nil { + return x.F1Score + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetRecallAt1() float32 { + if x != nil { + return x.RecallAt1 + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetPrecisionAt1() float32 { + if x != nil { + return x.PrecisionAt1 + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetFalsePositiveRateAt1() float32 { + if x != nil { + return x.FalsePositiveRateAt1 + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetF1ScoreAt1() float32 { + if x != nil { + return x.F1ScoreAt1 + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetTruePositiveCount() int64 { + if x != nil { + return x.TruePositiveCount + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetFalsePositiveCount() int64 { + if x != nil { + return x.FalsePositiveCount + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetFalseNegativeCount() int64 { + if x != nil { + return x.FalseNegativeCount + } + return 0 +} + +func (x *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetTrueNegativeCount() int64 { + if x != nil { + return x.TrueNegativeCount + } + return 0 +} + +// Confusion matrix of the model running the classification. +type ClassificationEvaluationMetrics_ConfusionMatrix struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. IDs of the annotation specs used in the confusion matrix. + // For Tables CLASSIFICATION + // + // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + // only list of [annotation_spec_display_name-s][] is populated. + AnnotationSpecId []string `protobuf:"bytes,1,rep,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"` + // Output only. Display name of the annotation specs used in the confusion + // matrix, as they were at the moment of the evaluation. For Tables + // CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], + // distinct values of the target column at the moment of the model + // evaluation are populated here. + DisplayName []string `protobuf:"bytes,3,rep,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. Rows in the confusion matrix. The number of rows is equal to + // the size of `annotation_spec_id`. + // `row[i].example_count[j]` is the number of examples that have ground + // truth of the `annotation_spec_id[i]` and are predicted as + // `annotation_spec_id[j]` by the model being evaluated. + Row []*ClassificationEvaluationMetrics_ConfusionMatrix_Row `protobuf:"bytes,2,rep,name=row,proto3" json:"row,omitempty"` +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix) Reset() { + *x = ClassificationEvaluationMetrics_ConfusionMatrix{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationEvaluationMetrics_ConfusionMatrix) ProtoMessage() {} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationEvaluationMetrics_ConfusionMatrix.ProtoReflect.Descriptor instead. +func (*ClassificationEvaluationMetrics_ConfusionMatrix) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix) GetAnnotationSpecId() []string { + if x != nil { + return x.AnnotationSpecId + } + return nil +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix) GetDisplayName() []string { + if x != nil { + return x.DisplayName + } + return nil +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix) GetRow() []*ClassificationEvaluationMetrics_ConfusionMatrix_Row { + if x != nil { + return x.Row + } + return nil +} + +// Output only. A row in the confusion matrix. +type ClassificationEvaluationMetrics_ConfusionMatrix_Row struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Value of the specific cell in the confusion matrix. + // The number of values each row has (i.e. the length of the row) is equal + // to the length of the `annotation_spec_id` field or, if that one is not + // populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field. + ExampleCount []int32 `protobuf:"varint,1,rep,packed,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"` +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) Reset() { + *x = ClassificationEvaluationMetrics_ConfusionMatrix_Row{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoMessage() {} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationEvaluationMetrics_ConfusionMatrix_Row.ProtoReflect.Descriptor instead. +func (*ClassificationEvaluationMetrics_ConfusionMatrix_Row) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP(), []int{2, 1, 0} +} + +func (x *ClassificationEvaluationMetrics_ConfusionMatrix_Row) GetExampleCount() []int32 { + if x != nil { + return x.ExampleCount + } + return nil +} + +var File_google_cloud_automl_v1beta1_classification_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_classification_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, + 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x6d, + 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a, 0x18, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xf4, 0x01, + 0x0a, 0x1d, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x99, 0x0a, 0x0a, 0x1f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x75, 0x5f, 0x70, + 0x72, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x61, 0x75, 0x50, 0x72, 0x63, 0x12, + 0x22, 0x0a, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x75, 0x5f, 0x70, 0x72, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x02, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x41, 0x75, + 0x50, 0x72, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x75, 0x5f, 0x72, 0x6f, 0x63, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x05, 0x61, 0x75, 0x52, 0x6f, 0x63, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, + 0x67, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x6c, 0x6f, + 0x67, 0x4c, 0x6f, 0x73, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, + 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x16, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, 0x2c, + 0x0a, 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x1a, 0xdc, 0x04, 0x0a, + 0x16, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, + 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, + 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x2e, 0x0a, 0x13, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, + 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x74, 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, + 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x41, 0x74, 0x31, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x0c, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x31, 0x12, 0x35, + 0x0a, 0x17, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x31, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x14, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x41, 0x74, 0x31, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x5f, 0x61, 0x74, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66, 0x31, 0x53, + 0x63, 0x6f, 0x72, 0x65, 0x41, 0x74, 0x31, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x72, 0x75, 0x65, 0x5f, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x74, 0x72, 0x75, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x5f, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x4e, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x74, + 0x72, 0x75, 0x65, 0x5f, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x74, 0x72, 0x75, 0x65, 0x4e, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xf2, 0x01, 0x0a, 0x0f, + 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x12, + 0x2c, 0x0a, 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x62, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2e, 0x52, 0x6f, 0x77, 0x52, + 0x03, 0x72, 0x6f, 0x77, 0x1a, 0x2a, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x2a, 0x59, 0x0a, 0x12, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x49, + 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, + 0x55, 0x4c, 0x54, 0x49, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, + 0x55, 0x4c, 0x54, 0x49, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x10, 0x02, 0x42, 0xb8, 0x01, 0x0a, 0x1f, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x13, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_classification_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_classification_proto_rawDescData = file_google_cloud_automl_v1beta1_classification_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_classification_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_classification_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_classification_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_classification_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_classification_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_classification_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_automl_v1beta1_classification_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_automl_v1beta1_classification_proto_goTypes = []interface{}{ + (ClassificationType)(0), // 0: google.cloud.automl.v1beta1.ClassificationType + (*ClassificationAnnotation)(nil), // 1: google.cloud.automl.v1beta1.ClassificationAnnotation + (*VideoClassificationAnnotation)(nil), // 2: google.cloud.automl.v1beta1.VideoClassificationAnnotation + (*ClassificationEvaluationMetrics)(nil), // 3: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry)(nil), // 4: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + (*ClassificationEvaluationMetrics_ConfusionMatrix)(nil), // 5: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + (*ClassificationEvaluationMetrics_ConfusionMatrix_Row)(nil), // 6: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + (*TimeSegment)(nil), // 7: google.cloud.automl.v1beta1.TimeSegment +} +var file_google_cloud_automl_v1beta1_classification_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.VideoClassificationAnnotation.classification_annotation:type_name -> google.cloud.automl.v1beta1.ClassificationAnnotation + 7, // 1: google.cloud.automl.v1beta1.VideoClassificationAnnotation.time_segment:type_name -> google.cloud.automl.v1beta1.TimeSegment + 4, // 2: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confidence_metrics_entry:type_name -> google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry + 5, // 3: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.confusion_matrix:type_name -> google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + 6, // 4: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.row:type_name -> google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_classification_proto_init() } +func file_google_cloud_automl_v1beta1_classification_proto_init() { + if File_google_cloud_automl_v1beta1_classification_proto != nil { + return + } + file_google_cloud_automl_v1beta1_temporal_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_classification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_classification_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoClassificationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_classification_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_classification_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationEvaluationMetrics_ConfidenceMetricsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_classification_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationEvaluationMetrics_ConfusionMatrix); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_classification_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationEvaluationMetrics_ConfusionMatrix_Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_classification_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_classification_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_classification_proto_depIdxs, + EnumInfos: file_google_cloud_automl_v1beta1_classification_proto_enumTypes, + MessageInfos: file_google_cloud_automl_v1beta1_classification_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_classification_proto = out.File + file_google_cloud_automl_v1beta1_classification_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_classification_proto_goTypes = nil + file_google_cloud_automl_v1beta1_classification_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/column_spec.pb.go b/automl/apiv1beta1/automlpb/column_spec.pb.go new file mode 100644 index 000000000000..92175705a6c5 --- /dev/null +++ b/automl/apiv1beta1/automlpb/column_spec.pb.go @@ -0,0 +1,358 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/column_spec.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were +// given on import . +// Used by: +// - Tables +type ColumnSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name of the column specs. + // Form: + // + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The data type of elements stored in the column. + DataType *DataType `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + // Output only. The name of the column to show in the interface. The name can + // be up to 100 characters long and can consist only of ASCII Latin letters + // A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and + // must start with a letter or a digit. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. Stats of the series of values in the column. + // This field may be stale, see the ancestor's + // Dataset.tables_dataset_metadata.stats_update_time field + // for the timestamp at which these stats were last updated. + DataStats *DataStats `protobuf:"bytes,4,opt,name=data_stats,json=dataStats,proto3" json:"data_stats,omitempty"` + // Deprecated. + TopCorrelatedColumns []*ColumnSpec_CorrelatedColumn `protobuf:"bytes,5,rep,name=top_correlated_columns,json=topCorrelatedColumns,proto3" json:"top_correlated_columns,omitempty"` + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + Etag string `protobuf:"bytes,6,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *ColumnSpec) Reset() { + *x = ColumnSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnSpec) ProtoMessage() {} + +func (x *ColumnSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnSpec.ProtoReflect.Descriptor instead. +func (*ColumnSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_column_spec_proto_rawDescGZIP(), []int{0} +} + +func (x *ColumnSpec) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ColumnSpec) GetDataType() *DataType { + if x != nil { + return x.DataType + } + return nil +} + +func (x *ColumnSpec) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *ColumnSpec) GetDataStats() *DataStats { + if x != nil { + return x.DataStats + } + return nil +} + +func (x *ColumnSpec) GetTopCorrelatedColumns() []*ColumnSpec_CorrelatedColumn { + if x != nil { + return x.TopCorrelatedColumns + } + return nil +} + +func (x *ColumnSpec) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// Identifies the table's column, and its correlation with the column this +// ColumnSpec describes. +type ColumnSpec_CorrelatedColumn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The column_spec_id of the correlated column, which belongs to the same + // table as the in-context column. + ColumnSpecId string `protobuf:"bytes,1,opt,name=column_spec_id,json=columnSpecId,proto3" json:"column_spec_id,omitempty"` + // Correlation between this and the in-context column. + CorrelationStats *CorrelationStats `protobuf:"bytes,2,opt,name=correlation_stats,json=correlationStats,proto3" json:"correlation_stats,omitempty"` +} + +func (x *ColumnSpec_CorrelatedColumn) Reset() { + *x = ColumnSpec_CorrelatedColumn{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnSpec_CorrelatedColumn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnSpec_CorrelatedColumn) ProtoMessage() {} + +func (x *ColumnSpec_CorrelatedColumn) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnSpec_CorrelatedColumn.ProtoReflect.Descriptor instead. +func (*ColumnSpec_CorrelatedColumn) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_column_spec_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ColumnSpec_CorrelatedColumn) GetColumnSpecId() string { + if x != nil { + return x.ColumnSpecId + } + return "" +} + +func (x *ColumnSpec_CorrelatedColumn) GetCorrelationStats() *CorrelationStats { + if x != nil { + return x.CorrelationStats + } + return nil +} + +var File_google_cloud_automl_v1beta1_column_spec_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_column_spec_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, + 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x12, 0x6e, 0x0a, 0x16, 0x74, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x72, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x6f, + 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x14, + 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x1a, 0x94, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x72, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x24, 0x0a, + 0x0e, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x11, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x72, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x10, 0x63, + 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, + 0x94, 0x01, 0xea, 0x41, 0x90, 0x01, 0x0a, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x6c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, + 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x7d, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, + 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, + 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, + 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_column_spec_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_column_spec_proto_rawDescData = file_google_cloud_automl_v1beta1_column_spec_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_column_spec_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_column_spec_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_column_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_column_spec_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_column_spec_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_automl_v1beta1_column_spec_proto_goTypes = []interface{}{ + (*ColumnSpec)(nil), // 0: google.cloud.automl.v1beta1.ColumnSpec + (*ColumnSpec_CorrelatedColumn)(nil), // 1: google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + (*DataType)(nil), // 2: google.cloud.automl.v1beta1.DataType + (*DataStats)(nil), // 3: google.cloud.automl.v1beta1.DataStats + (*CorrelationStats)(nil), // 4: google.cloud.automl.v1beta1.CorrelationStats +} +var file_google_cloud_automl_v1beta1_column_spec_proto_depIdxs = []int32{ + 2, // 0: google.cloud.automl.v1beta1.ColumnSpec.data_type:type_name -> google.cloud.automl.v1beta1.DataType + 3, // 1: google.cloud.automl.v1beta1.ColumnSpec.data_stats:type_name -> google.cloud.automl.v1beta1.DataStats + 1, // 2: google.cloud.automl.v1beta1.ColumnSpec.top_correlated_columns:type_name -> google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn + 4, // 3: google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.correlation_stats:type_name -> google.cloud.automl.v1beta1.CorrelationStats + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_column_spec_proto_init() } +func file_google_cloud_automl_v1beta1_column_spec_proto_init() { + if File_google_cloud_automl_v1beta1_column_spec_proto != nil { + return + } + file_google_cloud_automl_v1beta1_data_stats_proto_init() + file_google_cloud_automl_v1beta1_data_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnSpec_CorrelatedColumn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_column_spec_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_column_spec_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_column_spec_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_column_spec_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_column_spec_proto = out.File + file_google_cloud_automl_v1beta1_column_spec_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_column_spec_proto_goTypes = nil + file_google_cloud_automl_v1beta1_column_spec_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/data_items.pb.go b/automl/apiv1beta1/automlpb/data_items.pb.go new file mode 100644 index 000000000000..2033aba9544e --- /dev/null +++ b/automl/apiv1beta1/automlpb/data_items.pb.go @@ -0,0 +1,1106 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/data_items.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Unit of the document dimension. +type DocumentDimensions_DocumentDimensionUnit int32 + +const ( + // Should not be used. + DocumentDimensions_DOCUMENT_DIMENSION_UNIT_UNSPECIFIED DocumentDimensions_DocumentDimensionUnit = 0 + // Document dimension is measured in inches. + DocumentDimensions_INCH DocumentDimensions_DocumentDimensionUnit = 1 + // Document dimension is measured in centimeters. + DocumentDimensions_CENTIMETER DocumentDimensions_DocumentDimensionUnit = 2 + // Document dimension is measured in points. 72 points = 1 inch. + DocumentDimensions_POINT DocumentDimensions_DocumentDimensionUnit = 3 +) + +// Enum value maps for DocumentDimensions_DocumentDimensionUnit. +var ( + DocumentDimensions_DocumentDimensionUnit_name = map[int32]string{ + 0: "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED", + 1: "INCH", + 2: "CENTIMETER", + 3: "POINT", + } + DocumentDimensions_DocumentDimensionUnit_value = map[string]int32{ + "DOCUMENT_DIMENSION_UNIT_UNSPECIFIED": 0, + "INCH": 1, + "CENTIMETER": 2, + "POINT": 3, + } +) + +func (x DocumentDimensions_DocumentDimensionUnit) Enum() *DocumentDimensions_DocumentDimensionUnit { + p := new(DocumentDimensions_DocumentDimensionUnit) + *p = x + return p +} + +func (x DocumentDimensions_DocumentDimensionUnit) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DocumentDimensions_DocumentDimensionUnit) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_automl_v1beta1_data_items_proto_enumTypes[0].Descriptor() +} + +func (DocumentDimensions_DocumentDimensionUnit) Type() protoreflect.EnumType { + return &file_google_cloud_automl_v1beta1_data_items_proto_enumTypes[0] +} + +func (x DocumentDimensions_DocumentDimensionUnit) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DocumentDimensions_DocumentDimensionUnit.Descriptor instead. +func (DocumentDimensions_DocumentDimensionUnit) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{2, 0} +} + +// The type of TextSegment in the context of the original document. +type Document_Layout_TextSegmentType int32 + +const ( + // Should not be used. + Document_Layout_TEXT_SEGMENT_TYPE_UNSPECIFIED Document_Layout_TextSegmentType = 0 + // The text segment is a token. e.g. word. + Document_Layout_TOKEN Document_Layout_TextSegmentType = 1 + // The text segment is a paragraph. + Document_Layout_PARAGRAPH Document_Layout_TextSegmentType = 2 + // The text segment is a form field. + Document_Layout_FORM_FIELD Document_Layout_TextSegmentType = 3 + // The text segment is the name part of a form field. It will be treated + // as child of another FORM_FIELD TextSegment if its span is subspan of + // another TextSegment with type FORM_FIELD. + Document_Layout_FORM_FIELD_NAME Document_Layout_TextSegmentType = 4 + // The text segment is the text content part of a form field. It will be + // treated as child of another FORM_FIELD TextSegment if its span is + // subspan of another TextSegment with type FORM_FIELD. + Document_Layout_FORM_FIELD_CONTENTS Document_Layout_TextSegmentType = 5 + // The text segment is a whole table, including headers, and all rows. + Document_Layout_TABLE Document_Layout_TextSegmentType = 6 + // The text segment is a table's headers. It will be treated as child of + // another TABLE TextSegment if its span is subspan of another TextSegment + // with type TABLE. + Document_Layout_TABLE_HEADER Document_Layout_TextSegmentType = 7 + // The text segment is a row in table. It will be treated as child of + // another TABLE TextSegment if its span is subspan of another TextSegment + // with type TABLE. + Document_Layout_TABLE_ROW Document_Layout_TextSegmentType = 8 + // The text segment is a cell in table. It will be treated as child of + // another TABLE_ROW TextSegment if its span is subspan of another + // TextSegment with type TABLE_ROW. + Document_Layout_TABLE_CELL Document_Layout_TextSegmentType = 9 +) + +// Enum value maps for Document_Layout_TextSegmentType. +var ( + Document_Layout_TextSegmentType_name = map[int32]string{ + 0: "TEXT_SEGMENT_TYPE_UNSPECIFIED", + 1: "TOKEN", + 2: "PARAGRAPH", + 3: "FORM_FIELD", + 4: "FORM_FIELD_NAME", + 5: "FORM_FIELD_CONTENTS", + 6: "TABLE", + 7: "TABLE_HEADER", + 8: "TABLE_ROW", + 9: "TABLE_CELL", + } + Document_Layout_TextSegmentType_value = map[string]int32{ + "TEXT_SEGMENT_TYPE_UNSPECIFIED": 0, + "TOKEN": 1, + "PARAGRAPH": 2, + "FORM_FIELD": 3, + "FORM_FIELD_NAME": 4, + "FORM_FIELD_CONTENTS": 5, + "TABLE": 6, + "TABLE_HEADER": 7, + "TABLE_ROW": 8, + "TABLE_CELL": 9, + } +) + +func (x Document_Layout_TextSegmentType) Enum() *Document_Layout_TextSegmentType { + p := new(Document_Layout_TextSegmentType) + *p = x + return p +} + +func (x Document_Layout_TextSegmentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Document_Layout_TextSegmentType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_automl_v1beta1_data_items_proto_enumTypes[1].Descriptor() +} + +func (Document_Layout_TextSegmentType) Type() protoreflect.EnumType { + return &file_google_cloud_automl_v1beta1_data_items_proto_enumTypes[1] +} + +func (x Document_Layout_TextSegmentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Document_Layout_TextSegmentType.Descriptor instead. +func (Document_Layout_TextSegmentType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{3, 0, 0} +} + +// A representation of an image. +// Only images up to 30MB in size are supported. +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. The data representing the image. + // For Predict calls [image_bytes][google.cloud.automl.v1beta1.Image.image_bytes] must be set, as other options are not + // currently supported by prediction API. You can read the contents of an + // uploaded image by using the [content_uri][google.cloud.automl.v1beta1.Image.content_uri] field. + // + // Types that are assignable to Data: + // + // *Image_ImageBytes + // *Image_InputConfig + Data isImage_Data `protobuf_oneof:"data"` + // Output only. HTTP URI to the thumbnail image. + ThumbnailUri string `protobuf:"bytes,4,opt,name=thumbnail_uri,json=thumbnailUri,proto3" json:"thumbnail_uri,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{0} +} + +func (m *Image) GetData() isImage_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *Image) GetImageBytes() []byte { + if x, ok := x.GetData().(*Image_ImageBytes); ok { + return x.ImageBytes + } + return nil +} + +func (x *Image) GetInputConfig() *InputConfig { + if x, ok := x.GetData().(*Image_InputConfig); ok { + return x.InputConfig + } + return nil +} + +func (x *Image) GetThumbnailUri() string { + if x != nil { + return x.ThumbnailUri + } + return "" +} + +type isImage_Data interface { + isImage_Data() +} + +type Image_ImageBytes struct { + // Image content represented as a stream of bytes. + // Note: As with all `bytes` fields, protobuffers use a pure binary + // representation, whereas JSON representations use base64. + ImageBytes []byte `protobuf:"bytes,1,opt,name=image_bytes,json=imageBytes,proto3,oneof"` +} + +type Image_InputConfig struct { + // An input config specifying the content of the image. + InputConfig *InputConfig `protobuf:"bytes,6,opt,name=input_config,json=inputConfig,proto3,oneof"` +} + +func (*Image_ImageBytes) isImage_Data() {} + +func (*Image_InputConfig) isImage_Data() {} + +// A representation of a text snippet. +type TextSnippet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The content of the text snippet as a string. Up to 250000 + // characters long. + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + // Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed + // values are "text/html" and "text/plain". If left blank, the format is + // automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content]. + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // Output only. HTTP URI where you can download the content. + ContentUri string `protobuf:"bytes,4,opt,name=content_uri,json=contentUri,proto3" json:"content_uri,omitempty"` +} + +func (x *TextSnippet) Reset() { + *x = TextSnippet{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextSnippet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSnippet) ProtoMessage() {} + +func (x *TextSnippet) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSnippet.ProtoReflect.Descriptor instead. +func (*TextSnippet) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{1} +} + +func (x *TextSnippet) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *TextSnippet) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *TextSnippet) GetContentUri() string { + if x != nil { + return x.ContentUri + } + return "" +} + +// Message that describes dimension of a document. +type DocumentDimensions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unit of the dimension. + Unit DocumentDimensions_DocumentDimensionUnit `protobuf:"varint,1,opt,name=unit,proto3,enum=google.cloud.automl.v1beta1.DocumentDimensions_DocumentDimensionUnit" json:"unit,omitempty"` + // Width value of the document, works together with the unit. + Width float32 `protobuf:"fixed32,2,opt,name=width,proto3" json:"width,omitempty"` + // Height value of the document, works together with the unit. + Height float32 `protobuf:"fixed32,3,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *DocumentDimensions) Reset() { + *x = DocumentDimensions{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DocumentDimensions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DocumentDimensions) ProtoMessage() {} + +func (x *DocumentDimensions) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DocumentDimensions.ProtoReflect.Descriptor instead. +func (*DocumentDimensions) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{2} +} + +func (x *DocumentDimensions) GetUnit() DocumentDimensions_DocumentDimensionUnit { + if x != nil { + return x.Unit + } + return DocumentDimensions_DOCUMENT_DIMENSION_UNIT_UNSPECIFIED +} + +func (x *DocumentDimensions) GetWidth() float32 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *DocumentDimensions) GetHeight() float32 { + if x != nil { + return x.Height + } + return 0 +} + +// A structured text document e.g. a PDF. +type Document struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An input config specifying the content of the document. + InputConfig *DocumentInputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` + // The plain text version of this document. + DocumentText *TextSnippet `protobuf:"bytes,2,opt,name=document_text,json=documentText,proto3" json:"document_text,omitempty"` + // Describes the layout of the document. + // Sorted by [page_number][]. + Layout []*Document_Layout `protobuf:"bytes,3,rep,name=layout,proto3" json:"layout,omitempty"` + // The dimensions of the page in the document. + DocumentDimensions *DocumentDimensions `protobuf:"bytes,4,opt,name=document_dimensions,json=documentDimensions,proto3" json:"document_dimensions,omitempty"` + // Number of pages in the document. + PageCount int32 `protobuf:"varint,5,opt,name=page_count,json=pageCount,proto3" json:"page_count,omitempty"` +} + +func (x *Document) Reset() { + *x = Document{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +func (x *Document) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{3} +} + +func (x *Document) GetInputConfig() *DocumentInputConfig { + if x != nil { + return x.InputConfig + } + return nil +} + +func (x *Document) GetDocumentText() *TextSnippet { + if x != nil { + return x.DocumentText + } + return nil +} + +func (x *Document) GetLayout() []*Document_Layout { + if x != nil { + return x.Layout + } + return nil +} + +func (x *Document) GetDocumentDimensions() *DocumentDimensions { + if x != nil { + return x.DocumentDimensions + } + return nil +} + +func (x *Document) GetPageCount() int32 { + if x != nil { + return x.PageCount + } + return 0 +} + +// A representation of a row in a relational table. +type Row struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource IDs of the column specs describing the columns of the row. + // If set must contain, but possibly in a different order, all input + // feature + // + // [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + // of the Model this row is being passed to. + // Note: The below `values` field must match order of this field, if this + // field is set. + ColumnSpecIds []string `protobuf:"bytes,2,rep,name=column_spec_ids,json=columnSpecIds,proto3" json:"column_spec_ids,omitempty"` + // Required. The values of the row cells, given in the same order as the + // column_spec_ids, or, if not set, then in the same order as input + // feature + // + // [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + // of the Model this row is being passed to. + Values []*structpb.Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *Row) Reset() { + *x = Row{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Row) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Row) ProtoMessage() {} + +func (x *Row) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Row.ProtoReflect.Descriptor instead. +func (*Row) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{4} +} + +func (x *Row) GetColumnSpecIds() []string { + if x != nil { + return x.ColumnSpecIds + } + return nil +} + +func (x *Row) GetValues() []*structpb.Value { + if x != nil { + return x.Values + } + return nil +} + +// Example data used for training or prediction. +type ExamplePayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Input only. The example data. + // + // Types that are assignable to Payload: + // + // *ExamplePayload_Image + // *ExamplePayload_TextSnippet + // *ExamplePayload_Document + // *ExamplePayload_Row + Payload isExamplePayload_Payload `protobuf_oneof:"payload"` +} + +func (x *ExamplePayload) Reset() { + *x = ExamplePayload{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExamplePayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExamplePayload) ProtoMessage() {} + +func (x *ExamplePayload) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExamplePayload.ProtoReflect.Descriptor instead. +func (*ExamplePayload) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{5} +} + +func (m *ExamplePayload) GetPayload() isExamplePayload_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (x *ExamplePayload) GetImage() *Image { + if x, ok := x.GetPayload().(*ExamplePayload_Image); ok { + return x.Image + } + return nil +} + +func (x *ExamplePayload) GetTextSnippet() *TextSnippet { + if x, ok := x.GetPayload().(*ExamplePayload_TextSnippet); ok { + return x.TextSnippet + } + return nil +} + +func (x *ExamplePayload) GetDocument() *Document { + if x, ok := x.GetPayload().(*ExamplePayload_Document); ok { + return x.Document + } + return nil +} + +func (x *ExamplePayload) GetRow() *Row { + if x, ok := x.GetPayload().(*ExamplePayload_Row); ok { + return x.Row + } + return nil +} + +type isExamplePayload_Payload interface { + isExamplePayload_Payload() +} + +type ExamplePayload_Image struct { + // Example image. + Image *Image `protobuf:"bytes,1,opt,name=image,proto3,oneof"` +} + +type ExamplePayload_TextSnippet struct { + // Example text. + TextSnippet *TextSnippet `protobuf:"bytes,2,opt,name=text_snippet,json=textSnippet,proto3,oneof"` +} + +type ExamplePayload_Document struct { + // Example document. + Document *Document `protobuf:"bytes,4,opt,name=document,proto3,oneof"` +} + +type ExamplePayload_Row struct { + // Example relational table row. + Row *Row `protobuf:"bytes,3,opt,name=row,proto3,oneof"` +} + +func (*ExamplePayload_Image) isExamplePayload_Payload() {} + +func (*ExamplePayload_TextSnippet) isExamplePayload_Payload() {} + +func (*ExamplePayload_Document) isExamplePayload_Payload() {} + +func (*ExamplePayload_Row) isExamplePayload_Payload() {} + +// Describes the layout information of a [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the document. +type Document_Layout struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Text Segment that represents a segment in + // [document_text][google.cloud.automl.v1beta1.Document.document_text]. + TextSegment *TextSegment `protobuf:"bytes,1,opt,name=text_segment,json=textSegment,proto3" json:"text_segment,omitempty"` + // Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts + // from 1. + PageNumber int32 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` + // The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page. + // Contains exactly 4 + // + // [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices] + // and they are connected by edges in the order provided, which will + // represent a rectangle parallel to the frame. The + // [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are + // relative to the page. + // Coordinates are based on top-left as point (0,0). + BoundingPoly *BoundingPoly `protobuf:"bytes,3,opt,name=bounding_poly,json=boundingPoly,proto3" json:"bounding_poly,omitempty"` + // The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document. + TextSegmentType Document_Layout_TextSegmentType `protobuf:"varint,4,opt,name=text_segment_type,json=textSegmentType,proto3,enum=google.cloud.automl.v1beta1.Document_Layout_TextSegmentType" json:"text_segment_type,omitempty"` +} + +func (x *Document_Layout) Reset() { + *x = Document_Layout{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Document_Layout) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document_Layout) ProtoMessage() {} + +func (x *Document_Layout) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Document_Layout.ProtoReflect.Descriptor instead. +func (*Document_Layout) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Document_Layout) GetTextSegment() *TextSegment { + if x != nil { + return x.TextSegment + } + return nil +} + +func (x *Document_Layout) GetPageNumber() int32 { + if x != nil { + return x.PageNumber + } + return 0 +} + +func (x *Document_Layout) GetBoundingPoly() *BoundingPoly { + if x != nil { + return x.BoundingPoly + } + return nil +} + +func (x *Document_Layout) GetTextSegmentType() Document_Layout_TextSegmentType { + if x != nil { + return x.TextSegmentType + } + return Document_Layout_TEXT_SEGMENT_TYPE_UNSPECIFIED +} + +var File_google_cloud_automl_v1beta1_data_items_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_data_items_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6f, + 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, + 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x68, 0x75, 0x6d, + 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x55, 0x72, 0x69, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x65, 0x0a, 0x0b, 0x54, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, + 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x22, 0x84, 0x02, 0x0a, 0x12, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x59, + 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x55, + 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, + 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x65, 0x0a, 0x15, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x74, + 0x12, 0x27, 0x0a, 0x23, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x49, 0x4d, + 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x43, + 0x48, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x45, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x54, 0x45, + 0x52, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x03, 0x22, 0xf3, + 0x06, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x0c, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x4d, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, + 0x74, 0x52, 0x0c, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, + 0x44, 0x0a, 0x06, 0x6c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x52, 0x06, 0x6c, + 0x61, 0x79, 0x6f, 0x75, 0x74, 0x12, 0x60, 0x0a, 0x13, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x6d, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xfb, 0x03, 0x0a, 0x06, 0x4c, 0x61, 0x79, 0x6f, 0x75, + 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x4e, 0x0a, 0x0d, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x79, 0x52, 0x0c, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, + 0x68, 0x0a, 0x11, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x0f, 0x54, 0x65, + 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, + 0x1d, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x53, 0x45, 0x47, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, + 0x41, 0x52, 0x41, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x4f, + 0x52, 0x4d, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, + 0x52, 0x4d, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x04, 0x12, + 0x17, 0x0a, 0x13, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x43, 0x4f, + 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x53, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, + 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x48, 0x45, 0x41, + 0x44, 0x45, 0x52, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x52, + 0x4f, 0x57, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x45, + 0x4c, 0x4c, 0x10, 0x09, 0x22, 0x5d, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x26, 0x0a, 0x0f, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x49, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x0e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3a, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x6e, 0x69, 0x70, 0x70, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, + 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, + 0x74, 0x12, 0x43, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x48, 0x00, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x42, 0x09, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, + 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_data_items_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_data_items_proto_rawDescData = file_google_cloud_automl_v1beta1_data_items_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_data_items_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_data_items_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_data_items_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_data_items_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_data_items_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_data_items_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_automl_v1beta1_data_items_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_google_cloud_automl_v1beta1_data_items_proto_goTypes = []interface{}{ + (DocumentDimensions_DocumentDimensionUnit)(0), // 0: google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit + (Document_Layout_TextSegmentType)(0), // 1: google.cloud.automl.v1beta1.Document.Layout.TextSegmentType + (*Image)(nil), // 2: google.cloud.automl.v1beta1.Image + (*TextSnippet)(nil), // 3: google.cloud.automl.v1beta1.TextSnippet + (*DocumentDimensions)(nil), // 4: google.cloud.automl.v1beta1.DocumentDimensions + (*Document)(nil), // 5: google.cloud.automl.v1beta1.Document + (*Row)(nil), // 6: google.cloud.automl.v1beta1.Row + (*ExamplePayload)(nil), // 7: google.cloud.automl.v1beta1.ExamplePayload + (*Document_Layout)(nil), // 8: google.cloud.automl.v1beta1.Document.Layout + (*InputConfig)(nil), // 9: google.cloud.automl.v1beta1.InputConfig + (*DocumentInputConfig)(nil), // 10: google.cloud.automl.v1beta1.DocumentInputConfig + (*structpb.Value)(nil), // 11: google.protobuf.Value + (*TextSegment)(nil), // 12: google.cloud.automl.v1beta1.TextSegment + (*BoundingPoly)(nil), // 13: google.cloud.automl.v1beta1.BoundingPoly +} +var file_google_cloud_automl_v1beta1_data_items_proto_depIdxs = []int32{ + 9, // 0: google.cloud.automl.v1beta1.Image.input_config:type_name -> google.cloud.automl.v1beta1.InputConfig + 0, // 1: google.cloud.automl.v1beta1.DocumentDimensions.unit:type_name -> google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit + 10, // 2: google.cloud.automl.v1beta1.Document.input_config:type_name -> google.cloud.automl.v1beta1.DocumentInputConfig + 3, // 3: google.cloud.automl.v1beta1.Document.document_text:type_name -> google.cloud.automl.v1beta1.TextSnippet + 8, // 4: google.cloud.automl.v1beta1.Document.layout:type_name -> google.cloud.automl.v1beta1.Document.Layout + 4, // 5: google.cloud.automl.v1beta1.Document.document_dimensions:type_name -> google.cloud.automl.v1beta1.DocumentDimensions + 11, // 6: google.cloud.automl.v1beta1.Row.values:type_name -> google.protobuf.Value + 2, // 7: google.cloud.automl.v1beta1.ExamplePayload.image:type_name -> google.cloud.automl.v1beta1.Image + 3, // 8: google.cloud.automl.v1beta1.ExamplePayload.text_snippet:type_name -> google.cloud.automl.v1beta1.TextSnippet + 5, // 9: google.cloud.automl.v1beta1.ExamplePayload.document:type_name -> google.cloud.automl.v1beta1.Document + 6, // 10: google.cloud.automl.v1beta1.ExamplePayload.row:type_name -> google.cloud.automl.v1beta1.Row + 12, // 11: google.cloud.automl.v1beta1.Document.Layout.text_segment:type_name -> google.cloud.automl.v1beta1.TextSegment + 13, // 12: google.cloud.automl.v1beta1.Document.Layout.bounding_poly:type_name -> google.cloud.automl.v1beta1.BoundingPoly + 1, // 13: google.cloud.automl.v1beta1.Document.Layout.text_segment_type:type_name -> google.cloud.automl.v1beta1.Document.Layout.TextSegmentType + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_data_items_proto_init() } +func file_google_cloud_automl_v1beta1_data_items_proto_init() { + if File_google_cloud_automl_v1beta1_data_items_proto != nil { + return + } + file_google_cloud_automl_v1beta1_geometry_proto_init() + file_google_cloud_automl_v1beta1_io_proto_init() + file_google_cloud_automl_v1beta1_temporal_proto_init() + file_google_cloud_automl_v1beta1_text_segment_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextSnippet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DocumentDimensions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExamplePayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document_Layout); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Image_ImageBytes)(nil), + (*Image_InputConfig)(nil), + } + file_google_cloud_automl_v1beta1_data_items_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*ExamplePayload_Image)(nil), + (*ExamplePayload_TextSnippet)(nil), + (*ExamplePayload_Document)(nil), + (*ExamplePayload_Row)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_data_items_proto_rawDesc, + NumEnums: 2, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_data_items_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_data_items_proto_depIdxs, + EnumInfos: file_google_cloud_automl_v1beta1_data_items_proto_enumTypes, + MessageInfos: file_google_cloud_automl_v1beta1_data_items_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_data_items_proto = out.File + file_google_cloud_automl_v1beta1_data_items_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_data_items_proto_goTypes = nil + file_google_cloud_automl_v1beta1_data_items_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/data_stats.pb.go b/automl/apiv1beta1/automlpb/data_stats.pb.go new file mode 100644 index 000000000000..4ea1ec961696 --- /dev/null +++ b/automl/apiv1beta1/automlpb/data_stats.pb.go @@ -0,0 +1,1215 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/data_stats.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The data statistics of a series of values that share the same DataType. +type DataStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The data statistics specific to a DataType. + // + // Types that are assignable to Stats: + // + // *DataStats_Float64Stats + // *DataStats_StringStats + // *DataStats_TimestampStats + // *DataStats_ArrayStats + // *DataStats_StructStats + // *DataStats_CategoryStats + Stats isDataStats_Stats `protobuf_oneof:"stats"` + // The number of distinct values. + DistinctValueCount int64 `protobuf:"varint,1,opt,name=distinct_value_count,json=distinctValueCount,proto3" json:"distinct_value_count,omitempty"` + // The number of values that are null. + NullValueCount int64 `protobuf:"varint,2,opt,name=null_value_count,json=nullValueCount,proto3" json:"null_value_count,omitempty"` + // The number of values that are valid. + ValidValueCount int64 `protobuf:"varint,9,opt,name=valid_value_count,json=validValueCount,proto3" json:"valid_value_count,omitempty"` +} + +func (x *DataStats) Reset() { + *x = DataStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataStats) ProtoMessage() {} + +func (x *DataStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataStats.ProtoReflect.Descriptor instead. +func (*DataStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{0} +} + +func (m *DataStats) GetStats() isDataStats_Stats { + if m != nil { + return m.Stats + } + return nil +} + +func (x *DataStats) GetFloat64Stats() *Float64Stats { + if x, ok := x.GetStats().(*DataStats_Float64Stats); ok { + return x.Float64Stats + } + return nil +} + +func (x *DataStats) GetStringStats() *StringStats { + if x, ok := x.GetStats().(*DataStats_StringStats); ok { + return x.StringStats + } + return nil +} + +func (x *DataStats) GetTimestampStats() *TimestampStats { + if x, ok := x.GetStats().(*DataStats_TimestampStats); ok { + return x.TimestampStats + } + return nil +} + +func (x *DataStats) GetArrayStats() *ArrayStats { + if x, ok := x.GetStats().(*DataStats_ArrayStats); ok { + return x.ArrayStats + } + return nil +} + +func (x *DataStats) GetStructStats() *StructStats { + if x, ok := x.GetStats().(*DataStats_StructStats); ok { + return x.StructStats + } + return nil +} + +func (x *DataStats) GetCategoryStats() *CategoryStats { + if x, ok := x.GetStats().(*DataStats_CategoryStats); ok { + return x.CategoryStats + } + return nil +} + +func (x *DataStats) GetDistinctValueCount() int64 { + if x != nil { + return x.DistinctValueCount + } + return 0 +} + +func (x *DataStats) GetNullValueCount() int64 { + if x != nil { + return x.NullValueCount + } + return 0 +} + +func (x *DataStats) GetValidValueCount() int64 { + if x != nil { + return x.ValidValueCount + } + return 0 +} + +type isDataStats_Stats interface { + isDataStats_Stats() +} + +type DataStats_Float64Stats struct { + // The statistics for FLOAT64 DataType. + Float64Stats *Float64Stats `protobuf:"bytes,3,opt,name=float64_stats,json=float64Stats,proto3,oneof"` +} + +type DataStats_StringStats struct { + // The statistics for STRING DataType. + StringStats *StringStats `protobuf:"bytes,4,opt,name=string_stats,json=stringStats,proto3,oneof"` +} + +type DataStats_TimestampStats struct { + // The statistics for TIMESTAMP DataType. + TimestampStats *TimestampStats `protobuf:"bytes,5,opt,name=timestamp_stats,json=timestampStats,proto3,oneof"` +} + +type DataStats_ArrayStats struct { + // The statistics for ARRAY DataType. + ArrayStats *ArrayStats `protobuf:"bytes,6,opt,name=array_stats,json=arrayStats,proto3,oneof"` +} + +type DataStats_StructStats struct { + // The statistics for STRUCT DataType. + StructStats *StructStats `protobuf:"bytes,7,opt,name=struct_stats,json=structStats,proto3,oneof"` +} + +type DataStats_CategoryStats struct { + // The statistics for CATEGORY DataType. + CategoryStats *CategoryStats `protobuf:"bytes,8,opt,name=category_stats,json=categoryStats,proto3,oneof"` +} + +func (*DataStats_Float64Stats) isDataStats_Stats() {} + +func (*DataStats_StringStats) isDataStats_Stats() {} + +func (*DataStats_TimestampStats) isDataStats_Stats() {} + +func (*DataStats_ArrayStats) isDataStats_Stats() {} + +func (*DataStats_StructStats) isDataStats_Stats() {} + +func (*DataStats_CategoryStats) isDataStats_Stats() {} + +// The data statistics of a series of FLOAT64 values. +type Float64Stats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The mean of the series. + Mean float64 `protobuf:"fixed64,1,opt,name=mean,proto3" json:"mean,omitempty"` + // The standard deviation of the series. + StandardDeviation float64 `protobuf:"fixed64,2,opt,name=standard_deviation,json=standardDeviation,proto3" json:"standard_deviation,omitempty"` + // Ordered from 0 to k k-quantile values of the data series of n values. + // The value at index i is, approximately, the i*n/k-th smallest value in the + // series; for i = 0 and i = k these are, respectively, the min and max + // values. + Quantiles []float64 `protobuf:"fixed64,3,rep,packed,name=quantiles,proto3" json:"quantiles,omitempty"` + // Histogram buckets of the data series. Sorted by the min value of the + // bucket, ascendingly, and the number of the buckets is dynamically + // generated. The buckets are non-overlapping and completely cover whole + // FLOAT64 range with min of first bucket being `"-Infinity"`, and max of + // the last one being `"Infinity"`. + HistogramBuckets []*Float64Stats_HistogramBucket `protobuf:"bytes,4,rep,name=histogram_buckets,json=histogramBuckets,proto3" json:"histogram_buckets,omitempty"` +} + +func (x *Float64Stats) Reset() { + *x = Float64Stats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Float64Stats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Float64Stats) ProtoMessage() {} + +func (x *Float64Stats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Float64Stats.ProtoReflect.Descriptor instead. +func (*Float64Stats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{1} +} + +func (x *Float64Stats) GetMean() float64 { + if x != nil { + return x.Mean + } + return 0 +} + +func (x *Float64Stats) GetStandardDeviation() float64 { + if x != nil { + return x.StandardDeviation + } + return 0 +} + +func (x *Float64Stats) GetQuantiles() []float64 { + if x != nil { + return x.Quantiles + } + return nil +} + +func (x *Float64Stats) GetHistogramBuckets() []*Float64Stats_HistogramBucket { + if x != nil { + return x.HistogramBuckets + } + return nil +} + +// The data statistics of a series of STRING values. +type StringStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The statistics of the top 20 unigrams, ordered by + // [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count]. + TopUnigramStats []*StringStats_UnigramStats `protobuf:"bytes,1,rep,name=top_unigram_stats,json=topUnigramStats,proto3" json:"top_unigram_stats,omitempty"` +} + +func (x *StringStats) Reset() { + *x = StringStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringStats) ProtoMessage() {} + +func (x *StringStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringStats.ProtoReflect.Descriptor instead. +func (*StringStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{2} +} + +func (x *StringStats) GetTopUnigramStats() []*StringStats_UnigramStats { + if x != nil { + return x.TopUnigramStats + } + return nil +} + +// The data statistics of a series of TIMESTAMP values. +type TimestampStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The string key is the pre-defined granularity. Currently supported: + // hour_of_day, day_of_week, month_of_year. + // Granularities finer that the granularity of timestamp data are not + // populated (e.g. if timestamps are at day granularity, then hour_of_day + // is not populated). + GranularStats map[string]*TimestampStats_GranularStats `protobuf:"bytes,1,rep,name=granular_stats,json=granularStats,proto3" json:"granular_stats,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TimestampStats) Reset() { + *x = TimestampStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimestampStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimestampStats) ProtoMessage() {} + +func (x *TimestampStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimestampStats.ProtoReflect.Descriptor instead. +func (*TimestampStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{3} +} + +func (x *TimestampStats) GetGranularStats() map[string]*TimestampStats_GranularStats { + if x != nil { + return x.GranularStats + } + return nil +} + +// The data statistics of a series of ARRAY values. +type ArrayStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Stats of all the values of all arrays, as if they were a single long + // series of data. The type depends on the element type of the array. + MemberStats *DataStats `protobuf:"bytes,2,opt,name=member_stats,json=memberStats,proto3" json:"member_stats,omitempty"` +} + +func (x *ArrayStats) Reset() { + *x = ArrayStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArrayStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArrayStats) ProtoMessage() {} + +func (x *ArrayStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArrayStats.ProtoReflect.Descriptor instead. +func (*ArrayStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{4} +} + +func (x *ArrayStats) GetMemberStats() *DataStats { + if x != nil { + return x.MemberStats + } + return nil +} + +// The data statistics of a series of STRUCT values. +type StructStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map from a field name of the struct to data stats aggregated over series + // of all data in that field across all the structs. + FieldStats map[string]*DataStats `protobuf:"bytes,1,rep,name=field_stats,json=fieldStats,proto3" json:"field_stats,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *StructStats) Reset() { + *x = StructStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructStats) ProtoMessage() {} + +func (x *StructStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructStats.ProtoReflect.Descriptor instead. +func (*StructStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{5} +} + +func (x *StructStats) GetFieldStats() map[string]*DataStats { + if x != nil { + return x.FieldStats + } + return nil +} + +// The data statistics of a series of CATEGORY values. +type CategoryStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The statistics of the top 20 CATEGORY values, ordered by + // + // [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count]. + TopCategoryStats []*CategoryStats_SingleCategoryStats `protobuf:"bytes,1,rep,name=top_category_stats,json=topCategoryStats,proto3" json:"top_category_stats,omitempty"` +} + +func (x *CategoryStats) Reset() { + *x = CategoryStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CategoryStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CategoryStats) ProtoMessage() {} + +func (x *CategoryStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CategoryStats.ProtoReflect.Descriptor instead. +func (*CategoryStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{6} +} + +func (x *CategoryStats) GetTopCategoryStats() []*CategoryStats_SingleCategoryStats { + if x != nil { + return x.TopCategoryStats + } + return nil +} + +// A correlation statistics between two series of DataType values. The series +// may have differing DataType-s, but within a single series the DataType must +// be the same. +type CorrelationStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The correlation value using the Cramer's V measure. + CramersV float64 `protobuf:"fixed64,1,opt,name=cramers_v,json=cramersV,proto3" json:"cramers_v,omitempty"` +} + +func (x *CorrelationStats) Reset() { + *x = CorrelationStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CorrelationStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CorrelationStats) ProtoMessage() {} + +func (x *CorrelationStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CorrelationStats.ProtoReflect.Descriptor instead. +func (*CorrelationStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{7} +} + +func (x *CorrelationStats) GetCramersV() float64 { + if x != nil { + return x.CramersV + } + return 0 +} + +// A bucket of a histogram. +type Float64Stats_HistogramBucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimum value of the bucket, inclusive. + Min float64 `protobuf:"fixed64,1,opt,name=min,proto3" json:"min,omitempty"` + // The maximum value of the bucket, exclusive unless max = `"Infinity"`, in + // which case it's inclusive. + Max float64 `protobuf:"fixed64,2,opt,name=max,proto3" json:"max,omitempty"` + // The number of data values that are in the bucket, i.e. are between + // min and max values. + Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *Float64Stats_HistogramBucket) Reset() { + *x = Float64Stats_HistogramBucket{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Float64Stats_HistogramBucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Float64Stats_HistogramBucket) ProtoMessage() {} + +func (x *Float64Stats_HistogramBucket) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Float64Stats_HistogramBucket.ProtoReflect.Descriptor instead. +func (*Float64Stats_HistogramBucket) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Float64Stats_HistogramBucket) GetMin() float64 { + if x != nil { + return x.Min + } + return 0 +} + +func (x *Float64Stats_HistogramBucket) GetMax() float64 { + if x != nil { + return x.Max + } + return 0 +} + +func (x *Float64Stats_HistogramBucket) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// The statistics of a unigram. +type StringStats_UnigramStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unigram. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // The number of occurrences of this unigram in the series. + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *StringStats_UnigramStats) Reset() { + *x = StringStats_UnigramStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringStats_UnigramStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringStats_UnigramStats) ProtoMessage() {} + +func (x *StringStats_UnigramStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringStats_UnigramStats.ProtoReflect.Descriptor instead. +func (*StringStats_UnigramStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *StringStats_UnigramStats) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *StringStats_UnigramStats) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// Stats split by a defined in context granularity. +type TimestampStats_GranularStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A map from granularity key to example count for that key. + // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). + Buckets map[int32]int64 `protobuf:"bytes,1,rep,name=buckets,proto3" json:"buckets,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *TimestampStats_GranularStats) Reset() { + *x = TimestampStats_GranularStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimestampStats_GranularStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimestampStats_GranularStats) ProtoMessage() {} + +func (x *TimestampStats_GranularStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimestampStats_GranularStats.ProtoReflect.Descriptor instead. +func (*TimestampStats_GranularStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *TimestampStats_GranularStats) GetBuckets() map[int32]int64 { + if x != nil { + return x.Buckets + } + return nil +} + +// The statistics of a single CATEGORY value. +type CategoryStats_SingleCategoryStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The CATEGORY value. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // The number of occurrences of this value in the series. + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *CategoryStats_SingleCategoryStats) Reset() { + *x = CategoryStats_SingleCategoryStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CategoryStats_SingleCategoryStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CategoryStats_SingleCategoryStats) ProtoMessage() {} + +func (x *CategoryStats_SingleCategoryStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CategoryStats_SingleCategoryStats.ProtoReflect.Descriptor instead. +func (*CategoryStats_SingleCategoryStats) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *CategoryStats_SingleCategoryStats) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *CategoryStats_SingleCategoryStats) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +var File_google_cloud_automl_v1beta1_data_stats_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_data_stats_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x85, 0x05, 0x0a, 0x09, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x36, 0x34, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, + 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x0c, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x56, 0x0a, 0x0f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x4d, + 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x53, 0x0a, + 0x0e, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x12, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, + 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, + 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x22, 0xa4, 0x02, 0x0a, 0x0c, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x61, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6e, + 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, + 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x61, 0x6e, 0x74, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x52, 0x09, 0x71, 0x75, 0x61, 0x6e, + 0x74, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, + 0x61, 0x6d, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, + 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x10, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x4b, 0x0a, + 0x0f, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d, + 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x03, 0x6d, 0x61, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x11, 0x74, 0x6f, + 0x70, 0x5f, 0x75, 0x6e, 0x69, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x55, 0x6e, 0x69, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0f, 0x74, 0x6f, + 0x70, 0x55, 0x6e, 0x69, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x3a, 0x0a, + 0x0c, 0x55, 0x6e, 0x69, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa4, 0x03, 0x0a, 0x0e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x65, 0x0a, 0x0e, + 0x67, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x67, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x1a, 0xad, 0x01, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x60, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x7b, 0x0a, 0x12, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x57, 0x0a, 0x0a, 0x41, 0x72, 0x72, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x49, + 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0b, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x0b, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x1a, 0x65, 0x0a, 0x0f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc0, 0x01, 0x0a, 0x0d, + 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x6c, 0x0a, + 0x12, 0x74, 0x6f, 0x70, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x10, 0x74, 0x6f, 0x70, 0x43, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2f, + 0x0a, 0x10, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x72, 0x61, 0x6d, 0x65, 0x72, 0x73, 0x5f, 0x76, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x72, 0x61, 0x6d, 0x65, 0x72, 0x73, 0x56, 0x42, + 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, + 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_data_stats_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_data_stats_proto_rawDescData = file_google_cloud_automl_v1beta1_data_stats_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_data_stats_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_data_stats_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_data_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_data_stats_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_data_stats_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_google_cloud_automl_v1beta1_data_stats_proto_goTypes = []interface{}{ + (*DataStats)(nil), // 0: google.cloud.automl.v1beta1.DataStats + (*Float64Stats)(nil), // 1: google.cloud.automl.v1beta1.Float64Stats + (*StringStats)(nil), // 2: google.cloud.automl.v1beta1.StringStats + (*TimestampStats)(nil), // 3: google.cloud.automl.v1beta1.TimestampStats + (*ArrayStats)(nil), // 4: google.cloud.automl.v1beta1.ArrayStats + (*StructStats)(nil), // 5: google.cloud.automl.v1beta1.StructStats + (*CategoryStats)(nil), // 6: google.cloud.automl.v1beta1.CategoryStats + (*CorrelationStats)(nil), // 7: google.cloud.automl.v1beta1.CorrelationStats + (*Float64Stats_HistogramBucket)(nil), // 8: google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + (*StringStats_UnigramStats)(nil), // 9: google.cloud.automl.v1beta1.StringStats.UnigramStats + (*TimestampStats_GranularStats)(nil), // 10: google.cloud.automl.v1beta1.TimestampStats.GranularStats + nil, // 11: google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry + nil, // 12: google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry + nil, // 13: google.cloud.automl.v1beta1.StructStats.FieldStatsEntry + (*CategoryStats_SingleCategoryStats)(nil), // 14: google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats +} +var file_google_cloud_automl_v1beta1_data_stats_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.DataStats.float64_stats:type_name -> google.cloud.automl.v1beta1.Float64Stats + 2, // 1: google.cloud.automl.v1beta1.DataStats.string_stats:type_name -> google.cloud.automl.v1beta1.StringStats + 3, // 2: google.cloud.automl.v1beta1.DataStats.timestamp_stats:type_name -> google.cloud.automl.v1beta1.TimestampStats + 4, // 3: google.cloud.automl.v1beta1.DataStats.array_stats:type_name -> google.cloud.automl.v1beta1.ArrayStats + 5, // 4: google.cloud.automl.v1beta1.DataStats.struct_stats:type_name -> google.cloud.automl.v1beta1.StructStats + 6, // 5: google.cloud.automl.v1beta1.DataStats.category_stats:type_name -> google.cloud.automl.v1beta1.CategoryStats + 8, // 6: google.cloud.automl.v1beta1.Float64Stats.histogram_buckets:type_name -> google.cloud.automl.v1beta1.Float64Stats.HistogramBucket + 9, // 7: google.cloud.automl.v1beta1.StringStats.top_unigram_stats:type_name -> google.cloud.automl.v1beta1.StringStats.UnigramStats + 11, // 8: google.cloud.automl.v1beta1.TimestampStats.granular_stats:type_name -> google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry + 0, // 9: google.cloud.automl.v1beta1.ArrayStats.member_stats:type_name -> google.cloud.automl.v1beta1.DataStats + 13, // 10: google.cloud.automl.v1beta1.StructStats.field_stats:type_name -> google.cloud.automl.v1beta1.StructStats.FieldStatsEntry + 14, // 11: google.cloud.automl.v1beta1.CategoryStats.top_category_stats:type_name -> google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats + 12, // 12: google.cloud.automl.v1beta1.TimestampStats.GranularStats.buckets:type_name -> google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry + 10, // 13: google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry.value:type_name -> google.cloud.automl.v1beta1.TimestampStats.GranularStats + 0, // 14: google.cloud.automl.v1beta1.StructStats.FieldStatsEntry.value:type_name -> google.cloud.automl.v1beta1.DataStats + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_data_stats_proto_init() } +func file_google_cloud_automl_v1beta1_data_stats_proto_init() { + if File_google_cloud_automl_v1beta1_data_stats_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Float64Stats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimestampStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArrayStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CategoryStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CorrelationStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Float64Stats_HistogramBucket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringStats_UnigramStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimestampStats_GranularStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CategoryStats_SingleCategoryStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*DataStats_Float64Stats)(nil), + (*DataStats_StringStats)(nil), + (*DataStats_TimestampStats)(nil), + (*DataStats_ArrayStats)(nil), + (*DataStats_StructStats)(nil), + (*DataStats_CategoryStats)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_data_stats_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_data_stats_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_data_stats_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_data_stats_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_data_stats_proto = out.File + file_google_cloud_automl_v1beta1_data_stats_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_data_stats_proto_goTypes = nil + file_google_cloud_automl_v1beta1_data_stats_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/data_types.pb.go b/automl/apiv1beta1/automlpb/data_types.pb.go new file mode 100644 index 000000000000..dfbe66303e06 --- /dev/null +++ b/automl/apiv1beta1/automlpb/data_types.pb.go @@ -0,0 +1,452 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/data_types.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// `TypeCode` is used as a part of +// [DataType][google.cloud.automl.v1beta1.DataType]. +type TypeCode int32 + +const ( + // Not specified. Should not be used. + TypeCode_TYPE_CODE_UNSPECIFIED TypeCode = 0 + // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or + // `"-Infinity"`. + TypeCode_FLOAT64 TypeCode = 3 + // Must be between 0AD and 9999AD. Encoded as `string` according to + // [time_format][google.cloud.automl.v1beta1.DataType.time_format], or, if + // that format is not set, then in RFC 3339 `date-time` format, where + // `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). + TypeCode_TIMESTAMP TypeCode = 4 + // Encoded as `string`. + TypeCode_STRING TypeCode = 6 + // Encoded as `list`, where the list elements are represented according to + // + // [list_element_type][google.cloud.automl.v1beta1.DataType.list_element_type]. + TypeCode_ARRAY TypeCode = 8 + // Encoded as `struct`, where field values are represented according to + // [struct_type][google.cloud.automl.v1beta1.DataType.struct_type]. + TypeCode_STRUCT TypeCode = 9 + // Values of this type are not further understood by AutoML, + // e.g. AutoML is unable to tell the order of values (as it could with + // FLOAT64), or is unable to say if one value contains another (as it + // could with STRING). + // Encoded as `string` (bytes should be base64-encoded, as described in RFC + // 4648, section 4). + TypeCode_CATEGORY TypeCode = 10 +) + +// Enum value maps for TypeCode. +var ( + TypeCode_name = map[int32]string{ + 0: "TYPE_CODE_UNSPECIFIED", + 3: "FLOAT64", + 4: "TIMESTAMP", + 6: "STRING", + 8: "ARRAY", + 9: "STRUCT", + 10: "CATEGORY", + } + TypeCode_value = map[string]int32{ + "TYPE_CODE_UNSPECIFIED": 0, + "FLOAT64": 3, + "TIMESTAMP": 4, + "STRING": 6, + "ARRAY": 8, + "STRUCT": 9, + "CATEGORY": 10, + } +) + +func (x TypeCode) Enum() *TypeCode { + p := new(TypeCode) + *p = x + return p +} + +func (x TypeCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TypeCode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_automl_v1beta1_data_types_proto_enumTypes[0].Descriptor() +} + +func (TypeCode) Type() protoreflect.EnumType { + return &file_google_cloud_automl_v1beta1_data_types_proto_enumTypes[0] +} + +func (x TypeCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TypeCode.Descriptor instead. +func (TypeCode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_types_proto_rawDescGZIP(), []int{0} +} + +// Indicated the type of data that can be stored in a structured data entity +// (e.g. a table). +type DataType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Details of DataType-s that need additional specification. + // + // Types that are assignable to Details: + // + // *DataType_ListElementType + // *DataType_StructType + // *DataType_TimeFormat + Details isDataType_Details `protobuf_oneof:"details"` + // Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type. + TypeCode TypeCode `protobuf:"varint,1,opt,name=type_code,json=typeCode,proto3,enum=google.cloud.automl.v1beta1.TypeCode" json:"type_code,omitempty"` + // If true, this DataType can also be `NULL`. In .CSV files `NULL` value is + // expressed as an empty string. + Nullable bool `protobuf:"varint,4,opt,name=nullable,proto3" json:"nullable,omitempty"` +} + +func (x *DataType) Reset() { + *x = DataType{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataType) ProtoMessage() {} + +func (x *DataType) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataType.ProtoReflect.Descriptor instead. +func (*DataType) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_types_proto_rawDescGZIP(), []int{0} +} + +func (m *DataType) GetDetails() isDataType_Details { + if m != nil { + return m.Details + } + return nil +} + +func (x *DataType) GetListElementType() *DataType { + if x, ok := x.GetDetails().(*DataType_ListElementType); ok { + return x.ListElementType + } + return nil +} + +func (x *DataType) GetStructType() *StructType { + if x, ok := x.GetDetails().(*DataType_StructType); ok { + return x.StructType + } + return nil +} + +func (x *DataType) GetTimeFormat() string { + if x, ok := x.GetDetails().(*DataType_TimeFormat); ok { + return x.TimeFormat + } + return "" +} + +func (x *DataType) GetTypeCode() TypeCode { + if x != nil { + return x.TypeCode + } + return TypeCode_TYPE_CODE_UNSPECIFIED +} + +func (x *DataType) GetNullable() bool { + if x != nil { + return x.Nullable + } + return false +} + +type isDataType_Details interface { + isDataType_Details() +} + +type DataType_ListElementType struct { + // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY], + // then `list_element_type` is the type of the elements. + ListElementType *DataType `protobuf:"bytes,2,opt,name=list_element_type,json=listElementType,proto3,oneof"` +} + +type DataType_StructType struct { + // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type` + // provides type information for the struct's fields. + StructType *StructType `protobuf:"bytes,3,opt,name=struct_type,json=structType,proto3,oneof"` +} + +type DataType_TimeFormat struct { + // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP] + // then `time_format` provides the format in which that time field is + // expressed. The time_format must either be one of: + // * `UNIX_SECONDS` + // * `UNIX_MILLISECONDS` + // * `UNIX_MICROSECONDS` + // * `UNIX_NANOSECONDS` + // (for respectively number of seconds, milliseconds, microseconds and + // nanoseconds since start of the Unix epoch); + // or be written in `strftime` syntax. If time_format is not set, then the + // default format as described on the type_code is used. + TimeFormat string `protobuf:"bytes,5,opt,name=time_format,json=timeFormat,proto3,oneof"` +} + +func (*DataType_ListElementType) isDataType_Details() {} + +func (*DataType_StructType) isDataType_Details() {} + +func (*DataType_TimeFormat) isDataType_Details() {} + +// `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type. +type StructType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unordered map of struct field names to their data types. + // Fields cannot be added or removed via Update. Their names and + // data types are still mutable. + Fields map[string]*DataType `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *StructType) Reset() { + *x = StructType{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructType) ProtoMessage() {} + +func (x *StructType) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructType.ProtoReflect.Descriptor instead. +func (*StructType) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_data_types_proto_rawDescGZIP(), []int{1} +} + +func (x *StructType) GetFields() map[string]*DataType { + if x != nil { + return x.Fields + } + return nil +} + +var File_google_cloud_automl_v1beta1_data_types_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_data_types_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0xb9, 0x02, 0x0a, 0x08, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x11, 0x6c, 0x69, 0x73, 0x74, + 0x5f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x6c, 0x69, + 0x73, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, + 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x42, 0x0a, 0x09, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xbb, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x1a, 0x60, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x72, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, + 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, + 0x4e, 0x47, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x08, 0x12, + 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x09, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x10, 0x0a, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_data_types_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_data_types_proto_rawDescData = file_google_cloud_automl_v1beta1_data_types_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_data_types_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_data_types_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_data_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_data_types_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_data_types_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_data_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_automl_v1beta1_data_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_automl_v1beta1_data_types_proto_goTypes = []interface{}{ + (TypeCode)(0), // 0: google.cloud.automl.v1beta1.TypeCode + (*DataType)(nil), // 1: google.cloud.automl.v1beta1.DataType + (*StructType)(nil), // 2: google.cloud.automl.v1beta1.StructType + nil, // 3: google.cloud.automl.v1beta1.StructType.FieldsEntry +} +var file_google_cloud_automl_v1beta1_data_types_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.DataType.list_element_type:type_name -> google.cloud.automl.v1beta1.DataType + 2, // 1: google.cloud.automl.v1beta1.DataType.struct_type:type_name -> google.cloud.automl.v1beta1.StructType + 0, // 2: google.cloud.automl.v1beta1.DataType.type_code:type_name -> google.cloud.automl.v1beta1.TypeCode + 3, // 3: google.cloud.automl.v1beta1.StructType.fields:type_name -> google.cloud.automl.v1beta1.StructType.FieldsEntry + 1, // 4: google.cloud.automl.v1beta1.StructType.FieldsEntry.value:type_name -> google.cloud.automl.v1beta1.DataType + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_data_types_proto_init() } +func file_google_cloud_automl_v1beta1_data_types_proto_init() { + if File_google_cloud_automl_v1beta1_data_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_data_types_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*DataType_ListElementType)(nil), + (*DataType_StructType)(nil), + (*DataType_TimeFormat)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_data_types_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_data_types_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_data_types_proto_depIdxs, + EnumInfos: file_google_cloud_automl_v1beta1_data_types_proto_enumTypes, + MessageInfos: file_google_cloud_automl_v1beta1_data_types_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_data_types_proto = out.File + file_google_cloud_automl_v1beta1_data_types_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_data_types_proto_goTypes = nil + file_google_cloud_automl_v1beta1_data_types_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/dataset.pb.go b/automl/apiv1beta1/automlpb/dataset.pb.go new file mode 100644 index 000000000000..aec2b6c5bdf5 --- /dev/null +++ b/automl/apiv1beta1/automlpb/dataset.pb.go @@ -0,0 +1,528 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/dataset.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A workspace for solving a single, particular machine learning (ML) problem. +// A workspace contains examples that may be annotated. +type Dataset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. + // The dataset metadata that is specific to the problem type. + // + // Types that are assignable to DatasetMetadata: + // + // *Dataset_TranslationDatasetMetadata + // *Dataset_ImageClassificationDatasetMetadata + // *Dataset_TextClassificationDatasetMetadata + // *Dataset_ImageObjectDetectionDatasetMetadata + // *Dataset_VideoClassificationDatasetMetadata + // *Dataset_VideoObjectTrackingDatasetMetadata + // *Dataset_TextExtractionDatasetMetadata + // *Dataset_TextSentimentDatasetMetadata + // *Dataset_TablesDatasetMetadata + DatasetMetadata isDataset_DatasetMetadata `protobuf_oneof:"dataset_metadata"` + // Output only. The resource name of the dataset. + // Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The name of the dataset to show in the interface. The name can be + // up to 32 characters long and can consist only of ASCII Latin letters A-Z + // and a-z, underscores + // (_), and ASCII digits 0-9. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // User-provided description of the dataset. The description can be up to + // 25000 characters long. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. The number of examples in the dataset. + ExampleCount int32 `protobuf:"varint,21,opt,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"` + // Output only. Timestamp when this dataset was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + Etag string `protobuf:"bytes,17,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *Dataset) Reset() { + *x = Dataset{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dataset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dataset) ProtoMessage() {} + +func (x *Dataset) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dataset.ProtoReflect.Descriptor instead. +func (*Dataset) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_dataset_proto_rawDescGZIP(), []int{0} +} + +func (m *Dataset) GetDatasetMetadata() isDataset_DatasetMetadata { + if m != nil { + return m.DatasetMetadata + } + return nil +} + +func (x *Dataset) GetTranslationDatasetMetadata() *TranslationDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_TranslationDatasetMetadata); ok { + return x.TranslationDatasetMetadata + } + return nil +} + +func (x *Dataset) GetImageClassificationDatasetMetadata() *ImageClassificationDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_ImageClassificationDatasetMetadata); ok { + return x.ImageClassificationDatasetMetadata + } + return nil +} + +func (x *Dataset) GetTextClassificationDatasetMetadata() *TextClassificationDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_TextClassificationDatasetMetadata); ok { + return x.TextClassificationDatasetMetadata + } + return nil +} + +func (x *Dataset) GetImageObjectDetectionDatasetMetadata() *ImageObjectDetectionDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_ImageObjectDetectionDatasetMetadata); ok { + return x.ImageObjectDetectionDatasetMetadata + } + return nil +} + +func (x *Dataset) GetVideoClassificationDatasetMetadata() *VideoClassificationDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_VideoClassificationDatasetMetadata); ok { + return x.VideoClassificationDatasetMetadata + } + return nil +} + +func (x *Dataset) GetVideoObjectTrackingDatasetMetadata() *VideoObjectTrackingDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_VideoObjectTrackingDatasetMetadata); ok { + return x.VideoObjectTrackingDatasetMetadata + } + return nil +} + +func (x *Dataset) GetTextExtractionDatasetMetadata() *TextExtractionDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_TextExtractionDatasetMetadata); ok { + return x.TextExtractionDatasetMetadata + } + return nil +} + +func (x *Dataset) GetTextSentimentDatasetMetadata() *TextSentimentDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_TextSentimentDatasetMetadata); ok { + return x.TextSentimentDatasetMetadata + } + return nil +} + +func (x *Dataset) GetTablesDatasetMetadata() *TablesDatasetMetadata { + if x, ok := x.GetDatasetMetadata().(*Dataset_TablesDatasetMetadata); ok { + return x.TablesDatasetMetadata + } + return nil +} + +func (x *Dataset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Dataset) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Dataset) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Dataset) GetExampleCount() int32 { + if x != nil { + return x.ExampleCount + } + return 0 +} + +func (x *Dataset) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Dataset) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +type isDataset_DatasetMetadata interface { + isDataset_DatasetMetadata() +} + +type Dataset_TranslationDatasetMetadata struct { + // Metadata for a dataset used for translation. + TranslationDatasetMetadata *TranslationDatasetMetadata `protobuf:"bytes,23,opt,name=translation_dataset_metadata,json=translationDatasetMetadata,proto3,oneof"` +} + +type Dataset_ImageClassificationDatasetMetadata struct { + // Metadata for a dataset used for image classification. + ImageClassificationDatasetMetadata *ImageClassificationDatasetMetadata `protobuf:"bytes,24,opt,name=image_classification_dataset_metadata,json=imageClassificationDatasetMetadata,proto3,oneof"` +} + +type Dataset_TextClassificationDatasetMetadata struct { + // Metadata for a dataset used for text classification. + TextClassificationDatasetMetadata *TextClassificationDatasetMetadata `protobuf:"bytes,25,opt,name=text_classification_dataset_metadata,json=textClassificationDatasetMetadata,proto3,oneof"` +} + +type Dataset_ImageObjectDetectionDatasetMetadata struct { + // Metadata for a dataset used for image object detection. + ImageObjectDetectionDatasetMetadata *ImageObjectDetectionDatasetMetadata `protobuf:"bytes,26,opt,name=image_object_detection_dataset_metadata,json=imageObjectDetectionDatasetMetadata,proto3,oneof"` +} + +type Dataset_VideoClassificationDatasetMetadata struct { + // Metadata for a dataset used for video classification. + VideoClassificationDatasetMetadata *VideoClassificationDatasetMetadata `protobuf:"bytes,31,opt,name=video_classification_dataset_metadata,json=videoClassificationDatasetMetadata,proto3,oneof"` +} + +type Dataset_VideoObjectTrackingDatasetMetadata struct { + // Metadata for a dataset used for video object tracking. + VideoObjectTrackingDatasetMetadata *VideoObjectTrackingDatasetMetadata `protobuf:"bytes,29,opt,name=video_object_tracking_dataset_metadata,json=videoObjectTrackingDatasetMetadata,proto3,oneof"` +} + +type Dataset_TextExtractionDatasetMetadata struct { + // Metadata for a dataset used for text extraction. + TextExtractionDatasetMetadata *TextExtractionDatasetMetadata `protobuf:"bytes,28,opt,name=text_extraction_dataset_metadata,json=textExtractionDatasetMetadata,proto3,oneof"` +} + +type Dataset_TextSentimentDatasetMetadata struct { + // Metadata for a dataset used for text sentiment. + TextSentimentDatasetMetadata *TextSentimentDatasetMetadata `protobuf:"bytes,30,opt,name=text_sentiment_dataset_metadata,json=textSentimentDatasetMetadata,proto3,oneof"` +} + +type Dataset_TablesDatasetMetadata struct { + // Metadata for a dataset used for Tables. + TablesDatasetMetadata *TablesDatasetMetadata `protobuf:"bytes,33,opt,name=tables_dataset_metadata,json=tablesDatasetMetadata,proto3,oneof"` +} + +func (*Dataset_TranslationDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_ImageClassificationDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_TextClassificationDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_ImageObjectDetectionDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_VideoClassificationDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_VideoObjectTrackingDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_TextExtractionDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_TextSentimentDatasetMetadata) isDataset_DatasetMetadata() {} + +func (*Dataset_TablesDatasetMetadata) isDataset_DatasetMetadata() {} + +var File_google_cloud_automl_v1beta1_dataset_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_dataset_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x0c, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x12, 0x7b, 0x0a, 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x48, 0x00, 0x52, 0x1a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x94, 0x01, 0x0a, 0x25, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x48, 0x00, 0x52, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x91, 0x01, 0x0a, 0x24, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x21, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x98, 0x01, 0x0a, 0x27, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, + 0x00, 0x52, 0x23, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x94, 0x01, 0x0a, 0x25, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x22, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x95, 0x01, + 0x0a, 0x26, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, + 0x00, 0x52, 0x22, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x85, 0x01, 0x0a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1d, + 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x82, 0x01, + 0x0a, 0x1f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x48, 0x00, 0x52, 0x1c, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x6c, 0x0a, 0x17, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x21, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x15, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, + 0x74, 0x61, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x3a, + 0x5e, 0xea, 0x41, 0x5b, 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x12, 0x3a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x42, + 0x12, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, + 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, + 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_dataset_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_dataset_proto_rawDescData = file_google_cloud_automl_v1beta1_dataset_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_dataset_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_dataset_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_dataset_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_dataset_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_dataset_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_dataset_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_dataset_proto_goTypes = []interface{}{ + (*Dataset)(nil), // 0: google.cloud.automl.v1beta1.Dataset + (*TranslationDatasetMetadata)(nil), // 1: google.cloud.automl.v1beta1.TranslationDatasetMetadata + (*ImageClassificationDatasetMetadata)(nil), // 2: google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + (*TextClassificationDatasetMetadata)(nil), // 3: google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + (*ImageObjectDetectionDatasetMetadata)(nil), // 4: google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + (*VideoClassificationDatasetMetadata)(nil), // 5: google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + (*VideoObjectTrackingDatasetMetadata)(nil), // 6: google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + (*TextExtractionDatasetMetadata)(nil), // 7: google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + (*TextSentimentDatasetMetadata)(nil), // 8: google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + (*TablesDatasetMetadata)(nil), // 9: google.cloud.automl.v1beta1.TablesDatasetMetadata + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp +} +var file_google_cloud_automl_v1beta1_dataset_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.Dataset.translation_dataset_metadata:type_name -> google.cloud.automl.v1beta1.TranslationDatasetMetadata + 2, // 1: google.cloud.automl.v1beta1.Dataset.image_classification_dataset_metadata:type_name -> google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + 3, // 2: google.cloud.automl.v1beta1.Dataset.text_classification_dataset_metadata:type_name -> google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + 4, // 3: google.cloud.automl.v1beta1.Dataset.image_object_detection_dataset_metadata:type_name -> google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + 5, // 4: google.cloud.automl.v1beta1.Dataset.video_classification_dataset_metadata:type_name -> google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + 6, // 5: google.cloud.automl.v1beta1.Dataset.video_object_tracking_dataset_metadata:type_name -> google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + 7, // 6: google.cloud.automl.v1beta1.Dataset.text_extraction_dataset_metadata:type_name -> google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + 8, // 7: google.cloud.automl.v1beta1.Dataset.text_sentiment_dataset_metadata:type_name -> google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + 9, // 8: google.cloud.automl.v1beta1.Dataset.tables_dataset_metadata:type_name -> google.cloud.automl.v1beta1.TablesDatasetMetadata + 10, // 9: google.cloud.automl.v1beta1.Dataset.create_time:type_name -> google.protobuf.Timestamp + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_dataset_proto_init() } +func file_google_cloud_automl_v1beta1_dataset_proto_init() { + if File_google_cloud_automl_v1beta1_dataset_proto != nil { + return + } + file_google_cloud_automl_v1beta1_image_proto_init() + file_google_cloud_automl_v1beta1_tables_proto_init() + file_google_cloud_automl_v1beta1_text_proto_init() + file_google_cloud_automl_v1beta1_translation_proto_init() + file_google_cloud_automl_v1beta1_video_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dataset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_dataset_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Dataset_TranslationDatasetMetadata)(nil), + (*Dataset_ImageClassificationDatasetMetadata)(nil), + (*Dataset_TextClassificationDatasetMetadata)(nil), + (*Dataset_ImageObjectDetectionDatasetMetadata)(nil), + (*Dataset_VideoClassificationDatasetMetadata)(nil), + (*Dataset_VideoObjectTrackingDatasetMetadata)(nil), + (*Dataset_TextExtractionDatasetMetadata)(nil), + (*Dataset_TextSentimentDatasetMetadata)(nil), + (*Dataset_TablesDatasetMetadata)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_dataset_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_dataset_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_dataset_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_dataset_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_dataset_proto = out.File + file_google_cloud_automl_v1beta1_dataset_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_dataset_proto_goTypes = nil + file_google_cloud_automl_v1beta1_dataset_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/detection.pb.go b/automl/apiv1beta1/automlpb/detection.pb.go new file mode 100644 index 000000000000..987826987532 --- /dev/null +++ b/automl/apiv1beta1/automlpb/detection.pb.go @@ -0,0 +1,740 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/detection.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Annotation details for image object detection. +type ImageObjectDetectionAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The rectangle representing the object location. + BoundingBox *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"` + // Output only. The confidence that this annotation is positive for the parent example, + // value in [0, 1], higher means higher positivity confidence. + Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"` +} + +func (x *ImageObjectDetectionAnnotation) Reset() { + *x = ImageObjectDetectionAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageObjectDetectionAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageObjectDetectionAnnotation) ProtoMessage() {} + +func (x *ImageObjectDetectionAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageObjectDetectionAnnotation.ProtoReflect.Descriptor instead. +func (*ImageObjectDetectionAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP(), []int{0} +} + +func (x *ImageObjectDetectionAnnotation) GetBoundingBox() *BoundingPoly { + if x != nil { + return x.BoundingBox + } + return nil +} + +func (x *ImageObjectDetectionAnnotation) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +// Annotation details for video object tracking. +type VideoObjectTrackingAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The instance of the object, expressed as a positive integer. Used to tell + // apart objects of the same type (i.e. AnnotationSpec) when multiple are + // present on a single example. + // NOTE: Instance ID prediction quality is not a part of model evaluation and + // is done as best effort. Especially in cases when an entity goes + // off-screen for a longer time (minutes), when it comes back it may be given + // a new instance ID. + InstanceId string `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // Required. A time (frame) of a video to which this annotation pertains. + // Represented as the duration since the video's start. + TimeOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=time_offset,json=timeOffset,proto3" json:"time_offset,omitempty"` + // Required. The rectangle representing the object location on the frame (i.e. + // at the time_offset of the video). + BoundingBox *BoundingPoly `protobuf:"bytes,3,opt,name=bounding_box,json=boundingBox,proto3" json:"bounding_box,omitempty"` + // Output only. The confidence that this annotation is positive for the video at + // the time_offset, value in [0, 1], higher means higher positivity + // confidence. For annotations created by the user the score is 1. When + // user approves an annotation, the original float score is kept (and not + // changed to 1). + Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"` +} + +func (x *VideoObjectTrackingAnnotation) Reset() { + *x = VideoObjectTrackingAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoObjectTrackingAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoObjectTrackingAnnotation) ProtoMessage() {} + +func (x *VideoObjectTrackingAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoObjectTrackingAnnotation.ProtoReflect.Descriptor instead. +func (*VideoObjectTrackingAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP(), []int{1} +} + +func (x *VideoObjectTrackingAnnotation) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *VideoObjectTrackingAnnotation) GetTimeOffset() *durationpb.Duration { + if x != nil { + return x.TimeOffset + } + return nil +} + +func (x *VideoObjectTrackingAnnotation) GetBoundingBox() *BoundingPoly { + if x != nil { + return x.BoundingBox + } + return nil +} + +func (x *VideoObjectTrackingAnnotation) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +// Bounding box matching model metrics for a single intersection-over-union +// threshold and multiple label match confidence thresholds. +type BoundingBoxMetricsEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The intersection-over-union threshold value used to compute + // this metrics entry. + IouThreshold float32 `protobuf:"fixed32,1,opt,name=iou_threshold,json=iouThreshold,proto3" json:"iou_threshold,omitempty"` + // Output only. The mean average precision, most often close to au_prc. + MeanAveragePrecision float32 `protobuf:"fixed32,2,opt,name=mean_average_precision,json=meanAveragePrecision,proto3" json:"mean_average_precision,omitempty"` + // Output only. Metrics for each label-match confidence_threshold from + // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is + // derived from them. + ConfidenceMetricsEntries []*BoundingBoxMetricsEntry_ConfidenceMetricsEntry `protobuf:"bytes,3,rep,name=confidence_metrics_entries,json=confidenceMetricsEntries,proto3" json:"confidence_metrics_entries,omitempty"` +} + +func (x *BoundingBoxMetricsEntry) Reset() { + *x = BoundingBoxMetricsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundingBoxMetricsEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundingBoxMetricsEntry) ProtoMessage() {} + +func (x *BoundingBoxMetricsEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundingBoxMetricsEntry.ProtoReflect.Descriptor instead. +func (*BoundingBoxMetricsEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP(), []int{2} +} + +func (x *BoundingBoxMetricsEntry) GetIouThreshold() float32 { + if x != nil { + return x.IouThreshold + } + return 0 +} + +func (x *BoundingBoxMetricsEntry) GetMeanAveragePrecision() float32 { + if x != nil { + return x.MeanAveragePrecision + } + return 0 +} + +func (x *BoundingBoxMetricsEntry) GetConfidenceMetricsEntries() []*BoundingBoxMetricsEntry_ConfidenceMetricsEntry { + if x != nil { + return x.ConfidenceMetricsEntries + } + return nil +} + +// Model evaluation metrics for image object detection problems. +// Evaluates prediction quality of labeled bounding boxes. +type ImageObjectDetectionEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The total number of bounding boxes (i.e. summed over all + // images) the ground truth used to create this evaluation had. + EvaluatedBoundingBoxCount int32 `protobuf:"varint,1,opt,name=evaluated_bounding_box_count,json=evaluatedBoundingBoxCount,proto3" json:"evaluated_bounding_box_count,omitempty"` + // Output only. The bounding boxes match metrics for each + // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + // pair. + BoundingBoxMetricsEntries []*BoundingBoxMetricsEntry `protobuf:"bytes,2,rep,name=bounding_box_metrics_entries,json=boundingBoxMetricsEntries,proto3" json:"bounding_box_metrics_entries,omitempty"` + // Output only. The single metric for bounding boxes evaluation: + // the mean_average_precision averaged over all bounding_box_metrics_entries. + BoundingBoxMeanAveragePrecision float32 `protobuf:"fixed32,3,opt,name=bounding_box_mean_average_precision,json=boundingBoxMeanAveragePrecision,proto3" json:"bounding_box_mean_average_precision,omitempty"` +} + +func (x *ImageObjectDetectionEvaluationMetrics) Reset() { + *x = ImageObjectDetectionEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageObjectDetectionEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageObjectDetectionEvaluationMetrics) ProtoMessage() {} + +func (x *ImageObjectDetectionEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageObjectDetectionEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*ImageObjectDetectionEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP(), []int{3} +} + +func (x *ImageObjectDetectionEvaluationMetrics) GetEvaluatedBoundingBoxCount() int32 { + if x != nil { + return x.EvaluatedBoundingBoxCount + } + return 0 +} + +func (x *ImageObjectDetectionEvaluationMetrics) GetBoundingBoxMetricsEntries() []*BoundingBoxMetricsEntry { + if x != nil { + return x.BoundingBoxMetricsEntries + } + return nil +} + +func (x *ImageObjectDetectionEvaluationMetrics) GetBoundingBoxMeanAveragePrecision() float32 { + if x != nil { + return x.BoundingBoxMeanAveragePrecision + } + return 0 +} + +// Model evaluation metrics for video object tracking problems. +// Evaluates prediction quality of both labeled bounding boxes and labeled +// tracks (i.e. series of bounding boxes sharing same label and instance ID). +type VideoObjectTrackingEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The number of video frames used to create this evaluation. + EvaluatedFrameCount int32 `protobuf:"varint,1,opt,name=evaluated_frame_count,json=evaluatedFrameCount,proto3" json:"evaluated_frame_count,omitempty"` + // Output only. The total number of bounding boxes (i.e. summed over all + // frames) the ground truth used to create this evaluation had. + EvaluatedBoundingBoxCount int32 `protobuf:"varint,2,opt,name=evaluated_bounding_box_count,json=evaluatedBoundingBoxCount,proto3" json:"evaluated_bounding_box_count,omitempty"` + // Output only. The bounding boxes match metrics for each + // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 + // pair. + BoundingBoxMetricsEntries []*BoundingBoxMetricsEntry `protobuf:"bytes,4,rep,name=bounding_box_metrics_entries,json=boundingBoxMetricsEntries,proto3" json:"bounding_box_metrics_entries,omitempty"` + // Output only. The single metric for bounding boxes evaluation: + // the mean_average_precision averaged over all bounding_box_metrics_entries. + BoundingBoxMeanAveragePrecision float32 `protobuf:"fixed32,6,opt,name=bounding_box_mean_average_precision,json=boundingBoxMeanAveragePrecision,proto3" json:"bounding_box_mean_average_precision,omitempty"` +} + +func (x *VideoObjectTrackingEvaluationMetrics) Reset() { + *x = VideoObjectTrackingEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoObjectTrackingEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoObjectTrackingEvaluationMetrics) ProtoMessage() {} + +func (x *VideoObjectTrackingEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoObjectTrackingEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*VideoObjectTrackingEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP(), []int{4} +} + +func (x *VideoObjectTrackingEvaluationMetrics) GetEvaluatedFrameCount() int32 { + if x != nil { + return x.EvaluatedFrameCount + } + return 0 +} + +func (x *VideoObjectTrackingEvaluationMetrics) GetEvaluatedBoundingBoxCount() int32 { + if x != nil { + return x.EvaluatedBoundingBoxCount + } + return 0 +} + +func (x *VideoObjectTrackingEvaluationMetrics) GetBoundingBoxMetricsEntries() []*BoundingBoxMetricsEntry { + if x != nil { + return x.BoundingBoxMetricsEntries + } + return nil +} + +func (x *VideoObjectTrackingEvaluationMetrics) GetBoundingBoxMeanAveragePrecision() float32 { + if x != nil { + return x.BoundingBoxMeanAveragePrecision + } + return 0 +} + +// Metrics for a single confidence threshold. +type BoundingBoxMetricsEntry_ConfidenceMetricsEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The confidence threshold value used to compute the metrics. + ConfidenceThreshold float32 `protobuf:"fixed32,1,opt,name=confidence_threshold,json=confidenceThreshold,proto3" json:"confidence_threshold,omitempty"` + // Output only. Recall under the given confidence threshold. + Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"` + // Output only. Precision under the given confidence threshold. + Precision float32 `protobuf:"fixed32,3,opt,name=precision,proto3" json:"precision,omitempty"` + // Output only. The harmonic mean of recall and precision. + F1Score float32 `protobuf:"fixed32,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` +} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) Reset() { + *x = BoundingBoxMetricsEntry_ConfidenceMetricsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundingBoxMetricsEntry_ConfidenceMetricsEntry) ProtoMessage() {} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundingBoxMetricsEntry_ConfidenceMetricsEntry.ProtoReflect.Descriptor instead. +func (*BoundingBoxMetricsEntry_ConfidenceMetricsEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) GetConfidenceThreshold() float32 { + if x != nil { + return x.ConfidenceThreshold + } + return 0 +} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) GetRecall() float32 { + if x != nil { + return x.Recall + } + return 0 +} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) GetPrecision() float32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *BoundingBoxMetricsEntry_ConfidenceMetricsEntry) GetF1Score() float32 { + if x != nil { + return x.F1Score + } + return 0 +} + +var File_google_cloud_automl_v1beta1_detection_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_detection_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x1e, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0c, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xe0, 0x01, + 0x0a, 0x1d, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x3a, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0c, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x52, 0x0b, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x22, 0x9f, 0x03, 0x0a, 0x17, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, + 0x69, 0x6f, 0x75, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x0c, 0x69, 0x6f, 0x75, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x14, 0x6d, 0x65, 0x61, 0x6e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x89, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x1a, 0x9c, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, + 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x31, + 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x25, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x3f, 0x0a, 0x1c, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x19, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x75, 0x0a, + 0x1c, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x23, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x1f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4d, 0x65, + 0x61, 0x6e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0xe0, 0x02, 0x0a, 0x24, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x65, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x3f, 0x0a, 0x1c, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x75, 0x0a, 0x1c, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x23, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x1f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, + 0x78, 0x4d, 0x65, 0x61, 0x6e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, + 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, + 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_detection_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_detection_proto_rawDescData = file_google_cloud_automl_v1beta1_detection_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_detection_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_detection_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_detection_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_detection_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_detection_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_detection_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_automl_v1beta1_detection_proto_goTypes = []interface{}{ + (*ImageObjectDetectionAnnotation)(nil), // 0: google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation + (*VideoObjectTrackingAnnotation)(nil), // 1: google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation + (*BoundingBoxMetricsEntry)(nil), // 2: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + (*ImageObjectDetectionEvaluationMetrics)(nil), // 3: google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + (*VideoObjectTrackingEvaluationMetrics)(nil), // 4: google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + (*BoundingBoxMetricsEntry_ConfidenceMetricsEntry)(nil), // 5: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + (*BoundingPoly)(nil), // 6: google.cloud.automl.v1beta1.BoundingPoly + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration +} +var file_google_cloud_automl_v1beta1_detection_proto_depIdxs = []int32{ + 6, // 0: google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.bounding_box:type_name -> google.cloud.automl.v1beta1.BoundingPoly + 7, // 1: google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.time_offset:type_name -> google.protobuf.Duration + 6, // 2: google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.bounding_box:type_name -> google.cloud.automl.v1beta1.BoundingPoly + 5, // 3: google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.confidence_metrics_entries:type_name -> google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry + 2, // 4: google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.bounding_box_metrics_entries:type_name -> google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + 2, // 5: google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.bounding_box_metrics_entries:type_name -> google.cloud.automl.v1beta1.BoundingBoxMetricsEntry + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_detection_proto_init() } +func file_google_cloud_automl_v1beta1_detection_proto_init() { + if File_google_cloud_automl_v1beta1_detection_proto != nil { + return + } + file_google_cloud_automl_v1beta1_geometry_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_detection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageObjectDetectionAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_detection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoObjectTrackingAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_detection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundingBoxMetricsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_detection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageObjectDetectionEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_detection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoObjectTrackingEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_detection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundingBoxMetricsEntry_ConfidenceMetricsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_detection_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_detection_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_detection_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_detection_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_detection_proto = out.File + file_google_cloud_automl_v1beta1_detection_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_detection_proto_goTypes = nil + file_google_cloud_automl_v1beta1_detection_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/geometry.pb.go b/automl/apiv1beta1/automlpb/geometry.pb.go new file mode 100644 index 000000000000..1a4dde41b051 --- /dev/null +++ b/automl/apiv1beta1/automlpb/geometry.pb.go @@ -0,0 +1,257 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/geometry.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A vertex represents a 2D point in the image. +// The normalized vertex coordinates are between 0 to 1 fractions relative to +// the original plane (image, video). E.g. if the plane (e.g. whole image) would +// have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would +// be at the position (1, 6) on that plane. +type NormalizedVertex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Horizontal coordinate. + X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"` + // Required. Vertical coordinate. + Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"` +} + +func (x *NormalizedVertex) Reset() { + *x = NormalizedVertex{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizedVertex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizedVertex) ProtoMessage() {} + +func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizedVertex.ProtoReflect.Descriptor instead. +func (*NormalizedVertex) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_geometry_proto_rawDescGZIP(), []int{0} +} + +func (x *NormalizedVertex) GetX() float32 { + if x != nil { + return x.X + } + return 0 +} + +func (x *NormalizedVertex) GetY() float32 { + if x != nil { + return x.Y + } + return 0 +} + +// A bounding polygon of a detected object on a plane. +// On output both vertices and normalized_vertices are provided. +// The polygon is formed by connecting vertices in the order they are listed. +type BoundingPoly struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only . The bounding polygon normalized vertices. + NormalizedVertices []*NormalizedVertex `protobuf:"bytes,2,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"` +} + +func (x *BoundingPoly) Reset() { + *x = BoundingPoly{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundingPoly) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundingPoly) ProtoMessage() {} + +func (x *BoundingPoly) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundingPoly.ProtoReflect.Descriptor instead. +func (*BoundingPoly) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_geometry_proto_rawDescGZIP(), []int{1} +} + +func (x *BoundingPoly) GetNormalizedVertices() []*NormalizedVertex { + if x != nil { + return x.NormalizedVertices + } + return nil +} + +var File_google_cloud_automl_v1beta1_geometry_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_geometry_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, + 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x2e, 0x0a, 0x10, 0x4e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x12, 0x0c, 0x0a, + 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x22, 0x6e, 0x0a, 0x0c, 0x42, 0x6f, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x5e, 0x0a, 0x13, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x12, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_geometry_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_geometry_proto_rawDescData = file_google_cloud_automl_v1beta1_geometry_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_geometry_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_geometry_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_geometry_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_geometry_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_geometry_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_geometry_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_automl_v1beta1_geometry_proto_goTypes = []interface{}{ + (*NormalizedVertex)(nil), // 0: google.cloud.automl.v1beta1.NormalizedVertex + (*BoundingPoly)(nil), // 1: google.cloud.automl.v1beta1.BoundingPoly +} +var file_google_cloud_automl_v1beta1_geometry_proto_depIdxs = []int32{ + 0, // 0: google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices:type_name -> google.cloud.automl.v1beta1.NormalizedVertex + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_geometry_proto_init() } +func file_google_cloud_automl_v1beta1_geometry_proto_init() { + if File_google_cloud_automl_v1beta1_geometry_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NormalizedVertex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_geometry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundingPoly); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_geometry_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_geometry_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_geometry_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_geometry_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_geometry_proto = out.File + file_google_cloud_automl_v1beta1_geometry_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_geometry_proto_goTypes = nil + file_google_cloud_automl_v1beta1_geometry_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/image.pb.go b/automl/apiv1beta1/automlpb/image.pb.go new file mode 100644 index 000000000000..abbe55bc19bb --- /dev/null +++ b/automl/apiv1beta1/automlpb/image.pb.go @@ -0,0 +1,729 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/image.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Dataset metadata that is specific to image classification. +type ImageClassificationDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Type of the classification problem. + ClassificationType ClassificationType `protobuf:"varint,1,opt,name=classification_type,json=classificationType,proto3,enum=google.cloud.automl.v1beta1.ClassificationType" json:"classification_type,omitempty"` +} + +func (x *ImageClassificationDatasetMetadata) Reset() { + *x = ImageClassificationDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageClassificationDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageClassificationDatasetMetadata) ProtoMessage() {} + +func (x *ImageClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageClassificationDatasetMetadata.ProtoReflect.Descriptor instead. +func (*ImageClassificationDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP(), []int{0} +} + +func (x *ImageClassificationDatasetMetadata) GetClassificationType() ClassificationType { + if x != nil { + return x.ClassificationType + } + return ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED +} + +// Dataset metadata specific to image object detection. +type ImageObjectDetectionDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ImageObjectDetectionDatasetMetadata) Reset() { + *x = ImageObjectDetectionDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageObjectDetectionDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageObjectDetectionDatasetMetadata) ProtoMessage() {} + +func (x *ImageObjectDetectionDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageObjectDetectionDatasetMetadata.ProtoReflect.Descriptor instead. +func (*ImageObjectDetectionDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP(), []int{1} +} + +// Model metadata for image classification. +type ImageClassificationModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The ID of the `base` model. If it is specified, the new model + // will be created based on the `base` model. Otherwise, the new model will be + // created from scratch. The `base` model must be in the same + // `project` and `location` as the new model to create, and have the same + // `model_type`. + BaseModelId string `protobuf:"bytes,1,opt,name=base_model_id,json=baseModelId,proto3" json:"base_model_id,omitempty"` + // Required. The train budget of creating this model, expressed in hours. The + // actual `train_cost` will be equal or less than this value. + TrainBudget int64 `protobuf:"varint,2,opt,name=train_budget,json=trainBudget,proto3" json:"train_budget,omitempty"` + // Output only. The actual train cost of creating this model, expressed in + // hours. If this model is created from a `base` model, the train cost used + // to create the `base` model are not included. + TrainCost int64 `protobuf:"varint,3,opt,name=train_cost,json=trainCost,proto3" json:"train_cost,omitempty"` + // Output only. The reason that this create model operation stopped, + // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + StopReason string `protobuf:"bytes,5,opt,name=stop_reason,json=stopReason,proto3" json:"stop_reason,omitempty"` + // Optional. Type of the model. The available values are: + // - `cloud` - Model to be used via prediction calls to AutoML API. + // This is the default value. + // - `mobile-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have low latency, but + // may have lower prediction quality than other models. + // - `mobile-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. + // - `mobile-high-accuracy-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have a higher + // latency, but should also have a higher prediction quality + // than other models. + // - `mobile-core-ml-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core + // ML afterwards. Expected to have low latency, but may have + // lower prediction quality than other models. + // - `mobile-core-ml-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core + // ML afterwards. + // - `mobile-core-ml-high-accuracy-1` - A model that, in addition to + // providing prediction via AutoML API, can also be exported + // (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with + // Core ML afterwards. Expected to have a higher latency, but + // should also have a higher prediction quality than other + // models. + ModelType string `protobuf:"bytes,7,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + // Output only. An approximate number of online prediction QPS that can + // be supported by this model per each node on which it is deployed. + NodeQps float64 `protobuf:"fixed64,13,opt,name=node_qps,json=nodeQps,proto3" json:"node_qps,omitempty"` + // Output only. The number of nodes this model is deployed on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the node_qps field. + NodeCount int64 `protobuf:"varint,14,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` +} + +func (x *ImageClassificationModelMetadata) Reset() { + *x = ImageClassificationModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageClassificationModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageClassificationModelMetadata) ProtoMessage() {} + +func (x *ImageClassificationModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageClassificationModelMetadata.ProtoReflect.Descriptor instead. +func (*ImageClassificationModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP(), []int{2} +} + +func (x *ImageClassificationModelMetadata) GetBaseModelId() string { + if x != nil { + return x.BaseModelId + } + return "" +} + +func (x *ImageClassificationModelMetadata) GetTrainBudget() int64 { + if x != nil { + return x.TrainBudget + } + return 0 +} + +func (x *ImageClassificationModelMetadata) GetTrainCost() int64 { + if x != nil { + return x.TrainCost + } + return 0 +} + +func (x *ImageClassificationModelMetadata) GetStopReason() string { + if x != nil { + return x.StopReason + } + return "" +} + +func (x *ImageClassificationModelMetadata) GetModelType() string { + if x != nil { + return x.ModelType + } + return "" +} + +func (x *ImageClassificationModelMetadata) GetNodeQps() float64 { + if x != nil { + return x.NodeQps + } + return 0 +} + +func (x *ImageClassificationModelMetadata) GetNodeCount() int64 { + if x != nil { + return x.NodeCount + } + return 0 +} + +// Model metadata specific to image object detection. +type ImageObjectDetectionModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Type of the model. The available values are: + // - `cloud-high-accuracy-1` - (default) A model to be used via prediction + // calls to AutoML API. Expected to have a higher latency, but + // should also have a higher prediction quality than other + // models. + // - `cloud-low-latency-1` - A model to be used via prediction + // calls to AutoML API. Expected to have low latency, but may + // have lower prediction quality than other models. + // - `mobile-low-latency-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have low latency, but + // may have lower prediction quality than other models. + // - `mobile-versatile-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. + // - `mobile-high-accuracy-1` - A model that, in addition to providing + // prediction via AutoML API, can also be exported (see + // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device + // with TensorFlow afterwards. Expected to have a higher + // latency, but should also have a higher prediction quality + // than other models. + ModelType string `protobuf:"bytes,1,opt,name=model_type,json=modelType,proto3" json:"model_type,omitempty"` + // Output only. The number of nodes this model is deployed on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the qps_per_node field. + NodeCount int64 `protobuf:"varint,3,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` + // Output only. An approximate number of online prediction QPS that can + // be supported by this model per each node on which it is deployed. + NodeQps float64 `protobuf:"fixed64,4,opt,name=node_qps,json=nodeQps,proto3" json:"node_qps,omitempty"` + // Output only. The reason that this create model operation stopped, + // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. + StopReason string `protobuf:"bytes,5,opt,name=stop_reason,json=stopReason,proto3" json:"stop_reason,omitempty"` + // The train budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. The actual + // `train_cost` will be equal or less than this value. If further model + // training ceases to provide any improvements, it will stop without using + // full budget and the stop_reason will be `MODEL_CONVERGED`. + // Note, node_hour = actual_hour * number_of_nodes_invovled. + // For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, + // the train budget must be between 20,000 and 900,000 milli node hours, + // inclusive. The default value is 216, 000 which represents one day in + // wall time. + // For model type `mobile-low-latency-1`, `mobile-versatile-1`, + // `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, + // `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train + // budget must be between 1,000 and 100,000 milli node hours, inclusive. + // The default value is 24, 000 which represents one day in wall time. + TrainBudgetMilliNodeHours int64 `protobuf:"varint,6,opt,name=train_budget_milli_node_hours,json=trainBudgetMilliNodeHours,proto3" json:"train_budget_milli_node_hours,omitempty"` + // Output only. The actual train cost of creating this model, expressed in + // milli node hours, i.e. 1,000 value in this field means 1 node hour. + // Guaranteed to not exceed the train budget. + TrainCostMilliNodeHours int64 `protobuf:"varint,7,opt,name=train_cost_milli_node_hours,json=trainCostMilliNodeHours,proto3" json:"train_cost_milli_node_hours,omitempty"` +} + +func (x *ImageObjectDetectionModelMetadata) Reset() { + *x = ImageObjectDetectionModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageObjectDetectionModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageObjectDetectionModelMetadata) ProtoMessage() {} + +func (x *ImageObjectDetectionModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageObjectDetectionModelMetadata.ProtoReflect.Descriptor instead. +func (*ImageObjectDetectionModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP(), []int{3} +} + +func (x *ImageObjectDetectionModelMetadata) GetModelType() string { + if x != nil { + return x.ModelType + } + return "" +} + +func (x *ImageObjectDetectionModelMetadata) GetNodeCount() int64 { + if x != nil { + return x.NodeCount + } + return 0 +} + +func (x *ImageObjectDetectionModelMetadata) GetNodeQps() float64 { + if x != nil { + return x.NodeQps + } + return 0 +} + +func (x *ImageObjectDetectionModelMetadata) GetStopReason() string { + if x != nil { + return x.StopReason + } + return "" +} + +func (x *ImageObjectDetectionModelMetadata) GetTrainBudgetMilliNodeHours() int64 { + if x != nil { + return x.TrainBudgetMilliNodeHours + } + return 0 +} + +func (x *ImageObjectDetectionModelMetadata) GetTrainCostMilliNodeHours() int64 { + if x != nil { + return x.TrainCostMilliNodeHours + } + return 0 +} + +// Model deployment metadata specific to Image Classification. +type ImageClassificationModelDeploymentMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. The number of nodes to deploy the model on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the model's + // + // [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps]. + // Must be between 1 and 100, inclusive on both ends. + NodeCount int64 `protobuf:"varint,1,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` +} + +func (x *ImageClassificationModelDeploymentMetadata) Reset() { + *x = ImageClassificationModelDeploymentMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageClassificationModelDeploymentMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageClassificationModelDeploymentMetadata) ProtoMessage() {} + +func (x *ImageClassificationModelDeploymentMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageClassificationModelDeploymentMetadata.ProtoReflect.Descriptor instead. +func (*ImageClassificationModelDeploymentMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP(), []int{4} +} + +func (x *ImageClassificationModelDeploymentMetadata) GetNodeCount() int64 { + if x != nil { + return x.NodeCount + } + return 0 +} + +// Model deployment metadata specific to Image Object Detection. +type ImageObjectDetectionModelDeploymentMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. The number of nodes to deploy the model on. A node is an + // abstraction of a machine resource, which can handle online prediction QPS + // as given in the model's + // + // [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. + // Must be between 1 and 100, inclusive on both ends. + NodeCount int64 `protobuf:"varint,1,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` +} + +func (x *ImageObjectDetectionModelDeploymentMetadata) Reset() { + *x = ImageObjectDetectionModelDeploymentMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageObjectDetectionModelDeploymentMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageObjectDetectionModelDeploymentMetadata) ProtoMessage() {} + +func (x *ImageObjectDetectionModelDeploymentMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_image_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageObjectDetectionModelDeploymentMetadata.ProtoReflect.Descriptor instead. +func (*ImageObjectDetectionModelDeploymentMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP(), []int{5} +} + +func (x *ImageObjectDetectionModelDeploymentMetadata) GetNodeCount() int64 { + if x != nil { + return x.NodeCount + } + return 0 +} + +var File_google_cloud_automl_v1beta1_image_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_image_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x22, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x60, 0x0a, 0x13, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x12, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x23, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, 0x02, 0x0a, 0x20, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x62, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x69, + 0x6e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x71, + 0x70, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x51, 0x70, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0x9d, 0x02, 0x0a, 0x21, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x71, 0x70, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x51, 0x70, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x40, 0x0a, 0x1d, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x75, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x42, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x6f, 0x75, + 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x73, 0x74, + 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x75, 0x72, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, + 0x73, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x6f, 0x75, 0x72, 0x73, + 0x22, 0x4b, 0x0a, 0x2a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, + 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4c, 0x0a, + 0x2b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0xb1, 0x01, 0x0a, 0x1f, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x0a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, + 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_image_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_image_proto_rawDescData = file_google_cloud_automl_v1beta1_image_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_image_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_image_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_image_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_image_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_image_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_image_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_automl_v1beta1_image_proto_goTypes = []interface{}{ + (*ImageClassificationDatasetMetadata)(nil), // 0: google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata + (*ImageObjectDetectionDatasetMetadata)(nil), // 1: google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata + (*ImageClassificationModelMetadata)(nil), // 2: google.cloud.automl.v1beta1.ImageClassificationModelMetadata + (*ImageObjectDetectionModelMetadata)(nil), // 3: google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + (*ImageClassificationModelDeploymentMetadata)(nil), // 4: google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + (*ImageObjectDetectionModelDeploymentMetadata)(nil), // 5: google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata + (ClassificationType)(0), // 6: google.cloud.automl.v1beta1.ClassificationType +} +var file_google_cloud_automl_v1beta1_image_proto_depIdxs = []int32{ + 6, // 0: google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.classification_type:type_name -> google.cloud.automl.v1beta1.ClassificationType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_image_proto_init() } +func file_google_cloud_automl_v1beta1_image_proto_init() { + if File_google_cloud_automl_v1beta1_image_proto != nil { + return + } + file_google_cloud_automl_v1beta1_annotation_spec_proto_init() + file_google_cloud_automl_v1beta1_classification_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_image_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageClassificationDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_image_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageObjectDetectionDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_image_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageClassificationModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_image_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageObjectDetectionModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_image_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageClassificationModelDeploymentMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_image_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageObjectDetectionModelDeploymentMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_image_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_image_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_image_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_image_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_image_proto = out.File + file_google_cloud_automl_v1beta1_image_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_image_proto_goTypes = nil + file_google_cloud_automl_v1beta1_image_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/io.pb.go b/automl/apiv1beta1/automlpb/io.pb.go new file mode 100644 index 000000000000..aeaba93d384c --- /dev/null +++ b/automl/apiv1beta1/automlpb/io.pb.go @@ -0,0 +1,2304 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/io.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input configuration for ImportData Action. +// +// The format of input depends on dataset_metadata the Dataset into which +// the import is happening has. As input source the +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] +// is expected, unless specified otherwise. Additionally any input .CSV file +// by itself must be 100MB or smaller, unless specified otherwise. +// If an "example" file (that is, image, video etc.) with identical content +// (even if it had different GCS_FILE_PATH) is mentioned multiple times, then +// its label, bounding boxes etc. are appended. The same file should be always +// provided with the same ML_USE and GCS_FILE_PATH, if it is not, then +// these values are nondeterministically selected from the given ones. +// +// The formats are represented in EBNF with commas being literal and with +// non-terminal symbols defined near the end of this comment. The formats are: +// +// - For Image Classification: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH,LABEL,LABEL,... +// GCS_FILE_PATH leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO +// For MULTICLASS classification type, at most one LABEL is allowed +// per image. If an image has not yet been labeled, then it should be +// mentioned just once with no LABEL. +// Some sample rows: +// TRAIN,gs://folder/image1.jpg,daisy +// TEST,gs://folder/image2.jpg,dandelion,tulip,rose +// UNASSIGNED,gs://folder/image3.jpg,daisy +// UNASSIGNED,gs://folder/image4.jpg +// +// - For Image Object Detection: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) +// GCS_FILE_PATH leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG. +// Each image is assumed to be exhaustively labeled. The minimum +// allowed BOUNDING_BOX edge length is 0.01, and no more than 500 +// BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined +// per line). If an image has not yet been labeled, then it should be +// mentioned just once with no LABEL and the ",,,,,,," in place of the +// BOUNDING_BOX. For images which are known to not contain any +// bounding boxes, they should be labelled explictly as +// "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the +// BOUNDING_BOX. +// Sample rows: +// TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, +// TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, +// UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 +// TEST,gs://folder/im3.png,,,,,,,,, +// TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, +// +// - For Video Classification: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH +// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH +// should lead to another .csv file which describes examples that have +// given ML_USE, using the following row format: +// GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) +// Here GCS_FILE_PATH leads to a video of up to 50GB in size and up +// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the +// length of the video, and end has to be after the start. Any segment +// of a video which has one or more labels on it, is considered a +// hard negative for all other labels. Any segment with no labels on +// it is considered to be unknown. If a whole video is unknown, then +// it shuold be mentioned just once with ",," in place of LABEL, +// TIME_SEGMENT_START,TIME_SEGMENT_END. +// Sample top level CSV file: +// TRAIN,gs://folder/train_videos.csv +// TEST,gs://folder/test_videos.csv +// UNASSIGNED,gs://folder/other_videos.csv +// Sample rows of a CSV file for a particular ML_USE: +// gs://folder/video1.avi,car,120,180.000021 +// gs://folder/video1.avi,bike,150,180.000021 +// gs://folder/vid2.avi,car,0,60.5 +// gs://folder/vid3.avi,,, +// +// - For Video Object Tracking: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH +// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH +// should lead to another .csv file which describes examples that have +// given ML_USE, using one of the following row format: +// GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX +// or +// GCS_FILE_PATH,,,,,,,,,, +// Here GCS_FILE_PATH leads to a video of up to 50GB in size and up +// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// Providing INSTANCE_IDs can help to obtain a better model. When +// a specific labeled entity leaves the video frame, and shows up +// afterwards it is not required, albeit preferable, that the same +// INSTANCE_ID is given to it. +// TIMESTAMP must be within the length of the video, the +// BOUNDING_BOX is assumed to be drawn on the closest video's frame +// to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected +// to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per +// frame are allowed. If a whole video is unknown, then it should be +// mentioned just once with ",,,,,,,,,," in place of LABEL, +// [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. +// Sample top level CSV file: +// TRAIN,gs://folder/train_videos.csv +// TEST,gs://folder/test_videos.csv +// UNASSIGNED,gs://folder/other_videos.csv +// Seven sample rows of a CSV file for a particular ML_USE: +// gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 +// gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 +// gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 +// gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, +// gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, +// gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, +// gs://folder/video2.avi,,,,,,,,,,, +// +// - For Text Extraction: +// CSV file(s) with each line in format: +// ML_USE,GCS_FILE_PATH +// GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which +// either imports text in-line or as documents. Any given +// .JSONL file must be 100MB or smaller. +// The in-line .JSONL file contains, per line, a proto that wraps a +// TextSnippet proto (in json representation) followed by one or more +// AnnotationPayload protos (called annotations), which have +// display_name and text_extraction detail populated. The given text +// is expected to be annotated exhaustively, for example, if you look +// for animals and text contains "dolphin" that is not labeled, then +// "dolphin" is assumed to not be an animal. Any given text snippet +// content must be 10KB or smaller, and also be UTF-8 NFC encoded +// (ASCII already is). +// The document .JSONL file contains, per line, a proto that wraps a +// Document proto. The Document proto must have either document_text +// or input_config set. In document_text case, the Document proto may +// also contain the spatial information of the document, including +// layout, document dimension and page number. In input_config case, +// only PDF documents are supported now, and each document may be up +// to 2MB large. Currently, annotations on documents cannot be +// specified at import. +// Three sample CSV rows: +// TRAIN,gs://folder/file1.jsonl +// VALIDATE,gs://folder/file2.jsonl +// TEST,gs://folder/file3.jsonl +// Sample in-line JSON Lines file for entity extraction (presented here +// with artificial line breaks, but the only actual line break is +// denoted by \n).: +// { +// "document": { +// "document_text": {"content": "dog cat"} +// "layout": [ +// { +// "text_segment": { +// "start_offset": 0, +// "end_offset": 3, +// }, +// "page_number": 1, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.1, "y": 0.1}, +// {"x": 0.1, "y": 0.3}, +// {"x": 0.3, "y": 0.3}, +// {"x": 0.3, "y": 0.1}, +// ], +// }, +// "text_segment_type": TOKEN, +// }, +// { +// "text_segment": { +// "start_offset": 4, +// "end_offset": 7, +// }, +// "page_number": 1, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.4, "y": 0.1}, +// {"x": 0.4, "y": 0.3}, +// {"x": 0.8, "y": 0.3}, +// {"x": 0.8, "y": 0.1}, +// ], +// }, +// "text_segment_type": TOKEN, +// } +// +// ], +// "document_dimensions": { +// "width": 8.27, +// "height": 11.69, +// "unit": INCH, +// } +// "page_count": 1, +// }, +// "annotations": [ +// { +// "display_name": "animal", +// "text_extraction": {"text_segment": {"start_offset": 0, +// "end_offset": 3}} +// }, +// { +// "display_name": "animal", +// "text_extraction": {"text_segment": {"start_offset": 4, +// "end_offset": 7}} +// } +// ], +// }\n +// { +// "text_snippet": { +// "content": "This dog is good." +// }, +// "annotations": [ +// { +// "display_name": "animal", +// "text_extraction": { +// "text_segment": {"start_offset": 5, "end_offset": 8} +// } +// } +// ] +// } +// Sample document JSON Lines file (presented here with artificial line +// breaks, but the only actual line break is denoted by \n).: +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] +// } +// } +// } +// }\n +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] +// } +// } +// } +// } +// +// - For Text Classification: +// CSV file(s) with each line in format: +// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... +// TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If +// the column content is a valid gcs file path, i.e. prefixed by +// "gs://", it will be treated as a GCS_FILE_PATH, else if the content +// is enclosed within double quotes (""), it is +// treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path +// must lead to a .txt file with UTF-8 encoding, for example, +// "gs://folder/content.txt", and the content in it is extracted +// as a text snippet. In TEXT_SNIPPET case, the column content +// excluding quotes is treated as to be imported text snippet. In +// both cases, the text snippet/file size must be within 128kB. +// Maximum 100 unique labels are allowed per CSV row. +// Sample rows: +// TRAIN,"They have bad food and very rude",RudeService,BadFood +// TRAIN,gs://folder/content.txt,SlowService +// TEST,"Typically always bad service there.",RudeService +// VALIDATE,"Stomach ache to go.",BadFood +// +// - For Text Sentiment: +// CSV file(s) with each line in format: +// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT +// TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If +// the column content is a valid gcs file path, that is, prefixed by +// "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated +// as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path +// must lead to a .txt file with UTF-8 encoding, for example, +// "gs://folder/content.txt", and the content in it is extracted +// as a text snippet. In TEXT_SNIPPET case, the column content itself +// is treated as to be imported text snippet. In both cases, the +// text snippet must be up to 500 characters long. +// Sample rows: +// TRAIN,"@freewrytin this is way too good for your product",2 +// TRAIN,"I need this product so bad",3 +// TEST,"Thank you for this product.",4 +// VALIDATE,gs://folder/content.txt,2 +// +// - For Tables: +// Either +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or +// +// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source] +// +// can be used. All inputs is concatenated into a single +// +// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] +// +// For gcs_source: +// CSV file(s), where the first row of the first file is the header, +// containing unique column names. If the first row of a subsequent +// file is the same as the header, then it is also treated as a +// header. All other rows contain values for the corresponding +// columns. +// Each .CSV file by itself must be 10GB or smaller, and their total +// size must be 100GB or smaller. +// First three sample rows of a CSV file: +// "Id","First Name","Last Name","Dob","Addresses" +// +// "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" +// +// "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} +// +// For bigquery_source: +// An URI of a BigQuery table. The user data size of the BigQuery +// table must be 100GB or smaller. +// An imported table must have between 2 and 1,000 columns, inclusive, +// and between 1000 and 100,000,000 rows, inclusive. There are at most 5 +// import data running in parallel. +// Definitions: +// ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" +// Describes how the given example (file) should be used for model +// training. "UNASSIGNED" can be used when user has no preference. +// GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". +// LABEL = A display name of an object on an image, video etc., e.g. "dog". +// Must be up to 32 characters long and can consist only of ASCII +// Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. +// For each label an AnnotationSpec is created which display_name +// becomes the label; AnnotationSpecs are given back in predictions. +// INSTANCE_ID = A positive integer that identifies a specific instance of a +// labeled entity on an example. Used e.g. to track two cars on +// a video while being able to tell apart which one is which. +// BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, +// A rectangle parallel to the frame of the example (image, +// video). If 4 vertices are given they are connected by edges +// in the order provided, if 2 are given they are recognized +// as diagonally opposite vertices of the rectangle. +// VERTEX = COORDINATE,COORDINATE +// First coordinate is horizontal (x), the second is vertical (y). +// COORDINATE = A float in 0 to 1 range, relative to total length of +// image or video in given dimension. For fractions the +// leading non-decimal 0 can be omitted (i.e. 0.3 = .3). +// Point 0,0 is in top left. +// TIME_SEGMENT_START = TIME_OFFSET +// Expresses a beginning, inclusive, of a time segment +// within an example that has a time dimension +// (e.g. video). +// TIME_SEGMENT_END = TIME_OFFSET +// Expresses an end, exclusive, of a time segment within +// an example that has a time dimension (e.g. video). +// TIME_OFFSET = A number of seconds as measured from the start of an +// example (e.g. video). Fractions are allowed, up to a +// microsecond precision. "inf" is allowed, and it means the end +// of the example. +// TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within +// double quotes (""). +// SENTIMENT = An integer between 0 and +// Dataset.text_sentiment_dataset_metadata.sentiment_max +// (inclusive). Describes the ordinal of the sentiment - higher +// value means a more positive sentiment. All the values are +// completely relative, i.e. neither 0 needs to mean a negative or +// neutral sentiment nor sentiment_max needs to mean a positive one +// - it is just required that 0 is the least positive sentiment +// in the data, and sentiment_max is the most positive one. +// The SENTIMENT shouldn't be confused with "score" or "magnitude" +// from the previous Natural Language Sentiment Analysis API. +// All SENTIMENT values between 0 and sentiment_max must be +// represented in the imported data. On prediction the same 0 to +// sentiment_max range will be used. The difference between +// neighboring sentiment values needs not to be uniform, e.g. 1 and +// 2 may be similar whereas the difference between 2 and 3 may be +// huge. +// +// Errors: +// If any of the provided CSV files can't be parsed or if more than certain +// percent of CSV rows cannot be processed then the operation fails and +// nothing is imported. Regardless of overall success or failure the per-row +// failures, up to a certain count cap, is listed in +// Operation.metadata.partial_failures. +type InputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source of the input. + // + // Types that are assignable to Source: + // + // *InputConfig_GcsSource + // *InputConfig_BigquerySource + Source isInputConfig_Source `protobuf_oneof:"source"` + // Additional domain-specific parameters describing the semantic of the + // imported data, any string must be up to 25000 + // characters long. + // + // - For Tables: + // `schema_inference_version` - (integer) Required. The version of the + // algorithm that should be used for the initial inference of the + // schema (columns' DataTypes) of the table the data is being imported + // into. Allowed values: "1". + Params map[string]string `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *InputConfig) Reset() { + *x = InputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputConfig) ProtoMessage() {} + +func (x *InputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputConfig.ProtoReflect.Descriptor instead. +func (*InputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{0} +} + +func (m *InputConfig) GetSource() isInputConfig_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *InputConfig) GetGcsSource() *GcsSource { + if x, ok := x.GetSource().(*InputConfig_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *InputConfig) GetBigquerySource() *BigQuerySource { + if x, ok := x.GetSource().(*InputConfig_BigquerySource); ok { + return x.BigquerySource + } + return nil +} + +func (x *InputConfig) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +type isInputConfig_Source interface { + isInputConfig_Source() +} + +type InputConfig_GcsSource struct { + // The Google Cloud Storage location for the input content. + // In ImportData, the gcs_source points to a csv with structure described in + // the comment. + GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +type InputConfig_BigquerySource struct { + // The BigQuery location for the input content. + BigquerySource *BigQuerySource `protobuf:"bytes,3,opt,name=bigquery_source,json=bigquerySource,proto3,oneof"` +} + +func (*InputConfig_GcsSource) isInputConfig_Source() {} + +func (*InputConfig_BigquerySource) isInputConfig_Source() {} + +// Input configuration for BatchPredict Action. +// +// The format of input depends on the ML problem of the model used for +// prediction. As input source the +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] +// is expected, unless specified otherwise. +// +// The formats are represented in EBNF with commas being literal and with +// non-terminal symbols defined near the end of this comment. The formats +// are: +// +// - For Image Classification: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH +// which leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in +// the Batch predict output. +// Three sample rows: +// gs://folder/image1.jpeg +// gs://folder/image2.gif +// gs://folder/image3.png +// +// - For Image Object Detection: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH +// which leads to image of up to 30MB in size. Supported +// extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in +// the Batch predict output. +// Three sample rows: +// gs://folder/image1.jpeg +// gs://folder/image2.gif +// gs://folder/image3.png +// +// - For Video Classification: +// CSV file(s) with each line in format: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END +// GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h +// duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the +// length of the video, and end has to be after the start. +// Three sample rows: +// gs://folder/video1.mp4,10,40 +// gs://folder/video1.mp4,20,60 +// gs://folder/vid2.mov,0,inf +// +// - For Video Object Tracking: +// CSV file(s) with each line in format: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END +// GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h +// duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. +// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the +// length of the video, and end has to be after the start. +// Three sample rows: +// gs://folder/video1.mp4,10,240 +// gs://folder/video1.mp4,300,360 +// gs://folder/vid2.mov,0,inf +// +// - For Text Classification: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH | TEXT_SNIPPET +// Any given text file can have size upto 128kB. +// Any given text snippet content must have 60,000 characters or less. +// Three sample rows: +// gs://folder/text1.txt +// "Some text content to predict" +// gs://folder/text3.pdf +// Supported file extensions: .txt, .pdf +// +// - For Text Sentiment: +// CSV file(s) with each line having just a single column: +// GCS_FILE_PATH | TEXT_SNIPPET +// Any given text file can have size upto 128kB. +// Any given text snippet content must have 500 characters or less. +// Three sample rows: +// gs://folder/text1.txt +// "Some text content to predict" +// gs://folder/text3.pdf +// Supported file extensions: .txt, .pdf +// +// - For Text Extraction +// .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or +// as documents (for a single BatchPredict call only one of the these +// formats may be used). +// The in-line .JSONL file(s) contain per line a proto that +// wraps a temporary user-assigned TextSnippet ID (string up to 2000 +// characters long) called "id", a TextSnippet proto (in +// json representation) and zero or more TextFeature protos. Any given +// text snippet content must have 30,000 characters or less, and also +// be UTF-8 NFC encoded (ASCII already is). The IDs provided should be +// unique. +// The document .JSONL file(s) contain, per line, a proto that wraps a +// Document proto with input_config set. Only PDF documents are +// supported now, and each document must be up to 2MB large. +// Any given .JSONL file must be 100MB or smaller, and no more than 20 +// files may be given. +// Sample in-line JSON Lines file (presented here with artificial line +// breaks, but the only actual line break is denoted by \n): +// { +// "id": "my_first_id", +// "text_snippet": { "content": "dog car cat"}, +// "text_features": [ +// { +// "text_segment": {"start_offset": 4, "end_offset": 6}, +// "structural_type": PARAGRAPH, +// "bounding_poly": { +// "normalized_vertices": [ +// {"x": 0.1, "y": 0.1}, +// {"x": 0.1, "y": 0.3}, +// {"x": 0.3, "y": 0.3}, +// {"x": 0.3, "y": 0.1}, +// ] +// }, +// } +// ], +// }\n +// { +// "id": "2", +// "text_snippet": { +// "content": "An elaborate content", +// "mime_type": "text/plain" +// } +// } +// Sample document JSON Lines file (presented here with artificial line +// breaks, but the only actual line break is denoted by \n).: +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] +// } +// } +// } +// }\n +// { +// "document": { +// "input_config": { +// "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] +// } +// } +// } +// } +// +// - For Tables: +// Either +// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or +// +// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]. +// +// GCS case: +// CSV file(s), each by itself 10GB or smaller and total size must be +// 100GB or smaller, where first file must have a header containing +// column names. If the first row of a subsequent file is the same as +// the header, then it is also treated as a header. All other rows +// contain values for the corresponding columns. +// The column names must contain the model's +// +// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] +// +// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] +// +// (order doesn't matter). The columns corresponding to the model's +// input feature column specs must contain values compatible with the +// column spec's data types. Prediction on all the rows, i.e. the CSV +// lines, will be attempted. For FORECASTING +// +// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// +// all columns having +// +// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] +// +// type will be ignored. +// First three sample rows of a CSV file: +// "First Name","Last Name","Dob","Addresses" +// +// "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" +// +// "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} +// +// BigQuery case: +// An URI of a BigQuery table. The user data size of the BigQuery +// table must be 100GB or smaller. +// The column names must contain the model's +// +// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] +// +// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] +// +// (order doesn't matter). The columns corresponding to the model's +// input feature column specs must contain values compatible with the +// column spec's data types. Prediction on all the rows of the table +// will be attempted. For FORECASTING +// +// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// +// all columns having +// +// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] +// +// type will be ignored. +// +// Definitions: +// GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". +// TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within +// double quotes ("") +// TIME_SEGMENT_START = TIME_OFFSET +// Expresses a beginning, inclusive, of a time segment +// within an +// example that has a time dimension (e.g. video). +// TIME_SEGMENT_END = TIME_OFFSET +// Expresses an end, exclusive, of a time segment within +// an example that has a time dimension (e.g. video). +// TIME_OFFSET = A number of seconds as measured from the start of an +// example (e.g. video). Fractions are allowed, up to a +// microsecond precision. "inf" is allowed and it means the end +// of the example. +// +// Errors: +// If any of the provided CSV files can't be parsed or if more than certain +// percent of CSV rows cannot be processed then the operation fails and +// prediction does not happen. Regardless of overall success or failure the +// per-row failures, up to a certain count cap, will be listed in +// Operation.metadata.partial_failures. +type BatchPredictInputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The source of the input. + // + // Types that are assignable to Source: + // + // *BatchPredictInputConfig_GcsSource + // *BatchPredictInputConfig_BigquerySource + Source isBatchPredictInputConfig_Source `protobuf_oneof:"source"` +} + +func (x *BatchPredictInputConfig) Reset() { + *x = BatchPredictInputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchPredictInputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchPredictInputConfig) ProtoMessage() {} + +func (x *BatchPredictInputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchPredictInputConfig.ProtoReflect.Descriptor instead. +func (*BatchPredictInputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{1} +} + +func (m *BatchPredictInputConfig) GetSource() isBatchPredictInputConfig_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *BatchPredictInputConfig) GetGcsSource() *GcsSource { + if x, ok := x.GetSource().(*BatchPredictInputConfig_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *BatchPredictInputConfig) GetBigquerySource() *BigQuerySource { + if x, ok := x.GetSource().(*BatchPredictInputConfig_BigquerySource); ok { + return x.BigquerySource + } + return nil +} + +type isBatchPredictInputConfig_Source interface { + isBatchPredictInputConfig_Source() +} + +type BatchPredictInputConfig_GcsSource struct { + // The Google Cloud Storage location for the input content. + GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +type BatchPredictInputConfig_BigquerySource struct { + // The BigQuery location for the input content. + BigquerySource *BigQuerySource `protobuf:"bytes,2,opt,name=bigquery_source,json=bigquerySource,proto3,oneof"` +} + +func (*BatchPredictInputConfig_GcsSource) isBatchPredictInputConfig_Source() {} + +func (*BatchPredictInputConfig_BigquerySource) isBatchPredictInputConfig_Source() {} + +// Input configuration of a [Document][google.cloud.automl.v1beta1.Document]. +type DocumentInputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Google Cloud Storage location of the document file. Only a single path + // should be given. + // Max supported size: 512MB. + // Supported extensions: .PDF. + GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3" json:"gcs_source,omitempty"` +} + +func (x *DocumentInputConfig) Reset() { + *x = DocumentInputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DocumentInputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DocumentInputConfig) ProtoMessage() {} + +func (x *DocumentInputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DocumentInputConfig.ProtoReflect.Descriptor instead. +func (*DocumentInputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{2} +} + +func (x *DocumentInputConfig) GetGcsSource() *GcsSource { + if x != nil { + return x.GcsSource + } + return nil +} + +// - For Translation: +// CSV file `translation.csv`, with each line in format: +// ML_USE,GCS_FILE_PATH +// GCS_FILE_PATH leads to a .TSV file which describes examples that have +// given ML_USE, using the following row format per line: +// TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target +// language) +// +// - For Tables: +// Output depends on whether the dataset was imported from GCS or +// BigQuery. +// GCS case: +// +// [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination] +// +// must be set. Exported are CSV file(s) `tables_1.csv`, +// `tables_2.csv`,...,`tables_N.csv` with each having as header line +// the table's column names, and all other lines contain values for +// the header columns. +// BigQuery case: +// +// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] +// +// pointing to a BigQuery project must be set. In the given project a +// new dataset will be created with name +// +// `export_data__` +// +// where will be made +// BigQuery-dataset-name compatible (e.g. most special characters will +// become underscores), and timestamp will be in +// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that +// dataset a new table called `primary_table` will be created, and +// filled with precisely the same data as this obtained on import. +type OutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The destination of the output. + // + // Types that are assignable to Destination: + // + // *OutputConfig_GcsDestination + // *OutputConfig_BigqueryDestination + Destination isOutputConfig_Destination `protobuf_oneof:"destination"` +} + +func (x *OutputConfig) Reset() { + *x = OutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputConfig) ProtoMessage() {} + +func (x *OutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead. +func (*OutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{3} +} + +func (m *OutputConfig) GetDestination() isOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *OutputConfig) GetGcsDestination() *GcsDestination { + if x, ok := x.GetDestination().(*OutputConfig_GcsDestination); ok { + return x.GcsDestination + } + return nil +} + +func (x *OutputConfig) GetBigqueryDestination() *BigQueryDestination { + if x, ok := x.GetDestination().(*OutputConfig_BigqueryDestination); ok { + return x.BigqueryDestination + } + return nil +} + +type isOutputConfig_Destination interface { + isOutputConfig_Destination() +} + +type OutputConfig_GcsDestination struct { + // The Google Cloud Storage location where the output is to be written to. + // For Image Object Detection, Text Extraction, Video Classification and + // Tables, in the given directory a new directory will be created with name: + // export_data-- where + // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export + // output will be written into that directory. + GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"` +} + +type OutputConfig_BigqueryDestination struct { + // The BigQuery location where the output is to be written to. + BigqueryDestination *BigQueryDestination `protobuf:"bytes,2,opt,name=bigquery_destination,json=bigqueryDestination,proto3,oneof"` +} + +func (*OutputConfig_GcsDestination) isOutputConfig_Destination() {} + +func (*OutputConfig_BigqueryDestination) isOutputConfig_Destination() {} + +// Output configuration for BatchPredict Action. +// +// # As destination the +// +// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination] +// must be set unless specified otherwise for a domain. If gcs_destination is +// set then in the given directory a new directory is created. Its name +// will be +// "prediction--", +// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents +// of it depends on the ML problem the predictions are made for. +// +// - For Image Classification: +// In the created directory files `image_classification_1.jsonl`, +// `image_classification_2.jsonl`,...,`image_classification_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of the successfully predicted images and annotations. +// A single image will be listed only once with all its annotations, +// and its annotations will never be split across files. +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps image's "ID" : "" followed by a list of +// zero or more AnnotationPayload protos (called annotations), which +// have classification detail populated. +// If prediction for any image failed (partially or completely), then an +// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` +// files will be created (N depends on total number of failed +// predictions). These files will have a JSON representation of a proto +// that wraps the same "ID" : "" but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// containing only `code` and `message`fields. +// +// * For Image Object Detection: +// In the created directory files `image_object_detection_1.jsonl`, +// `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of the successfully predicted images and annotations. +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps image's "ID" : "" followed by a list of +// zero or more AnnotationPayload protos (called annotations), which +// have image_object_detection detail populated. A single image will +// be listed only once with all its annotations, and its annotations +// will never be split across files. +// If prediction for any image failed (partially or completely), then +// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` +// files will be created (N depends on total number of failed +// predictions). These files will have a JSON representation of a proto +// that wraps the same "ID" : "" but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// containing only `code` and `message`fields. +// * For Video Classification: +// In the created directory a video_classification.csv file, and a .JSON +// file per each video classification requested in the input (i.e. each +// line in given CSV(s)), will be created. +// +// The format of video_classification.csv is: +// +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS +// +// where: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 +// the prediction input lines (i.e. video_classification.csv has +// precisely the same number of lines as the prediction input had.) +// JSON_FILE_NAME = Name of .JSON file in the output directory, which +// contains prediction responses for the video time segment. +// STATUS = "OK" if prediction completed successfully, or an error code +// with message otherwise. If STATUS is not "OK" then the .JSON file +// for that line may not exist or be empty. +// +// Each .JSON file, assuming STATUS is "OK", will contain a list of +// AnnotationPayload protos in JSON format, which are the predictions +// for the video time segment the file is assigned to in the +// video_classification.csv. All AnnotationPayload protos will have +// video_classification field set, and will be sorted by +// video_classification.type field (note that the returned types are +// governed by `classifaction_types` parameter in +// [PredictService.BatchPredictRequest.params][]). +// +// * For Video Object Tracking: +// In the created directory a video_object_tracking.csv file will be +// created, and multiple files video_object_trackinng_1.json, +// video_object_trackinng_2.json,..., video_object_trackinng_N.json, +// where N is the number of requests in the input (i.e. the number of +// lines in given CSV(s)). +// +// The format of video_object_tracking.csv is: +// +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS +// +// where: +// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 +// the prediction input lines (i.e. video_object_tracking.csv has +// precisely the same number of lines as the prediction input had.) +// JSON_FILE_NAME = Name of .JSON file in the output directory, which +// contains prediction responses for the video time segment. +// STATUS = "OK" if prediction completed successfully, or an error +// code with message otherwise. If STATUS is not "OK" then the .JSON +// file for that line may not exist or be empty. +// +// Each .JSON file, assuming STATUS is "OK", will contain a list of +// AnnotationPayload protos in JSON format, which are the predictions +// for each frame of the video time segment the file is assigned to in +// video_object_tracking.csv. All AnnotationPayload protos will have +// video_object_tracking field set. +// * For Text Classification: +// In the created directory files `text_classification_1.jsonl`, +// `text_classification_2.jsonl`,...,`text_classification_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps input text snippet or input text file and a list of +// zero or more AnnotationPayload protos (called annotations), which +// have classification detail populated. A single text snippet or file +// will be listed only once with all its annotations, and its +// annotations will never be split across files. +// +// If prediction for any text snippet or file failed (partially or +// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps input text snippet or input text file followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// containing only `code` and `message`. +// +// * For Text Sentiment: +// In the created directory files `text_sentiment_1.jsonl`, +// `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// +// Each .JSONL file will contain, per line, a JSON representation of a +// proto that wraps input text snippet or input text file and a list of +// zero or more AnnotationPayload protos (called annotations), which +// have text_sentiment detail populated. A single text snippet or file +// will be listed only once with all its annotations, and its +// annotations will never be split across files. +// +// If prediction for any text snippet or file failed (partially or +// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps input text snippet or input text file followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// containing only `code` and `message`. +// +// * For Text Extraction: +// In the created directory files `text_extraction_1.jsonl`, +// `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` +// will be created, where N may be 1, and depends on the +// total number of inputs and annotations found. +// The contents of these .JSONL file(s) depend on whether the input +// used inline text, or documents. +// If input was inline, then each .JSONL file will contain, per line, +// a JSON representation of a proto that wraps given in request text +// snippet's "id" (if specified), followed by input text snippet, +// and a list of zero or more +// AnnotationPayload protos (called annotations), which have +// text_extraction detail populated. A single text snippet will be +// listed only once with all its annotations, and its annotations will +// never be split across files. +// If input used documents, then each .JSONL file will contain, per +// line, a JSON representation of a proto that wraps given in request +// document proto, followed by its OCR-ed representation in the form +// of a text snippet, finally followed by a list of zero or more +// AnnotationPayload protos (called annotations), which have +// text_extraction detail populated and refer, via their indices, to +// the OCR-ed text snippet. A single document (and its text snippet) +// will be listed only once with all its annotations, and its +// annotations will never be split across files. +// If prediction for any text snippet failed (partially or completely), +// then additional `errors_1.jsonl`, `errors_2.jsonl`,..., +// `errors_N.jsonl` files will be created (N depends on total number of +// failed predictions). These files will have a JSON representation of a +// proto that wraps either the "id" : "" (in case of inline) +// or the document proto (in case of document) but here followed by +// exactly one +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// containing only `code` and `message`. +// +// * For Tables: +// Output depends on whether +// +// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination] +// +// or +// +// [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination] +// +// is set (either is allowed). +// GCS case: +// In the created directory files `tables_1.csv`, `tables_2.csv`,..., +// `tables_N.csv` will be created, where N may be 1, and depends on +// the total number of the successfully predicted rows. +// For all CLASSIFICATION +// +// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// +// Each .csv file will contain a header, listing all columns' +// +// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] +// +// given on input followed by M target column names in the format of +// +// "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>__score" where M is the number of distinct target values, +// i.e. number of distinct values in the target column of the table +// used to train the model. Subsequent lines will contain the +// respective values of successfully predicted rows, with the last, +// i.e. the target, columns having the corresponding prediction +// [scores][google.cloud.automl.v1beta1.TablesAnnotation.score]. +// For REGRESSION and FORECASTING +// +// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: +// +// Each .csv file will contain a header, listing all columns' +// [display_name-s][google.cloud.automl.v1beta1.display_name] given +// on input followed by the predicted target column with name in the +// format of +// +// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>" +// +// Subsequent lines will contain the respective values of +// successfully predicted rows, with the last, i.e. the target, +// column having the predicted target value. +// If prediction for any rows failed, then an additional +// `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be +// created (N depends on total number of failed rows). These files +// will have analogous format as `tables_*.csv`, but always with a +// single target column having +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// represented as a JSON string, and containing only `code` and +// `message`. +// BigQuery case: +// +// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] +// +// pointing to a BigQuery project must be set. In the given project a +// new dataset will be created with name +// `prediction__` +// where will be made +// BigQuery-dataset-name compatible (e.g. most special characters will +// become underscores), and timestamp will be in +// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset +// two tables will be created, `predictions`, and `errors`. +// The `predictions` table's column names will be the input columns' +// +// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] +// +// followed by the target column with name in the format of +// +// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>" +// +// The input feature columns will contain the respective values of +// successfully predicted rows, with the target column having an +// ARRAY of +// +// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload], +// +// represented as STRUCT-s, containing +// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation]. +// The `errors` table contains rows for which the prediction has +// failed, it has analogous input columns while the target column name +// is in the format of +// +// "errors_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] +// +// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>", +// +// and as a value has +// +// [`google.rpc.Status`](https: +// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) +// +// represented as a STRUCT, and containing only `code` and `message`. +type BatchPredictOutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The destination of the output. + // + // Types that are assignable to Destination: + // + // *BatchPredictOutputConfig_GcsDestination + // *BatchPredictOutputConfig_BigqueryDestination + Destination isBatchPredictOutputConfig_Destination `protobuf_oneof:"destination"` +} + +func (x *BatchPredictOutputConfig) Reset() { + *x = BatchPredictOutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchPredictOutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchPredictOutputConfig) ProtoMessage() {} + +func (x *BatchPredictOutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchPredictOutputConfig.ProtoReflect.Descriptor instead. +func (*BatchPredictOutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{4} +} + +func (m *BatchPredictOutputConfig) GetDestination() isBatchPredictOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *BatchPredictOutputConfig) GetGcsDestination() *GcsDestination { + if x, ok := x.GetDestination().(*BatchPredictOutputConfig_GcsDestination); ok { + return x.GcsDestination + } + return nil +} + +func (x *BatchPredictOutputConfig) GetBigqueryDestination() *BigQueryDestination { + if x, ok := x.GetDestination().(*BatchPredictOutputConfig_BigqueryDestination); ok { + return x.BigqueryDestination + } + return nil +} + +type isBatchPredictOutputConfig_Destination interface { + isBatchPredictOutputConfig_Destination() +} + +type BatchPredictOutputConfig_GcsDestination struct { + // The Google Cloud Storage location of the directory where the output is to + // be written to. + GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"` +} + +type BatchPredictOutputConfig_BigqueryDestination struct { + // The BigQuery location where the output is to be written to. + BigqueryDestination *BigQueryDestination `protobuf:"bytes,2,opt,name=bigquery_destination,json=bigqueryDestination,proto3,oneof"` +} + +func (*BatchPredictOutputConfig_GcsDestination) isBatchPredictOutputConfig_Destination() {} + +func (*BatchPredictOutputConfig_BigqueryDestination) isBatchPredictOutputConfig_Destination() {} + +// Output configuration for ModelExport Action. +type ModelExportOutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The destination of the output. + // + // Types that are assignable to Destination: + // + // *ModelExportOutputConfig_GcsDestination + // *ModelExportOutputConfig_GcrDestination + Destination isModelExportOutputConfig_Destination `protobuf_oneof:"destination"` + // The format in which the model must be exported. The available, and default, + // formats depend on the problem and model type (if given problem and type + // combination doesn't have a format listed, it means its models are not + // exportable): + // + // - For Image Classification mobile-low-latency-1, mobile-versatile-1, + // mobile-high-accuracy-1: + // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", + // "docker". + // + // - For Image Classification mobile-core-ml-low-latency-1, + // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: + // "core_ml" (default). + // + // - For Image Object Detection mobile-low-latency-1, mobile-versatile-1, + // mobile-high-accuracy-1: + // "tflite", "tf_saved_model", "tf_js". + // + // - For Video Classification cloud, + // "tf_saved_model". + // + // - For Video Object Tracking cloud, + // "tf_saved_model". + // + // - For Video Object Tracking mobile-versatile-1: + // "tflite", "edgetpu_tflite", "tf_saved_model", "docker". + // + // - For Video Object Tracking mobile-coral-versatile-1: + // "tflite", "edgetpu_tflite", "docker". + // + // - For Video Object Tracking mobile-coral-low-latency-1: + // "tflite", "edgetpu_tflite", "docker". + // + // - For Video Object Tracking mobile-jetson-versatile-1: + // "tf_saved_model", "docker". + // + // - For Tables: + // "docker". + // + // Formats description: + // + // - tflite - Used for Android mobile devices. + // - edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) + // devices. + // - tf_saved_model - A tensorflow model in SavedModel format. + // - tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can + // be used in the browser and in Node.js using JavaScript. + // - docker - Used for Docker containers. Use the params field to customize + // the container. The container is verified to work correctly on + // ubuntu 16.04 operating system. See more at + // [containers + // + // quickstart](https: + // //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) + // * core_ml - Used for iOS mobile devices. + ModelFormat string `protobuf:"bytes,4,opt,name=model_format,json=modelFormat,proto3" json:"model_format,omitempty"` + // Additional model-type and format specific parameters describing the + // requirements for the to be exported model files, any string must be up to + // 25000 characters long. + // + // - For `docker` format: + // `cpu_architecture` - (string) "x86_64" (default). + // `gpu_architecture` - (string) "none" (default), "nvidia". + Params map[string]string `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ModelExportOutputConfig) Reset() { + *x = ModelExportOutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModelExportOutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModelExportOutputConfig) ProtoMessage() {} + +func (x *ModelExportOutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModelExportOutputConfig.ProtoReflect.Descriptor instead. +func (*ModelExportOutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{5} +} + +func (m *ModelExportOutputConfig) GetDestination() isModelExportOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *ModelExportOutputConfig) GetGcsDestination() *GcsDestination { + if x, ok := x.GetDestination().(*ModelExportOutputConfig_GcsDestination); ok { + return x.GcsDestination + } + return nil +} + +func (x *ModelExportOutputConfig) GetGcrDestination() *GcrDestination { + if x, ok := x.GetDestination().(*ModelExportOutputConfig_GcrDestination); ok { + return x.GcrDestination + } + return nil +} + +func (x *ModelExportOutputConfig) GetModelFormat() string { + if x != nil { + return x.ModelFormat + } + return "" +} + +func (x *ModelExportOutputConfig) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +type isModelExportOutputConfig_Destination interface { + isModelExportOutputConfig_Destination() +} + +type ModelExportOutputConfig_GcsDestination struct { + // The Google Cloud Storage location where the model is to be written to. + // This location may only be set for the following model formats: + // + // "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". + // + // Under the directory given as the destination a new one with name + // "model-export--", + // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, + // will be created. Inside the model and any of its supporting files + // will be written. + GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"` +} + +type ModelExportOutputConfig_GcrDestination struct { + // The GCR location where model image is to be pushed to. This location + // may only be set for the following model formats: + // + // "docker". + // + // The model image will be created under the given URI. + GcrDestination *GcrDestination `protobuf:"bytes,3,opt,name=gcr_destination,json=gcrDestination,proto3,oneof"` +} + +func (*ModelExportOutputConfig_GcsDestination) isModelExportOutputConfig_Destination() {} + +func (*ModelExportOutputConfig_GcrDestination) isModelExportOutputConfig_Destination() {} + +// Output configuration for ExportEvaluatedExamples Action. Note that this call +// is available only for 30 days since the moment the model was evaluated. +// The output depends on the domain, as follows (note that only examples from +// the TEST set are exported): +// +// - For Tables: +// +// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] +// +// pointing to a BigQuery project must be set. In the given project a +// new dataset will be created with name +// +// `export_evaluated_examples__` +// +// where will be made BigQuery-dataset-name +// compatible (e.g. most special characters will become underscores), +// and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" +// format. In the dataset an `evaluated_examples` table will be +// created. It will have all the same columns as the +// +// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id] +// +// of the +// [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which +// the model was created, as they were at the moment of model's +// evaluation (this includes the target column with its ground +// truth), followed by a column called "predicted_". That +// last column will contain the model's prediction result for each +// respective row, given as ARRAY of +// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload], +// represented as STRUCT-s, containing +// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation]. +type ExportEvaluatedExamplesOutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The destination of the output. + // + // Types that are assignable to Destination: + // + // *ExportEvaluatedExamplesOutputConfig_BigqueryDestination + Destination isExportEvaluatedExamplesOutputConfig_Destination `protobuf_oneof:"destination"` +} + +func (x *ExportEvaluatedExamplesOutputConfig) Reset() { + *x = ExportEvaluatedExamplesOutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportEvaluatedExamplesOutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportEvaluatedExamplesOutputConfig) ProtoMessage() {} + +func (x *ExportEvaluatedExamplesOutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportEvaluatedExamplesOutputConfig.ProtoReflect.Descriptor instead. +func (*ExportEvaluatedExamplesOutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{6} +} + +func (m *ExportEvaluatedExamplesOutputConfig) GetDestination() isExportEvaluatedExamplesOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *ExportEvaluatedExamplesOutputConfig) GetBigqueryDestination() *BigQueryDestination { + if x, ok := x.GetDestination().(*ExportEvaluatedExamplesOutputConfig_BigqueryDestination); ok { + return x.BigqueryDestination + } + return nil +} + +type isExportEvaluatedExamplesOutputConfig_Destination interface { + isExportEvaluatedExamplesOutputConfig_Destination() +} + +type ExportEvaluatedExamplesOutputConfig_BigqueryDestination struct { + // The BigQuery location where the output is to be written to. + BigqueryDestination *BigQueryDestination `protobuf:"bytes,2,opt,name=bigquery_destination,json=bigqueryDestination,proto3,oneof"` +} + +func (*ExportEvaluatedExamplesOutputConfig_BigqueryDestination) isExportEvaluatedExamplesOutputConfig_Destination() { +} + +// The Google Cloud Storage location for the input content. +type GcsSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Google Cloud Storage URIs to input files, up to 2000 characters + // long. Accepted forms: + // * Full object path, e.g. gs://bucket/directory/object.csv + InputUris []string `protobuf:"bytes,1,rep,name=input_uris,json=inputUris,proto3" json:"input_uris,omitempty"` +} + +func (x *GcsSource) Reset() { + *x = GcsSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsSource) ProtoMessage() {} + +func (x *GcsSource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsSource.ProtoReflect.Descriptor instead. +func (*GcsSource) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{7} +} + +func (x *GcsSource) GetInputUris() []string { + if x != nil { + return x.InputUris + } + return nil +} + +// The BigQuery location for the input content. +type BigQuerySource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. BigQuery URI to a table, up to 2000 characters long. + // Accepted forms: + // * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId + InputUri string `protobuf:"bytes,1,opt,name=input_uri,json=inputUri,proto3" json:"input_uri,omitempty"` +} + +func (x *BigQuerySource) Reset() { + *x = BigQuerySource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQuerySource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQuerySource) ProtoMessage() {} + +func (x *BigQuerySource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQuerySource.ProtoReflect.Descriptor instead. +func (*BigQuerySource) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{8} +} + +func (x *BigQuerySource) GetInputUri() string { + if x != nil { + return x.InputUri + } + return "" +} + +// The Google Cloud Storage location where the output is to be written to. +type GcsDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Google Cloud Storage URI to output directory, up to 2000 + // characters long. + // Accepted forms: + // * Prefix path: gs://bucket/directory + // The requesting user must have write permission to the bucket. + // The directory is created if it doesn't exist. + OutputUriPrefix string `protobuf:"bytes,1,opt,name=output_uri_prefix,json=outputUriPrefix,proto3" json:"output_uri_prefix,omitempty"` +} + +func (x *GcsDestination) Reset() { + *x = GcsDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsDestination) ProtoMessage() {} + +func (x *GcsDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsDestination.ProtoReflect.Descriptor instead. +func (*GcsDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{9} +} + +func (x *GcsDestination) GetOutputUriPrefix() string { + if x != nil { + return x.OutputUriPrefix + } + return "" +} + +// The BigQuery location for the output content. +type BigQueryDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. BigQuery URI to a project, up to 2000 characters long. + // Accepted forms: + // * BigQuery path e.g. bq://projectId + OutputUri string `protobuf:"bytes,1,opt,name=output_uri,json=outputUri,proto3" json:"output_uri,omitempty"` +} + +func (x *BigQueryDestination) Reset() { + *x = BigQueryDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQueryDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQueryDestination) ProtoMessage() {} + +func (x *BigQueryDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQueryDestination.ProtoReflect.Descriptor instead. +func (*BigQueryDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{10} +} + +func (x *BigQueryDestination) GetOutputUri() string { + if x != nil { + return x.OutputUri + } + return "" +} + +// The GCR location where the image must be pushed to. +type GcrDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Google Contained Registry URI of the new image, up to 2000 + // characters long. See + // + // https: + // //cloud.google.com/container-registry/do + // // cs/pushing-and-pulling#pushing_an_image_to_a_registry + // Accepted forms: + // * [HOSTNAME]/[PROJECT-ID]/[IMAGE] + // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] + // + // The requesting user must have permission to push images the project. + OutputUri string `protobuf:"bytes,1,opt,name=output_uri,json=outputUri,proto3" json:"output_uri,omitempty"` +} + +func (x *GcrDestination) Reset() { + *x = GcrDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcrDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcrDestination) ProtoMessage() {} + +func (x *GcrDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_io_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcrDestination.ProtoReflect.Descriptor instead. +func (*GcrDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP(), []int{11} +} + +func (x *GcrDestination) GetOutputUri() string { + if x != nil { + return x.OutputUri + } + return "" +} + +var File_google_cloud_automl_v1beta1_io_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_io_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x22, 0xc1, 0x02, 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, + 0x00, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x0f, + 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x17, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, + 0x00, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x0f, + 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x5c, + 0x0a, 0x13, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xdc, 0x01, 0x0a, + 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, + 0x0f, 0x67, 0x63, 0x73, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x14, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe8, 0x01, 0x0a, 0x18, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x0f, 0x67, 0x63, 0x73, 0x5f, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x0e, 0x67, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x65, 0x0a, 0x14, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x67, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x13, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, 0x03, 0x0a, 0x17, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x56, 0x0a, 0x0f, 0x67, 0x63, 0x73, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x67, 0x63, 0x73, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x0f, 0x67, 0x63, + 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x63, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0e, 0x67, 0x63, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x58, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x23, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x65, 0x0a, 0x14, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, + 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x13, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x09, 0x47, 0x63, 0x73, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x75, 0x72, + 0x69, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x55, + 0x72, 0x69, 0x73, 0x22, 0x2d, 0x0a, 0x0e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x55, + 0x72, 0x69, 0x22, 0x3c, 0x0a, 0x0e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x75, + 0x72, 0x69, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x22, 0x34, 0x0a, 0x13, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x22, 0x2f, 0x0a, 0x0e, 0x47, 0x63, 0x72, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, + 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_io_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_io_proto_rawDescData = file_google_cloud_automl_v1beta1_io_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_io_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_io_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_io_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_io_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_io_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_io_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_cloud_automl_v1beta1_io_proto_goTypes = []interface{}{ + (*InputConfig)(nil), // 0: google.cloud.automl.v1beta1.InputConfig + (*BatchPredictInputConfig)(nil), // 1: google.cloud.automl.v1beta1.BatchPredictInputConfig + (*DocumentInputConfig)(nil), // 2: google.cloud.automl.v1beta1.DocumentInputConfig + (*OutputConfig)(nil), // 3: google.cloud.automl.v1beta1.OutputConfig + (*BatchPredictOutputConfig)(nil), // 4: google.cloud.automl.v1beta1.BatchPredictOutputConfig + (*ModelExportOutputConfig)(nil), // 5: google.cloud.automl.v1beta1.ModelExportOutputConfig + (*ExportEvaluatedExamplesOutputConfig)(nil), // 6: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + (*GcsSource)(nil), // 7: google.cloud.automl.v1beta1.GcsSource + (*BigQuerySource)(nil), // 8: google.cloud.automl.v1beta1.BigQuerySource + (*GcsDestination)(nil), // 9: google.cloud.automl.v1beta1.GcsDestination + (*BigQueryDestination)(nil), // 10: google.cloud.automl.v1beta1.BigQueryDestination + (*GcrDestination)(nil), // 11: google.cloud.automl.v1beta1.GcrDestination + nil, // 12: google.cloud.automl.v1beta1.InputConfig.ParamsEntry + nil, // 13: google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry +} +var file_google_cloud_automl_v1beta1_io_proto_depIdxs = []int32{ + 7, // 0: google.cloud.automl.v1beta1.InputConfig.gcs_source:type_name -> google.cloud.automl.v1beta1.GcsSource + 8, // 1: google.cloud.automl.v1beta1.InputConfig.bigquery_source:type_name -> google.cloud.automl.v1beta1.BigQuerySource + 12, // 2: google.cloud.automl.v1beta1.InputConfig.params:type_name -> google.cloud.automl.v1beta1.InputConfig.ParamsEntry + 7, // 3: google.cloud.automl.v1beta1.BatchPredictInputConfig.gcs_source:type_name -> google.cloud.automl.v1beta1.GcsSource + 8, // 4: google.cloud.automl.v1beta1.BatchPredictInputConfig.bigquery_source:type_name -> google.cloud.automl.v1beta1.BigQuerySource + 7, // 5: google.cloud.automl.v1beta1.DocumentInputConfig.gcs_source:type_name -> google.cloud.automl.v1beta1.GcsSource + 9, // 6: google.cloud.automl.v1beta1.OutputConfig.gcs_destination:type_name -> google.cloud.automl.v1beta1.GcsDestination + 10, // 7: google.cloud.automl.v1beta1.OutputConfig.bigquery_destination:type_name -> google.cloud.automl.v1beta1.BigQueryDestination + 9, // 8: google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination:type_name -> google.cloud.automl.v1beta1.GcsDestination + 10, // 9: google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination:type_name -> google.cloud.automl.v1beta1.BigQueryDestination + 9, // 10: google.cloud.automl.v1beta1.ModelExportOutputConfig.gcs_destination:type_name -> google.cloud.automl.v1beta1.GcsDestination + 11, // 11: google.cloud.automl.v1beta1.ModelExportOutputConfig.gcr_destination:type_name -> google.cloud.automl.v1beta1.GcrDestination + 13, // 12: google.cloud.automl.v1beta1.ModelExportOutputConfig.params:type_name -> google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry + 10, // 13: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.bigquery_destination:type_name -> google.cloud.automl.v1beta1.BigQueryDestination + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_io_proto_init() } +func file_google_cloud_automl_v1beta1_io_proto_init() { + if File_google_cloud_automl_v1beta1_io_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_io_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchPredictInputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DocumentInputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchPredictOutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModelExportOutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportEvaluatedExamplesOutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQuerySource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQueryDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcrDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*InputConfig_GcsSource)(nil), + (*InputConfig_BigquerySource)(nil), + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*BatchPredictInputConfig_GcsSource)(nil), + (*BatchPredictInputConfig_BigquerySource)(nil), + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*OutputConfig_GcsDestination)(nil), + (*OutputConfig_BigqueryDestination)(nil), + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*BatchPredictOutputConfig_GcsDestination)(nil), + (*BatchPredictOutputConfig_BigqueryDestination)(nil), + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*ModelExportOutputConfig_GcsDestination)(nil), + (*ModelExportOutputConfig_GcrDestination)(nil), + } + file_google_cloud_automl_v1beta1_io_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*ExportEvaluatedExamplesOutputConfig_BigqueryDestination)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_io_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_io_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_io_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_io_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_io_proto = out.File + file_google_cloud_automl_v1beta1_io_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_io_proto_goTypes = nil + file_google_cloud_automl_v1beta1_io_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/model.pb.go b/automl/apiv1beta1/automlpb/model.pb.go new file mode 100644 index 000000000000..0aeb8f22cdd0 --- /dev/null +++ b/automl/apiv1beta1/automlpb/model.pb.go @@ -0,0 +1,593 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/model.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Deployment state of the model. +type Model_DeploymentState int32 + +const ( + // Should not be used, an un-set enum has this value by default. + Model_DEPLOYMENT_STATE_UNSPECIFIED Model_DeploymentState = 0 + // Model is deployed. + Model_DEPLOYED Model_DeploymentState = 1 + // Model is not deployed. + Model_UNDEPLOYED Model_DeploymentState = 2 +) + +// Enum value maps for Model_DeploymentState. +var ( + Model_DeploymentState_name = map[int32]string{ + 0: "DEPLOYMENT_STATE_UNSPECIFIED", + 1: "DEPLOYED", + 2: "UNDEPLOYED", + } + Model_DeploymentState_value = map[string]int32{ + "DEPLOYMENT_STATE_UNSPECIFIED": 0, + "DEPLOYED": 1, + "UNDEPLOYED": 2, + } +) + +func (x Model_DeploymentState) Enum() *Model_DeploymentState { + p := new(Model_DeploymentState) + *p = x + return p +} + +func (x Model_DeploymentState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Model_DeploymentState) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_automl_v1beta1_model_proto_enumTypes[0].Descriptor() +} + +func (Model_DeploymentState) Type() protoreflect.EnumType { + return &file_google_cloud_automl_v1beta1_model_proto_enumTypes[0] +} + +func (x Model_DeploymentState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Model_DeploymentState.Descriptor instead. +func (Model_DeploymentState) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_model_proto_rawDescGZIP(), []int{0, 0} +} + +// API proto representing a trained machine learning model. +type Model struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. + // The model metadata that is specific to the problem type. + // Must match the metadata type of the dataset used to train the model. + // + // Types that are assignable to ModelMetadata: + // + // *Model_TranslationModelMetadata + // *Model_ImageClassificationModelMetadata + // *Model_TextClassificationModelMetadata + // *Model_ImageObjectDetectionModelMetadata + // *Model_VideoClassificationModelMetadata + // *Model_VideoObjectTrackingModelMetadata + // *Model_TextExtractionModelMetadata + // *Model_TablesModelMetadata + // *Model_TextSentimentModelMetadata + ModelMetadata isModel_ModelMetadata `protobuf_oneof:"model_metadata"` + // Output only. Resource name of the model. + // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The name of the model to show in the interface. The name can be + // up to 32 characters long and can consist only of ASCII Latin letters A-Z + // and a-z, underscores + // (_), and ASCII digits 0-9. It must start with a letter. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. The resource ID of the dataset used to create the model. The dataset must + // come from the same ancestor project and location. + DatasetId string `protobuf:"bytes,3,opt,name=dataset_id,json=datasetId,proto3" json:"dataset_id,omitempty"` + // Output only. Timestamp when the model training finished and can be used for prediction. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Timestamp when this model was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. Deployment state of the model. A model can only serve + // prediction requests after it gets deployed. + DeploymentState Model_DeploymentState `protobuf:"varint,8,opt,name=deployment_state,json=deploymentState,proto3,enum=google.cloud.automl.v1beta1.Model_DeploymentState" json:"deployment_state,omitempty"` +} + +func (x *Model) Reset() { + *x = Model{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Model) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Model) ProtoMessage() {} + +func (x *Model) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Model.ProtoReflect.Descriptor instead. +func (*Model) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_model_proto_rawDescGZIP(), []int{0} +} + +func (m *Model) GetModelMetadata() isModel_ModelMetadata { + if m != nil { + return m.ModelMetadata + } + return nil +} + +func (x *Model) GetTranslationModelMetadata() *TranslationModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_TranslationModelMetadata); ok { + return x.TranslationModelMetadata + } + return nil +} + +func (x *Model) GetImageClassificationModelMetadata() *ImageClassificationModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_ImageClassificationModelMetadata); ok { + return x.ImageClassificationModelMetadata + } + return nil +} + +func (x *Model) GetTextClassificationModelMetadata() *TextClassificationModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_TextClassificationModelMetadata); ok { + return x.TextClassificationModelMetadata + } + return nil +} + +func (x *Model) GetImageObjectDetectionModelMetadata() *ImageObjectDetectionModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_ImageObjectDetectionModelMetadata); ok { + return x.ImageObjectDetectionModelMetadata + } + return nil +} + +func (x *Model) GetVideoClassificationModelMetadata() *VideoClassificationModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_VideoClassificationModelMetadata); ok { + return x.VideoClassificationModelMetadata + } + return nil +} + +func (x *Model) GetVideoObjectTrackingModelMetadata() *VideoObjectTrackingModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_VideoObjectTrackingModelMetadata); ok { + return x.VideoObjectTrackingModelMetadata + } + return nil +} + +func (x *Model) GetTextExtractionModelMetadata() *TextExtractionModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_TextExtractionModelMetadata); ok { + return x.TextExtractionModelMetadata + } + return nil +} + +func (x *Model) GetTablesModelMetadata() *TablesModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_TablesModelMetadata); ok { + return x.TablesModelMetadata + } + return nil +} + +func (x *Model) GetTextSentimentModelMetadata() *TextSentimentModelMetadata { + if x, ok := x.GetModelMetadata().(*Model_TextSentimentModelMetadata); ok { + return x.TextSentimentModelMetadata + } + return nil +} + +func (x *Model) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Model) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Model) GetDatasetId() string { + if x != nil { + return x.DatasetId + } + return "" +} + +func (x *Model) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Model) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Model) GetDeploymentState() Model_DeploymentState { + if x != nil { + return x.DeploymentState + } + return Model_DEPLOYMENT_STATE_UNSPECIFIED +} + +type isModel_ModelMetadata interface { + isModel_ModelMetadata() +} + +type Model_TranslationModelMetadata struct { + // Metadata for translation models. + TranslationModelMetadata *TranslationModelMetadata `protobuf:"bytes,15,opt,name=translation_model_metadata,json=translationModelMetadata,proto3,oneof"` +} + +type Model_ImageClassificationModelMetadata struct { + // Metadata for image classification models. + ImageClassificationModelMetadata *ImageClassificationModelMetadata `protobuf:"bytes,13,opt,name=image_classification_model_metadata,json=imageClassificationModelMetadata,proto3,oneof"` +} + +type Model_TextClassificationModelMetadata struct { + // Metadata for text classification models. + TextClassificationModelMetadata *TextClassificationModelMetadata `protobuf:"bytes,14,opt,name=text_classification_model_metadata,json=textClassificationModelMetadata,proto3,oneof"` +} + +type Model_ImageObjectDetectionModelMetadata struct { + // Metadata for image object detection models. + ImageObjectDetectionModelMetadata *ImageObjectDetectionModelMetadata `protobuf:"bytes,20,opt,name=image_object_detection_model_metadata,json=imageObjectDetectionModelMetadata,proto3,oneof"` +} + +type Model_VideoClassificationModelMetadata struct { + // Metadata for video classification models. + VideoClassificationModelMetadata *VideoClassificationModelMetadata `protobuf:"bytes,23,opt,name=video_classification_model_metadata,json=videoClassificationModelMetadata,proto3,oneof"` +} + +type Model_VideoObjectTrackingModelMetadata struct { + // Metadata for video object tracking models. + VideoObjectTrackingModelMetadata *VideoObjectTrackingModelMetadata `protobuf:"bytes,21,opt,name=video_object_tracking_model_metadata,json=videoObjectTrackingModelMetadata,proto3,oneof"` +} + +type Model_TextExtractionModelMetadata struct { + // Metadata for text extraction models. + TextExtractionModelMetadata *TextExtractionModelMetadata `protobuf:"bytes,19,opt,name=text_extraction_model_metadata,json=textExtractionModelMetadata,proto3,oneof"` +} + +type Model_TablesModelMetadata struct { + // Metadata for Tables models. + TablesModelMetadata *TablesModelMetadata `protobuf:"bytes,24,opt,name=tables_model_metadata,json=tablesModelMetadata,proto3,oneof"` +} + +type Model_TextSentimentModelMetadata struct { + // Metadata for text sentiment models. + TextSentimentModelMetadata *TextSentimentModelMetadata `protobuf:"bytes,22,opt,name=text_sentiment_model_metadata,json=textSentimentModelMetadata,proto3,oneof"` +} + +func (*Model_TranslationModelMetadata) isModel_ModelMetadata() {} + +func (*Model_ImageClassificationModelMetadata) isModel_ModelMetadata() {} + +func (*Model_TextClassificationModelMetadata) isModel_ModelMetadata() {} + +func (*Model_ImageObjectDetectionModelMetadata) isModel_ModelMetadata() {} + +func (*Model_VideoClassificationModelMetadata) isModel_ModelMetadata() {} + +func (*Model_VideoObjectTrackingModelMetadata) isModel_ModelMetadata() {} + +func (*Model_TextExtractionModelMetadata) isModel_ModelMetadata() {} + +func (*Model_TablesModelMetadata) isModel_ModelMetadata() {} + +func (*Model_TextSentimentModelMetadata) isModel_ModelMetadata() {} + +var File_google_cloud_automl_v1beta1_model_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_model_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x0d, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, + 0x75, 0x0a, 0x1a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x18, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8e, 0x01, 0x0a, 0x23, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8b, 0x01, 0x0a, 0x22, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x48, 0x00, 0x52, 0x1f, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x92, 0x01, 0x0a, 0x25, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x21, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8e, 0x01, 0x0a, 0x23, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8f, 0x01, 0x0a, 0x24, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x72, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x20, 0x76, 0x69, 0x64, + 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x7f, 0x0a, + 0x1e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, + 0x00, 0x52, 0x1b, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x66, + 0x0a, 0x15, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, + 0x00, 0x52, 0x13, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x7c, 0x0a, 0x1d, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, + 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1a, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x22, 0x51, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x50, 0x4c, + 0x4f, 0x59, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x4e, 0x44, 0x45, 0x50, 0x4c, + 0x4f, 0x59, 0x45, 0x44, 0x10, 0x02, 0x3a, 0x58, 0xea, 0x41, 0x55, 0x0a, 0x1b, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x36, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x7d, + 0x42, 0x10, 0x0a, 0x0e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, + 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_model_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_model_proto_rawDescData = file_google_cloud_automl_v1beta1_model_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_model_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_model_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_model_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_model_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_model_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_automl_v1beta1_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_model_proto_goTypes = []interface{}{ + (Model_DeploymentState)(0), // 0: google.cloud.automl.v1beta1.Model.DeploymentState + (*Model)(nil), // 1: google.cloud.automl.v1beta1.Model + (*TranslationModelMetadata)(nil), // 2: google.cloud.automl.v1beta1.TranslationModelMetadata + (*ImageClassificationModelMetadata)(nil), // 3: google.cloud.automl.v1beta1.ImageClassificationModelMetadata + (*TextClassificationModelMetadata)(nil), // 4: google.cloud.automl.v1beta1.TextClassificationModelMetadata + (*ImageObjectDetectionModelMetadata)(nil), // 5: google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + (*VideoClassificationModelMetadata)(nil), // 6: google.cloud.automl.v1beta1.VideoClassificationModelMetadata + (*VideoObjectTrackingModelMetadata)(nil), // 7: google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + (*TextExtractionModelMetadata)(nil), // 8: google.cloud.automl.v1beta1.TextExtractionModelMetadata + (*TablesModelMetadata)(nil), // 9: google.cloud.automl.v1beta1.TablesModelMetadata + (*TextSentimentModelMetadata)(nil), // 10: google.cloud.automl.v1beta1.TextSentimentModelMetadata + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp +} +var file_google_cloud_automl_v1beta1_model_proto_depIdxs = []int32{ + 2, // 0: google.cloud.automl.v1beta1.Model.translation_model_metadata:type_name -> google.cloud.automl.v1beta1.TranslationModelMetadata + 3, // 1: google.cloud.automl.v1beta1.Model.image_classification_model_metadata:type_name -> google.cloud.automl.v1beta1.ImageClassificationModelMetadata + 4, // 2: google.cloud.automl.v1beta1.Model.text_classification_model_metadata:type_name -> google.cloud.automl.v1beta1.TextClassificationModelMetadata + 5, // 3: google.cloud.automl.v1beta1.Model.image_object_detection_model_metadata:type_name -> google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata + 6, // 4: google.cloud.automl.v1beta1.Model.video_classification_model_metadata:type_name -> google.cloud.automl.v1beta1.VideoClassificationModelMetadata + 7, // 5: google.cloud.automl.v1beta1.Model.video_object_tracking_model_metadata:type_name -> google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata + 8, // 6: google.cloud.automl.v1beta1.Model.text_extraction_model_metadata:type_name -> google.cloud.automl.v1beta1.TextExtractionModelMetadata + 9, // 7: google.cloud.automl.v1beta1.Model.tables_model_metadata:type_name -> google.cloud.automl.v1beta1.TablesModelMetadata + 10, // 8: google.cloud.automl.v1beta1.Model.text_sentiment_model_metadata:type_name -> google.cloud.automl.v1beta1.TextSentimentModelMetadata + 11, // 9: google.cloud.automl.v1beta1.Model.create_time:type_name -> google.protobuf.Timestamp + 11, // 10: google.cloud.automl.v1beta1.Model.update_time:type_name -> google.protobuf.Timestamp + 0, // 11: google.cloud.automl.v1beta1.Model.deployment_state:type_name -> google.cloud.automl.v1beta1.Model.DeploymentState + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_model_proto_init() } +func file_google_cloud_automl_v1beta1_model_proto_init() { + if File_google_cloud_automl_v1beta1_model_proto != nil { + return + } + file_google_cloud_automl_v1beta1_image_proto_init() + file_google_cloud_automl_v1beta1_tables_proto_init() + file_google_cloud_automl_v1beta1_text_proto_init() + file_google_cloud_automl_v1beta1_translation_proto_init() + file_google_cloud_automl_v1beta1_video_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Model); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_model_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Model_TranslationModelMetadata)(nil), + (*Model_ImageClassificationModelMetadata)(nil), + (*Model_TextClassificationModelMetadata)(nil), + (*Model_ImageObjectDetectionModelMetadata)(nil), + (*Model_VideoClassificationModelMetadata)(nil), + (*Model_VideoObjectTrackingModelMetadata)(nil), + (*Model_TextExtractionModelMetadata)(nil), + (*Model_TablesModelMetadata)(nil), + (*Model_TextSentimentModelMetadata)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_model_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_model_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_model_proto_depIdxs, + EnumInfos: file_google_cloud_automl_v1beta1_model_proto_enumTypes, + MessageInfos: file_google_cloud_automl_v1beta1_model_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_model_proto = out.File + file_google_cloud_automl_v1beta1_model_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_model_proto_goTypes = nil + file_google_cloud_automl_v1beta1_model_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/model_evaluation.pb.go b/automl/apiv1beta1/automlpb/model_evaluation.pb.go new file mode 100644 index 000000000000..957dd26cd3ab --- /dev/null +++ b/automl/apiv1beta1/automlpb/model_evaluation.pb.go @@ -0,0 +1,507 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/model_evaluation.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Evaluation results of a model. +type ModelEvaluation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Problem type specific evaluation metrics. + // + // Types that are assignable to Metrics: + // + // *ModelEvaluation_ClassificationEvaluationMetrics + // *ModelEvaluation_RegressionEvaluationMetrics + // *ModelEvaluation_TranslationEvaluationMetrics + // *ModelEvaluation_ImageObjectDetectionEvaluationMetrics + // *ModelEvaluation_VideoObjectTrackingEvaluationMetrics + // *ModelEvaluation_TextSentimentEvaluationMetrics + // *ModelEvaluation_TextExtractionEvaluationMetrics + Metrics isModelEvaluation_Metrics `protobuf_oneof:"metrics"` + // Output only. Resource name of the model evaluation. + // Format: + // + // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The ID of the annotation spec that the model evaluation applies to. The + // The ID is empty for the overall model evaluation. + // For Tables annotation specs in the dataset do not exist and this ID is + // always not set, but for CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + // the + // [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name] + // field is used. + AnnotationSpecId string `protobuf:"bytes,2,opt,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"` + // Output only. The value of + // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at + // the moment when the model was trained. Because this field returns a value + // at model training time, for different models trained from the same dataset, + // the values may differ, since display names could had been changed between + // the two model's trainings. + // For Tables CLASSIFICATION + // + // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] + // distinct values of the target column at the moment of the model evaluation + // are populated here. + // The display_name is empty for the overall model evaluation. + DisplayName string `protobuf:"bytes,15,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. Timestamp when this model evaluation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The number of examples used for model evaluation, i.e. for + // which ground truth from time of model creation is compared against the + // predicted annotations created by the model. + // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is + // the total number of all examples used for evaluation. + // Otherwise, this is the count of examples that according to the ground + // truth were annotated by the + // + // [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id]. + EvaluatedExampleCount int32 `protobuf:"varint,6,opt,name=evaluated_example_count,json=evaluatedExampleCount,proto3" json:"evaluated_example_count,omitempty"` +} + +func (x *ModelEvaluation) Reset() { + *x = ModelEvaluation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModelEvaluation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModelEvaluation) ProtoMessage() {} + +func (x *ModelEvaluation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ModelEvaluation.ProtoReflect.Descriptor instead. +func (*ModelEvaluation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescGZIP(), []int{0} +} + +func (m *ModelEvaluation) GetMetrics() isModelEvaluation_Metrics { + if m != nil { + return m.Metrics + } + return nil +} + +func (x *ModelEvaluation) GetClassificationEvaluationMetrics() *ClassificationEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_ClassificationEvaluationMetrics); ok { + return x.ClassificationEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetRegressionEvaluationMetrics() *RegressionEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_RegressionEvaluationMetrics); ok { + return x.RegressionEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetTranslationEvaluationMetrics() *TranslationEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_TranslationEvaluationMetrics); ok { + return x.TranslationEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetImageObjectDetectionEvaluationMetrics() *ImageObjectDetectionEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_ImageObjectDetectionEvaluationMetrics); ok { + return x.ImageObjectDetectionEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetVideoObjectTrackingEvaluationMetrics() *VideoObjectTrackingEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_VideoObjectTrackingEvaluationMetrics); ok { + return x.VideoObjectTrackingEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetTextSentimentEvaluationMetrics() *TextSentimentEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_TextSentimentEvaluationMetrics); ok { + return x.TextSentimentEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetTextExtractionEvaluationMetrics() *TextExtractionEvaluationMetrics { + if x, ok := x.GetMetrics().(*ModelEvaluation_TextExtractionEvaluationMetrics); ok { + return x.TextExtractionEvaluationMetrics + } + return nil +} + +func (x *ModelEvaluation) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ModelEvaluation) GetAnnotationSpecId() string { + if x != nil { + return x.AnnotationSpecId + } + return "" +} + +func (x *ModelEvaluation) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *ModelEvaluation) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ModelEvaluation) GetEvaluatedExampleCount() int32 { + if x != nil { + return x.EvaluatedExampleCount + } + return 0 +} + +type isModelEvaluation_Metrics interface { + isModelEvaluation_Metrics() +} + +type ModelEvaluation_ClassificationEvaluationMetrics struct { + // Model evaluation metrics for image, text, video and tables + // classification. + // Tables problem is considered a classification when the target column + // is CATEGORY DataType. + ClassificationEvaluationMetrics *ClassificationEvaluationMetrics `protobuf:"bytes,8,opt,name=classification_evaluation_metrics,json=classificationEvaluationMetrics,proto3,oneof"` +} + +type ModelEvaluation_RegressionEvaluationMetrics struct { + // Model evaluation metrics for Tables regression. + // Tables problem is considered a regression when the target column + // has FLOAT64 DataType. + RegressionEvaluationMetrics *RegressionEvaluationMetrics `protobuf:"bytes,24,opt,name=regression_evaluation_metrics,json=regressionEvaluationMetrics,proto3,oneof"` +} + +type ModelEvaluation_TranslationEvaluationMetrics struct { + // Model evaluation metrics for translation. + TranslationEvaluationMetrics *TranslationEvaluationMetrics `protobuf:"bytes,9,opt,name=translation_evaluation_metrics,json=translationEvaluationMetrics,proto3,oneof"` +} + +type ModelEvaluation_ImageObjectDetectionEvaluationMetrics struct { + // Model evaluation metrics for image object detection. + ImageObjectDetectionEvaluationMetrics *ImageObjectDetectionEvaluationMetrics `protobuf:"bytes,12,opt,name=image_object_detection_evaluation_metrics,json=imageObjectDetectionEvaluationMetrics,proto3,oneof"` +} + +type ModelEvaluation_VideoObjectTrackingEvaluationMetrics struct { + // Model evaluation metrics for video object tracking. + VideoObjectTrackingEvaluationMetrics *VideoObjectTrackingEvaluationMetrics `protobuf:"bytes,14,opt,name=video_object_tracking_evaluation_metrics,json=videoObjectTrackingEvaluationMetrics,proto3,oneof"` +} + +type ModelEvaluation_TextSentimentEvaluationMetrics struct { + // Evaluation metrics for text sentiment models. + TextSentimentEvaluationMetrics *TextSentimentEvaluationMetrics `protobuf:"bytes,11,opt,name=text_sentiment_evaluation_metrics,json=textSentimentEvaluationMetrics,proto3,oneof"` +} + +type ModelEvaluation_TextExtractionEvaluationMetrics struct { + // Evaluation metrics for text extraction models. + TextExtractionEvaluationMetrics *TextExtractionEvaluationMetrics `protobuf:"bytes,13,opt,name=text_extraction_evaluation_metrics,json=textExtractionEvaluationMetrics,proto3,oneof"` +} + +func (*ModelEvaluation_ClassificationEvaluationMetrics) isModelEvaluation_Metrics() {} + +func (*ModelEvaluation_RegressionEvaluationMetrics) isModelEvaluation_Metrics() {} + +func (*ModelEvaluation_TranslationEvaluationMetrics) isModelEvaluation_Metrics() {} + +func (*ModelEvaluation_ImageObjectDetectionEvaluationMetrics) isModelEvaluation_Metrics() {} + +func (*ModelEvaluation_VideoObjectTrackingEvaluationMetrics) isModelEvaluation_Metrics() {} + +func (*ModelEvaluation_TextSentimentEvaluationMetrics) isModelEvaluation_Metrics() {} + +func (*ModelEvaluation_TextExtractionEvaluationMetrics) isModelEvaluation_Metrics() {} + +var File_google_cloud_automl_v1beta1_model_evaluation_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe9, 0x0a, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x8a, 0x01, 0x0a, + 0x21, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, 0x1f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x7e, 0x0a, 0x1d, 0x72, 0x65, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x72, 0x65, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x1e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, + 0x1c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x9e, 0x01, + 0x0a, 0x29, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, 0x25, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x9b, + 0x01, 0x0a, 0x28, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, + 0x69, 0x6e, 0x67, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, 0x24, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x88, 0x01, 0x0a, + 0x21, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, 0x1e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x22, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x48, 0x00, 0x52, 0x1f, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, + 0x87, 0x01, 0xea, 0x41, 0x83, 0x01, 0x0a, 0x25, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x65, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, + 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, + 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, + 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescData = file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_model_evaluation_proto_goTypes = []interface{}{ + (*ModelEvaluation)(nil), // 0: google.cloud.automl.v1beta1.ModelEvaluation + (*ClassificationEvaluationMetrics)(nil), // 1: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + (*RegressionEvaluationMetrics)(nil), // 2: google.cloud.automl.v1beta1.RegressionEvaluationMetrics + (*TranslationEvaluationMetrics)(nil), // 3: google.cloud.automl.v1beta1.TranslationEvaluationMetrics + (*ImageObjectDetectionEvaluationMetrics)(nil), // 4: google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + (*VideoObjectTrackingEvaluationMetrics)(nil), // 5: google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + (*TextSentimentEvaluationMetrics)(nil), // 6: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + (*TextExtractionEvaluationMetrics)(nil), // 7: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp +} +var file_google_cloud_automl_v1beta1_model_evaluation_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.ModelEvaluation.classification_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.ClassificationEvaluationMetrics + 2, // 1: google.cloud.automl.v1beta1.ModelEvaluation.regression_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.RegressionEvaluationMetrics + 3, // 2: google.cloud.automl.v1beta1.ModelEvaluation.translation_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.TranslationEvaluationMetrics + 4, // 3: google.cloud.automl.v1beta1.ModelEvaluation.image_object_detection_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics + 5, // 4: google.cloud.automl.v1beta1.ModelEvaluation.video_object_tracking_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics + 6, // 5: google.cloud.automl.v1beta1.ModelEvaluation.text_sentiment_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + 7, // 6: google.cloud.automl.v1beta1.ModelEvaluation.text_extraction_evaluation_metrics:type_name -> google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + 8, // 7: google.cloud.automl.v1beta1.ModelEvaluation.create_time:type_name -> google.protobuf.Timestamp + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_model_evaluation_proto_init() } +func file_google_cloud_automl_v1beta1_model_evaluation_proto_init() { + if File_google_cloud_automl_v1beta1_model_evaluation_proto != nil { + return + } + file_google_cloud_automl_v1beta1_classification_proto_init() + file_google_cloud_automl_v1beta1_detection_proto_init() + file_google_cloud_automl_v1beta1_regression_proto_init() + file_google_cloud_automl_v1beta1_tables_proto_init() + file_google_cloud_automl_v1beta1_text_extraction_proto_init() + file_google_cloud_automl_v1beta1_text_sentiment_proto_init() + file_google_cloud_automl_v1beta1_translation_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ModelEvaluation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ModelEvaluation_ClassificationEvaluationMetrics)(nil), + (*ModelEvaluation_RegressionEvaluationMetrics)(nil), + (*ModelEvaluation_TranslationEvaluationMetrics)(nil), + (*ModelEvaluation_ImageObjectDetectionEvaluationMetrics)(nil), + (*ModelEvaluation_VideoObjectTrackingEvaluationMetrics)(nil), + (*ModelEvaluation_TextSentimentEvaluationMetrics)(nil), + (*ModelEvaluation_TextExtractionEvaluationMetrics)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_model_evaluation_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_model_evaluation_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_model_evaluation_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_model_evaluation_proto = out.File + file_google_cloud_automl_v1beta1_model_evaluation_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_model_evaluation_proto_goTypes = nil + file_google_cloud_automl_v1beta1_model_evaluation_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/operations.pb.go b/automl/apiv1beta1/automlpb/operations.pb.go new file mode 100644 index 000000000000..bea90a65ad13 --- /dev/null +++ b/automl/apiv1beta1/automlpb/operations.pb.go @@ -0,0 +1,1436 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/operations.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Metadata used across all long running operations returned by AutoML API. +type OperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ouptut only. Details of specific operation. Even if this field is empty, + // the presence allows to distinguish different types of operations. + // + // Types that are assignable to Details: + // + // *OperationMetadata_DeleteDetails + // *OperationMetadata_DeployModelDetails + // *OperationMetadata_UndeployModelDetails + // *OperationMetadata_CreateModelDetails + // *OperationMetadata_ImportDataDetails + // *OperationMetadata_BatchPredictDetails + // *OperationMetadata_ExportDataDetails + // *OperationMetadata_ExportModelDetails + // *OperationMetadata_ExportEvaluatedExamplesDetails + Details isOperationMetadata_Details `protobuf_oneof:"details"` + // Output only. Progress of operation. Range: [0, 100]. + // Not used currently. + ProgressPercent int32 `protobuf:"varint,13,opt,name=progress_percent,json=progressPercent,proto3" json:"progress_percent,omitempty"` + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // This field should never exceed 20 entries. + // Status details field will contain standard GCP error details. + PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"` + // Output only. Time when the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Time when the operation was updated for the last time. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *OperationMetadata) Reset() { + *x = OperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationMetadata) ProtoMessage() {} + +func (x *OperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. +func (*OperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{0} +} + +func (m *OperationMetadata) GetDetails() isOperationMetadata_Details { + if m != nil { + return m.Details + } + return nil +} + +func (x *OperationMetadata) GetDeleteDetails() *DeleteOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_DeleteDetails); ok { + return x.DeleteDetails + } + return nil +} + +func (x *OperationMetadata) GetDeployModelDetails() *DeployModelOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_DeployModelDetails); ok { + return x.DeployModelDetails + } + return nil +} + +func (x *OperationMetadata) GetUndeployModelDetails() *UndeployModelOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_UndeployModelDetails); ok { + return x.UndeployModelDetails + } + return nil +} + +func (x *OperationMetadata) GetCreateModelDetails() *CreateModelOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_CreateModelDetails); ok { + return x.CreateModelDetails + } + return nil +} + +func (x *OperationMetadata) GetImportDataDetails() *ImportDataOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_ImportDataDetails); ok { + return x.ImportDataDetails + } + return nil +} + +func (x *OperationMetadata) GetBatchPredictDetails() *BatchPredictOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_BatchPredictDetails); ok { + return x.BatchPredictDetails + } + return nil +} + +func (x *OperationMetadata) GetExportDataDetails() *ExportDataOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_ExportDataDetails); ok { + return x.ExportDataDetails + } + return nil +} + +func (x *OperationMetadata) GetExportModelDetails() *ExportModelOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_ExportModelDetails); ok { + return x.ExportModelDetails + } + return nil +} + +func (x *OperationMetadata) GetExportEvaluatedExamplesDetails() *ExportEvaluatedExamplesOperationMetadata { + if x, ok := x.GetDetails().(*OperationMetadata_ExportEvaluatedExamplesDetails); ok { + return x.ExportEvaluatedExamplesDetails + } + return nil +} + +func (x *OperationMetadata) GetProgressPercent() int32 { + if x != nil { + return x.ProgressPercent + } + return 0 +} + +func (x *OperationMetadata) GetPartialFailures() []*status.Status { + if x != nil { + return x.PartialFailures + } + return nil +} + +func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *OperationMetadata) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +type isOperationMetadata_Details interface { + isOperationMetadata_Details() +} + +type OperationMetadata_DeleteDetails struct { + // Details of a Delete operation. + DeleteDetails *DeleteOperationMetadata `protobuf:"bytes,8,opt,name=delete_details,json=deleteDetails,proto3,oneof"` +} + +type OperationMetadata_DeployModelDetails struct { + // Details of a DeployModel operation. + DeployModelDetails *DeployModelOperationMetadata `protobuf:"bytes,24,opt,name=deploy_model_details,json=deployModelDetails,proto3,oneof"` +} + +type OperationMetadata_UndeployModelDetails struct { + // Details of an UndeployModel operation. + UndeployModelDetails *UndeployModelOperationMetadata `protobuf:"bytes,25,opt,name=undeploy_model_details,json=undeployModelDetails,proto3,oneof"` +} + +type OperationMetadata_CreateModelDetails struct { + // Details of CreateModel operation. + CreateModelDetails *CreateModelOperationMetadata `protobuf:"bytes,10,opt,name=create_model_details,json=createModelDetails,proto3,oneof"` +} + +type OperationMetadata_ImportDataDetails struct { + // Details of ImportData operation. + ImportDataDetails *ImportDataOperationMetadata `protobuf:"bytes,15,opt,name=import_data_details,json=importDataDetails,proto3,oneof"` +} + +type OperationMetadata_BatchPredictDetails struct { + // Details of BatchPredict operation. + BatchPredictDetails *BatchPredictOperationMetadata `protobuf:"bytes,16,opt,name=batch_predict_details,json=batchPredictDetails,proto3,oneof"` +} + +type OperationMetadata_ExportDataDetails struct { + // Details of ExportData operation. + ExportDataDetails *ExportDataOperationMetadata `protobuf:"bytes,21,opt,name=export_data_details,json=exportDataDetails,proto3,oneof"` +} + +type OperationMetadata_ExportModelDetails struct { + // Details of ExportModel operation. + ExportModelDetails *ExportModelOperationMetadata `protobuf:"bytes,22,opt,name=export_model_details,json=exportModelDetails,proto3,oneof"` +} + +type OperationMetadata_ExportEvaluatedExamplesDetails struct { + // Details of ExportEvaluatedExamples operation. + ExportEvaluatedExamplesDetails *ExportEvaluatedExamplesOperationMetadata `protobuf:"bytes,26,opt,name=export_evaluated_examples_details,json=exportEvaluatedExamplesDetails,proto3,oneof"` +} + +func (*OperationMetadata_DeleteDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_DeployModelDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_UndeployModelDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_CreateModelDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_ImportDataDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_BatchPredictDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_ExportDataDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_ExportModelDetails) isOperationMetadata_Details() {} + +func (*OperationMetadata_ExportEvaluatedExamplesDetails) isOperationMetadata_Details() {} + +// Details of operations that perform deletes of any entities. +type DeleteOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteOperationMetadata) Reset() { + *x = DeleteOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOperationMetadata) ProtoMessage() {} + +func (x *DeleteOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteOperationMetadata.ProtoReflect.Descriptor instead. +func (*DeleteOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{1} +} + +// Details of DeployModel operation. +type DeployModelOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeployModelOperationMetadata) Reset() { + *x = DeployModelOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployModelOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployModelOperationMetadata) ProtoMessage() {} + +func (x *DeployModelOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployModelOperationMetadata.ProtoReflect.Descriptor instead. +func (*DeployModelOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{2} +} + +// Details of UndeployModel operation. +type UndeployModelOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UndeployModelOperationMetadata) Reset() { + *x = UndeployModelOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UndeployModelOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UndeployModelOperationMetadata) ProtoMessage() {} + +func (x *UndeployModelOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UndeployModelOperationMetadata.ProtoReflect.Descriptor instead. +func (*UndeployModelOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{3} +} + +// Details of CreateModel operation. +type CreateModelOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateModelOperationMetadata) Reset() { + *x = CreateModelOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateModelOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateModelOperationMetadata) ProtoMessage() {} + +func (x *CreateModelOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateModelOperationMetadata.ProtoReflect.Descriptor instead. +func (*CreateModelOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{4} +} + +// Details of ImportData operation. +type ImportDataOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ImportDataOperationMetadata) Reset() { + *x = ImportDataOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDataOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataOperationMetadata) ProtoMessage() {} + +func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataOperationMetadata.ProtoReflect.Descriptor instead. +func (*ImportDataOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{5} +} + +// Details of ExportData operation. +type ExportDataOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Information further describing this export data's output. + OutputInfo *ExportDataOperationMetadata_ExportDataOutputInfo `protobuf:"bytes,1,opt,name=output_info,json=outputInfo,proto3" json:"output_info,omitempty"` +} + +func (x *ExportDataOperationMetadata) Reset() { + *x = ExportDataOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataOperationMetadata) ProtoMessage() {} + +func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataOperationMetadata.ProtoReflect.Descriptor instead. +func (*ExportDataOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{6} +} + +func (x *ExportDataOperationMetadata) GetOutputInfo() *ExportDataOperationMetadata_ExportDataOutputInfo { + if x != nil { + return x.OutputInfo + } + return nil +} + +// Details of BatchPredict operation. +type BatchPredictOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The input config that was given upon starting this + // batch predict operation. + InputConfig *BatchPredictInputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` + // Output only. Information further describing this batch predict's output. + OutputInfo *BatchPredictOperationMetadata_BatchPredictOutputInfo `protobuf:"bytes,2,opt,name=output_info,json=outputInfo,proto3" json:"output_info,omitempty"` +} + +func (x *BatchPredictOperationMetadata) Reset() { + *x = BatchPredictOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchPredictOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchPredictOperationMetadata) ProtoMessage() {} + +func (x *BatchPredictOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchPredictOperationMetadata.ProtoReflect.Descriptor instead. +func (*BatchPredictOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{7} +} + +func (x *BatchPredictOperationMetadata) GetInputConfig() *BatchPredictInputConfig { + if x != nil { + return x.InputConfig + } + return nil +} + +func (x *BatchPredictOperationMetadata) GetOutputInfo() *BatchPredictOperationMetadata_BatchPredictOutputInfo { + if x != nil { + return x.OutputInfo + } + return nil +} + +// Details of ExportModel operation. +type ExportModelOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Information further describing the output of this model + // export. + OutputInfo *ExportModelOperationMetadata_ExportModelOutputInfo `protobuf:"bytes,2,opt,name=output_info,json=outputInfo,proto3" json:"output_info,omitempty"` +} + +func (x *ExportModelOperationMetadata) Reset() { + *x = ExportModelOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportModelOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportModelOperationMetadata) ProtoMessage() {} + +func (x *ExportModelOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportModelOperationMetadata.ProtoReflect.Descriptor instead. +func (*ExportModelOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{8} +} + +func (x *ExportModelOperationMetadata) GetOutputInfo() *ExportModelOperationMetadata_ExportModelOutputInfo { + if x != nil { + return x.OutputInfo + } + return nil +} + +// Details of EvaluatedExamples operation. +type ExportEvaluatedExamplesOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Information further describing the output of this evaluated + // examples export. + OutputInfo *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo `protobuf:"bytes,2,opt,name=output_info,json=outputInfo,proto3" json:"output_info,omitempty"` +} + +func (x *ExportEvaluatedExamplesOperationMetadata) Reset() { + *x = ExportEvaluatedExamplesOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportEvaluatedExamplesOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportEvaluatedExamplesOperationMetadata) ProtoMessage() {} + +func (x *ExportEvaluatedExamplesOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportEvaluatedExamplesOperationMetadata.ProtoReflect.Descriptor instead. +func (*ExportEvaluatedExamplesOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{9} +} + +func (x *ExportEvaluatedExamplesOperationMetadata) GetOutputInfo() *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo { + if x != nil { + return x.OutputInfo + } + return nil +} + +// Further describes this export data's output. +// Supplements +// [OutputConfig][google.cloud.automl.v1beta1.OutputConfig]. +type ExportDataOperationMetadata_ExportDataOutputInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The output location to which the exported data is written. + // + // Types that are assignable to OutputLocation: + // + // *ExportDataOperationMetadata_ExportDataOutputInfo_GcsOutputDirectory + // *ExportDataOperationMetadata_ExportDataOutputInfo_BigqueryOutputDataset + OutputLocation isExportDataOperationMetadata_ExportDataOutputInfo_OutputLocation `protobuf_oneof:"output_location"` +} + +func (x *ExportDataOperationMetadata_ExportDataOutputInfo) Reset() { + *x = ExportDataOperationMetadata_ExportDataOutputInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataOperationMetadata_ExportDataOutputInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataOperationMetadata_ExportDataOutputInfo) ProtoMessage() {} + +func (x *ExportDataOperationMetadata_ExportDataOutputInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataOperationMetadata_ExportDataOutputInfo.ProtoReflect.Descriptor instead. +func (*ExportDataOperationMetadata_ExportDataOutputInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{6, 0} +} + +func (m *ExportDataOperationMetadata_ExportDataOutputInfo) GetOutputLocation() isExportDataOperationMetadata_ExportDataOutputInfo_OutputLocation { + if m != nil { + return m.OutputLocation + } + return nil +} + +func (x *ExportDataOperationMetadata_ExportDataOutputInfo) GetGcsOutputDirectory() string { + if x, ok := x.GetOutputLocation().(*ExportDataOperationMetadata_ExportDataOutputInfo_GcsOutputDirectory); ok { + return x.GcsOutputDirectory + } + return "" +} + +func (x *ExportDataOperationMetadata_ExportDataOutputInfo) GetBigqueryOutputDataset() string { + if x, ok := x.GetOutputLocation().(*ExportDataOperationMetadata_ExportDataOutputInfo_BigqueryOutputDataset); ok { + return x.BigqueryOutputDataset + } + return "" +} + +type isExportDataOperationMetadata_ExportDataOutputInfo_OutputLocation interface { + isExportDataOperationMetadata_ExportDataOutputInfo_OutputLocation() +} + +type ExportDataOperationMetadata_ExportDataOutputInfo_GcsOutputDirectory struct { + // The full path of the Google Cloud Storage directory created, into which + // the exported data is written. + GcsOutputDirectory string `protobuf:"bytes,1,opt,name=gcs_output_directory,json=gcsOutputDirectory,proto3,oneof"` +} + +type ExportDataOperationMetadata_ExportDataOutputInfo_BigqueryOutputDataset struct { + // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + // format, into which the exported data is written. + BigqueryOutputDataset string `protobuf:"bytes,2,opt,name=bigquery_output_dataset,json=bigqueryOutputDataset,proto3,oneof"` +} + +func (*ExportDataOperationMetadata_ExportDataOutputInfo_GcsOutputDirectory) isExportDataOperationMetadata_ExportDataOutputInfo_OutputLocation() { +} + +func (*ExportDataOperationMetadata_ExportDataOutputInfo_BigqueryOutputDataset) isExportDataOperationMetadata_ExportDataOutputInfo_OutputLocation() { +} + +// Further describes this batch predict's output. +// Supplements +// +// [BatchPredictOutputConfig][google.cloud.automl.v1beta1.BatchPredictOutputConfig]. +type BatchPredictOperationMetadata_BatchPredictOutputInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The output location into which prediction output is written. + // + // Types that are assignable to OutputLocation: + // + // *BatchPredictOperationMetadata_BatchPredictOutputInfo_GcsOutputDirectory + // *BatchPredictOperationMetadata_BatchPredictOutputInfo_BigqueryOutputDataset + OutputLocation isBatchPredictOperationMetadata_BatchPredictOutputInfo_OutputLocation `protobuf_oneof:"output_location"` +} + +func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) Reset() { + *x = BatchPredictOperationMetadata_BatchPredictOutputInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchPredictOperationMetadata_BatchPredictOutputInfo) ProtoMessage() {} + +func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchPredictOperationMetadata_BatchPredictOutputInfo.ProtoReflect.Descriptor instead. +func (*BatchPredictOperationMetadata_BatchPredictOutputInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{7, 0} +} + +func (m *BatchPredictOperationMetadata_BatchPredictOutputInfo) GetOutputLocation() isBatchPredictOperationMetadata_BatchPredictOutputInfo_OutputLocation { + if m != nil { + return m.OutputLocation + } + return nil +} + +func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) GetGcsOutputDirectory() string { + if x, ok := x.GetOutputLocation().(*BatchPredictOperationMetadata_BatchPredictOutputInfo_GcsOutputDirectory); ok { + return x.GcsOutputDirectory + } + return "" +} + +func (x *BatchPredictOperationMetadata_BatchPredictOutputInfo) GetBigqueryOutputDataset() string { + if x, ok := x.GetOutputLocation().(*BatchPredictOperationMetadata_BatchPredictOutputInfo_BigqueryOutputDataset); ok { + return x.BigqueryOutputDataset + } + return "" +} + +type isBatchPredictOperationMetadata_BatchPredictOutputInfo_OutputLocation interface { + isBatchPredictOperationMetadata_BatchPredictOutputInfo_OutputLocation() +} + +type BatchPredictOperationMetadata_BatchPredictOutputInfo_GcsOutputDirectory struct { + // The full path of the Google Cloud Storage directory created, into which + // the prediction output is written. + GcsOutputDirectory string `protobuf:"bytes,1,opt,name=gcs_output_directory,json=gcsOutputDirectory,proto3,oneof"` +} + +type BatchPredictOperationMetadata_BatchPredictOutputInfo_BigqueryOutputDataset struct { + // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + // format, into which the prediction output is written. + BigqueryOutputDataset string `protobuf:"bytes,2,opt,name=bigquery_output_dataset,json=bigqueryOutputDataset,proto3,oneof"` +} + +func (*BatchPredictOperationMetadata_BatchPredictOutputInfo_GcsOutputDirectory) isBatchPredictOperationMetadata_BatchPredictOutputInfo_OutputLocation() { +} + +func (*BatchPredictOperationMetadata_BatchPredictOutputInfo_BigqueryOutputDataset) isBatchPredictOperationMetadata_BatchPredictOutputInfo_OutputLocation() { +} + +// Further describes the output of model export. +// Supplements +// +// [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. +type ExportModelOperationMetadata_ExportModelOutputInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The full path of the Google Cloud Storage directory created, into which + // the model will be exported. + GcsOutputDirectory string `protobuf:"bytes,1,opt,name=gcs_output_directory,json=gcsOutputDirectory,proto3" json:"gcs_output_directory,omitempty"` +} + +func (x *ExportModelOperationMetadata_ExportModelOutputInfo) Reset() { + *x = ExportModelOperationMetadata_ExportModelOutputInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportModelOperationMetadata_ExportModelOutputInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportModelOperationMetadata_ExportModelOutputInfo) ProtoMessage() {} + +func (x *ExportModelOperationMetadata_ExportModelOutputInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportModelOperationMetadata_ExportModelOutputInfo.ProtoReflect.Descriptor instead. +func (*ExportModelOperationMetadata_ExportModelOutputInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *ExportModelOperationMetadata_ExportModelOutputInfo) GetGcsOutputDirectory() string { + if x != nil { + return x.GcsOutputDirectory + } + return "" +} + +// Further describes the output of the evaluated examples export. +// Supplements +// +// [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig]. +type ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId + // format, into which the output of export evaluated examples is written. + BigqueryOutputDataset string `protobuf:"bytes,2,opt,name=bigquery_output_dataset,json=bigqueryOutputDataset,proto3" json:"bigquery_output_dataset,omitempty"` +} + +func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) Reset() { + *x = ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) ProtoMessage() {} + +func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo.ProtoReflect.Descriptor instead. +func (*ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo) GetBigqueryOutputDataset() string { + if x != nil { + return x.BigqueryOutputDataset + } + return "" +} + +var File_google_cloud_automl_v1beta1_operations_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_operations_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x24, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x65, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x0a, 0x0a, 0x11, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, + 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0d, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x6d, 0x0a, + 0x14, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x73, 0x0a, 0x16, + 0x75, 0x6e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x75, 0x6e, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x6d, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x12, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x12, 0x6a, 0x0a, 0x13, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x69, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x70, 0x0a, 0x15, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x13, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x6a, + 0x0a, 0x13, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x6d, 0x0a, 0x14, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x12, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x21, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1e, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x29, + 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x19, 0x0a, + 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x20, 0x0a, 0x1e, 0x55, 0x6e, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1d, 0x0a, 0x1b, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa7, 0x02, 0x0a, 0x1b, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x6e, 0x0a, 0x0b, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x97, 0x01, 0x0a, 0x14, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x63, 0x73, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x12, 0x67, 0x63, 0x73, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x38, 0x0a, 0x17, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x62, 0x69, 0x67, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x42, 0x11, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x03, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x57, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, + 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x1a, 0x99, 0x01, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, + 0x14, 0x67, 0x63, 0x73, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x12, 0x67, + 0x63, 0x73, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0x38, 0x0a, 0x17, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xdb, + 0x01, 0x0a, 0x1c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x70, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x1a, 0x49, 0x0a, 0x15, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x63, + 0x73, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x67, 0x63, 0x73, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x92, 0x02, 0x0a, + 0x28, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x88, 0x01, 0x0a, 0x0b, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x5b, 0x0a, 0x21, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x17, 0x62, 0x69, 0x67, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x62, 0x69, 0x67, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_operations_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_operations_proto_rawDescData = file_google_cloud_automl_v1beta1_operations_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_operations_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_operations_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_operations_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_operations_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_operations_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_operations_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_cloud_automl_v1beta1_operations_proto_goTypes = []interface{}{ + (*OperationMetadata)(nil), // 0: google.cloud.automl.v1beta1.OperationMetadata + (*DeleteOperationMetadata)(nil), // 1: google.cloud.automl.v1beta1.DeleteOperationMetadata + (*DeployModelOperationMetadata)(nil), // 2: google.cloud.automl.v1beta1.DeployModelOperationMetadata + (*UndeployModelOperationMetadata)(nil), // 3: google.cloud.automl.v1beta1.UndeployModelOperationMetadata + (*CreateModelOperationMetadata)(nil), // 4: google.cloud.automl.v1beta1.CreateModelOperationMetadata + (*ImportDataOperationMetadata)(nil), // 5: google.cloud.automl.v1beta1.ImportDataOperationMetadata + (*ExportDataOperationMetadata)(nil), // 6: google.cloud.automl.v1beta1.ExportDataOperationMetadata + (*BatchPredictOperationMetadata)(nil), // 7: google.cloud.automl.v1beta1.BatchPredictOperationMetadata + (*ExportModelOperationMetadata)(nil), // 8: google.cloud.automl.v1beta1.ExportModelOperationMetadata + (*ExportEvaluatedExamplesOperationMetadata)(nil), // 9: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + (*ExportDataOperationMetadata_ExportDataOutputInfo)(nil), // 10: google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo + (*BatchPredictOperationMetadata_BatchPredictOutputInfo)(nil), // 11: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + (*ExportModelOperationMetadata_ExportModelOutputInfo)(nil), // 12: google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + (*ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo)(nil), // 13: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + (*status.Status)(nil), // 14: google.rpc.Status + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*BatchPredictInputConfig)(nil), // 16: google.cloud.automl.v1beta1.BatchPredictInputConfig +} +var file_google_cloud_automl_v1beta1_operations_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.OperationMetadata.delete_details:type_name -> google.cloud.automl.v1beta1.DeleteOperationMetadata + 2, // 1: google.cloud.automl.v1beta1.OperationMetadata.deploy_model_details:type_name -> google.cloud.automl.v1beta1.DeployModelOperationMetadata + 3, // 2: google.cloud.automl.v1beta1.OperationMetadata.undeploy_model_details:type_name -> google.cloud.automl.v1beta1.UndeployModelOperationMetadata + 4, // 3: google.cloud.automl.v1beta1.OperationMetadata.create_model_details:type_name -> google.cloud.automl.v1beta1.CreateModelOperationMetadata + 5, // 4: google.cloud.automl.v1beta1.OperationMetadata.import_data_details:type_name -> google.cloud.automl.v1beta1.ImportDataOperationMetadata + 7, // 5: google.cloud.automl.v1beta1.OperationMetadata.batch_predict_details:type_name -> google.cloud.automl.v1beta1.BatchPredictOperationMetadata + 6, // 6: google.cloud.automl.v1beta1.OperationMetadata.export_data_details:type_name -> google.cloud.automl.v1beta1.ExportDataOperationMetadata + 8, // 7: google.cloud.automl.v1beta1.OperationMetadata.export_model_details:type_name -> google.cloud.automl.v1beta1.ExportModelOperationMetadata + 9, // 8: google.cloud.automl.v1beta1.OperationMetadata.export_evaluated_examples_details:type_name -> google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata + 14, // 9: google.cloud.automl.v1beta1.OperationMetadata.partial_failures:type_name -> google.rpc.Status + 15, // 10: google.cloud.automl.v1beta1.OperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 15, // 11: google.cloud.automl.v1beta1.OperationMetadata.update_time:type_name -> google.protobuf.Timestamp + 10, // 12: google.cloud.automl.v1beta1.ExportDataOperationMetadata.output_info:type_name -> google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo + 16, // 13: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.input_config:type_name -> google.cloud.automl.v1beta1.BatchPredictInputConfig + 11, // 14: google.cloud.automl.v1beta1.BatchPredictOperationMetadata.output_info:type_name -> google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo + 12, // 15: google.cloud.automl.v1beta1.ExportModelOperationMetadata.output_info:type_name -> google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo + 13, // 16: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.output_info:type_name -> google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_operations_proto_init() } +func file_google_cloud_automl_v1beta1_operations_proto_init() { + if File_google_cloud_automl_v1beta1_operations_proto != nil { + return + } + file_google_cloud_automl_v1beta1_io_proto_init() + file_google_cloud_automl_v1beta1_model_proto_init() + file_google_cloud_automl_v1beta1_model_evaluation_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployModelOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UndeployModelOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateModelOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDataOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchPredictOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportModelOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportEvaluatedExamplesOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataOperationMetadata_ExportDataOutputInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchPredictOperationMetadata_BatchPredictOutputInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportModelOperationMetadata_ExportModelOutputInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*OperationMetadata_DeleteDetails)(nil), + (*OperationMetadata_DeployModelDetails)(nil), + (*OperationMetadata_UndeployModelDetails)(nil), + (*OperationMetadata_CreateModelDetails)(nil), + (*OperationMetadata_ImportDataDetails)(nil), + (*OperationMetadata_BatchPredictDetails)(nil), + (*OperationMetadata_ExportDataDetails)(nil), + (*OperationMetadata_ExportModelDetails)(nil), + (*OperationMetadata_ExportEvaluatedExamplesDetails)(nil), + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*ExportDataOperationMetadata_ExportDataOutputInfo_GcsOutputDirectory)(nil), + (*ExportDataOperationMetadata_ExportDataOutputInfo_BigqueryOutputDataset)(nil), + } + file_google_cloud_automl_v1beta1_operations_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*BatchPredictOperationMetadata_BatchPredictOutputInfo_GcsOutputDirectory)(nil), + (*BatchPredictOperationMetadata_BatchPredictOutputInfo_BigqueryOutputDataset)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_operations_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_operations_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_operations_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_operations_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_operations_proto = out.File + file_google_cloud_automl_v1beta1_operations_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_operations_proto_goTypes = nil + file_google_cloud_automl_v1beta1_operations_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/prediction_service.pb.go b/automl/apiv1beta1/automlpb/prediction_service.pb.go new file mode 100644 index 000000000000..9ac16c6ef87e --- /dev/null +++ b/automl/apiv1beta1/automlpb/prediction_service.pb.go @@ -0,0 +1,881 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/prediction_service.proto + +package automlpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict]. +type PredictRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the model requested to serve the prediction. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Payload to perform a prediction on. The payload must match the + // problem type that the model was trained to solve. + Payload *ExamplePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + // Additional domain-specific parameters, any string must be up to 25000 + // characters long. + // + // * For Image Classification: + // + // `score_threshold` - (float) A value from 0.0 to 1.0. When the model + // makes predictions for an image, it will only produce results that have + // at least this confidence score. The default is 0.5. + // + // * For Image Object Detection: + // `score_threshold` - (float) When Model detects objects on the image, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // `max_bounding_box_count` - (int64) No more than this number of bounding + // boxes will be returned in the response. Default is 100, the + // requested value may be limited by server. + // - For Tables: + // feature_importance - (boolean) Whether feature importance + // should be populated in the returned TablesAnnotation. + // The default is false. + Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *PredictRequest) Reset() { + *x = PredictRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PredictRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PredictRequest) ProtoMessage() {} + +func (x *PredictRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead. +func (*PredictRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescGZIP(), []int{0} +} + +func (x *PredictRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PredictRequest) GetPayload() *ExamplePayload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *PredictRequest) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +// Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict]. +type PredictResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Prediction result. + // Translation and Text Sentiment will return precisely one payload. + Payload []*AnnotationPayload `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` + // The preprocessed example that AutoML actually makes prediction on. + // Empty if AutoML does not preprocess the input example. + // - For Text Extraction: + // If the input is a .pdf file, the OCR'ed text will be provided in + // [document_text][google.cloud.automl.v1beta1.Document.document_text]. + PreprocessedInput *ExamplePayload `protobuf:"bytes,3,opt,name=preprocessed_input,json=preprocessedInput,proto3" json:"preprocessed_input,omitempty"` + // Additional domain-specific prediction response metadata. + // + // - For Image Object Detection: + // `max_bounding_box_count` - (int64) At most that many bounding boxes per + // image could have been returned. + // + // - For Text Sentiment: + // `sentiment_score` - (float, deprecated) A value between -1 and 1, + // -1 maps to least positive sentiment, while 1 maps to the most positive + // one and the higher the score, the more positive the sentiment in the + // document is. Yet these values are relative to the training data, so + // e.g. if all data was positive then -1 will be also positive (though + // the least). + // The sentiment_score shouldn't be confused with "score" or "magnitude" + // from the previous Natural Language Sentiment Analysis API. + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *PredictResponse) Reset() { + *x = PredictResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PredictResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PredictResponse) ProtoMessage() {} + +func (x *PredictResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PredictResponse.ProtoReflect.Descriptor instead. +func (*PredictResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescGZIP(), []int{1} +} + +func (x *PredictResponse) GetPayload() []*AnnotationPayload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *PredictResponse) GetPreprocessedInput() *ExamplePayload { + if x != nil { + return x.PreprocessedInput + } + return nil +} + +func (x *PredictResponse) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +// Request message for [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict]. +type BatchPredictRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the model requested to serve the batch prediction. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The input configuration for batch prediction. + InputConfig *BatchPredictInputConfig `protobuf:"bytes,3,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` + // Required. The Configuration specifying where output predictions should + // be written. + OutputConfig *BatchPredictOutputConfig `protobuf:"bytes,4,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` + // Required. Additional domain-specific parameters for the predictions, any string must + // be up to 25000 characters long. + // + // * For Text Classification: + // + // `score_threshold` - (float) A value from 0.0 to 1.0. When the model + // makes predictions for a text snippet, it will only produce results + // that have at least this confidence score. The default is 0.5. + // + // * For Image Classification: + // + // `score_threshold` - (float) A value from 0.0 to 1.0. When the model + // makes predictions for an image, it will only produce results that + // have at least this confidence score. The default is 0.5. + // + // * For Image Object Detection: + // + // `score_threshold` - (float) When Model detects objects on the image, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // `max_bounding_box_count` - (int64) No more than this number of bounding + // boxes will be produced per image. Default is 100, the + // requested value may be limited by server. + // + // * For Video Classification : + // + // `score_threshold` - (float) A value from 0.0 to 1.0. When the model + // makes predictions for a video, it will only produce results that + // have at least this confidence score. The default is 0.5. + // `segment_classification` - (boolean) Set to true to request + // segment-level classification. AutoML Video Intelligence returns + // labels and their confidence scores for the entire segment of the + // video that user specified in the request configuration. + // The default is "true". + // `shot_classification` - (boolean) Set to true to request shot-level + // classification. AutoML Video Intelligence determines the boundaries + // for each camera shot in the entire segment of the video that user + // specified in the request configuration. AutoML Video Intelligence + // then returns labels and their confidence scores for each detected + // shot, along with the start and end time of the shot. + // WARNING: Model evaluation is not done for this classification type, + // the quality of it depends on training data, but there are no metrics + // provided to describe that quality. The default is "false". + // `1s_interval_classification` - (boolean) Set to true to request + // classification for a video at one-second intervals. AutoML Video + // Intelligence returns labels and their confidence scores for each + // second of the entire segment of the video that user specified in the + // request configuration. + // WARNING: Model evaluation is not done for this classification + // type, the quality of it depends on training data, but there are no + // metrics provided to describe that quality. The default is + // "false". + // + // * For Tables: + // + // feature_importance - (boolean) Whether feature importance + // should be populated in the returned TablesAnnotations. The + // default is false. + // + // * For Video Object Tracking: + // + // `score_threshold` - (float) When Model detects objects on video frames, + // it will only produce bounding boxes which have at least this + // confidence score. Value in 0 to 1 range, default is 0.5. + // `max_bounding_box_count` - (int64) No more than this number of bounding + // boxes will be returned per frame. Default is 100, the requested + // value may be limited by server. + // `min_bounding_box_size` - (float) Only bounding boxes with shortest edge + // at least that long as a relative value of video frame size will be + // returned. Value in 0 to 1 range. Default is 0. + Params map[string]string `protobuf:"bytes,5,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *BatchPredictRequest) Reset() { + *x = BatchPredictRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchPredictRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchPredictRequest) ProtoMessage() {} + +func (x *BatchPredictRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchPredictRequest.ProtoReflect.Descriptor instead. +func (*BatchPredictRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescGZIP(), []int{2} +} + +func (x *BatchPredictRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BatchPredictRequest) GetInputConfig() *BatchPredictInputConfig { + if x != nil { + return x.InputConfig + } + return nil +} + +func (x *BatchPredictRequest) GetOutputConfig() *BatchPredictOutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +func (x *BatchPredictRequest) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +// Result of the Batch Predict. This message is returned in +// [response][google.longrunning.Operation.response] of the operation returned +// by the [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict]. +type BatchPredictResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Additional domain-specific prediction response metadata. + // + // - For Image Object Detection: + // `max_bounding_box_count` - (int64) At most that many bounding boxes per + // image could have been returned. + // + // - For Video Object Tracking: + // `max_bounding_box_count` - (int64) At most that many bounding boxes per + // frame could have been returned. + Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *BatchPredictResult) Reset() { + *x = BatchPredictResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchPredictResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchPredictResult) ProtoMessage() {} + +func (x *BatchPredictResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchPredictResult.ProtoReflect.Descriptor instead. +func (*BatchPredictResult) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescGZIP(), []int{3} +} + +func (x *BatchPredictResult) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +var File_google_cloud_automl_v1beta1_prediction_service_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_prediction_service_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x4a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4f, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x02, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x5a, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x11, + 0x70, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x12, 0x56, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa3, 0x03, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x59, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x01, 0x0a, + 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x59, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, + 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x9e, 0x04, 0x0a, 0x11, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0xbe, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x2b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, + 0x22, 0x37, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x13, 0x6e, + 0x61, 0x6d, 0x65, 0x2c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2c, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0xfc, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x74, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x22, 0x3c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x3a, 0x01, 0x2a, 0xda, 0x41, + 0x26, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0xca, 0x41, 0x27, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x11, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x1a, 0x49, 0xca, 0x41, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xbd, 0x01, 0x0a, + 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x16, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, + 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, + 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, + 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescData = file_google_cloud_automl_v1beta1_prediction_service_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_prediction_service_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_google_cloud_automl_v1beta1_prediction_service_proto_goTypes = []interface{}{ + (*PredictRequest)(nil), // 0: google.cloud.automl.v1beta1.PredictRequest + (*PredictResponse)(nil), // 1: google.cloud.automl.v1beta1.PredictResponse + (*BatchPredictRequest)(nil), // 2: google.cloud.automl.v1beta1.BatchPredictRequest + (*BatchPredictResult)(nil), // 3: google.cloud.automl.v1beta1.BatchPredictResult + nil, // 4: google.cloud.automl.v1beta1.PredictRequest.ParamsEntry + nil, // 5: google.cloud.automl.v1beta1.PredictResponse.MetadataEntry + nil, // 6: google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntry + nil, // 7: google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry + (*ExamplePayload)(nil), // 8: google.cloud.automl.v1beta1.ExamplePayload + (*AnnotationPayload)(nil), // 9: google.cloud.automl.v1beta1.AnnotationPayload + (*BatchPredictInputConfig)(nil), // 10: google.cloud.automl.v1beta1.BatchPredictInputConfig + (*BatchPredictOutputConfig)(nil), // 11: google.cloud.automl.v1beta1.BatchPredictOutputConfig + (*longrunning.Operation)(nil), // 12: google.longrunning.Operation +} +var file_google_cloud_automl_v1beta1_prediction_service_proto_depIdxs = []int32{ + 8, // 0: google.cloud.automl.v1beta1.PredictRequest.payload:type_name -> google.cloud.automl.v1beta1.ExamplePayload + 4, // 1: google.cloud.automl.v1beta1.PredictRequest.params:type_name -> google.cloud.automl.v1beta1.PredictRequest.ParamsEntry + 9, // 2: google.cloud.automl.v1beta1.PredictResponse.payload:type_name -> google.cloud.automl.v1beta1.AnnotationPayload + 8, // 3: google.cloud.automl.v1beta1.PredictResponse.preprocessed_input:type_name -> google.cloud.automl.v1beta1.ExamplePayload + 5, // 4: google.cloud.automl.v1beta1.PredictResponse.metadata:type_name -> google.cloud.automl.v1beta1.PredictResponse.MetadataEntry + 10, // 5: google.cloud.automl.v1beta1.BatchPredictRequest.input_config:type_name -> google.cloud.automl.v1beta1.BatchPredictInputConfig + 11, // 6: google.cloud.automl.v1beta1.BatchPredictRequest.output_config:type_name -> google.cloud.automl.v1beta1.BatchPredictOutputConfig + 6, // 7: google.cloud.automl.v1beta1.BatchPredictRequest.params:type_name -> google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntry + 7, // 8: google.cloud.automl.v1beta1.BatchPredictResult.metadata:type_name -> google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry + 0, // 9: google.cloud.automl.v1beta1.PredictionService.Predict:input_type -> google.cloud.automl.v1beta1.PredictRequest + 2, // 10: google.cloud.automl.v1beta1.PredictionService.BatchPredict:input_type -> google.cloud.automl.v1beta1.BatchPredictRequest + 1, // 11: google.cloud.automl.v1beta1.PredictionService.Predict:output_type -> google.cloud.automl.v1beta1.PredictResponse + 12, // 12: google.cloud.automl.v1beta1.PredictionService.BatchPredict:output_type -> google.longrunning.Operation + 11, // [11:13] is the sub-list for method output_type + 9, // [9:11] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_prediction_service_proto_init() } +func file_google_cloud_automl_v1beta1_prediction_service_proto_init() { + if File_google_cloud_automl_v1beta1_prediction_service_proto != nil { + return + } + file_google_cloud_automl_v1beta1_annotation_payload_proto_init() + file_google_cloud_automl_v1beta1_data_items_proto_init() + file_google_cloud_automl_v1beta1_io_proto_init() + file_google_cloud_automl_v1beta1_operations_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PredictRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PredictResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchPredictRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchPredictResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_prediction_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_automl_v1beta1_prediction_service_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_prediction_service_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_prediction_service_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_prediction_service_proto = out.File + file_google_cloud_automl_v1beta1_prediction_service_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_prediction_service_proto_goTypes = nil + file_google_cloud_automl_v1beta1_prediction_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// PredictionServiceClient is the client API for PredictionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PredictionServiceClient interface { + // Perform an online prediction. The prediction result will be directly + // returned in the response. + // Available for following ML problems, and their expected request payloads: + // - Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + // up to 30MB. + // - Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + // up to 30MB. + // - Text Classification - TextSnippet, content up to 60,000 characters, + // UTF-8 encoded. + // - Text Extraction - TextSnippet, content up to 30,000 characters, + // UTF-8 NFC encoded. + // - Translation - TextSnippet, content up to 25,000 characters, UTF-8 + // encoded. + // - Tables - Row, with column values matching the columns of the model, + // up to 5MB. Not available for FORECASTING + // + // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + // - Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + // encoded. + Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error) + // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch + // prediction result won't be immediately available in the response. Instead, + // a long running operation object is returned. User can poll the operation + // result via [GetOperation][google.longrunning.Operations.GetOperation] + // method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in + // the [response][google.longrunning.Operation.response] field. + // Available for following ML problems: + // * Image Classification + // * Image Object Detection + // * Video Classification + // * Video Object Tracking * Text Extraction + // * Tables + BatchPredict(ctx context.Context, in *BatchPredictRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) +} + +type predictionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPredictionServiceClient(cc grpc.ClientConnInterface) PredictionServiceClient { + return &predictionServiceClient{cc} +} + +func (c *predictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error) { + out := new(PredictResponse) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.PredictionService/Predict", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *predictionServiceClient) BatchPredict(ctx context.Context, in *BatchPredictRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.PredictionService/BatchPredict", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PredictionServiceServer is the server API for PredictionService service. +type PredictionServiceServer interface { + // Perform an online prediction. The prediction result will be directly + // returned in the response. + // Available for following ML problems, and their expected request payloads: + // - Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes + // up to 30MB. + // - Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes + // up to 30MB. + // - Text Classification - TextSnippet, content up to 60,000 characters, + // UTF-8 encoded. + // - Text Extraction - TextSnippet, content up to 30,000 characters, + // UTF-8 NFC encoded. + // - Translation - TextSnippet, content up to 25,000 characters, UTF-8 + // encoded. + // - Tables - Row, with column values matching the columns of the model, + // up to 5MB. Not available for FORECASTING + // + // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. + // - Text Sentiment - TextSnippet, content up 500 characters, UTF-8 + // encoded. + Predict(context.Context, *PredictRequest) (*PredictResponse, error) + // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch + // prediction result won't be immediately available in the response. Instead, + // a long running operation object is returned. User can poll the operation + // result via [GetOperation][google.longrunning.Operations.GetOperation] + // method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in + // the [response][google.longrunning.Operation.response] field. + // Available for following ML problems: + // * Image Classification + // * Image Object Detection + // * Video Classification + // * Video Object Tracking * Text Extraction + // * Tables + BatchPredict(context.Context, *BatchPredictRequest) (*longrunning.Operation, error) +} + +// UnimplementedPredictionServiceServer can be embedded to have forward compatible implementations. +type UnimplementedPredictionServiceServer struct { +} + +func (*UnimplementedPredictionServiceServer) Predict(context.Context, *PredictRequest) (*PredictResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented") +} +func (*UnimplementedPredictionServiceServer) BatchPredict(context.Context, *BatchPredictRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchPredict not implemented") +} + +func RegisterPredictionServiceServer(s *grpc.Server, srv PredictionServiceServer) { + s.RegisterService(&_PredictionService_serviceDesc, srv) +} + +func _PredictionService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PredictRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PredictionServiceServer).Predict(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.PredictionService/Predict", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PredictionServiceServer).Predict(ctx, req.(*PredictRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PredictionService_BatchPredict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchPredictRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PredictionServiceServer).BatchPredict(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.PredictionService/BatchPredict", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PredictionServiceServer).BatchPredict(ctx, req.(*BatchPredictRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _PredictionService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.automl.v1beta1.PredictionService", + HandlerType: (*PredictionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Predict", + Handler: _PredictionService_Predict_Handler, + }, + { + MethodName: "BatchPredict", + Handler: _PredictionService_BatchPredict_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/automl/v1beta1/prediction_service.proto", +} diff --git a/automl/apiv1beta1/automlpb/ranges.pb.go b/automl/apiv1beta1/automlpb/ranges.pb.go new file mode 100644 index 000000000000..cd7725065f77 --- /dev/null +++ b/automl/apiv1beta1/automlpb/ranges.pb.go @@ -0,0 +1,182 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/ranges.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A range between two double numbers. +type DoubleRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start of the range, inclusive. + Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` + // End of the range, exclusive. + End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *DoubleRange) Reset() { + *x = DoubleRange{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRange) ProtoMessage() {} + +func (x *DoubleRange) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead. +func (*DoubleRange) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_ranges_proto_rawDescGZIP(), []int{0} +} + +func (x *DoubleRange) GetStart() float64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *DoubleRange) GetEnd() float64 { + if x != nil { + return x.End + } + return 0 +} + +var File_google_cloud_automl_v1beta1_ranges_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_ranges_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0xb2, + 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x0b, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_ranges_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_ranges_proto_rawDescData = file_google_cloud_automl_v1beta1_ranges_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_ranges_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_ranges_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_ranges_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_ranges_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_ranges_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_ranges_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_ranges_proto_goTypes = []interface{}{ + (*DoubleRange)(nil), // 0: google.cloud.automl.v1beta1.DoubleRange +} +var file_google_cloud_automl_v1beta1_ranges_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_ranges_proto_init() } +func file_google_cloud_automl_v1beta1_ranges_proto_init() { + if File_google_cloud_automl_v1beta1_ranges_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_ranges_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_ranges_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_ranges_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_ranges_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_ranges_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_ranges_proto = out.File + file_google_cloud_automl_v1beta1_ranges_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_ranges_proto_goTypes = nil + file_google_cloud_automl_v1beta1_ranges_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/regression.pb.go b/automl/apiv1beta1/automlpb/regression.pb.go new file mode 100644 index 000000000000..16a9c91194be --- /dev/null +++ b/automl/apiv1beta1/automlpb/regression.pb.go @@ -0,0 +1,226 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/regression.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Metrics for regression problems. +type RegressionEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Root Mean Squared Error (RMSE). + RootMeanSquaredError float32 `protobuf:"fixed32,1,opt,name=root_mean_squared_error,json=rootMeanSquaredError,proto3" json:"root_mean_squared_error,omitempty"` + // Output only. Mean Absolute Error (MAE). + MeanAbsoluteError float32 `protobuf:"fixed32,2,opt,name=mean_absolute_error,json=meanAbsoluteError,proto3" json:"mean_absolute_error,omitempty"` + // Output only. Mean absolute percentage error. Only set if all ground truth + // values are are positive. + MeanAbsolutePercentageError float32 `protobuf:"fixed32,3,opt,name=mean_absolute_percentage_error,json=meanAbsolutePercentageError,proto3" json:"mean_absolute_percentage_error,omitempty"` + // Output only. R squared. + RSquared float32 `protobuf:"fixed32,4,opt,name=r_squared,json=rSquared,proto3" json:"r_squared,omitempty"` + // Output only. Root mean squared log error. + RootMeanSquaredLogError float32 `protobuf:"fixed32,5,opt,name=root_mean_squared_log_error,json=rootMeanSquaredLogError,proto3" json:"root_mean_squared_log_error,omitempty"` +} + +func (x *RegressionEvaluationMetrics) Reset() { + *x = RegressionEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegressionEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegressionEvaluationMetrics) ProtoMessage() {} + +func (x *RegressionEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegressionEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*RegressionEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_regression_proto_rawDescGZIP(), []int{0} +} + +func (x *RegressionEvaluationMetrics) GetRootMeanSquaredError() float32 { + if x != nil { + return x.RootMeanSquaredError + } + return 0 +} + +func (x *RegressionEvaluationMetrics) GetMeanAbsoluteError() float32 { + if x != nil { + return x.MeanAbsoluteError + } + return 0 +} + +func (x *RegressionEvaluationMetrics) GetMeanAbsolutePercentageError() float32 { + if x != nil { + return x.MeanAbsolutePercentageError + } + return 0 +} + +func (x *RegressionEvaluationMetrics) GetRSquared() float32 { + if x != nil { + return x.RSquared + } + return 0 +} + +func (x *RegressionEvaluationMetrics) GetRootMeanSquaredLogError() float32 { + if x != nil { + return x.RootMeanSquaredLogError + } + return 0 +} + +var File_google_cloud_automl_v1beta1_regression_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_regression_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0xa4, 0x02, 0x0a, 0x1b, + 0x52, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x72, + 0x6f, 0x6f, 0x74, 0x5f, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, + 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x72, 0x6f, + 0x6f, 0x74, 0x4d, 0x65, 0x61, 0x6e, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, + 0x75, 0x74, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x11, 0x6d, 0x65, 0x61, 0x6e, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, + 0x75, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x1b, 0x6d, 0x65, 0x61, 0x6e, + 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x5f, 0x73, 0x71, 0x75, + 0x61, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x72, 0x53, 0x71, 0x75, + 0x61, 0x72, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1b, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x6d, 0x65, 0x61, + 0x6e, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x17, 0x72, 0x6f, 0x6f, 0x74, 0x4d, + 0x65, 0x61, 0x6e, 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x42, 0xb4, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x52, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_regression_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_regression_proto_rawDescData = file_google_cloud_automl_v1beta1_regression_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_regression_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_regression_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_regression_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_regression_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_regression_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_regression_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_regression_proto_goTypes = []interface{}{ + (*RegressionEvaluationMetrics)(nil), // 0: google.cloud.automl.v1beta1.RegressionEvaluationMetrics +} +var file_google_cloud_automl_v1beta1_regression_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_regression_proto_init() } +func file_google_cloud_automl_v1beta1_regression_proto_init() { + if File_google_cloud_automl_v1beta1_regression_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_regression_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegressionEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_regression_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_regression_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_regression_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_regression_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_regression_proto = out.File + file_google_cloud_automl_v1beta1_regression_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_regression_proto_goTypes = nil + file_google_cloud_automl_v1beta1_regression_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/service.pb.go b/automl/apiv1beta1/automlpb/service.pb.go new file mode 100644 index 000000000000..feccdf38b744 --- /dev/null +++ b/automl/apiv1beta1/automlpb/service.pb.go @@ -0,0 +1,4138 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/service.proto + +package automlpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset]. +type CreateDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the project to create the dataset for. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The dataset to create. + Dataset *Dataset `protobuf:"bytes,2,opt,name=dataset,proto3" json:"dataset,omitempty"` +} + +func (x *CreateDatasetRequest) Reset() { + *x = CreateDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatasetRequest) ProtoMessage() {} + +func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatasetRequest.ProtoReflect.Descriptor instead. +func (*CreateDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateDatasetRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDatasetRequest) GetDataset() *Dataset { + if x != nil { + return x.Dataset + } + return nil +} + +// Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset]. +type GetDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the dataset to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDatasetRequest) Reset() { + *x = GetDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatasetRequest) ProtoMessage() {} + +func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatasetRequest.ProtoReflect.Descriptor instead. +func (*GetDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetDatasetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. +type ListDatasetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the project from which to list datasets. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // An expression for filtering the results of the request. + // + // - `dataset_metadata` - for existence of the case (e.g. + // `image_classification_dataset_metadata:*`). Some examples of + // using the filter are: + // + // - `translation_dataset_metadata:*` --> The dataset has + // `translation_dataset_metadata`. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. Server may return fewer results than requested. + // If unspecified, server will pick a default size. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying a page of results for the server to return + // Typically obtained via + // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous + // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDatasetsRequest) Reset() { + *x = ListDatasetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDatasetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatasetsRequest) ProtoMessage() {} + +func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatasetsRequest.ProtoReflect.Descriptor instead. +func (*ListDatasetsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListDatasetsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDatasetsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListDatasetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDatasetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. +type ListDatasetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The datasets read. + Datasets []*Dataset `protobuf:"bytes,1,rep,name=datasets,proto3" json:"datasets,omitempty"` + // A token to retrieve next page of results. + // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDatasetsResponse) Reset() { + *x = ListDatasetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDatasetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatasetsResponse) ProtoMessage() {} + +func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatasetsResponse.ProtoReflect.Descriptor instead. +func (*ListDatasetsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListDatasetsResponse) GetDatasets() []*Dataset { + if x != nil { + return x.Datasets + } + return nil +} + +func (x *ListDatasetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset] +type UpdateDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The dataset which replaces the resource on the server. + Dataset *Dataset `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // The update mask applies to the resource. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateDatasetRequest) Reset() { + *x = UpdateDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDatasetRequest) ProtoMessage() {} + +func (x *UpdateDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDatasetRequest.ProtoReflect.Descriptor instead. +func (*UpdateDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateDatasetRequest) GetDataset() *Dataset { + if x != nil { + return x.Dataset + } + return nil +} + +func (x *UpdateDatasetRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset]. +type DeleteDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the dataset to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteDatasetRequest) Reset() { + *x = DeleteDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDatasetRequest) ProtoMessage() {} + +func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDatasetRequest.ProtoReflect.Descriptor instead. +func (*DeleteDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteDatasetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData]. +type ImportDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset name. Dataset must already exist. All imported + // annotations and examples will be added. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The desired input location and its domain specific semantics, + // if any. + InputConfig *InputConfig `protobuf:"bytes,3,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` +} + +func (x *ImportDataRequest) Reset() { + *x = ImportDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataRequest) ProtoMessage() {} + +func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataRequest.ProtoReflect.Descriptor instead. +func (*ImportDataRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ImportDataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ImportDataRequest) GetInputConfig() *InputConfig { + if x != nil { + return x.InputConfig + } + return nil +} + +// Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData]. +type ExportDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the dataset. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The desired output location. + OutputConfig *OutputConfig `protobuf:"bytes,3,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` +} + +func (x *ExportDataRequest) Reset() { + *x = ExportDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataRequest) ProtoMessage() {} + +func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataRequest.ProtoReflect.Descriptor instead. +func (*ExportDataRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *ExportDataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportDataRequest) GetOutputConfig() *OutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +// Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec]. +type GetAnnotationSpecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the annotation spec to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAnnotationSpecRequest) Reset() { + *x = GetAnnotationSpecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAnnotationSpecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAnnotationSpecRequest) ProtoMessage() {} + +func (x *GetAnnotationSpecRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAnnotationSpecRequest.ProtoReflect.Descriptor instead. +func (*GetAnnotationSpecRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *GetAnnotationSpecRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec]. +type GetTableSpecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the table spec to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Mask specifying which fields to read. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` +} + +func (x *GetTableSpecRequest) Reset() { + *x = GetTableSpecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTableSpecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTableSpecRequest) ProtoMessage() {} + +func (x *GetTableSpecRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTableSpecRequest.ProtoReflect.Descriptor instead. +func (*GetTableSpecRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{9} +} + +func (x *GetTableSpecRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetTableSpecRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +// Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. +type ListTableSpecsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the dataset to list table specs from. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Mask specifying which fields to read. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Filter expression, see go/filtering. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. The server can return fewer results than requested. + // If unspecified, the server will pick a default size. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying a page of results for the server to return. + // Typically obtained from the + // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous + // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTableSpecsRequest) Reset() { + *x = ListTableSpecsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTableSpecsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTableSpecsRequest) ProtoMessage() {} + +func (x *ListTableSpecsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTableSpecsRequest.ProtoReflect.Descriptor instead. +func (*ListTableSpecsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{10} +} + +func (x *ListTableSpecsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTableSpecsRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +func (x *ListTableSpecsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListTableSpecsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTableSpecsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. +type ListTableSpecsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The table specs read. + TableSpecs []*TableSpec `protobuf:"bytes,1,rep,name=table_specs,json=tableSpecs,proto3" json:"table_specs,omitempty"` + // A token to retrieve next page of results. + // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTableSpecsResponse) Reset() { + *x = ListTableSpecsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTableSpecsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTableSpecsResponse) ProtoMessage() {} + +func (x *ListTableSpecsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTableSpecsResponse.ProtoReflect.Descriptor instead. +func (*ListTableSpecsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{11} +} + +func (x *ListTableSpecsResponse) GetTableSpecs() []*TableSpec { + if x != nil { + return x.TableSpecs + } + return nil +} + +func (x *ListTableSpecsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec] +type UpdateTableSpecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The table spec which replaces the resource on the server. + TableSpec *TableSpec `protobuf:"bytes,1,opt,name=table_spec,json=tableSpec,proto3" json:"table_spec,omitempty"` + // The update mask applies to the resource. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateTableSpecRequest) Reset() { + *x = UpdateTableSpecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTableSpecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTableSpecRequest) ProtoMessage() {} + +func (x *UpdateTableSpecRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTableSpecRequest.ProtoReflect.Descriptor instead. +func (*UpdateTableSpecRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateTableSpecRequest) GetTableSpec() *TableSpec { + if x != nil { + return x.TableSpec + } + return nil +} + +func (x *UpdateTableSpecRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec]. +type GetColumnSpecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the column spec to retrieve. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Mask specifying which fields to read. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` +} + +func (x *GetColumnSpecRequest) Reset() { + *x = GetColumnSpecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetColumnSpecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetColumnSpecRequest) ProtoMessage() {} + +func (x *GetColumnSpecRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetColumnSpecRequest.ProtoReflect.Descriptor instead. +func (*GetColumnSpecRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{13} +} + +func (x *GetColumnSpecRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetColumnSpecRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +// Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. +type ListColumnSpecsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the table spec to list column specs from. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Mask specifying which fields to read. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Filter expression, see go/filtering. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. The server can return fewer results than requested. + // If unspecified, the server will pick a default size. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying a page of results for the server to return. + // Typically obtained from the + // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous + // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListColumnSpecsRequest) Reset() { + *x = ListColumnSpecsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListColumnSpecsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListColumnSpecsRequest) ProtoMessage() {} + +func (x *ListColumnSpecsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListColumnSpecsRequest.ProtoReflect.Descriptor instead. +func (*ListColumnSpecsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{14} +} + +func (x *ListColumnSpecsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListColumnSpecsRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +func (x *ListColumnSpecsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListColumnSpecsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListColumnSpecsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. +type ListColumnSpecsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The column specs read. + ColumnSpecs []*ColumnSpec `protobuf:"bytes,1,rep,name=column_specs,json=columnSpecs,proto3" json:"column_specs,omitempty"` + // A token to retrieve next page of results. + // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListColumnSpecsResponse) Reset() { + *x = ListColumnSpecsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListColumnSpecsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListColumnSpecsResponse) ProtoMessage() {} + +func (x *ListColumnSpecsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListColumnSpecsResponse.ProtoReflect.Descriptor instead. +func (*ListColumnSpecsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{15} +} + +func (x *ListColumnSpecsResponse) GetColumnSpecs() []*ColumnSpec { + if x != nil { + return x.ColumnSpecs + } + return nil +} + +func (x *ListColumnSpecsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec] +type UpdateColumnSpecRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The column spec which replaces the resource on the server. + ColumnSpec *ColumnSpec `protobuf:"bytes,1,opt,name=column_spec,json=columnSpec,proto3" json:"column_spec,omitempty"` + // The update mask applies to the resource. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateColumnSpecRequest) Reset() { + *x = UpdateColumnSpecRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateColumnSpecRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateColumnSpecRequest) ProtoMessage() {} + +func (x *UpdateColumnSpecRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateColumnSpecRequest.ProtoReflect.Descriptor instead. +func (*UpdateColumnSpecRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateColumnSpecRequest) GetColumnSpec() *ColumnSpec { + if x != nil { + return x.ColumnSpec + } + return nil +} + +func (x *UpdateColumnSpecRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel]. +type CreateModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the parent project where the model is being created. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The model to create. + Model *Model `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` +} + +func (x *CreateModelRequest) Reset() { + *x = CreateModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateModelRequest) ProtoMessage() {} + +func (x *CreateModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateModelRequest.ProtoReflect.Descriptor instead. +func (*CreateModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateModelRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateModelRequest) GetModel() *Model { + if x != nil { + return x.Model + } + return nil +} + +// Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel]. +type GetModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the model. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetModelRequest) Reset() { + *x = GetModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetModelRequest) ProtoMessage() {} + +func (x *GetModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetModelRequest.ProtoReflect.Descriptor instead. +func (*GetModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{18} +} + +func (x *GetModelRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. +type ListModelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the project, from which to list the models. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // An expression for filtering the results of the request. + // + // - `model_metadata` - for existence of the case (e.g. + // `video_classification_model_metadata:*`). + // + // - `dataset_id` - for = or !=. Some examples of using the filter are: + // + // - `image_classification_model_metadata:*` --> The model has + // `image_classification_model_metadata`. + // + // - `dataset_id=5` --> The model was created from a dataset with ID 5. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying a page of results for the server to return + // Typically obtained via + // [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous + // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListModelsRequest) Reset() { + *x = ListModelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListModelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListModelsRequest) ProtoMessage() {} + +func (x *ListModelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListModelsRequest.ProtoReflect.Descriptor instead. +func (*ListModelsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{19} +} + +func (x *ListModelsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListModelsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListModelsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListModelsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. +type ListModelsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of models in the requested page. + Model []*Model `protobuf:"bytes,1,rep,name=model,proto3" json:"model,omitempty"` + // A token to retrieve next page of results. + // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.ListModelsRequest.page_token] to obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListModelsResponse) Reset() { + *x = ListModelsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListModelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListModelsResponse) ProtoMessage() {} + +func (x *ListModelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListModelsResponse.ProtoReflect.Descriptor instead. +func (*ListModelsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{20} +} + +func (x *ListModelsResponse) GetModel() []*Model { + if x != nil { + return x.Model + } + return nil +} + +func (x *ListModelsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel]. +type DeleteModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the model being deleted. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteModelRequest) Reset() { + *x = DeleteModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteModelRequest) ProtoMessage() {} + +func (x *DeleteModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteModelRequest.ProtoReflect.Descriptor instead. +func (*DeleteModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{21} +} + +func (x *DeleteModelRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel]. +type DeployModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The per-domain specific deployment parameters. + // + // Types that are assignable to ModelDeploymentMetadata: + // + // *DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata + // *DeployModelRequest_ImageClassificationModelDeploymentMetadata + ModelDeploymentMetadata isDeployModelRequest_ModelDeploymentMetadata `protobuf_oneof:"model_deployment_metadata"` + // Required. Resource name of the model to deploy. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeployModelRequest) Reset() { + *x = DeployModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployModelRequest) ProtoMessage() {} + +func (x *DeployModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployModelRequest.ProtoReflect.Descriptor instead. +func (*DeployModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{22} +} + +func (m *DeployModelRequest) GetModelDeploymentMetadata() isDeployModelRequest_ModelDeploymentMetadata { + if m != nil { + return m.ModelDeploymentMetadata + } + return nil +} + +func (x *DeployModelRequest) GetImageObjectDetectionModelDeploymentMetadata() *ImageObjectDetectionModelDeploymentMetadata { + if x, ok := x.GetModelDeploymentMetadata().(*DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata); ok { + return x.ImageObjectDetectionModelDeploymentMetadata + } + return nil +} + +func (x *DeployModelRequest) GetImageClassificationModelDeploymentMetadata() *ImageClassificationModelDeploymentMetadata { + if x, ok := x.GetModelDeploymentMetadata().(*DeployModelRequest_ImageClassificationModelDeploymentMetadata); ok { + return x.ImageClassificationModelDeploymentMetadata + } + return nil +} + +func (x *DeployModelRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type isDeployModelRequest_ModelDeploymentMetadata interface { + isDeployModelRequest_ModelDeploymentMetadata() +} + +type DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata struct { + // Model deployment metadata specific to Image Object Detection. + ImageObjectDetectionModelDeploymentMetadata *ImageObjectDetectionModelDeploymentMetadata `protobuf:"bytes,2,opt,name=image_object_detection_model_deployment_metadata,json=imageObjectDetectionModelDeploymentMetadata,proto3,oneof"` +} + +type DeployModelRequest_ImageClassificationModelDeploymentMetadata struct { + // Model deployment metadata specific to Image Classification. + ImageClassificationModelDeploymentMetadata *ImageClassificationModelDeploymentMetadata `protobuf:"bytes,4,opt,name=image_classification_model_deployment_metadata,json=imageClassificationModelDeploymentMetadata,proto3,oneof"` +} + +func (*DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata) isDeployModelRequest_ModelDeploymentMetadata() { +} + +func (*DeployModelRequest_ImageClassificationModelDeploymentMetadata) isDeployModelRequest_ModelDeploymentMetadata() { +} + +// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel]. +type UndeployModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the model to undeploy. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *UndeployModelRequest) Reset() { + *x = UndeployModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UndeployModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UndeployModelRequest) ProtoMessage() {} + +func (x *UndeployModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UndeployModelRequest.ProtoReflect.Descriptor instead. +func (*UndeployModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{23} +} + +func (x *UndeployModelRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]. +// Models need to be enabled for exporting, otherwise an error code will be +// returned. +type ExportModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the model to export. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The desired output location and configuration. + OutputConfig *ModelExportOutputConfig `protobuf:"bytes,3,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` +} + +func (x *ExportModelRequest) Reset() { + *x = ExportModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportModelRequest) ProtoMessage() {} + +func (x *ExportModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportModelRequest.ProtoReflect.Descriptor instead. +func (*ExportModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{24} +} + +func (x *ExportModelRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportModelRequest) GetOutputConfig() *ModelExportOutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +// Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples]. +type ExportEvaluatedExamplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the model whose evaluated examples are to + // be exported. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The desired output location and configuration. + OutputConfig *ExportEvaluatedExamplesOutputConfig `protobuf:"bytes,3,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` +} + +func (x *ExportEvaluatedExamplesRequest) Reset() { + *x = ExportEvaluatedExamplesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportEvaluatedExamplesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportEvaluatedExamplesRequest) ProtoMessage() {} + +func (x *ExportEvaluatedExamplesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportEvaluatedExamplesRequest.ProtoReflect.Descriptor instead. +func (*ExportEvaluatedExamplesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{25} +} + +func (x *ExportEvaluatedExamplesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportEvaluatedExamplesRequest) GetOutputConfig() *ExportEvaluatedExamplesOutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation]. +type GetModelEvaluationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name for the model evaluation. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetModelEvaluationRequest) Reset() { + *x = GetModelEvaluationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetModelEvaluationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetModelEvaluationRequest) ProtoMessage() {} + +func (x *GetModelEvaluationRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetModelEvaluationRequest.ProtoReflect.Descriptor instead. +func (*GetModelEvaluationRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{26} +} + +func (x *GetModelEvaluationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. +type ListModelEvaluationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the model to list the model evaluations for. + // If modelId is set as "-", this will list model evaluations from across all + // models of the parent location. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // An expression for filtering the results of the request. + // + // - `annotation_spec_id` - for =, != or existence. See example below for + // the last. + // + // Some examples of using the filter are: + // + // - `annotation_spec_id!=4` --> The model evaluation was done for + // annotation spec with ID different than 4. + // - `NOT annotation_spec_id:*` --> The model evaluation was done for + // aggregate of all annotation specs. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying a page of results for the server to return. + // Typically obtained via + // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListModelEvaluationsRequest) Reset() { + *x = ListModelEvaluationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListModelEvaluationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListModelEvaluationsRequest) ProtoMessage() {} + +func (x *ListModelEvaluationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListModelEvaluationsRequest.ProtoReflect.Descriptor instead. +func (*ListModelEvaluationsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{27} +} + +func (x *ListModelEvaluationsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListModelEvaluationsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListModelEvaluationsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListModelEvaluationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. +type ListModelEvaluationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of model evaluations in the requested page. + ModelEvaluation []*ModelEvaluation `protobuf:"bytes,1,rep,name=model_evaluation,json=modelEvaluation,proto3" json:"model_evaluation,omitempty"` + // A token to retrieve next page of results. + // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new + // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListModelEvaluationsResponse) Reset() { + *x = ListModelEvaluationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListModelEvaluationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListModelEvaluationsResponse) ProtoMessage() {} + +func (x *ListModelEvaluationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_service_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListModelEvaluationsResponse.ProtoReflect.Descriptor instead. +func (*ListModelEvaluationsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP(), []int{28} +} + +func (x *ListModelEvaluationsResponse) GetModelEvaluation() []*ModelEvaluation { + if x != nil { + return x.ModelEvaluation + } + return nil +} + +func (x *ListModelEvaluationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_google_cloud_automl_v1beta1_service_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_service_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x01, + 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x4e, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xac, + 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x80, 0x01, + 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x98, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x3b, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x51, 0x0a, 0x14, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa0, + 0x01, 0x0a, 0x11, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x50, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5c, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xe5, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x39, + 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x89, 0x01, + 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x16, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x8f, 0x01, + 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, + 0xe8, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x21, 0x0a, 0x1f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa5, 0x01, 0x0a, 0x17, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x22, 0x96, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x05, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x4a, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x76, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4d, 0x0a, 0x12, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xce, 0x03, 0x0a, 0x12, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0xb1, 0x01, 0x0a, 0x30, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x2b, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xad, 0x01, 0x0a, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x2a, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x1b, 0x0a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4f, 0x0a, 0x14, + 0x55, 0x6e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xad, 0x01, + 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5e, 0x0a, + 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc5, 0x01, + 0x0a, 0x1e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, + 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x37, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x6a, 0x0a, 0x0d, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9f, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xed, 0x27, 0x0a, 0x06, 0x41, 0x75, 0x74, + 0x6f, 0x4d, 0x6c, 0x12, 0xbd, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x53, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x31, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x3a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0xda, 0x41, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x12, 0xa4, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, + 0x12, 0x31, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0xbe, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, + 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x32, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0xda, 0x41, 0x07, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0xd0, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x33, 0x2a, 0x31, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x15, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xe6, 0x01, 0x0a, 0x0a, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x22, + 0x3c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x01, 0x2a, + 0xda, 0x41, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0xca, 0x41, 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0xe7, 0x01, 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x89, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x22, 0x3c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x12, 0x6e, 0x61, 0x6d, 0x65, + 0x2c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x41, + 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xcb, 0x01, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, + 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xca, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0xda, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x32, 0x49, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0xda, 0x41, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x12, 0xc8, 0x01, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0x5b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x2a, + 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x33, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, + 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xee, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x34, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0x7b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x67, 0x32, 0x58, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0b, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0xda, 0x41, 0x0b, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x12, 0xc9, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, + 0x2f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x3a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x2c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0xca, 0x41, 0x1a, 0x0a, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x9c, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x12, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x73, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0xca, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0xd4, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x75, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x36, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x15, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xda, 0x01, 0x0a, 0x0d, 0x55, 0x6e, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x77, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3d, 0x22, 0x38, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x3a, 0x01, + 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xe3, 0x01, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x83, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x36, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x12, 0x6e, 0x61, 0x6d, 0x65, + 0x2c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x41, + 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8c, 0x02, 0x0a, 0x17, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x22, 0x47, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x12, 0x6e, 0x61, 0x6d, 0x65, 0x2c, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x41, 0x2a, + 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xcd, 0x01, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x12, + 0x42, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x2a, 0x2f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe0, 0x01, 0x0a, 0x14, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, + 0x12, 0x42, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x1a, 0x49, 0xca, + 0x41, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xb2, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0b, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, + 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, + 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_service_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_service_proto_rawDescData = file_google_cloud_automl_v1beta1_service_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_service_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_service_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_service_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_service_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_google_cloud_automl_v1beta1_service_proto_goTypes = []interface{}{ + (*CreateDatasetRequest)(nil), // 0: google.cloud.automl.v1beta1.CreateDatasetRequest + (*GetDatasetRequest)(nil), // 1: google.cloud.automl.v1beta1.GetDatasetRequest + (*ListDatasetsRequest)(nil), // 2: google.cloud.automl.v1beta1.ListDatasetsRequest + (*ListDatasetsResponse)(nil), // 3: google.cloud.automl.v1beta1.ListDatasetsResponse + (*UpdateDatasetRequest)(nil), // 4: google.cloud.automl.v1beta1.UpdateDatasetRequest + (*DeleteDatasetRequest)(nil), // 5: google.cloud.automl.v1beta1.DeleteDatasetRequest + (*ImportDataRequest)(nil), // 6: google.cloud.automl.v1beta1.ImportDataRequest + (*ExportDataRequest)(nil), // 7: google.cloud.automl.v1beta1.ExportDataRequest + (*GetAnnotationSpecRequest)(nil), // 8: google.cloud.automl.v1beta1.GetAnnotationSpecRequest + (*GetTableSpecRequest)(nil), // 9: google.cloud.automl.v1beta1.GetTableSpecRequest + (*ListTableSpecsRequest)(nil), // 10: google.cloud.automl.v1beta1.ListTableSpecsRequest + (*ListTableSpecsResponse)(nil), // 11: google.cloud.automl.v1beta1.ListTableSpecsResponse + (*UpdateTableSpecRequest)(nil), // 12: google.cloud.automl.v1beta1.UpdateTableSpecRequest + (*GetColumnSpecRequest)(nil), // 13: google.cloud.automl.v1beta1.GetColumnSpecRequest + (*ListColumnSpecsRequest)(nil), // 14: google.cloud.automl.v1beta1.ListColumnSpecsRequest + (*ListColumnSpecsResponse)(nil), // 15: google.cloud.automl.v1beta1.ListColumnSpecsResponse + (*UpdateColumnSpecRequest)(nil), // 16: google.cloud.automl.v1beta1.UpdateColumnSpecRequest + (*CreateModelRequest)(nil), // 17: google.cloud.automl.v1beta1.CreateModelRequest + (*GetModelRequest)(nil), // 18: google.cloud.automl.v1beta1.GetModelRequest + (*ListModelsRequest)(nil), // 19: google.cloud.automl.v1beta1.ListModelsRequest + (*ListModelsResponse)(nil), // 20: google.cloud.automl.v1beta1.ListModelsResponse + (*DeleteModelRequest)(nil), // 21: google.cloud.automl.v1beta1.DeleteModelRequest + (*DeployModelRequest)(nil), // 22: google.cloud.automl.v1beta1.DeployModelRequest + (*UndeployModelRequest)(nil), // 23: google.cloud.automl.v1beta1.UndeployModelRequest + (*ExportModelRequest)(nil), // 24: google.cloud.automl.v1beta1.ExportModelRequest + (*ExportEvaluatedExamplesRequest)(nil), // 25: google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + (*GetModelEvaluationRequest)(nil), // 26: google.cloud.automl.v1beta1.GetModelEvaluationRequest + (*ListModelEvaluationsRequest)(nil), // 27: google.cloud.automl.v1beta1.ListModelEvaluationsRequest + (*ListModelEvaluationsResponse)(nil), // 28: google.cloud.automl.v1beta1.ListModelEvaluationsResponse + (*Dataset)(nil), // 29: google.cloud.automl.v1beta1.Dataset + (*fieldmaskpb.FieldMask)(nil), // 30: google.protobuf.FieldMask + (*InputConfig)(nil), // 31: google.cloud.automl.v1beta1.InputConfig + (*OutputConfig)(nil), // 32: google.cloud.automl.v1beta1.OutputConfig + (*TableSpec)(nil), // 33: google.cloud.automl.v1beta1.TableSpec + (*ColumnSpec)(nil), // 34: google.cloud.automl.v1beta1.ColumnSpec + (*Model)(nil), // 35: google.cloud.automl.v1beta1.Model + (*ImageObjectDetectionModelDeploymentMetadata)(nil), // 36: google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata + (*ImageClassificationModelDeploymentMetadata)(nil), // 37: google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + (*ModelExportOutputConfig)(nil), // 38: google.cloud.automl.v1beta1.ModelExportOutputConfig + (*ExportEvaluatedExamplesOutputConfig)(nil), // 39: google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + (*ModelEvaluation)(nil), // 40: google.cloud.automl.v1beta1.ModelEvaluation + (*longrunning.Operation)(nil), // 41: google.longrunning.Operation + (*AnnotationSpec)(nil), // 42: google.cloud.automl.v1beta1.AnnotationSpec +} +var file_google_cloud_automl_v1beta1_service_proto_depIdxs = []int32{ + 29, // 0: google.cloud.automl.v1beta1.CreateDatasetRequest.dataset:type_name -> google.cloud.automl.v1beta1.Dataset + 29, // 1: google.cloud.automl.v1beta1.ListDatasetsResponse.datasets:type_name -> google.cloud.automl.v1beta1.Dataset + 29, // 2: google.cloud.automl.v1beta1.UpdateDatasetRequest.dataset:type_name -> google.cloud.automl.v1beta1.Dataset + 30, // 3: google.cloud.automl.v1beta1.UpdateDatasetRequest.update_mask:type_name -> google.protobuf.FieldMask + 31, // 4: google.cloud.automl.v1beta1.ImportDataRequest.input_config:type_name -> google.cloud.automl.v1beta1.InputConfig + 32, // 5: google.cloud.automl.v1beta1.ExportDataRequest.output_config:type_name -> google.cloud.automl.v1beta1.OutputConfig + 30, // 6: google.cloud.automl.v1beta1.GetTableSpecRequest.field_mask:type_name -> google.protobuf.FieldMask + 30, // 7: google.cloud.automl.v1beta1.ListTableSpecsRequest.field_mask:type_name -> google.protobuf.FieldMask + 33, // 8: google.cloud.automl.v1beta1.ListTableSpecsResponse.table_specs:type_name -> google.cloud.automl.v1beta1.TableSpec + 33, // 9: google.cloud.automl.v1beta1.UpdateTableSpecRequest.table_spec:type_name -> google.cloud.automl.v1beta1.TableSpec + 30, // 10: google.cloud.automl.v1beta1.UpdateTableSpecRequest.update_mask:type_name -> google.protobuf.FieldMask + 30, // 11: google.cloud.automl.v1beta1.GetColumnSpecRequest.field_mask:type_name -> google.protobuf.FieldMask + 30, // 12: google.cloud.automl.v1beta1.ListColumnSpecsRequest.field_mask:type_name -> google.protobuf.FieldMask + 34, // 13: google.cloud.automl.v1beta1.ListColumnSpecsResponse.column_specs:type_name -> google.cloud.automl.v1beta1.ColumnSpec + 34, // 14: google.cloud.automl.v1beta1.UpdateColumnSpecRequest.column_spec:type_name -> google.cloud.automl.v1beta1.ColumnSpec + 30, // 15: google.cloud.automl.v1beta1.UpdateColumnSpecRequest.update_mask:type_name -> google.protobuf.FieldMask + 35, // 16: google.cloud.automl.v1beta1.CreateModelRequest.model:type_name -> google.cloud.automl.v1beta1.Model + 35, // 17: google.cloud.automl.v1beta1.ListModelsResponse.model:type_name -> google.cloud.automl.v1beta1.Model + 36, // 18: google.cloud.automl.v1beta1.DeployModelRequest.image_object_detection_model_deployment_metadata:type_name -> google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata + 37, // 19: google.cloud.automl.v1beta1.DeployModelRequest.image_classification_model_deployment_metadata:type_name -> google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata + 38, // 20: google.cloud.automl.v1beta1.ExportModelRequest.output_config:type_name -> google.cloud.automl.v1beta1.ModelExportOutputConfig + 39, // 21: google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.output_config:type_name -> google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig + 40, // 22: google.cloud.automl.v1beta1.ListModelEvaluationsResponse.model_evaluation:type_name -> google.cloud.automl.v1beta1.ModelEvaluation + 0, // 23: google.cloud.automl.v1beta1.AutoMl.CreateDataset:input_type -> google.cloud.automl.v1beta1.CreateDatasetRequest + 1, // 24: google.cloud.automl.v1beta1.AutoMl.GetDataset:input_type -> google.cloud.automl.v1beta1.GetDatasetRequest + 2, // 25: google.cloud.automl.v1beta1.AutoMl.ListDatasets:input_type -> google.cloud.automl.v1beta1.ListDatasetsRequest + 4, // 26: google.cloud.automl.v1beta1.AutoMl.UpdateDataset:input_type -> google.cloud.automl.v1beta1.UpdateDatasetRequest + 5, // 27: google.cloud.automl.v1beta1.AutoMl.DeleteDataset:input_type -> google.cloud.automl.v1beta1.DeleteDatasetRequest + 6, // 28: google.cloud.automl.v1beta1.AutoMl.ImportData:input_type -> google.cloud.automl.v1beta1.ImportDataRequest + 7, // 29: google.cloud.automl.v1beta1.AutoMl.ExportData:input_type -> google.cloud.automl.v1beta1.ExportDataRequest + 8, // 30: google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec:input_type -> google.cloud.automl.v1beta1.GetAnnotationSpecRequest + 9, // 31: google.cloud.automl.v1beta1.AutoMl.GetTableSpec:input_type -> google.cloud.automl.v1beta1.GetTableSpecRequest + 10, // 32: google.cloud.automl.v1beta1.AutoMl.ListTableSpecs:input_type -> google.cloud.automl.v1beta1.ListTableSpecsRequest + 12, // 33: google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec:input_type -> google.cloud.automl.v1beta1.UpdateTableSpecRequest + 13, // 34: google.cloud.automl.v1beta1.AutoMl.GetColumnSpec:input_type -> google.cloud.automl.v1beta1.GetColumnSpecRequest + 14, // 35: google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs:input_type -> google.cloud.automl.v1beta1.ListColumnSpecsRequest + 16, // 36: google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec:input_type -> google.cloud.automl.v1beta1.UpdateColumnSpecRequest + 17, // 37: google.cloud.automl.v1beta1.AutoMl.CreateModel:input_type -> google.cloud.automl.v1beta1.CreateModelRequest + 18, // 38: google.cloud.automl.v1beta1.AutoMl.GetModel:input_type -> google.cloud.automl.v1beta1.GetModelRequest + 19, // 39: google.cloud.automl.v1beta1.AutoMl.ListModels:input_type -> google.cloud.automl.v1beta1.ListModelsRequest + 21, // 40: google.cloud.automl.v1beta1.AutoMl.DeleteModel:input_type -> google.cloud.automl.v1beta1.DeleteModelRequest + 22, // 41: google.cloud.automl.v1beta1.AutoMl.DeployModel:input_type -> google.cloud.automl.v1beta1.DeployModelRequest + 23, // 42: google.cloud.automl.v1beta1.AutoMl.UndeployModel:input_type -> google.cloud.automl.v1beta1.UndeployModelRequest + 24, // 43: google.cloud.automl.v1beta1.AutoMl.ExportModel:input_type -> google.cloud.automl.v1beta1.ExportModelRequest + 25, // 44: google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples:input_type -> google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest + 26, // 45: google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation:input_type -> google.cloud.automl.v1beta1.GetModelEvaluationRequest + 27, // 46: google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations:input_type -> google.cloud.automl.v1beta1.ListModelEvaluationsRequest + 29, // 47: google.cloud.automl.v1beta1.AutoMl.CreateDataset:output_type -> google.cloud.automl.v1beta1.Dataset + 29, // 48: google.cloud.automl.v1beta1.AutoMl.GetDataset:output_type -> google.cloud.automl.v1beta1.Dataset + 3, // 49: google.cloud.automl.v1beta1.AutoMl.ListDatasets:output_type -> google.cloud.automl.v1beta1.ListDatasetsResponse + 29, // 50: google.cloud.automl.v1beta1.AutoMl.UpdateDataset:output_type -> google.cloud.automl.v1beta1.Dataset + 41, // 51: google.cloud.automl.v1beta1.AutoMl.DeleteDataset:output_type -> google.longrunning.Operation + 41, // 52: google.cloud.automl.v1beta1.AutoMl.ImportData:output_type -> google.longrunning.Operation + 41, // 53: google.cloud.automl.v1beta1.AutoMl.ExportData:output_type -> google.longrunning.Operation + 42, // 54: google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec:output_type -> google.cloud.automl.v1beta1.AnnotationSpec + 33, // 55: google.cloud.automl.v1beta1.AutoMl.GetTableSpec:output_type -> google.cloud.automl.v1beta1.TableSpec + 11, // 56: google.cloud.automl.v1beta1.AutoMl.ListTableSpecs:output_type -> google.cloud.automl.v1beta1.ListTableSpecsResponse + 33, // 57: google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec:output_type -> google.cloud.automl.v1beta1.TableSpec + 34, // 58: google.cloud.automl.v1beta1.AutoMl.GetColumnSpec:output_type -> google.cloud.automl.v1beta1.ColumnSpec + 15, // 59: google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs:output_type -> google.cloud.automl.v1beta1.ListColumnSpecsResponse + 34, // 60: google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec:output_type -> google.cloud.automl.v1beta1.ColumnSpec + 41, // 61: google.cloud.automl.v1beta1.AutoMl.CreateModel:output_type -> google.longrunning.Operation + 35, // 62: google.cloud.automl.v1beta1.AutoMl.GetModel:output_type -> google.cloud.automl.v1beta1.Model + 20, // 63: google.cloud.automl.v1beta1.AutoMl.ListModels:output_type -> google.cloud.automl.v1beta1.ListModelsResponse + 41, // 64: google.cloud.automl.v1beta1.AutoMl.DeleteModel:output_type -> google.longrunning.Operation + 41, // 65: google.cloud.automl.v1beta1.AutoMl.DeployModel:output_type -> google.longrunning.Operation + 41, // 66: google.cloud.automl.v1beta1.AutoMl.UndeployModel:output_type -> google.longrunning.Operation + 41, // 67: google.cloud.automl.v1beta1.AutoMl.ExportModel:output_type -> google.longrunning.Operation + 41, // 68: google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples:output_type -> google.longrunning.Operation + 40, // 69: google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation:output_type -> google.cloud.automl.v1beta1.ModelEvaluation + 28, // 70: google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations:output_type -> google.cloud.automl.v1beta1.ListModelEvaluationsResponse + 47, // [47:71] is the sub-list for method output_type + 23, // [23:47] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_service_proto_init() } +func file_google_cloud_automl_v1beta1_service_proto_init() { + if File_google_cloud_automl_v1beta1_service_proto != nil { + return + } + file_google_cloud_automl_v1beta1_annotation_payload_proto_init() + file_google_cloud_automl_v1beta1_annotation_spec_proto_init() + file_google_cloud_automl_v1beta1_column_spec_proto_init() + file_google_cloud_automl_v1beta1_dataset_proto_init() + file_google_cloud_automl_v1beta1_image_proto_init() + file_google_cloud_automl_v1beta1_io_proto_init() + file_google_cloud_automl_v1beta1_model_proto_init() + file_google_cloud_automl_v1beta1_model_evaluation_proto_init() + file_google_cloud_automl_v1beta1_operations_proto_init() + file_google_cloud_automl_v1beta1_table_spec_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDatasetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDatasetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAnnotationSpecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTableSpecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTableSpecsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTableSpecsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTableSpecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetColumnSpecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListColumnSpecsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListColumnSpecsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateColumnSpecRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListModelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListModelsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UndeployModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportEvaluatedExamplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetModelEvaluationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListModelEvaluationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListModelEvaluationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_service_proto_msgTypes[22].OneofWrappers = []interface{}{ + (*DeployModelRequest_ImageObjectDetectionModelDeploymentMetadata)(nil), + (*DeployModelRequest_ImageClassificationModelDeploymentMetadata)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 29, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_automl_v1beta1_service_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_service_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_service_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_service_proto = out.File + file_google_cloud_automl_v1beta1_service_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_service_proto_goTypes = nil + file_google_cloud_automl_v1beta1_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AutoMlClient is the client API for AutoMl service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AutoMlClient interface { + // Creates a dataset. + CreateDataset(ctx context.Context, in *CreateDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) + // Gets a dataset. + GetDataset(ctx context.Context, in *GetDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) + // Lists datasets in a project. + ListDatasets(ctx context.Context, in *ListDatasetsRequest, opts ...grpc.CallOption) (*ListDatasetsResponse, error) + // Updates a dataset. + UpdateDataset(ctx context.Context, in *UpdateDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) + // Deletes a dataset and all of its contents. + // Returns empty response in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + DeleteDataset(ctx context.Context, in *DeleteDatasetRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Imports data into a dataset. + // For Tables this method can only be called on an empty Dataset. + // + // For Tables: + // * A + // [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] + // + // parameter must be explicitly set. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Exports dataset's data to the provided output location. + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Gets an annotation spec. + GetAnnotationSpec(ctx context.Context, in *GetAnnotationSpecRequest, opts ...grpc.CallOption) (*AnnotationSpec, error) + // Gets a table spec. + GetTableSpec(ctx context.Context, in *GetTableSpecRequest, opts ...grpc.CallOption) (*TableSpec, error) + // Lists table specs in a dataset. + ListTableSpecs(ctx context.Context, in *ListTableSpecsRequest, opts ...grpc.CallOption) (*ListTableSpecsResponse, error) + // Updates a table spec. + UpdateTableSpec(ctx context.Context, in *UpdateTableSpecRequest, opts ...grpc.CallOption) (*TableSpec, error) + // Gets a column spec. + GetColumnSpec(ctx context.Context, in *GetColumnSpecRequest, opts ...grpc.CallOption) (*ColumnSpec, error) + // Lists column specs in a table spec. + ListColumnSpecs(ctx context.Context, in *ListColumnSpecsRequest, opts ...grpc.CallOption) (*ListColumnSpecsResponse, error) + // Updates a column spec. + UpdateColumnSpec(ctx context.Context, in *UpdateColumnSpecRequest, opts ...grpc.CallOption) (*ColumnSpec, error) + // Creates a model. + // Returns a Model in the [response][google.longrunning.Operation.response] + // field when it completes. + // When you create a model, several model evaluations are created for it: + // a global evaluation, and one evaluation for each annotation spec. + CreateModel(ctx context.Context, in *CreateModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Gets a model. + GetModel(ctx context.Context, in *GetModelRequest, opts ...grpc.CallOption) (*Model, error) + // Lists models. + ListModels(ctx context.Context, in *ListModelsRequest, opts ...grpc.CallOption) (*ListModelsResponse, error) + // Deletes a model. + // Returns `google.protobuf.Empty` in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + DeleteModel(ctx context.Context, in *DeleteModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Deploys a model. If a model is already deployed, deploying it with the + // same parameters has no effect. Deploying with different parametrs + // (as e.g. changing + // + // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + // + // will reset the deployment state without pausing the model's availability. + // + // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + // deployment automatically. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + DeployModel(ctx context.Context, in *DeployModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Undeploys a model. If the model is not deployed this method has no effect. + // + // Only applicable for Text Classification, Image Object Detection and Tables; + // all other domains manage deployment automatically. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + UndeployModel(ctx context.Context, in *UndeployModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Exports a trained, "export-able", model to a user specified Google Cloud + // Storage location. A model is considered export-able if and only if it has + // an export format defined for it in + // + // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ExportModel(ctx context.Context, in *ExportModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Exports examples on which the model was evaluated (i.e. which were in the + // TEST set of the dataset the model was created from), together with their + // ground truth annotations and the annotations created (predicted) by the + // model. + // The examples, ground truth and predictions are exported in the state + // they were at the moment the model was evaluated. + // + // This export is available only for 30 days since the model evaluation is + // created. + // + // Currently only available for Tables. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ExportEvaluatedExamples(ctx context.Context, in *ExportEvaluatedExamplesRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Gets a model evaluation. + GetModelEvaluation(ctx context.Context, in *GetModelEvaluationRequest, opts ...grpc.CallOption) (*ModelEvaluation, error) + // Lists model evaluations. + ListModelEvaluations(ctx context.Context, in *ListModelEvaluationsRequest, opts ...grpc.CallOption) (*ListModelEvaluationsResponse, error) +} + +type autoMlClient struct { + cc grpc.ClientConnInterface +} + +func NewAutoMlClient(cc grpc.ClientConnInterface) AutoMlClient { + return &autoMlClient{cc} +} + +func (c *autoMlClient) CreateDataset(ctx context.Context, in *CreateDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) { + out := new(Dataset) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/CreateDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) GetDataset(ctx context.Context, in *GetDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) { + out := new(Dataset) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/GetDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ListDatasets(ctx context.Context, in *ListDatasetsRequest, opts ...grpc.CallOption) (*ListDatasetsResponse, error) { + out := new(ListDatasetsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ListDatasets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) UpdateDataset(ctx context.Context, in *UpdateDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) { + out := new(Dataset) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/UpdateDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) DeleteDataset(ctx context.Context, in *DeleteDatasetRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/DeleteDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ImportData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ExportData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) GetAnnotationSpec(ctx context.Context, in *GetAnnotationSpecRequest, opts ...grpc.CallOption) (*AnnotationSpec, error) { + out := new(AnnotationSpec) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/GetAnnotationSpec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) GetTableSpec(ctx context.Context, in *GetTableSpecRequest, opts ...grpc.CallOption) (*TableSpec, error) { + out := new(TableSpec) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/GetTableSpec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ListTableSpecs(ctx context.Context, in *ListTableSpecsRequest, opts ...grpc.CallOption) (*ListTableSpecsResponse, error) { + out := new(ListTableSpecsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ListTableSpecs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) UpdateTableSpec(ctx context.Context, in *UpdateTableSpecRequest, opts ...grpc.CallOption) (*TableSpec, error) { + out := new(TableSpec) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/UpdateTableSpec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) GetColumnSpec(ctx context.Context, in *GetColumnSpecRequest, opts ...grpc.CallOption) (*ColumnSpec, error) { + out := new(ColumnSpec) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/GetColumnSpec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ListColumnSpecs(ctx context.Context, in *ListColumnSpecsRequest, opts ...grpc.CallOption) (*ListColumnSpecsResponse, error) { + out := new(ListColumnSpecsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ListColumnSpecs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) UpdateColumnSpec(ctx context.Context, in *UpdateColumnSpecRequest, opts ...grpc.CallOption) (*ColumnSpec, error) { + out := new(ColumnSpec) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/UpdateColumnSpec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) CreateModel(ctx context.Context, in *CreateModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/CreateModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) GetModel(ctx context.Context, in *GetModelRequest, opts ...grpc.CallOption) (*Model, error) { + out := new(Model) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/GetModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ListModels(ctx context.Context, in *ListModelsRequest, opts ...grpc.CallOption) (*ListModelsResponse, error) { + out := new(ListModelsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ListModels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) DeleteModel(ctx context.Context, in *DeleteModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/DeleteModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) DeployModel(ctx context.Context, in *DeployModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/DeployModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) UndeployModel(ctx context.Context, in *UndeployModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/UndeployModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ExportModel(ctx context.Context, in *ExportModelRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ExportModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ExportEvaluatedExamples(ctx context.Context, in *ExportEvaluatedExamplesRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ExportEvaluatedExamples", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) GetModelEvaluation(ctx context.Context, in *GetModelEvaluationRequest, opts ...grpc.CallOption) (*ModelEvaluation, error) { + out := new(ModelEvaluation) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/GetModelEvaluation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *autoMlClient) ListModelEvaluations(ctx context.Context, in *ListModelEvaluationsRequest, opts ...grpc.CallOption) (*ListModelEvaluationsResponse, error) { + out := new(ListModelEvaluationsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.AutoMl/ListModelEvaluations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AutoMlServer is the server API for AutoMl service. +type AutoMlServer interface { + // Creates a dataset. + CreateDataset(context.Context, *CreateDatasetRequest) (*Dataset, error) + // Gets a dataset. + GetDataset(context.Context, *GetDatasetRequest) (*Dataset, error) + // Lists datasets in a project. + ListDatasets(context.Context, *ListDatasetsRequest) (*ListDatasetsResponse, error) + // Updates a dataset. + UpdateDataset(context.Context, *UpdateDatasetRequest) (*Dataset, error) + // Deletes a dataset and all of its contents. + // Returns empty response in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + DeleteDataset(context.Context, *DeleteDatasetRequest) (*longrunning.Operation, error) + // Imports data into a dataset. + // For Tables this method can only be called on an empty Dataset. + // + // For Tables: + // * A + // [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] + // + // parameter must be explicitly set. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ImportData(context.Context, *ImportDataRequest) (*longrunning.Operation, error) + // Exports dataset's data to the provided output location. + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ExportData(context.Context, *ExportDataRequest) (*longrunning.Operation, error) + // Gets an annotation spec. + GetAnnotationSpec(context.Context, *GetAnnotationSpecRequest) (*AnnotationSpec, error) + // Gets a table spec. + GetTableSpec(context.Context, *GetTableSpecRequest) (*TableSpec, error) + // Lists table specs in a dataset. + ListTableSpecs(context.Context, *ListTableSpecsRequest) (*ListTableSpecsResponse, error) + // Updates a table spec. + UpdateTableSpec(context.Context, *UpdateTableSpecRequest) (*TableSpec, error) + // Gets a column spec. + GetColumnSpec(context.Context, *GetColumnSpecRequest) (*ColumnSpec, error) + // Lists column specs in a table spec. + ListColumnSpecs(context.Context, *ListColumnSpecsRequest) (*ListColumnSpecsResponse, error) + // Updates a column spec. + UpdateColumnSpec(context.Context, *UpdateColumnSpecRequest) (*ColumnSpec, error) + // Creates a model. + // Returns a Model in the [response][google.longrunning.Operation.response] + // field when it completes. + // When you create a model, several model evaluations are created for it: + // a global evaluation, and one evaluation for each annotation spec. + CreateModel(context.Context, *CreateModelRequest) (*longrunning.Operation, error) + // Gets a model. + GetModel(context.Context, *GetModelRequest) (*Model, error) + // Lists models. + ListModels(context.Context, *ListModelsRequest) (*ListModelsResponse, error) + // Deletes a model. + // Returns `google.protobuf.Empty` in the + // [response][google.longrunning.Operation.response] field when it completes, + // and `delete_details` in the + // [metadata][google.longrunning.Operation.metadata] field. + DeleteModel(context.Context, *DeleteModelRequest) (*longrunning.Operation, error) + // Deploys a model. If a model is already deployed, deploying it with the + // same parameters has no effect. Deploying with different parametrs + // (as e.g. changing + // + // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) + // + // will reset the deployment state without pausing the model's availability. + // + // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage + // deployment automatically. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + DeployModel(context.Context, *DeployModelRequest) (*longrunning.Operation, error) + // Undeploys a model. If the model is not deployed this method has no effect. + // + // Only applicable for Text Classification, Image Object Detection and Tables; + // all other domains manage deployment automatically. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + UndeployModel(context.Context, *UndeployModelRequest) (*longrunning.Operation, error) + // Exports a trained, "export-able", model to a user specified Google Cloud + // Storage location. A model is considered export-able if and only if it has + // an export format defined for it in + // + // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ExportModel(context.Context, *ExportModelRequest) (*longrunning.Operation, error) + // Exports examples on which the model was evaluated (i.e. which were in the + // TEST set of the dataset the model was created from), together with their + // ground truth annotations and the annotations created (predicted) by the + // model. + // The examples, ground truth and predictions are exported in the state + // they were at the moment the model was evaluated. + // + // This export is available only for 30 days since the model evaluation is + // created. + // + // Currently only available for Tables. + // + // Returns an empty response in the + // [response][google.longrunning.Operation.response] field when it completes. + ExportEvaluatedExamples(context.Context, *ExportEvaluatedExamplesRequest) (*longrunning.Operation, error) + // Gets a model evaluation. + GetModelEvaluation(context.Context, *GetModelEvaluationRequest) (*ModelEvaluation, error) + // Lists model evaluations. + ListModelEvaluations(context.Context, *ListModelEvaluationsRequest) (*ListModelEvaluationsResponse, error) +} + +// UnimplementedAutoMlServer can be embedded to have forward compatible implementations. +type UnimplementedAutoMlServer struct { +} + +func (*UnimplementedAutoMlServer) CreateDataset(context.Context, *CreateDatasetRequest) (*Dataset, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDataset not implemented") +} +func (*UnimplementedAutoMlServer) GetDataset(context.Context, *GetDatasetRequest) (*Dataset, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataset not implemented") +} +func (*UnimplementedAutoMlServer) ListDatasets(context.Context, *ListDatasetsRequest) (*ListDatasetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDatasets not implemented") +} +func (*UnimplementedAutoMlServer) UpdateDataset(context.Context, *UpdateDatasetRequest) (*Dataset, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDataset not implemented") +} +func (*UnimplementedAutoMlServer) DeleteDataset(context.Context, *DeleteDatasetRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDataset not implemented") +} +func (*UnimplementedAutoMlServer) ImportData(context.Context, *ImportDataRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportData not implemented") +} +func (*UnimplementedAutoMlServer) ExportData(context.Context, *ExportDataRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportData not implemented") +} +func (*UnimplementedAutoMlServer) GetAnnotationSpec(context.Context, *GetAnnotationSpecRequest) (*AnnotationSpec, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAnnotationSpec not implemented") +} +func (*UnimplementedAutoMlServer) GetTableSpec(context.Context, *GetTableSpecRequest) (*TableSpec, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTableSpec not implemented") +} +func (*UnimplementedAutoMlServer) ListTableSpecs(context.Context, *ListTableSpecsRequest) (*ListTableSpecsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTableSpecs not implemented") +} +func (*UnimplementedAutoMlServer) UpdateTableSpec(context.Context, *UpdateTableSpecRequest) (*TableSpec, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTableSpec not implemented") +} +func (*UnimplementedAutoMlServer) GetColumnSpec(context.Context, *GetColumnSpecRequest) (*ColumnSpec, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetColumnSpec not implemented") +} +func (*UnimplementedAutoMlServer) ListColumnSpecs(context.Context, *ListColumnSpecsRequest) (*ListColumnSpecsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListColumnSpecs not implemented") +} +func (*UnimplementedAutoMlServer) UpdateColumnSpec(context.Context, *UpdateColumnSpecRequest) (*ColumnSpec, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateColumnSpec not implemented") +} +func (*UnimplementedAutoMlServer) CreateModel(context.Context, *CreateModelRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateModel not implemented") +} +func (*UnimplementedAutoMlServer) GetModel(context.Context, *GetModelRequest) (*Model, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetModel not implemented") +} +func (*UnimplementedAutoMlServer) ListModels(context.Context, *ListModelsRequest) (*ListModelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListModels not implemented") +} +func (*UnimplementedAutoMlServer) DeleteModel(context.Context, *DeleteModelRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteModel not implemented") +} +func (*UnimplementedAutoMlServer) DeployModel(context.Context, *DeployModelRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployModel not implemented") +} +func (*UnimplementedAutoMlServer) UndeployModel(context.Context, *UndeployModelRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UndeployModel not implemented") +} +func (*UnimplementedAutoMlServer) ExportModel(context.Context, *ExportModelRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportModel not implemented") +} +func (*UnimplementedAutoMlServer) ExportEvaluatedExamples(context.Context, *ExportEvaluatedExamplesRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportEvaluatedExamples not implemented") +} +func (*UnimplementedAutoMlServer) GetModelEvaluation(context.Context, *GetModelEvaluationRequest) (*ModelEvaluation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetModelEvaluation not implemented") +} +func (*UnimplementedAutoMlServer) ListModelEvaluations(context.Context, *ListModelEvaluationsRequest) (*ListModelEvaluationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListModelEvaluations not implemented") +} + +func RegisterAutoMlServer(s *grpc.Server, srv AutoMlServer) { + s.RegisterService(&_AutoMl_serviceDesc, srv) +} + +func _AutoMl_CreateDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).CreateDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/CreateDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).CreateDataset(ctx, req.(*CreateDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_GetDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).GetDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/GetDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).GetDataset(ctx, req.(*GetDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ListDatasets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDatasetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ListDatasets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ListDatasets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ListDatasets(ctx, req.(*ListDatasetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_UpdateDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).UpdateDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/UpdateDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).UpdateDataset(ctx, req.(*UpdateDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_DeleteDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).DeleteDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/DeleteDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).DeleteDataset(ctx, req.(*DeleteDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ImportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ImportData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ImportData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ImportData(ctx, req.(*ImportDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ExportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ExportData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ExportData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ExportData(ctx, req.(*ExportDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_GetAnnotationSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAnnotationSpecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).GetAnnotationSpec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/GetAnnotationSpec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).GetAnnotationSpec(ctx, req.(*GetAnnotationSpecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_GetTableSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTableSpecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).GetTableSpec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/GetTableSpec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).GetTableSpec(ctx, req.(*GetTableSpecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ListTableSpecs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTableSpecsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ListTableSpecs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ListTableSpecs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ListTableSpecs(ctx, req.(*ListTableSpecsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_UpdateTableSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTableSpecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).UpdateTableSpec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/UpdateTableSpec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).UpdateTableSpec(ctx, req.(*UpdateTableSpecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_GetColumnSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetColumnSpecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).GetColumnSpec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/GetColumnSpec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).GetColumnSpec(ctx, req.(*GetColumnSpecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ListColumnSpecs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListColumnSpecsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ListColumnSpecs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ListColumnSpecs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ListColumnSpecs(ctx, req.(*ListColumnSpecsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_UpdateColumnSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateColumnSpecRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).UpdateColumnSpec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/UpdateColumnSpec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).UpdateColumnSpec(ctx, req.(*UpdateColumnSpecRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_CreateModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).CreateModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/CreateModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).CreateModel(ctx, req.(*CreateModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_GetModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).GetModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/GetModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).GetModel(ctx, req.(*GetModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ListModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListModelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ListModels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ListModels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ListModels(ctx, req.(*ListModelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_DeleteModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).DeleteModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/DeleteModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).DeleteModel(ctx, req.(*DeleteModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_DeployModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeployModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).DeployModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/DeployModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).DeployModel(ctx, req.(*DeployModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_UndeployModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UndeployModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).UndeployModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/UndeployModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).UndeployModel(ctx, req.(*UndeployModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ExportModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ExportModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ExportModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ExportModel(ctx, req.(*ExportModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ExportEvaluatedExamples_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportEvaluatedExamplesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ExportEvaluatedExamples(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ExportEvaluatedExamples", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ExportEvaluatedExamples(ctx, req.(*ExportEvaluatedExamplesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_GetModelEvaluation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetModelEvaluationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).GetModelEvaluation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/GetModelEvaluation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).GetModelEvaluation(ctx, req.(*GetModelEvaluationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AutoMl_ListModelEvaluations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListModelEvaluationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoMlServer).ListModelEvaluations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.automl.v1beta1.AutoMl/ListModelEvaluations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoMlServer).ListModelEvaluations(ctx, req.(*ListModelEvaluationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AutoMl_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.automl.v1beta1.AutoMl", + HandlerType: (*AutoMlServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDataset", + Handler: _AutoMl_CreateDataset_Handler, + }, + { + MethodName: "GetDataset", + Handler: _AutoMl_GetDataset_Handler, + }, + { + MethodName: "ListDatasets", + Handler: _AutoMl_ListDatasets_Handler, + }, + { + MethodName: "UpdateDataset", + Handler: _AutoMl_UpdateDataset_Handler, + }, + { + MethodName: "DeleteDataset", + Handler: _AutoMl_DeleteDataset_Handler, + }, + { + MethodName: "ImportData", + Handler: _AutoMl_ImportData_Handler, + }, + { + MethodName: "ExportData", + Handler: _AutoMl_ExportData_Handler, + }, + { + MethodName: "GetAnnotationSpec", + Handler: _AutoMl_GetAnnotationSpec_Handler, + }, + { + MethodName: "GetTableSpec", + Handler: _AutoMl_GetTableSpec_Handler, + }, + { + MethodName: "ListTableSpecs", + Handler: _AutoMl_ListTableSpecs_Handler, + }, + { + MethodName: "UpdateTableSpec", + Handler: _AutoMl_UpdateTableSpec_Handler, + }, + { + MethodName: "GetColumnSpec", + Handler: _AutoMl_GetColumnSpec_Handler, + }, + { + MethodName: "ListColumnSpecs", + Handler: _AutoMl_ListColumnSpecs_Handler, + }, + { + MethodName: "UpdateColumnSpec", + Handler: _AutoMl_UpdateColumnSpec_Handler, + }, + { + MethodName: "CreateModel", + Handler: _AutoMl_CreateModel_Handler, + }, + { + MethodName: "GetModel", + Handler: _AutoMl_GetModel_Handler, + }, + { + MethodName: "ListModels", + Handler: _AutoMl_ListModels_Handler, + }, + { + MethodName: "DeleteModel", + Handler: _AutoMl_DeleteModel_Handler, + }, + { + MethodName: "DeployModel", + Handler: _AutoMl_DeployModel_Handler, + }, + { + MethodName: "UndeployModel", + Handler: _AutoMl_UndeployModel_Handler, + }, + { + MethodName: "ExportModel", + Handler: _AutoMl_ExportModel_Handler, + }, + { + MethodName: "ExportEvaluatedExamples", + Handler: _AutoMl_ExportEvaluatedExamples_Handler, + }, + { + MethodName: "GetModelEvaluation", + Handler: _AutoMl_GetModelEvaluation_Handler, + }, + { + MethodName: "ListModelEvaluations", + Handler: _AutoMl_ListModelEvaluations_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/automl/v1beta1/service.proto", +} diff --git a/automl/apiv1beta1/automlpb/table_spec.pb.go b/automl/apiv1beta1/automlpb/table_spec.pb.go new file mode 100644 index 000000000000..8e7b62a43570 --- /dev/null +++ b/automl/apiv1beta1/automlpb/table_spec.pb.go @@ -0,0 +1,279 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/table_spec.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A specification of a relational table. +// The table's schema is represented via its child column specs. It is +// pre-populated as part of ImportData by schema inference algorithm, the +// version of which is a required parameter of ImportData InputConfig. +// Note: While working with a table, at times the schema may be +// inconsistent with the data in the table (e.g. string in a FLOAT64 column). +// The consistency validation is done upon creation of a model. +// Used by: +// - Tables +type TableSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name of the table spec. + // Form: + // + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // column_spec_id of the time column. Only used if the parent dataset's + // ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE + // and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and + // those in between to VALIDATE. + // Required type: TIMESTAMP. + // If both this column and ml_use_column are not set, then ML use of all rows + // will be assigned by AutoML. NOTE: Updates of this field will instantly + // affect any other users concurrently working with the dataset. + TimeColumnSpecId string `protobuf:"bytes,2,opt,name=time_column_spec_id,json=timeColumnSpecId,proto3" json:"time_column_spec_id,omitempty"` + // Output only. The number of rows (i.e. examples) in the table. + RowCount int64 `protobuf:"varint,3,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"` + // Output only. The number of valid rows (i.e. without values that don't match + // DataType-s of their columns). + ValidRowCount int64 `protobuf:"varint,4,opt,name=valid_row_count,json=validRowCount,proto3" json:"valid_row_count,omitempty"` + // Output only. The number of columns of the table. That is, the number of + // child ColumnSpec-s. + ColumnCount int64 `protobuf:"varint,7,opt,name=column_count,json=columnCount,proto3" json:"column_count,omitempty"` + // Output only. Input configs via which data currently residing in the table + // had been imported. + InputConfigs []*InputConfig `protobuf:"bytes,5,rep,name=input_configs,json=inputConfigs,proto3" json:"input_configs,omitempty"` + // Used to perform consistent read-modify-write updates. If not set, a blind + // "overwrite" update happens. + Etag string `protobuf:"bytes,6,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *TableSpec) Reset() { + *x = TableSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableSpec) ProtoMessage() {} + +func (x *TableSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TableSpec.ProtoReflect.Descriptor instead. +func (*TableSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_table_spec_proto_rawDescGZIP(), []int{0} +} + +func (x *TableSpec) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TableSpec) GetTimeColumnSpecId() string { + if x != nil { + return x.TimeColumnSpecId + } + return "" +} + +func (x *TableSpec) GetRowCount() int64 { + if x != nil { + return x.RowCount + } + return 0 +} + +func (x *TableSpec) GetValidRowCount() int64 { + if x != nil { + return x.ValidRowCount + } + return 0 +} + +func (x *TableSpec) GetColumnCount() int64 { + if x != nil { + return x.ColumnCount + } + return 0 +} + +func (x *TableSpec) GetInputConfigs() []*InputConfig { + if x != nil { + return x.InputConfigs + } + return nil +} + +func (x *TableSpec) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +var File_google_cloud_automl_v1beta1_table_spec_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_table_spec_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x03, 0x0a, + 0x09, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, + 0x0a, 0x13, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x69, 0x6d, + 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x3a, 0x78, 0xea, 0x41, 0x75, 0x0a, 0x1f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x52, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x7d, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, + 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_table_spec_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_table_spec_proto_rawDescData = file_google_cloud_automl_v1beta1_table_spec_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_table_spec_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_table_spec_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_table_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_table_spec_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_table_spec_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_table_spec_proto_goTypes = []interface{}{ + (*TableSpec)(nil), // 0: google.cloud.automl.v1beta1.TableSpec + (*InputConfig)(nil), // 1: google.cloud.automl.v1beta1.InputConfig +} +var file_google_cloud_automl_v1beta1_table_spec_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.TableSpec.input_configs:type_name -> google.cloud.automl.v1beta1.InputConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_table_spec_proto_init() } +func file_google_cloud_automl_v1beta1_table_spec_proto_init() { + if File_google_cloud_automl_v1beta1_table_spec_proto != nil { + return + } + file_google_cloud_automl_v1beta1_io_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_table_spec_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_table_spec_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_table_spec_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_table_spec_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_table_spec_proto = out.File + file_google_cloud_automl_v1beta1_table_spec_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_table_spec_proto_goTypes = nil + file_google_cloud_automl_v1beta1_table_spec_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/tables.pb.go b/automl/apiv1beta1/automlpb/tables.pb.go new file mode 100644 index 000000000000..0bfc9b3ae49b --- /dev/null +++ b/automl/apiv1beta1/automlpb/tables.pb.go @@ -0,0 +1,902 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/tables.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Metadata for a dataset used for AutoML Tables. +type TablesDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The table_spec_id of the primary table of this dataset. + PrimaryTableSpecId string `protobuf:"bytes,1,opt,name=primary_table_spec_id,json=primaryTableSpecId,proto3" json:"primary_table_spec_id,omitempty"` + // column_spec_id of the primary table's column that should be used as the + // training & prediction target. + // This column must be non-nullable and have one of following data types + // (otherwise model creation will error): + // + // * CATEGORY + // + // * FLOAT64 + // + // If the type is CATEGORY , only up to + // 100 unique values may exist in that column across all rows. + // + // NOTE: Updates of this field will instantly affect any other users + // concurrently working with the dataset. + TargetColumnSpecId string `protobuf:"bytes,2,opt,name=target_column_spec_id,json=targetColumnSpecId,proto3" json:"target_column_spec_id,omitempty"` + // column_spec_id of the primary table's column that should be used as the + // weight column, i.e. the higher the value the more important the row will be + // during model training. + // Required type: FLOAT64. + // Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is + // + // ignored for training. + // + // If not set all rows are assumed to have equal weight of 1. + // NOTE: Updates of this field will instantly affect any other users + // concurrently working with the dataset. + WeightColumnSpecId string `protobuf:"bytes,3,opt,name=weight_column_spec_id,json=weightColumnSpecId,proto3" json:"weight_column_spec_id,omitempty"` + // column_spec_id of the primary table column which specifies a possible ML + // use of the row, i.e. the column will be used to split the rows into TRAIN, + // VALIDATE and TEST sets. + // Required type: STRING. + // This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` + // among its values, or only have `TEST`, `UNASSIGNED` values. In the latter + // case the rows with `UNASSIGNED` value will be assigned by AutoML. Note + // that if a given ml use distribution makes it impossible to create a "good" + // model, that call will error describing the issue. + // If both this column_spec_id and primary table's time_column_spec_id are not + // set, then all rows are treated as `UNASSIGNED`. + // NOTE: Updates of this field will instantly affect any other users + // concurrently working with the dataset. + MlUseColumnSpecId string `protobuf:"bytes,4,opt,name=ml_use_column_spec_id,json=mlUseColumnSpecId,proto3" json:"ml_use_column_spec_id,omitempty"` + // Output only. Correlations between + // + // [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id], + // and other columns of the + // + // [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]. + // Only set if the target column is set. Mapping from other column spec id to + // its CorrelationStats with the target column. + // This field may be stale, see the stats_update_time field for + // for the timestamp at which these stats were last updated. + TargetColumnCorrelations map[string]*CorrelationStats `protobuf:"bytes,6,rep,name=target_column_correlations,json=targetColumnCorrelations,proto3" json:"target_column_correlations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Output only. The most recent timestamp when target_column_correlations + // field and all descendant ColumnSpec.data_stats and + // ColumnSpec.top_correlated_columns fields were last (re-)generated. Any + // changes that happened to the dataset afterwards are not reflected in these + // fields values. The regeneration happens in the background on a best effort + // basis. + StatsUpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=stats_update_time,json=statsUpdateTime,proto3" json:"stats_update_time,omitempty"` +} + +func (x *TablesDatasetMetadata) Reset() { + *x = TablesDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TablesDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TablesDatasetMetadata) ProtoMessage() {} + +func (x *TablesDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TablesDatasetMetadata.ProtoReflect.Descriptor instead. +func (*TablesDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_tables_proto_rawDescGZIP(), []int{0} +} + +func (x *TablesDatasetMetadata) GetPrimaryTableSpecId() string { + if x != nil { + return x.PrimaryTableSpecId + } + return "" +} + +func (x *TablesDatasetMetadata) GetTargetColumnSpecId() string { + if x != nil { + return x.TargetColumnSpecId + } + return "" +} + +func (x *TablesDatasetMetadata) GetWeightColumnSpecId() string { + if x != nil { + return x.WeightColumnSpecId + } + return "" +} + +func (x *TablesDatasetMetadata) GetMlUseColumnSpecId() string { + if x != nil { + return x.MlUseColumnSpecId + } + return "" +} + +func (x *TablesDatasetMetadata) GetTargetColumnCorrelations() map[string]*CorrelationStats { + if x != nil { + return x.TargetColumnCorrelations + } + return nil +} + +func (x *TablesDatasetMetadata) GetStatsUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.StatsUpdateTime + } + return nil +} + +// Model metadata specific to AutoML Tables. +type TablesModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Additional optimization objective configuration. Required for + // `MAXIMIZE_PRECISION_AT_RECALL` and `MAXIMIZE_RECALL_AT_PRECISION`, + // otherwise unused. + // + // Types that are assignable to AdditionalOptimizationObjectiveConfig: + // + // *TablesModelMetadata_OptimizationObjectiveRecallValue + // *TablesModelMetadata_OptimizationObjectivePrecisionValue + AdditionalOptimizationObjectiveConfig isTablesModelMetadata_AdditionalOptimizationObjectiveConfig `protobuf_oneof:"additional_optimization_objective_config"` + // Column spec of the dataset's primary table's column the model is + // predicting. Snapshotted when model creation started. + // Only 3 fields are used: + // name - May be set on CreateModel, if it's not then the ColumnSpec + // + // corresponding to the current target_column_spec_id of the dataset + // the model is trained from is used. + // If neither is set, CreateModel will error. + // + // display_name - Output only. + // data_type - Output only. + TargetColumnSpec *ColumnSpec `protobuf:"bytes,2,opt,name=target_column_spec,json=targetColumnSpec,proto3" json:"target_column_spec,omitempty"` + // Column specs of the dataset's primary table's columns, on which + // the model is trained and which are used as the input for predictions. + // The + // + // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] + // as well as, according to dataset's state upon model creation, + // + // [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id], + // and + // + // [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id] + // must never be included here. + // + // Only 3 fields are used: + // + // - name - May be set on CreateModel, if set only the columns specified are + // used, otherwise all primary table's columns (except the ones listed + // above) are used for the training and prediction input. + // + // * display_name - Output only. + // + // * data_type - Output only. + InputFeatureColumnSpecs []*ColumnSpec `protobuf:"bytes,3,rep,name=input_feature_column_specs,json=inputFeatureColumnSpecs,proto3" json:"input_feature_column_specs,omitempty"` + // Objective function the model is optimizing towards. The training process + // creates a model that maximizes/minimizes the value of the objective + // function over the validation set. + // + // The supported optimization objectives depend on the prediction type. + // If the field is not set, a default objective function is used. + // + // CLASSIFICATION_BINARY: + // + // "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver + // operating characteristic (ROC) curve. + // "MINIMIZE_LOG_LOSS" - Minimize log loss. + // "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. + // "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified + // recall value. + // "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified + // precision value. + // + // CLASSIFICATION_MULTI_CLASS : + // + // "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. + // + // REGRESSION: + // + // "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). + // "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). + // "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). + OptimizationObjective string `protobuf:"bytes,4,opt,name=optimization_objective,json=optimizationObjective,proto3" json:"optimization_objective,omitempty"` + // Output only. Auxiliary information for each of the + // input_feature_column_specs with respect to this particular model. + TablesModelColumnInfo []*TablesModelColumnInfo `protobuf:"bytes,5,rep,name=tables_model_column_info,json=tablesModelColumnInfo,proto3" json:"tables_model_column_info,omitempty"` + // Required. The train budget of creating this model, expressed in milli node + // hours i.e. 1,000 value in this field means 1 node hour. + // + // The training cost of the model will not exceed this budget. The final cost + // will be attempted to be close to the budget, though may end up being (even) + // noticeably smaller - at the backend's discretion. This especially may + // happen when further model training ceases to provide any improvements. + // + // If the budget is set to a value known to be insufficient to train a + // model for the given dataset, the training won't be attempted and + // will error. + // + // The train budget must be between 1,000 and 72,000 milli node hours, + // inclusive. + TrainBudgetMilliNodeHours int64 `protobuf:"varint,6,opt,name=train_budget_milli_node_hours,json=trainBudgetMilliNodeHours,proto3" json:"train_budget_milli_node_hours,omitempty"` + // Output only. The actual training cost of the model, expressed in milli + // node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed + // to not exceed the train budget. + TrainCostMilliNodeHours int64 `protobuf:"varint,7,opt,name=train_cost_milli_node_hours,json=trainCostMilliNodeHours,proto3" json:"train_cost_milli_node_hours,omitempty"` + // Use the entire training budget. This disables the early stopping feature. + // By default, the early stopping feature is enabled, which means that AutoML + // Tables might stop training before the entire training budget has been used. + DisableEarlyStopping bool `protobuf:"varint,12,opt,name=disable_early_stopping,json=disableEarlyStopping,proto3" json:"disable_early_stopping,omitempty"` +} + +func (x *TablesModelMetadata) Reset() { + *x = TablesModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TablesModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TablesModelMetadata) ProtoMessage() {} + +func (x *TablesModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TablesModelMetadata.ProtoReflect.Descriptor instead. +func (*TablesModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_tables_proto_rawDescGZIP(), []int{1} +} + +func (m *TablesModelMetadata) GetAdditionalOptimizationObjectiveConfig() isTablesModelMetadata_AdditionalOptimizationObjectiveConfig { + if m != nil { + return m.AdditionalOptimizationObjectiveConfig + } + return nil +} + +func (x *TablesModelMetadata) GetOptimizationObjectiveRecallValue() float32 { + if x, ok := x.GetAdditionalOptimizationObjectiveConfig().(*TablesModelMetadata_OptimizationObjectiveRecallValue); ok { + return x.OptimizationObjectiveRecallValue + } + return 0 +} + +func (x *TablesModelMetadata) GetOptimizationObjectivePrecisionValue() float32 { + if x, ok := x.GetAdditionalOptimizationObjectiveConfig().(*TablesModelMetadata_OptimizationObjectivePrecisionValue); ok { + return x.OptimizationObjectivePrecisionValue + } + return 0 +} + +func (x *TablesModelMetadata) GetTargetColumnSpec() *ColumnSpec { + if x != nil { + return x.TargetColumnSpec + } + return nil +} + +func (x *TablesModelMetadata) GetInputFeatureColumnSpecs() []*ColumnSpec { + if x != nil { + return x.InputFeatureColumnSpecs + } + return nil +} + +func (x *TablesModelMetadata) GetOptimizationObjective() string { + if x != nil { + return x.OptimizationObjective + } + return "" +} + +func (x *TablesModelMetadata) GetTablesModelColumnInfo() []*TablesModelColumnInfo { + if x != nil { + return x.TablesModelColumnInfo + } + return nil +} + +func (x *TablesModelMetadata) GetTrainBudgetMilliNodeHours() int64 { + if x != nil { + return x.TrainBudgetMilliNodeHours + } + return 0 +} + +func (x *TablesModelMetadata) GetTrainCostMilliNodeHours() int64 { + if x != nil { + return x.TrainCostMilliNodeHours + } + return 0 +} + +func (x *TablesModelMetadata) GetDisableEarlyStopping() bool { + if x != nil { + return x.DisableEarlyStopping + } + return false +} + +type isTablesModelMetadata_AdditionalOptimizationObjectiveConfig interface { + isTablesModelMetadata_AdditionalOptimizationObjectiveConfig() +} + +type TablesModelMetadata_OptimizationObjectiveRecallValue struct { + // Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". + // Must be between 0 and 1, inclusive. + OptimizationObjectiveRecallValue float32 `protobuf:"fixed32,17,opt,name=optimization_objective_recall_value,json=optimizationObjectiveRecallValue,proto3,oneof"` +} + +type TablesModelMetadata_OptimizationObjectivePrecisionValue struct { + // Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". + // Must be between 0 and 1, inclusive. + OptimizationObjectivePrecisionValue float32 `protobuf:"fixed32,18,opt,name=optimization_objective_precision_value,json=optimizationObjectivePrecisionValue,proto3,oneof"` +} + +func (*TablesModelMetadata_OptimizationObjectiveRecallValue) isTablesModelMetadata_AdditionalOptimizationObjectiveConfig() { +} + +func (*TablesModelMetadata_OptimizationObjectivePrecisionValue) isTablesModelMetadata_AdditionalOptimizationObjectiveConfig() { +} + +// Contains annotation details specific to Tables. +type TablesAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher + // value means greater confidence in the returned value. + // For + // + // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] + // of FLOAT64 data type the score is not populated. + Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"` + // Output only. Only populated when + // + // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] + // has FLOAT64 data type. An interval in which the exactly correct target + // value has 95% chance to be in. + PredictionInterval *DoubleRange `protobuf:"bytes,4,opt,name=prediction_interval,json=predictionInterval,proto3" json:"prediction_interval,omitempty"` + // The predicted value of the row's + // + // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]. + // The value depends on the column's DataType: + // + // - CATEGORY - the predicted (with the above confidence `score`) CATEGORY + // value. + // + // * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. + Value *structpb.Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // Output only. Auxiliary information for each of the model's + // + // [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] + // with respect to this particular prediction. + // If no other fields than + // + // [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name] + // and + // + // [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name] + // would be populated, then this whole field is not. + TablesModelColumnInfo []*TablesModelColumnInfo `protobuf:"bytes,3,rep,name=tables_model_column_info,json=tablesModelColumnInfo,proto3" json:"tables_model_column_info,omitempty"` + // Output only. Stores the prediction score for the baseline example, which + // is defined as the example with all values set to their baseline values. + // This is used as part of the Sampled Shapley explanation of the model's + // prediction. This field is populated only when feature importance is + // requested. For regression models, this holds the baseline prediction for + // the baseline example. For classification models, this holds the baseline + // prediction for the baseline example for the argmax class. + BaselineScore float32 `protobuf:"fixed32,5,opt,name=baseline_score,json=baselineScore,proto3" json:"baseline_score,omitempty"` +} + +func (x *TablesAnnotation) Reset() { + *x = TablesAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TablesAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TablesAnnotation) ProtoMessage() {} + +func (x *TablesAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TablesAnnotation.ProtoReflect.Descriptor instead. +func (*TablesAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_tables_proto_rawDescGZIP(), []int{2} +} + +func (x *TablesAnnotation) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *TablesAnnotation) GetPredictionInterval() *DoubleRange { + if x != nil { + return x.PredictionInterval + } + return nil +} + +func (x *TablesAnnotation) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *TablesAnnotation) GetTablesModelColumnInfo() []*TablesModelColumnInfo { + if x != nil { + return x.TablesModelColumnInfo + } + return nil +} + +func (x *TablesAnnotation) GetBaselineScore() float32 { + if x != nil { + return x.BaselineScore + } + return 0 +} + +// An information specific to given column and Tables Model, in context +// of the Model and the predictions created by it. +type TablesModelColumnInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The name of the ColumnSpec describing the column. Not + // populated when this proto is outputted to BigQuery. + ColumnSpecName string `protobuf:"bytes,1,opt,name=column_spec_name,json=columnSpecName,proto3" json:"column_spec_name,omitempty"` + // Output only. The display name of the column (same as the display_name of + // its ColumnSpec). + ColumnDisplayName string `protobuf:"bytes,2,opt,name=column_display_name,json=columnDisplayName,proto3" json:"column_display_name,omitempty"` + // Output only. When given as part of a Model (always populated): + // Measurement of how much model predictions correctness on the TEST data + // depend on values in this column. A value between 0 and 1, higher means + // higher influence. These values are normalized - for all input feature + // columns of a given model they add to 1. + // + // When given back by Predict (populated iff + // [feature_importance + // param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch + // Predict (populated iff + // [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params] + // param is set): + // Measurement of how impactful for the prediction returned for the given row + // the value in this column was. Specifically, the feature importance + // specifies the marginal contribution that the feature made to the prediction + // score compared to the baseline score. These values are computed using the + // Sampled Shapley method. + FeatureImportance float32 `protobuf:"fixed32,3,opt,name=feature_importance,json=featureImportance,proto3" json:"feature_importance,omitempty"` +} + +func (x *TablesModelColumnInfo) Reset() { + *x = TablesModelColumnInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TablesModelColumnInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TablesModelColumnInfo) ProtoMessage() {} + +func (x *TablesModelColumnInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TablesModelColumnInfo.ProtoReflect.Descriptor instead. +func (*TablesModelColumnInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_tables_proto_rawDescGZIP(), []int{3} +} + +func (x *TablesModelColumnInfo) GetColumnSpecName() string { + if x != nil { + return x.ColumnSpecName + } + return "" +} + +func (x *TablesModelColumnInfo) GetColumnDisplayName() string { + if x != nil { + return x.ColumnDisplayName + } + return "" +} + +func (x *TablesModelColumnInfo) GetFeatureImportance() float32 { + if x != nil { + return x.FeatureImportance + } + return 0 +} + +var File_google_cloud_automl_v1beta1_tables_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_tables_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, + 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x04, 0x0a, 0x15, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x31, 0x0a, 0x15, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x15, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x15, 0x6d, 0x6c, + 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x6c, 0x55, 0x73, 0x65, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x49, 0x64, 0x12, 0x8e, 0x01, 0x0a, + 0x1a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x63, + 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x50, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x18, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, + 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x1d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x80, 0x06, 0x0a, 0x13, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4f, 0x0a, 0x23, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, + 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x55, 0x0a, 0x26, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x23, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x50, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x55, 0x0a, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x64, 0x0a, 0x1a, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x35, + 0x0a, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x6b, 0x0a, 0x18, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x1d, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x62, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x68, 0x6f, + 0x75, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x48, + 0x6f, 0x75, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x1b, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, + 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x68, 0x6f, + 0x75, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x43, 0x6f, 0x73, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x6f, 0x75, + 0x72, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x61, + 0x72, 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, + 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x2a, 0x0a, 0x28, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc5, 0x02, 0x0a, 0x10, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, + 0x59, 0x0a, 0x13, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x6b, 0x0a, 0x18, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x62, + 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xa0, 0x01, 0x0a, + 0x15, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2d, 0x0a, 0x12, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, + 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, + 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_tables_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_tables_proto_rawDescData = file_google_cloud_automl_v1beta1_tables_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_tables_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_tables_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_tables_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_tables_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_tables_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_tables_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_automl_v1beta1_tables_proto_goTypes = []interface{}{ + (*TablesDatasetMetadata)(nil), // 0: google.cloud.automl.v1beta1.TablesDatasetMetadata + (*TablesModelMetadata)(nil), // 1: google.cloud.automl.v1beta1.TablesModelMetadata + (*TablesAnnotation)(nil), // 2: google.cloud.automl.v1beta1.TablesAnnotation + (*TablesModelColumnInfo)(nil), // 3: google.cloud.automl.v1beta1.TablesModelColumnInfo + nil, // 4: google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*ColumnSpec)(nil), // 6: google.cloud.automl.v1beta1.ColumnSpec + (*DoubleRange)(nil), // 7: google.cloud.automl.v1beta1.DoubleRange + (*structpb.Value)(nil), // 8: google.protobuf.Value + (*CorrelationStats)(nil), // 9: google.cloud.automl.v1beta1.CorrelationStats +} +var file_google_cloud_automl_v1beta1_tables_proto_depIdxs = []int32{ + 4, // 0: google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_correlations:type_name -> google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry + 5, // 1: google.cloud.automl.v1beta1.TablesDatasetMetadata.stats_update_time:type_name -> google.protobuf.Timestamp + 6, // 2: google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec:type_name -> google.cloud.automl.v1beta1.ColumnSpec + 6, // 3: google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs:type_name -> google.cloud.automl.v1beta1.ColumnSpec + 3, // 4: google.cloud.automl.v1beta1.TablesModelMetadata.tables_model_column_info:type_name -> google.cloud.automl.v1beta1.TablesModelColumnInfo + 7, // 5: google.cloud.automl.v1beta1.TablesAnnotation.prediction_interval:type_name -> google.cloud.automl.v1beta1.DoubleRange + 8, // 6: google.cloud.automl.v1beta1.TablesAnnotation.value:type_name -> google.protobuf.Value + 3, // 7: google.cloud.automl.v1beta1.TablesAnnotation.tables_model_column_info:type_name -> google.cloud.automl.v1beta1.TablesModelColumnInfo + 9, // 8: google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry.value:type_name -> google.cloud.automl.v1beta1.CorrelationStats + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_tables_proto_init() } +func file_google_cloud_automl_v1beta1_tables_proto_init() { + if File_google_cloud_automl_v1beta1_tables_proto != nil { + return + } + file_google_cloud_automl_v1beta1_classification_proto_init() + file_google_cloud_automl_v1beta1_column_spec_proto_init() + file_google_cloud_automl_v1beta1_data_items_proto_init() + file_google_cloud_automl_v1beta1_data_stats_proto_init() + file_google_cloud_automl_v1beta1_ranges_proto_init() + file_google_cloud_automl_v1beta1_regression_proto_init() + file_google_cloud_automl_v1beta1_temporal_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_tables_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TablesDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TablesModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_tables_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TablesAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_tables_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TablesModelColumnInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_tables_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*TablesModelMetadata_OptimizationObjectiveRecallValue)(nil), + (*TablesModelMetadata_OptimizationObjectivePrecisionValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_tables_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_tables_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_tables_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_tables_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_tables_proto = out.File + file_google_cloud_automl_v1beta1_tables_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_tables_proto_goTypes = nil + file_google_cloud_automl_v1beta1_tables_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/temporal.pb.go b/automl/apiv1beta1/automlpb/temporal.pb.go new file mode 100644 index 000000000000..85f53d7fa2ef --- /dev/null +++ b/automl/apiv1beta1/automlpb/temporal.pb.go @@ -0,0 +1,196 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/temporal.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A time period inside of an example that has a time dimension (e.g. video). +type TimeSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start of the time segment (inclusive), represented as the duration since + // the example start. + StartTimeOffset *durationpb.Duration `protobuf:"bytes,1,opt,name=start_time_offset,json=startTimeOffset,proto3" json:"start_time_offset,omitempty"` + // End of the time segment (exclusive), represented as the duration since the + // example start. + EndTimeOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=end_time_offset,json=endTimeOffset,proto3" json:"end_time_offset,omitempty"` +} + +func (x *TimeSegment) Reset() { + *x = TimeSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeSegment) ProtoMessage() {} + +func (x *TimeSegment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeSegment.ProtoReflect.Descriptor instead. +func (*TimeSegment) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_temporal_proto_rawDescGZIP(), []int{0} +} + +func (x *TimeSegment) GetStartTimeOffset() *durationpb.Duration { + if x != nil { + return x.StartTimeOffset + } + return nil +} + +func (x *TimeSegment) GetEndTimeOffset() *durationpb.Duration { + if x != nil { + return x.EndTimeOffset + } + return nil +} + +var File_google_cloud_automl_v1beta1_temporal_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_temporal_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, + 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x54, 0x69, + 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x42, 0xa5, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, + 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, + 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_temporal_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_temporal_proto_rawDescData = file_google_cloud_automl_v1beta1_temporal_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_temporal_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_temporal_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_temporal_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_temporal_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_temporal_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_temporal_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_temporal_proto_goTypes = []interface{}{ + (*TimeSegment)(nil), // 0: google.cloud.automl.v1beta1.TimeSegment + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} +var file_google_cloud_automl_v1beta1_temporal_proto_depIdxs = []int32{ + 1, // 0: google.cloud.automl.v1beta1.TimeSegment.start_time_offset:type_name -> google.protobuf.Duration + 1, // 1: google.cloud.automl.v1beta1.TimeSegment.end_time_offset:type_name -> google.protobuf.Duration + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_temporal_proto_init() } +func file_google_cloud_automl_v1beta1_temporal_proto_init() { + if File_google_cloud_automl_v1beta1_temporal_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_temporal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_temporal_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_temporal_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_temporal_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_temporal_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_temporal_proto = out.File + file_google_cloud_automl_v1beta1_temporal_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_temporal_proto_goTypes = nil + file_google_cloud_automl_v1beta1_temporal_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/text.pb.go b/automl/apiv1beta1/automlpb/text.pb.go new file mode 100644 index 000000000000..49fbdc57e116 --- /dev/null +++ b/automl/apiv1beta1/automlpb/text.pb.go @@ -0,0 +1,506 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/text.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Dataset metadata for classification. +type TextClassificationDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Type of the classification problem. + ClassificationType ClassificationType `protobuf:"varint,1,opt,name=classification_type,json=classificationType,proto3,enum=google.cloud.automl.v1beta1.ClassificationType" json:"classification_type,omitempty"` +} + +func (x *TextClassificationDatasetMetadata) Reset() { + *x = TextClassificationDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextClassificationDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextClassificationDatasetMetadata) ProtoMessage() {} + +func (x *TextClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextClassificationDatasetMetadata.ProtoReflect.Descriptor instead. +func (*TextClassificationDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP(), []int{0} +} + +func (x *TextClassificationDatasetMetadata) GetClassificationType() ClassificationType { + if x != nil { + return x.ClassificationType + } + return ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED +} + +// Model metadata that is specific to text classification. +type TextClassificationModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Classification type of the dataset used to train this model. + ClassificationType ClassificationType `protobuf:"varint,3,opt,name=classification_type,json=classificationType,proto3,enum=google.cloud.automl.v1beta1.ClassificationType" json:"classification_type,omitempty"` +} + +func (x *TextClassificationModelMetadata) Reset() { + *x = TextClassificationModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextClassificationModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextClassificationModelMetadata) ProtoMessage() {} + +func (x *TextClassificationModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextClassificationModelMetadata.ProtoReflect.Descriptor instead. +func (*TextClassificationModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP(), []int{1} +} + +func (x *TextClassificationModelMetadata) GetClassificationType() ClassificationType { + if x != nil { + return x.ClassificationType + } + return ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED +} + +// Dataset metadata that is specific to text extraction +type TextExtractionDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TextExtractionDatasetMetadata) Reset() { + *x = TextExtractionDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextExtractionDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextExtractionDatasetMetadata) ProtoMessage() {} + +func (x *TextExtractionDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextExtractionDatasetMetadata.ProtoReflect.Descriptor instead. +func (*TextExtractionDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP(), []int{2} +} + +// Model metadata that is specific to text extraction. +type TextExtractionModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates the scope of model use case. + // + // * `default`: Use to train a general text extraction model. Default value. + // + // - `health_care`: Use to train a text extraction model that is tuned for + // healthcare applications. + ModelHint string `protobuf:"bytes,3,opt,name=model_hint,json=modelHint,proto3" json:"model_hint,omitempty"` +} + +func (x *TextExtractionModelMetadata) Reset() { + *x = TextExtractionModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextExtractionModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextExtractionModelMetadata) ProtoMessage() {} + +func (x *TextExtractionModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextExtractionModelMetadata.ProtoReflect.Descriptor instead. +func (*TextExtractionModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP(), []int{3} +} + +func (x *TextExtractionModelMetadata) GetModelHint() string { + if x != nil { + return x.ModelHint + } + return "" +} + +// Dataset metadata for text sentiment. +type TextSentimentDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A sentiment is expressed as an integer ordinal, where higher value + // means a more positive sentiment. The range of sentiments that will be used + // is between 0 and sentiment_max (inclusive on both ends), and all the values + // in the range must be represented in the dataset before a model can be + // created. + // sentiment_max value must be between 1 and 10 (inclusive). + SentimentMax int32 `protobuf:"varint,1,opt,name=sentiment_max,json=sentimentMax,proto3" json:"sentiment_max,omitempty"` +} + +func (x *TextSentimentDatasetMetadata) Reset() { + *x = TextSentimentDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextSentimentDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSentimentDatasetMetadata) ProtoMessage() {} + +func (x *TextSentimentDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSentimentDatasetMetadata.ProtoReflect.Descriptor instead. +func (*TextSentimentDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP(), []int{4} +} + +func (x *TextSentimentDatasetMetadata) GetSentimentMax() int32 { + if x != nil { + return x.SentimentMax + } + return 0 +} + +// Model metadata that is specific to text sentiment. +type TextSentimentModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TextSentimentModelMetadata) Reset() { + *x = TextSentimentModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextSentimentModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSentimentModelMetadata) ProtoMessage() {} + +func (x *TextSentimentModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSentimentModelMetadata.ProtoReflect.Descriptor instead. +func (*TextSentimentModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP(), []int{5} +} + +var File_google_cloud_automl_v1beta1_text_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_text_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, + 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x21, 0x54, 0x65, 0x78, 0x74, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x60, 0x0a, + 0x13, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x83, 0x01, 0x0a, 0x1f, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x60, 0x0a, 0x13, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x54, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x1b, 0x54, 0x65, 0x78, 0x74, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68, + 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x48, 0x69, 0x6e, 0x74, 0x22, 0x43, 0x0a, 0x1c, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x78, 0x22, 0x1c, 0x0a, 0x1a, 0x54, 0x65, 0x78, + 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xb0, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x54, 0x65, 0x78, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, + 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, + 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_text_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_text_proto_rawDescData = file_google_cloud_automl_v1beta1_text_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_text_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_text_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_text_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_text_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_text_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_text_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_automl_v1beta1_text_proto_goTypes = []interface{}{ + (*TextClassificationDatasetMetadata)(nil), // 0: google.cloud.automl.v1beta1.TextClassificationDatasetMetadata + (*TextClassificationModelMetadata)(nil), // 1: google.cloud.automl.v1beta1.TextClassificationModelMetadata + (*TextExtractionDatasetMetadata)(nil), // 2: google.cloud.automl.v1beta1.TextExtractionDatasetMetadata + (*TextExtractionModelMetadata)(nil), // 3: google.cloud.automl.v1beta1.TextExtractionModelMetadata + (*TextSentimentDatasetMetadata)(nil), // 4: google.cloud.automl.v1beta1.TextSentimentDatasetMetadata + (*TextSentimentModelMetadata)(nil), // 5: google.cloud.automl.v1beta1.TextSentimentModelMetadata + (ClassificationType)(0), // 6: google.cloud.automl.v1beta1.ClassificationType +} +var file_google_cloud_automl_v1beta1_text_proto_depIdxs = []int32{ + 6, // 0: google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.classification_type:type_name -> google.cloud.automl.v1beta1.ClassificationType + 6, // 1: google.cloud.automl.v1beta1.TextClassificationModelMetadata.classification_type:type_name -> google.cloud.automl.v1beta1.ClassificationType + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_text_proto_init() } +func file_google_cloud_automl_v1beta1_text_proto_init() { + if File_google_cloud_automl_v1beta1_text_proto != nil { + return + } + file_google_cloud_automl_v1beta1_classification_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_text_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextClassificationDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextClassificationModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextExtractionDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextExtractionModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextSentimentDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextSentimentModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_text_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_text_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_text_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_text_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_text_proto = out.File + file_google_cloud_automl_v1beta1_text_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_text_proto_goTypes = nil + file_google_cloud_automl_v1beta1_text_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/text_extraction.pb.go b/automl/apiv1beta1/automlpb/text_extraction.pb.go new file mode 100644 index 000000000000..73a7bee370de --- /dev/null +++ b/automl/apiv1beta1/automlpb/text_extraction.pb.go @@ -0,0 +1,408 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/text_extraction.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Annotation for identifying spans of text. +type TextExtractionAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Text extraction annotations can either be a text segment or a + // text relation. + // + // Types that are assignable to Annotation: + // + // *TextExtractionAnnotation_TextSegment + Annotation isTextExtractionAnnotation_Annotation `protobuf_oneof:"annotation"` + // Output only. A confidence estimate between 0.0 and 1.0. A higher value + // means greater confidence in correctness of the annotation. + Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"` +} + +func (x *TextExtractionAnnotation) Reset() { + *x = TextExtractionAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextExtractionAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextExtractionAnnotation) ProtoMessage() {} + +func (x *TextExtractionAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextExtractionAnnotation.ProtoReflect.Descriptor instead. +func (*TextExtractionAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescGZIP(), []int{0} +} + +func (m *TextExtractionAnnotation) GetAnnotation() isTextExtractionAnnotation_Annotation { + if m != nil { + return m.Annotation + } + return nil +} + +func (x *TextExtractionAnnotation) GetTextSegment() *TextSegment { + if x, ok := x.GetAnnotation().(*TextExtractionAnnotation_TextSegment); ok { + return x.TextSegment + } + return nil +} + +func (x *TextExtractionAnnotation) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +type isTextExtractionAnnotation_Annotation interface { + isTextExtractionAnnotation_Annotation() +} + +type TextExtractionAnnotation_TextSegment struct { + // An entity annotation will set this, which is the part of the original + // text to which the annotation pertains. + TextSegment *TextSegment `protobuf:"bytes,3,opt,name=text_segment,json=textSegment,proto3,oneof"` +} + +func (*TextExtractionAnnotation_TextSegment) isTextExtractionAnnotation_Annotation() {} + +// Model evaluation metrics for text extraction problems. +type TextExtractionEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The Area under precision recall curve metric. + AuPrc float32 `protobuf:"fixed32,1,opt,name=au_prc,json=auPrc,proto3" json:"au_prc,omitempty"` + // Output only. Metrics that have confidence thresholds. + // Precision-recall curve can be derived from it. + ConfidenceMetricsEntries []*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry `protobuf:"bytes,2,rep,name=confidence_metrics_entries,json=confidenceMetricsEntries,proto3" json:"confidence_metrics_entries,omitempty"` +} + +func (x *TextExtractionEvaluationMetrics) Reset() { + *x = TextExtractionEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextExtractionEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextExtractionEvaluationMetrics) ProtoMessage() {} + +func (x *TextExtractionEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextExtractionEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*TextExtractionEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescGZIP(), []int{1} +} + +func (x *TextExtractionEvaluationMetrics) GetAuPrc() float32 { + if x != nil { + return x.AuPrc + } + return 0 +} + +func (x *TextExtractionEvaluationMetrics) GetConfidenceMetricsEntries() []*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry { + if x != nil { + return x.ConfidenceMetricsEntries + } + return nil +} + +// Metrics for a single confidence threshold. +type TextExtractionEvaluationMetrics_ConfidenceMetricsEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The confidence threshold value used to compute the metrics. + // Only annotations with score of at least this threshold are considered to + // be ones the model would return. + ConfidenceThreshold float32 `protobuf:"fixed32,1,opt,name=confidence_threshold,json=confidenceThreshold,proto3" json:"confidence_threshold,omitempty"` + // Output only. Recall under the given confidence threshold. + Recall float32 `protobuf:"fixed32,3,opt,name=recall,proto3" json:"recall,omitempty"` + // Output only. Precision under the given confidence threshold. + Precision float32 `protobuf:"fixed32,4,opt,name=precision,proto3" json:"precision,omitempty"` + // Output only. The harmonic mean of recall and precision. + F1Score float32 `protobuf:"fixed32,5,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` +} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) Reset() { + *x = TextExtractionEvaluationMetrics_ConfidenceMetricsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextExtractionEvaluationMetrics_ConfidenceMetricsEntry.ProtoReflect.Descriptor instead. +func (*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) GetConfidenceThreshold() float32 { + if x != nil { + return x.ConfidenceThreshold + } + return 0 +} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) GetRecall() float32 { + if x != nil { + return x.Recall + } + return 0 +} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) GetPrecision() float32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *TextExtractionEvaluationMetrics_ConfidenceMetricsEntry) GetF1Score() float32 { + if x != nil { + return x.F1Score + } + return 0 +} + +var File_google_cloud_automl_v1beta1_text_extraction_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_text_extraction_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8d, 0x01, 0x0a, 0x18, 0x54, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, + 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x0b, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xeb, 0x02, 0x0a, 0x1f, 0x54, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x75, 0x5f, 0x70, 0x72, 0x63, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x61, 0x75, 0x50, 0x72, 0x63, 0x12, 0x91, 0x01, 0x0a, 0x1a, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x53, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, + 0x9c, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x14, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, + 0x65, 0x6e, 0x63, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, + 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x42, 0xa5, + 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescData = file_google_cloud_automl_v1beta1_text_extraction_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_text_extraction_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_automl_v1beta1_text_extraction_proto_goTypes = []interface{}{ + (*TextExtractionAnnotation)(nil), // 0: google.cloud.automl.v1beta1.TextExtractionAnnotation + (*TextExtractionEvaluationMetrics)(nil), // 1: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics + (*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry)(nil), // 2: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + (*TextSegment)(nil), // 3: google.cloud.automl.v1beta1.TextSegment +} +var file_google_cloud_automl_v1beta1_text_extraction_proto_depIdxs = []int32{ + 3, // 0: google.cloud.automl.v1beta1.TextExtractionAnnotation.text_segment:type_name -> google.cloud.automl.v1beta1.TextSegment + 2, // 1: google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.confidence_metrics_entries:type_name -> google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_text_extraction_proto_init() } +func file_google_cloud_automl_v1beta1_text_extraction_proto_init() { + if File_google_cloud_automl_v1beta1_text_extraction_proto != nil { + return + } + file_google_cloud_automl_v1beta1_text_segment_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextExtractionAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextExtractionEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextExtractionEvaluationMetrics_ConfidenceMetricsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*TextExtractionAnnotation_TextSegment)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_text_extraction_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_text_extraction_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_text_extraction_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_text_extraction_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_text_extraction_proto = out.File + file_google_cloud_automl_v1beta1_text_extraction_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_text_extraction_proto_goTypes = nil + file_google_cloud_automl_v1beta1_text_extraction_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/text_segment.pb.go b/automl/apiv1beta1/automlpb/text_segment.pb.go new file mode 100644 index 000000000000..d73d0e3cfbf2 --- /dev/null +++ b/automl/apiv1beta1/automlpb/text_segment.pb.go @@ -0,0 +1,198 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/text_segment.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. +type TextSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The content of the TextSegment. + Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` + // Required. Zero-based character index of the first character of the text + // segment (counting characters from the beginning of the text). + StartOffset int64 `protobuf:"varint,1,opt,name=start_offset,json=startOffset,proto3" json:"start_offset,omitempty"` + // Required. Zero-based character index of the first character past the end of + // the text segment (counting character from the beginning of the text). + // The character at the end_offset is NOT included in the text segment. + EndOffset int64 `protobuf:"varint,2,opt,name=end_offset,json=endOffset,proto3" json:"end_offset,omitempty"` +} + +func (x *TextSegment) Reset() { + *x = TextSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSegment) ProtoMessage() {} + +func (x *TextSegment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSegment.ProtoReflect.Descriptor instead. +func (*TextSegment) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_segment_proto_rawDescGZIP(), []int{0} +} + +func (x *TextSegment) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *TextSegment) GetStartOffset() int64 { + if x != nil { + return x.StartOffset + } + return 0 +} + +func (x *TextSegment) GetEndOffset() int64 { + if x != nil { + return x.EndOffset + } + return 0 +} + +var File_google_cloud_automl_v1beta1_text_segment_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_text_segment_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x69, 0x0a, + 0x0b, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x64, + 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, + 0x6e, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0xb7, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x54, 0x65, + 0x78, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_text_segment_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_text_segment_proto_rawDescData = file_google_cloud_automl_v1beta1_text_segment_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_text_segment_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_text_segment_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_text_segment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_text_segment_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_text_segment_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_automl_v1beta1_text_segment_proto_goTypes = []interface{}{ + (*TextSegment)(nil), // 0: google.cloud.automl.v1beta1.TextSegment +} +var file_google_cloud_automl_v1beta1_text_segment_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_text_segment_proto_init() } +func file_google_cloud_automl_v1beta1_text_segment_proto_init() { + if File_google_cloud_automl_v1beta1_text_segment_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_text_segment_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_text_segment_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_text_segment_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_text_segment_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_text_segment_proto = out.File + file_google_cloud_automl_v1beta1_text_segment_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_text_segment_proto_goTypes = nil + file_google_cloud_automl_v1beta1_text_segment_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/text_sentiment.pb.go b/automl/apiv1beta1/automlpb/text_sentiment.pb.go new file mode 100644 index 000000000000..c48cecb2d509 --- /dev/null +++ b/automl/apiv1beta1/automlpb/text_sentiment.pb.go @@ -0,0 +1,366 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/text_sentiment.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Contains annotation details specific to text sentiment. +type TextSentimentAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The sentiment with the semantic, as given to the + // [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used + // for the prediction had been trained. + // The sentiment values are between 0 and + // Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), + // with higher value meaning more positive sentiment. They are completely + // relative, i.e. 0 means least positive sentiment and sentiment_max means + // the most positive from the sentiments present in the train data. Therefore + // + // e.g. if train data had only negative sentiment, then sentiment_max, would + // + // be still negative (although least negative). + // The sentiment shouldn't be confused with "score" or "magnitude" + // from the previous Natural Language Sentiment Analysis API. + Sentiment int32 `protobuf:"varint,1,opt,name=sentiment,proto3" json:"sentiment,omitempty"` +} + +func (x *TextSentimentAnnotation) Reset() { + *x = TextSentimentAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextSentimentAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSentimentAnnotation) ProtoMessage() {} + +func (x *TextSentimentAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSentimentAnnotation.ProtoReflect.Descriptor instead. +func (*TextSentimentAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescGZIP(), []int{0} +} + +func (x *TextSentimentAnnotation) GetSentiment() int32 { + if x != nil { + return x.Sentiment + } + return 0 +} + +// Model evaluation metrics for text sentiment problems. +type TextSentimentEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Precision. + Precision float32 `protobuf:"fixed32,1,opt,name=precision,proto3" json:"precision,omitempty"` + // Output only. Recall. + Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"` + // Output only. The harmonic mean of recall and precision. + F1Score float32 `protobuf:"fixed32,3,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` + // Output only. Mean absolute error. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + MeanAbsoluteError float32 `protobuf:"fixed32,4,opt,name=mean_absolute_error,json=meanAbsoluteError,proto3" json:"mean_absolute_error,omitempty"` + // Output only. Mean squared error. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + MeanSquaredError float32 `protobuf:"fixed32,5,opt,name=mean_squared_error,json=meanSquaredError,proto3" json:"mean_squared_error,omitempty"` + // Output only. Linear weighted kappa. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + LinearKappa float32 `protobuf:"fixed32,6,opt,name=linear_kappa,json=linearKappa,proto3" json:"linear_kappa,omitempty"` + // Output only. Quadratic weighted kappa. Only set for the overall model + // evaluation, not for evaluation of a single annotation spec. + QuadraticKappa float32 `protobuf:"fixed32,7,opt,name=quadratic_kappa,json=quadraticKappa,proto3" json:"quadratic_kappa,omitempty"` + // Output only. Confusion matrix of the evaluation. + // Only set for the overall model evaluation, not for evaluation of a single + // annotation spec. + ConfusionMatrix *ClassificationEvaluationMetrics_ConfusionMatrix `protobuf:"bytes,8,opt,name=confusion_matrix,json=confusionMatrix,proto3" json:"confusion_matrix,omitempty"` + // Output only. The annotation spec ids used for this evaluation. + // Deprecated . + // + // Deprecated: Do not use. + AnnotationSpecId []string `protobuf:"bytes,9,rep,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"` +} + +func (x *TextSentimentEvaluationMetrics) Reset() { + *x = TextSentimentEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextSentimentEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSentimentEvaluationMetrics) ProtoMessage() {} + +func (x *TextSentimentEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSentimentEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*TextSentimentEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescGZIP(), []int{1} +} + +func (x *TextSentimentEvaluationMetrics) GetPrecision() float32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetRecall() float32 { + if x != nil { + return x.Recall + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetF1Score() float32 { + if x != nil { + return x.F1Score + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetMeanAbsoluteError() float32 { + if x != nil { + return x.MeanAbsoluteError + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetMeanSquaredError() float32 { + if x != nil { + return x.MeanSquaredError + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetLinearKappa() float32 { + if x != nil { + return x.LinearKappa + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetQuadraticKappa() float32 { + if x != nil { + return x.QuadraticKappa + } + return 0 +} + +func (x *TextSentimentEvaluationMetrics) GetConfusionMatrix() *ClassificationEvaluationMetrics_ConfusionMatrix { + if x != nil { + return x.ConfusionMatrix + } + return nil +} + +// Deprecated: Do not use. +func (x *TextSentimentEvaluationMetrics) GetAnnotationSpecId() []string { + if x != nil { + return x.AnnotationSpecId + } + return nil +} + +var File_google_cloud_automl_v1beta1_text_sentiment_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, + 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x37, 0x0a, 0x17, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xc6, 0x03, 0x0a, 0x1e, 0x54, + 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x72, 0x65, 0x63, + 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2e, + 0x0a, 0x13, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x5f, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x65, 0x61, + 0x6e, 0x41, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2c, + 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x73, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x65, 0x61, 0x6e, + 0x53, 0x71, 0x75, 0x61, 0x72, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, + 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x5f, 0x6b, 0x61, 0x70, 0x70, 0x61, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12, + 0x27, 0x0a, 0x0f, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6b, 0x61, 0x70, + 0x70, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x71, 0x75, 0x61, 0x64, 0x72, 0x61, + 0x74, 0x69, 0x63, 0x4b, 0x61, 0x70, 0x70, 0x61, 0x12, 0x77, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, + 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, + 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x12, 0x30, 0x0a, 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x49, 0x64, 0x42, 0xb7, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x12, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x41, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, + 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, + 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, + 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData = file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_automl_v1beta1_text_sentiment_proto_goTypes = []interface{}{ + (*TextSentimentAnnotation)(nil), // 0: google.cloud.automl.v1beta1.TextSentimentAnnotation + (*TextSentimentEvaluationMetrics)(nil), // 1: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics + (*ClassificationEvaluationMetrics_ConfusionMatrix)(nil), // 2: google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix +} +var file_google_cloud_automl_v1beta1_text_sentiment_proto_depIdxs = []int32{ + 2, // 0: google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.confusion_matrix:type_name -> google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_text_sentiment_proto_init() } +func file_google_cloud_automl_v1beta1_text_sentiment_proto_init() { + if File_google_cloud_automl_v1beta1_text_sentiment_proto != nil { + return + } + file_google_cloud_automl_v1beta1_classification_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextSentimentAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextSentimentEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_text_sentiment_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_text_sentiment_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_text_sentiment_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_text_sentiment_proto = out.File + file_google_cloud_automl_v1beta1_text_sentiment_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_text_sentiment_proto_goTypes = nil + file_google_cloud_automl_v1beta1_text_sentiment_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/translation.pb.go b/automl/apiv1beta1/automlpb/translation.pb.go new file mode 100644 index 000000000000..2bc4e4926fd6 --- /dev/null +++ b/automl/apiv1beta1/automlpb/translation.pb.go @@ -0,0 +1,439 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/translation.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Dataset metadata that is specific to translation. +type TranslationDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The BCP-47 language code of the source language. + SourceLanguageCode string `protobuf:"bytes,1,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` + // Required. The BCP-47 language code of the target language. + TargetLanguageCode string `protobuf:"bytes,2,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` +} + +func (x *TranslationDatasetMetadata) Reset() { + *x = TranslationDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TranslationDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TranslationDatasetMetadata) ProtoMessage() {} + +func (x *TranslationDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TranslationDatasetMetadata.ProtoReflect.Descriptor instead. +func (*TranslationDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_translation_proto_rawDescGZIP(), []int{0} +} + +func (x *TranslationDatasetMetadata) GetSourceLanguageCode() string { + if x != nil { + return x.SourceLanguageCode + } + return "" +} + +func (x *TranslationDatasetMetadata) GetTargetLanguageCode() string { + if x != nil { + return x.TargetLanguageCode + } + return "" +} + +// Evaluation metrics for the dataset. +type TranslationEvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. BLEU score. + BleuScore float64 `protobuf:"fixed64,1,opt,name=bleu_score,json=bleuScore,proto3" json:"bleu_score,omitempty"` + // Output only. BLEU score for base model. + BaseBleuScore float64 `protobuf:"fixed64,2,opt,name=base_bleu_score,json=baseBleuScore,proto3" json:"base_bleu_score,omitempty"` +} + +func (x *TranslationEvaluationMetrics) Reset() { + *x = TranslationEvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TranslationEvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TranslationEvaluationMetrics) ProtoMessage() {} + +func (x *TranslationEvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TranslationEvaluationMetrics.ProtoReflect.Descriptor instead. +func (*TranslationEvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_translation_proto_rawDescGZIP(), []int{1} +} + +func (x *TranslationEvaluationMetrics) GetBleuScore() float64 { + if x != nil { + return x.BleuScore + } + return 0 +} + +func (x *TranslationEvaluationMetrics) GetBaseBleuScore() float64 { + if x != nil { + return x.BaseBleuScore + } + return 0 +} + +// Model metadata that is specific to translation. +type TranslationModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the model to use as a baseline to train the custom + // model. If unset, we use the default base model provided by Google + // Translate. Format: + // `projects/{project_id}/locations/{location_id}/models/{model_id}` + BaseModel string `protobuf:"bytes,1,opt,name=base_model,json=baseModel,proto3" json:"base_model,omitempty"` + // Output only. Inferred from the dataset. + // The source languge (The BCP-47 language code) that is used for training. + SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` + // Output only. The target languge (The BCP-47 language code) that is used for + // training. + TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` +} + +func (x *TranslationModelMetadata) Reset() { + *x = TranslationModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TranslationModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TranslationModelMetadata) ProtoMessage() {} + +func (x *TranslationModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TranslationModelMetadata.ProtoReflect.Descriptor instead. +func (*TranslationModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_translation_proto_rawDescGZIP(), []int{2} +} + +func (x *TranslationModelMetadata) GetBaseModel() string { + if x != nil { + return x.BaseModel + } + return "" +} + +func (x *TranslationModelMetadata) GetSourceLanguageCode() string { + if x != nil { + return x.SourceLanguageCode + } + return "" +} + +func (x *TranslationModelMetadata) GetTargetLanguageCode() string { + if x != nil { + return x.TargetLanguageCode + } + return "" +} + +// Annotation details specific to translation. +type TranslationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only . The translated content. + TranslatedContent *TextSnippet `protobuf:"bytes,1,opt,name=translated_content,json=translatedContent,proto3" json:"translated_content,omitempty"` +} + +func (x *TranslationAnnotation) Reset() { + *x = TranslationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TranslationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TranslationAnnotation) ProtoMessage() {} + +func (x *TranslationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TranslationAnnotation.ProtoReflect.Descriptor instead. +func (*TranslationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_translation_proto_rawDescGZIP(), []int{3} +} + +func (x *TranslationAnnotation) GetTranslatedContent() *TextSnippet { + if x != nil { + return x.TranslatedContent + } + return nil +} + +var File_google_cloud_automl_v1beta1_translation_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_translation_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x1a, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x14, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x35, 0x0a, 0x14, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x65, 0x0a, 0x1c, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x65, 0x75, + 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x62, 0x6c, + 0x65, 0x75, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x62, 0x6c, 0x65, 0x75, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x42, 0x6c, 0x65, 0x75, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, + 0x9d, 0x01, 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, + 0x14, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, + 0x70, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x69, 0x70, 0x70, 0x65, 0x74, 0x52, 0x11, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x42, 0xb7, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0xca, 0x02, 0x1b, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x75, 0x74, 0x6f, + 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x1e, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x75, 0x74, 0x6f, + 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_translation_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_translation_proto_rawDescData = file_google_cloud_automl_v1beta1_translation_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_translation_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_translation_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_translation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_translation_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_translation_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_translation_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_automl_v1beta1_translation_proto_goTypes = []interface{}{ + (*TranslationDatasetMetadata)(nil), // 0: google.cloud.automl.v1beta1.TranslationDatasetMetadata + (*TranslationEvaluationMetrics)(nil), // 1: google.cloud.automl.v1beta1.TranslationEvaluationMetrics + (*TranslationModelMetadata)(nil), // 2: google.cloud.automl.v1beta1.TranslationModelMetadata + (*TranslationAnnotation)(nil), // 3: google.cloud.automl.v1beta1.TranslationAnnotation + (*TextSnippet)(nil), // 4: google.cloud.automl.v1beta1.TextSnippet +} +var file_google_cloud_automl_v1beta1_translation_proto_depIdxs = []int32{ + 4, // 0: google.cloud.automl.v1beta1.TranslationAnnotation.translated_content:type_name -> google.cloud.automl.v1beta1.TextSnippet + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_translation_proto_init() } +func file_google_cloud_automl_v1beta1_translation_proto_init() { + if File_google_cloud_automl_v1beta1_translation_proto != nil { + return + } + file_google_cloud_automl_v1beta1_data_items_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_translation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranslationDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_translation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranslationEvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_translation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranslationModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_translation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TranslationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_translation_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_translation_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_translation_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_translation_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_translation_proto = out.File + file_google_cloud_automl_v1beta1_translation_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_translation_proto_goTypes = nil + file_google_cloud_automl_v1beta1_translation_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/automlpb/video.pb.go b/automl/apiv1beta1/automlpb/video.pb.go new file mode 100644 index 000000000000..7d6a8688472c --- /dev/null +++ b/automl/apiv1beta1/automlpb/video.pb.go @@ -0,0 +1,330 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/automl/v1beta1/video.proto + +package automlpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Dataset metadata specific to video classification. +// All Video Classification datasets are treated as multi label. +type VideoClassificationDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VideoClassificationDatasetMetadata) Reset() { + *x = VideoClassificationDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoClassificationDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoClassificationDatasetMetadata) ProtoMessage() {} + +func (x *VideoClassificationDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoClassificationDatasetMetadata.ProtoReflect.Descriptor instead. +func (*VideoClassificationDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_video_proto_rawDescGZIP(), []int{0} +} + +// Dataset metadata specific to video object tracking. +type VideoObjectTrackingDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VideoObjectTrackingDatasetMetadata) Reset() { + *x = VideoObjectTrackingDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoObjectTrackingDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoObjectTrackingDatasetMetadata) ProtoMessage() {} + +func (x *VideoObjectTrackingDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoObjectTrackingDatasetMetadata.ProtoReflect.Descriptor instead. +func (*VideoObjectTrackingDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_video_proto_rawDescGZIP(), []int{1} +} + +// Model metadata specific to video classification. +type VideoClassificationModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VideoClassificationModelMetadata) Reset() { + *x = VideoClassificationModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoClassificationModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoClassificationModelMetadata) ProtoMessage() {} + +func (x *VideoClassificationModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoClassificationModelMetadata.ProtoReflect.Descriptor instead. +func (*VideoClassificationModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_video_proto_rawDescGZIP(), []int{2} +} + +// Model metadata specific to video object tracking. +type VideoObjectTrackingModelMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *VideoObjectTrackingModelMetadata) Reset() { + *x = VideoObjectTrackingModelMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoObjectTrackingModelMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoObjectTrackingModelMetadata) ProtoMessage() {} + +func (x *VideoObjectTrackingModelMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_automl_v1beta1_video_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoObjectTrackingModelMetadata.ProtoReflect.Descriptor instead. +func (*VideoObjectTrackingModelMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_automl_v1beta1_video_proto_rawDescGZIP(), []int{3} +} + +var File_google_cloud_automl_v1beta1_video_proto protoreflect.FileDescriptor + +var file_google_cloud_automl_v1beta1_video_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x22, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x24, + 0x0a, 0x22, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x22, 0x0a, 0x20, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x22, 0x0a, 0x20, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xb1, 0x01, 0x0a, + 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0a, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x6c, 0xca, 0x02, 0x1b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x6c, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, + 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, + 0x3a, 0x41, 0x75, 0x74, 0x6f, 0x4d, 0x4c, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_automl_v1beta1_video_proto_rawDescOnce sync.Once + file_google_cloud_automl_v1beta1_video_proto_rawDescData = file_google_cloud_automl_v1beta1_video_proto_rawDesc +) + +func file_google_cloud_automl_v1beta1_video_proto_rawDescGZIP() []byte { + file_google_cloud_automl_v1beta1_video_proto_rawDescOnce.Do(func() { + file_google_cloud_automl_v1beta1_video_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_automl_v1beta1_video_proto_rawDescData) + }) + return file_google_cloud_automl_v1beta1_video_proto_rawDescData +} + +var file_google_cloud_automl_v1beta1_video_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_automl_v1beta1_video_proto_goTypes = []interface{}{ + (*VideoClassificationDatasetMetadata)(nil), // 0: google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata + (*VideoObjectTrackingDatasetMetadata)(nil), // 1: google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata + (*VideoClassificationModelMetadata)(nil), // 2: google.cloud.automl.v1beta1.VideoClassificationModelMetadata + (*VideoObjectTrackingModelMetadata)(nil), // 3: google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata +} +var file_google_cloud_automl_v1beta1_video_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_automl_v1beta1_video_proto_init() } +func file_google_cloud_automl_v1beta1_video_proto_init() { + if File_google_cloud_automl_v1beta1_video_proto != nil { + return + } + file_google_cloud_automl_v1beta1_classification_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_automl_v1beta1_video_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoClassificationDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_video_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoObjectTrackingDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_video_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoClassificationModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_automl_v1beta1_video_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoObjectTrackingModelMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_automl_v1beta1_video_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_automl_v1beta1_video_proto_goTypes, + DependencyIndexes: file_google_cloud_automl_v1beta1_video_proto_depIdxs, + MessageInfos: file_google_cloud_automl_v1beta1_video_proto_msgTypes, + }.Build() + File_google_cloud_automl_v1beta1_video_proto = out.File + file_google_cloud_automl_v1beta1_video_proto_rawDesc = nil + file_google_cloud_automl_v1beta1_video_proto_goTypes = nil + file_google_cloud_automl_v1beta1_video_proto_depIdxs = nil +} diff --git a/automl/apiv1beta1/doc.go b/automl/apiv1beta1/doc.go index c999819da9ae..8411063fdfa7 100644 --- a/automl/apiv1beta1/doc.go +++ b/automl/apiv1beta1/doc.go @@ -20,47 +20,58 @@ // Train high-quality custom machine learning models with minimum effort and // machine learning expertise. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := automl.NewPredictionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := automl.NewPredictionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := automl.NewPredictionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &automlpb.PredictRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/automl/v1beta1#PredictRequest. -// } -// resp, err := c.Predict(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := automl.NewPredictionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &automlpb.PredictRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/automl/v1beta1#PredictRequest. +// } +// resp, err := c.Predict(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewPredictionClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/automl/apiv1beta1/mock_test.go b/automl/apiv1beta1/mock_test.go deleted file mode 100644 index 2584d8a8b64b..000000000000 --- a/automl/apiv1beta1/mock_test.go +++ /dev/null @@ -1,2324 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package automl - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - automlpb "google.golang.org/genproto/googleapis/cloud/automl/v1beta1" - longrunningpb "google.golang.org/genproto/googleapis/longrunning" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockAutoMlServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - automlpb.AutoMlServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockAutoMlServer) CreateDataset(ctx context.Context, req *automlpb.CreateDatasetRequest) (*automlpb.Dataset, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Dataset), nil -} - -func (s *mockAutoMlServer) GetDataset(ctx context.Context, req *automlpb.GetDatasetRequest) (*automlpb.Dataset, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Dataset), nil -} - -func (s *mockAutoMlServer) ListDatasets(ctx context.Context, req *automlpb.ListDatasetsRequest) (*automlpb.ListDatasetsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListDatasetsResponse), nil -} - -func (s *mockAutoMlServer) UpdateDataset(ctx context.Context, req *automlpb.UpdateDatasetRequest) (*automlpb.Dataset, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Dataset), nil -} - -func (s *mockAutoMlServer) DeleteDataset(ctx context.Context, req *automlpb.DeleteDatasetRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ImportData(ctx context.Context, req *automlpb.ImportDataRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ExportData(ctx context.Context, req *automlpb.ExportDataRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetAnnotationSpec(ctx context.Context, req *automlpb.GetAnnotationSpecRequest) (*automlpb.AnnotationSpec, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.AnnotationSpec), nil -} - -func (s *mockAutoMlServer) GetTableSpec(ctx context.Context, req *automlpb.GetTableSpecRequest) (*automlpb.TableSpec, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.TableSpec), nil -} - -func (s *mockAutoMlServer) ListTableSpecs(ctx context.Context, req *automlpb.ListTableSpecsRequest) (*automlpb.ListTableSpecsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListTableSpecsResponse), nil -} - -func (s *mockAutoMlServer) UpdateTableSpec(ctx context.Context, req *automlpb.UpdateTableSpecRequest) (*automlpb.TableSpec, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.TableSpec), nil -} - -func (s *mockAutoMlServer) GetColumnSpec(ctx context.Context, req *automlpb.GetColumnSpecRequest) (*automlpb.ColumnSpec, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ColumnSpec), nil -} - -func (s *mockAutoMlServer) ListColumnSpecs(ctx context.Context, req *automlpb.ListColumnSpecsRequest) (*automlpb.ListColumnSpecsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListColumnSpecsResponse), nil -} - -func (s *mockAutoMlServer) UpdateColumnSpec(ctx context.Context, req *automlpb.UpdateColumnSpecRequest) (*automlpb.ColumnSpec, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ColumnSpec), nil -} - -func (s *mockAutoMlServer) CreateModel(ctx context.Context, req *automlpb.CreateModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetModel(ctx context.Context, req *automlpb.GetModelRequest) (*automlpb.Model, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.Model), nil -} - -func (s *mockAutoMlServer) ListModels(ctx context.Context, req *automlpb.ListModelsRequest) (*automlpb.ListModelsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListModelsResponse), nil -} - -func (s *mockAutoMlServer) DeleteModel(ctx context.Context, req *automlpb.DeleteModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) DeployModel(ctx context.Context, req *automlpb.DeployModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) UndeployModel(ctx context.Context, req *automlpb.UndeployModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ExportModel(ctx context.Context, req *automlpb.ExportModelRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) ExportEvaluatedExamples(ctx context.Context, req *automlpb.ExportEvaluatedExamplesRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAutoMlServer) GetModelEvaluation(ctx context.Context, req *automlpb.GetModelEvaluationRequest) (*automlpb.ModelEvaluation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ModelEvaluation), nil -} - -func (s *mockAutoMlServer) ListModelEvaluations(ctx context.Context, req *automlpb.ListModelEvaluationsRequest) (*automlpb.ListModelEvaluationsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.ListModelEvaluationsResponse), nil -} - -type mockPredictionServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - automlpb.PredictionServiceServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockPredictionServer) Predict(ctx context.Context, req *automlpb.PredictRequest) (*automlpb.PredictResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*automlpb.PredictResponse), nil -} - -func (s *mockPredictionServer) BatchPredict(ctx context.Context, req *automlpb.BatchPredictRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockAutoMl mockAutoMlServer - mockPrediction mockPredictionServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - automlpb.RegisterAutoMlServer(serv, &mockAutoMl) - automlpb.RegisterPredictionServiceServer(serv, &mockPrediction) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestAutoMlCreateDataset(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var exampleCount int32 = 1517063674 - var etag string = "etag3123477" - var expectedResponse = &automlpb.Dataset{ - Name: name, - DisplayName: displayName, - Description: description, - ExampleCount: exampleCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var request = &automlpb.CreateDatasetRequest{ - Parent: formattedParent, - Dataset: dataset, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateDataset(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlCreateDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var request = &automlpb.CreateDatasetRequest{ - Parent: formattedParent, - Dataset: dataset, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateDataset(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlUpdateDataset(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var exampleCount int32 = 1517063674 - var etag string = "etag3123477" - var expectedResponse = &automlpb.Dataset{ - Name: name, - DisplayName: displayName, - Description: description, - ExampleCount: exampleCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var request = &automlpb.UpdateDatasetRequest{ - Dataset: dataset, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateDataset(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlUpdateDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var dataset *automlpb.Dataset = &automlpb.Dataset{} - var request = &automlpb.UpdateDatasetRequest{ - Dataset: dataset, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateDataset(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetDataset(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var exampleCount int32 = 1517063674 - var etag string = "etag3123477" - var expectedResponse = &automlpb.Dataset{ - Name: name2, - DisplayName: displayName, - Description: description, - ExampleCount: exampleCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.GetDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetDataset(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.GetDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetDataset(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListDatasets(t *testing.T) { - var nextPageToken string = "" - var datasetsElement *automlpb.Dataset = &automlpb.Dataset{} - var datasets = []*automlpb.Dataset{datasetsElement} - var expectedResponse = &automlpb.ListDatasetsResponse{ - NextPageToken: nextPageToken, - Datasets: datasets, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListDatasetsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListDatasets(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Datasets[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListDatasetsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListDatasetsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListDatasets(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlDeleteDataset(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.DeleteDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteDataset(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlDeleteDatasetError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.DeleteDatasetRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteDataset(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlImportData(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var inputConfig *automlpb.InputConfig = &automlpb.InputConfig{} - var request = &automlpb.ImportDataRequest{ - Name: formattedName, - InputConfig: inputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ImportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlImportDataError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var inputConfig *automlpb.InputConfig = &automlpb.InputConfig{} - var request = &automlpb.ImportDataRequest{ - Name: formattedName, - InputConfig: inputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ImportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlExportData(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var outputConfig *automlpb.OutputConfig = &automlpb.OutputConfig{} - var request = &automlpb.ExportDataRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlExportDataError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var outputConfig *automlpb.OutputConfig = &automlpb.OutputConfig{} - var request = &automlpb.ExportDataRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportData(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlCreateModel(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var datasetId string = "datasetId-2115646910" - var expectedResponse = &automlpb.Model{ - Name: name, - DisplayName: displayName, - DatasetId: datasetId, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var model *automlpb.Model = &automlpb.Model{} - var request = &automlpb.CreateModelRequest{ - Parent: formattedParent, - Model: model, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlCreateModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var model *automlpb.Model = &automlpb.Model{} - var request = &automlpb.CreateModelRequest{ - Parent: formattedParent, - Model: model, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetModel(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var datasetId string = "datasetId-2115646910" - var expectedResponse = &automlpb.Model{ - Name: name2, - DisplayName: displayName, - DatasetId: datasetId, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.GetModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModel(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.GetModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModel(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListModels(t *testing.T) { - var nextPageToken string = "" - var modelElement *automlpb.Model = &automlpb.Model{} - var model = []*automlpb.Model{modelElement} - var expectedResponse = &automlpb.ListModelsResponse{ - NextPageToken: nextPageToken, - Model: model, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListModelsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModels(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Model[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListModelsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &automlpb.ListModelsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModels(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlDeleteModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeleteModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlDeleteModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeleteModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlDeployModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlDeployModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.DeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlUndeployModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.UndeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.UndeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlUndeployModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.UndeployModelRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.UndeployModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlGetModelEvaluation(t *testing.T) { - var name2 string = "name2-1052831874" - var annotationSpecId string = "annotationSpecId60690191" - var displayName string = "displayName1615086568" - var evaluatedExampleCount int32 = 277565350 - var expectedResponse = &automlpb.ModelEvaluation{ - Name: name2, - AnnotationSpecId: annotationSpecId, - DisplayName: displayName, - EvaluatedExampleCount: evaluatedExampleCount, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s/modelEvaluations/%s", "[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]") - var request = &automlpb.GetModelEvaluationRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModelEvaluation(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetModelEvaluationError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s/modelEvaluations/%s", "[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]") - var request = &automlpb.GetModelEvaluationRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetModelEvaluation(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlExportModel(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var outputConfig *automlpb.ModelExportOutputConfig = &automlpb.ModelExportOutputConfig{} - var request = &automlpb.ExportModelRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlExportModelError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var outputConfig *automlpb.ModelExportOutputConfig = &automlpb.ModelExportOutputConfig{} - var request = &automlpb.ExportModelRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportModel(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlExportEvaluatedExamples(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var outputConfig *automlpb.ExportEvaluatedExamplesOutputConfig = &automlpb.ExportEvaluatedExamplesOutputConfig{} - var request = &automlpb.ExportEvaluatedExamplesRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportEvaluatedExamples(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAutoMlExportEvaluatedExamplesError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = nil - mockAutoMl.resps = append(mockAutoMl.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var outputConfig *automlpb.ExportEvaluatedExamplesOutputConfig = &automlpb.ExportEvaluatedExamplesOutputConfig{} - var request = &automlpb.ExportEvaluatedExamplesRequest{ - Name: formattedName, - OutputConfig: outputConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportEvaluatedExamples(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAutoMlListModelEvaluations(t *testing.T) { - var nextPageToken string = "" - var modelEvaluationElement *automlpb.ModelEvaluation = &automlpb.ModelEvaluation{} - var modelEvaluation = []*automlpb.ModelEvaluation{modelEvaluationElement} - var expectedResponse = &automlpb.ListModelEvaluationsResponse{ - NextPageToken: nextPageToken, - ModelEvaluation: modelEvaluation, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.ListModelEvaluationsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModelEvaluations(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.ModelEvaluation[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListModelEvaluationsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var request = &automlpb.ListModelEvaluationsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListModelEvaluations(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetAnnotationSpec(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var exampleCount int32 = 1517063674 - var expectedResponse = &automlpb.AnnotationSpec{ - Name: name2, - DisplayName: displayName, - ExampleCount: exampleCount, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/annotationSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]") - var request = &automlpb.GetAnnotationSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetAnnotationSpec(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetAnnotationSpecError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/annotationSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]") - var request = &automlpb.GetAnnotationSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetAnnotationSpec(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetTableSpec(t *testing.T) { - var name2 string = "name2-1052831874" - var timeColumnSpecId string = "timeColumnSpecId1558734824" - var rowCount int64 = 1340416618 - var validRowCount int64 = 406068761 - var columnCount int64 = 122671386 - var etag string = "etag3123477" - var expectedResponse = &automlpb.TableSpec{ - Name: name2, - TimeColumnSpecId: timeColumnSpecId, - RowCount: rowCount, - ValidRowCount: validRowCount, - ColumnCount: columnCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/tableSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]") - var request = &automlpb.GetTableSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTableSpec(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetTableSpecError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/tableSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]") - var request = &automlpb.GetTableSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTableSpec(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListTableSpecs(t *testing.T) { - var nextPageToken string = "" - var tableSpecsElement *automlpb.TableSpec = &automlpb.TableSpec{} - var tableSpecs = []*automlpb.TableSpec{tableSpecsElement} - var expectedResponse = &automlpb.ListTableSpecsResponse{ - NextPageToken: nextPageToken, - TableSpecs: tableSpecs, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.ListTableSpecsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTableSpecs(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.TableSpecs[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListTableSpecsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s", "[PROJECT]", "[LOCATION]", "[DATASET]") - var request = &automlpb.ListTableSpecsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTableSpecs(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlUpdateTableSpec(t *testing.T) { - var name string = "name3373707" - var timeColumnSpecId string = "timeColumnSpecId1558734824" - var rowCount int64 = 1340416618 - var validRowCount int64 = 406068761 - var columnCount int64 = 122671386 - var etag string = "etag3123477" - var expectedResponse = &automlpb.TableSpec{ - Name: name, - TimeColumnSpecId: timeColumnSpecId, - RowCount: rowCount, - ValidRowCount: validRowCount, - ColumnCount: columnCount, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var tableSpec *automlpb.TableSpec = &automlpb.TableSpec{} - var request = &automlpb.UpdateTableSpecRequest{ - TableSpec: tableSpec, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateTableSpec(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlUpdateTableSpecError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var tableSpec *automlpb.TableSpec = &automlpb.TableSpec{} - var request = &automlpb.UpdateTableSpecRequest{ - TableSpec: tableSpec, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateTableSpec(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlGetColumnSpec(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var etag string = "etag3123477" - var expectedResponse = &automlpb.ColumnSpec{ - Name: name2, - DisplayName: displayName, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/tableSpecs/%s/columnSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]") - var request = &automlpb.GetColumnSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetColumnSpec(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlGetColumnSpecError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/tableSpecs/%s/columnSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]") - var request = &automlpb.GetColumnSpecRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetColumnSpec(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlListColumnSpecs(t *testing.T) { - var nextPageToken string = "" - var columnSpecsElement *automlpb.ColumnSpec = &automlpb.ColumnSpec{} - var columnSpecs = []*automlpb.ColumnSpec{columnSpecsElement} - var expectedResponse = &automlpb.ListColumnSpecsResponse{ - NextPageToken: nextPageToken, - ColumnSpecs: columnSpecs, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/tableSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]") - var request = &automlpb.ListColumnSpecsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListColumnSpecs(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.ColumnSpecs[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlListColumnSpecsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/datasets/%s/tableSpecs/%s", "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]") - var request = &automlpb.ListColumnSpecsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListColumnSpecs(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAutoMlUpdateColumnSpec(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var etag string = "etag3123477" - var expectedResponse = &automlpb.ColumnSpec{ - Name: name, - DisplayName: displayName, - Etag: etag, - } - - mockAutoMl.err = nil - mockAutoMl.reqs = nil - - mockAutoMl.resps = append(mockAutoMl.resps[:0], expectedResponse) - - var columnSpec *automlpb.ColumnSpec = &automlpb.ColumnSpec{} - var request = &automlpb.UpdateColumnSpecRequest{ - ColumnSpec: columnSpec, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateColumnSpec(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAutoMl.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAutoMlUpdateColumnSpecError(t *testing.T) { - errCode := codes.PermissionDenied - mockAutoMl.err = gstatus.Error(errCode, "test error") - - var columnSpec *automlpb.ColumnSpec = &automlpb.ColumnSpec{} - var request = &automlpb.UpdateColumnSpecRequest{ - ColumnSpec: columnSpec, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateColumnSpec(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestPredictionServicePredict(t *testing.T) { - var expectedResponse *automlpb.PredictResponse = &automlpb.PredictResponse{} - - mockPrediction.err = nil - mockPrediction.reqs = nil - - mockPrediction.resps = append(mockPrediction.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var payload *automlpb.ExamplePayload = &automlpb.ExamplePayload{} - var request = &automlpb.PredictRequest{ - Name: formattedName, - Payload: payload, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.Predict(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockPrediction.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestPredictionServicePredictError(t *testing.T) { - errCode := codes.PermissionDenied - mockPrediction.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var payload *automlpb.ExamplePayload = &automlpb.ExamplePayload{} - var request = &automlpb.PredictRequest{ - Name: formattedName, - Payload: payload, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.Predict(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestPredictionServiceBatchPredict(t *testing.T) { - var expectedResponse *automlpb.BatchPredictResult = &automlpb.BatchPredictResult{} - - mockPrediction.err = nil - mockPrediction.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockPrediction.resps = append(mockPrediction.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var inputConfig *automlpb.BatchPredictInputConfig = &automlpb.BatchPredictInputConfig{} - var outputConfig *automlpb.BatchPredictOutputConfig = &automlpb.BatchPredictOutputConfig{} - var request = &automlpb.BatchPredictRequest{ - Name: formattedName, - InputConfig: inputConfig, - OutputConfig: outputConfig, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchPredict(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockPrediction.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestPredictionServiceBatchPredictError(t *testing.T) { - errCode := codes.PermissionDenied - mockPrediction.err = nil - mockPrediction.resps = append(mockPrediction.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/models/%s", "[PROJECT]", "[LOCATION]", "[MODEL]") - var inputConfig *automlpb.BatchPredictInputConfig = &automlpb.BatchPredictInputConfig{} - var outputConfig *automlpb.BatchPredictOutputConfig = &automlpb.BatchPredictOutputConfig{} - var request = &automlpb.BatchPredictRequest{ - Name: formattedName, - InputConfig: inputConfig, - OutputConfig: outputConfig, - } - - c, err := NewPredictionClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchPredict(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/automl/apiv1beta1/prediction_client.go b/automl/apiv1beta1/prediction_client.go index 589970a681f4..0f07dbc5a11a 100644 --- a/automl/apiv1beta1/prediction_client.go +++ b/automl/apiv1beta1/prediction_client.go @@ -122,7 +122,8 @@ func (c *PredictionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PredictionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -131,28 +132,28 @@ func (c *PredictionClient) Connection() *grpc.ClientConn { // returned in the response. // Available for following ML problems, and their expected request payloads: // -// Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes -// up to 30MB. +// Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes +// up to 30MB. // -// Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes -// up to 30MB. +// Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes +// up to 30MB. // -// Text Classification - TextSnippet, content up to 60,000 characters, -// UTF-8 encoded. +// Text Classification - TextSnippet, content up to 60,000 characters, +// UTF-8 encoded. // -// Text Extraction - TextSnippet, content up to 30,000 characters, -// UTF-8 NFC encoded. +// Text Extraction - TextSnippet, content up to 30,000 characters, +// UTF-8 NFC encoded. // -// Translation - TextSnippet, content up to 25,000 characters, UTF-8 -// encoded. +// Translation - TextSnippet, content up to 25,000 characters, UTF-8 +// encoded. // -// Tables - Row, with column values matching the columns of the model, -// up to 5MB. Not available for FORECASTING +// Tables - Row, with column values matching the columns of the model, +// up to 5MB. Not available for FORECASTING // // prediction_type. // -// Text Sentiment - TextSnippet, content up 500 characters, UTF-8 -// encoded. +// Text Sentiment - TextSnippet, content up 500 characters, UTF-8 +// encoded. func (c *PredictionClient) Predict(ctx context.Context, req *automlpb.PredictRequest, opts ...gax.CallOption) (*automlpb.PredictResponse, error) { return c.internalClient.Predict(ctx, req, opts...) } @@ -165,15 +166,15 @@ func (c *PredictionClient) Predict(ctx context.Context, req *automlpb.PredictReq // the response field. // Available for following ML problems: // -// Image Classification +// Image Classification // -// Image Object Detection +// Image Object Detection // -// Video Classification +// Video Classification // -// Video Object Tracking * Text Extraction +// Video Object Tracking * Text Extraction // -// Tables +// Tables func (c *PredictionClient) BatchPredict(ctx context.Context, req *automlpb.BatchPredictRequest, opts ...gax.CallOption) (*BatchPredictOperation, error) { return c.internalClient.BatchPredict(ctx, req, opts...) } @@ -263,7 +264,8 @@ func NewPredictionClient(ctx context.Context, opts ...option.ClientOption) (*Pre // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *predictionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -365,7 +367,7 @@ func (c *predictionRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *predictionRESTClient) Connection() *grpc.ClientConn { return nil } @@ -419,28 +421,28 @@ func (c *predictionGRPCClient) BatchPredict(ctx context.Context, req *automlpb.B // returned in the response. // Available for following ML problems, and their expected request payloads: // -// Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes -// up to 30MB. +// Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes +// up to 30MB. // -// Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes -// up to 30MB. +// Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes +// up to 30MB. // -// Text Classification - TextSnippet, content up to 60,000 characters, -// UTF-8 encoded. +// Text Classification - TextSnippet, content up to 60,000 characters, +// UTF-8 encoded. // -// Text Extraction - TextSnippet, content up to 30,000 characters, -// UTF-8 NFC encoded. +// Text Extraction - TextSnippet, content up to 30,000 characters, +// UTF-8 NFC encoded. // -// Translation - TextSnippet, content up to 25,000 characters, UTF-8 -// encoded. +// Translation - TextSnippet, content up to 25,000 characters, UTF-8 +// encoded. // -// Tables - Row, with column values matching the columns of the model, -// up to 5MB. Not available for FORECASTING +// Tables - Row, with column values matching the columns of the model, +// up to 5MB. Not available for FORECASTING // // prediction_type. // -// Text Sentiment - TextSnippet, content up 500 characters, UTF-8 -// encoded. +// Text Sentiment - TextSnippet, content up 500 characters, UTF-8 +// encoded. func (c *predictionRESTClient) Predict(ctx context.Context, req *automlpb.PredictRequest, opts ...gax.CallOption) (*automlpb.PredictResponse, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -507,15 +509,15 @@ func (c *predictionRESTClient) Predict(ctx context.Context, req *automlpb.Predic // the response field. // Available for following ML problems: // -// Image Classification +// Image Classification // -// Image Object Detection +// Image Object Detection // -// Video Classification +// Video Classification // -// Video Object Tracking * Text Extraction +// Video Object Tracking * Text Extraction // -// Tables +// Tables func (c *predictionRESTClient) BatchPredict(ctx context.Context, req *automlpb.BatchPredictRequest, opts ...gax.CallOption) (*BatchPredictOperation, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) diff --git a/automl/apiv1beta1/prediction_client_example_test.go b/automl/apiv1beta1/prediction_client_example_test.go index ee611333d7ac..bf2d079fadf6 100644 --- a/automl/apiv1beta1/prediction_client_example_test.go +++ b/automl/apiv1beta1/prediction_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewPredictionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewPredictionClient() { func ExampleNewPredictionRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewPredictionRESTClient() { func ExamplePredictionClient_Predict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. @@ -69,6 +84,11 @@ func ExamplePredictionClient_Predict() { func ExamplePredictionClient_BatchPredict() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := automl.NewPredictionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/automl/go.mod b/automl/go.mod index adc82aa29241..301f119a889b 100644 --- a/automl/go.mod +++ b/automl/go.mod @@ -1,13 +1,26 @@ module cloud.google.com/go/automl -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 - github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/automl/go.sum b/automl/go.sum index f00d995cec43..c796dcdc6677 100644 --- a/automl/go.sum +++ b/automl/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/automl/internal/version.go b/automl/internal/version.go index 9fa087b74c6b..e93235c20322 100644 --- a/automl/internal/version.go +++ b/automl/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.4.0" +const Version = "1.5.0" diff --git a/baremetalsolution/apiv2/bare_metal_solution_client.go b/baremetalsolution/apiv2/bare_metal_solution_client.go index 0ea6665b71c1..79dfc20d3737 100644 --- a/baremetalsolution/apiv2/bare_metal_solution_client.go +++ b/baremetalsolution/apiv2/bare_metal_solution_client.go @@ -184,7 +184,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -441,7 +442,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/baremetalsolution/apiv2/bare_metal_solution_client_example_test.go b/baremetalsolution/apiv2/bare_metal_solution_client_example_test.go index 9036707310f3..bb901f6b559f 100644 --- a/baremetalsolution/apiv2/bare_metal_solution_client_example_test.go +++ b/baremetalsolution/apiv2/bare_metal_solution_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleClient_ListInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -65,6 +75,11 @@ func ExampleClient_ListInstances() { func ExampleClient_GetInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +100,11 @@ func ExampleClient_GetInstance() { func ExampleClient_UpdateInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleClient_UpdateInstance() { func ExampleClient_ResetInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +160,11 @@ func ExampleClient_ResetInstance() { func ExampleClient_StartInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +190,11 @@ func ExampleClient_StartInstance() { func ExampleClient_StopInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -185,6 +220,11 @@ func ExampleClient_StopInstance() { func ExampleClient_DetachLun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -210,6 +250,11 @@ func ExampleClient_DetachLun() { func ExampleClient_ListVolumes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -236,6 +281,11 @@ func ExampleClient_ListVolumes() { func ExampleClient_GetVolume() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -256,6 +306,11 @@ func ExampleClient_GetVolume() { func ExampleClient_UpdateVolume() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -281,6 +336,11 @@ func ExampleClient_UpdateVolume() { func ExampleClient_ResizeVolume() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -306,6 +366,11 @@ func ExampleClient_ResizeVolume() { func ExampleClient_ListNetworks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -332,6 +397,11 @@ func ExampleClient_ListNetworks() { func ExampleClient_ListNetworkUsage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -352,6 +422,11 @@ func ExampleClient_ListNetworkUsage() { func ExampleClient_GetNetwork() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +447,11 @@ func ExampleClient_GetNetwork() { func ExampleClient_UpdateNetwork() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -397,6 +477,11 @@ func ExampleClient_UpdateNetwork() { func ExampleClient_GetLun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -417,6 +502,11 @@ func ExampleClient_GetLun() { func ExampleClient_ListLuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -443,6 +533,11 @@ func ExampleClient_ListLuns() { func ExampleClient_GetNfsShare() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -463,6 +558,11 @@ func ExampleClient_GetNfsShare() { func ExampleClient_ListNfsShares() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -489,6 +589,11 @@ func ExampleClient_ListNfsShares() { func ExampleClient_UpdateNfsShare() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -514,6 +619,11 @@ func ExampleClient_UpdateNfsShare() { func ExampleClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -534,6 +644,11 @@ func ExampleClient_GetLocation() { func ExampleClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := baremetalsolution.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/baremetalsolution/apiv2/doc.go b/baremetalsolution/apiv2/doc.go index 0183853cb72f..f08e2879a4b7 100644 --- a/baremetalsolution/apiv2/doc.go +++ b/baremetalsolution/apiv2/doc.go @@ -20,51 +20,62 @@ // Provides ways to manage Bare Metal Solution hardware installed in a // regional extension located near a Google Cloud data center. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := baremetalsolution.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := baremetalsolution.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := baremetalsolution.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &baremetalsolutionpb.ListInstancesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2#ListInstancesRequest. -// } -// it := c.ListInstances(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := baremetalsolution.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &baremetalsolutionpb.ListInstancesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2#ListInstancesRequest. +// } +// it := c.ListInstances(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/baremetalsolution/go.mod b/baremetalsolution/go.mod index 90204de170c5..03a40308f599 100644 --- a/baremetalsolution/go.mod +++ b/baremetalsolution/go.mod @@ -5,10 +5,10 @@ go 1.18 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220621134657-43db42f103f7 - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/baremetalsolution/go.sum b/baremetalsolution/go.sum index 99233d83e884..61881bdba1f2 100644 --- a/baremetalsolution/go.sum +++ b/baremetalsolution/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -586,8 +589,9 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220621134657-43db42f103f7 h1:XTvrnF+agrvedRVFXmEdp+SwIvbGo7E6Y16Tr/LqURk= -google.golang.org/genproto v0.0.0-20220621134657-43db42f103f7/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1 h1:C2UVWqrgLYKrT5nh5oU6hLRm1AeEklCK5eloQA1NtFY= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -618,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -634,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/batch/CHANGES.md b/batch/CHANGES.md index 56fe3842bf1a..f494be949240 100644 --- a/batch/CHANGES.md +++ b/batch/CHANGES.md @@ -1,5 +1,19 @@ # Changelog +## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/batch/v0.2.0...batch/v0.2.1) (2022-09-08) + + +### Bug Fixes + +* **batch:** mark service_account_email as deprecated docs: removing comment from a deprecated field ([e45ad9a](https://github.com/googleapis/google-cloud-go/commit/e45ad9af568c59151decc0dacedf137653b576dd)) + +## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/batch/v0.1.0...batch/v0.2.0) (2022-09-06) + + +### Features + +* **batch:** environment variables, disk interfaces ([3bc37e2](https://github.com/googleapis/google-cloud-go/commit/3bc37e28626df5f7ec37b00c0c2f0bfb91c30495)) + ## 0.1.0 (2022-06-16) diff --git a/batch/apiv1/batch_client.go b/batch/apiv1/batch_client.go index 3d047aa391da..5cf0a2450368 100644 --- a/batch/apiv1/batch_client.go +++ b/batch/apiv1/batch_client.go @@ -31,6 +31,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" batchpb "google.golang.org/genproto/googleapis/cloud/batch/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -42,12 +44,21 @@ var newClientHook clientHook // CallOptions contains the retry settings for each method of Client. type CallOptions struct { - CreateJob []gax.CallOption - GetJob []gax.CallOption - DeleteJob []gax.CallOption - ListJobs []gax.CallOption - GetTask []gax.CallOption - ListTasks []gax.CallOption + CreateJob []gax.CallOption + GetJob []gax.CallOption + DeleteJob []gax.CallOption + ListJobs []gax.CallOption + GetTask []gax.CallOption + ListTasks []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -110,6 +121,15 @@ func defaultCallOptions() *CallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -125,6 +145,15 @@ type internalClient interface { ListJobs(context.Context, *batchpb.ListJobsRequest, ...gax.CallOption) *JobIterator GetTask(context.Context, *batchpb.GetTaskRequest, ...gax.CallOption) (*batchpb.Task, error) ListTasks(context.Context, *batchpb.ListTasksRequest, ...gax.CallOption) *TaskIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // Client is a client for interacting with Batch API. @@ -163,7 +192,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -204,6 +234,62 @@ func (c *Client) ListTasks(ctx context.Context, req *batchpb.ListTasksRequest, o return c.internalClient.ListTasks(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Batch API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -225,6 +311,12 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -261,6 +353,9 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: batchpb.NewBatchServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -282,7 +377,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -482,6 +578,207 @@ func (c *gRPCClient) ListTasks(ctx context.Context, req *batchpb.ListTasksReques return it } +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // DeleteJobOperation manages a long-running operation from DeleteJob. type DeleteJobOperation struct { lro *longrunning.Operation @@ -587,6 +884,100 @@ func (it *JobIterator) takeBuf() interface{} { return b } +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // TaskIterator manages a stream of *batchpb.Task. type TaskIterator struct { items []*batchpb.Task diff --git a/batch/apiv1/batch_client_example_test.go b/batch/apiv1/batch_client_example_test.go index 75a404c57a2c..a0b1e37bd1bd 100644 --- a/batch/apiv1/batch_client_example_test.go +++ b/batch/apiv1/batch_client_example_test.go @@ -22,10 +22,18 @@ import ( batch "cloud.google.com/go/batch/apiv1" "google.golang.org/api/iterator" batchpb "google.golang.org/genproto/googleapis/cloud/batch/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +46,11 @@ func ExampleNewClient() { func ExampleClient_CreateJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +71,11 @@ func ExampleClient_CreateJob() { func ExampleClient_GetJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +96,11 @@ func ExampleClient_GetJob() { func ExampleClient_DeleteJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +124,11 @@ func ExampleClient_DeleteJob() { func ExampleClient_ListJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +155,11 @@ func ExampleClient_ListJobs() { func ExampleClient_GetTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +180,11 @@ func ExampleClient_GetTask() { func ExampleClient_ListTasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := batch.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -170,3 +208,236 @@ func ExampleClient_ListTasks() { _ = resp } } + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := batch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/batch/apiv1/doc.go b/batch/apiv1/doc.go index fa9880757c54..fb5d8c3b8882 100644 --- a/batch/apiv1/doc.go +++ b/batch/apiv1/doc.go @@ -19,45 +19,56 @@ // // An API to manage the running of batch jobs on Google Cloud Platform. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := batch.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := batch.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := batch.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &batchpb.CreateJobRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/batch/v1#CreateJobRequest. -// } -// resp, err := c.CreateJob(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := batch.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &batchpb.CreateJobRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/batch/v1#CreateJobRequest. +// } +// resp, err := c.CreateJob(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/batch/apiv1/gapic_metadata.json b/batch/apiv1/gapic_metadata.json index 570cb70ac9b6..e9c9a7360980 100644 --- a/batch/apiv1/gapic_metadata.json +++ b/batch/apiv1/gapic_metadata.json @@ -10,6 +10,11 @@ "grpc": { "libraryClient": "Client", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateJob": { "methods": [ "CreateJob" @@ -20,11 +25,31 @@ "DeleteJob" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, "GetJob": { "methods": [ "GetJob" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetTask": { "methods": [ "GetTask" @@ -35,10 +60,30 @@ "ListJobs" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListTasks": { "methods": [ "ListTasks" ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] } } } diff --git a/batch/go.mod b/batch/go.mod index 230e51cd87f2..fd325dfe264f 100644 --- a/batch/go.mod +++ b/batch/go.mod @@ -5,10 +5,10 @@ go 1.18 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220902135211-223410557253 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/batch/go.sum b/batch/go.sum index f00d995cec43..5f41c6b39724 100644 --- a/batch/go.sum +++ b/batch/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220902135211-223410557253 h1:vXJMM8Shg7TGaYxZsQ++A/FOSlbDmDtWhS/o+3w/hj4= +google.golang.org/genproto v0.0.0-20220902135211-223410557253/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/batch/internal/version.go b/batch/internal/version.go index 9e90a014f79f..6469702c6a64 100644 --- a/batch/internal/version.go +++ b/batch/internal/version.go @@ -17,4 +17,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.1.0" +const Version = "0.2.1" diff --git a/beyondcorp/CHANGES.md b/beyondcorp/CHANGES.md new file mode 100644 index 000000000000..44a116a3a836 --- /dev/null +++ b/beyondcorp/CHANGES.md @@ -0,0 +1,19 @@ +# Changelog + +## [0.1.1](https://github.com/googleapis/google-cloud-go/compare/beyondcorp/v0.1.0...beyondcorp/v0.1.1) (2022-09-15) + + +### Documentation + +* **beyondcorp/appconnections:** Fix the main client gem name listed in the readme ([6a0080a](https://github.com/googleapis/google-cloud-go/commit/6a0080ad69398c572d856886293e19c79cf0fc0e)) + +## 0.1.0 (2022-07-12) + + +### Features + +* **beyondcorp/appconnections:** start generating apiv1 ([#6325](https://github.com/googleapis/google-cloud-go/issues/6325)) ([f29db2f](https://github.com/googleapis/google-cloud-go/commit/f29db2fc5bf1c839065fa35e15827bd227626dca)) +* **beyondcorp/appconnectors:** start generating apiv1 ([7066fed](https://github.com/googleapis/google-cloud-go/commit/7066fedc31fa4c19e851477792bd8de8e50541ab)) +* **beyondcorp/appgateways:** start generating apiv1 ([7066fed](https://github.com/googleapis/google-cloud-go/commit/7066fedc31fa4c19e851477792bd8de8e50541ab)) +* **beyondcorp/clientconnectorservices:** start generating apiv1 ([7066fed](https://github.com/googleapis/google-cloud-go/commit/7066fedc31fa4c19e851477792bd8de8e50541ab)) +* **beyondcorp/clientgateways:** start generating apiv1 ([7066fed](https://github.com/googleapis/google-cloud-go/commit/7066fedc31fa4c19e851477792bd8de8e50541ab)) diff --git a/beyondcorp/README.md b/beyondcorp/README.md new file mode 100644 index 000000000000..bb113ec3ade4 --- /dev/null +++ b/beyondcorp/README.md @@ -0,0 +1,44 @@ +# BeyondCorp API + +[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/beyondcorp.svg)](https://pkg.go.dev/cloud.google.com/go/beyondcorp) + +Go Client Library for BeyondCorp API. + +## Install + +```bash +go get cloud.google.com/go/beyondcorp +``` + +## Stability + +The stability of this module is indicated by SemVer. + +However, a `v1+` module may have breaking changes in two scenarios: + +* Packages with `alpha` or `beta` in the import path +* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). + +## Go Version Support + +See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) +section in the root directory's README. + +## Authorization + +See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) +section in the root directory's README. + +## Contributing + +Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) +document for details. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. See +[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. diff --git a/beyondcorp/appconnections/apiv1/app_connections_client.go b/beyondcorp/appconnections/apiv1/app_connections_client.go new file mode 100644 index 000000000000..2a6cc0e17574 --- /dev/null +++ b/beyondcorp/appconnections/apiv1/app_connections_client.go @@ -0,0 +1,1137 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package appconnections + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListAppConnections []gax.CallOption + GetAppConnection []gax.CallOption + CreateAppConnection []gax.CallOption + UpdateAppConnection []gax.CallOption + DeleteAppConnection []gax.CallOption + ResolveAppConnections []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("beyondcorp.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("beyondcorp.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://beyondcorp.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListAppConnections: []gax.CallOption{}, + GetAppConnection: []gax.CallOption{}, + CreateAppConnection: []gax.CallOption{}, + UpdateAppConnection: []gax.CallOption{}, + DeleteAppConnection: []gax.CallOption{}, + ResolveAppConnections: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from BeyondCorp API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListAppConnections(context.Context, *appconnectionspb.ListAppConnectionsRequest, ...gax.CallOption) *AppConnectionIterator + GetAppConnection(context.Context, *appconnectionspb.GetAppConnectionRequest, ...gax.CallOption) (*appconnectionspb.AppConnection, error) + CreateAppConnection(context.Context, *appconnectionspb.CreateAppConnectionRequest, ...gax.CallOption) (*CreateAppConnectionOperation, error) + CreateAppConnectionOperation(name string) *CreateAppConnectionOperation + UpdateAppConnection(context.Context, *appconnectionspb.UpdateAppConnectionRequest, ...gax.CallOption) (*UpdateAppConnectionOperation, error) + UpdateAppConnectionOperation(name string) *UpdateAppConnectionOperation + DeleteAppConnection(context.Context, *appconnectionspb.DeleteAppConnectionRequest, ...gax.CallOption) (*DeleteAppConnectionOperation, error) + DeleteAppConnectionOperation(name string) *DeleteAppConnectionOperation + ResolveAppConnections(context.Context, *appconnectionspb.ResolveAppConnectionsRequest, ...gax.CallOption) *ResolveAppConnectionsResponse_AppConnectionDetailsIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with BeyondCorp API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe AppConnectionsService exposes the following resources: +// +// AppConnections, named as follows: +// projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}. +// +// The AppConnectionsService service provides methods to manage +// (create/read/update/delete) BeyondCorp AppConnections. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListAppConnections lists AppConnections in a given project and location. +func (c *Client) ListAppConnections(ctx context.Context, req *appconnectionspb.ListAppConnectionsRequest, opts ...gax.CallOption) *AppConnectionIterator { + return c.internalClient.ListAppConnections(ctx, req, opts...) +} + +// GetAppConnection gets details of a single AppConnection. +func (c *Client) GetAppConnection(ctx context.Context, req *appconnectionspb.GetAppConnectionRequest, opts ...gax.CallOption) (*appconnectionspb.AppConnection, error) { + return c.internalClient.GetAppConnection(ctx, req, opts...) +} + +// CreateAppConnection creates a new AppConnection in a given project and location. +func (c *Client) CreateAppConnection(ctx context.Context, req *appconnectionspb.CreateAppConnectionRequest, opts ...gax.CallOption) (*CreateAppConnectionOperation, error) { + return c.internalClient.CreateAppConnection(ctx, req, opts...) +} + +// CreateAppConnectionOperation returns a new CreateAppConnectionOperation from a given name. +// The name must be that of a previously created CreateAppConnectionOperation, possibly from a different process. +func (c *Client) CreateAppConnectionOperation(name string) *CreateAppConnectionOperation { + return c.internalClient.CreateAppConnectionOperation(name) +} + +// UpdateAppConnection updates the parameters of a single AppConnection. +func (c *Client) UpdateAppConnection(ctx context.Context, req *appconnectionspb.UpdateAppConnectionRequest, opts ...gax.CallOption) (*UpdateAppConnectionOperation, error) { + return c.internalClient.UpdateAppConnection(ctx, req, opts...) +} + +// UpdateAppConnectionOperation returns a new UpdateAppConnectionOperation from a given name. +// The name must be that of a previously created UpdateAppConnectionOperation, possibly from a different process. +func (c *Client) UpdateAppConnectionOperation(name string) *UpdateAppConnectionOperation { + return c.internalClient.UpdateAppConnectionOperation(name) +} + +// DeleteAppConnection deletes a single AppConnection. +func (c *Client) DeleteAppConnection(ctx context.Context, req *appconnectionspb.DeleteAppConnectionRequest, opts ...gax.CallOption) (*DeleteAppConnectionOperation, error) { + return c.internalClient.DeleteAppConnection(ctx, req, opts...) +} + +// DeleteAppConnectionOperation returns a new DeleteAppConnectionOperation from a given name. +// The name must be that of a previously created DeleteAppConnectionOperation, possibly from a different process. +func (c *Client) DeleteAppConnectionOperation(name string) *DeleteAppConnectionOperation { + return c.internalClient.DeleteAppConnectionOperation(name) +} + +// ResolveAppConnections resolves AppConnections details for a given AppConnector. +// An internal method called by a connector to find AppConnections to connect +// to. +func (c *Client) ResolveAppConnections(ctx context.Context, req *appconnectionspb.ResolveAppConnectionsRequest, opts ...gax.CallOption) *ResolveAppConnectionsResponse_AppConnectionDetailsIterator { + return c.internalClient.ResolveAppConnections(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with BeyondCorp API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client appconnectionspb.AppConnectionsServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new app connections service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe AppConnectionsService exposes the following resources: +// +// AppConnections, named as follows: +// projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}. +// +// The AppConnectionsService service provides methods to manage +// (create/read/update/delete) BeyondCorp AppConnections. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: appconnectionspb.NewAppConnectionsServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) ListAppConnections(ctx context.Context, req *appconnectionspb.ListAppConnectionsRequest, opts ...gax.CallOption) *AppConnectionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListAppConnections[0:len((*c.CallOptions).ListAppConnections):len((*c.CallOptions).ListAppConnections)], opts...) + it := &AppConnectionIterator{} + req = proto.Clone(req).(*appconnectionspb.ListAppConnectionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*appconnectionspb.AppConnection, string, error) { + resp := &appconnectionspb.ListAppConnectionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListAppConnections(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAppConnections(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetAppConnection(ctx context.Context, req *appconnectionspb.GetAppConnectionRequest, opts ...gax.CallOption) (*appconnectionspb.AppConnection, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAppConnection[0:len((*c.CallOptions).GetAppConnection):len((*c.CallOptions).GetAppConnection)], opts...) + var resp *appconnectionspb.AppConnection + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetAppConnection(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateAppConnection(ctx context.Context, req *appconnectionspb.CreateAppConnectionRequest, opts ...gax.CallOption) (*CreateAppConnectionOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateAppConnection[0:len((*c.CallOptions).CreateAppConnection):len((*c.CallOptions).CreateAppConnection)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateAppConnection(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateAppConnectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) UpdateAppConnection(ctx context.Context, req *appconnectionspb.UpdateAppConnectionRequest, opts ...gax.CallOption) (*UpdateAppConnectionOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "app_connection.name", url.QueryEscape(req.GetAppConnection().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateAppConnection[0:len((*c.CallOptions).UpdateAppConnection):len((*c.CallOptions).UpdateAppConnection)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateAppConnection(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateAppConnectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteAppConnection(ctx context.Context, req *appconnectionspb.DeleteAppConnectionRequest, opts ...gax.CallOption) (*DeleteAppConnectionOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteAppConnection[0:len((*c.CallOptions).DeleteAppConnection):len((*c.CallOptions).DeleteAppConnection)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteAppConnection(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteAppConnectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ResolveAppConnections(ctx context.Context, req *appconnectionspb.ResolveAppConnectionsRequest, opts ...gax.CallOption) *ResolveAppConnectionsResponse_AppConnectionDetailsIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ResolveAppConnections[0:len((*c.CallOptions).ResolveAppConnections):len((*c.CallOptions).ResolveAppConnections)], opts...) + it := &ResolveAppConnectionsResponse_AppConnectionDetailsIterator{} + req = proto.Clone(req).(*appconnectionspb.ResolveAppConnectionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*appconnectionspb.ResolveAppConnectionsResponse_AppConnectionDetails, string, error) { + resp := &appconnectionspb.ResolveAppConnectionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ResolveAppConnections(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAppConnectionDetails(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateAppConnectionOperation manages a long-running operation from CreateAppConnection. +type CreateAppConnectionOperation struct { + lro *longrunning.Operation +} + +// CreateAppConnectionOperation returns a new CreateAppConnectionOperation from a given name. +// The name must be that of a previously created CreateAppConnectionOperation, possibly from a different process. +func (c *gRPCClient) CreateAppConnectionOperation(name string) *CreateAppConnectionOperation { + return &CreateAppConnectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateAppConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*appconnectionspb.AppConnection, error) { + var resp appconnectionspb.AppConnection + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateAppConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*appconnectionspb.AppConnection, error) { + var resp appconnectionspb.AppConnection + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateAppConnectionOperation) Metadata() (*appconnectionspb.AppConnectionOperationMetadata, error) { + var meta appconnectionspb.AppConnectionOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateAppConnectionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateAppConnectionOperation) Name() string { + return op.lro.Name() +} + +// DeleteAppConnectionOperation manages a long-running operation from DeleteAppConnection. +type DeleteAppConnectionOperation struct { + lro *longrunning.Operation +} + +// DeleteAppConnectionOperation returns a new DeleteAppConnectionOperation from a given name. +// The name must be that of a previously created DeleteAppConnectionOperation, possibly from a different process. +func (c *gRPCClient) DeleteAppConnectionOperation(name string) *DeleteAppConnectionOperation { + return &DeleteAppConnectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteAppConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteAppConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteAppConnectionOperation) Metadata() (*appconnectionspb.AppConnectionOperationMetadata, error) { + var meta appconnectionspb.AppConnectionOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteAppConnectionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteAppConnectionOperation) Name() string { + return op.lro.Name() +} + +// UpdateAppConnectionOperation manages a long-running operation from UpdateAppConnection. +type UpdateAppConnectionOperation struct { + lro *longrunning.Operation +} + +// UpdateAppConnectionOperation returns a new UpdateAppConnectionOperation from a given name. +// The name must be that of a previously created UpdateAppConnectionOperation, possibly from a different process. +func (c *gRPCClient) UpdateAppConnectionOperation(name string) *UpdateAppConnectionOperation { + return &UpdateAppConnectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateAppConnectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*appconnectionspb.AppConnection, error) { + var resp appconnectionspb.AppConnection + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateAppConnectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*appconnectionspb.AppConnection, error) { + var resp appconnectionspb.AppConnection + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateAppConnectionOperation) Metadata() (*appconnectionspb.AppConnectionOperationMetadata, error) { + var meta appconnectionspb.AppConnectionOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateAppConnectionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateAppConnectionOperation) Name() string { + return op.lro.Name() +} + +// AppConnectionIterator manages a stream of *appconnectionspb.AppConnection. +type AppConnectionIterator struct { + items []*appconnectionspb.AppConnection + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*appconnectionspb.AppConnection, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *AppConnectionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *AppConnectionIterator) Next() (*appconnectionspb.AppConnection, error) { + var item *appconnectionspb.AppConnection + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *AppConnectionIterator) bufLen() int { + return len(it.items) +} + +func (it *AppConnectionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ResolveAppConnectionsResponse_AppConnectionDetailsIterator manages a stream of *appconnectionspb.ResolveAppConnectionsResponse_AppConnectionDetails. +type ResolveAppConnectionsResponse_AppConnectionDetailsIterator struct { + items []*appconnectionspb.ResolveAppConnectionsResponse_AppConnectionDetails + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*appconnectionspb.ResolveAppConnectionsResponse_AppConnectionDetails, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ResolveAppConnectionsResponse_AppConnectionDetailsIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ResolveAppConnectionsResponse_AppConnectionDetailsIterator) Next() (*appconnectionspb.ResolveAppConnectionsResponse_AppConnectionDetails, error) { + var item *appconnectionspb.ResolveAppConnectionsResponse_AppConnectionDetails + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ResolveAppConnectionsResponse_AppConnectionDetailsIterator) bufLen() int { + return len(it.items) +} + +func (it *ResolveAppConnectionsResponse_AppConnectionDetailsIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/beyondcorp/appconnections/apiv1/app_connections_client_example_test.go b/beyondcorp/appconnections/apiv1/app_connections_client_example_test.go new file mode 100644 index 000000000000..d6c263f8e7ae --- /dev/null +++ b/beyondcorp/appconnections/apiv1/app_connections_client_example_test.go @@ -0,0 +1,453 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package appconnections_test + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + "google.golang.org/api/iterator" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListAppConnections() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.ListAppConnectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#ListAppConnectionsRequest. + } + it := c.ListAppConnections(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetAppConnection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.GetAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#GetAppConnectionRequest. + } + resp, err := c.GetAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateAppConnection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.CreateAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#CreateAppConnectionRequest. + } + op, err := c.CreateAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateAppConnection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.UpdateAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#UpdateAppConnectionRequest. + } + op, err := c.UpdateAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteAppConnection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.DeleteAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#DeleteAppConnectionRequest. + } + op, err := c.DeleteAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ResolveAppConnections() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.ResolveAppConnectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#ResolveAppConnectionsRequest. + } + it := c.ResolveAppConnections(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/beyondcorp/appconnections/apiv1/doc.go b/beyondcorp/appconnections/apiv1/doc.go new file mode 100644 index 000000000000..50eb39749720 --- /dev/null +++ b/beyondcorp/appconnections/apiv1/doc.go @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package appconnections is an auto-generated package for the +// BeyondCorp API. +// +// Beyondcorp Enterprise provides identity and context aware access controls +// for enterprise resources and enables zero-trust access. Using the +// Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem +// connectivity using the App Connector hybrid connectivity solution. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appconnections.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appconnections.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &appconnectionspb.ListAppConnectionsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#ListAppConnectionsRequest. +// } +// it := c.ListAppConnections(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package appconnections // import "cloud.google.com/go/beyondcorp/appconnections/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/beyondcorp/appconnections/apiv1/gapic_metadata.json b/beyondcorp/appconnections/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..6c61c4de13ed --- /dev/null +++ b/beyondcorp/appconnections/apiv1/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.beyondcorp.appconnections.v1", + "libraryPackage": "cloud.google.com/go/beyondcorp/appconnections/apiv1", + "services": { + "AppConnectionsService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateAppConnection": { + "methods": [ + "CreateAppConnection" + ] + }, + "DeleteAppConnection": { + "methods": [ + "DeleteAppConnection" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetAppConnection": { + "methods": [ + "GetAppConnection" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListAppConnections": { + "methods": [ + "ListAppConnections" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ResolveAppConnections": { + "methods": [ + "ResolveAppConnections" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateAppConnection": { + "methods": [ + "UpdateAppConnection" + ] + } + } + } + } + } + } +} diff --git a/beyondcorp/appconnections/apiv1/version.go b/beyondcorp/appconnections/apiv1/version.go new file mode 100644 index 000000000000..8eb6a6347373 --- /dev/null +++ b/beyondcorp/appconnections/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package appconnections + +import "cloud.google.com/go/beyondcorp/internal" + +func init() { + versionClient = internal.Version +} diff --git a/beyondcorp/appconnectors/apiv1/app_connectors_client.go b/beyondcorp/appconnectors/apiv1/app_connectors_client.go new file mode 100644 index 000000000000..3f915e8b8293 --- /dev/null +++ b/beyondcorp/appconnectors/apiv1/app_connectors_client.go @@ -0,0 +1,1138 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package appconnectors + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListAppConnectors []gax.CallOption + GetAppConnector []gax.CallOption + CreateAppConnector []gax.CallOption + UpdateAppConnector []gax.CallOption + DeleteAppConnector []gax.CallOption + ReportStatus []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("beyondcorp.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("beyondcorp.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://beyondcorp.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListAppConnectors: []gax.CallOption{}, + GetAppConnector: []gax.CallOption{}, + CreateAppConnector: []gax.CallOption{}, + UpdateAppConnector: []gax.CallOption{}, + DeleteAppConnector: []gax.CallOption{}, + ReportStatus: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from BeyondCorp API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListAppConnectors(context.Context, *appconnectorspb.ListAppConnectorsRequest, ...gax.CallOption) *AppConnectorIterator + GetAppConnector(context.Context, *appconnectorspb.GetAppConnectorRequest, ...gax.CallOption) (*appconnectorspb.AppConnector, error) + CreateAppConnector(context.Context, *appconnectorspb.CreateAppConnectorRequest, ...gax.CallOption) (*CreateAppConnectorOperation, error) + CreateAppConnectorOperation(name string) *CreateAppConnectorOperation + UpdateAppConnector(context.Context, *appconnectorspb.UpdateAppConnectorRequest, ...gax.CallOption) (*UpdateAppConnectorOperation, error) + UpdateAppConnectorOperation(name string) *UpdateAppConnectorOperation + DeleteAppConnector(context.Context, *appconnectorspb.DeleteAppConnectorRequest, ...gax.CallOption) (*DeleteAppConnectorOperation, error) + DeleteAppConnectorOperation(name string) *DeleteAppConnectorOperation + ReportStatus(context.Context, *appconnectorspb.ReportStatusRequest, ...gax.CallOption) (*ReportStatusOperation, error) + ReportStatusOperation(name string) *ReportStatusOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with BeyondCorp API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe AppConnectorsService exposes the following resource: +// +// AppConnectors, named as follows: +// projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}. +// +// The AppConnectorsService provides methods to manage +// (create/read/update/delete) BeyondCorp AppConnectors. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListAppConnectors lists AppConnectors in a given project and location. +func (c *Client) ListAppConnectors(ctx context.Context, req *appconnectorspb.ListAppConnectorsRequest, opts ...gax.CallOption) *AppConnectorIterator { + return c.internalClient.ListAppConnectors(ctx, req, opts...) +} + +// GetAppConnector gets details of a single AppConnector. +func (c *Client) GetAppConnector(ctx context.Context, req *appconnectorspb.GetAppConnectorRequest, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + return c.internalClient.GetAppConnector(ctx, req, opts...) +} + +// CreateAppConnector creates a new AppConnector in a given project and location. +func (c *Client) CreateAppConnector(ctx context.Context, req *appconnectorspb.CreateAppConnectorRequest, opts ...gax.CallOption) (*CreateAppConnectorOperation, error) { + return c.internalClient.CreateAppConnector(ctx, req, opts...) +} + +// CreateAppConnectorOperation returns a new CreateAppConnectorOperation from a given name. +// The name must be that of a previously created CreateAppConnectorOperation, possibly from a different process. +func (c *Client) CreateAppConnectorOperation(name string) *CreateAppConnectorOperation { + return c.internalClient.CreateAppConnectorOperation(name) +} + +// UpdateAppConnector updates the parameters of a single AppConnector. +func (c *Client) UpdateAppConnector(ctx context.Context, req *appconnectorspb.UpdateAppConnectorRequest, opts ...gax.CallOption) (*UpdateAppConnectorOperation, error) { + return c.internalClient.UpdateAppConnector(ctx, req, opts...) +} + +// UpdateAppConnectorOperation returns a new UpdateAppConnectorOperation from a given name. +// The name must be that of a previously created UpdateAppConnectorOperation, possibly from a different process. +func (c *Client) UpdateAppConnectorOperation(name string) *UpdateAppConnectorOperation { + return c.internalClient.UpdateAppConnectorOperation(name) +} + +// DeleteAppConnector deletes a single AppConnector. +func (c *Client) DeleteAppConnector(ctx context.Context, req *appconnectorspb.DeleteAppConnectorRequest, opts ...gax.CallOption) (*DeleteAppConnectorOperation, error) { + return c.internalClient.DeleteAppConnector(ctx, req, opts...) +} + +// DeleteAppConnectorOperation returns a new DeleteAppConnectorOperation from a given name. +// The name must be that of a previously created DeleteAppConnectorOperation, possibly from a different process. +func (c *Client) DeleteAppConnectorOperation(name string) *DeleteAppConnectorOperation { + return c.internalClient.DeleteAppConnectorOperation(name) +} + +// ReportStatus report status for a given connector. +func (c *Client) ReportStatus(ctx context.Context, req *appconnectorspb.ReportStatusRequest, opts ...gax.CallOption) (*ReportStatusOperation, error) { + return c.internalClient.ReportStatus(ctx, req, opts...) +} + +// ReportStatusOperation returns a new ReportStatusOperation from a given name. +// The name must be that of a previously created ReportStatusOperation, possibly from a different process. +func (c *Client) ReportStatusOperation(name string) *ReportStatusOperation { + return c.internalClient.ReportStatusOperation(name) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with BeyondCorp API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client appconnectorspb.AppConnectorsServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new app connectors service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe AppConnectorsService exposes the following resource: +// +// AppConnectors, named as follows: +// projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}. +// +// The AppConnectorsService provides methods to manage +// (create/read/update/delete) BeyondCorp AppConnectors. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: appconnectorspb.NewAppConnectorsServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) ListAppConnectors(ctx context.Context, req *appconnectorspb.ListAppConnectorsRequest, opts ...gax.CallOption) *AppConnectorIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListAppConnectors[0:len((*c.CallOptions).ListAppConnectors):len((*c.CallOptions).ListAppConnectors)], opts...) + it := &AppConnectorIterator{} + req = proto.Clone(req).(*appconnectorspb.ListAppConnectorsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*appconnectorspb.AppConnector, string, error) { + resp := &appconnectorspb.ListAppConnectorsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListAppConnectors(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAppConnectors(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetAppConnector(ctx context.Context, req *appconnectorspb.GetAppConnectorRequest, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAppConnector[0:len((*c.CallOptions).GetAppConnector):len((*c.CallOptions).GetAppConnector)], opts...) + var resp *appconnectorspb.AppConnector + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetAppConnector(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateAppConnector(ctx context.Context, req *appconnectorspb.CreateAppConnectorRequest, opts ...gax.CallOption) (*CreateAppConnectorOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateAppConnector[0:len((*c.CallOptions).CreateAppConnector):len((*c.CallOptions).CreateAppConnector)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateAppConnector(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateAppConnectorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) UpdateAppConnector(ctx context.Context, req *appconnectorspb.UpdateAppConnectorRequest, opts ...gax.CallOption) (*UpdateAppConnectorOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "app_connector.name", url.QueryEscape(req.GetAppConnector().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateAppConnector[0:len((*c.CallOptions).UpdateAppConnector):len((*c.CallOptions).UpdateAppConnector)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateAppConnector(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateAppConnectorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteAppConnector(ctx context.Context, req *appconnectorspb.DeleteAppConnectorRequest, opts ...gax.CallOption) (*DeleteAppConnectorOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteAppConnector[0:len((*c.CallOptions).DeleteAppConnector):len((*c.CallOptions).DeleteAppConnector)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteAppConnector(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteAppConnectorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ReportStatus(ctx context.Context, req *appconnectorspb.ReportStatusRequest, opts ...gax.CallOption) (*ReportStatusOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "app_connector", url.QueryEscape(req.GetAppConnector()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ReportStatus[0:len((*c.CallOptions).ReportStatus):len((*c.CallOptions).ReportStatus)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ReportStatus(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ReportStatusOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateAppConnectorOperation manages a long-running operation from CreateAppConnector. +type CreateAppConnectorOperation struct { + lro *longrunning.Operation +} + +// CreateAppConnectorOperation returns a new CreateAppConnectorOperation from a given name. +// The name must be that of a previously created CreateAppConnectorOperation, possibly from a different process. +func (c *gRPCClient) CreateAppConnectorOperation(name string) *CreateAppConnectorOperation { + return &CreateAppConnectorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateAppConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + var resp appconnectorspb.AppConnector + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateAppConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + var resp appconnectorspb.AppConnector + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateAppConnectorOperation) Metadata() (*appconnectorspb.AppConnectorOperationMetadata, error) { + var meta appconnectorspb.AppConnectorOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateAppConnectorOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateAppConnectorOperation) Name() string { + return op.lro.Name() +} + +// DeleteAppConnectorOperation manages a long-running operation from DeleteAppConnector. +type DeleteAppConnectorOperation struct { + lro *longrunning.Operation +} + +// DeleteAppConnectorOperation returns a new DeleteAppConnectorOperation from a given name. +// The name must be that of a previously created DeleteAppConnectorOperation, possibly from a different process. +func (c *gRPCClient) DeleteAppConnectorOperation(name string) *DeleteAppConnectorOperation { + return &DeleteAppConnectorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteAppConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteAppConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteAppConnectorOperation) Metadata() (*appconnectorspb.AppConnectorOperationMetadata, error) { + var meta appconnectorspb.AppConnectorOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteAppConnectorOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteAppConnectorOperation) Name() string { + return op.lro.Name() +} + +// ReportStatusOperation manages a long-running operation from ReportStatus. +type ReportStatusOperation struct { + lro *longrunning.Operation +} + +// ReportStatusOperation returns a new ReportStatusOperation from a given name. +// The name must be that of a previously created ReportStatusOperation, possibly from a different process. +func (c *gRPCClient) ReportStatusOperation(name string) *ReportStatusOperation { + return &ReportStatusOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ReportStatusOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + var resp appconnectorspb.AppConnector + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ReportStatusOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + var resp appconnectorspb.AppConnector + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ReportStatusOperation) Metadata() (*appconnectorspb.AppConnectorOperationMetadata, error) { + var meta appconnectorspb.AppConnectorOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ReportStatusOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ReportStatusOperation) Name() string { + return op.lro.Name() +} + +// UpdateAppConnectorOperation manages a long-running operation from UpdateAppConnector. +type UpdateAppConnectorOperation struct { + lro *longrunning.Operation +} + +// UpdateAppConnectorOperation returns a new UpdateAppConnectorOperation from a given name. +// The name must be that of a previously created UpdateAppConnectorOperation, possibly from a different process. +func (c *gRPCClient) UpdateAppConnectorOperation(name string) *UpdateAppConnectorOperation { + return &UpdateAppConnectorOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateAppConnectorOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + var resp appconnectorspb.AppConnector + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateAppConnectorOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*appconnectorspb.AppConnector, error) { + var resp appconnectorspb.AppConnector + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateAppConnectorOperation) Metadata() (*appconnectorspb.AppConnectorOperationMetadata, error) { + var meta appconnectorspb.AppConnectorOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateAppConnectorOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateAppConnectorOperation) Name() string { + return op.lro.Name() +} + +// AppConnectorIterator manages a stream of *appconnectorspb.AppConnector. +type AppConnectorIterator struct { + items []*appconnectorspb.AppConnector + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*appconnectorspb.AppConnector, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *AppConnectorIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *AppConnectorIterator) Next() (*appconnectorspb.AppConnector, error) { + var item *appconnectorspb.AppConnector + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *AppConnectorIterator) bufLen() int { + return len(it.items) +} + +func (it *AppConnectorIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/beyondcorp/appconnectors/apiv1/app_connectors_client_example_test.go b/beyondcorp/appconnectors/apiv1/app_connectors_client_example_test.go new file mode 100644 index 000000000000..66ec180331b4 --- /dev/null +++ b/beyondcorp/appconnectors/apiv1/app_connectors_client_example_test.go @@ -0,0 +1,452 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package appconnectors_test + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + "google.golang.org/api/iterator" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListAppConnectors() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.ListAppConnectorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#ListAppConnectorsRequest. + } + it := c.ListAppConnectors(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetAppConnector() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.GetAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#GetAppConnectorRequest. + } + resp, err := c.GetAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateAppConnector() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.CreateAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#CreateAppConnectorRequest. + } + op, err := c.CreateAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateAppConnector() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.UpdateAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#UpdateAppConnectorRequest. + } + op, err := c.UpdateAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteAppConnector() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.DeleteAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#DeleteAppConnectorRequest. + } + op, err := c.DeleteAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ReportStatus() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.ReportStatusRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#ReportStatusRequest. + } + op, err := c.ReportStatus(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/beyondcorp/appconnectors/apiv1/doc.go b/beyondcorp/appconnectors/apiv1/doc.go new file mode 100644 index 000000000000..cfefaae25201 --- /dev/null +++ b/beyondcorp/appconnectors/apiv1/doc.go @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package appconnectors is an auto-generated package for the +// BeyondCorp API. +// +// Beyondcorp Enterprise provides identity and context aware access controls +// for enterprise resources and enables zero-trust access. Using the +// Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem +// connectivity using the App Connector hybrid connectivity solution. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appconnectors.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appconnectors.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &appconnectorspb.ListAppConnectorsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#ListAppConnectorsRequest. +// } +// it := c.ListAppConnectors(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package appconnectors // import "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/beyondcorp/appconnectors/apiv1/gapic_metadata.json b/beyondcorp/appconnectors/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..782b03350947 --- /dev/null +++ b/beyondcorp/appconnectors/apiv1/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.beyondcorp.appconnectors.v1", + "libraryPackage": "cloud.google.com/go/beyondcorp/appconnectors/apiv1", + "services": { + "AppConnectorsService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateAppConnector": { + "methods": [ + "CreateAppConnector" + ] + }, + "DeleteAppConnector": { + "methods": [ + "DeleteAppConnector" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetAppConnector": { + "methods": [ + "GetAppConnector" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListAppConnectors": { + "methods": [ + "ListAppConnectors" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ReportStatus": { + "methods": [ + "ReportStatus" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateAppConnector": { + "methods": [ + "UpdateAppConnector" + ] + } + } + } + } + } + } +} diff --git a/beyondcorp/appconnectors/apiv1/version.go b/beyondcorp/appconnectors/apiv1/version.go new file mode 100644 index 000000000000..198ce10ea656 --- /dev/null +++ b/beyondcorp/appconnectors/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package appconnectors + +import "cloud.google.com/go/beyondcorp/internal" + +func init() { + versionClient = internal.Version +} diff --git a/beyondcorp/appgateways/apiv1/app_gateways_client.go b/beyondcorp/appgateways/apiv1/app_gateways_client.go new file mode 100644 index 000000000000..d165adeba174 --- /dev/null +++ b/beyondcorp/appgateways/apiv1/app_gateways_client.go @@ -0,0 +1,932 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package appgateways + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + appgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListAppGateways []gax.CallOption + GetAppGateway []gax.CallOption + CreateAppGateway []gax.CallOption + DeleteAppGateway []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("beyondcorp.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("beyondcorp.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://beyondcorp.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListAppGateways: []gax.CallOption{}, + GetAppGateway: []gax.CallOption{}, + CreateAppGateway: []gax.CallOption{}, + DeleteAppGateway: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from BeyondCorp API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListAppGateways(context.Context, *appgatewayspb.ListAppGatewaysRequest, ...gax.CallOption) *AppGatewayIterator + GetAppGateway(context.Context, *appgatewayspb.GetAppGatewayRequest, ...gax.CallOption) (*appgatewayspb.AppGateway, error) + CreateAppGateway(context.Context, *appgatewayspb.CreateAppGatewayRequest, ...gax.CallOption) (*CreateAppGatewayOperation, error) + CreateAppGatewayOperation(name string) *CreateAppGatewayOperation + DeleteAppGateway(context.Context, *appgatewayspb.DeleteAppGatewayRequest, ...gax.CallOption) (*DeleteAppGatewayOperation, error) + DeleteAppGatewayOperation(name string) *DeleteAppGatewayOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with BeyondCorp API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe AppGatewaysService exposes the following resources: +// +// AppGateways, named as follows: +// projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}. +// +// The AppGatewaysService service provides methods to manage +// (create/read/update/delete) BeyondCorp AppGateways. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListAppGateways lists AppGateways in a given project and location. +func (c *Client) ListAppGateways(ctx context.Context, req *appgatewayspb.ListAppGatewaysRequest, opts ...gax.CallOption) *AppGatewayIterator { + return c.internalClient.ListAppGateways(ctx, req, opts...) +} + +// GetAppGateway gets details of a single AppGateway. +func (c *Client) GetAppGateway(ctx context.Context, req *appgatewayspb.GetAppGatewayRequest, opts ...gax.CallOption) (*appgatewayspb.AppGateway, error) { + return c.internalClient.GetAppGateway(ctx, req, opts...) +} + +// CreateAppGateway creates a new AppGateway in a given project and location. +func (c *Client) CreateAppGateway(ctx context.Context, req *appgatewayspb.CreateAppGatewayRequest, opts ...gax.CallOption) (*CreateAppGatewayOperation, error) { + return c.internalClient.CreateAppGateway(ctx, req, opts...) +} + +// CreateAppGatewayOperation returns a new CreateAppGatewayOperation from a given name. +// The name must be that of a previously created CreateAppGatewayOperation, possibly from a different process. +func (c *Client) CreateAppGatewayOperation(name string) *CreateAppGatewayOperation { + return c.internalClient.CreateAppGatewayOperation(name) +} + +// DeleteAppGateway deletes a single AppGateway. +func (c *Client) DeleteAppGateway(ctx context.Context, req *appgatewayspb.DeleteAppGatewayRequest, opts ...gax.CallOption) (*DeleteAppGatewayOperation, error) { + return c.internalClient.DeleteAppGateway(ctx, req, opts...) +} + +// DeleteAppGatewayOperation returns a new DeleteAppGatewayOperation from a given name. +// The name must be that of a previously created DeleteAppGatewayOperation, possibly from a different process. +func (c *Client) DeleteAppGatewayOperation(name string) *DeleteAppGatewayOperation { + return c.internalClient.DeleteAppGatewayOperation(name) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with BeyondCorp API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client appgatewayspb.AppGatewaysServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new app gateways service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe AppGatewaysService exposes the following resources: +// +// AppGateways, named as follows: +// projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}. +// +// The AppGatewaysService service provides methods to manage +// (create/read/update/delete) BeyondCorp AppGateways. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: appgatewayspb.NewAppGatewaysServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) ListAppGateways(ctx context.Context, req *appgatewayspb.ListAppGatewaysRequest, opts ...gax.CallOption) *AppGatewayIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListAppGateways[0:len((*c.CallOptions).ListAppGateways):len((*c.CallOptions).ListAppGateways)], opts...) + it := &AppGatewayIterator{} + req = proto.Clone(req).(*appgatewayspb.ListAppGatewaysRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*appgatewayspb.AppGateway, string, error) { + resp := &appgatewayspb.ListAppGatewaysResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListAppGateways(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAppGateways(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetAppGateway(ctx context.Context, req *appgatewayspb.GetAppGatewayRequest, opts ...gax.CallOption) (*appgatewayspb.AppGateway, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAppGateway[0:len((*c.CallOptions).GetAppGateway):len((*c.CallOptions).GetAppGateway)], opts...) + var resp *appgatewayspb.AppGateway + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetAppGateway(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateAppGateway(ctx context.Context, req *appgatewayspb.CreateAppGatewayRequest, opts ...gax.CallOption) (*CreateAppGatewayOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateAppGateway[0:len((*c.CallOptions).CreateAppGateway):len((*c.CallOptions).CreateAppGateway)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateAppGateway(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateAppGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteAppGateway(ctx context.Context, req *appgatewayspb.DeleteAppGatewayRequest, opts ...gax.CallOption) (*DeleteAppGatewayOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteAppGateway[0:len((*c.CallOptions).DeleteAppGateway):len((*c.CallOptions).DeleteAppGateway)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteAppGateway(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteAppGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateAppGatewayOperation manages a long-running operation from CreateAppGateway. +type CreateAppGatewayOperation struct { + lro *longrunning.Operation +} + +// CreateAppGatewayOperation returns a new CreateAppGatewayOperation from a given name. +// The name must be that of a previously created CreateAppGatewayOperation, possibly from a different process. +func (c *gRPCClient) CreateAppGatewayOperation(name string) *CreateAppGatewayOperation { + return &CreateAppGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateAppGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*appgatewayspb.AppGateway, error) { + var resp appgatewayspb.AppGateway + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateAppGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*appgatewayspb.AppGateway, error) { + var resp appgatewayspb.AppGateway + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateAppGatewayOperation) Metadata() (*appgatewayspb.AppGatewayOperationMetadata, error) { + var meta appgatewayspb.AppGatewayOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateAppGatewayOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateAppGatewayOperation) Name() string { + return op.lro.Name() +} + +// DeleteAppGatewayOperation manages a long-running operation from DeleteAppGateway. +type DeleteAppGatewayOperation struct { + lro *longrunning.Operation +} + +// DeleteAppGatewayOperation returns a new DeleteAppGatewayOperation from a given name. +// The name must be that of a previously created DeleteAppGatewayOperation, possibly from a different process. +func (c *gRPCClient) DeleteAppGatewayOperation(name string) *DeleteAppGatewayOperation { + return &DeleteAppGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteAppGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteAppGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteAppGatewayOperation) Metadata() (*appgatewayspb.AppGatewayOperationMetadata, error) { + var meta appgatewayspb.AppGatewayOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteAppGatewayOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteAppGatewayOperation) Name() string { + return op.lro.Name() +} + +// AppGatewayIterator manages a stream of *appgatewayspb.AppGateway. +type AppGatewayIterator struct { + items []*appgatewayspb.AppGateway + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*appgatewayspb.AppGateway, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *AppGatewayIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *AppGatewayIterator) Next() (*appgatewayspb.AppGateway, error) { + var item *appgatewayspb.AppGateway + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *AppGatewayIterator) bufLen() int { + return len(it.items) +} + +func (it *AppGatewayIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/beyondcorp/appgateways/apiv1/app_gateways_client_example_test.go b/beyondcorp/appgateways/apiv1/app_gateways_client_example_test.go new file mode 100644 index 000000000000..b2b6018c3104 --- /dev/null +++ b/beyondcorp/appgateways/apiv1/app_gateways_client_example_test.go @@ -0,0 +1,392 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package appgateways_test + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + "google.golang.org/api/iterator" + appgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListAppGateways() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.ListAppGatewaysRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#ListAppGatewaysRequest. + } + it := c.ListAppGateways(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetAppGateway() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.GetAppGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#GetAppGatewayRequest. + } + resp, err := c.GetAppGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateAppGateway() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.CreateAppGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#CreateAppGatewayRequest. + } + op, err := c.CreateAppGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteAppGateway() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.DeleteAppGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#DeleteAppGatewayRequest. + } + op, err := c.DeleteAppGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/beyondcorp/appgateways/apiv1/doc.go b/beyondcorp/appgateways/apiv1/doc.go new file mode 100644 index 000000000000..06709f97f5b1 --- /dev/null +++ b/beyondcorp/appgateways/apiv1/doc.go @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package appgateways is an auto-generated package for the +// BeyondCorp API. +// +// Beyondcorp Enterprise provides identity and context aware access controls +// for enterprise resources and enables zero-trust access. Using the +// Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem +// connectivity using the App Connector hybrid connectivity solution. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appgateways.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := appgateways.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &appgatewayspb.ListAppGatewaysRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#ListAppGatewaysRequest. +// } +// it := c.ListAppGateways(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package appgateways // import "cloud.google.com/go/beyondcorp/appgateways/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/beyondcorp/appgateways/apiv1/gapic_metadata.json b/beyondcorp/appgateways/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..82c71686b14f --- /dev/null +++ b/beyondcorp/appgateways/apiv1/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.beyondcorp.appgateways.v1", + "libraryPackage": "cloud.google.com/go/beyondcorp/appgateways/apiv1", + "services": { + "AppGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateAppGateway": { + "methods": [ + "CreateAppGateway" + ] + }, + "DeleteAppGateway": { + "methods": [ + "DeleteAppGateway" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetAppGateway": { + "methods": [ + "GetAppGateway" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListAppGateways": { + "methods": [ + "ListAppGateways" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + } + } + } + } + } + } +} diff --git a/beyondcorp/appgateways/apiv1/version.go b/beyondcorp/appgateways/apiv1/version.go new file mode 100644 index 000000000000..31355653b32b --- /dev/null +++ b/beyondcorp/appgateways/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package appgateways + +import "cloud.google.com/go/beyondcorp/internal" + +func init() { + versionClient = internal.Version +} diff --git a/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go new file mode 100644 index 000000000000..3510f0da5d00 --- /dev/null +++ b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client.go @@ -0,0 +1,1029 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package clientconnectorservices + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListClientConnectorServices []gax.CallOption + GetClientConnectorService []gax.CallOption + CreateClientConnectorService []gax.CallOption + UpdateClientConnectorService []gax.CallOption + DeleteClientConnectorService []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("beyondcorp.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("beyondcorp.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://beyondcorp.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListClientConnectorServices: []gax.CallOption{}, + GetClientConnectorService: []gax.CallOption{}, + CreateClientConnectorService: []gax.CallOption{}, + UpdateClientConnectorService: []gax.CallOption{}, + DeleteClientConnectorService: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from BeyondCorp API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListClientConnectorServices(context.Context, *clientconnectorservicespb.ListClientConnectorServicesRequest, ...gax.CallOption) *ClientConnectorServiceIterator + GetClientConnectorService(context.Context, *clientconnectorservicespb.GetClientConnectorServiceRequest, ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) + CreateClientConnectorService(context.Context, *clientconnectorservicespb.CreateClientConnectorServiceRequest, ...gax.CallOption) (*CreateClientConnectorServiceOperation, error) + CreateClientConnectorServiceOperation(name string) *CreateClientConnectorServiceOperation + UpdateClientConnectorService(context.Context, *clientconnectorservicespb.UpdateClientConnectorServiceRequest, ...gax.CallOption) (*UpdateClientConnectorServiceOperation, error) + UpdateClientConnectorServiceOperation(name string) *UpdateClientConnectorServiceOperation + DeleteClientConnectorService(context.Context, *clientconnectorservicespb.DeleteClientConnectorServiceRequest, ...gax.CallOption) (*DeleteClientConnectorServiceOperation, error) + DeleteClientConnectorServiceOperation(name string) *DeleteClientConnectorServiceOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with BeyondCorp API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe ClientConnectorServicesService exposes the following resources: +// +// Client Connector Services, named as follows: +// projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListClientConnectorServices lists ClientConnectorServices in a given project and location. +func (c *Client) ListClientConnectorServices(ctx context.Context, req *clientconnectorservicespb.ListClientConnectorServicesRequest, opts ...gax.CallOption) *ClientConnectorServiceIterator { + return c.internalClient.ListClientConnectorServices(ctx, req, opts...) +} + +// GetClientConnectorService gets details of a single ClientConnectorService. +func (c *Client) GetClientConnectorService(ctx context.Context, req *clientconnectorservicespb.GetClientConnectorServiceRequest, opts ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) { + return c.internalClient.GetClientConnectorService(ctx, req, opts...) +} + +// CreateClientConnectorService creates a new ClientConnectorService in a given project and location. +func (c *Client) CreateClientConnectorService(ctx context.Context, req *clientconnectorservicespb.CreateClientConnectorServiceRequest, opts ...gax.CallOption) (*CreateClientConnectorServiceOperation, error) { + return c.internalClient.CreateClientConnectorService(ctx, req, opts...) +} + +// CreateClientConnectorServiceOperation returns a new CreateClientConnectorServiceOperation from a given name. +// The name must be that of a previously created CreateClientConnectorServiceOperation, possibly from a different process. +func (c *Client) CreateClientConnectorServiceOperation(name string) *CreateClientConnectorServiceOperation { + return c.internalClient.CreateClientConnectorServiceOperation(name) +} + +// UpdateClientConnectorService updates the parameters of a single ClientConnectorService. +func (c *Client) UpdateClientConnectorService(ctx context.Context, req *clientconnectorservicespb.UpdateClientConnectorServiceRequest, opts ...gax.CallOption) (*UpdateClientConnectorServiceOperation, error) { + return c.internalClient.UpdateClientConnectorService(ctx, req, opts...) +} + +// UpdateClientConnectorServiceOperation returns a new UpdateClientConnectorServiceOperation from a given name. +// The name must be that of a previously created UpdateClientConnectorServiceOperation, possibly from a different process. +func (c *Client) UpdateClientConnectorServiceOperation(name string) *UpdateClientConnectorServiceOperation { + return c.internalClient.UpdateClientConnectorServiceOperation(name) +} + +// DeleteClientConnectorService deletes a single ClientConnectorService. +func (c *Client) DeleteClientConnectorService(ctx context.Context, req *clientconnectorservicespb.DeleteClientConnectorServiceRequest, opts ...gax.CallOption) (*DeleteClientConnectorServiceOperation, error) { + return c.internalClient.DeleteClientConnectorService(ctx, req, opts...) +} + +// DeleteClientConnectorServiceOperation returns a new DeleteClientConnectorServiceOperation from a given name. +// The name must be that of a previously created DeleteClientConnectorServiceOperation, possibly from a different process. +func (c *Client) DeleteClientConnectorServiceOperation(name string) *DeleteClientConnectorServiceOperation { + return c.internalClient.DeleteClientConnectorServiceOperation(name) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with BeyondCorp API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client clientconnectorservicespb.ClientConnectorServicesServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new client connector services service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe ClientConnectorServicesService exposes the following resources: +// +// Client Connector Services, named as follows: +// projects/{project_id}/locations/{location_id}/client_connector_services/{client_connector_service_id}. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: clientconnectorservicespb.NewClientConnectorServicesServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) ListClientConnectorServices(ctx context.Context, req *clientconnectorservicespb.ListClientConnectorServicesRequest, opts ...gax.CallOption) *ClientConnectorServiceIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListClientConnectorServices[0:len((*c.CallOptions).ListClientConnectorServices):len((*c.CallOptions).ListClientConnectorServices)], opts...) + it := &ClientConnectorServiceIterator{} + req = proto.Clone(req).(*clientconnectorservicespb.ListClientConnectorServicesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*clientconnectorservicespb.ClientConnectorService, string, error) { + resp := &clientconnectorservicespb.ListClientConnectorServicesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListClientConnectorServices(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetClientConnectorServices(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetClientConnectorService(ctx context.Context, req *clientconnectorservicespb.GetClientConnectorServiceRequest, opts ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetClientConnectorService[0:len((*c.CallOptions).GetClientConnectorService):len((*c.CallOptions).GetClientConnectorService)], opts...) + var resp *clientconnectorservicespb.ClientConnectorService + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetClientConnectorService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateClientConnectorService(ctx context.Context, req *clientconnectorservicespb.CreateClientConnectorServiceRequest, opts ...gax.CallOption) (*CreateClientConnectorServiceOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateClientConnectorService[0:len((*c.CallOptions).CreateClientConnectorService):len((*c.CallOptions).CreateClientConnectorService)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateClientConnectorService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateClientConnectorServiceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) UpdateClientConnectorService(ctx context.Context, req *clientconnectorservicespb.UpdateClientConnectorServiceRequest, opts ...gax.CallOption) (*UpdateClientConnectorServiceOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "client_connector_service.name", url.QueryEscape(req.GetClientConnectorService().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateClientConnectorService[0:len((*c.CallOptions).UpdateClientConnectorService):len((*c.CallOptions).UpdateClientConnectorService)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateClientConnectorService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateClientConnectorServiceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteClientConnectorService(ctx context.Context, req *clientconnectorservicespb.DeleteClientConnectorServiceRequest, opts ...gax.CallOption) (*DeleteClientConnectorServiceOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteClientConnectorService[0:len((*c.CallOptions).DeleteClientConnectorService):len((*c.CallOptions).DeleteClientConnectorService)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteClientConnectorService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteClientConnectorServiceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateClientConnectorServiceOperation manages a long-running operation from CreateClientConnectorService. +type CreateClientConnectorServiceOperation struct { + lro *longrunning.Operation +} + +// CreateClientConnectorServiceOperation returns a new CreateClientConnectorServiceOperation from a given name. +// The name must be that of a previously created CreateClientConnectorServiceOperation, possibly from a different process. +func (c *gRPCClient) CreateClientConnectorServiceOperation(name string) *CreateClientConnectorServiceOperation { + return &CreateClientConnectorServiceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateClientConnectorServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) { + var resp clientconnectorservicespb.ClientConnectorService + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateClientConnectorServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) { + var resp clientconnectorservicespb.ClientConnectorService + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateClientConnectorServiceOperation) Metadata() (*clientconnectorservicespb.ClientConnectorServiceOperationMetadata, error) { + var meta clientconnectorservicespb.ClientConnectorServiceOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateClientConnectorServiceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateClientConnectorServiceOperation) Name() string { + return op.lro.Name() +} + +// DeleteClientConnectorServiceOperation manages a long-running operation from DeleteClientConnectorService. +type DeleteClientConnectorServiceOperation struct { + lro *longrunning.Operation +} + +// DeleteClientConnectorServiceOperation returns a new DeleteClientConnectorServiceOperation from a given name. +// The name must be that of a previously created DeleteClientConnectorServiceOperation, possibly from a different process. +func (c *gRPCClient) DeleteClientConnectorServiceOperation(name string) *DeleteClientConnectorServiceOperation { + return &DeleteClientConnectorServiceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteClientConnectorServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteClientConnectorServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteClientConnectorServiceOperation) Metadata() (*clientconnectorservicespb.ClientConnectorServiceOperationMetadata, error) { + var meta clientconnectorservicespb.ClientConnectorServiceOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteClientConnectorServiceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteClientConnectorServiceOperation) Name() string { + return op.lro.Name() +} + +// UpdateClientConnectorServiceOperation manages a long-running operation from UpdateClientConnectorService. +type UpdateClientConnectorServiceOperation struct { + lro *longrunning.Operation +} + +// UpdateClientConnectorServiceOperation returns a new UpdateClientConnectorServiceOperation from a given name. +// The name must be that of a previously created UpdateClientConnectorServiceOperation, possibly from a different process. +func (c *gRPCClient) UpdateClientConnectorServiceOperation(name string) *UpdateClientConnectorServiceOperation { + return &UpdateClientConnectorServiceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateClientConnectorServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) { + var resp clientconnectorservicespb.ClientConnectorService + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateClientConnectorServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clientconnectorservicespb.ClientConnectorService, error) { + var resp clientconnectorservicespb.ClientConnectorService + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateClientConnectorServiceOperation) Metadata() (*clientconnectorservicespb.ClientConnectorServiceOperationMetadata, error) { + var meta clientconnectorservicespb.ClientConnectorServiceOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateClientConnectorServiceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateClientConnectorServiceOperation) Name() string { + return op.lro.Name() +} + +// ClientConnectorServiceIterator manages a stream of *clientconnectorservicespb.ClientConnectorService. +type ClientConnectorServiceIterator struct { + items []*clientconnectorservicespb.ClientConnectorService + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*clientconnectorservicespb.ClientConnectorService, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ClientConnectorServiceIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ClientConnectorServiceIterator) Next() (*clientconnectorservicespb.ClientConnectorService, error) { + var item *clientconnectorservicespb.ClientConnectorService + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ClientConnectorServiceIterator) bufLen() int { + return len(it.items) +} + +func (it *ClientConnectorServiceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_test.go b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_test.go new file mode 100644 index 000000000000..b195227abc4e --- /dev/null +++ b/beyondcorp/clientconnectorservices/apiv1/client_connector_services_client_example_test.go @@ -0,0 +1,422 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package clientconnectorservices_test + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + "google.golang.org/api/iterator" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListClientConnectorServices() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.ListClientConnectorServicesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#ListClientConnectorServicesRequest. + } + it := c.ListClientConnectorServices(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetClientConnectorService() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.GetClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#GetClientConnectorServiceRequest. + } + resp, err := c.GetClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateClientConnectorService() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.CreateClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#CreateClientConnectorServiceRequest. + } + op, err := c.CreateClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateClientConnectorService() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.UpdateClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#UpdateClientConnectorServiceRequest. + } + op, err := c.UpdateClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteClientConnectorService() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.DeleteClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#DeleteClientConnectorServiceRequest. + } + op, err := c.DeleteClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/beyondcorp/clientconnectorservices/apiv1/doc.go b/beyondcorp/clientconnectorservices/apiv1/doc.go new file mode 100644 index 000000000000..624a7799fe7a --- /dev/null +++ b/beyondcorp/clientconnectorservices/apiv1/doc.go @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package clientconnectorservices is an auto-generated package for the +// BeyondCorp API. +// +// Beyondcorp Enterprise provides identity and context aware access controls +// for enterprise resources and enables zero-trust access. Using the +// Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem +// connectivity using the App Connector hybrid connectivity solution. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := clientconnectorservices.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := clientconnectorservices.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &clientconnectorservicespb.ListClientConnectorServicesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#ListClientConnectorServicesRequest. +// } +// it := c.ListClientConnectorServices(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package clientconnectorservices // import "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/beyondcorp/clientconnectorservices/apiv1/gapic_metadata.json b/beyondcorp/clientconnectorservices/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..0e24b7032096 --- /dev/null +++ b/beyondcorp/clientconnectorservices/apiv1/gapic_metadata.json @@ -0,0 +1,88 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.beyondcorp.clientconnectorservices.v1", + "libraryPackage": "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1", + "services": { + "ClientConnectorServicesService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateClientConnectorService": { + "methods": [ + "CreateClientConnectorService" + ] + }, + "DeleteClientConnectorService": { + "methods": [ + "DeleteClientConnectorService" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetClientConnectorService": { + "methods": [ + "GetClientConnectorService" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListClientConnectorServices": { + "methods": [ + "ListClientConnectorServices" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateClientConnectorService": { + "methods": [ + "UpdateClientConnectorService" + ] + } + } + } + } + } + } +} diff --git a/beyondcorp/clientconnectorservices/apiv1/version.go b/beyondcorp/clientconnectorservices/apiv1/version.go new file mode 100644 index 000000000000..fb2838e06494 --- /dev/null +++ b/beyondcorp/clientconnectorservices/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package clientconnectorservices + +import "cloud.google.com/go/beyondcorp/internal" + +func init() { + versionClient = internal.Version +} diff --git a/beyondcorp/clientgateways/apiv1/client_gateways_client.go b/beyondcorp/clientgateways/apiv1/client_gateways_client.go new file mode 100644 index 000000000000..da46afbf4b93 --- /dev/null +++ b/beyondcorp/clientgateways/apiv1/client_gateways_client.go @@ -0,0 +1,926 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package clientgateways + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + clientgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListClientGateways []gax.CallOption + GetClientGateway []gax.CallOption + CreateClientGateway []gax.CallOption + DeleteClientGateway []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("beyondcorp.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("beyondcorp.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://beyondcorp.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListClientGateways: []gax.CallOption{}, + GetClientGateway: []gax.CallOption{}, + CreateClientGateway: []gax.CallOption{}, + DeleteClientGateway: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from BeyondCorp API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListClientGateways(context.Context, *clientgatewayspb.ListClientGatewaysRequest, ...gax.CallOption) *ClientGatewayIterator + GetClientGateway(context.Context, *clientgatewayspb.GetClientGatewayRequest, ...gax.CallOption) (*clientgatewayspb.ClientGateway, error) + CreateClientGateway(context.Context, *clientgatewayspb.CreateClientGatewayRequest, ...gax.CallOption) (*CreateClientGatewayOperation, error) + CreateClientGatewayOperation(name string) *CreateClientGatewayOperation + DeleteClientGateway(context.Context, *clientgatewayspb.DeleteClientGatewayRequest, ...gax.CallOption) (*DeleteClientGatewayOperation, error) + DeleteClientGatewayOperation(name string) *DeleteClientGatewayOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with BeyondCorp API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe ClientGatewaysService exposes the following resources: +// +// Client Gateways, named as follows: +// projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListClientGateways lists ClientGateways in a given project and location. +func (c *Client) ListClientGateways(ctx context.Context, req *clientgatewayspb.ListClientGatewaysRequest, opts ...gax.CallOption) *ClientGatewayIterator { + return c.internalClient.ListClientGateways(ctx, req, opts...) +} + +// GetClientGateway gets details of a single ClientGateway. +func (c *Client) GetClientGateway(ctx context.Context, req *clientgatewayspb.GetClientGatewayRequest, opts ...gax.CallOption) (*clientgatewayspb.ClientGateway, error) { + return c.internalClient.GetClientGateway(ctx, req, opts...) +} + +// CreateClientGateway creates a new ClientGateway in a given project and location. +func (c *Client) CreateClientGateway(ctx context.Context, req *clientgatewayspb.CreateClientGatewayRequest, opts ...gax.CallOption) (*CreateClientGatewayOperation, error) { + return c.internalClient.CreateClientGateway(ctx, req, opts...) +} + +// CreateClientGatewayOperation returns a new CreateClientGatewayOperation from a given name. +// The name must be that of a previously created CreateClientGatewayOperation, possibly from a different process. +func (c *Client) CreateClientGatewayOperation(name string) *CreateClientGatewayOperation { + return c.internalClient.CreateClientGatewayOperation(name) +} + +// DeleteClientGateway deletes a single ClientGateway. +func (c *Client) DeleteClientGateway(ctx context.Context, req *clientgatewayspb.DeleteClientGatewayRequest, opts ...gax.CallOption) (*DeleteClientGatewayOperation, error) { + return c.internalClient.DeleteClientGateway(ctx, req, opts...) +} + +// DeleteClientGatewayOperation returns a new DeleteClientGatewayOperation from a given name. +// The name must be that of a previously created DeleteClientGatewayOperation, possibly from a different process. +func (c *Client) DeleteClientGatewayOperation(name string) *DeleteClientGatewayOperation { + return c.internalClient.DeleteClientGatewayOperation(name) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with BeyondCorp API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client clientgatewayspb.ClientGatewaysServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new client gateways service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// API OverviewThe beyondcorp.googleapis.com service implements the Google Cloud +// BeyondCorp API. +// +// Data ModelThe ClientGatewaysService exposes the following resources: +// +// Client Gateways, named as follows: +// projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: clientgatewayspb.NewClientGatewaysServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *gRPCClient) ListClientGateways(ctx context.Context, req *clientgatewayspb.ListClientGatewaysRequest, opts ...gax.CallOption) *ClientGatewayIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListClientGateways[0:len((*c.CallOptions).ListClientGateways):len((*c.CallOptions).ListClientGateways)], opts...) + it := &ClientGatewayIterator{} + req = proto.Clone(req).(*clientgatewayspb.ListClientGatewaysRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*clientgatewayspb.ClientGateway, string, error) { + resp := &clientgatewayspb.ListClientGatewaysResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListClientGateways(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetClientGateways(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetClientGateway(ctx context.Context, req *clientgatewayspb.GetClientGatewayRequest, opts ...gax.CallOption) (*clientgatewayspb.ClientGateway, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetClientGateway[0:len((*c.CallOptions).GetClientGateway):len((*c.CallOptions).GetClientGateway)], opts...) + var resp *clientgatewayspb.ClientGateway + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetClientGateway(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateClientGateway(ctx context.Context, req *clientgatewayspb.CreateClientGatewayRequest, opts ...gax.CallOption) (*CreateClientGatewayOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateClientGateway[0:len((*c.CallOptions).CreateClientGateway):len((*c.CallOptions).CreateClientGateway)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateClientGateway(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateClientGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteClientGateway(ctx context.Context, req *clientgatewayspb.DeleteClientGatewayRequest, opts ...gax.CallOption) (*DeleteClientGatewayOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteClientGateway[0:len((*c.CallOptions).DeleteClientGateway):len((*c.CallOptions).DeleteClientGateway)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.DeleteClientGateway(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteClientGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateClientGatewayOperation manages a long-running operation from CreateClientGateway. +type CreateClientGatewayOperation struct { + lro *longrunning.Operation +} + +// CreateClientGatewayOperation returns a new CreateClientGatewayOperation from a given name. +// The name must be that of a previously created CreateClientGatewayOperation, possibly from a different process. +func (c *gRPCClient) CreateClientGatewayOperation(name string) *CreateClientGatewayOperation { + return &CreateClientGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateClientGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*clientgatewayspb.ClientGateway, error) { + var resp clientgatewayspb.ClientGateway + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateClientGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*clientgatewayspb.ClientGateway, error) { + var resp clientgatewayspb.ClientGateway + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateClientGatewayOperation) Metadata() (*clientgatewayspb.ClientGatewayOperationMetadata, error) { + var meta clientgatewayspb.ClientGatewayOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateClientGatewayOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateClientGatewayOperation) Name() string { + return op.lro.Name() +} + +// DeleteClientGatewayOperation manages a long-running operation from DeleteClientGateway. +type DeleteClientGatewayOperation struct { + lro *longrunning.Operation +} + +// DeleteClientGatewayOperation returns a new DeleteClientGatewayOperation from a given name. +// The name must be that of a previously created DeleteClientGatewayOperation, possibly from a different process. +func (c *gRPCClient) DeleteClientGatewayOperation(name string) *DeleteClientGatewayOperation { + return &DeleteClientGatewayOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteClientGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteClientGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteClientGatewayOperation) Metadata() (*clientgatewayspb.ClientGatewayOperationMetadata, error) { + var meta clientgatewayspb.ClientGatewayOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteClientGatewayOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteClientGatewayOperation) Name() string { + return op.lro.Name() +} + +// ClientGatewayIterator manages a stream of *clientgatewayspb.ClientGateway. +type ClientGatewayIterator struct { + items []*clientgatewayspb.ClientGateway + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*clientgatewayspb.ClientGateway, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ClientGatewayIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ClientGatewayIterator) Next() (*clientgatewayspb.ClientGateway, error) { + var item *clientgatewayspb.ClientGateway + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ClientGatewayIterator) bufLen() int { + return len(it.items) +} + +func (it *ClientGatewayIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/beyondcorp/clientgateways/apiv1/client_gateways_client_example_test.go b/beyondcorp/clientgateways/apiv1/client_gateways_client_example_test.go new file mode 100644 index 000000000000..8717c461adbe --- /dev/null +++ b/beyondcorp/clientgateways/apiv1/client_gateways_client_example_test.go @@ -0,0 +1,392 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package clientgateways_test + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + "google.golang.org/api/iterator" + clientgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListClientGateways() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.ListClientGatewaysRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#ListClientGatewaysRequest. + } + it := c.ListClientGateways(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetClientGateway() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.GetClientGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#GetClientGatewayRequest. + } + resp, err := c.GetClientGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateClientGateway() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.CreateClientGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#CreateClientGatewayRequest. + } + op, err := c.CreateClientGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteClientGateway() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.DeleteClientGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#DeleteClientGatewayRequest. + } + op, err := c.DeleteClientGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/beyondcorp/clientgateways/apiv1/doc.go b/beyondcorp/clientgateways/apiv1/doc.go new file mode 100644 index 000000000000..80486192be04 --- /dev/null +++ b/beyondcorp/clientgateways/apiv1/doc.go @@ -0,0 +1,181 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package clientgateways is an auto-generated package for the +// BeyondCorp API. +// +// Beyondcorp Enterprise provides identity and context aware access controls +// for enterprise resources and enables zero-trust access. Using the +// Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem +// connectivity using the App Connector hybrid connectivity solution. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := clientgateways.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := clientgateways.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &clientgatewayspb.ListClientGatewaysRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#ListClientGatewaysRequest. +// } +// it := c.ListClientGateways(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package clientgateways // import "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + +import ( + "context" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/beyondcorp/clientgateways/apiv1/gapic_metadata.json b/beyondcorp/clientgateways/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..1bc3c7c5c5b9 --- /dev/null +++ b/beyondcorp/clientgateways/apiv1/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.beyondcorp.clientgateways.v1", + "libraryPackage": "cloud.google.com/go/beyondcorp/clientgateways/apiv1", + "services": { + "ClientGatewaysService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateClientGateway": { + "methods": [ + "CreateClientGateway" + ] + }, + "DeleteClientGateway": { + "methods": [ + "DeleteClientGateway" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetClientGateway": { + "methods": [ + "GetClientGateway" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListClientGateways": { + "methods": [ + "ListClientGateways" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + } + } + } + } + } + } +} diff --git a/beyondcorp/clientgateways/apiv1/version.go b/beyondcorp/clientgateways/apiv1/version.go new file mode 100644 index 000000000000..18e6e07e2c80 --- /dev/null +++ b/beyondcorp/clientgateways/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package clientgateways + +import "cloud.google.com/go/beyondcorp/internal" + +func init() { + versionClient = internal.Version +} diff --git a/beyondcorp/go.mod b/beyondcorp/go.mod new file mode 100644 index 000000000000..108726e7fbb0 --- /dev/null +++ b/beyondcorp/go.mod @@ -0,0 +1,26 @@ +module cloud.google.com/go/beyondcorp + +go 1.18 + +require ( + cloud.google.com/go v0.103.0 + github.com/googleapis/gax-go/v2 v2.4.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect +) diff --git a/beyondcorp/go.sum b/beyondcorp/go.sum new file mode 100644 index 000000000000..c853a2e6fd40 --- /dev/null +++ b/beyondcorp/go.sum @@ -0,0 +1,668 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.103.0 h1:YXtxp9ymmZjlGzxV7VrYQ8aaQuAgcqxSy6YhDX4I458= +cloud.google.com/go v0.103.0/go.mod h1:vwLx1nqLrzLX/fpwSMOXmFIqBOyHsvHbnAdbGSJ+mKk= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +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= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +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/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +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= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/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= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +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-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5 h1:ou3VRVAif8UJqz3l1r4Isoz7rrUWHWDHBonShMNYoQs= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/beyondcorp/internal/version.go b/beyondcorp/internal/version.go new file mode 100644 index 000000000000..571caf4f5142 --- /dev/null +++ b/beyondcorp/internal/version.go @@ -0,0 +1,20 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package internal + +// Version is the current tagged release of the library. +const Version = "0.1.1" diff --git a/bigquery/.release-please-manifest.json b/bigquery/.release-please-manifest.json index 5ddb58955491..75788889c704 100644 --- a/bigquery/.release-please-manifest.json +++ b/bigquery/.release-please-manifest.json @@ -1,3 +1,3 @@ { - "bigquery": "1.34.1" + "bigquery": "1.41.0" } diff --git a/bigquery/CHANGES.md b/bigquery/CHANGES.md index 3c83995daf16..a742d55345dd 100644 --- a/bigquery/CHANGES.md +++ b/bigquery/CHANGES.md @@ -1,6 +1,112 @@ # Changes + +## [1.41.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.40.0...bigquery/v1.41.0) (2022-09-14) + + +### Features + +* **bigquery/storage:** add location to WriteStream and add WriteStreamView support ([6a0080a](https://github.com/googleapis/google-cloud-go/commit/6a0080ad69398c572d856886293e19c79cf0fc0e)) + + +### Bug Fixes + +* **bigquery/storage/managedwriter:** Fix incorrect error retention ([#6659](https://github.com/googleapis/google-cloud-go/issues/6659)) ([dc02bca](https://github.com/googleapis/google-cloud-go/commit/dc02bca4ac14acb4f536f078a7d8f209626340bb)) +* **bigquery:** Parse timestamp query parameter with RFC3339 ([#6653](https://github.com/googleapis/google-cloud-go/issues/6653)) ([aabd2d6](https://github.com/googleapis/google-cloud-go/commit/aabd2d61c81ed598755656b4e7c3fd84dcd3b2d4)) + +## [1.40.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.39.0...bigquery/v1.40.0) (2022-09-08) + + +### ⚠ BREAKING CHANGES + +* **bigquery/dataexchange:** update BigQuery Analytics Hub API v1beta1 client BREAKING CHANGE: refresh current dataexchange/v1beta1/* directory to include recent change in protos. Removed common directory and use local enum Category fix!: refactor references to Category message docs: improve proto documentation. + +### Features + +* **bigquery/dataexchange:** update BigQuery Analytics Hub API v1beta1 client BREAKING CHANGE: refresh current dataexchange/v1beta1/* directory to include recent change in protos. Removed common directory and use local enum Category fix!: refactor references to Category message docs: improve proto documentation. ([e45ad9a](https://github.com/googleapis/google-cloud-go/commit/e45ad9af568c59151decc0dacedf137653b576dd)) +* **bigquery/storage/managedwriter:** Augment reconnection logic ([#6609](https://github.com/googleapis/google-cloud-go/issues/6609)) ([6b0ac0c](https://github.com/googleapis/google-cloud-go/commit/6b0ac0c400d2d5b26689176c71cc6db1db9b283f)) +* **bigquery:** Add trace instrumentation support for individual rpcs ([#6493](https://github.com/googleapis/google-cloud-go/issues/6493)) ([eedc632](https://github.com/googleapis/google-cloud-go/commit/eedc6327b845850d9d6109014a5d531dfbfa7d04)) +* **bigquery:** Improve error when reading null values ([#6566](https://github.com/googleapis/google-cloud-go/issues/6566)) ([e9a94c2](https://github.com/googleapis/google-cloud-go/commit/e9a94c2e52ca3d07bc15030cf411f7e1c5235d39)), refs [#2612](https://github.com/googleapis/google-cloud-go/issues/2612) + + +### Documentation + +* **bigquery:** Add numeric and bignumeric to RowIterator docs ([#6560](https://github.com/googleapis/google-cloud-go/issues/6560)) ([bea4028](https://github.com/googleapis/google-cloud-go/commit/bea4028a5fde6e790f70b0a98c33b81b3ad4023e)) + + +### Miscellaneous Chores + +* **bigquery:** Release 1.40.0 ([#6635](https://github.com/googleapis/google-cloud-go/issues/6635)) ([628deae](https://github.com/googleapis/google-cloud-go/commit/628deae4e0e0f4f1ae7e99433eefdc8f7cc41b41)) + +## [1.39.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.38.0...bigquery/v1.39.0) (2022-08-23) + + +### Features + +* **bigquery/storage:** allow users to set Apache Avro output format options through avro_serialization_options param in TableReadOptions message Through AvroSerializationOptions, users can set enable_display_name_attribute, which populates displayName for every avro field with the original column name Improved documentation for selected_fields, added example for clarity. ([41ab4ec](https://github.com/googleapis/google-cloud-go/commit/41ab4ec00552931b12f61a9fcb27b36a7c0b5d77)) +* **bigquery:** add PreserveAsciiControlCharacters support for CSV ([#6448](https://github.com/googleapis/google-cloud-go/issues/6448)) ([b7bac2f](https://github.com/googleapis/google-cloud-go/commit/b7bac2fbf63c2a681da6fdbf5af217bf8de1455f)) +* **bigquery:** add preview support for default values ([#6464](https://github.com/googleapis/google-cloud-go/issues/6464)) ([edc3be5](https://github.com/googleapis/google-cloud-go/commit/edc3be586f9e8b65c34318773f5c55e1a4ccb07b)) + +## [1.38.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.37.0...bigquery/v1.38.0) (2022-08-12) + + +### Features + +* **bigquery/migration:** Add MySQL dialect to bigquerymigration v2 client library ([370e23e](https://github.com/googleapis/google-cloud-go/commit/370e23eaa342a7055a8d8b6f8fe9420f83afe43e)) +* **bigquery/storage/managedwriter:** improve error communication ([#6360](https://github.com/googleapis/google-cloud-go/issues/6360)) ([b30d89d](https://github.com/googleapis/google-cloud-go/commit/b30d89d5bd4a8ce553a328abb4b78f8fc51b43f0)) + + +### Bug Fixes + +* **bigquery/storage/managedwriter:** propagate calloptions to append ([#6488](https://github.com/googleapis/google-cloud-go/issues/6488)) ([c65f9da](https://github.com/googleapis/google-cloud-go/commit/c65f9dab8118295e49a7b863f59cb64ace4c2d5b)) + +## [1.37.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.36.0...bigquery/v1.37.0) (2022-08-04) + + +### Features + +* **bigquery/connection:** Add service_account_id output field to CloudSQL properties ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) +* **bigquery/storage/managedwriter:** refactor AppendResponse ([#6402](https://github.com/googleapis/google-cloud-go/issues/6402)) ([c07bca2](https://github.com/googleapis/google-cloud-go/commit/c07bca2d65ec9903ba0c592da11440cebe8b7d9e)) +* **bigquery:** support JSON as a data type ([#5986](https://github.com/googleapis/google-cloud-go/issues/5986)) ([835fe4f](https://github.com/googleapis/google-cloud-go/commit/835fe4fe59f4a3c64c5762a530228d5369618897)) + + +### Bug Fixes + +* **bigquery:** include user_email field when requesting job information ([#6256](https://github.com/googleapis/google-cloud-go/issues/6256)) ([da42b4e](https://github.com/googleapis/google-cloud-go/commit/da42b4e05faa067b5afa0a9a479d1db72296948e)) + + +### Documentation + +* **bigquery/storage:** clarify size limitations for AppendRowsRequest chore: add preferred_min_stream_count to CreateReadSessionRequest chore: add write_stream to AppendRowsResponse ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) + +## [1.36.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.35.0...bigquery/v1.36.0) (2022-07-18) + + +### Features + +* **bigquery/migration:** Add Presto dialect to bigquerymigration v2 client library ([89a049a](https://github.com/googleapis/google-cloud-go/commit/89a049a98e1d18b922cc6ad08622161448544902)) +* **bigquery/storage/managedwriter/adapt:** support packed field option ([#6312](https://github.com/googleapis/google-cloud-go/issues/6312)) ([fc3417b](https://github.com/googleapis/google-cloud-go/commit/fc3417be70cd01a0044ec934c5c6426ea833d90c)) + + +### Bug Fixes + +* **bigquery/storage/managedwriter:** improve network reconnection ([#6338](https://github.com/googleapis/google-cloud-go/issues/6338)) ([085a038](https://github.com/googleapis/google-cloud-go/commit/085a03865d20122c74e107ea43883ae33bdf25bc)) + +## [1.35.0](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.34.1...bigquery/v1.35.0) (2022-07-07) + + +### Features + +* **bigquery:** start generating REST client for beta clients ([25b7775](https://github.com/googleapis/google-cloud-go/commit/25b77757c1e6f372e03bf99ab7461264bba48d26)) + + +### Bug Fixes + +* **bigquery/storage/managedstorage:** improve internal locking ([#6304](https://github.com/googleapis/google-cloud-go/issues/6304)) ([a2925ce](https://github.com/googleapis/google-cloud-go/commit/a2925ce2f96c538d3994e2d0cef49fbcdd727217)) +* **bigquery/storage/managedwriter/adapt:** schema->protodescriptor ([#6267](https://github.com/googleapis/google-cloud-go/issues/6267)) ([a017230](https://github.com/googleapis/google-cloud-go/commit/a01723055cb7604047c4fddd7d00213d800e4122)), refs [#6258](https://github.com/googleapis/google-cloud-go/issues/6258) +* **bigquery/storage:** Modify client lib retry policy for CreateWriteStream with longer backoff, more error code and longer overall time ([199b725](https://github.com/googleapis/google-cloud-go/commit/199b7250f474b1a6f53dcf0aac0c2966f4987b68)) + ## [1.34.1](https://github.com/googleapis/google-cloud-go/compare/bigquery/v1.34.0...bigquery/v1.34.1) (2022-06-23) diff --git a/bigquery/bigquery.go b/bigquery/bigquery.go index 34a39e524bc3..9b4735722231 100644 --- a/bigquery/bigquery.go +++ b/bigquery/bigquery.go @@ -26,6 +26,7 @@ import ( "cloud.google.com/go/bigquery/internal" cloudinternal "cloud.google.com/go/internal" "cloud.google.com/go/internal/detect" + "cloud.google.com/go/internal/trace" "cloud.google.com/go/internal/version" gax "github.com/googleapis/gax-go/v2" bq "google.golang.org/api/bigquery/v2" @@ -119,7 +120,9 @@ func (c *Client) insertJob(ctx context.Context, job *bq.Job, media io.Reader) (* var res *bq.Job var err error invoke := func() error { + sCtx := trace.StartSpan(ctx, "bigquery.jobs.insert") res, err = call.Do() + trace.EndSpan(sCtx, err) return err } // A job with a client-generated ID can be retried; the presence of the @@ -149,7 +152,9 @@ func (c *Client) runQuery(ctx context.Context, queryRequest *bq.QueryRequest) (* var res *bq.QueryResponse var err error invoke := func() error { + sCtx := trace.StartSpan(ctx, "bigquery.jobs.query") res, err = call.Do() + trace.EndSpan(sCtx, err) return err } diff --git a/bigquery/connection/apiv1/connection_client.go b/bigquery/connection/apiv1/connection_client.go index 101cca068cd9..97bb86dd5e56 100644 --- a/bigquery/connection/apiv1/connection_client.go +++ b/bigquery/connection/apiv1/connection_client.go @@ -152,7 +152,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -269,7 +270,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/connection/apiv1/connection_client_example_test.go b/bigquery/connection/apiv1/connection_client_example_test.go index a17c3bf2b349..425679d46cae 100644 --- a/bigquery/connection/apiv1/connection_client_example_test.go +++ b/bigquery/connection/apiv1/connection_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleClient_CreateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -59,6 +69,11 @@ func ExampleClient_CreateConnection() { func ExampleClient_GetConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -79,6 +94,11 @@ func ExampleClient_GetConnection() { func ExampleClient_ListConnections() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +125,11 @@ func ExampleClient_ListConnections() { func ExampleClient_UpdateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleClient_UpdateConnection() { func ExampleClient_DeleteConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +173,11 @@ func ExampleClient_DeleteConnection() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -163,6 +198,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +223,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/connection/apiv1/doc.go b/bigquery/connection/apiv1/doc.go index 4013bc7ef3d4..44690ac2c82b 100644 --- a/bigquery/connection/apiv1/doc.go +++ b/bigquery/connection/apiv1/doc.go @@ -19,43 +19,54 @@ // // Allows users to manage BigQuery connections to external data sources. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := connection.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := connection.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := connection.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &connectionpb.CreateConnectionRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1#CreateConnectionRequest. -// } -// resp, err := c.CreateConnection(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := connection.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &connectionpb.CreateConnectionRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1#CreateConnectionRequest. +// } +// resp, err := c.CreateConnection(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/bigquery/connection/apiv1beta1/connection_client.go b/bigquery/connection/apiv1beta1/connection_client.go index 5cd5d0e6ca47..74f0ef4c54b3 100644 --- a/bigquery/connection/apiv1beta1/connection_client.go +++ b/bigquery/connection/apiv1beta1/connection_client.go @@ -203,7 +203,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -249,7 +250,7 @@ func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReques // SetIamPolicy sets the access control policy on the specified resource. Replaces any // existing policy. // -// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -325,7 +326,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -409,7 +411,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -732,8 +734,12 @@ func (c *restClient) ListConnections(ctx context.Context, req *connectionpb.List baseUrl.Path += fmt.Sprintf("/v1beta1/%v/connections", req.GetParent()) params := url.Values{} - if req.GetMaxResults().GetValue() != 0 { - params.Add("maxResults.value", fmt.Sprintf("%v", req.GetMaxResults().GetValue())) + if req.GetMaxResults() != nil { + maxResults, err := protojson.Marshal(req.GetMaxResults()) + if err != nil { + return nil, err + } + params.Add("maxResults", string(maxResults)) } if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) @@ -803,8 +809,12 @@ func (c *restClient) UpdateConnection(ctx context.Context, req *connectionpb.Upd baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -995,7 +1005,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe // SetIamPolicy sets the access control policy on the specified resource. Replaces any // existing policy. // -// Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) diff --git a/bigquery/connection/apiv1beta1/connection_client_example_test.go b/bigquery/connection/apiv1beta1/connection_client_example_test.go index 9fb22454ddd9..b79243a957a7 100644 --- a/bigquery/connection/apiv1beta1/connection_client_example_test.go +++ b/bigquery/connection/apiv1beta1/connection_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewRESTClient() { func ExampleClient_CreateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleClient_CreateConnection() { func ExampleClient_GetConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -90,6 +110,11 @@ func ExampleClient_GetConnection() { func ExampleClient_ListConnections() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +135,11 @@ func ExampleClient_ListConnections() { func ExampleClient_UpdateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +160,11 @@ func ExampleClient_UpdateConnection() { func ExampleClient_UpdateConnectionCredential() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -148,6 +183,11 @@ func ExampleClient_UpdateConnectionCredential() { func ExampleClient_DeleteConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -166,6 +206,11 @@ func ExampleClient_DeleteConnection() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -186,6 +231,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -206,6 +256,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := connection.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/connection/apiv1beta1/doc.go b/bigquery/connection/apiv1beta1/doc.go index bc451786a80a..8b485df298b0 100644 --- a/bigquery/connection/apiv1beta1/doc.go +++ b/bigquery/connection/apiv1beta1/doc.go @@ -19,45 +19,56 @@ // // Allows users to manage BigQuery connections to external data sources. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := connection.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := connection.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := connection.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &connectionpb.CreateConnectionRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1beta1#CreateConnectionRequest. -// } -// resp, err := c.CreateConnection(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := connection.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &connectionpb.CreateConnectionRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/connection/v1beta1#CreateConnectionRequest. +// } +// resp, err := c.CreateConnection(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go b/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go index d9b171abe19f..81e31e3c71ee 100644 --- a/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go +++ b/bigquery/dataexchange/apiv1beta1/analytics_hub_client.go @@ -34,6 +34,7 @@ import ( gtransport "google.golang.org/api/transport/grpc" httptransport "google.golang.org/api/transport/http" dataexchangepb "google.golang.org/genproto/googleapis/cloud/bigquery/dataexchange/v1beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -61,6 +62,8 @@ type AnalyticsHubCallOptions struct { GetIamPolicy []gax.CallOption SetIamPolicy []gax.CallOption TestIamPermissions []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption } func defaultAnalyticsHubGRPCClientOptions() []option.ClientOption { @@ -257,6 +260,8 @@ func defaultAnalyticsHubCallOptions() *AnalyticsHubCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, } } @@ -427,6 +432,8 @@ func defaultAnalyticsHubRESTCallOptions() *AnalyticsHubCallOptions { http.StatusServiceUnavailable) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, } } @@ -450,16 +457,19 @@ type internalAnalyticsHubClient interface { GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator } // AnalyticsHubClient is a client for interacting with Analytics Hub API. // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. // // The AnalyticsHubService API facilitates data sharing within and across -// organizations. It allows data providers to publish Listings — a -// discoverable and searchable SKU representing a dataset. Data consumers can -// subscribe to Listings. Upon subscription, AnalyticsHub provisions a “Linked -// Datasets” surfacing the data in the consumer’s project. +// organizations. It allows data providers to publish listings that reference +// shared datasets. With Analytics Hub, users can discover and search for +// listings that they have access to. Subscribers can view and subscribe to +// listings. When you subscribe to a listing, Analytics Hub creates a linked +// dataset in your project. type AnalyticsHubClient struct { // The internal transport-dependent client. internalClient internalAnalyticsHubClient @@ -485,92 +495,103 @@ func (c *AnalyticsHubClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AnalyticsHubClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } -// ListDataExchanges lists DataExchanges in a given project and location. +// ListDataExchanges lists all data exchanges in a given project and location. func (c *AnalyticsHubClient) ListDataExchanges(ctx context.Context, req *dataexchangepb.ListDataExchangesRequest, opts ...gax.CallOption) *DataExchangeIterator { return c.internalClient.ListDataExchanges(ctx, req, opts...) } -// ListOrgDataExchanges lists DataExchanges from projects in a given organization and location. +// ListOrgDataExchanges lists all data exchanges from projects in a given organization and +// location. func (c *AnalyticsHubClient) ListOrgDataExchanges(ctx context.Context, req *dataexchangepb.ListOrgDataExchangesRequest, opts ...gax.CallOption) *DataExchangeIterator { return c.internalClient.ListOrgDataExchanges(ctx, req, opts...) } -// GetDataExchange gets details of a single DataExchange. +// GetDataExchange gets the details of a data exchange. func (c *AnalyticsHubClient) GetDataExchange(ctx context.Context, req *dataexchangepb.GetDataExchangeRequest, opts ...gax.CallOption) (*dataexchangepb.DataExchange, error) { return c.internalClient.GetDataExchange(ctx, req, opts...) } -// CreateDataExchange creates a new DataExchange in a given project and location. +// CreateDataExchange creates a new data exchange. func (c *AnalyticsHubClient) CreateDataExchange(ctx context.Context, req *dataexchangepb.CreateDataExchangeRequest, opts ...gax.CallOption) (*dataexchangepb.DataExchange, error) { return c.internalClient.CreateDataExchange(ctx, req, opts...) } -// UpdateDataExchange updates the parameters of a single DataExchange. +// UpdateDataExchange updates an existing data exchange. func (c *AnalyticsHubClient) UpdateDataExchange(ctx context.Context, req *dataexchangepb.UpdateDataExchangeRequest, opts ...gax.CallOption) (*dataexchangepb.DataExchange, error) { return c.internalClient.UpdateDataExchange(ctx, req, opts...) } -// DeleteDataExchange deletes a single DataExchange. +// DeleteDataExchange deletes an existing data exchange. func (c *AnalyticsHubClient) DeleteDataExchange(ctx context.Context, req *dataexchangepb.DeleteDataExchangeRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteDataExchange(ctx, req, opts...) } -// ListListings lists Listings in a given project and location. +// ListListings lists all listings in a given project and location. func (c *AnalyticsHubClient) ListListings(ctx context.Context, req *dataexchangepb.ListListingsRequest, opts ...gax.CallOption) *ListingIterator { return c.internalClient.ListListings(ctx, req, opts...) } -// GetListing gets details of a single Listing. +// GetListing gets the details of a listing. func (c *AnalyticsHubClient) GetListing(ctx context.Context, req *dataexchangepb.GetListingRequest, opts ...gax.CallOption) (*dataexchangepb.Listing, error) { return c.internalClient.GetListing(ctx, req, opts...) } -// CreateListing creates a new Listing in a given project and location. +// CreateListing creates a new listing. func (c *AnalyticsHubClient) CreateListing(ctx context.Context, req *dataexchangepb.CreateListingRequest, opts ...gax.CallOption) (*dataexchangepb.Listing, error) { return c.internalClient.CreateListing(ctx, req, opts...) } -// UpdateListing updates the parameters of a single Listing. +// UpdateListing updates an existing listing. func (c *AnalyticsHubClient) UpdateListing(ctx context.Context, req *dataexchangepb.UpdateListingRequest, opts ...gax.CallOption) (*dataexchangepb.Listing, error) { return c.internalClient.UpdateListing(ctx, req, opts...) } -// DeleteListing deletes a single Listing, as long as there are no subscriptions -// associated with the source of this Listing. +// DeleteListing deletes a listing. func (c *AnalyticsHubClient) DeleteListing(ctx context.Context, req *dataexchangepb.DeleteListingRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteListing(ctx, req, opts...) } -// SubscribeListing subscribes to a single Listing. +// SubscribeListing subscribes to a listing. // -// Data Exchange currently supports one type of Listing: a BigQuery dataset. -// Upon subscription to a Listing for a BigQuery dataset, Data Exchange +// Currently, with Analytics Hub, you can create listings that +// reference only BigQuery datasets. +// Upon subscription to a listing for a BigQuery dataset, Analytics Hub // creates a linked dataset in the subscriber’s project. func (c *AnalyticsHubClient) SubscribeListing(ctx context.Context, req *dataexchangepb.SubscribeListingRequest, opts ...gax.CallOption) (*dataexchangepb.SubscribeListingResponse, error) { return c.internalClient.SubscribeListing(ctx, req, opts...) } -// GetIamPolicy gets the IAM policy for a dataExchange or a listing. +// GetIamPolicy gets the IAM policy. func (c *AnalyticsHubClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } -// SetIamPolicy sets the IAM policy for a dataExchange or a listing. +// SetIamPolicy sets the IAM policy. func (c *AnalyticsHubClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } -// TestIamPermissions returns the permissions that a caller has on a specified dataExchange or -// listing. +// TestIamPermissions returns the permissions that a caller has. func (c *AnalyticsHubClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { return c.internalClient.TestIamPermissions(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *AnalyticsHubClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *AnalyticsHubClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + // analyticsHubGRPCClient is a client for interacting with Analytics Hub API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -587,6 +608,8 @@ type analyticsHubGRPCClient struct { // The gRPC API client. analyticsHubClient dataexchangepb.AnalyticsHubServiceClient + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -595,10 +618,11 @@ type analyticsHubGRPCClient struct { // The returned client must be Closed when it is done being used to clean up its underlying connections. // // The AnalyticsHubService API facilitates data sharing within and across -// organizations. It allows data providers to publish Listings — a -// discoverable and searchable SKU representing a dataset. Data consumers can -// subscribe to Listings. Upon subscription, AnalyticsHub provisions a “Linked -// Datasets” surfacing the data in the consumer’s project. +// organizations. It allows data providers to publish listings that reference +// shared datasets. With Analytics Hub, users can discover and search for +// listings that they have access to. Subscribers can view and subscribe to +// listings. When you subscribe to a listing, Analytics Hub creates a linked +// dataset in your project. func NewAnalyticsHubClient(ctx context.Context, opts ...option.ClientOption) (*AnalyticsHubClient, error) { clientOpts := defaultAnalyticsHubGRPCClientOptions() if newAnalyticsHubClientHook != nil { @@ -625,6 +649,7 @@ func NewAnalyticsHubClient(ctx context.Context, opts ...option.ClientOption) (*A disableDeadlines: disableDeadlines, analyticsHubClient: dataexchangepb.NewAnalyticsHubServiceClient(connPool), CallOptions: &client.CallOptions, + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -635,7 +660,8 @@ func NewAnalyticsHubClient(ctx context.Context, opts ...option.ClientOption) (*A // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *analyticsHubGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -673,10 +699,11 @@ type analyticsHubRESTClient struct { // NewAnalyticsHubRESTClient creates a new analytics hub service rest client. // // The AnalyticsHubService API facilitates data sharing within and across -// organizations. It allows data providers to publish Listings — a -// discoverable and searchable SKU representing a dataset. Data consumers can -// subscribe to Listings. Upon subscription, AnalyticsHub provisions a “Linked -// Datasets” surfacing the data in the consumer’s project. +// organizations. It allows data providers to publish listings that reference +// shared datasets. With Analytics Hub, users can discover and search for +// listings that they have access to. Subscribers can view and subscribe to +// listings. When you subscribe to a listing, Analytics Hub creates a linked +// dataset in your project. func NewAnalyticsHubRESTClient(ctx context.Context, opts ...option.ClientOption) (*AnalyticsHubClient, error) { clientOpts := append(defaultAnalyticsHubRESTClientOptions(), opts...) httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) @@ -723,7 +750,7 @@ func (c *analyticsHubRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *analyticsHubRESTClient) Connection() *grpc.ClientConn { return nil } @@ -1118,7 +1145,69 @@ func (c *analyticsHubGRPCClient) TestIamPermissions(ctx context.Context, req *ia return resp, nil } -// ListDataExchanges lists DataExchanges in a given project and location. +func (c *analyticsHubGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *analyticsHubGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListDataExchanges lists all data exchanges in a given project and location. func (c *analyticsHubRESTClient) ListDataExchanges(ctx context.Context, req *dataexchangepb.ListDataExchangesRequest, opts ...gax.CallOption) *DataExchangeIterator { it := &DataExchangeIterator{} req = proto.Clone(req).(*dataexchangepb.ListDataExchangesRequest) @@ -1205,7 +1294,8 @@ func (c *analyticsHubRESTClient) ListDataExchanges(ctx context.Context, req *dat return it } -// ListOrgDataExchanges lists DataExchanges from projects in a given organization and location. +// ListOrgDataExchanges lists all data exchanges from projects in a given organization and +// location. func (c *analyticsHubRESTClient) ListOrgDataExchanges(ctx context.Context, req *dataexchangepb.ListOrgDataExchangesRequest, opts ...gax.CallOption) *DataExchangeIterator { it := &DataExchangeIterator{} req = proto.Clone(req).(*dataexchangepb.ListOrgDataExchangesRequest) @@ -1292,7 +1382,7 @@ func (c *analyticsHubRESTClient) ListOrgDataExchanges(ctx context.Context, req * return it } -// GetDataExchange gets details of a single DataExchange. +// GetDataExchange gets the details of a data exchange. func (c *analyticsHubRESTClient) GetDataExchange(ctx context.Context, req *dataexchangepb.GetDataExchangeRequest, opts ...gax.CallOption) (*dataexchangepb.DataExchange, error) { baseUrl, err := url.Parse(c.endpoint) if err != nil { @@ -1345,7 +1435,7 @@ func (c *analyticsHubRESTClient) GetDataExchange(ctx context.Context, req *datae return resp, nil } -// CreateDataExchange creates a new DataExchange in a given project and location. +// CreateDataExchange creates a new data exchange. func (c *analyticsHubRESTClient) CreateDataExchange(ctx context.Context, req *dataexchangepb.CreateDataExchangeRequest, opts ...gax.CallOption) (*dataexchangepb.DataExchange, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} body := req.GetDataExchange() @@ -1410,7 +1500,7 @@ func (c *analyticsHubRESTClient) CreateDataExchange(ctx context.Context, req *da return resp, nil } -// UpdateDataExchange updates the parameters of a single DataExchange. +// UpdateDataExchange updates an existing data exchange. func (c *analyticsHubRESTClient) UpdateDataExchange(ctx context.Context, req *dataexchangepb.UpdateDataExchangeRequest, opts ...gax.CallOption) (*dataexchangepb.DataExchange, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} body := req.GetDataExchange() @@ -1426,8 +1516,12 @@ func (c *analyticsHubRESTClient) UpdateDataExchange(ctx context.Context, req *da baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetDataExchange().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1477,7 +1571,7 @@ func (c *analyticsHubRESTClient) UpdateDataExchange(ctx context.Context, req *da return resp, nil } -// DeleteDataExchange deletes a single DataExchange. +// DeleteDataExchange deletes an existing data exchange. func (c *analyticsHubRESTClient) DeleteDataExchange(ctx context.Context, req *dataexchangepb.DeleteDataExchangeRequest, opts ...gax.CallOption) error { baseUrl, err := url.Parse(c.endpoint) if err != nil { @@ -1512,7 +1606,7 @@ func (c *analyticsHubRESTClient) DeleteDataExchange(ctx context.Context, req *da }, opts...) } -// ListListings lists Listings in a given project and location. +// ListListings lists all listings in a given project and location. func (c *analyticsHubRESTClient) ListListings(ctx context.Context, req *dataexchangepb.ListListingsRequest, opts ...gax.CallOption) *ListingIterator { it := &ListingIterator{} req = proto.Clone(req).(*dataexchangepb.ListListingsRequest) @@ -1599,7 +1693,7 @@ func (c *analyticsHubRESTClient) ListListings(ctx context.Context, req *dataexch return it } -// GetListing gets details of a single Listing. +// GetListing gets the details of a listing. func (c *analyticsHubRESTClient) GetListing(ctx context.Context, req *dataexchangepb.GetListingRequest, opts ...gax.CallOption) (*dataexchangepb.Listing, error) { baseUrl, err := url.Parse(c.endpoint) if err != nil { @@ -1652,7 +1746,7 @@ func (c *analyticsHubRESTClient) GetListing(ctx context.Context, req *dataexchan return resp, nil } -// CreateListing creates a new Listing in a given project and location. +// CreateListing creates a new listing. func (c *analyticsHubRESTClient) CreateListing(ctx context.Context, req *dataexchangepb.CreateListingRequest, opts ...gax.CallOption) (*dataexchangepb.Listing, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} body := req.GetListing() @@ -1717,7 +1811,7 @@ func (c *analyticsHubRESTClient) CreateListing(ctx context.Context, req *dataexc return resp, nil } -// UpdateListing updates the parameters of a single Listing. +// UpdateListing updates an existing listing. func (c *analyticsHubRESTClient) UpdateListing(ctx context.Context, req *dataexchangepb.UpdateListingRequest, opts ...gax.CallOption) (*dataexchangepb.Listing, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} body := req.GetListing() @@ -1733,8 +1827,12 @@ func (c *analyticsHubRESTClient) UpdateListing(ctx context.Context, req *dataexc baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetListing().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1784,8 +1882,7 @@ func (c *analyticsHubRESTClient) UpdateListing(ctx context.Context, req *dataexc return resp, nil } -// DeleteListing deletes a single Listing, as long as there are no subscriptions -// associated with the source of this Listing. +// DeleteListing deletes a listing. func (c *analyticsHubRESTClient) DeleteListing(ctx context.Context, req *dataexchangepb.DeleteListingRequest, opts ...gax.CallOption) error { baseUrl, err := url.Parse(c.endpoint) if err != nil { @@ -1820,10 +1917,11 @@ func (c *analyticsHubRESTClient) DeleteListing(ctx context.Context, req *dataexc }, opts...) } -// SubscribeListing subscribes to a single Listing. +// SubscribeListing subscribes to a listing. // -// Data Exchange currently supports one type of Listing: a BigQuery dataset. -// Upon subscription to a Listing for a BigQuery dataset, Data Exchange +// Currently, with Analytics Hub, you can create listings that +// reference only BigQuery datasets. +// Upon subscription to a listing for a BigQuery dataset, Analytics Hub // creates a linked dataset in the subscriber’s project. func (c *analyticsHubRESTClient) SubscribeListing(ctx context.Context, req *dataexchangepb.SubscribeListingRequest, opts ...gax.CallOption) (*dataexchangepb.SubscribeListingResponse, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} @@ -1883,7 +1981,7 @@ func (c *analyticsHubRESTClient) SubscribeListing(ctx context.Context, req *data return resp, nil } -// GetIamPolicy gets the IAM policy for a dataExchange or a listing. +// GetIamPolicy gets the IAM policy. func (c *analyticsHubRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -1942,7 +2040,7 @@ func (c *analyticsHubRESTClient) GetIamPolicy(ctx context.Context, req *iampb.Ge return resp, nil } -// SetIamPolicy sets the IAM policy for a dataExchange or a listing. +// SetIamPolicy sets the IAM policy. func (c *analyticsHubRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -2001,8 +2099,7 @@ func (c *analyticsHubRESTClient) SetIamPolicy(ctx context.Context, req *iampb.Se return resp, nil } -// TestIamPermissions returns the permissions that a caller has on a specified dataExchange or -// listing. +// TestIamPermissions returns the permissions that a caller has. func (c *analyticsHubRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -2061,6 +2158,149 @@ func (c *analyticsHubRESTClient) TestIamPermissions(ctx context.Context, req *ia return resp, nil } +// GetLocation gets information about a location. +func (c *analyticsHubRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *analyticsHubRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // DataExchangeIterator manages a stream of *dataexchangepb.DataExchange. type DataExchangeIterator struct { items []*dataexchangepb.DataExchange @@ -2154,3 +2394,50 @@ func (it *ListingIterator) takeBuf() interface{} { it.items = nil return b } + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_test.go b/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_test.go index f2e5fca8610a..15c9f7c242b8 100644 --- a/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_test.go +++ b/bigquery/dataexchange/apiv1beta1/analytics_hub_client_example_test.go @@ -22,11 +22,17 @@ import ( dataexchange "cloud.google.com/go/bigquery/dataexchange/apiv1beta1" "google.golang.org/api/iterator" dataexchangepb "google.golang.org/genproto/googleapis/cloud/bigquery/dataexchange/v1beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" iampb "google.golang.org/genproto/googleapis/iam/v1" ) func ExampleNewAnalyticsHubClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +45,11 @@ func ExampleNewAnalyticsHubClient() { func ExampleNewAnalyticsHubRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -51,6 +62,11 @@ func ExampleNewAnalyticsHubRESTClient() { func ExampleAnalyticsHubClient_ListDataExchanges() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +93,11 @@ func ExampleAnalyticsHubClient_ListDataExchanges() { func ExampleAnalyticsHubClient_ListOrgDataExchanges() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -103,6 +124,11 @@ func ExampleAnalyticsHubClient_ListOrgDataExchanges() { func ExampleAnalyticsHubClient_GetDataExchange() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -123,6 +149,11 @@ func ExampleAnalyticsHubClient_GetDataExchange() { func ExampleAnalyticsHubClient_CreateDataExchange() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +174,11 @@ func ExampleAnalyticsHubClient_CreateDataExchange() { func ExampleAnalyticsHubClient_UpdateDataExchange() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -163,6 +199,11 @@ func ExampleAnalyticsHubClient_UpdateDataExchange() { func ExampleAnalyticsHubClient_DeleteDataExchange() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -181,6 +222,11 @@ func ExampleAnalyticsHubClient_DeleteDataExchange() { func ExampleAnalyticsHubClient_ListListings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +253,11 @@ func ExampleAnalyticsHubClient_ListListings() { func ExampleAnalyticsHubClient_GetListing() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -227,6 +278,11 @@ func ExampleAnalyticsHubClient_GetListing() { func ExampleAnalyticsHubClient_CreateListing() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -247,6 +303,11 @@ func ExampleAnalyticsHubClient_CreateListing() { func ExampleAnalyticsHubClient_UpdateListing() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -267,6 +328,11 @@ func ExampleAnalyticsHubClient_UpdateListing() { func ExampleAnalyticsHubClient_DeleteListing() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -285,6 +351,11 @@ func ExampleAnalyticsHubClient_DeleteListing() { func ExampleAnalyticsHubClient_SubscribeListing() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -305,6 +376,11 @@ func ExampleAnalyticsHubClient_SubscribeListing() { func ExampleAnalyticsHubClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -325,6 +401,11 @@ func ExampleAnalyticsHubClient_GetIamPolicy() { func ExampleAnalyticsHubClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -345,6 +426,11 @@ func ExampleAnalyticsHubClient_SetIamPolicy() { func ExampleAnalyticsHubClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataexchange.NewAnalyticsHubClient(ctx) if err != nil { // TODO: Handle error. @@ -362,3 +448,59 @@ func ExampleAnalyticsHubClient_TestIamPermissions() { // TODO: Use resp. _ = resp } + +func ExampleAnalyticsHubClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataexchange.NewAnalyticsHubClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnalyticsHubClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataexchange.NewAnalyticsHubClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/bigquery/dataexchange/apiv1beta1/doc.go b/bigquery/dataexchange/apiv1beta1/doc.go index 6ab6ef5d6beb..0382eb55f765 100644 --- a/bigquery/dataexchange/apiv1beta1/doc.go +++ b/bigquery/dataexchange/apiv1beta1/doc.go @@ -19,53 +19,64 @@ // // Exchange data and analytics assets securely and efficiently. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := dataexchange.NewAnalyticsHubClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataexchange.NewAnalyticsHubClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := dataexchange.NewAnalyticsHubClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &dataexchangepb.ListDataExchangesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/dataexchange/v1beta1#ListDataExchangesRequest. -// } -// it := c.ListDataExchanges(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataexchange.NewAnalyticsHubClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dataexchangepb.ListDataExchangesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/dataexchange/v1beta1#ListDataExchangesRequest. +// } +// it := c.ListDataExchanges(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewAnalyticsHubClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/bigquery/dataexchange/apiv1beta1/gapic_metadata.json b/bigquery/dataexchange/apiv1beta1/gapic_metadata.json index 610a55cef95d..07689d4ab44f 100644 --- a/bigquery/dataexchange/apiv1beta1/gapic_metadata.json +++ b/bigquery/dataexchange/apiv1beta1/gapic_metadata.json @@ -45,6 +45,11 @@ "GetListing" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, "ListDataExchanges": { "methods": [ "ListDataExchanges" @@ -55,6 +60,11 @@ "ListListings" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, "ListOrgDataExchanges": { "methods": [ "ListOrgDataExchanges" @@ -125,6 +135,11 @@ "GetListing" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, "ListDataExchanges": { "methods": [ "ListDataExchanges" @@ -135,6 +150,11 @@ "ListListings" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, "ListOrgDataExchanges": { "methods": [ "ListOrgDataExchanges" diff --git a/bigquery/dataset.go b/bigquery/dataset.go index a9deeb3295eb..d6bb60dc2652 100644 --- a/bigquery/dataset.go +++ b/bigquery/dataset.go @@ -216,7 +216,12 @@ func (d *Dataset) deleteInternal(ctx context.Context, deleteContents bool) (err call := d.c.bqs.Datasets.Delete(d.ProjectID, d.DatasetID).Context(ctx).DeleteContents(deleteContents) setClientHeader(call.Header()) - return call.Do() + return runWithRetry(ctx, func() (err error) { + sCtx := trace.StartSpan(ctx, "bigquery.datasets.delete") + err = call.Do() + trace.EndSpan(sCtx, err) + return err + }) } // Metadata fetches the metadata for the dataset. @@ -228,7 +233,9 @@ func (d *Dataset) Metadata(ctx context.Context) (md *DatasetMetadata, err error) setClientHeader(call.Header()) var ds *bq.Dataset if err := runWithRetry(ctx, func() (err error) { + sCtx := trace.StartSpan(ctx, "bigquery.datasets.get") ds, err = call.Do() + trace.EndSpan(sCtx, err) return err }); err != nil { return nil, err @@ -284,7 +291,9 @@ func (d *Dataset) Update(ctx context.Context, dm DatasetMetadataToUpdate, etag s } var ds2 *bq.Dataset if err := runWithRetry(ctx, func() (err error) { + sCtx := trace.StartSpan(ctx, "bigquery.datasets.patch") ds2, err = call.Do() + trace.EndSpan(sCtx, err) return err }); err != nil { return nil, err @@ -391,7 +400,9 @@ var listTables = func(it *TableIterator, pageSize int, pageToken string) (*bq.Ta } var res *bq.TableList err := runWithRetry(it.ctx, func() (err error) { + sCtx := trace.StartSpan(it.ctx, "bigquery.tables.list") res, err = call.Do() + trace.EndSpan(sCtx, err) return err }) return res, err @@ -476,7 +487,9 @@ var listModels = func(it *ModelIterator, pageSize int, pageToken string) (*bq.Li } var res *bq.ListModelsResponse err := runWithRetry(it.ctx, func() (err error) { + sCtx := trace.StartSpan(it.ctx, "bigquery.models.list") res, err = call.Do() + trace.EndSpan(sCtx, err) return err }) return res, err @@ -563,7 +576,9 @@ var listRoutines = func(it *RoutineIterator, pageSize int, pageToken string) (*b } var res *bq.ListRoutinesResponse err := runWithRetry(it.ctx, func() (err error) { + sCtx := trace.StartSpan(it.ctx, "bigquery.routines.list") res, err = call.Do() + trace.EndSpan(sCtx, err) return err }) return res, err @@ -667,7 +682,9 @@ var listDatasets = func(it *DatasetIterator, pageSize int, pageToken string) (*b } var res *bq.DatasetList err := runWithRetry(it.ctx, func() (err error) { + sCtx := trace.StartSpan(it.ctx, "bigquery.datasets.list") res, err = call.Do() + trace.EndSpan(sCtx, err) return err }) return res, err diff --git a/bigquery/datatransfer/apiv1/data_transfer_client.go b/bigquery/datatransfer/apiv1/data_transfer_client.go index 10950d0306c5..782260aa8da3 100644 --- a/bigquery/datatransfer/apiv1/data_transfer_client.go +++ b/bigquery/datatransfer/apiv1/data_transfer_client.go @@ -249,7 +249,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -407,7 +408,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go b/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go index 497887b4f768..90500507c774 100644 --- a/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go +++ b/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_GetDataSource() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleClient_GetDataSource() { func ExampleClient_ListDataSources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleClient_ListDataSources() { func ExampleClient_CreateTransferConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleClient_CreateTransferConfig() { func ExampleClient_UpdateTransferConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleClient_UpdateTransferConfig() { func ExampleClient_DeleteTransferConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +172,11 @@ func ExampleClient_DeleteTransferConfig() { func ExampleClient_GetTransferConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +197,11 @@ func ExampleClient_GetTransferConfig() { func ExampleClient_ListTransferConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +228,11 @@ func ExampleClient_ListTransferConfigs() { func ExampleClient_ScheduleTransferRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleClient_ScheduleTransferRuns() { func ExampleClient_StartManualTransferRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleClient_StartManualTransferRuns() { func ExampleClient_GetTransferRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -248,6 +303,11 @@ func ExampleClient_GetTransferRun() { func ExampleClient_DeleteTransferRun() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +326,11 @@ func ExampleClient_DeleteTransferRun() { func ExampleClient_ListTransferRuns() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -292,6 +357,11 @@ func ExampleClient_ListTransferRuns() { func ExampleClient_ListTransferLogs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -318,6 +388,11 @@ func ExampleClient_ListTransferLogs() { func ExampleClient_CheckValidCreds() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -338,6 +413,11 @@ func ExampleClient_CheckValidCreds() { func ExampleClient_EnrollDataSources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datatransfer.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/datatransfer/apiv1/doc.go b/bigquery/datatransfer/apiv1/doc.go index 56b259d4f30f..f43be8a2953f 100644 --- a/bigquery/datatransfer/apiv1/doc.go +++ b/bigquery/datatransfer/apiv1/doc.go @@ -20,43 +20,54 @@ // Schedule queries or transfer external data from SaaS applications to // Google BigQuery on a regular basis. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datatransfer.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datatransfer.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datatransfer.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &datatransferpb.GetDataSourceRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1#GetDataSourceRequest. -// } -// resp, err := c.GetDataSource(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datatransfer.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &datatransferpb.GetDataSourceRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1#GetDataSourceRequest. +// } +// resp, err := c.GetDataSource(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/bigquery/datatransfer/apiv1/mock_test.go b/bigquery/datatransfer/apiv1/mock_test.go deleted file mode 100644 index b4d3f4aa22e0..000000000000 --- a/bigquery/datatransfer/apiv1/mock_test.go +++ /dev/null @@ -1,1215 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package datatransfer - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - timestamppb "github.com/golang/protobuf/ptypes/timestamp" - "google.golang.org/api/option" - datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1" - field_maskpb "google.golang.org/genproto/protobuf/field_mask" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockDataTransferServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - datatransferpb.DataTransferServiceServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockDataTransferServer) GetDataSource(ctx context.Context, req *datatransferpb.GetDataSourceRequest) (*datatransferpb.DataSource, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.DataSource), nil -} - -func (s *mockDataTransferServer) ListDataSources(ctx context.Context, req *datatransferpb.ListDataSourcesRequest) (*datatransferpb.ListDataSourcesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.ListDataSourcesResponse), nil -} - -func (s *mockDataTransferServer) CreateTransferConfig(ctx context.Context, req *datatransferpb.CreateTransferConfigRequest) (*datatransferpb.TransferConfig, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.TransferConfig), nil -} - -func (s *mockDataTransferServer) UpdateTransferConfig(ctx context.Context, req *datatransferpb.UpdateTransferConfigRequest) (*datatransferpb.TransferConfig, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.TransferConfig), nil -} - -func (s *mockDataTransferServer) DeleteTransferConfig(ctx context.Context, req *datatransferpb.DeleteTransferConfigRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockDataTransferServer) GetTransferConfig(ctx context.Context, req *datatransferpb.GetTransferConfigRequest) (*datatransferpb.TransferConfig, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.TransferConfig), nil -} - -func (s *mockDataTransferServer) ListTransferConfigs(ctx context.Context, req *datatransferpb.ListTransferConfigsRequest) (*datatransferpb.ListTransferConfigsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.ListTransferConfigsResponse), nil -} - -func (s *mockDataTransferServer) ScheduleTransferRuns(ctx context.Context, req *datatransferpb.ScheduleTransferRunsRequest) (*datatransferpb.ScheduleTransferRunsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.ScheduleTransferRunsResponse), nil -} - -func (s *mockDataTransferServer) StartManualTransferRuns(ctx context.Context, req *datatransferpb.StartManualTransferRunsRequest) (*datatransferpb.StartManualTransferRunsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.StartManualTransferRunsResponse), nil -} - -func (s *mockDataTransferServer) GetTransferRun(ctx context.Context, req *datatransferpb.GetTransferRunRequest) (*datatransferpb.TransferRun, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.TransferRun), nil -} - -func (s *mockDataTransferServer) DeleteTransferRun(ctx context.Context, req *datatransferpb.DeleteTransferRunRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockDataTransferServer) ListTransferRuns(ctx context.Context, req *datatransferpb.ListTransferRunsRequest) (*datatransferpb.ListTransferRunsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.ListTransferRunsResponse), nil -} - -func (s *mockDataTransferServer) ListTransferLogs(ctx context.Context, req *datatransferpb.ListTransferLogsRequest) (*datatransferpb.ListTransferLogsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.ListTransferLogsResponse), nil -} - -func (s *mockDataTransferServer) CheckValidCreds(ctx context.Context, req *datatransferpb.CheckValidCredsRequest) (*datatransferpb.CheckValidCredsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*datatransferpb.CheckValidCredsResponse), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockDataTransfer mockDataTransferServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - datatransferpb.RegisterDataTransferServiceServer(serv, &mockDataTransfer) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestDataTransferServiceGetDataSource(t *testing.T) { - var name2 string = "name2-1052831874" - var dataSourceId string = "dataSourceId-1015796374" - var displayName string = "displayName1615086568" - var description string = "description-1724546052" - var clientId string = "clientId-1904089585" - var supportsMultipleTransfers bool = true - var updateDeadlineSeconds int32 = 991471694 - var defaultSchedule string = "defaultSchedule-800168235" - var supportsCustomSchedule bool = true - var helpUrl string = "helpUrl-789431439" - var defaultDataRefreshWindowDays int32 = 1804935157 - var manualRunsDisabled bool = true - var expectedResponse = &datatransferpb.DataSource{ - Name: name2, - DataSourceId: dataSourceId, - DisplayName: displayName, - Description: description, - ClientId: clientId, - SupportsMultipleTransfers: supportsMultipleTransfers, - UpdateDeadlineSeconds: updateDeadlineSeconds, - DefaultSchedule: defaultSchedule, - SupportsCustomSchedule: supportsCustomSchedule, - HelpUrl: helpUrl, - DefaultDataRefreshWindowDays: defaultDataRefreshWindowDays, - ManualRunsDisabled: manualRunsDisabled, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/dataSources/%s", "[PROJECT]", "[DATA_SOURCE]") - var request = &datatransferpb.GetDataSourceRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetDataSource(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceGetDataSourceError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/dataSources/%s", "[PROJECT]", "[DATA_SOURCE]") - var request = &datatransferpb.GetDataSourceRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetDataSource(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceListDataSources(t *testing.T) { - var nextPageToken string = "" - var dataSourcesElement *datatransferpb.DataSource = &datatransferpb.DataSource{} - var dataSources = []*datatransferpb.DataSource{dataSourcesElement} - var expectedResponse = &datatransferpb.ListDataSourcesResponse{ - NextPageToken: nextPageToken, - DataSources: dataSources, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &datatransferpb.ListDataSourcesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListDataSources(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.DataSources[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceListDataSourcesError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &datatransferpb.ListDataSourcesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListDataSources(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceCreateTransferConfig(t *testing.T) { - var name string = "name3373707" - var destinationDatasetId string = "destinationDatasetId1541564179" - var displayName string = "displayName1615086568" - var dataSourceId string = "dataSourceId-1015796374" - var schedule string = "schedule-697920873" - var dataRefreshWindowDays int32 = 327632845 - var disabled bool = true - var userId int64 = 147132913 - var datasetRegion string = "datasetRegion959248539" - var expectedResponse = &datatransferpb.TransferConfig{ - Name: name, - Destination: &datatransferpb.TransferConfig_DestinationDatasetId{ - DestinationDatasetId: destinationDatasetId, - }, - DisplayName: displayName, - DataSourceId: dataSourceId, - Schedule: schedule, - DataRefreshWindowDays: dataRefreshWindowDays, - Disabled: disabled, - UserId: userId, - DatasetRegion: datasetRegion, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var transferConfig *datatransferpb.TransferConfig = &datatransferpb.TransferConfig{} - var request = &datatransferpb.CreateTransferConfigRequest{ - Parent: formattedParent, - TransferConfig: transferConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTransferConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceCreateTransferConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var transferConfig *datatransferpb.TransferConfig = &datatransferpb.TransferConfig{} - var request = &datatransferpb.CreateTransferConfigRequest{ - Parent: formattedParent, - TransferConfig: transferConfig, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTransferConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceUpdateTransferConfig(t *testing.T) { - var name string = "name3373707" - var destinationDatasetId string = "destinationDatasetId1541564179" - var displayName string = "displayName1615086568" - var dataSourceId string = "dataSourceId-1015796374" - var schedule string = "schedule-697920873" - var dataRefreshWindowDays int32 = 327632845 - var disabled bool = true - var userId int64 = 147132913 - var datasetRegion string = "datasetRegion959248539" - var expectedResponse = &datatransferpb.TransferConfig{ - Name: name, - Destination: &datatransferpb.TransferConfig_DestinationDatasetId{ - DestinationDatasetId: destinationDatasetId, - }, - DisplayName: displayName, - DataSourceId: dataSourceId, - Schedule: schedule, - DataRefreshWindowDays: dataRefreshWindowDays, - Disabled: disabled, - UserId: userId, - DatasetRegion: datasetRegion, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var transferConfig *datatransferpb.TransferConfig = &datatransferpb.TransferConfig{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &datatransferpb.UpdateTransferConfigRequest{ - TransferConfig: transferConfig, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateTransferConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceUpdateTransferConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var transferConfig *datatransferpb.TransferConfig = &datatransferpb.TransferConfig{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &datatransferpb.UpdateTransferConfigRequest{ - TransferConfig: transferConfig, - UpdateMask: updateMask, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateTransferConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceDeleteTransferConfig(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var request = &datatransferpb.DeleteTransferConfigRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTransferConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestDataTransferServiceDeleteTransferConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var request = &datatransferpb.DeleteTransferConfigRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTransferConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestDataTransferServiceGetTransferConfig(t *testing.T) { - var name2 string = "name2-1052831874" - var destinationDatasetId string = "destinationDatasetId1541564179" - var displayName string = "displayName1615086568" - var dataSourceId string = "dataSourceId-1015796374" - var schedule string = "schedule-697920873" - var dataRefreshWindowDays int32 = 327632845 - var disabled bool = true - var userId int64 = 147132913 - var datasetRegion string = "datasetRegion959248539" - var expectedResponse = &datatransferpb.TransferConfig{ - Name: name2, - Destination: &datatransferpb.TransferConfig_DestinationDatasetId{ - DestinationDatasetId: destinationDatasetId, - }, - DisplayName: displayName, - DataSourceId: dataSourceId, - Schedule: schedule, - DataRefreshWindowDays: dataRefreshWindowDays, - Disabled: disabled, - UserId: userId, - DatasetRegion: datasetRegion, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var request = &datatransferpb.GetTransferConfigRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTransferConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceGetTransferConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var request = &datatransferpb.GetTransferConfigRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTransferConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceListTransferConfigs(t *testing.T) { - var nextPageToken string = "" - var transferConfigsElement *datatransferpb.TransferConfig = &datatransferpb.TransferConfig{} - var transferConfigs = []*datatransferpb.TransferConfig{transferConfigsElement} - var expectedResponse = &datatransferpb.ListTransferConfigsResponse{ - NextPageToken: nextPageToken, - TransferConfigs: transferConfigs, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &datatransferpb.ListTransferConfigsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTransferConfigs(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.TransferConfigs[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceListTransferConfigsError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &datatransferpb.ListTransferConfigsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTransferConfigs(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceScheduleTransferRuns(t *testing.T) { - var expectedResponse *datatransferpb.ScheduleTransferRunsResponse = &datatransferpb.ScheduleTransferRunsResponse{} - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var startTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var endTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var request = &datatransferpb.ScheduleTransferRunsRequest{ - Parent: formattedParent, - StartTime: startTime, - EndTime: endTime, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ScheduleTransferRuns(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceScheduleTransferRunsError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var startTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var endTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var request = &datatransferpb.ScheduleTransferRunsRequest{ - Parent: formattedParent, - StartTime: startTime, - EndTime: endTime, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ScheduleTransferRuns(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceGetTransferRun(t *testing.T) { - var name2 string = "name2-1052831874" - var destinationDatasetId string = "destinationDatasetId1541564179" - var dataSourceId string = "dataSourceId-1015796374" - var userId int64 = 147132913 - var schedule string = "schedule-697920873" - var expectedResponse = &datatransferpb.TransferRun{ - Name: name2, - Destination: &datatransferpb.TransferRun_DestinationDatasetId{ - DestinationDatasetId: destinationDatasetId, - }, - DataSourceId: dataSourceId, - UserId: userId, - Schedule: schedule, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", "[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]") - var request = &datatransferpb.GetTransferRunRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTransferRun(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceGetTransferRunError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", "[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]") - var request = &datatransferpb.GetTransferRunRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTransferRun(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceDeleteTransferRun(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", "[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]") - var request = &datatransferpb.DeleteTransferRunRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTransferRun(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestDataTransferServiceDeleteTransferRunError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", "[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]") - var request = &datatransferpb.DeleteTransferRunRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTransferRun(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestDataTransferServiceListTransferRuns(t *testing.T) { - var nextPageToken string = "" - var transferRunsElement *datatransferpb.TransferRun = &datatransferpb.TransferRun{} - var transferRuns = []*datatransferpb.TransferRun{transferRunsElement} - var expectedResponse = &datatransferpb.ListTransferRunsResponse{ - NextPageToken: nextPageToken, - TransferRuns: transferRuns, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var request = &datatransferpb.ListTransferRunsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTransferRuns(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.TransferRuns[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceListTransferRunsError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/transferConfigs/%s", "[PROJECT]", "[TRANSFER_CONFIG]") - var request = &datatransferpb.ListTransferRunsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTransferRuns(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceListTransferLogs(t *testing.T) { - var nextPageToken string = "" - var transferMessagesElement *datatransferpb.TransferMessage = &datatransferpb.TransferMessage{} - var transferMessages = []*datatransferpb.TransferMessage{transferMessagesElement} - var expectedResponse = &datatransferpb.ListTransferLogsResponse{ - NextPageToken: nextPageToken, - TransferMessages: transferMessages, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", "[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]") - var request = &datatransferpb.ListTransferLogsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTransferLogs(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.TransferMessages[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceListTransferLogsError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", "[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]") - var request = &datatransferpb.ListTransferLogsRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTransferLogs(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceCheckValidCreds(t *testing.T) { - var hasValidCreds bool = false - var expectedResponse = &datatransferpb.CheckValidCredsResponse{ - HasValidCreds: hasValidCreds, - } - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/dataSources/%s", "[PROJECT]", "[DATA_SOURCE]") - var request = &datatransferpb.CheckValidCredsRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CheckValidCreds(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceCheckValidCredsError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/dataSources/%s", "[PROJECT]", "[DATA_SOURCE]") - var request = &datatransferpb.CheckValidCredsRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CheckValidCreds(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestDataTransferServiceStartManualTransferRuns(t *testing.T) { - var expectedResponse *datatransferpb.StartManualTransferRunsResponse = &datatransferpb.StartManualTransferRunsResponse{} - - mockDataTransfer.err = nil - mockDataTransfer.reqs = nil - - mockDataTransfer.resps = append(mockDataTransfer.resps[:0], expectedResponse) - - var request *datatransferpb.StartManualTransferRunsRequest = &datatransferpb.StartManualTransferRunsRequest{} - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.StartManualTransferRuns(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockDataTransfer.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestDataTransferServiceStartManualTransferRunsError(t *testing.T) { - errCode := codes.PermissionDenied - mockDataTransfer.err = gstatus.Error(errCode, "test error") - - var request *datatransferpb.StartManualTransferRunsRequest = &datatransferpb.StartManualTransferRunsRequest{} - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.StartManualTransferRuns(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/bigquery/datatransfer/apiv1/path_funcs.go b/bigquery/datatransfer/apiv1/path_funcs.go index 89eb5bb17c10..c49b5d88582a 100644 --- a/bigquery/datatransfer/apiv1/path_funcs.go +++ b/bigquery/datatransfer/apiv1/path_funcs.go @@ -17,7 +17,9 @@ package datatransfer // ProjectPath returns the path for the project resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s", project) +// +// fmt.Sprintf("projects/%s", project) +// // instead. func ProjectPath(project string) string { return "" + @@ -29,7 +31,9 @@ func ProjectPath(project string) string { // LocationPath returns the path for the location resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/locations/%s", project, location) +// +// fmt.Sprintf("projects/%s/locations/%s", project, location) +// // instead. func LocationPath(project, location string) string { return "" + @@ -43,7 +47,9 @@ func LocationPath(project, location string) string { // LocationDataSourcePath returns the path for the location data source resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/locations/%s/dataSources/%s", project, location, dataSource) +// +// fmt.Sprintf("projects/%s/locations/%s/dataSources/%s", project, location, dataSource) +// // instead. func LocationDataSourcePath(project, location, dataSource string) string { return "" + @@ -59,7 +65,9 @@ func LocationDataSourcePath(project, location, dataSource string) string { // LocationTransferConfigPath returns the path for the location transfer config resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s", project, location, transferConfig) +// +// fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s", project, location, transferConfig) +// // instead. func LocationTransferConfigPath(project, location, transferConfig string) string { return "" + @@ -75,7 +83,9 @@ func LocationTransferConfigPath(project, location, transferConfig string) string // LocationRunPath returns the path for the location run resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s/runs/%s", project, location, transferConfig, run) +// +// fmt.Sprintf("projects/%s/locations/%s/transferConfigs/%s/runs/%s", project, location, transferConfig, run) +// // instead. func LocationRunPath(project, location, transferConfig, run string) string { return "" + @@ -93,7 +103,9 @@ func LocationRunPath(project, location, transferConfig, run string) string { // DataSourcePath returns the path for the data source resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/dataSources/%s", project, dataSource) +// +// fmt.Sprintf("projects/%s/dataSources/%s", project, dataSource) +// // instead. func DataSourcePath(project, dataSource string) string { return "" + @@ -107,7 +119,9 @@ func DataSourcePath(project, dataSource string) string { // TransferConfigPath returns the path for the transfer config resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig) +// +// fmt.Sprintf("projects/%s/transferConfigs/%s", project, transferConfig) +// // instead. func TransferConfigPath(project, transferConfig string) string { return "" + @@ -121,7 +135,9 @@ func TransferConfigPath(project, transferConfig string) string { // RunPath returns the path for the run resource. // // Deprecated: Use -// fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", project, transferConfig, run) +// +// fmt.Sprintf("projects/%s/transferConfigs/%s/runs/%s", project, transferConfig, run) +// // instead. func RunPath(project, transferConfig, run string) string { return "" + diff --git a/bigquery/doc.go b/bigquery/doc.go index 4ddae05e5f15..c1525b02d534 100644 --- a/bigquery/doc.go +++ b/bigquery/doc.go @@ -21,153 +21,152 @@ See https://cloud.google.com/bigquery/docs. See https://godoc.org/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. - -Creating a Client +# Creating a Client To start working with this package, create a client: - ctx := context.Background() - client, err := bigquery.NewClient(ctx, projectID) - if err != nil { - // TODO: Handle error. - } + ctx := context.Background() + client, err := bigquery.NewClient(ctx, projectID) + if err != nil { + // TODO: Handle error. + } -Querying +# Querying To query existing tables, create a Query and call its Read method: - q := client.Query(` - SELECT year, SUM(number) as num - FROM ` + "`bigquery-public-data.usa_names.usa_1910_2013`" + ` - WHERE name = "William" - GROUP BY year - ORDER BY year - `) - it, err := q.Read(ctx) - if err != nil { - // TODO: Handle error. - } + q := client.Query(` + SELECT year, SUM(number) as num + FROM ` + "`bigquery-public-data.usa_names.usa_1910_2013`" + ` + WHERE name = "William" + GROUP BY year + ORDER BY year + `) + it, err := q.Read(ctx) + if err != nil { + // TODO: Handle error. + } Then iterate through the resulting rows. You can store a row using anything that implements the ValueLoader interface, or with a slice or map of bigquery.Value. A slice is simplest: - for { - var values []bigquery.Value - err := it.Next(&values) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(values) - } + for { + var values []bigquery.Value + err := it.Next(&values) + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + fmt.Println(values) + } You can also use a struct whose exported fields match the query: - type Count struct { - Year int - Num int - } - for { - var c Count - err := it.Next(&c) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(c) - } + type Count struct { + Year int + Num int + } + for { + var c Count + err := it.Next(&c) + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + fmt.Println(c) + } You can also start the query running and get the results later. Create the query as above, but call Run instead of Read. This returns a Job, which represents an asynchronous operation. - job, err := q.Run(ctx) - if err != nil { - // TODO: Handle error. - } + job, err := q.Run(ctx) + if err != nil { + // TODO: Handle error. + } Get the job's ID, a printable string. You can save this string to retrieve the results at a later time, even in another process. - jobID := job.ID() - fmt.Printf("The job ID is %s\n", jobID) + jobID := job.ID() + fmt.Printf("The job ID is %s\n", jobID) To retrieve the job's results from the ID, first look up the Job: - job, err = client.JobFromID(ctx, jobID) - if err != nil { - // TODO: Handle error. - } + job, err = client.JobFromID(ctx, jobID) + if err != nil { + // TODO: Handle error. + } Use the Job.Read method to obtain an iterator, and loop over the rows. Query.Read is just a convenience method that combines Query.Run and Job.Read. - it, err = job.Read(ctx) - if err != nil { - // TODO: Handle error. - } - // Proceed with iteration as above. + it, err = job.Read(ctx) + if err != nil { + // TODO: Handle error. + } + // Proceed with iteration as above. -Datasets and Tables +# Datasets and Tables You can refer to datasets in the client's project with the Dataset method, and in other projects with the DatasetInProject method: - myDataset := client.Dataset("my_dataset") - yourDataset := client.DatasetInProject("your-project-id", "your_dataset") + myDataset := client.Dataset("my_dataset") + yourDataset := client.DatasetInProject("your-project-id", "your_dataset") These methods create references to datasets, not the datasets themselves. You can have a dataset reference even if the dataset doesn't exist yet. Use Dataset.Create to create a dataset from a reference: - if err := myDataset.Create(ctx, nil); err != nil { - // TODO: Handle error. - } + if err := myDataset.Create(ctx, nil); err != nil { + // TODO: Handle error. + } You can refer to tables with Dataset.Table. Like bigquery.Dataset, bigquery.Table is a reference to an object in BigQuery that may or may not exist. - table := myDataset.Table("my_table") + table := myDataset.Table("my_table") You can create, delete and update the metadata of tables with methods on Table. For instance, you could create a temporary table with: - err = myDataset.Table("temp").Create(ctx, &bigquery.TableMetadata{ - ExpirationTime: time.Now().Add(1*time.Hour)}) - if err != nil { - // TODO: Handle error. - } + err = myDataset.Table("temp").Create(ctx, &bigquery.TableMetadata{ + ExpirationTime: time.Now().Add(1*time.Hour)}) + if err != nil { + // TODO: Handle error. + } We'll see how to create a table with a schema in the next section. -Schemas +# Schemas There are two ways to construct schemas with this package. You can build a schema by hand, like so: - schema1 := bigquery.Schema{ - {Name: "Name", Required: true, Type: bigquery.StringFieldType}, - {Name: "Grades", Repeated: true, Type: bigquery.IntegerFieldType}, - {Name: "Optional", Required: false, Type: bigquery.IntegerFieldType}, - } + schema1 := bigquery.Schema{ + {Name: "Name", Required: true, Type: bigquery.StringFieldType}, + {Name: "Grades", Repeated: true, Type: bigquery.IntegerFieldType}, + {Name: "Optional", Required: false, Type: bigquery.IntegerFieldType}, + } Or you can infer the schema from a struct: - type student struct { - Name string - Grades []int - Optional bigquery.NullInt64 - } - schema2, err := bigquery.InferSchema(student{}) - if err != nil { - // TODO: Handle error. - } - // schema1 and schema2 are identical. + type student struct { + Name string + Grades []int + Optional bigquery.NullInt64 + } + schema2, err := bigquery.InferSchema(student{}) + if err != nil { + // TODO: Handle error. + } + // schema1 and schema2 are identical. Struct inference supports tags like those of the encoding/json package, so you can change names, ignore fields, or mark a field as nullable (non-required). Fields @@ -176,68 +175,68 @@ NullTimestamp, NullDate, NullTime, NullDateTime, and NullGeography) are automatically inferred as nullable, so the "nullable" tag is only needed for []byte, *big.Rat and pointer-to-struct fields. - type student2 struct { - Name string `bigquery:"full_name"` - Grades []int - Secret string `bigquery:"-"` - Optional []byte `bigquery:",nullable"` - } - schema3, err := bigquery.InferSchema(student2{}) - if err != nil { - // TODO: Handle error. - } - // schema3 has required fields "full_name" and "Grade", and nullable BYTES field "Optional". + type student2 struct { + Name string `bigquery:"full_name"` + Grades []int + Secret string `bigquery:"-"` + Optional []byte `bigquery:",nullable"` + } + schema3, err := bigquery.InferSchema(student2{}) + if err != nil { + // TODO: Handle error. + } + // schema3 has required fields "full_name" and "Grade", and nullable BYTES field "Optional". Having constructed a schema, you can create a table with it like so: - if err := table.Create(ctx, &bigquery.TableMetadata{Schema: schema1}); err != nil { - // TODO: Handle error. - } + if err := table.Create(ctx, &bigquery.TableMetadata{Schema: schema1}); err != nil { + // TODO: Handle error. + } -Copying +# Copying You can copy one or more tables to another table. Begin by constructing a Copier describing the copy. Then set any desired copy options, and finally call Run to get a Job: - copier := myDataset.Table("dest").CopierFrom(myDataset.Table("src")) - copier.WriteDisposition = bigquery.WriteTruncate - job, err = copier.Run(ctx) - if err != nil { - // TODO: Handle error. - } + copier := myDataset.Table("dest").CopierFrom(myDataset.Table("src")) + copier.WriteDisposition = bigquery.WriteTruncate + job, err = copier.Run(ctx) + if err != nil { + // TODO: Handle error. + } You can chain the call to Run if you don't want to set options: - job, err = myDataset.Table("dest").CopierFrom(myDataset.Table("src")).Run(ctx) - if err != nil { - // TODO: Handle error. - } + job, err = myDataset.Table("dest").CopierFrom(myDataset.Table("src")).Run(ctx) + if err != nil { + // TODO: Handle error. + } You can wait for your job to complete: - status, err := job.Wait(ctx) - if err != nil { - // TODO: Handle error. - } + status, err := job.Wait(ctx) + if err != nil { + // TODO: Handle error. + } Job.Wait polls with exponential backoff. You can also poll yourself, if you wish: - for { - status, err := job.Status(ctx) - if err != nil { - // TODO: Handle error. - } - if status.Done() { - if status.Err() != nil { - log.Fatalf("Job failed with error %v", status.Err()) - } - break - } - time.Sleep(pollInterval) - } - -Loading and Uploading + for { + status, err := job.Status(ctx) + if err != nil { + // TODO: Handle error. + } + if status.Done() { + if status.Err() != nil { + log.Fatalf("Job failed with error %v", status.Err()) + } + break + } + time.Sleep(pollInterval) + } + +# Loading and Uploading There are two ways to populate a table with this package: load the data from a Google Cloud Storage object, or upload rows directly from your program. @@ -245,73 +244,72 @@ object, or upload rows directly from your program. For loading, first create a GCSReference, configuring it if desired. Then make a Loader, optionally configure it as well, and call its Run method. - gcsRef := bigquery.NewGCSReference("gs://my-bucket/my-object") - gcsRef.AllowJaggedRows = true - loader := myDataset.Table("dest").LoaderFrom(gcsRef) - loader.CreateDisposition = bigquery.CreateNever - job, err = loader.Run(ctx) - // Poll the job for completion if desired, as above. + gcsRef := bigquery.NewGCSReference("gs://my-bucket/my-object") + gcsRef.AllowJaggedRows = true + loader := myDataset.Table("dest").LoaderFrom(gcsRef) + loader.CreateDisposition = bigquery.CreateNever + job, err = loader.Run(ctx) + // Poll the job for completion if desired, as above. To upload, first define a type that implements the ValueSaver interface, which has a single method named Save. Then create an Inserter, and call its Put method with a slice of values. - u := 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 := u.Put(ctx, items); err != nil { - // TODO: Handle error. - } + u := 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 := u.Put(ctx, items); err != nil { + // TODO: Handle error. + } You can also upload a struct that doesn't implement ValueSaver. Use the StructSaver type to specify the schema and insert ID by hand, or just supply the struct or struct pointer directly and the schema will be inferred: - type Item2 struct { - Name string - Size float64 - Count int - } - // Item implements the ValueSaver interface. - items2 := []*Item2{ - {Name: "n1", Size: 32.6, Count: 7}, - {Name: "n2", Size: 4, Count: 2}, - {Name: "n3", Size: 101.5, Count: 1}, - } - if err := u.Put(ctx, items2); err != nil { - // TODO: Handle error. - } + type Item2 struct { + Name string + Size float64 + Count int + } + // Item implements the ValueSaver interface. + items2 := []*Item2{ + {Name: "n1", Size: 32.6, Count: 7}, + {Name: "n2", Size: 4, Count: 2}, + {Name: "n3", Size: 101.5, Count: 1}, + } + if err := u.Put(ctx, items2); err != nil { + // TODO: Handle error. + } BigQuery allows for higher throughput when omitting insertion IDs. To enable this, specify the sentinel `NoDedupeID` value for the insertion ID when implementing a ValueSaver. -Extracting +# Extracting If you've been following so far, extracting data from a BigQuery table into a Google Cloud Storage object will feel familiar. First create an Extractor, then optionally configure it, and lastly call its Run method. - extractor := table.ExtractorTo(gcsRef) - extractor.DisableHeader = true - job, err = extractor.Run(ctx) - // Poll the job for completion if desired, as above. + extractor := table.ExtractorTo(gcsRef) + extractor.DisableHeader = true + job, err = extractor.Run(ctx) + // Poll the job for completion if desired, as above. -Errors +# Errors Errors returned by this client are often of the type googleapi.Error: https://godoc.org/google.golang.org/api/googleapi#Error These errors can be introspected for more information by using `xerrors.As` with the richer *googleapi.Error type. For example: - var e *googleapi.Error - if ok := xerrors.As(err, &e); ok { - if e.Code == 409 { ... } - } + var e *googleapi.Error + if ok := xerrors.As(err, &e); ok { + if e.Code == 409 { ... } + } In some cases, your client may received unstructured googleapi.Error error responses. In such cases, it is likely that you have exceeded BigQuery request limits, documented at: https://cloud.google.com/bigquery/quotas - */ package bigquery // import "cloud.google.com/go/bigquery" diff --git a/bigquery/external.go b/bigquery/external.go index c5337a002168..3d3442b7fa3e 100644 --- a/bigquery/external.go +++ b/bigquery/external.go @@ -230,17 +230,22 @@ type CSVOptions struct { // An optional custom string that will represent a NULL // value in CSV import data. NullMarker string + + // Preserves the embedded ASCII control characters (the first 32 characters in the ASCII-table, + // from '\\x00' to '\\x1F') when loading from CSV. Only applicable to CSV, ignored for other formats. + PreserveASCIIControlCharacters bool } func (o *CSVOptions) populateExternalDataConfig(c *bq.ExternalDataConfiguration) { c.CsvOptions = &bq.CsvOptions{ - AllowJaggedRows: o.AllowJaggedRows, - AllowQuotedNewlines: o.AllowQuotedNewlines, - Encoding: string(o.Encoding), - FieldDelimiter: o.FieldDelimiter, - Quote: o.quote(), - SkipLeadingRows: o.SkipLeadingRows, - NullMarker: o.NullMarker, + AllowJaggedRows: o.AllowJaggedRows, + AllowQuotedNewlines: o.AllowQuotedNewlines, + Encoding: string(o.Encoding), + FieldDelimiter: o.FieldDelimiter, + Quote: o.quote(), + SkipLeadingRows: o.SkipLeadingRows, + NullMarker: o.NullMarker, + PreserveAsciiControlCharacters: o.PreserveASCIIControlCharacters, } } @@ -267,12 +272,13 @@ func (o *CSVOptions) setQuote(ps *string) { func bqToCSVOptions(q *bq.CsvOptions) *CSVOptions { o := &CSVOptions{ - AllowJaggedRows: q.AllowJaggedRows, - AllowQuotedNewlines: q.AllowQuotedNewlines, - Encoding: Encoding(q.Encoding), - FieldDelimiter: q.FieldDelimiter, - SkipLeadingRows: q.SkipLeadingRows, - NullMarker: q.NullMarker, + AllowJaggedRows: q.AllowJaggedRows, + AllowQuotedNewlines: q.AllowQuotedNewlines, + Encoding: Encoding(q.Encoding), + FieldDelimiter: q.FieldDelimiter, + SkipLeadingRows: q.SkipLeadingRows, + NullMarker: q.NullMarker, + PreserveASCIIControlCharacters: q.PreserveAsciiControlCharacters, } o.setQuote(q.Quote) return o diff --git a/bigquery/file.go b/bigquery/file.go index 44eab5dc0701..9afdbb53599d 100644 --- a/bigquery/file.go +++ b/bigquery/file.go @@ -93,6 +93,7 @@ func (fc *FileConfig) populateLoadConfig(conf *bq.JobConfigurationLoad) { conf.IgnoreUnknownValues = fc.IgnoreUnknownValues conf.MaxBadRecords = fc.MaxBadRecords conf.NullMarker = fc.NullMarker + conf.PreserveAsciiControlCharacters = fc.PreserveASCIIControlCharacters if fc.Schema != nil { conf.Schema = fc.Schema.toBQ() } @@ -120,6 +121,7 @@ func bqPopulateFileConfig(conf *bq.JobConfigurationLoad, fc *FileConfig) { fc.Encoding = Encoding(conf.Encoding) fc.FieldDelimiter = conf.FieldDelimiter fc.CSVOptions.NullMarker = conf.NullMarker + fc.CSVOptions.PreserveASCIIControlCharacters = conf.PreserveAsciiControlCharacters fc.CSVOptions.setQuote(conf.Quote) } diff --git a/bigquery/file_test.go b/bigquery/file_test.go index e57633f36356..77ba8b2610b9 100644 --- a/bigquery/file_test.go +++ b/bigquery/file_test.go @@ -33,13 +33,14 @@ var ( nestedFieldSchema(), }, CSVOptions: CSVOptions{ - Quote: hyphen, - FieldDelimiter: "\t", - SkipLeadingRows: 8, - AllowJaggedRows: true, - AllowQuotedNewlines: true, - Encoding: UTF_8, - NullMarker: "marker", + Quote: hyphen, + FieldDelimiter: "\t", + SkipLeadingRows: 8, + AllowJaggedRows: true, + AllowQuotedNewlines: true, + Encoding: UTF_8, + NullMarker: "marker", + PreserveASCIIControlCharacters: true, }, } ) @@ -63,16 +64,17 @@ func TestFileConfigPopulateLoadConfig(t *testing.T) { description: "csv", fileConfig: &fc, want: &bq.JobConfigurationLoad{ - SourceFormat: "CSV", - FieldDelimiter: "\t", - SkipLeadingRows: 8, - AllowJaggedRows: true, - AllowQuotedNewlines: true, - Autodetect: true, - Encoding: "UTF-8", - MaxBadRecords: 7, - IgnoreUnknownValues: true, - NullMarker: "marker", + SourceFormat: "CSV", + FieldDelimiter: "\t", + SkipLeadingRows: 8, + AllowJaggedRows: true, + AllowQuotedNewlines: true, + Autodetect: true, + Encoding: "UTF-8", + MaxBadRecords: 7, + IgnoreUnknownValues: true, + NullMarker: "marker", + PreserveAsciiControlCharacters: true, Schema: &bq.TableSchema{ Fields: []*bq.TableFieldSchema{ bqStringFieldSchema(), @@ -150,13 +152,14 @@ func TestFileConfigPopulateExternalDataConfig(t *testing.T) { bqNestedFieldSchema(), }}, CsvOptions: &bq.CsvOptions{ - AllowJaggedRows: true, - AllowQuotedNewlines: true, - Encoding: "UTF-8", - FieldDelimiter: "\t", - Quote: &hyphen, - SkipLeadingRows: 8, - NullMarker: "marker", + AllowJaggedRows: true, + AllowQuotedNewlines: true, + Encoding: "UTF-8", + FieldDelimiter: "\t", + Quote: &hyphen, + SkipLeadingRows: 8, + NullMarker: "marker", + PreserveAsciiControlCharacters: true, }, }, }, diff --git a/bigquery/go.mod b/bigquery/go.mod index 2b87c355f948..0a04e292d3b0 100644 --- a/bigquery/go.mod +++ b/bigquery/go.mod @@ -1,20 +1,34 @@ module cloud.google.com/go/bigquery -go 1.15 +go 1.17 require ( cloud.google.com/go v0.102.1 cloud.google.com/go/datacatalog v1.3.0 cloud.google.com/go/iam v0.3.0 cloud.google.com/go/storage v1.23.0 - github.com/golang/protobuf v1.5.2 github.com/google/go-cmp v0.5.8 - github.com/googleapis/gax-go/v2 v2.4.0 + github.com/googleapis/gax-go/v2 v2.5.1 go.opencensus.io v0.23.0 golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f - google.golang.org/api v0.86.0 - google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/martian/v3 v3.2.1 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + github.com/googleapis/go-type-adapters v1.0.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/bigquery/go.sum b/bigquery/go.sum index 8f6b47c5e161..6d9d9ab0488a 100644 --- a/bigquery/go.sum +++ b/bigquery/go.sum @@ -30,6 +30,7 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -53,6 +54,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -181,8 +183,9 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049pKTiw= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -324,8 +327,10 @@ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 h1:+jnHzr9VPj32ykQVai5DNahi9+NSp7yYuCsl5eAQtL0= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -514,8 +519,10 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.86.0 h1:ZAnyOHQFIuWso1BodVfSaRyffD74T9ERGFa3k1fNk/U= -google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -604,8 +611,10 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 h1:W70HjnmXFJm+8RNjOpIDYW2nKsSi/af0VvIZUtYkwuU= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f h1:wwbo0UziciPT4Dsca+bmplW53QNAl7tiUOw7FfAcsf8= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -636,8 +645,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -652,8 +662,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/bigquery/inserter.go b/bigquery/inserter.go index 7fce55153176..f0ede5be0a95 100644 --- a/bigquery/inserter.go +++ b/bigquery/inserter.go @@ -182,7 +182,9 @@ func (u *Inserter) putMulti(ctx context.Context, src []ValueSaver) error { setClientHeader(call.Header()) var res *bq.TableDataInsertAllResponse err = runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.tabledata.insertAll") res, err = call.Do() + trace.EndSpan(ctx, err) return err }) if err != nil { diff --git a/bigquery/integration_test.go b/bigquery/integration_test.go index 71e1999f2f6b..ba8e3cab09a6 100644 --- a/bigquery/integration_test.go +++ b/bigquery/integration_test.go @@ -40,6 +40,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" gax "github.com/googleapis/gax-go/v2" + bq "google.golang.org/api/bigquery/v2" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" @@ -318,6 +319,9 @@ func TestIntegration_JobFrom(t *testing.T) { if got.jobID != want.jobID { t.Errorf("case %q jobID mismatch, got %s want %s", tc.description, got.jobID, want.jobID) } + if got.Email() == "" { + t.Errorf("case %q expected email to be populated, was empty", tc.description) + } } } @@ -1187,7 +1191,7 @@ func TestIntegration_InsertAndReadNullable(t *testing.T) { ctm := civil.Time{Hour: 15, Minute: 4, Second: 5, Nanosecond: 6000} cdt := civil.DateTime{Date: testDate, Time: ctm} rat := big.NewRat(33, 100) - rat2 := big.NewRat(66, 100) + rat2 := big.NewRat(66, 10e10) geo := "POINT(-122.198939 47.669865)" // Nil fields in the struct. @@ -1804,6 +1808,7 @@ func TestIntegration_QueryParameters(t *testing.T) { dtm := civil.DateTime{Date: d, Time: tm} ts := time.Date(2016, 3, 20, 15, 04, 05, 0, time.UTC) rat := big.NewRat(13, 10) + bigRat := big.NewRat(12345, 10e10) type ss struct { String string @@ -1824,73 +1829,73 @@ func TestIntegration_QueryParameters(t *testing.T) { }{ { "SELECT @val", - []QueryParameter{{"val", 1}}, + []QueryParameter{{Name: "val", Value: 1}}, []Value{int64(1)}, int64(1), }, { "SELECT @val", - []QueryParameter{{"val", 1.3}}, + []QueryParameter{{Name: "val", Value: 1.3}}, []Value{1.3}, 1.3, }, { "SELECT @val", - []QueryParameter{{"val", rat}}, + []QueryParameter{{Name: "val", Value: rat}}, []Value{rat}, rat, }, { "SELECT @val", - []QueryParameter{{"val", true}}, + []QueryParameter{{Name: "val", Value: true}}, []Value{true}, true, }, { "SELECT @val", - []QueryParameter{{"val", "ABC"}}, + []QueryParameter{{Name: "val", Value: "ABC"}}, []Value{"ABC"}, "ABC", }, { "SELECT @val", - []QueryParameter{{"val", []byte("foo")}}, + []QueryParameter{{Name: "val", Value: []byte("foo")}}, []Value{[]byte("foo")}, []byte("foo"), }, { "SELECT @val", - []QueryParameter{{"val", ts}}, + []QueryParameter{{Name: "val", Value: ts}}, []Value{ts}, ts, }, { "SELECT @val", - []QueryParameter{{"val", []time.Time{ts, ts}}}, + []QueryParameter{{Name: "val", Value: []time.Time{ts, ts}}}, []Value{[]Value{ts, ts}}, []interface{}{ts, ts}, }, { "SELECT @val", - []QueryParameter{{"val", dtm}}, + []QueryParameter{{Name: "val", Value: dtm}}, []Value{civil.DateTime{Date: d, Time: rtm}}, civil.DateTime{Date: d, Time: rtm}, }, { "SELECT @val", - []QueryParameter{{"val", d}}, + []QueryParameter{{Name: "val", Value: d}}, []Value{d}, d, }, { "SELECT @val", - []QueryParameter{{"val", tm}}, + []QueryParameter{{Name: "val", Value: tm}}, []Value{rtm}, rtm, }, { "SELECT @val", - []QueryParameter{{"val", s{ts, []string{"a", "b"}, ss{"c"}, []ss{{"d"}, {"e"}}}}}, + []QueryParameter{{Name: "val", Value: s{ts, []string{"a", "b"}, ss{"c"}, []ss{{"d"}, {"e"}}}}}, []Value{[]Value{ts, []Value{"a", "b"}, []Value{"c"}, []Value{[]Value{"d"}, []Value{"e"}}}}, map[string]interface{}{ "Timestamp": ts, @@ -1904,7 +1909,7 @@ func TestIntegration_QueryParameters(t *testing.T) { }, { "SELECT @val.Timestamp, @val.SubStruct.String", - []QueryParameter{{"val", s{Timestamp: ts, SubStruct: ss{"a"}}}}, + []QueryParameter{{Name: "val", Value: s{Timestamp: ts, SubStruct: ss{"a"}}}}, []Value{ts, "a"}, map[string]interface{}{ "Timestamp": ts, @@ -1913,6 +1918,147 @@ func TestIntegration_QueryParameters(t *testing.T) { "SubStructArray": nil, }, }, + { + "SELECT @val", + []QueryParameter{ + { + Name: "val", + Value: &QueryParameterValue{ + Type: StandardSQLDataType{ + TypeKind: "BIGNUMERIC", + }, + Value: BigNumericString(bigRat), + }, + }, + }, + []Value{bigRat}, + bigRat, + }, + { + "SELECT @val", + []QueryParameter{ + { + Name: "val", + Value: &QueryParameterValue{ + ArrayValue: []QueryParameterValue{ + {Value: "a"}, + {Value: "b"}, + }, + Type: StandardSQLDataType{ + ArrayElementType: &StandardSQLDataType{ + TypeKind: "STRING", + }, + }, + }, + }, + }, + []Value{[]Value{"a", "b"}}, + []interface{}{"a", "b"}, + }, + { + "SELECT @val", + []QueryParameter{ + { + Name: "val", + Value: &QueryParameterValue{ + StructValue: map[string]QueryParameterValue{ + "Timestamp": { + Value: ts, + }, + "BigNumericArray": { + ArrayValue: []QueryParameterValue{ + {Value: BigNumericString(bigRat)}, + {Value: BigNumericString(rat)}, + }, + }, + "ArraySingleValueStruct": { + ArrayValue: []QueryParameterValue{ + {StructValue: map[string]QueryParameterValue{ + "Number": { + Value: int64(42), + }, + }}, + {StructValue: map[string]QueryParameterValue{ + "Number": { + Value: int64(43), + }, + }}, + }, + }, + "SubStruct": { + StructValue: map[string]QueryParameterValue{ + "String": { + Value: "c", + }, + }, + }, + }, + Type: StandardSQLDataType{ + StructType: &StandardSQLStructType{ + Fields: []*StandardSQLField{ + { + Name: "Timestamp", + Type: &StandardSQLDataType{ + TypeKind: "TIMESTAMP", + }, + }, + { + Name: "BigNumericArray", + Type: &StandardSQLDataType{ + ArrayElementType: &StandardSQLDataType{ + TypeKind: "BIGNUMERIC", + }, + }, + }, + { + Name: "ArraySingleValueStruct", + Type: &StandardSQLDataType{ + ArrayElementType: &StandardSQLDataType{ + StructType: &StandardSQLStructType{ + Fields: []*StandardSQLField{ + { + Name: "Number", + Type: &StandardSQLDataType{ + TypeKind: "INT64", + }, + }, + }, + }, + }, + }, + }, + { + Name: "SubStruct", + Type: &StandardSQLDataType{ + StructType: &StandardSQLStructType{ + Fields: []*StandardSQLField{ + { + Name: "String", + Type: &StandardSQLDataType{ + TypeKind: "STRING", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + []Value{[]Value{ts, []Value{bigRat, rat}, []Value{[]Value{int64(42)}, []Value{int64(43)}}, []Value{"c"}}}, + map[string]interface{}{ + "Timestamp": ts, + "BigNumericArray": []interface{}{bigRat, rat}, + "ArraySingleValueStruct": []interface{}{ + map[string]interface{}{"Number": int64(42)}, + map[string]interface{}{"Number": int64(43)}, + }, + "SubStruct": map[string]interface{}{"String": "c"}, + }, + }, } for _, c := range testCases { q := client.Query(c.query) @@ -1941,6 +2087,102 @@ func TestIntegration_QueryParameters(t *testing.T) { } } +// This test can be merged with the TestIntegration_QueryParameters as soon as support for explicit typed query parameter lands. +// To test timestamps with different formats, we need to be able to specify the type explicitly. +func TestIntegration_TimestampFormat(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + ts := time.Date(2020, 10, 15, 15, 04, 05, 0, time.UTC) + + testCases := []struct { + query string + parameters []*bq.QueryParameter + wantRow []Value + wantConfig interface{} + }{ + { + "SELECT @val", + []*bq.QueryParameter{ + { + Name: "val", + ParameterType: &bq.QueryParameterType{ + Type: "TIMESTAMP", + }, + ParameterValue: &bq.QueryParameterValue{ + Value: ts.Format(timestampFormat), + }, + }, + }, + []Value{ts}, + ts, + }, + { + "SELECT @val", + []*bq.QueryParameter{ + { + Name: "val", + ParameterType: &bq.QueryParameterType{ + Type: "TIMESTAMP", + }, + ParameterValue: &bq.QueryParameterValue{ + Value: ts.Format(time.RFC3339Nano), + }, + }, + }, + []Value{ts}, + ts, + }, + { + "SELECT @val", + []*bq.QueryParameter{ + { + Name: "val", + ParameterType: &bq.QueryParameterType{ + Type: "TIMESTAMP", + }, + ParameterValue: &bq.QueryParameterValue{ + Value: ts.Format(time.RFC3339), + }, + }, + }, + []Value{ts}, + ts, + }, + } + for _, c := range testCases { + q := client.Query(c.query) + bqJob, err := q.newJob() + if err != nil { + t.Fatal(err) + } + bqJob.Configuration.Query.QueryParameters = c.parameters + + job, err := q.client.insertJob(ctx, bqJob, nil) + if err != nil { + t.Fatal(err) + } + if job.LastStatus() == nil { + t.Error("no LastStatus") + } + it, err := job.Read(ctx) + if err != nil { + t.Fatal(err) + } + checkRead(t, "QueryParameters", it, [][]Value{c.wantRow}) + config, err := job.Config() + if err != nil { + t.Fatal(err) + } + got := config.(*QueryConfig).Parameters[0].Value + if !testutil.Equal(got, c.wantConfig) { + t.Errorf("param %[1]v (%[1]T): config:\ngot %[2]v (%[2]T)\nwant %[3]v (%[3]T)", + c.parameters[0].ParameterValue.Value, got, c.wantConfig) + } + } +} + func TestIntegration_QueryDryRun(t *testing.T) { if client == nil { t.Skip("Integration tests skipped") diff --git a/bigquery/internal/version.go b/bigquery/internal/version.go index 0d1c31ca21b1..9d20ad4d20c0 100644 --- a/bigquery/internal/version.go +++ b/bigquery/internal/version.go @@ -16,4 +16,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.34.1" +const Version = "1.41.0" diff --git a/bigquery/iterator.go b/bigquery/iterator.go index ac6bdd17d2cb..43ffb19dc66e 100644 --- a/bigquery/iterator.go +++ b/bigquery/iterator.go @@ -105,15 +105,21 @@ type pageFetcher func(ctx context.Context, _ *rowSource, _ Schema, startIndex ui // Each BigQuery column type corresponds to one or more Go types; a matching struct // field must be of the correct type. The correspondences are: // -// STRING string -// BOOL bool -// INTEGER int, int8, int16, int32, int64, uint8, uint16, uint32 -// FLOAT float32, float64 -// BYTES []byte -// TIMESTAMP time.Time -// DATE civil.Date -// TIME civil.Time -// DATETIME civil.DateTime +// STRING string +// BOOL bool +// INTEGER int, int8, int16, int32, int64, uint8, uint16, uint32 +// FLOAT float32, float64 +// BYTES []byte +// TIMESTAMP time.Time +// DATE civil.Date +// TIME civil.Time +// DATETIME civil.DateTime +// NUMERIC *big.Rat +// BIGNUMERIC *big.Rat +// +// The big.Rat type supports numbers of arbitrary size and precision. +// See https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#numeric-type +// for more on NUMERIC. // // A repeated field corresponds to a slice or array of the element type. A STRUCT // type (RECORD or nested schema) corresponds to a nested struct or struct pointer. @@ -184,12 +190,12 @@ func (it *RowIterator) fetch(pageSize int, pageToken string) (string, error) { // fast execution query path which can return status, rows, and schema all at // once. Our cache data expectations are as follows: // -// * We can only cache data from the start of a source. -// * We need to cache schema, rows, and next page token to effective service -// a request from cache. -// * cache references are destroyed as soon as they're interrogated. We don't -// want to retain the data unnecessarily, and we expect that the backend -// can always provide them if needed. +// - We can only cache data from the start of a source. +// - We need to cache schema, rows, and next page token to effective service +// a request from cache. +// - cache references are destroyed as soon as they're interrogated. We don't +// want to retain the data unnecessarily, and we expect that the backend +// can always provide them if needed. type rowSource struct { j *Job t *Table diff --git a/bigquery/job.go b/bigquery/job.go index ae8f02b4a14a..d761650fed89 100644 --- a/bigquery/job.go +++ b/bigquery/job.go @@ -63,7 +63,7 @@ func (c *Client) JobFromProject(ctx context.Context, projectID, jobID, location ctx = trace.StartSpan(ctx, "cloud.google.com/go/bigquery.JobFromProject") defer func() { trace.EndSpan(ctx, err) }() - bqjob, err := c.getJobInternal(ctx, jobID, location, projectID, "configuration", "jobReference", "status", "statistics") + bqjob, err := c.getJobInternal(ctx, jobID, location, projectID, "user_email", "configuration", "jobReference", "status", "statistics") if err != nil { return nil, err } @@ -240,7 +240,9 @@ func (j *Job) Cancel(ctx context.Context) error { Context(ctx) setClientHeader(call.Header()) return runWithRetry(ctx, func() error { + sCtx := trace.StartSpan(ctx, "bigquery.jobs.cancel") _, err := call.Do() + trace.EndSpan(sCtx, err) return err }) } @@ -257,7 +259,9 @@ func (j *Job) Delete(ctx context.Context) (err error) { setClientHeader(call.Header()) return runWithRetry(ctx, func() (err error) { + sCtx := trace.StartSpan(ctx, "bigquery.jobs.delete") err = call.Do() + trace.EndSpan(sCtx, err) return err }) } @@ -343,7 +347,9 @@ func (j *Job) waitForQuery(ctx context.Context, projectID string) (Schema, uint6 } var res *bq.GetQueryResultsResponse err := internal.Retry(ctx, backoff, func() (stop bool, err error) { + sCtx := trace.StartSpan(ctx, "bigquery.jobs.getQueryResults") res, err = call.Do() + trace.EndSpan(sCtx, err) if err != nil { return !retryableError(err, jobRetryReasons), err } @@ -694,18 +700,18 @@ func bqToScriptStatistics(bs *bq.ScriptStatistics) *ScriptStatistics { // // Line and column numbers are defined as follows: // -// - Line and column numbers start with one. That is, line 1 column 1 denotes -// the start of the script. -// - When inside a stored procedure, all line/column numbers are relative -// to the procedure body, not the script in which the procedure was defined. -// - Start/end positions exclude leading/trailing comments and whitespace. -// The end position always ends with a ";", when present. -// - Multi-byte Unicode characters are treated as just one column. -// - If the original script (or procedure definition) contains TAB characters, -// a tab "snaps" the indentation forward to the nearest multiple of 8 -// characters, plus 1. For example, a TAB on column 1, 2, 3, 4, 5, 6 , or 8 -// will advance the next character to column 9. A TAB on column 9, 10, 11, -// 12, 13, 14, 15, or 16 will advance the next character to column 17. +// - Line and column numbers start with one. That is, line 1 column 1 denotes +// the start of the script. +// - When inside a stored procedure, all line/column numbers are relative +// to the procedure body, not the script in which the procedure was defined. +// - Start/end positions exclude leading/trailing comments and whitespace. +// The end position always ends with a ";", when present. +// - Multi-byte Unicode characters are treated as just one column. +// - If the original script (or procedure definition) contains TAB characters, +// a tab "snaps" the indentation forward to the nearest multiple of 8 +// characters, plus 1. For example, a TAB on column 1, 2, 3, 4, 5, 6 , or 8 +// will advance the next character to column 9. A TAB on column 9, 10, 11, +// 12, 13, 14, 15, or 16 will advance the next character to column 17. type ScriptStackFrame struct { StartLine int64 StartColumn int64 @@ -837,7 +843,14 @@ func (it *JobIterator) fetch(pageSize int, pageToken string) (string, error) { if it.ParentJobID != "" { req.ParentJobId(it.ParentJobID) } - res, err := req.Do() + var res *bq.JobList + err := runWithRetry(it.ctx, func() (err error) { + sCtx := trace.StartSpan(it.ctx, "bigquery.jobs.list") + res, err = req.Do() + trace.EndSpan(sCtx, err) + return err + }) + if err != nil { return "", err } @@ -870,7 +883,9 @@ func (c *Client) getJobInternal(ctx context.Context, jobID, location, projectID } setClientHeader(call.Header()) err := runWithRetry(ctx, func() (err error) { + sCtx := trace.StartSpan(ctx, "bigquery.jobs.get") job, err = call.Do() + trace.EndSpan(sCtx, err) return err }) if err != nil { diff --git a/bigquery/migration/apiv2/doc.go b/bigquery/migration/apiv2/doc.go index aa967b43166c..f70a67a411c4 100644 --- a/bigquery/migration/apiv2/doc.go +++ b/bigquery/migration/apiv2/doc.go @@ -20,45 +20,56 @@ // The migration service, exposing apis for migration jobs operations, and // agent management. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := migration.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := migration.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := migration.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &migrationpb.CreateMigrationWorkflowRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/migration/v2#CreateMigrationWorkflowRequest. -// } -// resp, err := c.CreateMigrationWorkflow(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := migration.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &migrationpb.CreateMigrationWorkflowRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/migration/v2#CreateMigrationWorkflowRequest. +// } +// resp, err := c.CreateMigrationWorkflow(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/bigquery/migration/apiv2/migration_client.go b/bigquery/migration/apiv2/migration_client.go index f64879e77868..f8c55bf312f2 100644 --- a/bigquery/migration/apiv2/migration_client.go +++ b/bigquery/migration/apiv2/migration_client.go @@ -145,7 +145,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -248,7 +249,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/migration/apiv2/migration_client_example_test.go b/bigquery/migration/apiv2/migration_client_example_test.go index a9f4adc83225..7f0ef11365db 100644 --- a/bigquery/migration/apiv2/migration_client_example_test.go +++ b/bigquery/migration/apiv2/migration_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_CreateMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleClient_CreateMigrationWorkflow() { func ExampleClient_GetMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleClient_GetMigrationWorkflow() { func ExampleClient_ListMigrationWorkflows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleClient_ListMigrationWorkflows() { func ExampleClient_DeleteMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +147,11 @@ func ExampleClient_DeleteMigrationWorkflow() { func ExampleClient_StartMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -140,6 +170,11 @@ func ExampleClient_StartMigrationWorkflow() { func ExampleClient_GetMigrationSubtask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +195,11 @@ func ExampleClient_GetMigrationSubtask() { func ExampleClient_ListMigrationSubtasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/migration/apiv2alpha/doc.go b/bigquery/migration/apiv2alpha/doc.go index 4751349db1b7..f3f346de72a5 100644 --- a/bigquery/migration/apiv2alpha/doc.go +++ b/bigquery/migration/apiv2alpha/doc.go @@ -20,45 +20,56 @@ // The migration service, exposing apis for migration jobs operations, and // agent management. // -// NOTE: This package is in alpha. It is not stable, and is likely to change. +// NOTE: This package is in alpha. It is not stable, and is likely to change. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := migration.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := migration.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := migration.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &migrationpb.CreateMigrationWorkflowRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/migration/v2alpha#CreateMigrationWorkflowRequest. -// } -// resp, err := c.CreateMigrationWorkflow(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := migration.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &migrationpb.CreateMigrationWorkflowRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/migration/v2alpha#CreateMigrationWorkflowRequest. +// } +// resp, err := c.CreateMigrationWorkflow(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/bigquery/migration/apiv2alpha/migration_client.go b/bigquery/migration/apiv2alpha/migration_client.go index 84c13b68b0fd..ad106bc2b452 100644 --- a/bigquery/migration/apiv2alpha/migration_client.go +++ b/bigquery/migration/apiv2alpha/migration_client.go @@ -165,7 +165,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -268,7 +269,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/migration/apiv2alpha/migration_client_example_test.go b/bigquery/migration/apiv2alpha/migration_client_example_test.go index 7adf2f2e3b57..3de10cc4ae29 100644 --- a/bigquery/migration/apiv2alpha/migration_client_example_test.go +++ b/bigquery/migration/apiv2alpha/migration_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_CreateMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleClient_CreateMigrationWorkflow() { func ExampleClient_GetMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleClient_GetMigrationWorkflow() { func ExampleClient_ListMigrationWorkflows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleClient_ListMigrationWorkflows() { func ExampleClient_DeleteMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +147,11 @@ func ExampleClient_DeleteMigrationWorkflow() { func ExampleClient_StartMigrationWorkflow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -140,6 +170,11 @@ func ExampleClient_StartMigrationWorkflow() { func ExampleClient_GetMigrationSubtask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -160,6 +195,11 @@ func ExampleClient_GetMigrationSubtask() { func ExampleClient_ListMigrationSubtasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/migration/apiv2alpha/sql_translation_client.go b/bigquery/migration/apiv2alpha/sql_translation_client.go index 4e9bef3378e7..c2d69364e9f0 100644 --- a/bigquery/migration/apiv2alpha/sql_translation_client.go +++ b/bigquery/migration/apiv2alpha/sql_translation_client.go @@ -93,7 +93,8 @@ func (c *SqlTranslationClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SqlTranslationClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -163,7 +164,8 @@ func NewSqlTranslationClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *sqlTranslationGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/migration/apiv2alpha/sql_translation_client_example_test.go b/bigquery/migration/apiv2alpha/sql_translation_client_example_test.go index a1955b2c9a17..d6e2c88c3156 100644 --- a/bigquery/migration/apiv2alpha/sql_translation_client_example_test.go +++ b/bigquery/migration/apiv2alpha/sql_translation_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewSqlTranslationClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewSqlTranslationClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewSqlTranslationClient() { func ExampleSqlTranslationClient_TranslateQuery() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := migration.NewSqlTranslationClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/model.go b/bigquery/model.go index 56260efe9c3b..7fb90493e9b5 100644 --- a/bigquery/model.go +++ b/bigquery/model.go @@ -86,7 +86,9 @@ func (m *Model) Metadata(ctx context.Context) (mm *ModelMetadata, err error) { setClientHeader(req.Header()) var model *bq.Model err = runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.models.get") model, err = req.Do() + trace.EndSpan(ctx, err) return err }) if err != nil { @@ -111,7 +113,9 @@ func (m *Model) Update(ctx context.Context, mm ModelMetadataToUpdate, etag strin } var res *bq.Model if err := runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.models.patch") res, err = call.Do() + trace.EndSpan(ctx, err) return err }); err != nil { return nil, err diff --git a/bigquery/nulls.go b/bigquery/nulls.go index 6ef53d13fc2d..cbe4fa34dc2d 100644 --- a/bigquery/nulls.go +++ b/bigquery/nulls.go @@ -60,6 +60,14 @@ type NullGeography struct { func (n NullGeography) String() string { return nullstr(n.Valid, n.GeographyVal) } +// NullJSON represents a BigQuery JSON string that may be NULL. +type NullJSON struct { + JSONVal string + Valid bool // Valid is true if JSONVal is not NULL. +} + +func (n NullJSON) String() string { return nullstr(n.Valid, n.JSONVal) } + // NullFloat64 represents a BigQuery FLOAT64 that may be NULL. type NullFloat64 struct { Float64 float64 @@ -147,6 +155,9 @@ func (n NullString) MarshalJSON() ([]byte, error) { return nulljson(n.Valid, n.S // MarshalJSON converts the NullGeography to JSON. func (n NullGeography) MarshalJSON() ([]byte, error) { return nulljson(n.Valid, n.GeographyVal) } +// MarshalJSON converts the NullJSON to JSON. +func (n NullJSON) MarshalJSON() ([]byte, error) { return nulljson(n.Valid, n.JSONVal) } + // MarshalJSON converts the NullTimestamp to JSON. func (n NullTimestamp) MarshalJSON() ([]byte, error) { return nulljson(n.Valid, n.Timestamp) } @@ -268,6 +279,20 @@ func (n *NullGeography) UnmarshalJSON(b []byte) error { return nil } +// UnmarshalJSON converts JSON into a NullJSON. +func (n *NullJSON) UnmarshalJSON(b []byte) error { + n.Valid = false + n.JSONVal = "" + if bytes.Equal(b, jsonNull) { + return nil + } + if err := json.Unmarshal(b, &n.JSONVal); err != nil { + return err + } + n.Valid = true + return nil +} + // UnmarshalJSON converts JSON into a NullTimestamp. func (n *NullTimestamp) UnmarshalJSON(b []byte) error { n.Valid = false @@ -350,6 +375,7 @@ var ( typeOfNullBool = reflect.TypeOf(NullBool{}) typeOfNullString = reflect.TypeOf(NullString{}) typeOfNullGeography = reflect.TypeOf(NullGeography{}) + typeOfNullJSON = reflect.TypeOf(NullJSON{}) typeOfNullTimestamp = reflect.TypeOf(NullTimestamp{}) typeOfNullDate = reflect.TypeOf(NullDate{}) typeOfNullTime = reflect.TypeOf(NullTime{}) @@ -368,6 +394,8 @@ func nullableFieldType(t reflect.Type) FieldType { return StringFieldType case typeOfNullGeography: return GeographyFieldType + case typeOfNullJSON: + return JSONFieldType case typeOfNullTimestamp: return TimestampFieldType case typeOfNullDate: diff --git a/bigquery/nulls_test.go b/bigquery/nulls_test.go index 7e5c939a1468..7e9b1f005401 100644 --- a/bigquery/nulls_test.go +++ b/bigquery/nulls_test.go @@ -39,6 +39,7 @@ func TestNullsJSON(t *testing.T) { {&NullBool{Valid: true, Bool: true}, `true`}, {&NullString{Valid: true, StringVal: "foo"}, `"foo"`}, {&NullGeography{Valid: true, GeographyVal: "ST_GEOPOINT(47.649154, -122.350220)"}, `"ST_GEOPOINT(47.649154, -122.350220)"`}, + {&NullJSON{Valid: true, JSONVal: "{\"foo\": \"bar\"}"}, `"{\"foo\": \"bar\"}"`}, {&NullTimestamp{Valid: true, Timestamp: testTimestamp}, `"2016-11-05T07:50:22.000000008Z"`}, {&NullDate{Valid: true, Date: testDate}, `"2016-11-05"`}, {&NullTime{Valid: true, Time: nullsTestTime}, `"07:50:22.000001"`}, @@ -49,6 +50,7 @@ func TestNullsJSON(t *testing.T) { {&NullBool{}, `null`}, {&NullString{}, `null`}, {&NullGeography{}, `null`}, + {&NullJSON{}, `null`}, {&NullTimestamp{}, `null`}, {&NullDate{}, `null`}, {&NullTime{}, `null`}, diff --git a/bigquery/params.go b/bigquery/params.go index 3c8f0f55bebd..5cafbf85f064 100644 --- a/bigquery/params.go +++ b/bigquery/params.go @@ -78,15 +78,17 @@ var ( bigNumericParamType = &bq.QueryParameterType{Type: "BIGNUMERIC"} geographyParamType = &bq.QueryParameterType{Type: "GEOGRAPHY"} intervalParamType = &bq.QueryParameterType{Type: "INTERVAL"} + jsonParamType = &bq.QueryParameterType{Type: "JSON"} ) var ( - typeOfDate = reflect.TypeOf(civil.Date{}) - typeOfTime = reflect.TypeOf(civil.Time{}) - typeOfDateTime = reflect.TypeOf(civil.DateTime{}) - typeOfGoTime = reflect.TypeOf(time.Time{}) - typeOfRat = reflect.TypeOf(&big.Rat{}) - typeOfIntervalValue = reflect.TypeOf(&IntervalValue{}) + typeOfDate = reflect.TypeOf(civil.Date{}) + typeOfTime = reflect.TypeOf(civil.Time{}) + typeOfDateTime = reflect.TypeOf(civil.DateTime{}) + typeOfGoTime = reflect.TypeOf(time.Time{}) + typeOfRat = reflect.TypeOf(&big.Rat{}) + typeOfIntervalValue = reflect.TypeOf(&IntervalValue{}) + typeOfQueryParameterValue = reflect.TypeOf(&QueryParameterValue{}) ) // A QueryParameter is a parameter to a query. @@ -115,6 +117,15 @@ type QueryParameter struct { // For scalar values, you can supply the Null types within this library // to send the appropriate NULL values (e.g. NullInt64, NullString, etc). // + // To specify query parameters explicitly rather by inference, *QueryParameterValue can be used. + // For example, a BIGNUMERIC can be specified like this: + // &QueryParameterValue{ + // Type: StandardSQLDataType{ + // TypeKind: "BIGNUMERIC", + // }, + // Value: BigNumericString(*big.Rat), + // } + // // When a QueryParameter is returned inside a QueryConfig from a call to // Job.Config: // Integers are of type int64. @@ -128,12 +139,165 @@ type QueryParameter struct { Value interface{} } -func (p QueryParameter) toBQ() (*bq.QueryParameter, error) { +// QueryParameterValue is a go type for representing a explicit typed QueryParameter. +type QueryParameterValue struct { + // Type specifies the parameter type. See StandardSQLDataType for more. + // Scalar parameters and more complex types can be defined within this field. + // See examples on the value fields. + Type StandardSQLDataType + + // Value is the value of the parameter, if a simple scalar type. + // The default behavior for scalar values is to do type inference + // and format it accordingly. + // Because of that, depending on the parameter type, is recommended + // to send value as a String. + // We provide some formatter functions for some types: + // CivilTimeString(civil.Time) + // CivilDateTimeString(civil.DateTime) + // NumericString(*big.Rat) + // BigNumericString(*big.Rat) + // IntervalString(*IntervalValue) + // + // Example: + // + // &QueryParameterValue{ + // Type: StandardSQLDataType{ + // TypeKind: "BIGNUMERIC", + // }, + // Value: BigNumericString(*big.Rat), + // } + Value interface{} + + // ArrayValue is the array of values for the parameter. + // + // Must be used with QueryParameterValue.Type being a StandardSQLDataType + // with ArrayElementType filled with the given element type. + // + // Example of an array of strings : + // &QueryParameterValue{ + // Type: &StandardSQLDataType{ + // ArrayElementType: &StandardSQLDataType{ + // TypeKind: "STRING", + // }, + // }, + // ArrayValue: []QueryParameterValue{ + // {Value: "a"}, + // {Value: "b"}, + // }, + // } + // + // Example of an array of structs : + // &QueryParameterValue{ + // Type: &StandardSQLDataType{ + // ArrayElementType: &StandardSQLDataType{ + // StructType: &StandardSQLDataType{ + // Fields: []*StandardSQLField{ + // { + // Name: "NumberField", + // Type: &StandardSQLDataType{ + // TypeKind: "INT64", + // }, + // }, + // }, + // }, + // }, + // }, + // ArrayValue: []QueryParameterValue{ + // {StructValue: map[string]QueryParameterValue{ + // "NumberField": { + // Value: int64(42), + // }, + // }}, + // {StructValue: map[string]QueryParameterValue{ + // "NumberField": { + // Value: int64(43), + // }, + // }}, + // }, + // } + ArrayValue []QueryParameterValue + + // StructValue is the struct field values for the parameter. + // + // Must be used with QueryParameterValue.Type being a StandardSQLDataType + // with StructType filled with the given field types. + // + // Example: + // + // &QueryParameterValue{ + // Type: &StandardSQLDataType{ + // StructType{ + // Fields: []*StandardSQLField{ + // { + // Name: "StringField", + // Type: &StandardSQLDataType{ + // TypeKind: "STRING", + // }, + // }, + // { + // Name: "NumberField", + // Type: &StandardSQLDataType{ + // TypeKind: "INT64", + // }, + // }, + // }, + // }, + // }, + // StructValue: []map[string]QueryParameterValue{ + // "NumberField": { + // Value: int64(42), + // }, + // "StringField": { + // Value: "Value", + // }, + // }, + // } + StructValue map[string]QueryParameterValue +} + +func (p QueryParameterValue) toBQParamType() *bq.QueryParameterType { + return p.Type.toBQParamType() +} + +func (p QueryParameterValue) toBQParamValue() (*bq.QueryParameterValue, error) { + if len(p.ArrayValue) > 0 { + pv := &bq.QueryParameterValue{} + pv.ArrayValues = []*bq.QueryParameterValue{} + for _, v := range p.ArrayValue { + val, err := v.toBQParamValue() + if err != nil { + return nil, err + } + pv.ArrayValues = append(pv.ArrayValues, val) + } + return pv, nil + } + if len(p.StructValue) > 0 { + pv := &bq.QueryParameterValue{} + pv.StructValues = map[string]bq.QueryParameterValue{} + for name, param := range p.StructValue { + v, err := param.toBQParamValue() + if err != nil { + return nil, err + } + pv.StructValues[name] = *v + } + return pv, nil + } pv, err := paramValue(reflect.ValueOf(p.Value)) if err != nil { return nil, err } - pt, err := paramType(reflect.TypeOf(p.Value)) + return pv, nil +} + +func (p QueryParameter) toBQ() (*bq.QueryParameter, error) { + v := reflect.ValueOf(p.Value) + pv, err := paramValue(v) + if err != nil { + return nil, err + } + pt, err := paramType(reflect.TypeOf(p.Value), v) if err != nil { return nil, err } @@ -144,7 +308,7 @@ func (p QueryParameter) toBQ() (*bq.QueryParameter, error) { }, nil } -func paramType(t reflect.Type) (*bq.QueryParameterType, error) { +func paramType(t reflect.Type, v reflect.Value) (*bq.QueryParameterType, error) { if t == nil { return nil, errors.New("bigquery: nil parameter") } @@ -171,6 +335,10 @@ func paramType(t reflect.Type) (*bq.QueryParameterType, error) { return stringParamType, nil case typeOfNullGeography: return geographyParamType, nil + case typeOfNullJSON: + return jsonParamType, nil + case typeOfQueryParameterValue: + return v.Interface().(*QueryParameterValue).toBQParamType(), nil } switch t.Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint8, reflect.Uint16, reflect.Uint32: @@ -192,7 +360,7 @@ func paramType(t reflect.Type) (*bq.QueryParameterType, error) { fallthrough case reflect.Array: - et, err := paramType(t.Elem()) + et, err := paramType(t.Elem(), v) if err != nil { return nil, err } @@ -212,7 +380,7 @@ func paramType(t reflect.Type) (*bq.QueryParameterType, error) { return nil, err } for _, f := range fields { - pt, err := paramType(f.Type) + pt, err := paramType(f.Type, v) if err != nil { return nil, err } @@ -243,7 +411,8 @@ func paramValue(v reflect.Value) (*bq.QueryParameterValue, error) { typeOfNullTimestamp, typeOfNullDate, typeOfNullTime, - typeOfNullDateTime: + typeOfNullDateTime, + typeOfNullJSON: // Shared: If the Null type isn't valid, we have no value to send. // However, the backend requires us to send the QueryParameterValue with // the fields empty. @@ -261,6 +430,8 @@ func paramValue(v reflect.Value) (*bq.QueryParameterValue, error) { res.Value = fmt.Sprint(v.FieldByName("StringVal").Interface()) case typeOfNullGeography: res.Value = fmt.Sprint(v.FieldByName("GeographyVal").Interface()) + case typeOfNullJSON: + res.Value = fmt.Sprint(v.FieldByName("JSONVal").Interface()) case typeOfNullFloat64: res.Value = fmt.Sprint(v.FieldByName("Float64").Interface()) case typeOfNullBool: @@ -308,6 +479,8 @@ func paramValue(v reflect.Value) (*bq.QueryParameterValue, error) { case typeOfIntervalValue: res.Value = IntervalString(v.Interface().(*IntervalValue)) return res, nil + case typeOfQueryParameterValue: + return v.Interface().(*QueryParameterValue).toBQParamValue() } switch t.Kind() { case reflect.Slice: @@ -388,6 +561,7 @@ var paramTypeToFieldType = map[string]FieldType{ bigNumericParamType.Type: BigNumericFieldType, geographyParamType.Type: GeographyFieldType, intervalParamType.Type: IntervalFieldType, + jsonParamType.Type: JSONFieldType, } // Convert a parameter value from the service to a Go value. This is similar to, but @@ -409,7 +583,15 @@ func convertParamValue(qval *bq.QueryParameterValue, qtype *bq.QueryParameterTyp if isNullScalar(qval) { return NullTimestamp{Valid: false}, nil } - return time.Parse(timestampFormat, qval.Value) + t, err := time.Parse(timestampFormat, qval.Value) + if err != nil { + t, err = time.Parse(time.RFC3339Nano, qval.Value) + if err != nil { + return nil, err + } + } + return t, nil + case "DATETIME": if isNullScalar(qval) { return NullDateTime{Valid: false}, nil @@ -432,6 +614,8 @@ func convertParamValue(qval *bq.QueryParameterValue, qtype *bq.QueryParameterTyp return NullTime{Valid: false}, nil case "GEOGRAPHY": return NullGeography{Valid: false}, nil + case "JSON": + return NullJSON{Valid: false}, nil } } diff --git a/bigquery/params_test.go b/bigquery/params_test.go index 366184894a3a..fa6a293051d8 100644 --- a/bigquery/params_test.go +++ b/bigquery/params_test.go @@ -116,9 +116,17 @@ var scalarTests = []struct { dateTimeParamType, NullDateTime{Valid: false}}, {big.NewRat(12345, 1000), false, "12.345000000", numericParamType, big.NewRat(12345, 1000)}, + {&QueryParameterValue{ + Type: StandardSQLDataType{ + TypeKind: "BIGNUMERIC", + }, + Value: BigNumericString(big.NewRat(12345, 10e10)), + }, false, "0.00000012345000000000000000000000000000", bigNumericParamType, big.NewRat(12345, 10e10)}, {&IntervalValue{Years: 1, Months: 2, Days: 3}, false, "1-2 3 0:0:0", intervalParamType, &IntervalValue{Years: 1, Months: 2, Days: 3}}, {NullGeography{GeographyVal: "POINT(-122.335503 47.625536)", Valid: true}, false, "POINT(-122.335503 47.625536)", geographyParamType, "POINT(-122.335503 47.625536)"}, {NullGeography{Valid: false}, true, "", geographyParamType, NullGeography{Valid: false}}, + {NullJSON{Valid: true, JSONVal: "{\"alpha\":\"beta\"}"}, false, "{\"alpha\":\"beta\"}", jsonParamType, "{\"alpha\":\"beta\"}"}, + {NullJSON{Valid: false}, true, "", jsonParamType, NullJSON{Valid: false}}, } type ( @@ -177,7 +185,6 @@ func sval(s string) bq.QueryParameterValue { } func TestParamValueScalar(t *testing.T) { - nilValue := &bq.QueryParameterValue{ NullFields: []string{"Value"}, } @@ -248,7 +255,7 @@ func TestParamValueErrors(t *testing.T) { func TestParamType(t *testing.T) { for _, test := range scalarTests { - got, err := paramType(reflect.TypeOf(test.val)) + got, err := paramType(reflect.TypeOf(test.val), reflect.ValueOf(test.val)) if err != nil { t.Fatal(err) } @@ -266,7 +273,7 @@ func TestParamType(t *testing.T) { {[3]bool{}, &bq.QueryParameterType{Type: "ARRAY", ArrayType: boolParamType}}, {S1{}, s1ParamType}, } { - got, err := paramType(reflect.TypeOf(test.val)) + got, err := paramType(reflect.TypeOf(test.val), reflect.ValueOf(test.val)) if err != nil { t.Fatal(err) } @@ -280,7 +287,7 @@ func TestParamTypeErrors(t *testing.T) { for _, val := range []interface{}{ nil, uint(0), new([]int), make(chan int), } { - _, err := paramType(reflect.TypeOf(val)) + _, err := paramType(reflect.TypeOf(val), reflect.ValueOf(val)) if err == nil { t.Errorf("%v (%T): got nil, want error", val, val) } @@ -294,7 +301,7 @@ func TestConvertParamValue(t *testing.T) { if err != nil { t.Fatal(err) } - ptype, err := paramType(reflect.TypeOf(test.val)) + ptype, err := paramType(reflect.TypeOf(test.val), reflect.ValueOf(test.val)) if err != nil { t.Fatal(err) } @@ -305,7 +312,6 @@ func TestConvertParamValue(t *testing.T) { if !testutil.Equal(got, test.wantStat) { t.Errorf("%#v: wanted stat as %#v, got %#v", test.val, test.wantStat, got) } - } // Arrays. for _, test := range []struct { diff --git a/bigquery/release-please-config.json b/bigquery/release-please-config.json index d70d668b5693..ba4df3ee3fd0 100644 --- a/bigquery/release-please-config.json +++ b/bigquery/release-please-config.json @@ -7,5 +7,6 @@ "bigquery": { "component": "bigquery" } - } + }, + "plugins": ["sentence-case"] } diff --git a/bigquery/reservation/apiv1/doc.go b/bigquery/reservation/apiv1/doc.go index b1bd0f881106..f621027cdeae 100644 --- a/bigquery/reservation/apiv1/doc.go +++ b/bigquery/reservation/apiv1/doc.go @@ -19,43 +19,54 @@ // // A service to modify your BigQuery flat-rate reservations. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := reservation.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := reservation.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := reservation.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &reservationpb.CreateReservationRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1#CreateReservationRequest. -// } -// resp, err := c.CreateReservation(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := reservation.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &reservationpb.CreateReservationRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1#CreateReservationRequest. +// } +// resp, err := c.CreateReservation(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/bigquery/reservation/apiv1/reservation_client.go b/bigquery/reservation/apiv1/reservation_client.go index c38b960d3ceb..f124e2021602 100644 --- a/bigquery/reservation/apiv1/reservation_client.go +++ b/bigquery/reservation/apiv1/reservation_client.go @@ -281,7 +281,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -387,12 +388,12 @@ func (c *Client) MergeCapacityCommitments(ctx context.Context, req *reservationp // // Example: // -// The organization organizationA contains two projects, project1 -// and project2. +// The organization organizationA contains two projects, project1 +// and project2. // -// Assignments for all three entities (organizationA, project1, and -// project2) could all be created and mapped to the same or different -// reservations. +// Assignments for all three entities (organizationA, project1, and +// project2) could all be created and mapped to the same or different +// reservations. // // “None” assignments represent an absence of the assignment. Projects // assigned to None use on-demand pricing. To create a “None” assignment, use @@ -415,14 +416,14 @@ func (c *Client) CreateAssignment(ctx context.Context, req *reservationpb.Create // // Example: // -// Organization organizationA contains two projects, project1 and -// project2. +// Organization organizationA contains two projects, project1 and +// project2. // -// Reservation res1 exists and was created previously. +// Reservation res1 exists and was created previously. // -// CreateAssignment was used previously to define the following -// associations between entities and reservations: -// and +// CreateAssignment was used previously to define the following +// associations between entities and reservations: +// and // // In this example, ListAssignments will just return the above two assignments // for reservation res1, and no expansion/merge will happen. @@ -440,14 +441,14 @@ func (c *Client) ListAssignments(ctx context.Context, req *reservationpb.ListAss // // Example: // -// Organization organizationA contains two projects, project1 and -// project2. +// Organization organizationA contains two projects, project1 and +// project2. // -// Reservation res1 exists and was created previously. +// Reservation res1 exists and was created previously. // -// CreateAssignment was used previously to define the following -// associations between entities and reservations: -// and +// CreateAssignment was used previously to define the following +// associations between entities and reservations: +// and // // In this example, deletion of the assignment won’t // affect the other assignment . After said deletion, @@ -625,7 +626,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/reservation/apiv1/reservation_client_example_test.go b/bigquery/reservation/apiv1/reservation_client_example_test.go index 24b06efcd59c..7a00826df8ed 100644 --- a/bigquery/reservation/apiv1/reservation_client_example_test.go +++ b/bigquery/reservation/apiv1/reservation_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_CreateReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleClient_CreateReservation() { func ExampleClient_ListReservations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleClient_ListReservations() { func ExampleClient_GetReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleClient_GetReservation() { func ExampleClient_DeleteReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +147,11 @@ func ExampleClient_DeleteReservation() { func ExampleClient_UpdateReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +172,11 @@ func ExampleClient_UpdateReservation() { func ExampleClient_CreateCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +197,11 @@ func ExampleClient_CreateCapacityCommitment() { func ExampleClient_ListCapacityCommitments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +228,11 @@ func ExampleClient_ListCapacityCommitments() { func ExampleClient_GetCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleClient_GetCapacityCommitment() { func ExampleClient_DeleteCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +276,11 @@ func ExampleClient_DeleteCapacityCommitment() { func ExampleClient_UpdateCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +301,11 @@ func ExampleClient_UpdateCapacityCommitment() { func ExampleClient_SplitCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +326,11 @@ func ExampleClient_SplitCapacityCommitment() { func ExampleClient_MergeCapacityCommitments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -286,6 +351,11 @@ func ExampleClient_MergeCapacityCommitments() { func ExampleClient_CreateAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -306,6 +376,11 @@ func ExampleClient_CreateAssignment() { func ExampleClient_ListAssignments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -332,6 +407,11 @@ func ExampleClient_ListAssignments() { func ExampleClient_DeleteAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -350,6 +430,11 @@ func ExampleClient_DeleteAssignment() { func ExampleClient_SearchAssignments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -376,6 +461,11 @@ func ExampleClient_SearchAssignments() { func ExampleClient_SearchAllAssignments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -402,6 +492,11 @@ func ExampleClient_SearchAllAssignments() { func ExampleClient_MoveAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -422,6 +517,11 @@ func ExampleClient_MoveAssignment() { func ExampleClient_UpdateAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -442,6 +542,11 @@ func ExampleClient_UpdateAssignment() { func ExampleClient_GetBiReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -462,6 +567,11 @@ func ExampleClient_GetBiReservation() { func ExampleClient_UpdateBiReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/reservation/apiv1beta1/doc.go b/bigquery/reservation/apiv1beta1/doc.go index 084fcc1a09d8..c0e6cd33e8fa 100644 --- a/bigquery/reservation/apiv1beta1/doc.go +++ b/bigquery/reservation/apiv1beta1/doc.go @@ -19,45 +19,56 @@ // // A service to modify your BigQuery flat-rate reservations. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := reservation.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := reservation.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := reservation.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &reservationpb.CreateReservationRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1beta1#CreateReservationRequest. -// } -// resp, err := c.CreateReservation(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := reservation.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &reservationpb.CreateReservationRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1beta1#CreateReservationRequest. +// } +// resp, err := c.CreateReservation(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. @@ -71,6 +82,8 @@ package reservation // import "cloud.google.com/go/bigquery/reservation/apiv1bet import ( "context" + "fmt" + "net/http" "os" "runtime" "strconv" @@ -160,3 +173,22 @@ func versionGo() string { } return "UNKNOWN" } + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/bigquery/reservation/apiv1beta1/gapic_metadata.json b/bigquery/reservation/apiv1beta1/gapic_metadata.json index 25fd839f9e26..abe8af669054 100644 --- a/bigquery/reservation/apiv1beta1/gapic_metadata.json +++ b/bigquery/reservation/apiv1beta1/gapic_metadata.json @@ -106,6 +106,106 @@ ] } } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CreateAssignment": { + "methods": [ + "CreateAssignment" + ] + }, + "CreateCapacityCommitment": { + "methods": [ + "CreateCapacityCommitment" + ] + }, + "CreateReservation": { + "methods": [ + "CreateReservation" + ] + }, + "DeleteAssignment": { + "methods": [ + "DeleteAssignment" + ] + }, + "DeleteCapacityCommitment": { + "methods": [ + "DeleteCapacityCommitment" + ] + }, + "DeleteReservation": { + "methods": [ + "DeleteReservation" + ] + }, + "GetBiReservation": { + "methods": [ + "GetBiReservation" + ] + }, + "GetCapacityCommitment": { + "methods": [ + "GetCapacityCommitment" + ] + }, + "GetReservation": { + "methods": [ + "GetReservation" + ] + }, + "ListAssignments": { + "methods": [ + "ListAssignments" + ] + }, + "ListCapacityCommitments": { + "methods": [ + "ListCapacityCommitments" + ] + }, + "ListReservations": { + "methods": [ + "ListReservations" + ] + }, + "MergeCapacityCommitments": { + "methods": [ + "MergeCapacityCommitments" + ] + }, + "MoveAssignment": { + "methods": [ + "MoveAssignment" + ] + }, + "SearchAssignments": { + "methods": [ + "SearchAssignments" + ] + }, + "SplitCapacityCommitment": { + "methods": [ + "SplitCapacityCommitment" + ] + }, + "UpdateBiReservation": { + "methods": [ + "UpdateBiReservation" + ] + }, + "UpdateCapacityCommitment": { + "methods": [ + "UpdateCapacityCommitment" + ] + }, + "UpdateReservation": { + "methods": [ + "UpdateReservation" + ] + } + } } } } diff --git a/bigquery/reservation/apiv1beta1/reservation_client.go b/bigquery/reservation/apiv1beta1/reservation_client.go index e6a67e70240e..0673ea0694f6 100644 --- a/bigquery/reservation/apiv1beta1/reservation_client.go +++ b/bigquery/reservation/apiv1beta1/reservation_client.go @@ -17,21 +17,27 @@ package reservation import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" reservationpb "google.golang.org/genproto/googleapis/cloud/bigquery/reservation/v1beta1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -206,6 +212,130 @@ func defaultCallOptions() *CallOptions { } } +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + CreateReservation: []gax.CallOption{}, + ListReservations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetReservation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteReservation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + UpdateReservation: []gax.CallOption{}, + CreateCapacityCommitment: []gax.CallOption{}, + ListCapacityCommitments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetCapacityCommitment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteCapacityCommitment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + UpdateCapacityCommitment: []gax.CallOption{}, + SplitCapacityCommitment: []gax.CallOption{}, + MergeCapacityCommitments: []gax.CallOption{}, + CreateAssignment: []gax.CallOption{}, + ListAssignments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteAssignment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + SearchAssignments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + MoveAssignment: []gax.CallOption{}, + GetBiReservation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + UpdateBiReservation: []gax.CallOption{}, + } +} + // internalClient is an interface that defines the methods available from BigQuery Reservation API. type internalClient interface { Close() error @@ -278,7 +408,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -384,12 +515,12 @@ func (c *Client) MergeCapacityCommitments(ctx context.Context, req *reservationp // // Example: // -// The organization organizationA contains two projects, project1 -// and project2. +// The organization organizationA contains two projects, project1 +// and project2. // -// Assignments for all three entities (organizationA, project1, and -// project2) could all be created and mapped to the same or different -// reservations. +// Assignments for all three entities (organizationA, project1, and +// project2) could all be created and mapped to the same or different +// reservations. // // Returns google.rpc.Code.PERMISSION_DENIED if user does not have // ‘bigquery.admin’ permissions on the project using the reservation @@ -407,14 +538,14 @@ func (c *Client) CreateAssignment(ctx context.Context, req *reservationpb.Create // // Example: // -// Organization organizationA contains two projects, project1 and -// project2. +// Organization organizationA contains two projects, project1 and +// project2. // -// Reservation res1 exists and was created previously. +// Reservation res1 exists and was created previously. // -// CreateAssignment was used previously to define the following -// associations between entities and reservations: -// and +// CreateAssignment was used previously to define the following +// associations between entities and reservations: +// and // // In this example, ListAssignments will just return the above two assignments // for reservation res1, and no expansion/merge will happen. @@ -432,14 +563,14 @@ func (c *Client) ListAssignments(ctx context.Context, req *reservationpb.ListAss // // Example: // -// Organization organizationA contains two projects, project1 and -// project2. +// Organization organizationA contains two projects, project1 and +// project2. // -// Reservation res1 exists and was created previously. +// Reservation res1 exists and was created previously. // -// CreateAssignment was used previously to define the following -// associations between entities and reservations: -// and +// CreateAssignment was used previously to define the following +// associations between entities and reservations: +// and // // In this example, deletion of the assignment won’t // affect the other assignment . After said deletion, @@ -583,7 +714,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -603,6 +735,91 @@ func (c *gRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions +} + +// NewRESTClient creates a new reservation service rest client. +// +// Deprecated: Please use the v1 api instead. +// This API allows users to manage their flat-rate BigQuery reservations. +// +// A reservation provides computational resource guarantees, in the form of +// slots (at https://cloud.google.com/bigquery/docs/slots), to users. A slot is a +// unit of computational power in BigQuery, and serves as the basic unit of +// parallelism. In a scan of a multi-partitioned table, a single slot operates +// on a single partition of the table. A reservation resource exists as a child +// resource of the admin project and location, e.g.: +// projects/myproject/locations/US/reservations/reservationName. +// +// A capacity commitment is a way to purchase compute capacity for BigQuery jobs +// (in the form of slots) with some committed period of usage. A capacity +// commitment resource exists as a child resource of the admin project and +// location, e.g.: +// projects/myproject/locations/US/capacityCommitments/id. +// +// Deprecated: ReservationService may be removed in a future version. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://bigqueryreservation.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://bigqueryreservation.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://bigqueryreservation.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} func (c *gRPCClient) CreateReservation(ctx context.Context, req *reservationpb.CreateReservationRequest, opts ...gax.CallOption) (*reservationpb.Reservation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) @@ -1101,6 +1318,1336 @@ func (c *gRPCClient) UpdateBiReservation(ctx context.Context, req *reservationpb return resp, nil } +// CreateReservation creates a new reservation resource. +func (c *restClient) CreateReservation(ctx context.Context, req *reservationpb.CreateReservationRequest, opts ...gax.CallOption) (*reservationpb.Reservation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetReservation() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/reservations", req.GetParent()) + + params := url.Values{} + if req.GetReservationId() != "" { + params.Add("reservationId", fmt.Sprintf("%v", req.GetReservationId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateReservation[0:len((*c.CallOptions).CreateReservation):len((*c.CallOptions).CreateReservation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.Reservation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListReservations lists all the reservations for the project in the specified location. +func (c *restClient) ListReservations(ctx context.Context, req *reservationpb.ListReservationsRequest, opts ...gax.CallOption) *ReservationIterator { + it := &ReservationIterator{} + req = proto.Clone(req).(*reservationpb.ListReservationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*reservationpb.Reservation, string, error) { + resp := &reservationpb.ListReservationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/reservations", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetReservations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetReservation returns information about the reservation. +func (c *restClient) GetReservation(ctx context.Context, req *reservationpb.GetReservationRequest, opts ...gax.CallOption) (*reservationpb.Reservation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetReservation[0:len((*c.CallOptions).GetReservation):len((*c.CallOptions).GetReservation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.Reservation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteReservation deletes a reservation. +// Returns google.rpc.Code.FAILED_PRECONDITION when reservation has +// assignments. +func (c *restClient) DeleteReservation(ctx context.Context, req *reservationpb.DeleteReservationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// UpdateReservation updates an existing reservation resource. +func (c *restClient) UpdateReservation(ctx context.Context, req *reservationpb.UpdateReservationRequest, opts ...gax.CallOption) (*reservationpb.Reservation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetReservation() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetReservation().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "reservation.name", url.QueryEscape(req.GetReservation().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateReservation[0:len((*c.CallOptions).UpdateReservation):len((*c.CallOptions).UpdateReservation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.Reservation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateCapacityCommitment creates a new capacity commitment resource. +func (c *restClient) CreateCapacityCommitment(ctx context.Context, req *reservationpb.CreateCapacityCommitmentRequest, opts ...gax.CallOption) (*reservationpb.CapacityCommitment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetCapacityCommitment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/capacityCommitments", req.GetParent()) + + params := url.Values{} + if req.GetEnforceSingleAdminProjectPerOrg() { + params.Add("enforceSingleAdminProjectPerOrg", fmt.Sprintf("%v", req.GetEnforceSingleAdminProjectPerOrg())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateCapacityCommitment[0:len((*c.CallOptions).CreateCapacityCommitment):len((*c.CallOptions).CreateCapacityCommitment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.CapacityCommitment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListCapacityCommitments lists all the capacity commitments for the admin project. +func (c *restClient) ListCapacityCommitments(ctx context.Context, req *reservationpb.ListCapacityCommitmentsRequest, opts ...gax.CallOption) *CapacityCommitmentIterator { + it := &CapacityCommitmentIterator{} + req = proto.Clone(req).(*reservationpb.ListCapacityCommitmentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*reservationpb.CapacityCommitment, string, error) { + resp := &reservationpb.ListCapacityCommitmentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/capacityCommitments", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetCapacityCommitments(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetCapacityCommitment returns information about the capacity commitment. +func (c *restClient) GetCapacityCommitment(ctx context.Context, req *reservationpb.GetCapacityCommitmentRequest, opts ...gax.CallOption) (*reservationpb.CapacityCommitment, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetCapacityCommitment[0:len((*c.CallOptions).GetCapacityCommitment):len((*c.CallOptions).GetCapacityCommitment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.CapacityCommitment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteCapacityCommitment deletes a capacity commitment. Attempting to delete capacity commitment +// before its commitment_end_time will fail with the error code +// google.rpc.Code.FAILED_PRECONDITION. +func (c *restClient) DeleteCapacityCommitment(ctx context.Context, req *reservationpb.DeleteCapacityCommitmentRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// UpdateCapacityCommitment updates an existing capacity commitment. +// +// Only plan and renewal_plan fields can be updated. +// +// Plan can only be changed to a plan of a longer commitment period. +// Attempting to change to a plan with shorter commitment period will fail +// with the error code google.rpc.Code.FAILED_PRECONDITION. +func (c *restClient) UpdateCapacityCommitment(ctx context.Context, req *reservationpb.UpdateCapacityCommitmentRequest, opts ...gax.CallOption) (*reservationpb.CapacityCommitment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetCapacityCommitment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetCapacityCommitment().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "capacity_commitment.name", url.QueryEscape(req.GetCapacityCommitment().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateCapacityCommitment[0:len((*c.CallOptions).UpdateCapacityCommitment):len((*c.CallOptions).UpdateCapacityCommitment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.CapacityCommitment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SplitCapacityCommitment splits capacity commitment to two commitments of the same plan and +// commitment_end_time. +// +// A common use case is to enable downgrading commitments. +// +// For example, in order to downgrade from 10000 slots to 8000, you might +// split a 10000 capacity commitment into commitments of 2000 and 8000. Then, +// you would change the plan of the first one to FLEX and then delete it. +func (c *restClient) SplitCapacityCommitment(ctx context.Context, req *reservationpb.SplitCapacityCommitmentRequest, opts ...gax.CallOption) (*reservationpb.SplitCapacityCommitmentResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:split", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SplitCapacityCommitment[0:len((*c.CallOptions).SplitCapacityCommitment):len((*c.CallOptions).SplitCapacityCommitment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.SplitCapacityCommitmentResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// MergeCapacityCommitments merges capacity commitments of the same plan into a single commitment. +// +// The resulting capacity commitment has the greater commitment_end_time +// out of the to-be-merged capacity commitments. +// +// Attempting to merge capacity commitments of different plan will fail +// with the error code google.rpc.Code.FAILED_PRECONDITION. +func (c *restClient) MergeCapacityCommitments(ctx context.Context, req *reservationpb.MergeCapacityCommitmentsRequest, opts ...gax.CallOption) (*reservationpb.CapacityCommitment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/capacityCommitments:merge", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).MergeCapacityCommitments[0:len((*c.CallOptions).MergeCapacityCommitments):len((*c.CallOptions).MergeCapacityCommitments)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.CapacityCommitment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateAssignment creates an assignment object which allows the given project to submit jobs +// of a certain type using slots from the specified reservation. +// +// Currently a +// resource (project, folder, organization) can only have one assignment per +// each (job_type, location) combination, and that reservation will be used +// for all jobs of the matching type. +// +// Different assignments can be created on different levels of the +// projects, folders or organization hierarchy. During query execution, +// the assignment is looked up at the project, folder and organization levels +// in that order. The first assignment found is applied to the query. +// +// When creating assignments, it does not matter if other assignments exist at +// higher levels. +// +// Example: +// +// The organization organizationA contains two projects, project1 +// and project2. +// +// Assignments for all three entities (organizationA, project1, and +// project2) could all be created and mapped to the same or different +// reservations. +// +// Returns google.rpc.Code.PERMISSION_DENIED if user does not have +// ‘bigquery.admin’ permissions on the project using the reservation +// and the project that owns this reservation. +// +// Returns google.rpc.Code.INVALID_ARGUMENT when location of the assignment +// does not match location of the reservation. +func (c *restClient) CreateAssignment(ctx context.Context, req *reservationpb.CreateAssignmentRequest, opts ...gax.CallOption) (*reservationpb.Assignment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetAssignment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/assignments", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateAssignment[0:len((*c.CallOptions).CreateAssignment):len((*c.CallOptions).CreateAssignment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.Assignment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAssignments lists assignments. +// +// Only explicitly created assignments will be returned. +// +// Example: +// +// Organization organizationA contains two projects, project1 and +// project2. +// +// Reservation res1 exists and was created previously. +// +// CreateAssignment was used previously to define the following +// associations between entities and reservations: +// and +// +// In this example, ListAssignments will just return the above two assignments +// for reservation res1, and no expansion/merge will happen. +// +// The wildcard “-” can be used for +// reservations in the request. In that case all assignments belongs to the +// specified project and location will be listed. +// +// Note "-" cannot be used for projects nor locations. +func (c *restClient) ListAssignments(ctx context.Context, req *reservationpb.ListAssignmentsRequest, opts ...gax.CallOption) *AssignmentIterator { + it := &AssignmentIterator{} + req = proto.Clone(req).(*reservationpb.ListAssignmentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*reservationpb.Assignment, string, error) { + resp := &reservationpb.ListAssignmentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/assignments", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAssignments(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteAssignment deletes a assignment. No expansion will happen. +// +// Example: +// +// Organization organizationA contains two projects, project1 and +// project2. +// +// Reservation res1 exists and was created previously. +// +// CreateAssignment was used previously to define the following +// associations between entities and reservations: +// and +// +// In this example, deletion of the assignment won’t +// affect the other assignment . After said deletion, +// queries from project1 will still use res1 while queries from +// project2 will switch to use on-demand mode. +func (c *restClient) DeleteAssignment(ctx context.Context, req *reservationpb.DeleteAssignmentRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// SearchAssignments looks up assignments for a specified resource for a particular region. +// If the request is about a project: +// +// Assignments created on the project will be returned if they exist. +// +// Otherwise assignments created on the closest ancestor will be +// returned. +// +// Assignments for different JobTypes will all be returned. +// +// The same logic applies if the request is about a folder. +// +// If the request is about an organization, then assignments created on the +// organization will be returned (organization doesn’t have ancestors). +// +// Comparing to ListAssignments, there are some behavior +// differences: +// +// permission on the assignee will be verified in this API. +// +// Hierarchy lookup (project->folder->organization) happens in this API. +// +// Parent here is projects/*/locations/*, instead of +// projects/*/locations/*reservations/*. +// +// Note "-" cannot be used for projects +// nor locations. +func (c *restClient) SearchAssignments(ctx context.Context, req *reservationpb.SearchAssignmentsRequest, opts ...gax.CallOption) *AssignmentIterator { + it := &AssignmentIterator{} + req = proto.Clone(req).(*reservationpb.SearchAssignmentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*reservationpb.Assignment, string, error) { + resp := &reservationpb.SearchAssignmentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:searchAssignments", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetQuery() != "" { + params.Add("query", fmt.Sprintf("%v", req.GetQuery())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAssignments(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// MoveAssignment moves an assignment under a new reservation. +// +// This differs from removing an existing assignment and recreating a new one +// by providing a transactional change that ensures an assignee always has an +// associated reservation. +func (c *restClient) MoveAssignment(ctx context.Context, req *reservationpb.MoveAssignmentRequest, opts ...gax.CallOption) (*reservationpb.Assignment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:move", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).MoveAssignment[0:len((*c.CallOptions).MoveAssignment):len((*c.CallOptions).MoveAssignment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.Assignment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetBiReservation retrieves a BI reservation. +func (c *restClient) GetBiReservation(ctx context.Context, req *reservationpb.GetBiReservationRequest, opts ...gax.CallOption) (*reservationpb.BiReservation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetBiReservation[0:len((*c.CallOptions).GetBiReservation):len((*c.CallOptions).GetBiReservation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.BiReservation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateBiReservation updates a BI reservation. +// +// Only fields specified in the field_mask are updated. +// +// A singleton BI reservation always exists with default size 0. +// In order to reserve BI capacity it needs to be updated to an amount +// greater than 0. In order to release BI capacity reservation size +// must be set to 0. +func (c *restClient) UpdateBiReservation(ctx context.Context, req *reservationpb.UpdateBiReservationRequest, opts ...gax.CallOption) (*reservationpb.BiReservation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetReservation() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetReservation().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "reservation.name", url.QueryEscape(req.GetReservation().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateBiReservation[0:len((*c.CallOptions).UpdateBiReservation):len((*c.CallOptions).UpdateBiReservation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &reservationpb.BiReservation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // AssignmentIterator manages a stream of *reservationpb.Assignment. type AssignmentIterator struct { items []*reservationpb.Assignment diff --git a/bigquery/reservation/apiv1beta1/reservation_client_example_test.go b/bigquery/reservation/apiv1beta1/reservation_client_example_test.go index 95b3947be64c..264cce0396fa 100644 --- a/bigquery/reservation/apiv1beta1/reservation_client_example_test.go +++ b/bigquery/reservation/apiv1beta1/reservation_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -36,8 +41,30 @@ func ExampleNewClient() { _ = c } +func ExampleNewRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := reservation.NewRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleClient_CreateReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +85,11 @@ func ExampleClient_CreateReservation() { func ExampleClient_ListReservations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +116,11 @@ func ExampleClient_ListReservations() { func ExampleClient_GetReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +141,11 @@ func ExampleClient_GetReservation() { func ExampleClient_DeleteReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +164,11 @@ func ExampleClient_DeleteReservation() { func ExampleClient_UpdateReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +189,11 @@ func ExampleClient_UpdateReservation() { func ExampleClient_CreateCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +214,11 @@ func ExampleClient_CreateCapacityCommitment() { func ExampleClient_ListCapacityCommitments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +245,11 @@ func ExampleClient_ListCapacityCommitments() { func ExampleClient_GetCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +270,11 @@ func ExampleClient_GetCapacityCommitment() { func ExampleClient_DeleteCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -226,6 +293,11 @@ func ExampleClient_DeleteCapacityCommitment() { func ExampleClient_UpdateCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -246,6 +318,11 @@ func ExampleClient_UpdateCapacityCommitment() { func ExampleClient_SplitCapacityCommitment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -266,6 +343,11 @@ func ExampleClient_SplitCapacityCommitment() { func ExampleClient_MergeCapacityCommitments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -286,6 +368,11 @@ func ExampleClient_MergeCapacityCommitments() { func ExampleClient_CreateAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -306,6 +393,11 @@ func ExampleClient_CreateAssignment() { func ExampleClient_ListAssignments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -332,6 +424,11 @@ func ExampleClient_ListAssignments() { func ExampleClient_DeleteAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -350,6 +447,11 @@ func ExampleClient_DeleteAssignment() { func ExampleClient_SearchAssignments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -376,6 +478,11 @@ func ExampleClient_SearchAssignments() { func ExampleClient_MoveAssignment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -396,6 +503,11 @@ func ExampleClient_MoveAssignment() { func ExampleClient_GetBiReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -416,6 +528,11 @@ func ExampleClient_GetBiReservation() { func ExampleClient_UpdateBiReservation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := reservation.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/routine.go b/bigquery/routine.go index d6aba1e06359..2185a146897f 100644 --- a/bigquery/routine.go +++ b/bigquery/routine.go @@ -97,7 +97,9 @@ func (r *Routine) Metadata(ctx context.Context) (rm *RoutineMetadata, err error) setClientHeader(req.Header()) var routine *bq.Routine err = runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.routines.get") routine, err = req.Do() + trace.EndSpan(ctx, err) return err }) if err != nil { @@ -129,7 +131,9 @@ func (r *Routine) Update(ctx context.Context, upd *RoutineMetadataToUpdate, etag } var res *bq.Routine if err := runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.routines.update") res, err = call.Do() + trace.EndSpan(ctx, err) return err }); err != nil { return nil, err diff --git a/bigquery/routine_test.go b/bigquery/routine_test.go index 59210ff9a010..5527a751101f 100644 --- a/bigquery/routine_test.go +++ b/bigquery/routine_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bigquery/schema.go b/bigquery/schema.go index 4b090e0632bb..c35ac17f2982 100644 --- a/bigquery/schema.go +++ b/bigquery/schema.go @@ -121,17 +121,38 @@ type FieldSchema struct { // // See the Precision field for additional guidance about valid values. Scale int64 + + // DefaultValueExpression is used to specify the default value of a field + // using a SQL expression. It can only be set for top level fields (columns). + // + // You can use struct or array expression to specify default value for the + // entire struct or array. The valid SQL expressions are: + // + // - Literals for all data types, including STRUCT and ARRAY. + // - The following functions: + // - CURRENT_TIMESTAMP + // - CURRENT_TIME + // - CURRENT_DATE + // - CURRENT_DATETIME + // - GENERATE_UUID + // - RAND + // - SESSION_USER + // - ST_GEOGPOINT + // - Struct or array composed with the above allowed functions, for example: + // [CURRENT_DATE(), DATE '2020-01-01']" + DefaultValueExpression string } func (fs *FieldSchema) toBQ() *bq.TableFieldSchema { tfs := &bq.TableFieldSchema{ - Description: fs.Description, - Name: fs.Name, - Type: string(fs.Type), - PolicyTags: fs.PolicyTags.toBQ(), - MaxLength: fs.MaxLength, - Precision: fs.Precision, - Scale: fs.Scale, + Description: fs.Description, + Name: fs.Name, + Type: string(fs.Type), + PolicyTags: fs.PolicyTags.toBQ(), + MaxLength: fs.MaxLength, + Precision: fs.Precision, + Scale: fs.Scale, + DefaultValueExpression: fs.DefaultValueExpression, } if fs.Repeated { @@ -181,15 +202,16 @@ func (s Schema) toBQ() *bq.TableSchema { func bqToFieldSchema(tfs *bq.TableFieldSchema) *FieldSchema { fs := &FieldSchema{ - Description: tfs.Description, - Name: tfs.Name, - Repeated: tfs.Mode == "REPEATED", - Required: tfs.Mode == "REQUIRED", - Type: FieldType(tfs.Type), - PolicyTags: bqToPolicyTagList(tfs.PolicyTags), - MaxLength: tfs.MaxLength, - Precision: tfs.Precision, - Scale: tfs.Scale, + Description: tfs.Description, + Name: tfs.Name, + Repeated: tfs.Mode == "REPEATED", + Required: tfs.Mode == "REQUIRED", + Type: FieldType(tfs.Type), + PolicyTags: bqToPolicyTagList(tfs.PolicyTags), + MaxLength: tfs.MaxLength, + Precision: tfs.Precision, + Scale: tfs.Scale, + DefaultValueExpression: tfs.DefaultValueExpression, } for _, f := range tfs.Fields { @@ -244,6 +266,8 @@ const ( BigNumericFieldType FieldType = "BIGNUMERIC" // IntervalFieldType is a representation of a duration or an amount of time. IntervalFieldType FieldType = "INTERVAL" + // JSONFieldType is a representation of a json object. + JSONFieldType FieldType = "JSON" ) var ( @@ -263,6 +287,7 @@ var ( GeographyFieldType: true, BigNumericFieldType: true, IntervalFieldType: true, + JSONFieldType: true, } // The API will accept alias names for the types based on the Standard SQL type names. fieldAliases = map[FieldType]FieldType{ @@ -284,16 +309,16 @@ var typeOfByteSlice = reflect.TypeOf([]byte{}) // (This is the same mapping as that used for RowIterator.Next.) Fields inferred // from these types are marked required (non-nullable). // -// STRING string -// BOOL bool -// INTEGER int, int8, int16, int32, int64, uint8, uint16, uint32 -// FLOAT float32, float64 -// BYTES []byte -// TIMESTAMP time.Time -// DATE civil.Date -// TIME civil.Time -// DATETIME civil.DateTime -// NUMERIC *big.Rat +// STRING string +// BOOL bool +// INTEGER int, int8, int16, int32, int64, uint8, uint16, uint32 +// FLOAT float32, float64 +// BYTES []byte +// TIMESTAMP time.Time +// DATE civil.Date +// TIME civil.Time +// DATETIME civil.DateTime +// NUMERIC *big.Rat // // The big.Rat type supports numbers of arbitrary size and precision. Values // will be rounded to 9 digits after the decimal point before being transmitted @@ -308,15 +333,15 @@ var typeOfByteSlice = reflect.TypeOf([]byte{}) // // Nullable fields are inferred from the NullXXX types, declared in this package: // -// STRING NullString -// BOOL NullBool -// INTEGER NullInt64 -// FLOAT NullFloat64 -// TIMESTAMP NullTimestamp -// DATE NullDate -// TIME NullTime -// DATETIME NullDateTime -// GEOGRAPHY NullGeography +// STRING NullString +// BOOL NullBool +// INTEGER NullInt64 +// FLOAT NullFloat64 +// TIMESTAMP NullTimestamp +// DATE NullDate +// TIME NullTime +// DATETIME NullDateTime +// GEOGRAPHY NullGeography // // For a nullable BYTES field, use the type []byte and tag the field "nullable" (see below). // For a nullable NUMERIC field, use the type *big.Rat and tag the field "nullable". @@ -334,15 +359,20 @@ var typeOfByteSlice = reflect.TypeOf([]byte{}) // // Struct fields may be tagged in a way similar to the encoding/json package. // A tag of the form -// bigquery:"name" +// +// bigquery:"name" +// // uses "name" instead of the struct field name as the BigQuery field name. // A tag of the form -// bigquery:"-" +// +// bigquery:"-" +// // omits the field from the inferred schema. // The "nullable" option marks the field as nullable (not required). It is only // needed for []byte, *big.Rat and pointer-to-struct fields, and cannot appear on other // fields. In this example, the Go name of the field is retained: -// bigquery:",nullable" +// +// bigquery:",nullable" func InferSchema(st interface{}) (Schema, error) { return inferSchemaReflectCached(reflect.TypeOf(st)) } diff --git a/bigquery/schema_test.go b/bigquery/schema_test.go index d69cbbd8222f..d3ca8f7fa703 100644 --- a/bigquery/schema_test.go +++ b/bigquery/schema_test.go @@ -320,6 +320,34 @@ func TestSchemaConversion(t *testing.T) { }, }, }, + { + // default values + bqSchema: &bq.TableSchema{ + Fields: []*bq.TableFieldSchema{ + { + Name: "foo", + Type: "STRING", + DefaultValueExpression: "I_LOVE_FOO", + }, + { + Name: "bar", + Type: "TIMESTAMP", + DefaultValueExpression: "CURRENT_TIMESTAMP()", + }, + }}, + schema: Schema{ + { + Name: "foo", + Type: StringFieldType, + DefaultValueExpression: "I_LOVE_FOO", + }, + { + Name: "bar", + Type: TimestampFieldType, + DefaultValueExpression: "CURRENT_TIMESTAMP()", + }, + }, + }, { // policy tags bqSchema: &bq.TableSchema{ diff --git a/bigquery/standardsql.go b/bigquery/standardsql.go index 1101bbb06564..7f8ca6e11678 100644 --- a/bigquery/standardsql.go +++ b/bigquery/standardsql.go @@ -63,6 +63,23 @@ func (ssdt *StandardSQLDataType) toBQ() (*bq.StandardSqlDataType, error) { return bqdt, nil } +func (ssdt StandardSQLDataType) toBQParamType() *bq.QueryParameterType { + if ssdt.ArrayElementType != nil { + return &bq.QueryParameterType{Type: "ARRAY", ArrayType: ssdt.ArrayElementType.toBQParamType()} + } + if ssdt.StructType != nil { + var fts []*bq.QueryParameterTypeStructTypes + for _, field := range ssdt.StructType.Fields { + fts = append(fts, &bq.QueryParameterTypeStructTypes{ + Name: field.Name, + Type: field.Type.toBQParamType(), + }) + } + return &bq.QueryParameterType{Type: "STRUCT", StructTypes: fts} + } + return &bq.QueryParameterType{Type: ssdt.TypeKind} +} + func bqToStandardSQLDataType(bqdt *bq.StandardSqlDataType) (*StandardSQLDataType, error) { if bqdt == nil { return nil, nil diff --git a/bigquery/storage/apiv1/big_query_read_client.go b/bigquery/storage/apiv1/big_query_read_client.go index 875a56a1c01d..80291925d2a6 100644 --- a/bigquery/storage/apiv1/big_query_read_client.go +++ b/bigquery/storage/apiv1/big_query_read_client.go @@ -135,7 +135,8 @@ func (c *BigQueryReadClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BigQueryReadClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -252,7 +253,8 @@ func NewBigQueryReadClient(ctx context.Context, opts ...option.ClientOption) (*B // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *bigQueryReadGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/storage/apiv1/big_query_read_client_example_test.go b/bigquery/storage/apiv1/big_query_read_client_example_test.go index cfd2ea888e30..9a09928b0b56 100644 --- a/bigquery/storage/apiv1/big_query_read_client_example_test.go +++ b/bigquery/storage/apiv1/big_query_read_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewBigQueryReadClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewBigQueryReadClient() { func ExampleBigQueryReadClient_CreateReadSession() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExampleBigQueryReadClient_CreateReadSession() { func ExampleBigQueryReadClient_SplitReadStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/storage/apiv1/big_query_write_client.go b/bigquery/storage/apiv1/big_query_write_client.go index 72b6723b93e3..bc73cc1b6dc3 100644 --- a/bigquery/storage/apiv1/big_query_write_client.go +++ b/bigquery/storage/apiv1/big_query_write_client.go @@ -181,7 +181,8 @@ func (c *BigQueryWriteClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BigQueryWriteClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,15 +219,15 @@ func (c *BigQueryWriteClient) CreateWriteStream(ctx context.Context, req *storag // The specifics of when successfully appended data is made visible to the // table are governed by the type of stream: // -// For COMMITTED streams (which includes the default stream), data is -// visible immediately upon successful append. +// For COMMITTED streams (which includes the default stream), data is +// visible immediately upon successful append. // -// For BUFFERED streams, data is made visible via a subsequent FlushRows -// rpc which advances a cursor to a newer offset in the stream. +// For BUFFERED streams, data is made visible via a subsequent FlushRows +// rpc which advances a cursor to a newer offset in the stream. // -// For PENDING streams, data is not made visible until the stream itself is -// finalized (via the FinalizeWriteStream rpc), and the stream is explicitly -// committed via the BatchCommitWriteStreams rpc. +// For PENDING streams, data is not made visible until the stream itself is +// finalized (via the FinalizeWriteStream rpc), and the stream is explicitly +// committed via the BatchCommitWriteStreams rpc. // // Note: For users coding against the gRPC api directly, it may be // necessary to supply the x-goog-request-params system parameter @@ -336,7 +337,8 @@ func NewBigQueryWriteClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *bigQueryWriteGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/bigquery/storage/apiv1/big_query_write_client_example_test.go b/bigquery/storage/apiv1/big_query_write_client_example_test.go index 18c6f2679e8d..afae0105b138 100644 --- a/bigquery/storage/apiv1/big_query_write_client_example_test.go +++ b/bigquery/storage/apiv1/big_query_write_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBigQueryWriteClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBigQueryWriteClient() { func ExampleBigQueryWriteClient_CreateWriteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleBigQueryWriteClient_CreateWriteStream() { func ExampleBigQueryWriteClient_AppendRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -93,6 +108,11 @@ func ExampleBigQueryWriteClient_AppendRows() { func ExampleBigQueryWriteClient_GetWriteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -113,6 +133,11 @@ func ExampleBigQueryWriteClient_GetWriteStream() { func ExampleBigQueryWriteClient_FinalizeWriteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleBigQueryWriteClient_FinalizeWriteStream() { func ExampleBigQueryWriteClient_BatchCommitWriteStreams() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleBigQueryWriteClient_BatchCommitWriteStreams() { func ExampleBigQueryWriteClient_FlushRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/storage/apiv1/doc.go b/bigquery/storage/apiv1/doc.go index 53df6933ce80..6c9ac808a648 100644 --- a/bigquery/storage/apiv1/doc.go +++ b/bigquery/storage/apiv1/doc.go @@ -17,45 +17,56 @@ // Package storage is an auto-generated package for the // BigQuery Storage API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := storage.NewBigQueryReadClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := storage.NewBigQueryReadClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := storage.NewBigQueryReadClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := storage.NewBigQueryReadClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &storagepb.CreateReadSessionRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1#CreateReadSessionRequest. -// } -// resp, err := c.CreateReadSession(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp +// req := &storagepb.CreateReadSessionRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1#CreateReadSessionRequest. +// } +// resp, err := c.CreateReadSession(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp // -// Use of Context +// # Use of Context // -// The ctx passed to NewClient is used for authentication requests and +// The ctx passed to NewBigQueryReadClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/bigquery/storage/apiv1/info.go b/bigquery/storage/apiv1/info.go new file mode 100644 index 000000000000..7669185f650c --- /dev/null +++ b/bigquery/storage/apiv1/info.go @@ -0,0 +1,33 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package storage + +// SetGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Also passes any +// provided key-value pairs. Intended for use by Google-written clients. +// +// Internal use only. +func (c *BigQueryWriteClient) SetGoogleClientInfo(keyval ...string) { + c.setGoogleClientInfo(keyval...) +} + +// SetGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Also passes any +// provided key-value pairs. Intended for use by Google-written clients. +// +// Internal use only. +func (c *BigQueryReadClient) SetGoogleClientInfo(keyval ...string) { + c.setGoogleClientInfo(keyval...) +} diff --git a/bigquery/storage/apiv1beta1/big_query_storage_client.go b/bigquery/storage/apiv1beta1/big_query_storage_client.go index 2444f8e73be7..03db7bf147cc 100644 --- a/bigquery/storage/apiv1beta1/big_query_storage_client.go +++ b/bigquery/storage/apiv1beta1/big_query_storage_client.go @@ -228,7 +228,8 @@ func (c *BigQueryStorageClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BigQueryStorageClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -366,7 +367,8 @@ func NewBigQueryStorageClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *bigQueryStorageGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -452,7 +454,7 @@ func (c *bigQueryStorageRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *bigQueryStorageRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/bigquery/storage/apiv1beta1/big_query_storage_client_example_test.go b/bigquery/storage/apiv1beta1/big_query_storage_client_example_test.go index c6a63a213b46..4962f5c48f17 100644 --- a/bigquery/storage/apiv1beta1/big_query_storage_client_example_test.go +++ b/bigquery/storage/apiv1beta1/big_query_storage_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewBigQueryStorageClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryStorageClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewBigQueryStorageClient() { func ExampleNewBigQueryStorageRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryStorageRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewBigQueryStorageRESTClient() { func ExampleBigQueryStorageClient_CreateReadSession() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryStorageClient(ctx) if err != nil { // TODO: Handle error. @@ -69,6 +84,11 @@ func ExampleBigQueryStorageClient_CreateReadSession() { func ExampleBigQueryStorageClient_BatchCreateReadSessionStreams() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryStorageClient(ctx) if err != nil { // TODO: Handle error. @@ -89,6 +109,11 @@ func ExampleBigQueryStorageClient_BatchCreateReadSessionStreams() { func ExampleBigQueryStorageClient_FinalizeStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryStorageClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +132,11 @@ func ExampleBigQueryStorageClient_FinalizeStream() { func ExampleBigQueryStorageClient_SplitReadStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryStorageClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/storage/apiv1beta1/doc.go b/bigquery/storage/apiv1beta1/doc.go index 3611141094c0..bfa5b2f7d524 100644 --- a/bigquery/storage/apiv1beta1/doc.go +++ b/bigquery/storage/apiv1beta1/doc.go @@ -17,47 +17,58 @@ // Package storage is an auto-generated package for the // BigQuery Storage API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := storage.NewBigQueryStorageClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := storage.NewBigQueryStorageClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := storage.NewBigQueryStorageClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &storagepb.CreateReadSessionRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1#CreateReadSessionRequest. -// } -// resp, err := c.CreateReadSession(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := storage.NewBigQueryStorageClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &storagepb.CreateReadSessionRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1#CreateReadSessionRequest. +// } +// resp, err := c.CreateReadSession(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewBigQueryStorageClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/bigquery/storage/apiv1beta1/mock_test.go b/bigquery/storage/apiv1beta1/mock_test.go deleted file mode 100644 index feb6fcc9c510..000000000000 --- a/bigquery/storage/apiv1beta1/mock_test.go +++ /dev/null @@ -1,454 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package storage - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - storagepb "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockBigQueryStorageServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - storagepb.BigQueryStorageServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockBigQueryStorageServer) CreateReadSession(ctx context.Context, req *storagepb.CreateReadSessionRequest) (*storagepb.ReadSession, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*storagepb.ReadSession), nil -} - -func (s *mockBigQueryStorageServer) ReadRows(req *storagepb.ReadRowsRequest, stream storagepb.BigQueryStorage_ReadRowsServer) error { - md, _ := metadata.FromIncomingContext(stream.Context()) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return s.err - } - for _, v := range s.resps { - if err := stream.Send(v.(*storagepb.ReadRowsResponse)); err != nil { - return err - } - } - return nil -} - -func (s *mockBigQueryStorageServer) BatchCreateReadSessionStreams(ctx context.Context, req *storagepb.BatchCreateReadSessionStreamsRequest) (*storagepb.BatchCreateReadSessionStreamsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*storagepb.BatchCreateReadSessionStreamsResponse), nil -} - -func (s *mockBigQueryStorageServer) FinalizeStream(ctx context.Context, req *storagepb.FinalizeStreamRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockBigQueryStorageServer) SplitReadStream(ctx context.Context, req *storagepb.SplitReadStreamRequest) (*storagepb.SplitReadStreamResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*storagepb.SplitReadStreamResponse), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockBigQueryStorage mockBigQueryStorageServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - storagepb.RegisterBigQueryStorageServer(serv, &mockBigQueryStorage) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestBigQueryStorageCreateReadSession(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &storagepb.ReadSession{ - Name: name, - } - - mockBigQueryStorage.err = nil - mockBigQueryStorage.reqs = nil - - mockBigQueryStorage.resps = append(mockBigQueryStorage.resps[:0], expectedResponse) - - var tableReference *storagepb.TableReference = &storagepb.TableReference{} - var parent string = "parent-995424086" - var request = &storagepb.CreateReadSessionRequest{ - TableReference: tableReference, - Parent: parent, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateReadSession(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockBigQueryStorage.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestBigQueryStorageCreateReadSessionError(t *testing.T) { - errCode := codes.PermissionDenied - mockBigQueryStorage.err = gstatus.Error(errCode, "test error") - - var tableReference *storagepb.TableReference = &storagepb.TableReference{} - var parent string = "parent-995424086" - var request = &storagepb.CreateReadSessionRequest{ - TableReference: tableReference, - Parent: parent, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateReadSession(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestBigQueryStorageReadRows(t *testing.T) { - var rowCount int64 = 1340416618 - var expectedResponse = &storagepb.ReadRowsResponse{ - RowCount: rowCount, - } - - mockBigQueryStorage.err = nil - mockBigQueryStorage.reqs = nil - - mockBigQueryStorage.resps = append(mockBigQueryStorage.resps[:0], expectedResponse) - - var readPosition *storagepb.StreamPosition = &storagepb.StreamPosition{} - var request = &storagepb.ReadRowsRequest{ - ReadPosition: readPosition, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - stream, err := c.ReadRows(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := stream.Recv() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockBigQueryStorage.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestBigQueryStorageReadRowsError(t *testing.T) { - errCode := codes.PermissionDenied - mockBigQueryStorage.err = gstatus.Error(errCode, "test error") - - var readPosition *storagepb.StreamPosition = &storagepb.StreamPosition{} - var request = &storagepb.ReadRowsRequest{ - ReadPosition: readPosition, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - stream, err := c.ReadRows(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := stream.Recv() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestBigQueryStorageBatchCreateReadSessionStreams(t *testing.T) { - var expectedResponse *storagepb.BatchCreateReadSessionStreamsResponse = &storagepb.BatchCreateReadSessionStreamsResponse{} - - mockBigQueryStorage.err = nil - mockBigQueryStorage.reqs = nil - - mockBigQueryStorage.resps = append(mockBigQueryStorage.resps[:0], expectedResponse) - - var session *storagepb.ReadSession = &storagepb.ReadSession{} - var requestedStreams int32 = 1017221410 - var request = &storagepb.BatchCreateReadSessionStreamsRequest{ - Session: session, - RequestedStreams: requestedStreams, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchCreateReadSessionStreams(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockBigQueryStorage.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestBigQueryStorageBatchCreateReadSessionStreamsError(t *testing.T) { - errCode := codes.PermissionDenied - mockBigQueryStorage.err = gstatus.Error(errCode, "test error") - - var session *storagepb.ReadSession = &storagepb.ReadSession{} - var requestedStreams int32 = 1017221410 - var request = &storagepb.BatchCreateReadSessionStreamsRequest{ - Session: session, - RequestedStreams: requestedStreams, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchCreateReadSessionStreams(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestBigQueryStorageFinalizeStream(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockBigQueryStorage.err = nil - mockBigQueryStorage.reqs = nil - - mockBigQueryStorage.resps = append(mockBigQueryStorage.resps[:0], expectedResponse) - - var stream *storagepb.Stream = &storagepb.Stream{} - var request = &storagepb.FinalizeStreamRequest{ - Stream: stream, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.FinalizeStream(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockBigQueryStorage.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestBigQueryStorageFinalizeStreamError(t *testing.T) { - errCode := codes.PermissionDenied - mockBigQueryStorage.err = gstatus.Error(errCode, "test error") - - var stream *storagepb.Stream = &storagepb.Stream{} - var request = &storagepb.FinalizeStreamRequest{ - Stream: stream, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.FinalizeStream(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestBigQueryStorageSplitReadStream(t *testing.T) { - var expectedResponse *storagepb.SplitReadStreamResponse = &storagepb.SplitReadStreamResponse{} - - mockBigQueryStorage.err = nil - mockBigQueryStorage.reqs = nil - - mockBigQueryStorage.resps = append(mockBigQueryStorage.resps[:0], expectedResponse) - - var originalStream *storagepb.Stream = &storagepb.Stream{} - var request = &storagepb.SplitReadStreamRequest{ - OriginalStream: originalStream, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SplitReadStream(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockBigQueryStorage.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestBigQueryStorageSplitReadStreamError(t *testing.T) { - errCode := codes.PermissionDenied - mockBigQueryStorage.err = gstatus.Error(errCode, "test error") - - var originalStream *storagepb.Stream = &storagepb.Stream{} - var request = &storagepb.SplitReadStreamRequest{ - OriginalStream: originalStream, - } - - c, err := NewBigQueryStorageClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SplitReadStream(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/bigquery/storage/apiv1beta2/big_query_read_client.go b/bigquery/storage/apiv1beta2/big_query_read_client.go index 623e16d58fb6..d3fc8f032da4 100644 --- a/bigquery/storage/apiv1beta2/big_query_read_client.go +++ b/bigquery/storage/apiv1beta2/big_query_read_client.go @@ -181,7 +181,8 @@ func (c *BigQueryReadClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BigQueryReadClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -301,7 +302,8 @@ func NewBigQueryReadClient(ctx context.Context, opts ...option.ClientOption) (*B // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *bigQueryReadGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -390,7 +392,7 @@ func (c *bigQueryReadRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *bigQueryReadRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/bigquery/storage/apiv1beta2/big_query_read_client_example_test.go b/bigquery/storage/apiv1beta2/big_query_read_client_example_test.go index 533d7dce88a2..6c704a549daf 100644 --- a/bigquery/storage/apiv1beta2/big_query_read_client_example_test.go +++ b/bigquery/storage/apiv1beta2/big_query_read_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewBigQueryReadClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewBigQueryReadClient() { func ExampleNewBigQueryReadRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewBigQueryReadRESTClient() { func ExampleBigQueryReadClient_CreateReadSession() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadClient(ctx) if err != nil { // TODO: Handle error. @@ -69,6 +84,11 @@ func ExampleBigQueryReadClient_CreateReadSession() { func ExampleBigQueryReadClient_SplitReadStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryReadClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/storage/apiv1beta2/big_query_write_client.go b/bigquery/storage/apiv1beta2/big_query_write_client.go index b3a131be1e61..5538897a2d57 100644 --- a/bigquery/storage/apiv1beta2/big_query_write_client.go +++ b/bigquery/storage/apiv1beta2/big_query_write_client.go @@ -257,7 +257,8 @@ func (c *BigQueryWriteClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BigQueryWriteClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -387,7 +388,8 @@ func NewBigQueryWriteClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *bigQueryWriteGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -473,7 +475,7 @@ func (c *bigQueryWriteRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *bigQueryWriteRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/bigquery/storage/apiv1beta2/big_query_write_client_example_test.go b/bigquery/storage/apiv1beta2/big_query_write_client_example_test.go index 73443fed5dfa..627b25b57640 100644 --- a/bigquery/storage/apiv1beta2/big_query_write_client_example_test.go +++ b/bigquery/storage/apiv1beta2/big_query_write_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBigQueryWriteClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBigQueryWriteClient() { func ExampleNewBigQueryWriteRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewBigQueryWriteRESTClient() { func ExampleBigQueryWriteClient_CreateWriteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleBigQueryWriteClient_CreateWriteStream() { func ExampleBigQueryWriteClient_AppendRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +125,11 @@ func ExampleBigQueryWriteClient_AppendRows() { func ExampleBigQueryWriteClient_GetWriteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleBigQueryWriteClient_GetWriteStream() { func ExampleBigQueryWriteClient_FinalizeWriteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -145,6 +175,11 @@ func ExampleBigQueryWriteClient_FinalizeWriteStream() { func ExampleBigQueryWriteClient_BatchCommitWriteStreams() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. @@ -165,6 +200,11 @@ func ExampleBigQueryWriteClient_BatchCommitWriteStreams() { func ExampleBigQueryWriteClient_FlushRows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := storage.NewBigQueryWriteClient(ctx) if err != nil { // TODO: Handle error. diff --git a/bigquery/storage/apiv1beta2/doc.go b/bigquery/storage/apiv1beta2/doc.go index a1809f91a18c..a8cf9465bcba 100644 --- a/bigquery/storage/apiv1beta2/doc.go +++ b/bigquery/storage/apiv1beta2/doc.go @@ -17,47 +17,58 @@ // Package storage is an auto-generated package for the // BigQuery Storage API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := storage.NewBigQueryReadClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := storage.NewBigQueryReadClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := storage.NewBigQueryReadClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &storagepb.CreateReadSessionRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2#CreateReadSessionRequest. -// } -// resp, err := c.CreateReadSession(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := storage.NewBigQueryReadClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &storagepb.CreateReadSessionRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2#CreateReadSessionRequest. +// } +// resp, err := c.CreateReadSession(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewBigQueryReadClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/bigquery/storage/managedwriter/adapt/protoconversion.go b/bigquery/storage/managedwriter/adapt/protoconversion.go index 50817d7651a8..63b81e5072fd 100644 --- a/bigquery/storage/managedwriter/adapt/protoconversion.go +++ b/bigquery/storage/managedwriter/adapt/protoconversion.go @@ -63,6 +63,27 @@ var bqTypeToFieldTypeMap = map[storagepb.TableFieldSchema_Type]descriptorpb.Fiel storagepb.TableFieldSchema_TIMESTAMP: descriptorpb.FieldDescriptorProto_TYPE_INT64, } +// Primitive types which can leverage packed encoding when repeated/arrays. +// +// Note: many/most of these aren't used when doing schema to proto conversion, but +// are included for completeness. +var packedTypes = []descriptorpb.FieldDescriptorProto_Type{ + descriptorpb.FieldDescriptorProto_TYPE_INT32, + descriptorpb.FieldDescriptorProto_TYPE_INT64, + descriptorpb.FieldDescriptorProto_TYPE_UINT32, + descriptorpb.FieldDescriptorProto_TYPE_UINT64, + descriptorpb.FieldDescriptorProto_TYPE_SINT32, + descriptorpb.FieldDescriptorProto_TYPE_SINT64, + descriptorpb.FieldDescriptorProto_TYPE_FIXED32, + descriptorpb.FieldDescriptorProto_TYPE_FIXED64, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED32, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED64, + descriptorpb.FieldDescriptorProto_TYPE_FLOAT, + descriptorpb.FieldDescriptorProto_TYPE_DOUBLE, + descriptorpb.FieldDescriptorProto_TYPE_BOOL, + descriptorpb.FieldDescriptorProto_TYPE_ENUM, +} + // For TableFieldSchema OPTIONAL mode, we use the wrapper types to allow for the // proper representation of NULL values, as proto3 semantics would just use default value. var bqTypeToWrapperMap = map[storagepb.TableFieldSchema_Type]string{ @@ -85,10 +106,10 @@ var wellKnownTypesWrapperName = "google/protobuf/wrappers.proto" // dependencyCache is used to reduce the number of unique messages we generate by caching based on the tableschema. // -// keys are based on the base64-encoded serialized tableschema value. -type dependencyCache map[string]protoreflect.Descriptor +// Keys are based on the base64-encoded serialized tableschema value. +type dependencyCache map[string]protoreflect.MessageDescriptor -func (dm dependencyCache) get(schema *storagepb.TableSchema) protoreflect.Descriptor { +func (dm dependencyCache) get(schema *storagepb.TableSchema) protoreflect.MessageDescriptor { if dm == nil { return nil } @@ -103,7 +124,18 @@ func (dm dependencyCache) get(schema *storagepb.TableSchema) protoreflect.Descri return nil } -func (dm dependencyCache) add(schema *storagepb.TableSchema, descriptor protoreflect.Descriptor) error { +func (dm dependencyCache) getFileDescriptorProtos() []*descriptorpb.FileDescriptorProto { + var fdpList []*descriptorpb.FileDescriptorProto + for _, d := range dm { + if fd := d.ParentFile(); fd != nil { + fdp := protodesc.ToFileDescriptorProto(fd) + fdpList = append(fdpList, fdp) + } + } + return fdpList +} + +func (dm dependencyCache) add(schema *storagepb.TableSchema, descriptor protoreflect.MessageDescriptor) error { if dm == nil { return fmt.Errorf("cache is nil") } @@ -132,8 +164,8 @@ func StorageSchemaToProto3Descriptor(inSchema *storagepb.TableSchema, scope stri return storageSchemaToDescriptorInternal(inSchema, scope, &dc, true) } -// internal implementation of the conversion code. -func storageSchemaToDescriptorInternal(inSchema *storagepb.TableSchema, scope string, cache *dependencyCache, useProto3 bool) (protoreflect.Descriptor, error) { +// Internal implementation of the conversion code. +func storageSchemaToDescriptorInternal(inSchema *storagepb.TableSchema, scope string, cache *dependencyCache, useProto3 bool) (protoreflect.MessageDescriptor, error) { if inSchema == nil { return nil, newConversionError(scope, fmt.Errorf("no input schema was provided")) } @@ -159,11 +191,11 @@ func storageSchemaToDescriptorInternal(inSchema *storagepb.TableSchema, scope st break } } - // if dep is missing, add to current dependencies + // If dep is missing, add to current dependencies. if !haveDep { deps = append(deps, foundDesc.ParentFile()) } - // construct field descriptor for the message + // Construct field descriptor for the message. fdp, err := tableFieldSchemaToFieldDescriptorProto(f, fNumber, string(foundDesc.FullName()), useProto3) if err != nil { return nil, newConversionError(scope, fmt.Errorf("couldn't convert field to FieldDescriptorProto: %w", err)) @@ -206,9 +238,7 @@ func storageSchemaToDescriptorInternal(inSchema *storagepb.TableSchema, scope st } // Use the local dependencies to generate a list of filenames. - depNames := []string{ - wellKnownTypesWrapperName, - } + depNames := []string{wellKnownTypesWrapperName} for _, d := range deps { depNames = append(depNames, d.ParentFile().Path()) } @@ -226,14 +256,15 @@ func storageSchemaToDescriptorInternal(inSchema *storagepb.TableSchema, scope st // We'll need a FileDescriptorSet as we have a FileDescriptorProto for the current // descriptor we're building, but we need to include all the referenced dependencies. - fds := &descriptorpb.FileDescriptorSet{ - File: []*descriptorpb.FileDescriptorProto{ - fdp, - protodesc.ToFileDescriptorProto(wrapperspb.File_google_protobuf_wrappers_proto), - }, + + fdpList := []*descriptorpb.FileDescriptorProto{ + fdp, + protodesc.ToFileDescriptorProto(wrapperspb.File_google_protobuf_wrappers_proto), } - for _, d := range deps { - fds.File = append(fds.File, protodesc.ToFileDescriptorProto(d)) + fdpList = append(fdpList, cache.getFileDescriptorProtos()...) + + fds := &descriptorpb.FileDescriptorSet{ + File: fdpList, } // Load the set into a registry, then interrogate it for the descriptor corresponding to the top level message. @@ -241,7 +272,11 @@ func storageSchemaToDescriptorInternal(inSchema *storagepb.TableSchema, scope st if err != nil { return nil, err } - return files.FindDescriptorByName(protoreflect.FullName(scope)) + found, err := files.FindDescriptorByName(protoreflect.FullName(scope)) + if err != nil { + return nil, err + } + return found.(protoreflect.MessageDescriptor), nil } // tableFieldSchemaToFieldDescriptorProto builds individual field descriptors for a proto message. @@ -263,12 +298,25 @@ func tableFieldSchemaToFieldDescriptorProto(field *storagepb.TableFieldSchema, i // For (REQUIRED||REPEATED) fields for proto3, or all cases for proto2, we can use the expected scalar types. if field.GetMode() != storagepb.TableFieldSchema_NULLABLE || !useProto3 { - return &descriptorpb.FieldDescriptorProto{ + outType := bqTypeToFieldTypeMap[field.GetType()] + fdp := &descriptorpb.FieldDescriptorProto{ Name: proto.String(name), Number: proto.Int32(idx), - Type: bqTypeToFieldTypeMap[field.GetType()].Enum(), + Type: outType.Enum(), Label: convertModeToLabel(field.GetMode(), useProto3), - }, nil + } + // Special case: proto2 repeated fields may benefit from using packed annotation. + if field.GetMode() == storagepb.TableFieldSchema_REPEATED && !useProto3 { + for _, v := range packedTypes { + if outType == v { + fdp.Options = &descriptorpb.FieldOptions{ + Packed: proto.Bool(true), + } + break + } + } + } + return fdp, nil } // For NULLABLE proto3 fields, use a wrapper type. return &descriptorpb.FieldDescriptorProto{ @@ -431,7 +479,7 @@ func normalizeName(in string) string { return strings.Replace(in, ".", "_", -1) } -// these types don't get normalized into the fully-contained structure. +// These types don't get normalized into the fully-contained structure. var normalizationSkipList = []string{ /* TODO: when backend supports resolving well known types, this list should be enabled. diff --git a/bigquery/storage/managedwriter/adapt/protoconversion_test.go b/bigquery/storage/managedwriter/adapt/protoconversion_test.go index 6737fa62e52a..8444b6f0d38d 100644 --- a/bigquery/storage/managedwriter/adapt/protoconversion_test.go +++ b/bigquery/storage/managedwriter/adapt/protoconversion_test.go @@ -31,12 +31,28 @@ import ( "google.golang.org/protobuf/types/dynamicpb" ) +// TestSchemaToProtoConversion validates behavior around converting table schemas to +// a descriptor. The challenges here are that we use dynamic proto registries to +// do this work, which means that we're unable to do things like proto.Equal comparisons +// between MessageDescriptors directly. +// +// Instead, we compare to two forms of the message in DescriptorProto form: In the first, +// we ensure the structure of the outer message is as expected. In the second, we compare +// to the normalized form of the DescriptorProto as that encapsulates all the dependencies +// within the NestedTypes definition. func TestSchemaToProtoConversion(t *testing.T) { testCases := []struct { description string bq *storagepb.TableSchema - wantProto2 *descriptorpb.DescriptorProto - wantProto3 *descriptorpb.DescriptorProto + // The un-normalized descriptor (sans dependencies) + wantProto2 *descriptorpb.DescriptorProto + // Normalized descriptor (all dependencies nested) + wantProto2Normalized *descriptorpb.DescriptorProto + + // The un-normalized descriptor (sans dependencies) + wantProto3 *descriptorpb.DescriptorProto + // Normalized descriptor + wantProto3Normalized *descriptorpb.DescriptorProto }{ { description: "basic", @@ -58,6 +74,18 @@ func TestSchemaToProtoConversion(t *testing.T) { {Name: proto.String("baz"), Number: proto.Int32(3), Type: descriptorpb.FieldDescriptorProto_TYPE_BYTES.Enum(), Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum()}, }, }, + wantProto2Normalized: &descriptorpb.DescriptorProto{ + Name: proto.String("root"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("foo"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum()}, + {Name: proto.String("bar"), Number: proto.Int32(2), Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum()}, + {Name: proto.String("baz"), Number: proto.Int32(3), Type: descriptorpb.FieldDescriptorProto_TYPE_BYTES.Enum(), Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum()}, + }, + }, wantProto3: &descriptorpb.DescriptorProto{ Name: proto.String("root"), Field: []*descriptorpb.FieldDescriptorProto{ @@ -107,6 +135,43 @@ func TestSchemaToProtoConversion(t *testing.T) { }, }, }, + wantProto2Normalized: &descriptorpb.DescriptorProto{ + Name: proto.String("root"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("curdate"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("rec"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String("root__rec"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + NestedType: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("root__rec"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("userid"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + }, + { + Name: proto.String("location"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + }, + }, + }, wantProto3: &descriptorpb.DescriptorProto{ Name: proto.String("root"), Field: []*descriptorpb.FieldDescriptorProto{ @@ -205,37 +270,206 @@ func TestSchemaToProtoConversion(t *testing.T) { }, }, }, + { + description: "multiple nesting levels", + bq: &storagepb.TableSchema{ + Fields: []*storagepb.TableFieldSchema{ + { + Name: "outer_struct", + Type: storagepb.TableFieldSchema_STRUCT, + Mode: storagepb.TableFieldSchema_NULLABLE, + Fields: []*storagepb.TableFieldSchema{ + { + Name: "inner_struct", + Type: storagepb.TableFieldSchema_STRUCT, + Mode: storagepb.TableFieldSchema_NULLABLE, + Fields: []*storagepb.TableFieldSchema{ + {Name: "leaf_one", Type: storagepb.TableFieldSchema_INT64, Mode: storagepb.TableFieldSchema_NULLABLE}, + {Name: "leaf_two", Type: storagepb.TableFieldSchema_INT64, Mode: storagepb.TableFieldSchema_NULLABLE}, + }, + }, + }, + }, + { + Name: "other_field", + Type: storagepb.TableFieldSchema_INT64, + Mode: storagepb.TableFieldSchema_NULLABLE, + }, + }, + }, + wantProto2: &descriptorpb.DescriptorProto{ + Name: proto.String("root"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("outer_struct"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".root__outer_struct"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("other_field"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + }, + wantProto2Normalized: &descriptorpb.DescriptorProto{ + Name: proto.String("root"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("outer_struct"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String("root__outer_struct"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("other_field"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + NestedType: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("root__outer_struct__inner_struct"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("leaf_one"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("leaf_two"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + }, + { + Name: proto.String("root__outer_struct"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("inner_struct"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String("root__outer_struct__inner_struct"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + }, + }, + }, + wantProto3: &descriptorpb.DescriptorProto{ + Name: proto.String("root"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("outer_struct"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".root__outer_struct"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("other_field"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".google.protobuf.Int64Value"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + }, + }, + { + description: "repeated w/packed", + bq: &storagepb.TableSchema{ + Fields: []*storagepb.TableFieldSchema{ + {Name: "name", Type: storagepb.TableFieldSchema_STRING, Mode: storagepb.TableFieldSchema_NULLABLE}, + {Name: "some_lengths", Type: storagepb.TableFieldSchema_INT64, Mode: storagepb.TableFieldSchema_REPEATED}, + {Name: "nicknames", Type: storagepb.TableFieldSchema_STRING, Mode: storagepb.TableFieldSchema_REPEATED}, + }}, + wantProto2: &descriptorpb.DescriptorProto{ + Name: proto.String("root"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("name"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum()}, + { + Name: proto.String("some_lengths"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Options: &descriptorpb.FieldOptions{ + Packed: proto.Bool(true), + }, + }, + {Name: proto.String("nicknames"), Number: proto.Int32(3), Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum()}, + }, + }, + }, } for _, tc := range testCases { + // Proto2 p2d, err := StorageSchemaToProto2Descriptor(tc.bq, "root") if err != nil { - t.Errorf("case (%s) failed proto2 conversion: %v", tc.description, err) + t.Fatalf("case (%s) failed proto2 conversion: %v", tc.description, err) } - // convert it to DP form + // Convert to MessageDescriptor. mDesc, ok := p2d.(protoreflect.MessageDescriptor) if !ok { t.Errorf("%s: couldn't convert proto2 to messagedescriptor", tc.description) } - gotDP := protodesc.ToDescriptorProto(mDesc) - if diff := cmp.Diff(gotDP, tc.wantProto2, protocmp.Transform()); diff != "" { - t.Errorf("%s proto2: -got, +want:\n%s", tc.description, diff) + // Check the non-normalized case. + if tc.wantProto2 != nil { + gotDP := protodesc.ToDescriptorProto(mDesc) + if diff := cmp.Diff(gotDP, tc.wantProto2, protocmp.Transform()); diff != "" { + t.Errorf("%s proto2: -got, +want:\n%s", tc.description, diff) + } + } + // Check the normalized case. + if tc.wantProto2Normalized != nil { + gotDP, err := NormalizeDescriptor(mDesc) + if err != nil { + t.Errorf("failed to normalize: %v", err) + } + if diff := cmp.Diff(gotDP, tc.wantProto2Normalized, protocmp.Transform()); diff != "" { + t.Errorf("%s proto2normalized: -got, +want:\n%s", tc.description, diff) + } } p3d, err := StorageSchemaToProto3Descriptor(tc.bq, "root") if err != nil { t.Fatalf("case (%s) failed proto3 conversion: %v", tc.description, err) } - + // Convert to MessageDescriptor. mDesc, ok = p3d.(protoreflect.MessageDescriptor) if !ok { t.Errorf("%s: couldn't convert proto3 to messagedescriptor", tc.description) } - gotDP = protodesc.ToDescriptorProto(mDesc) - if diff := cmp.Diff(gotDP, tc.wantProto3, protocmp.Transform()); diff != "" { - t.Errorf("%s proto3: -got, +want:\n%s", tc.description, diff) + // Check the non-normalized case. + if tc.wantProto3 != nil { + gotDP := protodesc.ToDescriptorProto(mDesc) + if diff := cmp.Diff(gotDP, tc.wantProto3, protocmp.Transform()); diff != "" { + t.Errorf("%s proto2: -got, +want:\n%s", tc.description, diff) + } + } + // Check the normalized case. + if tc.wantProto3Normalized != nil { + gotDP, err := NormalizeDescriptor(mDesc) + if err != nil { + t.Errorf("failed to normalize: %v", err) + } + if diff := cmp.Diff(gotDP, tc.wantProto3Normalized, protocmp.Transform()); diff != "" { + t.Errorf("%s proto3normalized: -got, +want:\n%s", tc.description, diff) + } } - } } @@ -879,6 +1113,136 @@ func TestNormalizeDescriptor(t *testing.T) { }, }, }, + { + description: "ValidationP3PackedRepeated", + in: (&testdata.ValidationP3PackedRepeated{}).ProtoReflect().Descriptor(), + want: &descriptorpb.DescriptorProto{ + Name: proto.String("testdata_ValidationP3PackedRepeated"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("id"), + JsonName: proto.String("id"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("double_repeated"), + JsonName: proto.String("doubleRepeated"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("float_repeated"), + JsonName: proto.String("floatRepeated"), + Number: proto.Int32(3), + Type: descriptorpb.FieldDescriptorProto_TYPE_FLOAT.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("int32_repeated"), + JsonName: proto.String("int32Repeated"), + Number: proto.Int32(4), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("int64_repeated"), + JsonName: proto.String("int64Repeated"), + Number: proto.Int32(5), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("uint32_repeated"), + JsonName: proto.String("uint32Repeated"), + Number: proto.Int32(6), + Type: descriptorpb.FieldDescriptorProto_TYPE_UINT32.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("sint32_repeated"), + JsonName: proto.String("sint32Repeated"), + Number: proto.Int32(7), + Type: descriptorpb.FieldDescriptorProto_TYPE_SINT32.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("sint64_repeated"), + JsonName: proto.String("sint64Repeated"), + Number: proto.Int32(8), + Type: descriptorpb.FieldDescriptorProto_TYPE_SINT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("fixed32_repeated"), + JsonName: proto.String("fixed32Repeated"), + Number: proto.Int32(9), + Type: descriptorpb.FieldDescriptorProto_TYPE_FIXED32.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("sfixed32_repeated"), + JsonName: proto.String("sfixed32Repeated"), + Number: proto.Int32(10), + Type: descriptorpb.FieldDescriptorProto_TYPE_SFIXED32.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("sfixed64_repeated"), + JsonName: proto.String("sfixed64Repeated"), + Number: proto.Int32(11), + Type: descriptorpb.FieldDescriptorProto_TYPE_SFIXED64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + + { + Name: proto.String("bool_repeated"), + JsonName: proto.String("boolRepeated"), + Number: proto.Int32(12), + Type: descriptorpb.FieldDescriptorProto_TYPE_BOOL.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + { + Name: proto.String("enum_repeated"), + JsonName: proto.String("enumRepeated"), + Number: proto.Int32(13), + Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), + TypeName: proto.String("testdata_Proto3ExampleEnum_E.Proto3ExampleEnum"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + }, + NestedType: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("testdata_Proto3ExampleEnum_E"), + EnumType: []*descriptorpb.EnumDescriptorProto{ + { + Name: proto.String("Proto3ExampleEnum"), + Value: []*descriptorpb.EnumValueDescriptorProto{ + { + Name: proto.String("P3_UNDEFINED"), + Number: proto.Int32(0), + }, + { + Name: proto.String("P3_THING"), + Number: proto.Int32(1), + }, + { + Name: proto.String("P3_OTHER_THING"), + Number: proto.Int32(2), + }, + { + Name: proto.String("P3_THIRD_THING"), + Number: proto.Int32(3), + }, + }, + }, + }, + }, + }, + }, + }, } for _, tc := range testCases { diff --git a/bigquery/storage/managedwriter/appendresult.go b/bigquery/storage/managedwriter/appendresult.go index 4711c6e6f720..bbbda9982daa 100644 --- a/bigquery/storage/managedwriter/appendresult.go +++ b/bigquery/storage/managedwriter/appendresult.go @@ -18,7 +18,9 @@ import ( "context" "fmt" + "github.com/googleapis/gax-go/v2/apierror" storagepb "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" + grpcstatus "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/descriptorpb" ) @@ -34,14 +36,11 @@ type AppendResult struct { ready chan struct{} - // if the encapsulating append failed, this will retain a reference to the error. + // if the append failed without a response, this will retain a reference to the error. err error - // the stream offset - offset int64 - - // retains the updated schema from backend response. Used for schema change notification. - updatedSchema *storagepb.TableSchema + // retains the original response. + response *storagepb.AppendRowsResponse } func newAppendResult(data [][]byte) *AppendResult { @@ -55,25 +54,95 @@ func newAppendResult(data [][]byte) *AppendResult { // which may be a successful append or an error. func (ar *AppendResult) Ready() <-chan struct{} { return ar.ready } -// GetResult returns the optional offset of this row, or the associated -// error. It blocks until the result is ready. +// GetResult returns the optional offset of this row, as well as any error encountered while +// processing the append. +// +// This call blocks until the result is ready, or context is no longer valid. func (ar *AppendResult) GetResult(ctx context.Context) (int64, error) { select { case <-ctx.Done(): - return 0, ctx.Err() + return NoStreamOffset, ctx.Err() case <-ar.Ready(): - return ar.offset, ar.err + full, err := ar.FullResponse(ctx) + offset := NoStreamOffset + if full != nil { + if result := full.GetAppendResult(); result != nil { + if off := result.GetOffset(); off != nil { + offset = off.GetValue() + } + } + } + return offset, err + } +} + +// FullResponse returns the full content of the AppendRowsResponse, and any error encountered while +// processing the append. +// +// The AppendRowResponse may contain an embedded error. An embedded error in the response will be +// converted and returned as the error response, so this method may return both the +// AppendRowsResponse and an error. +// +// This call blocks until the result is ready, or context is no longer valid. +func (ar *AppendResult) FullResponse(ctx context.Context) (*storagepb.AppendRowsResponse, error) { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-ar.Ready(): + var err error + if ar.err != nil { + err = ar.err + } else { + if ar.response != nil { + if status := ar.response.GetError(); status != nil { + statusErr := grpcstatus.ErrorProto(status) + // Provide an APIError if possible. + if apiErr, ok := apierror.FromError(statusErr); ok { + err = apiErr + } else { + err = statusErr + } + } + } + } + if ar.response != nil { + return proto.Clone(ar.response).(*storagepb.AppendRowsResponse), err + } + return nil, err + } +} + +func (ar *AppendResult) offset(ctx context.Context) int64 { + select { + case <-ctx.Done(): + return NoStreamOffset + case <-ar.Ready(): + if ar.response != nil { + if result := ar.response.GetAppendResult(); result != nil { + if off := result.GetOffset(); off != nil { + return off.GetValue() + } + } + } + return NoStreamOffset } } // UpdatedSchema returns the updated schema for a table if supplied by the backend as part -// of the append response. It blocks until the result is ready. +// of the append response. +// +// This call blocks until the result is ready, or context is no longer valid. func (ar *AppendResult) UpdatedSchema(ctx context.Context) (*storagepb.TableSchema, error) { select { case <-ctx.Done(): return nil, fmt.Errorf("context done") case <-ar.Ready(): - return ar.updatedSchema, nil + if ar.response != nil { + if schema := ar.response.GetUpdatedSchema(); schema != nil { + return proto.Clone(schema).(*storagepb.TableSchema), nil + } + } + return nil, nil } } @@ -87,14 +156,20 @@ type pendingWrite struct { // this is used by the flow controller. reqSize int + + // retains the original request context, primarily for checking against + // cancellation signals. + reqCtx context.Context + + // tracks the number of times we've attempted this append request. + attemptCount int } // newPendingWrite constructs the proto request and attaches references -// to the pending results for later consumption. The reason for this is -// that in the future, we may want to allow row batching to be managed by -// the server (e.g. for default/COMMITTED streams). For BUFFERED/PENDING -// streams, this should be managed by the user. -func newPendingWrite(appends [][]byte) *pendingWrite { +// to the pending results for later consumption. The provided context is +// embedded in the pending write, as the write may be retried and we want +// to respect the original context for expiry/cancellation etc. +func newPendingWrite(ctx context.Context, appends [][]byte) *pendingWrite { pw := &pendingWrite{ request: &storagepb.AppendRowsRequest{ Rows: &storagepb.AppendRowsRequest_ProtoRows{ @@ -105,7 +180,9 @@ func newPendingWrite(appends [][]byte) *pendingWrite { }, }, }, - result: newAppendResult(appends), + result: newAppendResult(appends), + attemptCount: 1, + reqCtx: ctx, } // We compute the size now for flow controller purposes, though // the actual request size may be slightly larger (e.g. the first @@ -116,9 +193,12 @@ func newPendingWrite(appends [][]byte) *pendingWrite { // markDone propagates finalization of an append request to the associated // AppendResult. -func (pw *pendingWrite) markDone(startOffset int64, err error, fc *flowController) { +func (pw *pendingWrite) markDone(resp *storagepb.AppendRowsResponse, err error, fc *flowController) { + if resp != nil { + pw.result.response = resp + } pw.result.err = err - pw.result.offset = startOffset + close(pw.result.ready) // Clear the reference to the request. pw.request = nil diff --git a/bigquery/storage/managedwriter/appendresult_test.go b/bigquery/storage/managedwriter/appendresult_test.go index d760f5b8e974..8a620822c994 100644 --- a/bigquery/storage/managedwriter/appendresult_test.go +++ b/bigquery/storage/managedwriter/appendresult_test.go @@ -16,9 +16,16 @@ package managedwriter import ( "bytes" + "context" "fmt" "testing" "time" + + "github.com/google/go-cmp/cmp" + "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" + storagepb "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" + "google.golang.org/protobuf/testing/protocmp" + "google.golang.org/protobuf/types/known/wrapperspb" ) func TestAppendResult(t *testing.T) { @@ -37,6 +44,7 @@ func TestAppendResult(t *testing.T) { } func TestPendingWrite(t *testing.T) { + ctx := context.Background() wantRowData := [][]byte{ []byte("row1"), []byte("row2"), @@ -44,7 +52,7 @@ func TestPendingWrite(t *testing.T) { } // verify no offset behavior - pending := newPendingWrite(wantRowData) + pending := newPendingWrite(ctx, wantRowData) if pending.request.GetOffset() != nil { t.Errorf("request should have no offset, but is present: %q", pending.request.GetOffset().GetValue()) } @@ -63,9 +71,9 @@ func TestPendingWrite(t *testing.T) { } // Mark completed, verify result. - pending.markDone(NoStreamOffset, nil, nil) - if pending.result.offset != NoStreamOffset { - t.Errorf("mismatch on completed AppendResult without offset: got %d want %d", pending.result.offset, NoStreamOffset) + pending.markDone(&storage.AppendRowsResponse{}, nil, nil) + if gotOff := pending.result.offset(ctx); gotOff != NoStreamOffset { + t.Errorf("mismatch on completed AppendResult without offset: got %d want %d", gotOff, NoStreamOffset) } if pending.result.err != nil { t.Errorf("mismatch in error on AppendResult, got %v want nil", pending.result.err) @@ -81,24 +89,34 @@ func TestPendingWrite(t *testing.T) { } // Create new write to verify error result. - pending = newPendingWrite(wantRowData) + pending = newPendingWrite(ctx, wantRowData) // Manually invoke option to apply offset to request. // This would normally be appied as part of the AppendRows() method on the managed stream. - reportedOffset := int64(101) - f := WithOffset(reportedOffset) + wantOffset := int64(101) + f := WithOffset(wantOffset) f(pending) if pending.request.GetOffset() == nil { t.Errorf("expected offset, got none") } - if pending.request.GetOffset().GetValue() != reportedOffset { - t.Errorf("offset mismatch, got %d wanted %d", pending.request.GetOffset().GetValue(), reportedOffset) + if pending.request.GetOffset().GetValue() != wantOffset { + t.Errorf("offset mismatch, got %d wanted %d", pending.request.GetOffset().GetValue(), wantOffset) } // Verify completion behavior with an error. wantErr := fmt.Errorf("foo") - pending.markDone(reportedOffset, wantErr, nil) + + testResp := &storagepb.AppendRowsResponse{ + Response: &storagepb.AppendRowsResponse_AppendResult_{ + AppendResult: &storagepb.AppendRowsResponse_AppendResult{ + Offset: &wrapperspb.Int64Value{ + Value: wantOffset, + }, + }, + }, + } + pending.markDone(testResp, wantErr, nil) if pending.request != nil { t.Errorf("expected request to be cleared, is present: %#v", pending.request) @@ -118,12 +136,20 @@ func TestPendingWrite(t *testing.T) { case <-time.After(100 * time.Millisecond): t.Errorf("possible blocking on completed AppendResult") case <-pending.result.Ready(): - if pending.result.offset != reportedOffset { - t.Errorf("mismatch on completed AppendResult offset: got %d want %d", pending.result.offset, reportedOffset) + gotOffset, gotErr := pending.result.GetResult(ctx) + if gotOffset != wantOffset { + t.Errorf("GetResult: mismatch on completed AppendResult offset: got %d want %d", gotOffset, wantOffset) } - if pending.result.err != wantErr { - t.Errorf("mismatch in errors, got %v want %v", pending.result.err, wantErr) + if gotErr != wantErr { + t.Errorf("GetResult: mismatch in errors, got %v want %v", gotErr, wantErr) + } + // Now, check FullResponse. + gotResp, gotErr := pending.result.FullResponse(ctx) + if gotErr != wantErr { + t.Errorf("FullResponse: mismatch in errors, got %v want %v", gotErr, wantErr) + } + if diff := cmp.Diff(gotResp, testResp, protocmp.Transform()); diff != "" { + t.Errorf("FullResponse diff: %s", diff) } } - } diff --git a/bigquery/storage/managedwriter/client.go b/bigquery/storage/managedwriter/client.go index f517a555ce42..bc94e3182df3 100644 --- a/bigquery/storage/managedwriter/client.go +++ b/bigquery/storage/managedwriter/client.go @@ -20,6 +20,7 @@ import ( "runtime" "strings" + "cloud.google.com/go/bigquery/internal" storage "cloud.google.com/go/bigquery/storage/apiv1" "cloud.google.com/go/internal/detect" "github.com/googleapis/gax-go/v2" @@ -59,6 +60,7 @@ func NewClient(ctx context.Context, projectID string, opts ...option.ClientOptio if err != nil { return nil, err } + rawClient.SetGoogleClientInfo("gccl", internal.Version) // Handle project autodetection. projectID, err = detect.ProjectID(ctx, projectID, "", opts...) @@ -90,6 +92,19 @@ func (c *Client) NewManagedStream(ctx context.Context, opts ...WriterOption) (*M return c.buildManagedStream(ctx, c.rawClient.AppendRows, false, opts...) } +// createOpenF builds the opener function we need to access the AppendRows bidi stream. +func createOpenF(ctx context.Context, streamFunc streamClientFunc) func(streamID string, opts ...gax.CallOption) (storagepb.BigQueryWrite_AppendRowsClient, error) { + return func(streamID string, opts ...gax.CallOption) (storagepb.BigQueryWrite_AppendRowsClient, error) { + arc, err := streamFunc( + // Bidi Streaming doesn't append stream ID as request metadata, so we must inject it manually. + metadata.AppendToOutgoingContext(ctx, "x-goog-request-params", fmt.Sprintf("write_stream=%s", streamID)), opts...) + if err != nil { + return nil, err + } + return arc, nil + } +} + func (c *Client) buildManagedStream(ctx context.Context, streamFunc streamClientFunc, skipSetup bool, opts ...WriterOption) (*ManagedStream, error) { ctx, cancel := context.WithCancel(ctx) @@ -101,15 +116,7 @@ func (c *Client) buildManagedStream(ctx context.Context, streamFunc streamClient callOptions: []gax.CallOption{ gax.WithGRPCOptions(grpc.MaxCallRecvMsgSize(10 * 1024 * 1024)), }, - open: func(streamID string, opts ...gax.CallOption) (storagepb.BigQueryWrite_AppendRowsClient, error) { - arc, err := streamFunc( - // Bidi Streaming doesn't append stream ID as request metadata, so we must inject it manually. - metadata.AppendToOutgoingContext(ctx, "x-goog-request-params", fmt.Sprintf("write_stream=%s", streamID))) - if err != nil { - return nil, err - } - return arc, nil - }, + open: createOpenF(ctx, streamFunc), } // apply writer options diff --git a/bigquery/storage/managedwriter/client_test.go b/bigquery/storage/managedwriter/client_test.go index 2183f4c6c794..a197c52fb6d0 100644 --- a/bigquery/storage/managedwriter/client_test.go +++ b/bigquery/storage/managedwriter/client_test.go @@ -14,7 +14,9 @@ package managedwriter -import "testing" +import ( + "testing" +) func TestTableParentFromStreamName(t *testing.T) { testCases := []struct { diff --git a/bigquery/storage/managedwriter/doc.go b/bigquery/storage/managedwriter/doc.go index 3754c4c694d9..a81ff5df079a 100644 --- a/bigquery/storage/managedwriter/doc.go +++ b/bigquery/storage/managedwriter/doc.go @@ -24,8 +24,7 @@ feature-rich successor to the classic BigQuery streaming interface, which is pre in cloud.google.com/go/bigquery, and the tabledata.insertAll method if you're more familiar with the BigQuery v2 REST methods. - -Creating a Client +# Creating a Client To start working with this package, create a client: @@ -35,8 +34,7 @@ To start working with this package, create a client: // TODO: Handle error. } - -Defining the Protocol Buffer Schema +# Defining the Protocol Buffer Schema The write functionality of BigQuery Storage requires data to be sent using encoded protocol buffer messages using proto2 wire format. As the protocol buffer is not @@ -70,7 +68,7 @@ contains functionality to normalize the descriptor into a self-contained definit The adapt subpackage also contains functionality for generating a DescriptorProto using a BigQuery table's schema directly. -Constructing a ManagedStream +# Constructing a ManagedStream The ManagedStream handles management of the underlying write connection to the BigQuery Storage service. You can either create a write session explicitly and pass it in, or @@ -102,7 +100,7 @@ In addition, NewManagedStream can create new streams implicitly: // TODO: Handle error. } -Writing Data +# Writing Data Use the AppendRows function to write one or more serialized proto messages to a stream. You can choose to specify an offset in the stream to handle de-duplication for user-created streams, @@ -111,42 +109,40 @@ but a "default" stream neither accepts nor reports offsets. AppendRows returns a future-like object that blocks until the write is successful or yields an error. + // Define a couple of messages. + mesgs := []*myprotopackage.MyCompiledMessage{ + { + UserName: proto.String("johndoe"), + EmailAddress: proto.String("jd@mycompany.mydomain", + FavoriteNumbers: []proto.Int64{1,42,12345}, + }, + { + UserName: proto.String("janesmith"), + EmailAddress: proto.String("smith@othercompany.otherdomain", + FavoriteNumbers: []proto.Int64{1,3,5,7,9}, + }, + } - // Define a couple of messages. - mesgs := []*myprotopackage.MyCompiledMessage{ - { - UserName: proto.String("johndoe"), - EmailAddress: proto.String("jd@mycompany.mydomain", - FavoriteNumbers: []proto.Int64{1,42,12345}, - }, - { - UserName: proto.String("janesmith"), - EmailAddress: proto.String("smith@othercompany.otherdomain", - FavoriteNumbers: []proto.Int64{1,3,5,7,9}, - }, - } - - // Encode the messages into binary format. - encoded := make([][]byte, len(mesgs)) - for k, v := range mesgs{ - b, err := proto.Marshal(v) + // Encode the messages into binary format. + encoded := make([][]byte, len(mesgs)) + for k, v := range mesgs{ + b, err := proto.Marshal(v) + if err != nil { + // TODO: Handle error. + } + encoded[k] = b + } + + // Send the rows to the service, and specify an offset for managing deduplication. + result, err := managedStream.AppendRows(ctx, encoded, WithOffset(0)) + + // Block until the write is complete and return the result. + returnedOffset, err := result.GetResult(ctx) if err != nil { // TODO: Handle error. } - encoded[k] = b - } - - // Send the rows to the service, and specify an offset for managing deduplication. - result, err := managedStream.AppendRows(ctx, encoded, WithOffset(0)) - - // Block until the write is complete and return the result. - returnedOffset, err := result.GetResult(ctx) - if err != nil { - // TODO: Handle error. - } - -Buffered Stream Management +# Buffered Stream Management For Buffered streams, users control when data is made visible in the destination table/stream independently of when it is written. Use FlushRows on the ManagedStream to advance the flush @@ -156,12 +152,11 @@ point ahead in the stream. // ahead to make the first 1000 rows available. flushOffset, err := managedStream.FlushRows(ctx, 1000) -Pending Stream Management +# Pending Stream Management Pending streams allow users to commit data from multiple streams together once the streams have been finalized, meaning they'll no longer allow further data writes. - // First, finalize the stream we're writing into. totalRows, err := managedStream.Finalize(ctx) if err != nil { @@ -176,5 +171,33 @@ have been finalized, meaning they'll no longer allow further data writes. // table atomically. resp, err := client.BatchCommitWriteStreams(ctx, req) +# Error Handling + +Like other Google Cloud services, this API relies on common components that can provide an +enhanced set of errors when communicating about the results of API interactions. + +Specifically, the apierror package (https://pkg.go.dev/github.com/googleapis/gax-go/v2/apierror) +provides convenience methods for extracting structured information about errors. + +The BigQuery Storage API service augments applicable errors with service-specific details in +the form of a StorageError message. The StorageError message is accessed via the ExtractProtoMessage +method in the apierror package. Note that the StorageError messsage does not implement Go's error +interface. + +An example of accessing the structured error details: + + // By way of example, let's assume the response from an append call returns an error. + _, err := result.GetResult(ctx) + if err != nil { + if apiErr, ok := apierror.FromError(err); ok { + // We now have an instance of APIError, which directly exposes more specific + // details about multiple failure conditions include transport-level errors. + storageErr := &storagepb.StorageError{} + if e := apiErr.Details().ExtractProtoMessage(storageErr); e != nil { + // storageErr now contains service-specific information about the error. + log.Printf("Received service-specific error code %s", storageErr.GetCode().String()) + } + } + } */ package managedwriter diff --git a/bigquery/storage/managedwriter/integration_test.go b/bigquery/storage/managedwriter/integration_test.go index ad576d3e6468..9db77641d2f2 100644 --- a/bigquery/storage/managedwriter/integration_test.go +++ b/bigquery/storage/managedwriter/integration_test.go @@ -27,9 +27,11 @@ import ( "cloud.google.com/go/bigquery/storage/managedwriter/testdata" "cloud.google.com/go/internal/testutil" "cloud.google.com/go/internal/uid" + "github.com/googleapis/gax-go/v2/apierror" "go.opencensus.io/stats/view" "google.golang.org/api/option" storagepb "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" + "google.golang.org/grpc/codes" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" @@ -42,7 +44,7 @@ import ( var ( datasetIDs = uid.NewSpace("managedwriter_test_dataset", &uid.Options{Sep: '_', Time: time.Now()}) tableIDs = uid.NewSpace("table", &uid.Options{Sep: '_', Time: time.Now()}) - defaultTestTimeout = 30 * time.Second + defaultTestTimeout = 45 * time.Second ) // our test data has cardinality 5 for names, 3 for values @@ -137,6 +139,10 @@ func TestIntegration_ManagedWriter(t *testing.T) { t.Parallel() testCommittedStream(ctx, t, mwClient, bqClient, dataset) }) + t.Run("ErrorBehaviors", func(t *testing.T) { + t.Parallel() + testErrorBehaviors(ctx, t, mwClient, bqClient, dataset) + }) t.Run("BufferedStream", func(t *testing.T) { t.Parallel() testBufferedStream(ctx, t, mwClient, bqClient, dataset) @@ -153,6 +159,9 @@ func TestIntegration_ManagedWriter(t *testing.T) { // Don't run this in parallel, we only want to collect stats from this subtest. testInstrumentation(ctx, t, mwClient, bqClient, dataset) }) + t.Run("TestLargeInsert", func(t *testing.T) { + testLargeInsert(ctx, t, mwClient, bqClient, dataset) + }) }) } @@ -399,6 +408,124 @@ func testCommittedStream(ctx context.Context, t *testing.T, mwClient *Client, bq withExactRowCount(int64(len(testSimpleData)))) } +// testErrorBehaviors intentionally issues problematic requests to verify error behaviors. +func testErrorBehaviors(ctx context.Context, t *testing.T, mwClient *Client, bqClient *bigquery.Client, dataset *bigquery.Dataset) { + testTable := dataset.Table(tableIDs.New()) + if err := testTable.Create(ctx, &bigquery.TableMetadata{Schema: testdata.SimpleMessageSchema}); err != nil { + t.Fatalf("failed to create test table %s: %v", testTable.FullyQualifiedName(), err) + } + + m := &testdata.SimpleMessageProto2{} + descriptorProto := protodesc.ToDescriptorProto(m.ProtoReflect().Descriptor()) + + // setup a new stream. + ms, err := mwClient.NewManagedStream(ctx, + WithDestinationTable(TableParentFromParts(testTable.ProjectID, testTable.DatasetID, testTable.TableID)), + WithType(CommittedStream), + WithSchemaDescriptor(descriptorProto), + ) + if err != nil { + t.Fatalf("NewManagedStream: %v", err) + } + validateTableConstraints(ctx, t, bqClient, testTable, "before send", + withExactRowCount(0)) + + data := make([][]byte, len(testSimpleData)) + for k, mesg := range testSimpleData { + b, err := proto.Marshal(mesg) + if err != nil { + t.Errorf("failed to marshal message %d: %v", k, err) + } + data[k] = b + } + + // Send an append at an invalid offset. + result, err := ms.AppendRows(ctx, data, WithOffset(99)) + if err != nil { + t.Errorf("failed to send append: %v", err) + } + // + off, err := result.GetResult(ctx) + if err == nil { + t.Errorf("expected error, got offset %d", off) + } + + apiErr, ok := apierror.FromError(err) + if !ok { + t.Errorf("expected apierror, got %T: %v", err, err) + } + se := &storagepb.StorageError{} + e := apiErr.Details().ExtractProtoMessage(se) + if e != nil { + t.Errorf("expected storage error, but extraction failed: %v", e) + } + wantCode := storagepb.StorageError_OFFSET_OUT_OF_RANGE + if se.GetCode() != wantCode { + t.Errorf("wanted %s, got %s", wantCode.String(), se.GetCode().String()) + } + // Send "real" append to advance the offset. + result, err = ms.AppendRows(ctx, data, WithOffset(0)) + if err != nil { + t.Errorf("failed to send append: %v", err) + } + off, err = result.GetResult(ctx) + if err != nil { + t.Errorf("expected offset, got error %v", err) + } + wantOffset := int64(0) + if off != wantOffset { + t.Errorf("offset mismatch, got %d want %d", off, wantOffset) + } + // Now, send at the start offset again. + result, err = ms.AppendRows(ctx, data, WithOffset(0)) + if err != nil { + t.Errorf("failed to send append: %v", err) + } + off, err = result.GetResult(ctx) + if err == nil { + t.Errorf("expected error, got offset %d", off) + } + apiErr, ok = apierror.FromError(err) + if !ok { + t.Errorf("expected apierror, got %T: %v", err, err) + } + se = &storagepb.StorageError{} + e = apiErr.Details().ExtractProtoMessage(se) + if e != nil { + t.Errorf("expected storage error, but extraction failed: %v", e) + } + wantCode = storagepb.StorageError_OFFSET_ALREADY_EXISTS + if se.GetCode() != wantCode { + t.Errorf("wanted %s, got %s", wantCode.String(), se.GetCode().String()) + } + // Finalize the stream. + if _, err := ms.Finalize(ctx); err != nil { + t.Errorf("Finalize had error: %v", err) + } + // Send another append, which is disallowed for finalized streams. + result, err = ms.AppendRows(ctx, data) + if err != nil { + t.Errorf("failed to send append: %v", err) + } + off, err = result.GetResult(ctx) + if err == nil { + t.Errorf("expected error, got offset %d", off) + } + apiErr, ok = apierror.FromError(err) + if !ok { + t.Errorf("expected apierror, got %T: %v", err, err) + } + se = &storagepb.StorageError{} + e = apiErr.Details().ExtractProtoMessage(se) + if e != nil { + t.Errorf("expected storage error, but extraction failed: %v", e) + } + wantCode = storagepb.StorageError_STREAM_FINALIZED + if se.GetCode() != wantCode { + t.Errorf("wanted %s, got %s", wantCode.String(), se.GetCode().String()) + } +} + func testPendingStream(ctx context.Context, t *testing.T, mwClient *Client, bqClient *bigquery.Client, dataset *bigquery.Dataset) { testTable := dataset.Table(tableIDs.New()) if err := testTable.Create(ctx, &bigquery.TableMetadata{Schema: testdata.SimpleMessageSchema}); err != nil { @@ -469,6 +596,67 @@ func testPendingStream(ctx context.Context, t *testing.T, mwClient *Client, bqCl withExactRowCount(int64(len(testSimpleData)))) } +func testLargeInsert(ctx context.Context, t *testing.T, mwClient *Client, bqClient *bigquery.Client, dataset *bigquery.Dataset) { + testTable := dataset.Table(tableIDs.New()) + if err := testTable.Create(ctx, &bigquery.TableMetadata{Schema: testdata.SimpleMessageSchema}); err != nil { + t.Fatalf("failed to create test table %s: %v", testTable.FullyQualifiedName(), err) + } + + m := &testdata.SimpleMessageProto2{} + descriptorProto := protodesc.ToDescriptorProto(m.ProtoReflect().Descriptor()) + + ms, err := mwClient.NewManagedStream(ctx, + WithDestinationTable(TableParentFromParts(testTable.ProjectID, testTable.DatasetID, testTable.TableID)), + WithType(CommittedStream), + WithSchemaDescriptor(descriptorProto), + ) + if err != nil { + t.Fatalf("NewManagedStream: %v", err) + } + validateTableConstraints(ctx, t, bqClient, testTable, "before send", + withExactRowCount(0)) + + // Construct a Very Large request. + var data [][]byte + targetSize := 11 * 1024 * 1024 // 11 MB + b, err := proto.Marshal(testSimpleData[0]) + if err != nil { + t.Errorf("failed to marshal message: %v", err) + } + + numRows := targetSize / len(b) + data = make([][]byte, numRows) + + for i := 0; i < numRows; i++ { + data[i] = b + } + + result, err := ms.AppendRows(ctx, data, WithOffset(0)) + if err != nil { + t.Errorf("single append failed: %v", err) + } + _, err = result.GetResult(ctx) + if err != nil { + apiErr, ok := apierror.FromError(err) + if !ok { + t.Errorf("GetResult error was not an instance of ApiError") + } + status := apiErr.GRPCStatus() + if status.Code() != codes.InvalidArgument { + t.Errorf("expected InvalidArgument status, got %v", status) + } + } + // send a subsequent append as verification we can proceed. + result, err = ms.AppendRows(ctx, [][]byte{b}) + if err != nil { + t.Fatalf("subsequent append failed: %v", err) + } + _, err = result.GetResult(ctx) + if err != nil { + t.Errorf("failure result from second append: %v", err) + } +} + func testInstrumentation(ctx context.Context, t *testing.T, mwClient *Client, bqClient *bigquery.Client, dataset *bigquery.Dataset) { testedViews := []*view.View{ AppendRequestsView, @@ -517,12 +705,27 @@ func testInstrumentation(ctx context.Context, t *testing.T, mwClient *Client, bq time.Sleep(time.Second) for _, tv := range testedViews { - metricData, err := view.RetrieveData(tv.Name) + // Attempt to further improve race failures by retrying metrics retrieval. + metricData, err := func() ([]*view.Row, error) { + attempt := 0 + for { + data, err := view.RetrieveData(tv.Name) + attempt = attempt + 1 + if attempt > 5 { + return data, err + } + if err == nil && len(data) == 1 { + return data, err + } + time.Sleep(time.Duration(attempt) * 500 * time.Millisecond) + } + }() if err != nil { t.Errorf("view %q RetrieveData: %v", tv.Name, err) } - if len(metricData) > 1 { - t.Errorf("%q: only expected 1 row, got %d", tv.Name, len(metricData)) + if mlen := len(metricData); mlen != 1 { + t.Errorf("%q: expected 1 row of metrics, got %d", tv.Name, mlen) + continue } if len(metricData[0].Tags) != 1 { t.Errorf("%q: only expected 1 tag, got %d", tv.Name, len(metricData[0].Tags)) diff --git a/bigquery/storage/managedwriter/managed_stream.go b/bigquery/storage/managedwriter/managed_stream.go index 9a1f627a825d..4988280527fa 100644 --- a/bigquery/storage/managedwriter/managed_stream.go +++ b/bigquery/storage/managedwriter/managed_stream.go @@ -20,6 +20,7 @@ import ( "io" "sync" + "cloud.google.com/go/bigquery/internal" "github.com/googleapis/gax-go/v2" "go.opencensus.io/tag" storagepb "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" @@ -84,6 +85,7 @@ type ManagedStream struct { mu sync.Mutex arc *storagepb.BigQueryWrite_AppendRowsClient // current stream connection + reconnect bool // Request a reconnect before issuing another send. err error // terminal error pending chan *pendingWrite // writes awaiting status streamSetup *sync.Once // handles amending the first request in a new stream @@ -124,10 +126,18 @@ func defaultStreamSettings() *streamSettings { streamType: DefaultStream, MaxInflightRequests: 1000, MaxInflightBytes: 0, - TraceID: "", + TraceID: buildTraceID(""), } } +func buildTraceID(id string) string { + base := fmt.Sprintf("go-managedwriter:%s", internal.Version) + if id != "" { + return fmt.Sprintf("%s %s", base, id) + } + return base +} + // StreamName returns the corresponding write stream ID being managed by this writer. func (ms *ManagedStream) StreamName() string { return ms.streamSettings.streamID @@ -184,13 +194,21 @@ func (ms *ManagedStream) getStream(arc *storagepb.BigQueryWrite_AppendRowsClient return nil, nil, ms.err } + // Previous activity on the stream indicated it is not healthy, so propagate that as a reconnect. + if ms.reconnect { + forceReconnect = true + ms.reconnect = false + } // Always return the retained ARC if the arg differs. if arc != ms.arc && !forceReconnect { return ms.arc, ms.pending, nil } if arc != ms.arc && forceReconnect && ms.arc != nil { - // In this case, we're forcing a close to apply changes to the stream - // that currently can't be modified on an established connection. + // In this case, we're forcing a close on the existing stream. + // This is due to either needing to reconnect to satisfy the needs of + // the current request (e.g. to signal a schema change), or because + // a previous request on the stream yielded a transient error and we + // want to reconnect before issuing a subsequent request. // // TODO: clean this up once internal issue 205756033 is resolved. (*ms.arc).CloseSend() @@ -242,10 +260,93 @@ func (ms *ManagedStream) openWithRetry() (storagepb.BigQueryWrite_AppendRowsClie } } -// append handles the details of adding sending an append request on a stream. Appends are sent on a long +// lockingAppend handles a single append attempt. When successful, it returns the number of rows +// in the request for metrics tracking. +func (ms *ManagedStream) lockingAppend(pw *pendingWrite) error { + + // Don't both calling/retrying if this append's context is already expired. + if err := pw.reqCtx.Err(); err != nil { + return err + } + + // we use this to record stats if needed after we unlock on defer. + var statsOnExit func() + + // critical section: Things that need to happen inside the critical section: + // + // * Getting the stream connection (in case of reconnects) + // * Issuing the append request + // * Adding the pending write to the channel to keep ordering correct on response + ms.mu.Lock() + defer func() { + ms.mu.Unlock() + if statsOnExit != nil { + statsOnExit() + } + }() + + var arc *storagepb.BigQueryWrite_AppendRowsClient + var ch chan *pendingWrite + var err error + + // If an updated schema is present, we need to reconnect the stream and update the reference + // schema for the stream. + reconnect := false + if pw.newSchema != nil && !proto.Equal(pw.newSchema, ms.schemaDescriptor) { + reconnect = true + ms.schemaDescriptor = proto.Clone(pw.newSchema).(*descriptorpb.DescriptorProto) + } + arc, ch, err = ms.getStream(arc, reconnect) + if err != nil { + return err + } + + // Resolve the special work for the first append on a stream. + var req *storagepb.AppendRowsRequest + ms.streamSetup.Do(func() { + reqCopy := proto.Clone(pw.request).(*storagepb.AppendRowsRequest) + reqCopy.WriteStream = ms.streamSettings.streamID + reqCopy.GetProtoRows().WriterSchema = &storagepb.ProtoSchema{ + ProtoDescriptor: ms.schemaDescriptor, + } + if ms.streamSettings.TraceID != "" { + reqCopy.TraceId = ms.streamSettings.TraceID + } + req = reqCopy + }) + + if req != nil { + // First append in a new connection needs properties like schema and stream name set. + err = (*arc).Send(req) + } else { + // Subsequent requests need no modification. + err = (*arc).Send(pw.request) + } + if err != nil { + if shouldReconnect(err) { + ms.reconnect = true + } + return err + } + // Compute numRows, once we pass ownership to the channel the request may be + // cleared. + numRows := int64(len(pw.request.GetProtoRows().Rows.GetSerializedRows())) + statsOnExit = func() { + // these will get recorded once we exit the critical section. + recordStat(ms.ctx, AppendRequestRows, numRows) + recordStat(ms.ctx, AppendRequests, 1) + recordStat(ms.ctx, AppendRequestBytes, int64(pw.reqSize)) + } + ch <- pw + return nil +} + +// appendWithRetry handles the details of adding sending an append request on a stream. Appends are sent on a long // lived bidirectional network stream, with it's own managed context (ms.ctx). requestCtx is checked // for expiry to enable faster failures, it is not propagated more deeply. -func (ms *ManagedStream) append(requestCtx context.Context, pw *pendingWrite, opts ...gax.CallOption) error { +func (ms *ManagedStream) appendWithRetry(pw *pendingWrite, opts ...gax.CallOption) error { + + // Resolve retry settings. var settings gax.CallSettings for _, opt := range opts { opt.Resolve(&settings) @@ -255,104 +356,37 @@ func (ms *ManagedStream) append(requestCtx context.Context, pw *pendingWrite, op r = settings.Retry() } - var arc *storagepb.BigQueryWrite_AppendRowsClient - var ch chan *pendingWrite - var err error - for { - // critical section: Things that need to happen inside the critical section: - // - // * Getting the stream connection (in case of reconnects) - // * Issuing the append request - // * Adding the pending write to the channel to keep ordering correct on response - ms.mu.Lock() - - // Don't both calling/retrying if this append's context is already expired. - if err = requestCtx.Err(); err != nil { - return err - } - - // If an updated schema is present, we need to reconnect the stream and update the reference - // schema for the stream. - reconnect := false - if pw.newSchema != nil && !proto.Equal(pw.newSchema, ms.schemaDescriptor) { - reconnect = true - ms.schemaDescriptor = proto.Clone(pw.newSchema).(*descriptorpb.DescriptorProto) - } - arc, ch, err = ms.getStream(arc, reconnect) - if err != nil { - return err - } - - // Resolve the special work for the first append on a stream. - var req *storagepb.AppendRowsRequest - ms.streamSetup.Do(func() { - reqCopy := proto.Clone(pw.request).(*storagepb.AppendRowsRequest) - reqCopy.WriteStream = ms.streamSettings.streamID - reqCopy.GetProtoRows().WriterSchema = &storagepb.ProtoSchema{ - ProtoDescriptor: ms.schemaDescriptor, - } - if ms.streamSettings.TraceID != "" { - reqCopy.TraceId = ms.streamSettings.TraceID + appendErr := ms.lockingAppend(pw) + if appendErr != nil { + // Append yielded an error. Retry by continuing or return. + status := grpcstatus.Convert(appendErr) + if status != nil { + ctx, _ := tag.New(ms.ctx, tag.Insert(keyError, status.Code().String())) + recordStat(ctx, AppendRequestErrors, 1) } - req = reqCopy - }) - - if req != nil { - // First append in a new connection needs properties like schema and stream name set. - err = (*arc).Send(req) - } else { - // Subsequent requests need no modification. - err = (*arc).Send(pw.request) - } - if err == nil { - // Compute numRows, once we pass ownership to the channel the request may be - // cleared. - numRows := int64(len(pw.request.GetProtoRows().Rows.GetSerializedRows())) - ch <- pw - // We've passed ownership of the pending write to the channel. - // It's now responsible for marking the request done, we're done - // with the critical section. - ms.mu.Unlock() - - // Record stats and return. - recordStat(ms.ctx, AppendRequests, 1) - recordStat(ms.ctx, AppendRequestBytes, int64(pw.reqSize)) - recordStat(ms.ctx, AppendRequestRows, numRows) - return nil - } - // Unlock the mutex for error cases. - ms.mu.Unlock() - - // Append yielded an error. Retry by continuing or return. - status := grpcstatus.Convert(err) - if status != nil { - ctx, _ := tag.New(ms.ctx, tag.Insert(keyError, status.Code().String())) - recordStat(ctx, AppendRequestErrors, 1) - } - bo, shouldRetry := r.Retry(err) - if shouldRetry { - if err := gax.Sleep(ms.ctx, bo); err != nil { - return err + bo, shouldRetry := r.Retry(appendErr) + if shouldRetry { + if err := gax.Sleep(ms.ctx, bo); err != nil { + return err + } + continue } - continue + // Mark the pending write done. This will not be returned to the user, they'll receive the returned error. + pw.markDone(nil, appendErr, ms.fc) + return appendErr } - // We've got a non-retriable error, so propagate that up. and mark the write done. - ms.mu.Lock() - ms.err = err - pw.markDone(NoStreamOffset, err, ms.fc) - ms.mu.Unlock() - return err + return nil } } // Close closes a managed stream. func (ms *ManagedStream) Close() error { - - var arc *storagepb.BigQueryWrite_AppendRowsClient - // Critical section: get connection, close, mark closed. ms.mu.Lock() + defer ms.mu.Unlock() + + var arc *storagepb.BigQueryWrite_AppendRowsClient arc, ch, err := ms.getStream(arc, false) if err != nil { return err @@ -361,18 +395,22 @@ func (ms *ManagedStream) Close() error { return fmt.Errorf("no stream exists") } err = (*arc).CloseSend() - if err == nil { - close(ch) - } - ms.err = io.EOF - - // Done with the critical section. - ms.mu.Unlock() - // Propagate cancellation. + // Regardless of the outcome of CloseSend(), we're done with this channel. + close(ch) + // Additionally, cancel the underlying context for the stream, we don't allow re-open. if ms.cancel != nil { ms.cancel() + ms.cancel = nil } - return err + + if err != nil { + // For error on CloseSend, save that as the stream error and return. + ms.err = err + return err + } + // For normal operation, mark the stream error as io.EOF and return. + ms.err = io.EOF + return nil } // AppendRows sends the append requests to the service, and returns a single AppendResult for tracking @@ -383,8 +421,11 @@ func (ms *ManagedStream) Close() error { // // Use the WithOffset() AppendOption to set an explicit offset for this append. Setting an offset for // a default stream is unsupported. +// +// The size of a single request must be less than 10 MB in size. +// Requests larger than this return an error, typically `INVALID_ARGUMENT`. func (ms *ManagedStream) AppendRows(ctx context.Context, data [][]byte, opts ...AppendOption) (*AppendResult, error) { - pw := newPendingWrite(data) + pw := newPendingWrite(ctx, data) // apply AppendOption opts for _, opt := range opts { opt(pw) @@ -392,7 +433,7 @@ func (ms *ManagedStream) AppendRows(ctx context.Context, data [][]byte, opts ... // check flow control if err := ms.fc.acquire(ctx, pw.reqSize); err != nil { // in this case, we didn't acquire, so don't pass the flow controller reference to avoid a release. - pw.markDone(NoStreamOffset, err, nil) + pw.markDone(nil, err, nil) return nil, err } // Call the underlying append. The stream has it's own retained context and will surface expiry on @@ -401,7 +442,7 @@ func (ms *ManagedStream) AppendRows(ctx context.Context, data [][]byte, opts ... var appendErr error go func() { select { - case errCh <- ms.append(ctx, pw): + case errCh <- ms.appendWithRetry(pw): case <-ctx.Done(): } close(errCh) @@ -439,7 +480,7 @@ func recvProcessor(ctx context.Context, arc storagepb.BigQueryWrite_AppendRowsCl if !ok { return } - pw.markDone(NoStreamOffset, ctx.Err(), fc) + pw.markDone(nil, ctx.Err(), fc) } case nextWrite, ok := <-ch: if !ok { @@ -450,32 +491,19 @@ func recvProcessor(ctx context.Context, arc storagepb.BigQueryWrite_AppendRowsCl // block until we get a corresponding response or err from stream. resp, err := arc.Recv() if err != nil { - nextWrite.markDone(NoStreamOffset, err, fc) + nextWrite.markDone(nil, err, fc) continue } recordStat(ctx, AppendResponses, 1) - // Retain the updated schema if present, for eventual presentation to the user. - if resp.GetUpdatedSchema() != nil { - nextWrite.result.updatedSchema = resp.GetUpdatedSchema() - } - if status := resp.GetError(); status != nil { tagCtx, _ := tag.New(ctx, tag.Insert(keyError, codes.Code(status.GetCode()).String())) if err != nil { tagCtx = ctx } recordStat(tagCtx, AppendResponseErrors, 1) - nextWrite.markDone(NoStreamOffset, grpcstatus.ErrorProto(status), fc) - continue - } - success := resp.GetAppendResult() - off := success.GetOffset() - if off != nil { - nextWrite.markDone(off.GetValue(), nil, fc) - } else { - nextWrite.markDone(NoStreamOffset, nil, fc) } + nextWrite.markDone(resp, nil, fc) } } } diff --git a/bigquery/storage/managedwriter/managed_stream_test.go b/bigquery/storage/managedwriter/managed_stream_test.go index f523afbdb035..be4564b0a33f 100644 --- a/bigquery/storage/managedwriter/managed_stream_test.go +++ b/bigquery/storage/managedwriter/managed_stream_test.go @@ -16,12 +16,16 @@ package managedwriter import ( "context" + "errors" + "fmt" "runtime" "testing" "time" "github.com/googleapis/gax-go/v2" + "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" storagepb "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1" + "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" @@ -94,6 +98,7 @@ type testAppendRowsClient struct { requests []*storagepb.AppendRowsRequest sendF func(*storagepb.AppendRowsRequest) error recvF func() (*storagepb.AppendRowsResponse, error) + closeF func() error } func (tarc *testAppendRowsClient) Send(req *storagepb.AppendRowsRequest) error { @@ -104,6 +109,10 @@ func (tarc *testAppendRowsClient) Recv() (*storagepb.AppendRowsResponse, error) return tarc.recvF() } +func (tarc *testAppendRowsClient) CloseSend() error { + return tarc.closeF() +} + // openTestArc handles wiring in a test AppendRowsClient into a managedstream by providing the open function. func openTestArc(testARC *testAppendRowsClient, sendF func(req *storagepb.AppendRowsRequest) error, recvF func() (*storagepb.AppendRowsResponse, error)) func(s string, opts ...gax.CallOption) (storagepb.BigQueryWrite_AppendRowsClient, error) { sF := func(req *storagepb.AppendRowsRequest) error { @@ -123,6 +132,9 @@ func openTestArc(testARC *testAppendRowsClient, sendF func(req *storagepb.Append } testARC.sendF = sF testARC.recvF = rF + testARC.closeF = func() error { + return nil + } return func(s string, opts ...gax.CallOption) (storagepb.BigQueryWrite_AppendRowsClient, error) { testARC.openCount = testARC.openCount + 1 return testARC, nil @@ -288,6 +300,128 @@ func TestManagedStream_AppendWithDeadline(t *testing.T) { if ct := ms.fc.count(); ct != wantCount { t.Errorf("flowcontroller post-append count mismatch, got %d want %d", ct, wantCount) } +} + +func TestManagedStream_ContextExpiry(t *testing.T) { + // Issue: retaining error from append as stream error + // https://github.com/googleapis/google-cloud-go/issues/6657 + ctx := context.Background() + + ms := &ManagedStream{ + ctx: ctx, + streamSettings: defaultStreamSettings(), + fc: newFlowController(0, 0), + open: openTestArc(&testAppendRowsClient{}, + func(req *storagepb.AppendRowsRequest) error { + // Append is intentionally slow. + return nil + }, nil), + } + ms.schemaDescriptor = &descriptorpb.DescriptorProto{ + Name: proto.String("testDescriptor"), + } + fakeData := [][]byte{ + []byte("foo"), + } + + // Create a context and immediately cancel it. + cancelCtx, cancel := context.WithCancel(ctx) + cancel() + + // First, append with an invalid context. + pw := newPendingWrite(cancelCtx, fakeData) + err := ms.appendWithRetry(pw) + if err != context.Canceled { + t.Errorf("expected cancelled context error, got: %v", err) + } + + // a second append with a valid context should succeed + _, err = ms.AppendRows(ctx, fakeData) + if err != nil { + t.Errorf("expected second append to succeed, but failed: %v", err) + } +} + +func TestManagedStream_AppendDeadlocks(t *testing.T) { + // Ensure we don't deadlock by issing two appends. + testCases := []struct { + desc string + openErrors []error + ctx context.Context + respErr error + }{ + { + desc: "no errors", + openErrors: []error{nil, nil}, + ctx: context.Background(), + respErr: nil, + }, + { + desc: "cancelled caller context", + openErrors: []error{nil, nil}, + ctx: func() context.Context { + cctx, cancel := context.WithCancel(context.Background()) + cancel() + return cctx + }(), + respErr: context.Canceled, + }, + { + desc: "expired caller context", + openErrors: []error{nil, nil}, + ctx: func() context.Context { + cctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) + defer cancel() + time.Sleep(2 * time.Millisecond) + return cctx + }(), + respErr: context.DeadlineExceeded, + }, + { + desc: "errored getstream", + openErrors: []error{status.Errorf(codes.ResourceExhausted, "some error"), status.Errorf(codes.ResourceExhausted, "some error")}, + ctx: context.Background(), + respErr: status.Errorf(codes.ResourceExhausted, "some error"), + }, + } + + for _, tc := range testCases { + openF := openTestArc(&testAppendRowsClient{}, nil, nil) + ms := &ManagedStream{ + ctx: context.Background(), + open: func(s string, opts ...gax.CallOption) (storagepb.BigQueryWrite_AppendRowsClient, error) { + if len(tc.openErrors) == 0 { + panic("out of open errors") + } + curErr := tc.openErrors[0] + tc.openErrors = tc.openErrors[1:] + if curErr == nil { + return openF(s, opts...) + } + return nil, curErr + }, + streamSettings: &streamSettings{ + streamID: "foo", + }, + } + + // first append + pw := newPendingWrite(tc.ctx, [][]byte{[]byte("foo")}) + gotErr := ms.appendWithRetry(pw) + if !errors.Is(gotErr, tc.respErr) { + t.Errorf("%s first response: got %v, want %v", tc.desc, gotErr, tc.respErr) + } + // second append + pw = newPendingWrite(tc.ctx, [][]byte{[]byte("bar")}) + gotErr = ms.appendWithRetry(pw) + if !errors.Is(gotErr, tc.respErr) { + t.Errorf("%s second response: got %v, want %v", tc.desc, gotErr, tc.respErr) + } + + // Issue two closes, to ensure we're not deadlocking there either. + ms.Close() + ms.Close() + } } @@ -328,3 +462,24 @@ func TestManagedStream_LeakingGoroutines(t *testing.T) { } } } + +// Ensures we're propagating call options as expected. +// Background: https://github.com/googleapis/google-cloud-go/issues/6487 +func TestOpenCallOptionPropagation(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + cancel() + + ms := &ManagedStream{ + ctx: ctx, + callOptions: []gax.CallOption{ + gax.WithGRPCOptions(grpc.MaxCallRecvMsgSize(99)), + }, + open: createOpenF(ctx, func(ctx context.Context, opts ...gax.CallOption) (storage.BigQueryWrite_AppendRowsClient, error) { + if len(opts) == 0 { + t.Fatalf("no options were propagated") + } + return nil, fmt.Errorf("no real client") + }), + } + ms.openWithRetry() +} diff --git a/bigquery/storage/managedwriter/options.go b/bigquery/storage/managedwriter/options.go index 0ee376246a16..50164a846384 100644 --- a/bigquery/storage/managedwriter/options.go +++ b/bigquery/storage/managedwriter/options.go @@ -45,7 +45,7 @@ func WithStreamName(name string) WriterOption { // WithDestinationTable specifies the destination table to which a created // stream will append rows. Format of the table: // -// projects/{projectid}/datasets/{dataset}/tables/{table} +// projects/{projectid}/datasets/{dataset}/tables/{table} func WithDestinationTable(destTable string) WriterOption { return func(ms *ManagedStream) { ms.destinationTable = destTable @@ -70,7 +70,7 @@ func WithMaxInflightBytes(n int) WriterOption { // This is generally for diagnostic purposes only. func WithTraceID(traceID string) WriterOption { return func(ms *ManagedStream) { - ms.streamSettings.TraceID = traceID + ms.streamSettings.TraceID = buildTraceID(traceID) } } diff --git a/bigquery/storage/managedwriter/options_test.go b/bigquery/storage/managedwriter/options_test.go index 5d81035ff29d..03551a9600d0 100644 --- a/bigquery/storage/managedwriter/options_test.go +++ b/bigquery/storage/managedwriter/options_test.go @@ -15,9 +15,11 @@ package managedwriter import ( + "fmt" "sync" "testing" + "cloud.google.com/go/bigquery/internal" "github.com/google/go-cmp/cmp" "github.com/googleapis/gax-go/v2" "google.golang.org/grpc" @@ -64,13 +66,24 @@ func TestWriterOptions(t *testing.T) { }(), }, { - desc: "WithTracePrefix", + desc: "WithTraceID", options: []WriterOption{WithTraceID("foo")}, want: func() *ManagedStream { ms := &ManagedStream{ streamSettings: defaultStreamSettings(), } - ms.streamSettings.TraceID = "foo" + ms.streamSettings.TraceID = fmt.Sprintf("go-managedwriter:%s foo", internal.Version) + return ms + }(), + }, + { + desc: "WithoutTraceID", + options: []WriterOption{}, + want: func() *ManagedStream { + ms := &ManagedStream{ + streamSettings: defaultStreamSettings(), + } + ms.streamSettings.TraceID = fmt.Sprintf("go-managedwriter:%s", internal.Version) return ms }(), }, @@ -114,7 +127,7 @@ func TestWriterOptions(t *testing.T) { options: []WriterOption{ WithType(PendingStream), WithMaxInflightBytes(5), - WithTraceID("id"), + WithTraceID("traceid"), }, want: func() *ManagedStream { ms := &ManagedStream{ @@ -122,7 +135,7 @@ func TestWriterOptions(t *testing.T) { } ms.streamSettings.MaxInflightBytes = 5 ms.streamSettings.streamType = PendingStream - ms.streamSettings.TraceID = "id" + ms.streamSettings.TraceID = fmt.Sprintf("go-managedwriter:%s traceid", internal.Version) return ms }(), }, diff --git a/bigquery/storage/managedwriter/retry.go b/bigquery/storage/managedwriter/retry.go index 1f272a999327..5560443a64e4 100644 --- a/bigquery/storage/managedwriter/retry.go +++ b/bigquery/storage/managedwriter/retry.go @@ -15,6 +15,10 @@ package managedwriter import ( + "context" + "errors" + "io" + "strings" "time" "github.com/googleapis/gax-go/v2" @@ -22,22 +26,79 @@ import ( "google.golang.org/grpc/status" ) +var ( + defaultAppendRetries = 3 +) + +func newDefaultRetryer() *defaultRetryer { + return &defaultRetryer{ + bigBo: gax.Backoff{ + Initial: 2 * time.Second, + Multiplier: 5, + Max: 5 * time.Minute, + }, + } +} + type defaultRetryer struct { - bo gax.Backoff + bo gax.Backoff + bigBo gax.Backoff // For more aggressive backoff, such as throughput quota } func (r *defaultRetryer) Retry(err error) (pause time.Duration, shouldRetry bool) { - // TODO: refine this logic in a subsequent PR, there's some service-specific - // retry predicates in addition to statuscode-based. + // This predicate evaluates errors for both enqueuing and reconnection. + // See RetryAppend for retry that bounds attempts to a fixed number. s, ok := status.FromError(err) if !ok { - // non-status based errors as retryable + // Treat context errors as non-retriable. + if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { + return r.bo.Pause(), false + } + // EOF can happen in the case of connection close. + if errors.Is(err, io.EOF) { + return r.bo.Pause(), true + } + // Any other non-status based errors treated as retryable. return r.bo.Pause(), true } switch s.Code() { - case codes.Unavailable: + case codes.Aborted, + codes.Canceled, + codes.DeadlineExceeded, + codes.Internal, + codes.Unavailable: return r.bo.Pause(), true - default: - return r.bo.Pause(), false + case codes.ResourceExhausted: + if strings.HasPrefix(s.Message(), "Exceeds 'AppendRows throughput' quota") { + // Note: internal b/246031522 opened to give this a structured error + // and avoid string parsing. Should be a QuotaFailure or similar. + return r.bigBo.Pause(), true // more aggressive backoff + } + } + return 0, false +} + +// RetryAppend is a variation of the retry predicate that also bounds retries to a finite number of attempts. +func (r *defaultRetryer) RetryAppend(err error, attemptCount int) (pause time.Duration, shouldRetry bool) { + + if attemptCount > defaultAppendRetries { + return 0, false // exceeded maximum retries. + } + return r.Retry(err) +} + +// shouldReconnect is akin to a retry predicate, in that it evaluates whether we should force +// our bidi stream to close/reopen based on the responses error. Errors here signal that no +// further appends will succeed. +func shouldReconnect(err error) bool { + var knownErrors = []error{ + io.EOF, + status.Error(codes.Unavailable, "the connection is draining"), // errStreamDrain in gRPC transport + } + for _, ke := range knownErrors { + if errors.Is(err, ke) { + return true + } } + return false } diff --git a/bigquery/storage/managedwriter/retry_test.go b/bigquery/storage/managedwriter/retry_test.go new file mode 100644 index 000000000000..ca4272339c1c --- /dev/null +++ b/bigquery/storage/managedwriter/retry_test.go @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package managedwriter + +import ( + "fmt" + "io" + "testing" + + "github.com/googleapis/gax-go/v2/apierror" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func TestManagedStream_ShouldReconnect(t *testing.T) { + + testCases := []struct { + err error + want bool + }{ + { + err: fmt.Errorf("random error"), + want: false, + }, + { + err: io.EOF, + want: true, + }, + { + err: status.Error(codes.Unavailable, "nope"), + want: false, + }, + { + err: status.Error(codes.Unavailable, "the connection is draining"), + want: true, + }, + { + err: func() error { + // wrap the underlying error in a gax apierror + ai, _ := apierror.FromError(status.Error(codes.Unavailable, "the connection is draining")) + return ai + }(), + want: true, + }, + } + + for _, tc := range testCases { + if got := shouldReconnect(tc.err); got != tc.want { + t.Errorf("got %t, want %t for error: %+v", got, tc.want, tc.err) + } + } +} diff --git a/bigquery/storage/managedwriter/testdata/schemas.go b/bigquery/storage/managedwriter/testdata/schemas.go index 425fed273757..dfbb7a980d8a 100644 --- a/bigquery/storage/managedwriter/testdata/schemas.go +++ b/bigquery/storage/managedwriter/testdata/schemas.go @@ -190,4 +190,71 @@ var ( Type: bigquery.IntegerFieldType, }, } + + ValidationRepeatedSchema bigquery.Schema = bigquery.Schema{ + { + Name: "id", + Type: bigquery.IntegerFieldType, + }, + { + Name: "double_repeated", + Type: bigquery.FloatFieldType, + Repeated: true, + }, + { + Name: "float_repeated", + Type: bigquery.FloatFieldType, + Repeated: true, + }, + { + Name: "int32_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "int64_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "uint32_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "sint32_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "sint64_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "fixed32_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "sfixed32_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "sfixed64_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + { + Name: "bool_repeated", + Type: bigquery.BooleanFieldType, + Repeated: true, + }, + { + Name: "enum_repeated", + Type: bigquery.IntegerFieldType, + Repeated: true, + }, + } ) diff --git a/bigquery/storage/managedwriter/testdata/validation_proto2.pb.go b/bigquery/storage/managedwriter/testdata/validation_proto2.pb.go index 8b0a06c1d906..5dd87e5403eb 100644 --- a/bigquery/storage/managedwriter/testdata/validation_proto2.pb.go +++ b/bigquery/storage/managedwriter/testdata/validation_proto2.pb.go @@ -584,6 +584,294 @@ func (x *ValidationP2OptionalWithDefaults) GetEnumField() Proto2ExampleEnum { return Default_ValidationP2OptionalWithDefaults_EnumField } +// Validating the behavior of unpacked repeated scalar values. +type ValidationP2UnpackedRepeated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + DoubleRepeated []float64 `protobuf:"fixed64,2,rep,name=double_repeated,json=doubleRepeated" json:"double_repeated,omitempty"` + FloatRepeated []float32 `protobuf:"fixed32,3,rep,name=float_repeated,json=floatRepeated" json:"float_repeated,omitempty"` + Int32Repeated []int32 `protobuf:"varint,4,rep,name=int32_repeated,json=int32Repeated" json:"int32_repeated,omitempty"` + Int64Repeated []int64 `protobuf:"varint,5,rep,name=int64_repeated,json=int64Repeated" json:"int64_repeated,omitempty"` + Uint32Repeated []uint32 `protobuf:"varint,6,rep,name=uint32_repeated,json=uint32Repeated" json:"uint32_repeated,omitempty"` + Sint32Repeated []int32 `protobuf:"zigzag32,7,rep,name=sint32_repeated,json=sint32Repeated" json:"sint32_repeated,omitempty"` + Sint64Repeated []int64 `protobuf:"zigzag64,8,rep,name=sint64_repeated,json=sint64Repeated" json:"sint64_repeated,omitempty"` + Fixed32Repeated []uint32 `protobuf:"fixed32,9,rep,name=fixed32_repeated,json=fixed32Repeated" json:"fixed32_repeated,omitempty"` + Sfixed32Repeated []int32 `protobuf:"fixed32,10,rep,name=sfixed32_repeated,json=sfixed32Repeated" json:"sfixed32_repeated,omitempty"` + Sfixed64Repeated []int64 `protobuf:"fixed64,11,rep,name=sfixed64_repeated,json=sfixed64Repeated" json:"sfixed64_repeated,omitempty"` + BoolRepeated []bool `protobuf:"varint,12,rep,name=bool_repeated,json=boolRepeated" json:"bool_repeated,omitempty"` + EnumRepeated []Proto2ExampleEnum `protobuf:"varint,13,rep,name=enum_repeated,json=enumRepeated,enum=testdata.Proto2ExampleEnum" json:"enum_repeated,omitempty"` +} + +func (x *ValidationP2UnpackedRepeated) Reset() { + *x = ValidationP2UnpackedRepeated{} + if protoimpl.UnsafeEnabled { + mi := &file_validation_proto2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidationP2UnpackedRepeated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidationP2UnpackedRepeated) ProtoMessage() {} + +func (x *ValidationP2UnpackedRepeated) ProtoReflect() protoreflect.Message { + mi := &file_validation_proto2_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidationP2UnpackedRepeated.ProtoReflect.Descriptor instead. +func (*ValidationP2UnpackedRepeated) Descriptor() ([]byte, []int) { + return file_validation_proto2_proto_rawDescGZIP(), []int{3} +} + +func (x *ValidationP2UnpackedRepeated) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *ValidationP2UnpackedRepeated) GetDoubleRepeated() []float64 { + if x != nil { + return x.DoubleRepeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetFloatRepeated() []float32 { + if x != nil { + return x.FloatRepeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetInt32Repeated() []int32 { + if x != nil { + return x.Int32Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetInt64Repeated() []int64 { + if x != nil { + return x.Int64Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetUint32Repeated() []uint32 { + if x != nil { + return x.Uint32Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetSint32Repeated() []int32 { + if x != nil { + return x.Sint32Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetSint64Repeated() []int64 { + if x != nil { + return x.Sint64Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetFixed32Repeated() []uint32 { + if x != nil { + return x.Fixed32Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetSfixed32Repeated() []int32 { + if x != nil { + return x.Sfixed32Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetSfixed64Repeated() []int64 { + if x != nil { + return x.Sfixed64Repeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetBoolRepeated() []bool { + if x != nil { + return x.BoolRepeated + } + return nil +} + +func (x *ValidationP2UnpackedRepeated) GetEnumRepeated() []Proto2ExampleEnum { + if x != nil { + return x.EnumRepeated + } + return nil +} + +// Validating the behavior of packed repeated scalar values. +type ValidationP2PackedRepeated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + DoubleRepeated []float64 `protobuf:"fixed64,2,rep,packed,name=double_repeated,json=doubleRepeated" json:"double_repeated,omitempty"` + FloatRepeated []float32 `protobuf:"fixed32,3,rep,packed,name=float_repeated,json=floatRepeated" json:"float_repeated,omitempty"` + Int32Repeated []int32 `protobuf:"varint,4,rep,packed,name=int32_repeated,json=int32Repeated" json:"int32_repeated,omitempty"` + Int64Repeated []int64 `protobuf:"varint,5,rep,packed,name=int64_repeated,json=int64Repeated" json:"int64_repeated,omitempty"` + Uint32Repeated []uint32 `protobuf:"varint,6,rep,packed,name=uint32_repeated,json=uint32Repeated" json:"uint32_repeated,omitempty"` + Sint32Repeated []int32 `protobuf:"zigzag32,7,rep,packed,name=sint32_repeated,json=sint32Repeated" json:"sint32_repeated,omitempty"` + Sint64Repeated []int64 `protobuf:"zigzag64,8,rep,packed,name=sint64_repeated,json=sint64Repeated" json:"sint64_repeated,omitempty"` + Fixed32Repeated []uint32 `protobuf:"fixed32,9,rep,packed,name=fixed32_repeated,json=fixed32Repeated" json:"fixed32_repeated,omitempty"` + Sfixed32Repeated []int32 `protobuf:"fixed32,10,rep,packed,name=sfixed32_repeated,json=sfixed32Repeated" json:"sfixed32_repeated,omitempty"` + Sfixed64Repeated []int64 `protobuf:"fixed64,11,rep,packed,name=sfixed64_repeated,json=sfixed64Repeated" json:"sfixed64_repeated,omitempty"` + BoolRepeated []bool `protobuf:"varint,12,rep,packed,name=bool_repeated,json=boolRepeated" json:"bool_repeated,omitempty"` + EnumRepeated []Proto2ExampleEnum `protobuf:"varint,13,rep,packed,name=enum_repeated,json=enumRepeated,enum=testdata.Proto2ExampleEnum" json:"enum_repeated,omitempty"` +} + +func (x *ValidationP2PackedRepeated) Reset() { + *x = ValidationP2PackedRepeated{} + if protoimpl.UnsafeEnabled { + mi := &file_validation_proto2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidationP2PackedRepeated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidationP2PackedRepeated) ProtoMessage() {} + +func (x *ValidationP2PackedRepeated) ProtoReflect() protoreflect.Message { + mi := &file_validation_proto2_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidationP2PackedRepeated.ProtoReflect.Descriptor instead. +func (*ValidationP2PackedRepeated) Descriptor() ([]byte, []int) { + return file_validation_proto2_proto_rawDescGZIP(), []int{4} +} + +func (x *ValidationP2PackedRepeated) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *ValidationP2PackedRepeated) GetDoubleRepeated() []float64 { + if x != nil { + return x.DoubleRepeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetFloatRepeated() []float32 { + if x != nil { + return x.FloatRepeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetInt32Repeated() []int32 { + if x != nil { + return x.Int32Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetInt64Repeated() []int64 { + if x != nil { + return x.Int64Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetUint32Repeated() []uint32 { + if x != nil { + return x.Uint32Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetSint32Repeated() []int32 { + if x != nil { + return x.Sint32Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetSint64Repeated() []int64 { + if x != nil { + return x.Sint64Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetFixed32Repeated() []uint32 { + if x != nil { + return x.Fixed32Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetSfixed32Repeated() []int32 { + if x != nil { + return x.Sfixed32Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetSfixed64Repeated() []int64 { + if x != nil { + return x.Sfixed64Repeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetBoolRepeated() []bool { + if x != nil { + return x.BoolRepeated + } + return nil +} + +func (x *ValidationP2PackedRepeated) GetEnumRepeated() []Proto2ExampleEnum { + if x != nil { + return x.EnumRepeated + } + return nil +} + var File_validation_proto2_proto protoreflect.FileDescriptor var file_validation_proto2_proto_rawDesc = []byte{ @@ -696,17 +984,90 @@ var file_validation_proto2_proto_rawDesc = []byte{ 0x0e, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x0e, 0x50, 0x32, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x52, 0x09, - 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x5b, 0x0a, 0x11, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x32, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x10, - 0x0a, 0x0c, 0x50, 0x32, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x32, 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x50, 0x32, 0x5f, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, - 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x32, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x54, - 0x48, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x3d, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, - 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, + 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xb3, 0x04, 0x0a, 0x1c, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x32, 0x55, 0x6e, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x01, 0x52, 0x0e, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x72, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x02, 0x52, 0x0d, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x69, 0x6e, 0x74, + 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0d, 0x52, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x74, + 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x12, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, 0x52, 0x0f, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, + 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x10, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6f, 0x6f, 0x6c, + 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x08, 0x52, + 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, + 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, + 0x6d, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, + 0xe1, 0x04, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x32, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, + 0x0a, 0x0f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x0e, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x02, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, + 0x10, 0x01, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x29, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x0f, + 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x0f, 0x73, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x11, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x0f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x12, 0x42, + 0x02, 0x10, 0x01, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x10, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, 0x42, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x02, 0x10, + 0x01, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x10, 0x42, 0x02, + 0x10, 0x01, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0d, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x72, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x08, 0x42, 0x02, 0x10, 0x01, 0x52, + 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x44, 0x0a, + 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, + 0x6d, 0x42, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x2a, 0x5b, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x32, 0x5f, 0x55, + 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x32, + 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x32, 0x5f, 0x4f, + 0x54, 0x48, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, + 0x50, 0x32, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x03, + 0x42, 0x3d, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, } var ( @@ -722,22 +1083,26 @@ func file_validation_proto2_proto_rawDescGZIP() []byte { } var file_validation_proto2_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_validation_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_validation_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_validation_proto2_proto_goTypes = []interface{}{ (Proto2ExampleEnum)(0), // 0: testdata.Proto2ExampleEnum (*ValidationP2Required)(nil), // 1: testdata.ValidationP2Required (*ValidationP2Optional)(nil), // 2: testdata.ValidationP2Optional (*ValidationP2OptionalWithDefaults)(nil), // 3: testdata.ValidationP2OptionalWithDefaults + (*ValidationP2UnpackedRepeated)(nil), // 4: testdata.ValidationP2UnpackedRepeated + (*ValidationP2PackedRepeated)(nil), // 5: testdata.ValidationP2PackedRepeated } var file_validation_proto2_proto_depIdxs = []int32{ 0, // 0: testdata.ValidationP2Required.enum_field:type_name -> testdata.Proto2ExampleEnum 0, // 1: testdata.ValidationP2Optional.enum_field:type_name -> testdata.Proto2ExampleEnum 0, // 2: testdata.ValidationP2OptionalWithDefaults.enum_field:type_name -> testdata.Proto2ExampleEnum - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 0, // 3: testdata.ValidationP2UnpackedRepeated.enum_repeated:type_name -> testdata.Proto2ExampleEnum + 0, // 4: testdata.ValidationP2PackedRepeated.enum_repeated:type_name -> testdata.Proto2ExampleEnum + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_validation_proto2_proto_init() } @@ -782,6 +1147,30 @@ func file_validation_proto2_proto_init() { return nil } } + file_validation_proto2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationP2UnpackedRepeated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validation_proto2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationP2PackedRepeated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -789,7 +1178,7 @@ func file_validation_proto2_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_validation_proto2_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/bigquery/storage/managedwriter/testdata/validation_proto2.proto b/bigquery/storage/managedwriter/testdata/validation_proto2.proto index 3cf1f59ca74c..7cf932385a9a 100644 --- a/bigquery/storage/managedwriter/testdata/validation_proto2.proto +++ b/bigquery/storage/managedwriter/testdata/validation_proto2.proto @@ -88,3 +88,36 @@ message ValidationP2OptionalWithDefaults { optional Proto2ExampleEnum enum_field = 16 [default = P2_OTHER_THING]; } +// Validating the behavior of unpacked repeated scalar values. +message ValidationP2UnpackedRepeated { + optional int64 id = 1; + repeated double double_repeated = 2; + repeated float float_repeated = 3; + repeated int32 int32_repeated = 4; + repeated int64 int64_repeated = 5; + repeated uint32 uint32_repeated = 6; + repeated sint32 sint32_repeated = 7; + repeated sint64 sint64_repeated = 8; + repeated fixed32 fixed32_repeated = 9; + repeated sfixed32 sfixed32_repeated = 10; + repeated sfixed64 sfixed64_repeated = 11; + repeated bool bool_repeated = 12; + repeated Proto2ExampleEnum enum_repeated = 13; +} + +// Validating the behavior of packed repeated scalar values. +message ValidationP2PackedRepeated { + optional int64 id = 1; + repeated double double_repeated = 2 [packed = true]; + repeated float float_repeated = 3 [packed = true]; + repeated int32 int32_repeated = 4 [packed = true]; + repeated int64 int64_repeated = 5 [packed = true]; + repeated uint32 uint32_repeated = 6 [packed = true]; + repeated sint32 sint32_repeated = 7 [packed = true]; + repeated sint64 sint64_repeated = 8 [packed = true]; + repeated fixed32 fixed32_repeated = 9 [packed = true]; + repeated sfixed32 sfixed32_repeated = 10 [packed = true]; + repeated sfixed64 sfixed64_repeated = 11 [packed = true]; + repeated bool bool_repeated = 12 [packed = true]; + repeated Proto2ExampleEnum enum_repeated = 13 [packed = true]; +} \ No newline at end of file diff --git a/bigquery/storage/managedwriter/testdata/validation_proto3.pb.go b/bigquery/storage/managedwriter/testdata/validation_proto3.pb.go index c580a4015dfb..b8451faaa45e 100644 --- a/bigquery/storage/managedwriter/testdata/validation_proto3.pb.go +++ b/bigquery/storage/managedwriter/testdata/validation_proto3.pb.go @@ -552,6 +552,151 @@ func (x *ValidationP3Wrappers) GetEnumField() Proto3ExampleEnum { return Proto3ExampleEnum_P3_UNDEFINED } +// Validating the behavior of packed repeated scalar values. +// Proto3 behavior is to pack values by default. +type ValidationP3PackedRepeated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *int64 `protobuf:"varint,1,opt,name=id,proto3,oneof" json:"id,omitempty"` + DoubleRepeated []float64 `protobuf:"fixed64,2,rep,packed,name=double_repeated,json=doubleRepeated,proto3" json:"double_repeated,omitempty"` + FloatRepeated []float32 `protobuf:"fixed32,3,rep,packed,name=float_repeated,json=floatRepeated,proto3" json:"float_repeated,omitempty"` + Int32Repeated []int32 `protobuf:"varint,4,rep,packed,name=int32_repeated,json=int32Repeated,proto3" json:"int32_repeated,omitempty"` + Int64Repeated []int64 `protobuf:"varint,5,rep,packed,name=int64_repeated,json=int64Repeated,proto3" json:"int64_repeated,omitempty"` + Uint32Repeated []uint32 `protobuf:"varint,6,rep,packed,name=uint32_repeated,json=uint32Repeated,proto3" json:"uint32_repeated,omitempty"` + Sint32Repeated []int32 `protobuf:"zigzag32,7,rep,packed,name=sint32_repeated,json=sint32Repeated,proto3" json:"sint32_repeated,omitempty"` + Sint64Repeated []int64 `protobuf:"zigzag64,8,rep,packed,name=sint64_repeated,json=sint64Repeated,proto3" json:"sint64_repeated,omitempty"` + Fixed32Repeated []uint32 `protobuf:"fixed32,9,rep,packed,name=fixed32_repeated,json=fixed32Repeated,proto3" json:"fixed32_repeated,omitempty"` + Sfixed32Repeated []int32 `protobuf:"fixed32,10,rep,packed,name=sfixed32_repeated,json=sfixed32Repeated,proto3" json:"sfixed32_repeated,omitempty"` + Sfixed64Repeated []int64 `protobuf:"fixed64,11,rep,packed,name=sfixed64_repeated,json=sfixed64Repeated,proto3" json:"sfixed64_repeated,omitempty"` + BoolRepeated []bool `protobuf:"varint,12,rep,packed,name=bool_repeated,json=boolRepeated,proto3" json:"bool_repeated,omitempty"` + EnumRepeated []Proto3ExampleEnum `protobuf:"varint,13,rep,packed,name=enum_repeated,json=enumRepeated,proto3,enum=testdata.Proto3ExampleEnum" json:"enum_repeated,omitempty"` +} + +func (x *ValidationP3PackedRepeated) Reset() { + *x = ValidationP3PackedRepeated{} + if protoimpl.UnsafeEnabled { + mi := &file_validation_proto3_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidationP3PackedRepeated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidationP3PackedRepeated) ProtoMessage() {} + +func (x *ValidationP3PackedRepeated) ProtoReflect() protoreflect.Message { + mi := &file_validation_proto3_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidationP3PackedRepeated.ProtoReflect.Descriptor instead. +func (*ValidationP3PackedRepeated) Descriptor() ([]byte, []int) { + return file_validation_proto3_proto_rawDescGZIP(), []int{3} +} + +func (x *ValidationP3PackedRepeated) GetId() int64 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *ValidationP3PackedRepeated) GetDoubleRepeated() []float64 { + if x != nil { + return x.DoubleRepeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetFloatRepeated() []float32 { + if x != nil { + return x.FloatRepeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetInt32Repeated() []int32 { + if x != nil { + return x.Int32Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetInt64Repeated() []int64 { + if x != nil { + return x.Int64Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetUint32Repeated() []uint32 { + if x != nil { + return x.Uint32Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetSint32Repeated() []int32 { + if x != nil { + return x.Sint32Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetSint64Repeated() []int64 { + if x != nil { + return x.Sint64Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetFixed32Repeated() []uint32 { + if x != nil { + return x.Fixed32Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetSfixed32Repeated() []int32 { + if x != nil { + return x.Sfixed32Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetSfixed64Repeated() []int64 { + if x != nil { + return x.Sfixed64Repeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetBoolRepeated() []bool { + if x != nil { + return x.BoolRepeated + } + return nil +} + +func (x *ValidationP3PackedRepeated) GetEnumRepeated() []Proto3ExampleEnum { + if x != nil { + return x.EnumRepeated + } + return nil +} + var File_validation_proto3_proto protoreflect.FileDescriptor var file_validation_proto3_proto_rawDesc = []byte{ @@ -693,7 +838,43 @@ var file_validation_proto3_proto_rawDesc = []byte{ 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, - 0x6d, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2a, 0x5b, 0x0a, 0x11, + 0x6d, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xbd, 0x04, 0x0a, + 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x33, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x13, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0e, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x02, 0x52, 0x0d, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, + 0x0d, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x27, + 0x0a, 0x0f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, + 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x07, 0x52, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0f, 0x52, + 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x10, 0x52, 0x10, 0x73, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x23, + 0x0a, 0x0d, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x0c, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x45, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x2a, 0x5b, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x33, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x33, 0x5f, 0x54, 0x48, 0x49, 0x4e, 0x47, 0x10, @@ -719,38 +900,40 @@ func file_validation_proto3_proto_rawDescGZIP() []byte { } var file_validation_proto3_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_validation_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_validation_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_validation_proto3_proto_goTypes = []interface{}{ - (Proto3ExampleEnum)(0), // 0: testdata.Proto3ExampleEnum - (*ValidationP3Defaults)(nil), // 1: testdata.ValidationP3Defaults - (*ValidationP3Optional)(nil), // 2: testdata.ValidationP3Optional - (*ValidationP3Wrappers)(nil), // 3: testdata.ValidationP3Wrappers - (*wrapperspb.DoubleValue)(nil), // 4: google.protobuf.DoubleValue - (*wrapperspb.FloatValue)(nil), // 5: google.protobuf.FloatValue - (*wrapperspb.Int32Value)(nil), // 6: google.protobuf.Int32Value - (*wrapperspb.Int64Value)(nil), // 7: google.protobuf.Int64Value - (*wrapperspb.UInt32Value)(nil), // 8: google.protobuf.UInt32Value - (*wrapperspb.BoolValue)(nil), // 9: google.protobuf.BoolValue - (*wrapperspb.StringValue)(nil), // 10: google.protobuf.StringValue - (*wrapperspb.BytesValue)(nil), // 11: google.protobuf.BytesValue + (Proto3ExampleEnum)(0), // 0: testdata.Proto3ExampleEnum + (*ValidationP3Defaults)(nil), // 1: testdata.ValidationP3Defaults + (*ValidationP3Optional)(nil), // 2: testdata.ValidationP3Optional + (*ValidationP3Wrappers)(nil), // 3: testdata.ValidationP3Wrappers + (*ValidationP3PackedRepeated)(nil), // 4: testdata.ValidationP3PackedRepeated + (*wrapperspb.DoubleValue)(nil), // 5: google.protobuf.DoubleValue + (*wrapperspb.FloatValue)(nil), // 6: google.protobuf.FloatValue + (*wrapperspb.Int32Value)(nil), // 7: google.protobuf.Int32Value + (*wrapperspb.Int64Value)(nil), // 8: google.protobuf.Int64Value + (*wrapperspb.UInt32Value)(nil), // 9: google.protobuf.UInt32Value + (*wrapperspb.BoolValue)(nil), // 10: google.protobuf.BoolValue + (*wrapperspb.StringValue)(nil), // 11: google.protobuf.StringValue + (*wrapperspb.BytesValue)(nil), // 12: google.protobuf.BytesValue } var file_validation_proto3_proto_depIdxs = []int32{ 0, // 0: testdata.ValidationP3Defaults.enum_field:type_name -> testdata.Proto3ExampleEnum 0, // 1: testdata.ValidationP3Optional.enum_field:type_name -> testdata.Proto3ExampleEnum - 4, // 2: testdata.ValidationP3Wrappers.double_field:type_name -> google.protobuf.DoubleValue - 5, // 3: testdata.ValidationP3Wrappers.float_field:type_name -> google.protobuf.FloatValue - 6, // 4: testdata.ValidationP3Wrappers.int32_field:type_name -> google.protobuf.Int32Value - 7, // 5: testdata.ValidationP3Wrappers.int64_field:type_name -> google.protobuf.Int64Value - 8, // 6: testdata.ValidationP3Wrappers.uint32_field:type_name -> google.protobuf.UInt32Value - 9, // 7: testdata.ValidationP3Wrappers.bool_field:type_name -> google.protobuf.BoolValue - 10, // 8: testdata.ValidationP3Wrappers.string_field:type_name -> google.protobuf.StringValue - 11, // 9: testdata.ValidationP3Wrappers.bytes_field:type_name -> google.protobuf.BytesValue + 5, // 2: testdata.ValidationP3Wrappers.double_field:type_name -> google.protobuf.DoubleValue + 6, // 3: testdata.ValidationP3Wrappers.float_field:type_name -> google.protobuf.FloatValue + 7, // 4: testdata.ValidationP3Wrappers.int32_field:type_name -> google.protobuf.Int32Value + 8, // 5: testdata.ValidationP3Wrappers.int64_field:type_name -> google.protobuf.Int64Value + 9, // 6: testdata.ValidationP3Wrappers.uint32_field:type_name -> google.protobuf.UInt32Value + 10, // 7: testdata.ValidationP3Wrappers.bool_field:type_name -> google.protobuf.BoolValue + 11, // 8: testdata.ValidationP3Wrappers.string_field:type_name -> google.protobuf.StringValue + 12, // 9: testdata.ValidationP3Wrappers.bytes_field:type_name -> google.protobuf.BytesValue 0, // 10: testdata.ValidationP3Wrappers.enum_field:type_name -> testdata.Proto3ExampleEnum - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 0, // 11: testdata.ValidationP3PackedRepeated.enum_repeated:type_name -> testdata.Proto3ExampleEnum + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_validation_proto3_proto_init() } @@ -795,15 +978,28 @@ func file_validation_proto3_proto_init() { return nil } } + file_validation_proto3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationP3PackedRepeated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_validation_proto3_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_validation_proto3_proto_msgTypes[3].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_validation_proto3_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/bigquery/storage/managedwriter/testdata/validation_proto3.proto b/bigquery/storage/managedwriter/testdata/validation_proto3.proto index e06182daf655..217202fe7a60 100644 --- a/bigquery/storage/managedwriter/testdata/validation_proto3.proto +++ b/bigquery/storage/managedwriter/testdata/validation_proto3.proto @@ -89,3 +89,20 @@ message ValidationP3Wrappers { Proto3ExampleEnum enum_field = 16; } +// Validating the behavior of packed repeated scalar values. +// Proto3 behavior is to pack values by default. +message ValidationP3PackedRepeated { + optional int64 id = 1; + repeated double double_repeated = 2; + repeated float float_repeated = 3; + repeated int32 int32_repeated = 4; + repeated int64 int64_repeated = 5; + repeated uint32 uint32_repeated = 6; + repeated sint32 sint32_repeated = 7; + repeated sint64 sint64_repeated = 8; + repeated fixed32 fixed32_repeated = 9; + repeated sfixed32 sfixed32_repeated = 10; + repeated sfixed64 sfixed64_repeated = 11; + repeated bool bool_repeated = 12; + repeated Proto3ExampleEnum enum_repeated = 13; +} diff --git a/bigquery/storage/managedwriter/testutils_test.go b/bigquery/storage/managedwriter/testutils_test.go index 7f101fca715d..96784e5bad45 100644 --- a/bigquery/storage/managedwriter/testutils_test.go +++ b/bigquery/storage/managedwriter/testutils_test.go @@ -236,3 +236,47 @@ func withFloatValueCount(colname string, wantValue float64, valueCount int64) co } } } + +// withArrayLength validates how many rows in an ARRAY column have a given length. +func withArrayLength(colname string, wantLen int64, wantCount int64) constraintOption { + return func(vi *validationInfo) { + resultCol := fmt.Sprintf("arraylength_value_count_%s", colname) + vi.constraints[resultCol] = &constraint{ + projection: fmt.Sprintf("COUNTIF(ARRAY_LENGTH(%s) = %d) as %s", colname, wantLen, resultCol), + expectedValue: wantCount, + } + } +} + +// withDistinctArrayValues validates how many elements of an ARRAY column have a given cardinality. +func withDistinctArrayValues(colname string, distinctVals, wantCount int64) constraintOption { + return func(vi *validationInfo) { + resultCol := fmt.Sprintf("distinct_array_count_%s", colname) + vi.constraints[resultCol] = &constraint{ + projection: fmt.Sprintf("COUNTIF(ARRAY_LENGTH(ARRAY(SELECT DISTINCT element FROM UNNEST(%s) as element)) = %d) AS %s", colname, distinctVals, resultCol), + expectedValue: wantCount, + } + } +} + +// withIntegerArraySum validates the total sum of values in an ARRAY column. +func withIntegerArraySum(colname string, arraySum int64, wantCount int64) constraintOption { + return func(vi *validationInfo) { + resultCol := fmt.Sprintf("arraysum_int64_value_count_%s", colname) + vi.constraints[resultCol] = &constraint{ + projection: fmt.Sprintf("COUNTIF((SELECT SUM(elem) FROM UNNEST(%s) as elem) = %d) as %s", colname, arraySum, resultCol), + expectedValue: wantCount, + } + } +} + +// withFloatArraySum validates how many rows in an an ARRAY column have a given sum, within an error bound. +func withFloatArraySum(colname string, floatSum float64, wantCount int64) constraintOption { + return func(vi *validationInfo) { + resultCol := fmt.Sprintf("arraysum_float_value_count_%s", colname) + vi.constraints[resultCol] = &constraint{ + projection: fmt.Sprintf("COUNTIF(((SELECT ABS(SUM(elem)) FROM UNNEST(%s) as elem) - ABS(%f)) / ABS(%f) < 0.0001) as %s", colname, floatSum, floatSum, resultCol), + expectedValue: wantCount, + } + } +} diff --git a/bigquery/storage/managedwriter/validation_test.go b/bigquery/storage/managedwriter/validation_test.go index 640e57be4b83..24b1ef69448a 100644 --- a/bigquery/storage/managedwriter/validation_test.go +++ b/bigquery/storage/managedwriter/validation_test.go @@ -23,6 +23,10 @@ import ( "cloud.google.com/go/bigquery/storage/managedwriter/adapt" "cloud.google.com/go/bigquery/storage/managedwriter/testdata" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/dynamicpb" ) func TestValidation_Values(t *testing.T) { @@ -210,6 +214,180 @@ func TestValidation_Values(t *testing.T) { withNullCount("enum_field", 1), }, }, + { + description: "proto2 unpacked repeated non-empty", + tableSchema: testdata.ValidationRepeatedSchema, + inputRow: &testdata.ValidationP2UnpackedRepeated{ + Id: proto.Int64(2022), + DoubleRepeated: []float64{1.1, 2.2, 3.3}, + FloatRepeated: []float32{-4.4, -5.5, -6.6, -7.7}, + Int32Repeated: []int32{2, 4, 6, 6, 10}, + Int64Repeated: []int64{100, 200, 300, 300, 300, 600, 700}, + Uint32Repeated: []uint32{8675309, 8675309, 8675309, 8675309, 8675309, 8675309, 8675309}, + Sint32Repeated: []int32{-1, -2, -3, 4, 5, 6}, + Sint64Repeated: []int64{2}, + Fixed32Repeated: []uint32{}, + Sfixed32Repeated: []int32{-88, 100, -99, -88}, + Sfixed64Repeated: []int64{88, -100, 99, -2020}, + BoolRepeated: []bool{true, true, false, true}, + EnumRepeated: []testdata.Proto2ExampleEnum{testdata.Proto2ExampleEnum_P2_OTHER_THING, testdata.Proto2ExampleEnum_P2_THIRD_THING, testdata.Proto2ExampleEnum_P2_OTHER_THING}, + }, + constraints: []constraintOption{ + withExactRowCount(1), + + withArrayLength("double_repeated", 3, 1), + withArrayLength("float_repeated", 4, 1), + withArrayLength("int32_repeated", 5, 1), + withArrayLength("int64_repeated", 7, 1), + withArrayLength("uint32_repeated", 7, 1), + withArrayLength("sint32_repeated", 6, 1), + withArrayLength("sint64_repeated", 1, 1), + withArrayLength("fixed32_repeated", 0, 1), + withArrayLength("sfixed32_repeated", 4, 1), + withArrayLength("sfixed64_repeated", 4, 1), + withArrayLength("bool_repeated", 4, 1), + withArrayLength("enum_repeated", 3, 1), + + withDistinctArrayValues("double_repeated", 3, 1), + withDistinctArrayValues("float_repeated", 4, 1), + withDistinctArrayValues("int32_repeated", 4, 1), + withDistinctArrayValues("int64_repeated", 5, 1), + withDistinctArrayValues("uint32_repeated", 1, 1), + withDistinctArrayValues("sint32_repeated", 6, 1), + withDistinctArrayValues("sint64_repeated", 1, 1), + withDistinctArrayValues("fixed32_repeated", 0, 1), + withDistinctArrayValues("sfixed32_repeated", 3, 1), + withDistinctArrayValues("sfixed64_repeated", 4, 1), + withDistinctArrayValues("bool_repeated", 2, 1), + withDistinctArrayValues("enum_repeated", 2, 1), + + withFloatArraySum("double_repeated", 6.6, 1), + withFloatArraySum("float_repeated", -24.2, 1), + + withIntegerArraySum("int32_repeated", 28, 1), + withIntegerArraySum("int64_repeated", 2500, 1), + withIntegerArraySum("uint32_repeated", 60727163, 1), + withIntegerArraySum("sint32_repeated", 9, 1), + withIntegerArraySum("sint64_repeated", 2, 1), + withIntegerArraySum("enum_repeated", 7, 1), + }, + }, + { + description: "proto2 packed repeated non-empty", + tableSchema: testdata.ValidationRepeatedSchema, + inputRow: &testdata.ValidationP2PackedRepeated{ + Id: proto.Int64(2022), + DoubleRepeated: []float64{1.1, 2.2, 3.3}, + FloatRepeated: []float32{-4.4, -5.5, -6.6, -7.7}, + Int32Repeated: []int32{2, 4, 6, 6, 10}, + Int64Repeated: []int64{100, 200, 300, 300, 300, 600, 700}, + Uint32Repeated: []uint32{8675309, 8675309, 8675309, 8675309, 8675309, 8675309, 8675309}, + Sint32Repeated: []int32{-1, -2, -3, 4, 5, 6}, + Sint64Repeated: []int64{2}, + Fixed32Repeated: []uint32{}, + Sfixed32Repeated: []int32{-88, 100, -99, -88}, + Sfixed64Repeated: []int64{88, -100, 99, -2020}, + BoolRepeated: []bool{true, true, false, true}, + EnumRepeated: []testdata.Proto2ExampleEnum{testdata.Proto2ExampleEnum_P2_OTHER_THING, testdata.Proto2ExampleEnum_P2_THIRD_THING, testdata.Proto2ExampleEnum_P2_OTHER_THING}, + }, + constraints: []constraintOption{ + withExactRowCount(1), + + withArrayLength("double_repeated", 3, 1), + withArrayLength("float_repeated", 4, 1), + withArrayLength("int32_repeated", 5, 1), + withArrayLength("int64_repeated", 7, 1), + withArrayLength("uint32_repeated", 7, 1), + withArrayLength("sint32_repeated", 6, 1), + withArrayLength("sint64_repeated", 1, 1), + withArrayLength("fixed32_repeated", 0, 1), + withArrayLength("sfixed32_repeated", 4, 1), + withArrayLength("sfixed64_repeated", 4, 1), + withArrayLength("bool_repeated", 4, 1), + withArrayLength("enum_repeated", 3, 1), + + withDistinctArrayValues("double_repeated", 3, 1), + withDistinctArrayValues("float_repeated", 4, 1), + withDistinctArrayValues("int32_repeated", 4, 1), + withDistinctArrayValues("int64_repeated", 5, 1), + withDistinctArrayValues("uint32_repeated", 1, 1), + withDistinctArrayValues("sint32_repeated", 6, 1), + withDistinctArrayValues("sint64_repeated", 1, 1), + withDistinctArrayValues("fixed32_repeated", 0, 1), + withDistinctArrayValues("sfixed32_repeated", 3, 1), + withDistinctArrayValues("sfixed64_repeated", 4, 1), + withDistinctArrayValues("bool_repeated", 2, 1), + withDistinctArrayValues("enum_repeated", 2, 1), + + withFloatArraySum("double_repeated", 6.6, 1), + withFloatArraySum("float_repeated", -24.2, 1), + + withIntegerArraySum("int32_repeated", 28, 1), + withIntegerArraySum("int64_repeated", 2500, 1), + withIntegerArraySum("uint32_repeated", 60727163, 1), + withIntegerArraySum("sint32_repeated", 9, 1), + withIntegerArraySum("sint64_repeated", 2, 1), + withIntegerArraySum("enum_repeated", 7, 1), + }, + }, + { + description: "proto3 packed repeated non-empty", + tableSchema: testdata.ValidationRepeatedSchema, + inputRow: &testdata.ValidationP3PackedRepeated{ + Id: proto.Int64(2022), + DoubleRepeated: []float64{1.1, 2.2, 3.3}, + FloatRepeated: []float32{-4.4, -5.5, -6.6, -7.7}, + Int32Repeated: []int32{2, 4, 6, 6, 10}, + Int64Repeated: []int64{100, 200, 300, 300, 300, 600, 700}, + Uint32Repeated: []uint32{8675309, 8675309, 8675309, 8675309, 8675309, 8675309, 8675309}, + Sint32Repeated: []int32{-1, -2, -3, 4, 5, 6}, + Sint64Repeated: []int64{2}, + Fixed32Repeated: []uint32{}, + Sfixed32Repeated: []int32{-88, 100, -99, -88}, + Sfixed64Repeated: []int64{88, -100, 99, -2020}, + BoolRepeated: []bool{true, true, false, true}, + EnumRepeated: []testdata.Proto3ExampleEnum{testdata.Proto3ExampleEnum_P3_OTHER_THING, testdata.Proto3ExampleEnum_P3_THIRD_THING, testdata.Proto3ExampleEnum_P3_OTHER_THING}, + }, + constraints: []constraintOption{ + withExactRowCount(1), + + withArrayLength("double_repeated", 3, 1), + withArrayLength("float_repeated", 4, 1), + withArrayLength("int32_repeated", 5, 1), + withArrayLength("int64_repeated", 7, 1), + withArrayLength("uint32_repeated", 7, 1), + withArrayLength("sint32_repeated", 6, 1), + withArrayLength("sint64_repeated", 1, 1), + withArrayLength("fixed32_repeated", 0, 1), + withArrayLength("sfixed32_repeated", 4, 1), + withArrayLength("sfixed64_repeated", 4, 1), + withArrayLength("bool_repeated", 4, 1), + withArrayLength("enum_repeated", 3, 1), + + withDistinctArrayValues("double_repeated", 3, 1), + withDistinctArrayValues("float_repeated", 4, 1), + withDistinctArrayValues("int32_repeated", 4, 1), + withDistinctArrayValues("int64_repeated", 5, 1), + withDistinctArrayValues("uint32_repeated", 1, 1), + withDistinctArrayValues("sint32_repeated", 6, 1), + withDistinctArrayValues("sint64_repeated", 1, 1), + withDistinctArrayValues("fixed32_repeated", 0, 1), + withDistinctArrayValues("sfixed32_repeated", 3, 1), + withDistinctArrayValues("sfixed64_repeated", 4, 1), + withDistinctArrayValues("bool_repeated", 2, 1), + withDistinctArrayValues("enum_repeated", 2, 1), + + withFloatArraySum("double_repeated", 6.6, 1), + withFloatArraySum("float_repeated", -24.2, 1), + + withIntegerArraySum("int32_repeated", 28, 1), + withIntegerArraySum("int64_repeated", 2500, 1), + withIntegerArraySum("uint32_repeated", 60727163, 1), + withIntegerArraySum("sint32_repeated", 9, 1), + withIntegerArraySum("sint64_repeated", 2, 1), + withIntegerArraySum("enum_repeated", 7, 1), + }, + }, } // Common setup. @@ -271,3 +449,77 @@ func TestValidation_Values(t *testing.T) { validateTableConstraints(ctx, t, bqClient, testTable, tc.description, tc.constraints...) } } + +func TestValidationRoundtripRepeated(t *testing.T) { + // This test exists to confirm packed values are backwards compatible. + // We create a message using a packed descriptor, and normalize it which + // loses the packed option, and confirm we can decode the values using the + // normalized descriptor. + input := &testdata.ValidationP3PackedRepeated{ + Id: proto.Int64(2022), + Int64Repeated: []int64{1, 2, 4, -88}, + } + b, err := proto.Marshal(input) + if err != nil { + t.Fatalf("proto.Marshal: %v", err) + } + + // Verify original packed option (proto3 is default packed) + origDescriptor := input.ProtoReflect().Descriptor() + origFD := origDescriptor.Fields().ByName(protoreflect.Name("int64_repeated")) + if !origFD.IsPacked() { + t.Errorf("expected original field to be packed, wasn't") + } + + // Normalize and use it to get a new descriptor. + normalized, err := adapt.NormalizeDescriptor(input.ProtoReflect().Descriptor()) + if err != nil { + t.Fatalf("NormalizeDescriptor: %v", err) + } + fdp := &descriptorpb.FileDescriptorProto{ + MessageType: []*descriptorpb.DescriptorProto{normalized}, + Name: proto.String("lookup"), + Syntax: proto.String("proto2"), + } + fds := &descriptorpb.FileDescriptorSet{ + File: []*descriptorpb.FileDescriptorProto{fdp}, + } + files, err := protodesc.NewFiles(fds) + if err != nil { + t.Fatalf("protodesc.NewFiles: %v", err) + } + found, err := files.FindDescriptorByName("testdata_ValidationP3PackedRepeated") + if err != nil { + t.Fatalf("FindDescriptorByName: %v", err) + } + md := found.(protoreflect.MessageDescriptor) + + // Use the new, normalized descriptor to unmarshal the bytes and verify. + msg := dynamicpb.NewMessage(md) + if err := proto.Unmarshal(b, msg); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + + // + int64FD := msg.Descriptor().Fields().ByName(protoreflect.Name("int64_repeated")) // int64_repeated again + if int64FD == nil { + t.Fatalf("failed to get field") + } + if int64FD.IsPacked() { + t.Errorf("expected normalized descriptor to be un-packed, but it was packed") + } + // Ensure we got the expected values out the other side. + list := msg.Get(int64FD).List() + wantLen := 4 + if list.Len() != wantLen { + t.Errorf("wanted %d values, got %d", wantLen, list.Len()) + } + // Confirm the same values out the other side. + wantVals := []int64{1, 2, 4, -88} + for i := 0; i < list.Len(); i++ { + got := list.Get(i).Int() + if got != wantVals[i] { + t.Errorf("expected elem %d to be %d, was %d", i, wantVals[i], got) + } + } +} diff --git a/bigquery/table.go b/bigquery/table.go index 5ff66f39f215..3bfad2344e7d 100644 --- a/bigquery/table.go +++ b/bigquery/table.go @@ -581,7 +581,9 @@ func (t *Table) Create(ctx context.Context, tm *TableMetadata) (err error) { req := t.c.bqs.Tables.Insert(t.ProjectID, t.DatasetID, table).Context(ctx) setClientHeader(req.Header()) return runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.tables.insert") _, err = req.Do() + trace.EndSpan(ctx, err) return err }) } @@ -716,7 +718,9 @@ func (t *Table) Metadata(ctx context.Context, opts ...TableMetadataOption) (md * setClientHeader(tgc.call.Header()) var res *bq.Table if err := runWithRetry(ctx, func() (err error) { + sCtx := trace.StartSpan(ctx, "bigquery.tables.get") res, err = tgc.call.Do() + trace.EndSpan(sCtx, err) return err }); err != nil { return nil, err @@ -783,7 +787,9 @@ func (t *Table) Delete(ctx context.Context) (err error) { setClientHeader(call.Header()) return runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.tables.delete") err = call.Do() + trace.EndSpan(ctx, err) return err }) } @@ -841,7 +847,9 @@ func (t *Table) Update(ctx context.Context, tm TableMetadataToUpdate, etag strin } var res *bq.Table if err := runWithRetry(ctx, func() (err error) { + ctx = trace.StartSpan(ctx, "bigquery.tables.patch") res, err = tpc.call.Do() + trace.EndSpan(ctx, err) return err }); err != nil { return nil, err diff --git a/bigquery/table_integration_test.go b/bigquery/table_integration_test.go index c6e06fd1223a..689c911cccc7 100644 --- a/bigquery/table_integration_test.go +++ b/bigquery/table_integration_test.go @@ -78,7 +78,54 @@ func TestIntegration_TableCreateWithConstraints(t *testing.T) { if diff := testutil.Diff(meta.Schema, schema); diff != "" { t.Fatalf("got=-, want=+:\n%s", diff) } +} + +func TestIntegration_TableCreateWithDefaultValues(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + table := dataset.Table("defaultvalues") + schema := Schema{ + {Name: "str_col", Type: StringFieldType, DefaultValueExpression: "'FOO'"}, + {Name: "timestamp_col", Type: TimestampFieldType, DefaultValueExpression: "CURRENT_TIMESTAMP()"}, + } + err := table.Create(ctx, &TableMetadata{ + Schema: schema, + ExpirationTime: testTableExpiration.Add(5 * time.Minute), + }) + if err != nil { + t.Fatalf("table create error: %v", err) + } + + meta, err := table.Metadata(ctx) + if err != nil { + t.Fatalf("couldn't get metadata: %v", err) + } + + if diff := testutil.Diff(meta.Schema, schema); diff != "" { + t.Fatalf("got=-, want=+:\n%s", diff) + } + // SQL creation + id, _ := table.Identifier(StandardSQLID) + sql := fmt.Sprintf(` + CREATE OR REPLACE TABLE %s ( + str_col STRING DEFAULT 'FOO', + timestamp_col TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), + )`, id) + _, _, err = runQuerySQL(ctx, sql) + if err != nil { + t.Fatal(err) + } + meta, err = table.Metadata(ctx) + if err != nil { + t.Fatalf("couldn't get metadata after sql: %v", err) + } + + if diff := testutil.Diff(meta.Schema, schema); diff != "" { + t.Fatalf("sql create: got=-, want=+:\n%s", diff) + } } func TestIntegration_TableCreateView(t *testing.T) { diff --git a/bigquery/trace_integration_test.go b/bigquery/trace_integration_test.go new file mode 100644 index 000000000000..e3a3aaf00ca5 --- /dev/null +++ b/bigquery/trace_integration_test.go @@ -0,0 +1,99 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigquery + +import ( + "context" + "strings" + "testing" + "time" + + "go.opencensus.io/trace" +) + +// testExporter is a testing exporter for validating captured spans. +type testExporter struct { + spans []*trace.SpanData +} + +func (te *testExporter) ExportSpan(s *trace.SpanData) { + te.spans = append(te.spans, s) +} + +// hasSpans checks that the exporter has all the span names +// specified in the slice. It returns the unmatched names. +func (te *testExporter) hasSpans(names []string) []string { + matches := make(map[string]struct{}) + for _, n := range names { + matches[n] = struct{}{} + } + for _, s := range te.spans { + delete(matches, s.Name) + } + var unmatched []string + for k := range matches { + unmatched = append(unmatched, k) + } + return unmatched +} + +func TestIntegration_Tracing(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + + ctx := context.Background() + + for _, tc := range []struct { + description string + callF func(ctx context.Context) + wantSpans []string + }{ + { + description: "fast path query", + callF: func(ctx context.Context) { + client.Query("SELECT SESSION_USER()").Read(ctx) + }, + wantSpans: []string{"bigquery.jobs.query", "cloud.google.com/go/bigquery.Query.Run"}, + }, + { + description: "slow path query", + callF: func(ctx context.Context) { + q := client.Query("SELECT SESSION_USER()") + q.JobTimeout = time.Hour + q.Read(ctx) + }, + wantSpans: []string{"bigquery.jobs.insert", "bigquery.jobs.getQueryResults", "cloud.google.com/go/bigquery.Job.Read", "cloud.google.com/go/bigquery.Query.Run"}, + }, + { + description: "table metadata", + callF: func(ctx context.Context) { + client.DatasetInProject("bigquery-public-data", "samples").Table("shakespeare").Metadata(ctx) + }, + wantSpans: []string{"bigquery.tables.get", "cloud.google.com/go/bigquery.Table.Metadata"}, + }, + } { + exporter := &testExporter{} + trace.RegisterExporter(exporter) + traceCtx, span := trace.StartSpan(ctx, "testspan", trace.WithSampler(trace.AlwaysSample())) + tc.callF(traceCtx) + span.End() + trace.UnregisterExporter(exporter) + + if unmatched := exporter.hasSpans(tc.wantSpans); len(unmatched) > 0 { + t.Errorf("case (%s): unmatched spans: %s", tc.description, strings.Join(unmatched, ",")) + } + } +} diff --git a/bigquery/value.go b/bigquery/value.go index 84e55acaae78..d1dffa91ca7f 100644 --- a/bigquery/value.go +++ b/bigquery/value.go @@ -178,6 +178,14 @@ func setGeography(v reflect.Value, x interface{}) error { return nil } +func setJSON(v reflect.Value, x interface{}) error { + if x == nil { + return errNoNulls + } + v.SetString(x.(string)) + return nil +} + func setBytes(v reflect.Value, x interface{}) error { if x == nil { v.SetBytes(nil) @@ -309,6 +317,18 @@ func determineSetFunc(ftype reflect.Type, stype FieldType) setFunc { } } + case JSONFieldType: + if ftype.Kind() == reflect.String { + return setJSON + } + if ftype == typeOfNullJSON { + return func(v reflect.Value, x interface{}) error { + return setNull(v, x, func() interface{} { + return NullJSON{JSONVal: x.(string), Valid: true} + }) + } + } + case BytesFieldType: if ftype == typeOfByteSlice { return setBytes @@ -435,6 +455,10 @@ func runOps(ops []structLoaderOp, vstruct reflect.Value, values []Value) error { err = setRepeated(field, values[op.valueIndex].([]Value), op.setFunc) } else { err = op.setFunc(field, values[op.valueIndex]) + if errors.Is(err, errNoNulls) { + f := vstruct.Type().FieldByIndex(op.fieldIndex) + err = fmt.Errorf("bigquery: NULL cannot be assigned to field `%s` of type %s", f.Name, f.Type.Name()) + } } if err != nil { return err @@ -960,6 +984,8 @@ func convertBasicType(val string, typ FieldType) (Value, error) { return Value(r), nil case GeographyFieldType: return val, nil + case JSONFieldType: + return val, nil case IntervalFieldType: i, err := ParseInterval(val) if err != nil { diff --git a/bigquery/value_test.go b/bigquery/value_test.go index 4d08336ed020..6b051366a6f6 100644 --- a/bigquery/value_test.go +++ b/bigquery/value_test.go @@ -16,9 +16,11 @@ package bigquery import ( "encoding/base64" + "errors" "fmt" "math" "math/big" + "reflect" "testing" "time" @@ -38,6 +40,7 @@ func TestConvertBasicValues(t *testing.T) { {Type: NumericFieldType}, {Type: BigNumericFieldType}, {Type: GeographyFieldType}, + {Type: JSONFieldType}, } row := &bq.TableRow{ F: []*bq.TableCell{ @@ -49,6 +52,7 @@ func TestConvertBasicValues(t *testing.T) { {V: "123.123456789"}, {V: "99999999999999999999999999999999999999.99999999999999999999999999999999999999"}, {V: testGeography}, + {V: "{\"alpha\": \"beta\"}"}, }, } got, err := convertRow(row, schema) @@ -58,7 +62,7 @@ func TestConvertBasicValues(t *testing.T) { bigRatVal := new(big.Rat) bigRatVal.SetString("99999999999999999999999999999999999999.99999999999999999999999999999999999999") - want := []Value{"a", int64(1), 1.2, true, []byte("foo"), big.NewRat(123123456789, 1e9), bigRatVal, testGeography} + want := []Value{"a", int64(1), 1.2, true, []byte("foo"), big.NewRat(123123456789, 1e9), bigRatVal, testGeography, "{\"alpha\": \"beta\"}"} if !testutil.Equal(got, want) { t.Errorf("converting basic values: got:\n%v\nwant:\n%v", got, want) } @@ -1259,14 +1263,21 @@ func TestStructLoaderErrors(t *testing.T) { S string D civil.Date } + vstruct := reflect.ValueOf(s{}).Type() + fieldNames := []string{"I", "F", "B", "S", "D"} vals := []Value{int64(0), 0.0, false, "", testDate} mustLoad(t, &s{}, schema, vals) for i, e := range vals { vals[i] = nil got := load(&s{}, schema, vals) - if got != errNoNulls { + if errors.Is(got, errNoNulls) { t.Errorf("#%d: got %v, want %v", i, got, errNoNulls) } + f, _ := vstruct.FieldByName(fieldNames[i]) + expectedError := fmt.Sprintf("bigquery: NULL cannot be assigned to field `%s` of type %s", f.Name, f.Type.Name()) + if got.Error() != expectedError { + t.Errorf("#%d: got %v, want %v", i, got, expectedError) + } vals[i] = e } diff --git a/bigtable/.release-please-manifest.json b/bigtable/.release-please-manifest.json index aa8417bc439e..9eae5cdfde1d 100644 --- a/bigtable/.release-please-manifest.json +++ b/bigtable/.release-please-manifest.json @@ -1,3 +1,3 @@ { - "bigtable": "1.14.0" + "bigtable": "1.16.0" } diff --git a/bigtable/CHANGES.md b/bigtable/CHANGES.md index 58a2022e4399..54845b339583 100644 --- a/bigtable/CHANGES.md +++ b/bigtable/CHANGES.md @@ -1,5 +1,33 @@ # Changes +## [1.16.0](https://github.com/googleapis/google-cloud-go/compare/bigtable/v1.15.0...bigtable/v1.16.0) (2022-07-27) + + +### Features + +* **bigtable:** add PolicyType for GCPolicy and expose public methods for different types of GC policies ([#6314](https://github.com/googleapis/google-cloud-go/issues/6314)) ([2971037](https://github.com/googleapis/google-cloud-go/commit/2971037040dd5c2cf712e33ef49cfdfc238c02cc)) +* **bigtable:** adds autoscaling target storage per node ([#6317](https://github.com/googleapis/google-cloud-go/issues/6317)) ([5eab4c3](https://github.com/googleapis/google-cloud-go/commit/5eab4c336075ae5aae78794d73bd0d8d1342813c)) + + +### Bug Fixes + +* **bigtable:** make code buildable ([#6436](https://github.com/googleapis/google-cloud-go/issues/6436)) ([6bd5ce8](https://github.com/googleapis/google-cloud-go/commit/6bd5ce85ba52fff676bdef2a2bb7fc8ed001e766)), refs [#6419](https://github.com/googleapis/google-cloud-go/issues/6419) + +## [1.15.0](https://github.com/googleapis/google-cloud-go/compare/bigtable-v1.14.0...bigtable/v1.15.0) (2022-07-07) + + +### Features + +* **bigtable:** add file for tracking version ([17b36ea](https://github.com/googleapis/google-cloud-go/commit/17b36ead42a96b1a01105122074e65164357519e)) +* **bigtable:** add GC policy to FamilyInfo. ([#6234](https://github.com/googleapis/google-cloud-go/issues/6234)) ([eb0540d](https://github.com/googleapis/google-cloud-go/commit/eb0540d6f6bbc28074195730178991718c9c0d83)) +* **bigtable:** loadtest support app profile ([#5882](https://github.com/googleapis/google-cloud-go/issues/5882)) ([ec00e5a](https://github.com/googleapis/google-cloud-go/commit/ec00e5a3f0ab0e59bbdb6915ffb53a9dca5f168e)) +* **bigtable:** support PingAndWarm in emulator ([#5803](https://github.com/googleapis/google-cloud-go/issues/5803)) ([9b943d5](https://github.com/googleapis/google-cloud-go/commit/9b943d59fe7e86a037d239663dc64901e9b88a62)) + + +### Bug Fixes + +* **bigtable:** use internal.Version that is auto-updated for UA ([#5679](https://github.com/googleapis/google-cloud-go/issues/5679)) ([bd2c600](https://github.com/googleapis/google-cloud-go/commit/bd2c600145b1fd12c3ef4f314e4d72543e575206)), refs [#3330](https://github.com/googleapis/google-cloud-go/issues/3330) + ## [1.14.0](https://github.com/googleapis/google-cloud-go/compare/bigtable/v1.13.0...bigtable/v1.14.0) (2022-05-26) diff --git a/bigtable/admin.go b/bigtable/admin.go index 8b318ce409f1..647f692a21fc 100644 --- a/bigtable/admin.go +++ b/bigtable/admin.go @@ -83,7 +83,7 @@ func NewAdminClient(ctx context.Context, project, instance string, opts ...optio o = append(o, opts...) connPool, err := gtransport.DialPool(ctx, o...) if err != nil { - return nil, fmt.Errorf("dialing: %v", err) + return nil, fmt.Errorf("dialing: %w", err) } lroClient, err := lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) @@ -496,7 +496,7 @@ func (ac *AdminClient) Snapshots(ctx context.Context, cluster string) *SnapshotI for _, s := range resp.Snapshots { snapshotInfo, err := newSnapshotInfo(s) if err != nil { - return "", fmt.Errorf("failed to parse snapshot proto %v", err) + return "", fmt.Errorf("failed to parse snapshot proto %w", err) } it.items = append(it.items, snapshotInfo) } @@ -518,12 +518,12 @@ func newSnapshotInfo(snapshot *btapb.Snapshot) (*SnapshotInfo, error) { createTime, err := ptypes.Timestamp(snapshot.CreateTime) if err != nil { - return nil, fmt.Errorf("invalid createTime: %v", err) + return nil, fmt.Errorf("invalid createTime: %w", err) } deleteTime, err := ptypes.Timestamp(snapshot.DeleteTime) if err != nil { - return nil, fmt.Errorf("invalid deleteTime: %v", err) + return nil, fmt.Errorf("invalid deleteTime: %w", err) } return &SnapshotInfo{ @@ -722,7 +722,7 @@ func NewInstanceAdminClient(ctx context.Context, project string, opts ...option. o = append(o, opts...) connPool, err := gtransport.DialPool(ctx, o...) if err != nil { - return nil, fmt.Errorf("dialing: %v", err) + return nil, fmt.Errorf("dialing: %w", err) } lroClient, err := lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) @@ -927,12 +927,12 @@ func (iac *InstanceAdminClient) updateInstance(ctx context.Context, conf *Instan // UpdateInstanceWithClusters updates an instance and its clusters. Updateable // fields are instance display name, instance type and cluster size. // The provided InstanceWithClustersConfig is used as follows: -// - InstanceID is required -// - DisplayName and InstanceType are updated only if they are not empty -// - ClusterID is required for any provided cluster -// - All other cluster fields are ignored except for NumNodes and -// AutoscalingConfig, which if set will be updated. If both are provided, -// AutoscalingConfig takes precedence. +// - InstanceID is required +// - DisplayName and InstanceType are updated only if they are not empty +// - ClusterID is required for any provided cluster +// - All other cluster fields are ignored except for NumNodes and +// AutoscalingConfig, which if set will be updated. If both are provided, +// AutoscalingConfig takes precedence. // // This method may return an error after partially succeeding, for example if the instance is updated // but a cluster update fails. If an error is returned, InstanceInfo and Clusters may be called to @@ -962,7 +962,7 @@ func (iac *InstanceAdminClient) UpdateInstanceWithClusters(ctx context.Context, if clusterErr != nil { if updatedInstance { // We updated the instance, so note that in the error message. - return fmt.Errorf("UpdateCluster %q failed %v; however UpdateInstance succeeded", + return fmt.Errorf("UpdateCluster %q failed %w; however UpdateInstance succeeded", cluster.ClusterID, clusterErr) } return err @@ -1062,6 +1062,12 @@ type AutoscalingConfig struct { // CPUTargetPercent sets the CPU utilization target for your cluster's // workload. CPUTargetPercent int + // StorageUtilizationPerNode sets the storage usage target, in GB, for + // each node in a cluster. This number is limited between 2560 (2.5TiB) and + // 5120 (5TiB) for a SSD cluster and between 8192 (8TiB) and 16384 (16 TiB) + // for an HDD cluster. If set to zero, the default values are used: + // 2560 for SSD and 8192 for HDD. + StorageUtilizationPerNode int } func (a *AutoscalingConfig) proto() *btapb.Cluster_ClusterAutoscalingConfig { @@ -1074,7 +1080,8 @@ func (a *AutoscalingConfig) proto() *btapb.Cluster_ClusterAutoscalingConfig { MaxServeNodes: int32(a.MaxNodes), }, AutoscalingTargets: &btapb.AutoscalingTargets{ - CpuUtilizationPercent: int32(a.CPUTargetPercent), + CpuUtilizationPercent: int32(a.CPUTargetPercent), + StorageUtilizationGibPerNode: int32(a.StorageUtilizationPerNode), }, } } @@ -1340,9 +1347,10 @@ func fromClusterConfigProto(c *btapb.Cluster_ClusterConfig) *AutoscalingConfig { return nil } return &AutoscalingConfig{ - MinNodes: int(got.AutoscalingLimits.MinServeNodes), - MaxNodes: int(got.AutoscalingLimits.MaxServeNodes), - CPUTargetPercent: int(got.AutoscalingTargets.CpuUtilizationPercent), + MinNodes: int(got.AutoscalingLimits.MinServeNodes), + MaxNodes: int(got.AutoscalingLimits.MaxServeNodes), + CPUTargetPercent: int(got.AutoscalingTargets.CpuUtilizationPercent), + StorageUtilizationPerNode: int(got.AutoscalingTargets.StorageUtilizationGibPerNode), } } @@ -1600,19 +1608,19 @@ func max(x, y int) int { // UpdateInstanceAndSyncClusters updates an instance and its clusters, and will synchronize the // clusters in the instance with the provided clusters, creating and deleting them as necessary. // The provided InstanceWithClustersConfig is used as follows: -// - InstanceID is required -// - DisplayName and InstanceType are updated only if they are not empty -// - ClusterID is required for any provided cluster -// - Any cluster present in conf.Clusters but not part of the instance will be created using CreateCluster -// and the given ClusterConfig. -// - Any cluster missing from conf.Clusters but present in the instance will be removed from the instance -// using DeleteCluster. -// - Any cluster in conf.Clusters that also exists in the instance will be -// updated either to contain the provided number of nodes or to use the -// provided autoscaling config. If both the number of nodes and autoscaling -// are configured, autoscaling takes precedence. If the number of nodes is zero -// and autoscaling is not provided in InstanceWithClustersConfig, the cluster -// is not updated. +// - InstanceID is required +// - DisplayName and InstanceType are updated only if they are not empty +// - ClusterID is required for any provided cluster +// - Any cluster present in conf.Clusters but not part of the instance will be created using CreateCluster +// and the given ClusterConfig. +// - Any cluster missing from conf.Clusters but present in the instance will be removed from the instance +// using DeleteCluster. +// - Any cluster in conf.Clusters that also exists in the instance will be +// updated either to contain the provided number of nodes or to use the +// provided autoscaling config. If both the number of nodes and autoscaling +// are configured, autoscaling takes precedence. If the number of nodes is zero +// and autoscaling is not provided in InstanceWithClustersConfig, the cluster +// is not updated. // // This method may return an error after partially succeeding, for example if the instance is updated // but a cluster update fails. If an error is returned, InstanceInfo and Clusters may be called to @@ -1671,7 +1679,7 @@ func UpdateInstanceAndSyncClusters(ctx context.Context, iac *InstanceAdminClient cluster.NumNodes) } if updateErr != nil { - return results, fmt.Errorf("UpdateCluster %q failed %v; Progress: %v", + return results, fmt.Errorf("UpdateCluster %q failed %w; Progress: %v", cluster.ClusterID, updateErr, results) } results.UpdatedClusters = append(results.UpdatedClusters, cluster.ClusterID) @@ -1705,7 +1713,7 @@ func UpdateInstanceAndSyncClusters(ctx context.Context, iac *InstanceAdminClient clusterToDelete := nextDeletion.Value.(string) err = iac.DeleteCluster(ctx, conf.InstanceID, clusterToDelete) if err != nil { - return results, fmt.Errorf("DeleteCluster %q failed %v; Progress: %v", + return results, fmt.Errorf("DeleteCluster %q failed %w; Progress: %v", clusterToDelete, err, results) } results.DeletedClusters = append(results.DeletedClusters, clusterToDelete) @@ -1721,7 +1729,7 @@ func UpdateInstanceAndSyncClusters(ctx context.Context, iac *InstanceAdminClient clusterToCreate.InstanceID = conf.InstanceID err = iac.CreateCluster(ctx, &clusterToCreate) if err != nil { - return results, fmt.Errorf("CreateCluster %v failed %v; Progress: %v", + return results, fmt.Errorf("CreateCluster %v failed %w; Progress: %v", clusterToCreate, err, results) } results.CreatedClusters = append(results.CreatedClusters, clusterToCreate.ClusterID) @@ -1821,7 +1829,7 @@ func (ac *AdminClient) Backups(ctx context.Context, cluster string) *BackupItera for _, s := range resp.Backups { backupInfo, err := newBackupInfo(s) if err != nil { - return "", fmt.Errorf("failed to parse backup proto %v", err) + return "", fmt.Errorf("failed to parse backup proto %w", err) } it.items = append(it.items, backupInfo) } @@ -1844,17 +1852,17 @@ func newBackupInfo(backup *btapb.Backup) (*BackupInfo, error) { startTime, err := ptypes.Timestamp(backup.StartTime) if err != nil { - return nil, fmt.Errorf("invalid startTime: %v", err) + return nil, fmt.Errorf("invalid startTime: %w", err) } endTime, err := ptypes.Timestamp(backup.EndTime) if err != nil { - return nil, fmt.Errorf("invalid endTime: %v", err) + return nil, fmt.Errorf("invalid endTime: %w", err) } expireTime, err := ptypes.Timestamp(backup.ExpireTime) if err != nil { - return nil, fmt.Errorf("invalid expireTime: %v", err) + return nil, fmt.Errorf("invalid expireTime: %w", err) } encryptionInfo := newEncryptionInfo(backup.EncryptionInfo) bi := BackupInfo{ diff --git a/bigtable/admin_test.go b/bigtable/admin_test.go index 602cef141059..4c708e5f514a 100644 --- a/bigtable/admin_test.go +++ b/bigtable/admin_test.go @@ -129,13 +129,14 @@ func TestInstanceAdmin_GetCluster(t *testing.T) { MaxServeNodes: 2, }, AutoscalingTargets: &btapb.AutoscalingTargets{ - CpuUtilizationPercent: 10, + CpuUtilizationPercent: 10, + StorageUtilizationGibPerNode: 3000, }, }, }, }, }, - wantConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + wantConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }, } @@ -186,13 +187,14 @@ func TestInstanceAdmin_Clusters(t *testing.T) { MaxServeNodes: 2, }, AutoscalingTargets: &btapb.AutoscalingTargets{ - CpuUtilizationPercent: 10, + CpuUtilizationPercent: 10, + StorageUtilizationGibPerNode: 3000, }, }, }, }, }, - wantConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + wantConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }, } @@ -221,9 +223,10 @@ func TestInstanceAdmin_SetAutoscaling(t *testing.T) { c := setupClient(t, mock) err := c.SetAutoscaling(context.Background(), "myinst", "mycluster", AutoscalingConfig{ - MinNodes: 1, - MaxNodes: 2, - CPUTargetPercent: 10, + MinNodes: 1, + MaxNodes: 2, + CPUTargetPercent: 10, + StorageUtilizationPerNode: 3000, }) if err != nil { t.Fatalf("SetAutoscaling failed: %v", err) @@ -256,6 +259,11 @@ func TestInstanceAdmin_SetAutoscaling(t *testing.T) { if gotCPU := gotConfig.AutoscalingTargets.CpuUtilizationPercent; wantCPU != gotCPU { t.Fatalf("want autoscaling cpu = %v, got = %v", wantCPU, gotCPU) } + + wantStorage := int32(3000) + if gotStorage := gotConfig.AutoscalingTargets.StorageUtilizationGibPerNode; wantStorage != gotStorage { + t.Fatalf("want autoscaling storage = %v, got = %v", wantStorage, gotStorage) + } } func TestInstanceAdmin_UpdateCluster_RemovingAutoscaling(t *testing.T) { @@ -288,7 +296,7 @@ func TestInstanceAdmin_CreateInstance_WithAutoscaling(t *testing.T) { ClusterId: "mycluster", Zone: "us-central1-a", StorageType: SSD, - AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }) if err != nil { t.Fatalf("CreateInstance failed: %v", err) @@ -346,7 +354,7 @@ func TestInstanceAdmin_CreateInstanceWithClusters_WithAutoscaling(t *testing.T) ClusterID: "mycluster", Zone: "us-central1-a", StorageType: SSD, - AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }, }, }) @@ -382,7 +390,7 @@ func TestInstanceAdmin_CreateCluster_WithAutoscaling(t *testing.T) { ClusterID: "mycluster", Zone: "us-central1-a", StorageType: SSD, - AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }) if err != nil { t.Fatalf("CreateCluster failed: %v", err) @@ -406,6 +414,11 @@ func TestInstanceAdmin_CreateCluster_WithAutoscaling(t *testing.T) { t.Fatalf("want autoscaling cpu = %v, got = %v", wantCPU, gotCPU) } + wantStorage := int32(3000) + if gotStorage := gotConfig.AutoscalingTargets.StorageUtilizationGibPerNode; wantStorage != gotStorage { + t.Fatalf("want autoscaling storage = %v, got = %v", wantStorage, gotStorage) + } + err = c.CreateCluster(context.Background(), &ClusterConfig{ ClusterID: "mycluster", Zone: "us-central1-a", @@ -459,7 +472,7 @@ func TestInstanceAdmin_UpdateInstanceWithClusters_WithAutoscaling(t *testing.T) { ClusterID: "mycluster", Zone: "us-central1-a", - AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }, }, }) @@ -485,6 +498,11 @@ func TestInstanceAdmin_UpdateInstanceWithClusters_WithAutoscaling(t *testing.T) t.Fatalf("want autoscaling cpu = %v, got = %v", wantCPU, gotCPU) } + wantStorage := int32(3000) + if gotStorage := gotConfig.AutoscalingTargets.StorageUtilizationGibPerNode; wantStorage != gotStorage { + t.Fatalf("want autoscaling storage = %v, got = %v", wantStorage, gotStorage) + } + err = c.UpdateInstanceWithClusters(context.Background(), &InstanceWithClustersConfig{ InstanceID: "myinst", DisplayName: "myinst", @@ -522,7 +540,8 @@ func TestInstanceAdmin_UpdateInstanceAndSyncClusters_WithAutoscaling(t *testing. MaxServeNodes: 2, }, AutoscalingTargets: &btapb.AutoscalingTargets{ - CpuUtilizationPercent: 10, + CpuUtilizationPercent: 10, + StorageUtilizationGibPerNode: 3000, }, }, }, @@ -538,7 +557,7 @@ func TestInstanceAdmin_UpdateInstanceAndSyncClusters_WithAutoscaling(t *testing. { ClusterID: "mycluster", Zone: "us-central1-a", - AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10}, + AutoscalingConfig: &AutoscalingConfig{MinNodes: 1, MaxNodes: 2, CPUTargetPercent: 10, StorageUtilizationPerNode: 3000}, }, }, }) @@ -564,6 +583,11 @@ func TestInstanceAdmin_UpdateInstanceAndSyncClusters_WithAutoscaling(t *testing. t.Fatalf("want autoscaling cpu = %v, got = %v", wantCPU, gotCPU) } + wantStorage := int32(3000) + if gotStorage := gotConfig.AutoscalingTargets.StorageUtilizationGibPerNode; wantStorage != gotStorage { + t.Fatalf("want autoscaling storage = %v, got = %v", wantStorage, gotStorage) + } + _, err = UpdateInstanceAndSyncClusters(context.Background(), c, &InstanceWithClustersConfig{ InstanceID: "myinst", DisplayName: "myinst", diff --git a/bigtable/bigtable.go b/bigtable/bigtable.go index 3b558a4f1ed8..307f8f43bceb 100644 --- a/bigtable/bigtable.go +++ b/bigtable/bigtable.go @@ -86,7 +86,7 @@ func NewClientWithConfig(ctx context.Context, project, instance string, config C o = append(o, opts...) connPool, err := gtransport.DialPool(ctx, o...) if err != nil { - return nil, fmt.Errorf("dialing: %v", err) + return nil, fmt.Errorf("dialing: %w", err) } return &Client{ @@ -128,7 +128,7 @@ func (c *Client) fullTableName(table string) string { } func (c *Client) requestParamsHeaderValue(table string) string { - return fmt.Sprintf("table_name=%s&app_profile=%s", url.QueryEscape(c.fullTableName(table)), url.QueryEscape(c.appProfile)) + return fmt.Sprintf("table_name=%s&app_profile_id=%s", url.QueryEscape(c.fullTableName(table)), url.QueryEscape(c.appProfile)) } // mergeOutgoingMetadata returns a context populated by the existing outgoing diff --git a/bigtable/bigtable_test.go b/bigtable/bigtable_test.go index 84afbf50ea42..f17b6a4b8be4 100644 --- a/bigtable/bigtable_test.go +++ b/bigtable/bigtable_test.go @@ -285,7 +285,7 @@ func TestHeaderPopulatedWithAppProfile(t *testing.T) { if got, want := len(requestParamsHeaderValue), 1; got != want { t.Fatalf("Incorrect number of header values in requestParamsHeader. Got %d, want %d", got, want) } - if got, want := requestParamsHeaderValue[0], "table_name=projects%2Fmy-project%2Finstances%2Fmy-instance%2Ftables%2Fmy-table&app_profile=my-app-profile"; got != want { + if got, want := requestParamsHeaderValue[0], "table_name=projects%2Fmy-project%2Finstances%2Fmy-instance%2Ftables%2Fmy-table&app_profile_id=my-app-profile"; got != want { t.Errorf("Incorrect value in resourcePrefixHeader. Got %s, want %s", got, want) } } diff --git a/bigtable/bttest/example_test.go b/bigtable/bttest/example_test.go index 6348c7c485eb..5854a221ecac 100644 --- a/bigtable/bttest/example_test.go +++ b/bigtable/bttest/example_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bigtable/bttest/inmem.go b/bigtable/bttest/inmem.go index 5f4b24006522..6839c92e5fcd 100644 --- a/bigtable/bttest/inmem.go +++ b/bigtable/bttest/inmem.go @@ -19,6 +19,7 @@ Package bttest contains test helpers for working with the bigtable package. To use a Server, create it, and then connect to it with no security: (The project/instance values are ignored.) + srv, err := bttest.NewServer("localhost:0") ... conn, err := grpc.Dial(srv.Addr, grpc.WithInsecure()) diff --git a/bigtable/bttest/timestamp_test.go b/bigtable/bttest/timestamp_test.go index 7f0d93e7a60d..306254ef67ea 100644 --- a/bigtable/bttest/timestamp_test.go +++ b/bigtable/bttest/timestamp_test.go @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bigtable/bttest/validation.go b/bigtable/bttest/validation.go index 352a80b89827..7c4a0094b6eb 100644 --- a/bigtable/bttest/validation.go +++ b/bigtable/bttest/validation.go @@ -25,12 +25,12 @@ import ( ) // validateRowRanges returns a status.Error for req if: -// * both start_qualifier_closed and start_qualifier_open are set -// * both end_qualifier_closed and end_qualifier_open are set -// * start_qualifier_closed > end_qualifier_closed -// * start_qualifier_closed > end_qualifier_open -// * start_qualifier_open > end_qualifier_closed -// * start_qualifier_open > end_qualifier_open +// - both start_qualifier_closed and start_qualifier_open are set +// - both end_qualifier_closed and end_qualifier_open are set +// - start_qualifier_closed > end_qualifier_closed +// - start_qualifier_closed > end_qualifier_open +// - start_qualifier_open > end_qualifier_closed +// - start_qualifier_open > end_qualifier_open func validateRowRanges(req *btpb.ReadRowsRequest) error { rowRanges := req.GetRows().GetRowRanges() if len(rowRanges) == 0 { diff --git a/bigtable/cmd/loadtest/loadtest.go b/bigtable/cmd/loadtest/loadtest.go deleted file mode 100644 index 60346531d38d..000000000000 --- a/bigtable/cmd/loadtest/loadtest.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -Copyright 2015 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* -Loadtest does some load testing through the Go client library for Cloud Bigtable. -*/ -package main - -import ( - "bytes" - "context" - "flag" - "fmt" - "log" - "math/rand" - "os" - "os/signal" - "sync" - "sync/atomic" - "time" - - "cloud.google.com/go/bigtable" - "cloud.google.com/go/bigtable/internal/stat" - "cloud.google.com/go/cbt" - "google.golang.org/api/option" - "google.golang.org/grpc" -) - -var ( - runFor = flag.Duration("run_for", 5*time.Second, - "how long to run the load test for; 0 to run forever until SIGTERM") - scratchTable = flag.String("scratch_table", "loadtest-scratch", "name of table to use; should not already exist") - csvOutput = flag.String("csv_output", "", - "output path for statistics in .csv format. If this file already exists it will be overwritten.") - poolSize = flag.Int("pool_size", 1, "size of the gRPC connection pool to use for the data client") - reqCount = flag.Int("req_count", 100, "number of concurrent requests") - appProfile = flag.String("app_profile", "", "The application profile to use.") - - config *cbt.Config - client *bigtable.Client - adminClient *bigtable.AdminClient -) - -func main() { - var err error - config, err = cbt.Load() - if err != nil { - log.Fatal(err) - } - config.RegisterFlags() - - flag.Parse() - if err := config.CheckFlags(cbt.ProjectAndInstanceRequired); err != nil { - log.Fatal(err) - } - if config.Creds != "" { - os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", config.Creds) - } - if flag.NArg() != 0 { - flag.Usage() - os.Exit(1) - } - - var options []option.ClientOption - if *poolSize > 1 { - options = append(options, - option.WithGRPCConnectionPool(*poolSize), - - // TODO(grpc/grpc-go#1388) using connection pool without WithBlock - // can cause RPCs to fail randomly. We can delete this after the issue is fixed. - option.WithGRPCDialOption(grpc.WithBlock())) - } - - var csvFile *os.File - if *csvOutput != "" { - csvFile, err = os.Create(*csvOutput) - if err != nil { - log.Fatalf("creating csv output file: %v", err) - } - defer csvFile.Close() - log.Printf("Writing statistics to %q ...", *csvOutput) - } - - log.Printf("Dialing connections...") - client, err = bigtable.NewClientWithConfig( - context.Background(), - config.Project, - config.Instance, - bigtable.ClientConfig{AppProfile: *appProfile}, - options..., - ) - if err != nil { - log.Fatalf("Making bigtable.Client: %v", err) - } - defer client.Close() - adminClient, err = bigtable.NewAdminClient(context.Background(), config.Project, config.Instance) - if err != nil { - log.Fatalf("Making bigtable.AdminClient: %v", err) - } - defer adminClient.Close() - - // Create a scratch table. - log.Printf("Setting up scratch table...") - tblConf := bigtable.TableConf{ - TableID: *scratchTable, - Families: map[string]bigtable.GCPolicy{"f": bigtable.MaxVersionsPolicy(1)}, - } - if err := adminClient.CreateTableFromConf(context.Background(), &tblConf); err != nil { - log.Fatalf("Making scratch table %q: %v", *scratchTable, err) - } - // Upon a successful run, delete the table. Don't bother checking for errors. - defer adminClient.DeleteTable(context.Background(), *scratchTable) - - // Also delete the table on SIGTERM. - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt) - go func() { - s := <-c - log.Printf("Caught %v, cleaning scratch table.", s) - _ = adminClient.DeleteTable(context.Background(), *scratchTable) - os.Exit(1) - }() - - log.Printf("Starting load test... (run for %v)", *runFor) - tbl := client.Open(*scratchTable) - sem := make(chan int, *reqCount) // limit the number of requests happening at once - var reads, writes stats - stopTime := time.Now().Add(*runFor) - var wg sync.WaitGroup - for time.Now().Before(stopTime) || *runFor == 0 { - sem <- 1 - wg.Add(1) - go func() { - defer wg.Done() - defer func() { <-sem }() - - ok := true - opStart := time.Now() - var stats *stats - defer func() { - stats.Record(ok, time.Since(opStart)) - }() - - row := fmt.Sprintf("row%d", rand.Intn(100)) // operate on 1 of 100 rows - - switch rand.Intn(10) { - default: - // read - stats = &reads - _, err := tbl.ReadRow(context.Background(), row, bigtable.RowFilter(bigtable.LatestNFilter(1))) - if err != nil { - log.Printf("Error doing read: %v", err) - ok = false - } - case 0, 1, 2, 3, 4: - // write - stats = &writes - mut := bigtable.NewMutation() - mut.Set("f", "col", bigtable.Now(), bytes.Repeat([]byte("0"), 1<<10)) // 1 KB write - if err := tbl.Apply(context.Background(), row, mut); err != nil { - log.Printf("Error doing mutation: %v", err) - ok = false - } - } - }() - } - wg.Wait() - - readsAgg := stat.NewAggregate("reads", reads.ds, reads.tries-reads.ok) - writesAgg := stat.NewAggregate("writes", writes.ds, writes.tries-writes.ok) - log.Printf("Reads (%d ok / %d tries):\n%v", reads.ok, reads.tries, readsAgg) - log.Printf("Writes (%d ok / %d tries):\n%v", writes.ok, writes.tries, writesAgg) - - if csvFile != nil { - stat.WriteCSV([]*stat.Aggregate{readsAgg, writesAgg}, csvFile) - } -} - -var allStats int64 // atomic - -type stats struct { - mu sync.Mutex - tries, ok int - ds []time.Duration -} - -func (s *stats) Record(ok bool, d time.Duration) { - s.mu.Lock() - s.tries++ - if ok { - s.ok++ - } - s.ds = append(s.ds, d) - s.mu.Unlock() - - if n := atomic.AddInt64(&allStats, 1); n%1000 == 0 { - log.Printf("Progress: done %d ops", n) - } -} diff --git a/bigtable/cmd/scantest/scantest.go b/bigtable/cmd/scantest/scantest.go deleted file mode 100644 index 425f280c24e8..000000000000 --- a/bigtable/cmd/scantest/scantest.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright 2016 Google LLC - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -/* -Scantest does scan-related load testing against Cloud Bigtable. The logic here -mimics a similar test written using the Java client. -*/ -package main - -import ( - "bytes" - "context" - "flag" - "fmt" - "log" - "math/rand" - "os" - "sync" - "sync/atomic" - "text/tabwriter" - "time" - - "cloud.google.com/go/bigtable" - "cloud.google.com/go/bigtable/internal/stat" - "cloud.google.com/go/cbt" -) - -var ( - runFor = flag.Duration("run_for", 5*time.Second, "how long to run the load test for") - numScans = flag.Int("concurrent_scans", 1, "number of concurrent scans") - rowLimit = flag.Int("row_limit", 10000, "max number of records per scan") - - config *cbt.Config - client *bigtable.Client -) - -func main() { - flag.Usage = func() { - fmt.Printf("Usage: scantest [options] \n\n") - flag.PrintDefaults() - } - - var err error - config, err = cbt.Load() - if err != nil { - log.Fatal(err) - } - config.RegisterFlags() - - flag.Parse() - if err := config.CheckFlags(cbt.ProjectAndInstanceRequired); err != nil { - log.Fatal(err) - } - if config.Creds != "" { - os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", config.Creds) - } - if flag.NArg() != 1 { - flag.Usage() - os.Exit(1) - } - - table := flag.Arg(0) - - log.Printf("Dialing connections...") - client, err = bigtable.NewClient(context.Background(), config.Project, config.Instance) - if err != nil { - log.Fatalf("Making bigtable.Client: %v", err) - } - defer client.Close() - - log.Printf("Starting scan test... (run for %v)", *runFor) - tbl := client.Open(table) - sem := make(chan int, *numScans) // limit the number of requests happening at once - var scans stats - - stopTime := time.Now().Add(*runFor) - var wg sync.WaitGroup - for time.Now().Before(stopTime) { - sem <- 1 - wg.Add(1) - go func() { - defer wg.Done() - defer func() { <-sem }() - - ok := true - opStart := time.Now() - defer func() { - scans.Record(ok, time.Since(opStart)) - }() - - // Start at a random row key - key := fmt.Sprintf("user%d", rand.Int63()) - limit := bigtable.LimitRows(int64(*rowLimit)) - noop := func(bigtable.Row) bool { return true } - if err := tbl.ReadRows(context.Background(), bigtable.NewRange(key, ""), noop, limit); err != nil { - log.Printf("Error during scan: %v", err) - ok = false - } - }() - } - wg.Wait() - - agg := stat.NewAggregate("scans", scans.ds, scans.tries-scans.ok) - log.Printf("Scans (%d ok / %d tries):\nscan times:\n%v\nthroughput (rows/second):\n%v", - scans.ok, scans.tries, agg, throughputString(agg)) -} - -func throughputString(agg *stat.Aggregate) string { - var buf bytes.Buffer - tw := tabwriter.NewWriter(&buf, 0, 0, 1, ' ', 0) // one-space padding - rowLimitF := float64(*rowLimit) - fmt.Fprintf( - tw, - "min:\t%.2f\nmedian:\t%.2f\nmax:\t%.2f\n", - rowLimitF/agg.Max.Seconds(), - rowLimitF/agg.Median.Seconds(), - rowLimitF/agg.Min.Seconds()) - tw.Flush() - return buf.String() -} - -var allStats int64 // atomic - -type stats struct { - mu sync.Mutex - tries, ok int - ds []time.Duration -} - -func (s *stats) Record(ok bool, d time.Duration) { - s.mu.Lock() - s.tries++ - if ok { - s.ok++ - } - s.ds = append(s.ds, d) - s.mu.Unlock() - - if n := atomic.AddInt64(&allStats, 1); n%1000 == 0 { - log.Printf("Progress: done %d ops", n) - } -} diff --git a/bigtable/doc.go b/bigtable/doc.go index e02ead3e372c..5b27e47e055e 100644 --- a/bigtable/doc.go +++ b/bigtable/doc.go @@ -22,8 +22,7 @@ See https://cloud.google.com/bigtable/docs/ for general product documentation. See https://godoc.org/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. - -Reading +# Reading The principal way to read from a Bigtable is to use the ReadRows method on *Table. A RowRange specifies a contiguous portion of a table. A Filter may be @@ -49,8 +48,7 @@ To read a single row, use the ReadRow helper method: } // TODO: use r. - -Writing +# Writing This API exposes two distinct forms of writing to a Bigtable: a Mutation and a ReadModifyWrite. The former expresses idempotent operations. The latter @@ -88,8 +86,7 @@ To increment an encoded value in one cell: } // TODO: use r. - -Retries +# Retries If a read or write operation encounters a transient error it will be retried until a successful response, an unretryable error or the context deadline is diff --git a/bigtable/gc.go b/bigtable/gc.go index 0c3efbddf25a..36d916673b5a 100644 --- a/bigtable/gc.go +++ b/bigtable/gc.go @@ -25,11 +25,20 @@ import ( bttdpb "google.golang.org/genproto/googleapis/bigtable/admin/v2" ) -type policyType int +// PolicyType represents the type of GCPolicy +type PolicyType int const ( - policyTypeUnion policyType = iota - policyTypeIntersection + // PolicyUnspecified represents type of NoGCPolicy + PolicyUnspecified PolicyType = iota + // PolicyMaxAge represents type of MaxAgeGCPolicy + PolicyMaxAge + // PolicyMaxVersion represents type of MaxVersionGCPolicy + PolicyMaxVersion + // PolicyUnion represents type of UnionGCPolicy + PolicyUnion + // PolicyIntersection represents type of IntersectionGCPolicy + PolicyIntersection ) // A GCPolicy represents a rule that determines which cells are eligible for garbage collection. @@ -38,24 +47,42 @@ type GCPolicy interface { proto() *bttdpb.GcRule } +// GetPolicyType takes a gc policy and return appropriate PolicyType +func GetPolicyType(gc GCPolicy) PolicyType { + switch gc.proto().Rule.(type) { + case *bttdpb.GcRule_Intersection_: + return PolicyIntersection + case *bttdpb.GcRule_Union_: + return PolicyUnion + case *bttdpb.GcRule_MaxAge: + return PolicyMaxAge + case *bttdpb.GcRule_MaxNumVersions: + return PolicyMaxVersion + default: + return PolicyUnspecified + } +} + // IntersectionPolicy returns a GC policy that only applies when all its sub-policies apply. -func IntersectionPolicy(sub ...GCPolicy) GCPolicy { return intersectionPolicy{sub} } +func IntersectionPolicy(sub ...GCPolicy) GCPolicy { return IntersectionGCPolicy{sub} } -type intersectionPolicy struct { - sub []GCPolicy +// IntersectionGCPolicy with list of children +type IntersectionGCPolicy struct { + // List of children policy in the intersection + Children []GCPolicy } -func (ip intersectionPolicy) String() string { +func (ip IntersectionGCPolicy) String() string { var ss []string - for _, sp := range ip.sub { + for _, sp := range ip.Children { ss = append(ss, sp.String()) } return "(" + strings.Join(ss, " && ") + ")" } -func (ip intersectionPolicy) proto() *bttdpb.GcRule { +func (ip IntersectionGCPolicy) proto() *bttdpb.GcRule { inter := &bttdpb.GcRule_Intersection{} - for _, sp := range ip.sub { + for _, sp := range ip.Children { inter.Rules = append(inter.Rules, sp.proto()) } return &bttdpb.GcRule{ @@ -64,23 +91,25 @@ func (ip intersectionPolicy) proto() *bttdpb.GcRule { } // UnionPolicy returns a GC policy that applies when any of its sub-policies apply. -func UnionPolicy(sub ...GCPolicy) GCPolicy { return unionPolicy{sub} } +func UnionPolicy(sub ...GCPolicy) GCPolicy { return UnionGCPolicy{sub} } -type unionPolicy struct { - sub []GCPolicy +// UnionGCPolicy with list of children +type UnionGCPolicy struct { + // List of children policy in the union + Children []GCPolicy } -func (up unionPolicy) String() string { +func (up UnionGCPolicy) String() string { var ss []string - for _, sp := range up.sub { + for _, sp := range up.Children { ss = append(ss, sp.String()) } return "(" + strings.Join(ss, " || ") + ")" } -func (up unionPolicy) proto() *bttdpb.GcRule { +func (up UnionGCPolicy) proto() *bttdpb.GcRule { union := &bttdpb.GcRule_Union{} - for _, sp := range up.sub { + for _, sp := range up.Children { union.Rules = append(union.Rules, sp.proto()) } return &bttdpb.GcRule{ @@ -90,21 +119,25 @@ func (up unionPolicy) proto() *bttdpb.GcRule { // MaxVersionsPolicy returns a GC policy that applies to all versions of a cell // except for the most recent n. -func MaxVersionsPolicy(n int) GCPolicy { return maxVersionsPolicy(n) } +func MaxVersionsPolicy(n int) GCPolicy { return MaxVersionsGCPolicy(n) } -type maxVersionsPolicy int +// MaxVersionsGCPolicy type alias +type MaxVersionsGCPolicy int -func (mvp maxVersionsPolicy) String() string { return fmt.Sprintf("versions() > %d", int(mvp)) } +func (mvp MaxVersionsGCPolicy) String() string { + return fmt.Sprintf("versions() > %d", int(mvp)) +} -func (mvp maxVersionsPolicy) proto() *bttdpb.GcRule { +func (mvp MaxVersionsGCPolicy) proto() *bttdpb.GcRule { return &bttdpb.GcRule{Rule: &bttdpb.GcRule_MaxNumVersions{MaxNumVersions: int32(mvp)}} } // MaxAgePolicy returns a GC policy that applies to all cells // older than the given age. -func MaxAgePolicy(d time.Duration) GCPolicy { return maxAgePolicy(d) } +func MaxAgePolicy(d time.Duration) GCPolicy { return MaxAgeGCPolicy(d) } -type maxAgePolicy time.Duration +// MaxAgeGCPolicy type alias +type MaxAgeGCPolicy time.Duration var units = []struct { d time.Duration @@ -115,17 +148,22 @@ var units = []struct { {time.Minute, "m"}, } -func (ma maxAgePolicy) String() string { +func (ma MaxAgeGCPolicy) String() string { + return fmt.Sprintf("age() > %s", ma.GetDurationString()) +} + +// GetDurationString returns the duration string of the MaxAgeGCPolicy +func (ma MaxAgeGCPolicy) GetDurationString() string { d := time.Duration(ma) for _, u := range units { if d%u.d == 0 { - return fmt.Sprintf("age() > %d%s", d/u.d, u.suffix) + return fmt.Sprintf("%d%s", d/u.d, u.suffix) } } - return fmt.Sprintf("age() > %d", d/time.Microsecond) + return fmt.Sprintf("%d", d/time.Microsecond) } -func (ma maxAgePolicy) proto() *bttdpb.GcRule { +func (ma MaxAgeGCPolicy) proto() *bttdpb.GcRule { // This doesn't handle overflows, etc. // Fix this if people care about GC policies over 290 years. ns := time.Duration(ma).Nanoseconds() @@ -171,9 +209,9 @@ func gcRuleToPolicy(rule *bttdpb.GcRule) GCPolicy { } switch r := rule.Rule.(type) { case *bttdpb.GcRule_Intersection_: - return compoundRuleToPolicy(r.Intersection.Rules, policyTypeIntersection) + return compoundRuleToPolicy(r.Intersection.Rules, PolicyIntersection) case *bttdpb.GcRule_Union_: - return compoundRuleToPolicy(r.Union.Rules, policyTypeUnion) + return compoundRuleToPolicy(r.Union.Rules, PolicyUnion) case *bttdpb.GcRule_MaxAge: return MaxAgePolicy(time.Duration(r.MaxAge.Seconds) * time.Second) case *bttdpb.GcRule_MaxNumVersions: @@ -191,7 +229,7 @@ func joinRules(rules []*bttdpb.GcRule, sep string) string { return "(" + strings.Join(chunks, sep) + ")" } -func compoundRuleToPolicy(rules []*bttdpb.GcRule, mode policyType) GCPolicy { +func compoundRuleToPolicy(rules []*bttdpb.GcRule, mode PolicyType) GCPolicy { sub := []GCPolicy{} for _, r := range rules { p := gcRuleToPolicy(r) @@ -201,10 +239,10 @@ func compoundRuleToPolicy(rules []*bttdpb.GcRule, mode policyType) GCPolicy { } switch mode { - case policyTypeUnion: - return unionPolicy{sub: sub} - case policyTypeIntersection: - return intersectionPolicy{sub: sub} + case PolicyUnion: + return UnionGCPolicy{Children: sub} + case PolicyIntersection: + return IntersectionGCPolicy{Children: sub} default: return NoGcPolicy() } diff --git a/bigtable/gc_test.go b/bigtable/gc_test.go index 81e80bef2d06..0bc12130d647 100644 --- a/bigtable/gc_test.go +++ b/bigtable/gc_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bigtable/go.mod b/bigtable/go.mod index bb345cc7ead9..e72d3f494645 100644 --- a/bigtable/go.mod +++ b/bigtable/go.mod @@ -1,18 +1,37 @@ module cloud.google.com/go/bigtable -go 1.15 +go 1.18 require ( cloud.google.com/go v0.102.1 - cloud.google.com/go/cbt v0.0.0-20220623175013-c5b548bed66b cloud.google.com/go/iam v0.3.0 github.com/golang/protobuf v1.5.2 github.com/google/btree v1.1.2 github.com/google/go-cmp v0.5.8 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 rsc.io/binaryregexp v0.2.0 ) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect + github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect + github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect + github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect + google.golang.org/appengine v1.6.7 // indirect +) diff --git a/bigtable/go.sum b/bigtable/go.sum index 421454134b59..02f52b08e709 100644 --- a/bigtable/go.sum +++ b/bigtable/go.sum @@ -26,7 +26,6 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= @@ -37,9 +36,6 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.13.0/go.mod h1:26n+Af4kb+O8sUWehsIbsEMLb/X0cK2tVgAasJwSj20= -cloud.google.com/go/cbt v0.0.0-20220623175013-c5b548bed66b h1:eENtmSVdUaKEz96jMu+Ul3hpkYBp3LudAQn02/YI7e8= -cloud.google.com/go/cbt v0.0.0-20220623175013-c5b548bed66b/go.mod h1:CkqeqojVHWDoCbekSp1t3GWyypLSfE9XazqmS0pL3Xk= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -49,7 +45,6 @@ cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9U cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v0.1.1/go.mod h1:CKqrcnI/suGpybEHxZ7BMehL0oA4LpdyJdUlTl9jVMw= cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -69,7 +64,6 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -88,7 +82,6 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -141,7 +134,6 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -178,8 +170,9 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -197,21 +190,12 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jhump/protoreflect v1.11.0/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= -github.com/jhump/protoreflect v1.12.0 h1:1NQ4FpWMgn3by/n1X0fbeKEUxP1wBt7+Oitpv01HR10= -github.com/jhump/protoreflect v1.12.0/go.mod h1:JytZfP5d0r8pVNLZvai7U/MCuTWITgrI4tTg7puQFKI= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -221,7 +205,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -318,8 +301,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -339,8 +322,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -402,7 +387,6 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -412,8 +396,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -519,8 +503,6 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.64.0/go.mod h1:931CdxA8Rm4t6zqTFGSsgwbAEZ2+GMYurbndwSimebM= -google.golang.org/api v0.65.0/go.mod h1:ArYhxgGadlWmqO1IqVujw6Cs8IdD33bTmzKo2Sh+cbg= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= @@ -529,8 +511,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -600,9 +582,6 @@ google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= @@ -620,8 +599,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b h1:SfSkJugek6xm7lWywqth4r2iTrYLpD8lOj1nMIIhMNM= +google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -652,8 +633,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -668,18 +650,14 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/bigtable/go_mod_tidy_hack.go b/bigtable/go_mod_tidy_hack.go deleted file mode 100644 index 364fbc3d7749..000000000000 --- a/bigtable/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package bigtable - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/bigtable/integration_test.go b/bigtable/integration_test.go index 3b98b8378822..ab3463d73ac6 100644 --- a/bigtable/integration_test.go +++ b/bigtable/integration_test.go @@ -1462,7 +1462,7 @@ func TestIntegration_AdminCreateInstance(t *testing.T) { t.Skip("emulator doesn't support instance creation") } - timeout := 5 * time.Minute + timeout := 7 * time.Minute ctx, _ := context.WithTimeout(context.Background(), timeout) iAdminClient, err := testEnv.NewInstanceAdminClient() @@ -1482,9 +1482,13 @@ func TestIntegration_AdminCreateInstance(t *testing.T) { InstanceType: DEVELOPMENT, Labels: map[string]string{"test-label-key": "test-label-value"}, } - if err := iAdminClient.CreateInstance(ctx, conf); err != nil { - t.Fatalf("CreateInstance: %v", err) - } + + // CreateInstance can be flaky; retry 3 times before marking as failing. + testutil.Retry(t, 3, 5*time.Second, func(r *testutil.R) { + if err := iAdminClient.CreateInstance(ctx, conf); err != nil { + t.Fatalf("CreateInstance: %v", err) + } + }) defer iAdminClient.DeleteInstance(ctx, instanceToCreate) @@ -1743,7 +1747,7 @@ func TestIntegration_AdminUpdateInstanceLabels(t *testing.T) { } // Create an instance admin client - timeout := 5 * time.Minute + timeout := 7 * time.Minute ctx, _ := context.WithTimeout(context.Background(), timeout) iAdminClient, err := testEnv.NewInstanceAdminClient() if err != nil { @@ -1759,9 +1763,12 @@ func TestIntegration_AdminUpdateInstanceLabels(t *testing.T) { InstanceType: DEVELOPMENT, Zone: instanceToCreateZone, } - if err := iAdminClient.CreateInstance(ctx, conf); err != nil { - t.Fatalf("CreateInstance: %v", err) - } + + testutil.Retry(t, 3, 5*time.Second, func(R *testutil.R) { + if err := iAdminClient.CreateInstance(ctx, conf); err != nil { + t.Fatalf("CreateInstance: %v", err) + } + }) defer iAdminClient.DeleteInstance(ctx, instanceToCreate) // Check the created test instances @@ -2265,7 +2272,7 @@ func TestIntegration_InstanceAdminClient_AppProfile(t *testing.T) { uniqueID := make([]byte, 4) rand.Read(uniqueID) - profileID := fmt.Sprintf("app_profile%x", uniqueID) + profileID := fmt.Sprintf("app_profile_id%x", uniqueID) err = iAdminClient.DeleteAppProfile(ctx, adminClient.instance, profileID) diff --git a/bigtable/internal/option/option.go b/bigtable/internal/option/option.go index 3fb5df9ad21f..dde511f32f45 100644 --- a/bigtable/internal/option/option.go +++ b/bigtable/internal/option/option.go @@ -84,7 +84,7 @@ func DefaultClientOptions(endpoint, mtlsEndpoint, scope, userAgent string) ([]op if addr := os.Getenv("BIGTABLE_EMULATOR_HOST"); addr != "" { conn, err := grpc.Dial(addr, grpc.WithInsecure()) if err != nil { - return nil, fmt.Errorf("emulator grpc.Dial: %v", err) + return nil, fmt.Errorf("emulator grpc.Dial: %w", err) } o = []option.ClientOption{option.WithGRPCConn(conn)} } else { diff --git a/bigtable/internal/version.go b/bigtable/internal/version.go index c9ba91825c29..b82e17a1938d 100644 --- a/bigtable/internal/version.go +++ b/bigtable/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.14.0" +const Version = "1.16.0" diff --git a/bigtable/release-please-config.json b/bigtable/release-please-config.json index 8456d2363c6a..66e52f3a14c9 100644 --- a/bigtable/release-please-config.json +++ b/bigtable/release-please-config.json @@ -7,5 +7,6 @@ "bigtable": { "component": "bigtable" } - } + }, + "plugins": ["sentence-case"] } diff --git a/bigtable/retry_test.go b/bigtable/retry_test.go index 8e7f82aea396..3df436e93ecc 100644 --- a/bigtable/retry_test.go +++ b/bigtable/retry_test.go @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/billing/CHANGES.md b/billing/CHANGES.md index 3bb14fd47742..205cd38e4392 100644 --- a/billing/CHANGES.md +++ b/billing/CHANGES.md @@ -1,5 +1,19 @@ # Changes +## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/billing/v1.3.0...billing/v1.4.0) (2022-09-19) + + +### Features + +* **billing:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/billing/v1.2.0...billing/v1.3.0) (2022-09-15) + + +### Features + +* **billing/budgets/apiv1beta1:** add REST transport ([f7b0822](https://github.com/googleapis/google-cloud-go/commit/f7b082212b1e46ff2f4126b52d49618785c2e8ca)) + ## [1.2.0](https://github.com/googleapis/google-cloud-go/compare/billing/v1.1.0...billing/v1.2.0) (2022-02-23) diff --git a/billing/apiv1/cloud_billing_client.go b/billing/apiv1/cloud_billing_client.go index 2241b73846c7..059d0b3aa1dd 100644 --- a/billing/apiv1/cloud_billing_client.go +++ b/billing/apiv1/cloud_billing_client.go @@ -224,7 +224,8 @@ func (c *CloudBillingClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *CloudBillingClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -400,7 +401,8 @@ func NewCloudBillingClient(ctx context.Context, opts ...option.ClientOption) (*C // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *cloudBillingGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/billing/apiv1/cloud_billing_client_example_test.go b/billing/apiv1/cloud_billing_client_example_test.go index 584155444c6c..f510f4f0cdfa 100644 --- a/billing/apiv1/cloud_billing_client_example_test.go +++ b/billing/apiv1/cloud_billing_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewCloudBillingClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewCloudBillingClient() { func ExampleCloudBillingClient_GetBillingAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -59,6 +69,11 @@ func ExampleCloudBillingClient_GetBillingAccount() { func ExampleCloudBillingClient_ListBillingAccounts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +100,11 @@ func ExampleCloudBillingClient_ListBillingAccounts() { func ExampleCloudBillingClient_UpdateBillingAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +125,11 @@ func ExampleCloudBillingClient_UpdateBillingAccount() { func ExampleCloudBillingClient_CreateBillingAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleCloudBillingClient_CreateBillingAccount() { func ExampleCloudBillingClient_ListProjectBillingInfo() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -151,6 +181,11 @@ func ExampleCloudBillingClient_ListProjectBillingInfo() { func ExampleCloudBillingClient_GetProjectBillingInfo() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -171,6 +206,11 @@ func ExampleCloudBillingClient_GetProjectBillingInfo() { func ExampleCloudBillingClient_UpdateProjectBillingInfo() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -191,6 +231,11 @@ func ExampleCloudBillingClient_UpdateProjectBillingInfo() { func ExampleCloudBillingClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -211,6 +256,11 @@ func ExampleCloudBillingClient_GetIamPolicy() { func ExampleCloudBillingClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. @@ -231,6 +281,11 @@ func ExampleCloudBillingClient_SetIamPolicy() { func ExampleCloudBillingClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudBillingClient(ctx) if err != nil { // TODO: Handle error. diff --git a/billing/apiv1/cloud_catalog_client.go b/billing/apiv1/cloud_catalog_client.go index 6587b1db60c0..35ac331a40e6 100644 --- a/billing/apiv1/cloud_catalog_client.go +++ b/billing/apiv1/cloud_catalog_client.go @@ -100,7 +100,8 @@ func (c *CloudCatalogClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *CloudCatalogClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -177,7 +178,8 @@ func NewCloudCatalogClient(ctx context.Context, opts ...option.ClientOption) (*C // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *cloudCatalogGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/billing/apiv1/cloud_catalog_client_example_test.go b/billing/apiv1/cloud_catalog_client_example_test.go index 8b4b9c07859d..73851d0c4392 100644 --- a/billing/apiv1/cloud_catalog_client_example_test.go +++ b/billing/apiv1/cloud_catalog_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewCloudCatalogClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudCatalogClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewCloudCatalogClient() { func ExampleCloudCatalogClient_ListServices() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudCatalogClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleCloudCatalogClient_ListServices() { func ExampleCloudCatalogClient_ListSkus() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := billing.NewCloudCatalogClient(ctx) if err != nil { // TODO: Handle error. diff --git a/billing/apiv1/doc.go b/billing/apiv1/doc.go index bc1c0f46e446..bfd876ed721b 100644 --- a/billing/apiv1/doc.go +++ b/billing/apiv1/doc.go @@ -20,45 +20,56 @@ // Allows developers to manage billing for their Google Cloud Platform // projects programmatically. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := billing.NewCloudBillingClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := billing.NewCloudBillingClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := billing.NewCloudBillingClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &billingpb.GetBillingAccountRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/billing/v1#GetBillingAccountRequest. -// } -// resp, err := c.GetBillingAccount(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := billing.NewCloudBillingClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &billingpb.GetBillingAccountRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/billing/v1#GetBillingAccountRequest. +// } +// resp, err := c.GetBillingAccount(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewCloudBillingClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/billing/budgets/apiv1/budget_client.go b/billing/budgets/apiv1/budget_client.go index 9af4741a3a33..a1f09854a662 100644 --- a/billing/budgets/apiv1/budget_client.go +++ b/billing/budgets/apiv1/budget_client.go @@ -154,7 +154,8 @@ func (c *BudgetClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BudgetClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -261,7 +262,8 @@ func NewBudgetClient(ctx context.Context, opts ...option.ClientOption) (*BudgetC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *budgetGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/billing/budgets/apiv1/budget_client_example_test.go b/billing/budgets/apiv1/budget_client_example_test.go index dbe8b5453e93..b556cb6941e8 100644 --- a/billing/budgets/apiv1/budget_client_example_test.go +++ b/billing/budgets/apiv1/budget_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBudgetClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBudgetClient() { func ExampleBudgetClient_CreateBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleBudgetClient_CreateBudget() { func ExampleBudgetClient_UpdateBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleBudgetClient_UpdateBudget() { func ExampleBudgetClient_GetBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +118,11 @@ func ExampleBudgetClient_GetBudget() { func ExampleBudgetClient_ListBudgets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleBudgetClient_ListBudgets() { func ExampleBudgetClient_DeleteBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. diff --git a/billing/budgets/apiv1/doc.go b/billing/budgets/apiv1/doc.go index b8e19dfdfb08..fcbeab8eb6f6 100644 --- a/billing/budgets/apiv1/doc.go +++ b/billing/budgets/apiv1/doc.go @@ -21,45 +21,56 @@ // budget plan and the rules to execute as spend is tracked against that // plan. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := budgets.NewBudgetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := budgets.NewBudgetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := budgets.NewBudgetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &budgetspb.CreateBudgetRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/billing/budgets/v1#CreateBudgetRequest. -// } -// resp, err := c.CreateBudget(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := budgets.NewBudgetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &budgetspb.CreateBudgetRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/billing/budgets/v1#CreateBudgetRequest. +// } +// resp, err := c.CreateBudget(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewBudgetClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/billing/budgets/apiv1beta1/budget_client.go b/billing/budgets/apiv1beta1/budget_client.go index 788049369d6c..aee69c8a07c5 100644 --- a/billing/budgets/apiv1beta1/budget_client.go +++ b/billing/budgets/apiv1beta1/budget_client.go @@ -17,21 +17,27 @@ package budgets import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" budgetspb "google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -112,6 +118,56 @@ func defaultBudgetCallOptions() *BudgetCallOptions { } } +func defaultBudgetRESTCallOptions() *BudgetCallOptions { + return &BudgetCallOptions{ + CreateBudget: []gax.CallOption{}, + UpdateBudget: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetBudget: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListBudgets: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteBudget: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + } +} + // internalBudgetClient is an interface that defines the methods available from Cloud Billing Budget API. type internalBudgetClient interface { Close() error @@ -154,7 +210,8 @@ func (c *BudgetClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BudgetClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -261,7 +318,8 @@ func NewBudgetClient(ctx context.Context, opts ...option.ClientOption) (*BudgetC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *budgetGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -281,6 +339,75 @@ func (c *budgetGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type budgetRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing BudgetClient + CallOptions **BudgetCallOptions +} + +// NewBudgetRESTClient creates a new budget service rest client. +// +// BudgetService stores Cloud Billing budgets, which define a +// budget plan and rules to execute as we track spend against that plan. +func NewBudgetRESTClient(ctx context.Context, opts ...option.ClientOption) (*BudgetClient, error) { + clientOpts := append(defaultBudgetRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultBudgetRESTCallOptions() + c := &budgetRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &BudgetClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultBudgetRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://billingbudgets.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://billingbudgets.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://billingbudgets.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *budgetRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *budgetRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *budgetRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *budgetGRPCClient) CreateBudget(ctx context.Context, req *budgetspb.CreateBudgetRequest, opts ...gax.CallOption) (*budgetspb.Budget, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) @@ -410,6 +537,315 @@ func (c *budgetGRPCClient) DeleteBudget(ctx context.Context, req *budgetspb.Dele return err } +// CreateBudget creates a new budget. See +// Quotas and limits (at https://cloud.google.com/billing/quotas) +// for more information on the limits of the number of budgets you can create. +func (c *budgetRESTClient) CreateBudget(ctx context.Context, req *budgetspb.CreateBudgetRequest, opts ...gax.CallOption) (*budgetspb.Budget, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/budgets", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateBudget[0:len((*c.CallOptions).CreateBudget):len((*c.CallOptions).CreateBudget)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &budgetspb.Budget{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateBudget updates a budget and returns the updated budget. +// +// WARNING: There are some fields exposed on the Google Cloud Console that +// aren’t available on this API. Budget fields that are not exposed in +// this API will not be changed by this method. +func (c *budgetRESTClient) UpdateBudget(ctx context.Context, req *budgetspb.UpdateBudgetRequest, opts ...gax.CallOption) (*budgetspb.Budget, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetBudget().GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "budget.name", url.QueryEscape(req.GetBudget().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateBudget[0:len((*c.CallOptions).UpdateBudget):len((*c.CallOptions).UpdateBudget)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &budgetspb.Budget{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetBudget returns a budget. +// +// WARNING: There are some fields exposed on the Google Cloud Console that +// aren’t available on this API. When reading from the API, you will not +// see these fields in the return value, though they may have been set +// in the Cloud Console. +func (c *budgetRESTClient) GetBudget(ctx context.Context, req *budgetspb.GetBudgetRequest, opts ...gax.CallOption) (*budgetspb.Budget, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetBudget[0:len((*c.CallOptions).GetBudget):len((*c.CallOptions).GetBudget)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &budgetspb.Budget{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListBudgets returns a list of budgets for a billing account. +// +// WARNING: There are some fields exposed on the Google Cloud Console that +// aren’t available on this API. When reading from the API, you will not +// see these fields in the return value, though they may have been set +// in the Cloud Console. +func (c *budgetRESTClient) ListBudgets(ctx context.Context, req *budgetspb.ListBudgetsRequest, opts ...gax.CallOption) *BudgetIterator { + it := &BudgetIterator{} + req = proto.Clone(req).(*budgetspb.ListBudgetsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*budgetspb.Budget, string, error) { + resp := &budgetspb.ListBudgetsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/budgets", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetBudgets(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteBudget deletes a budget. Returns successfully if already deleted. +func (c *budgetRESTClient) DeleteBudget(ctx context.Context, req *budgetspb.DeleteBudgetRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + // BudgetIterator manages a stream of *budgetspb.Budget. type BudgetIterator struct { items []*budgetspb.Budget diff --git a/billing/budgets/apiv1beta1/budget_client_example_test.go b/billing/budgets/apiv1beta1/budget_client_example_test.go index f4ddaa18c42c..a6b6e50d5e82 100644 --- a/billing/budgets/apiv1beta1/budget_client_example_test.go +++ b/billing/budgets/apiv1beta1/budget_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBudgetClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -36,8 +41,30 @@ func ExampleNewBudgetClient() { _ = c } +func ExampleNewBudgetRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := budgets.NewBudgetRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleBudgetClient_CreateBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +85,11 @@ func ExampleBudgetClient_CreateBudget() { func ExampleBudgetClient_UpdateBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +110,11 @@ func ExampleBudgetClient_UpdateBudget() { func ExampleBudgetClient_GetBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +135,11 @@ func ExampleBudgetClient_GetBudget() { func ExampleBudgetClient_ListBudgets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +166,11 @@ func ExampleBudgetClient_ListBudgets() { func ExampleBudgetClient_DeleteBudget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := budgets.NewBudgetClient(ctx) if err != nil { // TODO: Handle error. diff --git a/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go b/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go new file mode 100644 index 000000000000..91bc4cf8de02 --- /dev/null +++ b/billing/budgets/apiv1beta1/budgetspb/budget_model.pb.go @@ -0,0 +1,1244 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/billing/budgets/v1beta1/budget_model.proto + +package budgetspb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + date "google.golang.org/genproto/googleapis/type/date" + money "google.golang.org/genproto/googleapis/type/money" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A `CalendarPeriod` represents the abstract concept of a time period that +// has a canonical start. Grammatically, "the start of the current +// `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian +// Pacific Time (UTC-8). +type CalendarPeriod int32 + +const ( + // Calendar period is unset. This is the default if the budget is for a + // custom time period (CustomPeriod). + CalendarPeriod_CALENDAR_PERIOD_UNSPECIFIED CalendarPeriod = 0 + // A month. Month starts on the first day of each month, such as January 1, + // February 1, March 1, and so on. + CalendarPeriod_MONTH CalendarPeriod = 1 + // A quarter. Quarters start on dates January 1, April 1, July 1, and October + // 1 of each year. + CalendarPeriod_QUARTER CalendarPeriod = 2 + // A year. Year starts on January 1. + CalendarPeriod_YEAR CalendarPeriod = 3 +) + +// Enum value maps for CalendarPeriod. +var ( + CalendarPeriod_name = map[int32]string{ + 0: "CALENDAR_PERIOD_UNSPECIFIED", + 1: "MONTH", + 2: "QUARTER", + 3: "YEAR", + } + CalendarPeriod_value = map[string]int32{ + "CALENDAR_PERIOD_UNSPECIFIED": 0, + "MONTH": 1, + "QUARTER": 2, + "YEAR": 3, + } +) + +func (x CalendarPeriod) Enum() *CalendarPeriod { + p := new(CalendarPeriod) + *p = x + return p +} + +func (x CalendarPeriod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CalendarPeriod) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes[0].Descriptor() +} + +func (CalendarPeriod) Type() protoreflect.EnumType { + return &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes[0] +} + +func (x CalendarPeriod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CalendarPeriod.Descriptor instead. +func (CalendarPeriod) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{0} +} + +// The type of basis used to determine if spend has passed the threshold. +type ThresholdRule_Basis int32 + +const ( + // Unspecified threshold basis. + ThresholdRule_BASIS_UNSPECIFIED ThresholdRule_Basis = 0 + // Use current spend as the basis for comparison against the threshold. + ThresholdRule_CURRENT_SPEND ThresholdRule_Basis = 1 + // Use forecasted spend for the period as the basis for comparison against + // the threshold. + // FORECASTED_SPEND can only be set when the budget's time period is a + // [Filter.calendar_period][google.cloud.billing.budgets.v1beta1.Filter.calendar_period]. It cannot be set in combination with + // [Filter.custom_period][google.cloud.billing.budgets.v1beta1.Filter.custom_period]. + ThresholdRule_FORECASTED_SPEND ThresholdRule_Basis = 2 +) + +// Enum value maps for ThresholdRule_Basis. +var ( + ThresholdRule_Basis_name = map[int32]string{ + 0: "BASIS_UNSPECIFIED", + 1: "CURRENT_SPEND", + 2: "FORECASTED_SPEND", + } + ThresholdRule_Basis_value = map[string]int32{ + "BASIS_UNSPECIFIED": 0, + "CURRENT_SPEND": 1, + "FORECASTED_SPEND": 2, + } +) + +func (x ThresholdRule_Basis) Enum() *ThresholdRule_Basis { + p := new(ThresholdRule_Basis) + *p = x + return p +} + +func (x ThresholdRule_Basis) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ThresholdRule_Basis) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes[1].Descriptor() +} + +func (ThresholdRule_Basis) Type() protoreflect.EnumType { + return &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes[1] +} + +func (x ThresholdRule_Basis) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ThresholdRule_Basis.Descriptor instead. +func (ThresholdRule_Basis) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{3, 0} +} + +// Specifies how credits are applied when determining the spend for +// threshold calculations. Budgets track the total cost minus any applicable +// selected credits. +// [See the documentation for a list of credit +// types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). +type Filter_CreditTypesTreatment int32 + +const ( + Filter_CREDIT_TYPES_TREATMENT_UNSPECIFIED Filter_CreditTypesTreatment = 0 + // All types of credit are subtracted from the gross cost to determine the + // spend for threshold calculations. + Filter_INCLUDE_ALL_CREDITS Filter_CreditTypesTreatment = 1 + // All types of credit are added to the net cost to determine the spend for + // threshold calculations. + Filter_EXCLUDE_ALL_CREDITS Filter_CreditTypesTreatment = 2 + // [Credit + // types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) + // specified in the credit_types field are subtracted from the + // gross cost to determine the spend for threshold calculations. + Filter_INCLUDE_SPECIFIED_CREDITS Filter_CreditTypesTreatment = 3 +) + +// Enum value maps for Filter_CreditTypesTreatment. +var ( + Filter_CreditTypesTreatment_name = map[int32]string{ + 0: "CREDIT_TYPES_TREATMENT_UNSPECIFIED", + 1: "INCLUDE_ALL_CREDITS", + 2: "EXCLUDE_ALL_CREDITS", + 3: "INCLUDE_SPECIFIED_CREDITS", + } + Filter_CreditTypesTreatment_value = map[string]int32{ + "CREDIT_TYPES_TREATMENT_UNSPECIFIED": 0, + "INCLUDE_ALL_CREDITS": 1, + "EXCLUDE_ALL_CREDITS": 2, + "INCLUDE_SPECIFIED_CREDITS": 3, + } +) + +func (x Filter_CreditTypesTreatment) Enum() *Filter_CreditTypesTreatment { + p := new(Filter_CreditTypesTreatment) + *p = x + return p +} + +func (x Filter_CreditTypesTreatment) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Filter_CreditTypesTreatment) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes[2].Descriptor() +} + +func (Filter_CreditTypesTreatment) Type() protoreflect.EnumType { + return &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes[2] +} + +func (x Filter_CreditTypesTreatment) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Filter_CreditTypesTreatment.Descriptor instead. +func (Filter_CreditTypesTreatment) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{5, 0} +} + +// A budget is a plan that describes what you expect to spend on Cloud +// projects, plus the rules to execute as spend is tracked against that plan, +// (for example, send an alert when 90% of the target spend is met). +// The budget time period is configurable, with options such as month (default), +// quarter, year, or custom time period. +type Budget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of the budget. + // The resource name implies the scope of a budget. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // User data for display name in UI. + // Validation: <= 60 chars. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. Filters that define which resources are used to compute the actual spend + // against the budget amount, such as projects, services, and the budget's + // time period, as well as other filters. + BudgetFilter *Filter `protobuf:"bytes,3,opt,name=budget_filter,json=budgetFilter,proto3" json:"budget_filter,omitempty"` + // Required. Budgeted amount. + Amount *BudgetAmount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // Optional. Rules that trigger alerts (notifications of thresholds + // being crossed) when spend exceeds the specified percentages of the budget. + // + // Optional for `pubsubTopic` notifications. + // + // Required if using email notifications. + ThresholdRules []*ThresholdRule `protobuf:"bytes,5,rep,name=threshold_rules,json=thresholdRules,proto3" json:"threshold_rules,omitempty"` + // Optional. Rules to apply to notifications sent based on budget spend and thresholds. + AllUpdatesRule *AllUpdatesRule `protobuf:"bytes,6,opt,name=all_updates_rule,json=allUpdatesRule,proto3" json:"all_updates_rule,omitempty"` + // Optional. Etag to validate that the object is unchanged for a + // read-modify-write operation. + // An empty etag will cause an update to overwrite other changes. + Etag string `protobuf:"bytes,7,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *Budget) Reset() { + *x = Budget{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Budget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Budget) ProtoMessage() {} + +func (x *Budget) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Budget.ProtoReflect.Descriptor instead. +func (*Budget) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{0} +} + +func (x *Budget) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Budget) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Budget) GetBudgetFilter() *Filter { + if x != nil { + return x.BudgetFilter + } + return nil +} + +func (x *Budget) GetAmount() *BudgetAmount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Budget) GetThresholdRules() []*ThresholdRule { + if x != nil { + return x.ThresholdRules + } + return nil +} + +func (x *Budget) GetAllUpdatesRule() *AllUpdatesRule { + if x != nil { + return x.AllUpdatesRule + } + return nil +} + +func (x *Budget) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// The budgeted amount for each usage period. +type BudgetAmount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specification for what amount to use as the budget. + // + // Types that are assignable to BudgetAmount: + // + // *BudgetAmount_SpecifiedAmount + // *BudgetAmount_LastPeriodAmount + BudgetAmount isBudgetAmount_BudgetAmount `protobuf_oneof:"budget_amount"` +} + +func (x *BudgetAmount) Reset() { + *x = BudgetAmount{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BudgetAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BudgetAmount) ProtoMessage() {} + +func (x *BudgetAmount) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BudgetAmount.ProtoReflect.Descriptor instead. +func (*BudgetAmount) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{1} +} + +func (m *BudgetAmount) GetBudgetAmount() isBudgetAmount_BudgetAmount { + if m != nil { + return m.BudgetAmount + } + return nil +} + +func (x *BudgetAmount) GetSpecifiedAmount() *money.Money { + if x, ok := x.GetBudgetAmount().(*BudgetAmount_SpecifiedAmount); ok { + return x.SpecifiedAmount + } + return nil +} + +func (x *BudgetAmount) GetLastPeriodAmount() *LastPeriodAmount { + if x, ok := x.GetBudgetAmount().(*BudgetAmount_LastPeriodAmount); ok { + return x.LastPeriodAmount + } + return nil +} + +type isBudgetAmount_BudgetAmount interface { + isBudgetAmount_BudgetAmount() +} + +type BudgetAmount_SpecifiedAmount struct { + // A specified amount to use as the budget. + // `currency_code` is optional. If specified when creating a budget, it must + // match the currency of the billing account. If specified when updating a + // budget, it must match the currency_code of the existing budget. + // The `currency_code` is provided on output. + SpecifiedAmount *money.Money `protobuf:"bytes,1,opt,name=specified_amount,json=specifiedAmount,proto3,oneof"` +} + +type BudgetAmount_LastPeriodAmount struct { + // Use the last period's actual spend as the budget for the present period. + // LastPeriodAmount can only be set when the budget's time period is a + // [Filter.calendar_period][google.cloud.billing.budgets.v1beta1.Filter.calendar_period]. It cannot be set in combination with + // [Filter.custom_period][google.cloud.billing.budgets.v1beta1.Filter.custom_period]. + LastPeriodAmount *LastPeriodAmount `protobuf:"bytes,2,opt,name=last_period_amount,json=lastPeriodAmount,proto3,oneof"` +} + +func (*BudgetAmount_SpecifiedAmount) isBudgetAmount_BudgetAmount() {} + +func (*BudgetAmount_LastPeriodAmount) isBudgetAmount_BudgetAmount() {} + +// Describes a budget amount targeted to the last [Filter.calendar_period][google.cloud.billing.budgets.v1beta1.Filter.calendar_period] +// spend. At this time, the amount is automatically 100% of the last calendar +// period's spend; that is, there are no other options yet. +// Future configuration options will be described here (for example, configuring +// a percentage of last period's spend). +// LastPeriodAmount cannot be set for a budget configured with +// a [Filter.custom_period][google.cloud.billing.budgets.v1beta1.Filter.custom_period]. +type LastPeriodAmount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LastPeriodAmount) Reset() { + *x = LastPeriodAmount{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LastPeriodAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LastPeriodAmount) ProtoMessage() {} + +func (x *LastPeriodAmount) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LastPeriodAmount.ProtoReflect.Descriptor instead. +func (*LastPeriodAmount) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{2} +} + +// ThresholdRule contains the definition of a threshold. Threshold rules define +// the triggering events used to generate a budget notification email. When a +// threshold is crossed (spend exceeds the specified percentages of the +// budget), budget alert emails are sent to the email recipients you specify +// in the +// [NotificationsRule](#notificationsrule). +// +// Threshold rules also affect the fields included in the +// [JSON data +// object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) +// sent to a Pub/Sub topic. +// +// Threshold rules are _required_ if using email notifications. +// +// Threshold rules are _optional_ if only setting a +// [`pubsubTopic` NotificationsRule](#NotificationsRule), +// unless you want your JSON data object to include data about the thresholds +// you set. +// +// For more information, see +// [set budget threshold rules and +// actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions). +type ThresholdRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Send an alert when this threshold is exceeded. + // This is a 1.0-based percentage, so 0.5 = 50%. + // Validation: non-negative number. + ThresholdPercent float64 `protobuf:"fixed64,1,opt,name=threshold_percent,json=thresholdPercent,proto3" json:"threshold_percent,omitempty"` + // Optional. The type of basis used to determine if spend has passed the + // threshold. Behavior defaults to CURRENT_SPEND if not set. + SpendBasis ThresholdRule_Basis `protobuf:"varint,2,opt,name=spend_basis,json=spendBasis,proto3,enum=google.cloud.billing.budgets.v1beta1.ThresholdRule_Basis" json:"spend_basis,omitempty"` +} + +func (x *ThresholdRule) Reset() { + *x = ThresholdRule{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThresholdRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThresholdRule) ProtoMessage() {} + +func (x *ThresholdRule) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThresholdRule.ProtoReflect.Descriptor instead. +func (*ThresholdRule) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{3} +} + +func (x *ThresholdRule) GetThresholdPercent() float64 { + if x != nil { + return x.ThresholdPercent + } + return 0 +} + +func (x *ThresholdRule) GetSpendBasis() ThresholdRule_Basis { + if x != nil { + return x.SpendBasis + } + return ThresholdRule_BASIS_UNSPECIFIED +} + +// AllUpdatesRule defines notifications that are sent based on budget spend +// and thresholds. +type AllUpdatesRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The name of the Pub/Sub topic where budget related messages will be + // published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + // are sent at regular intervals to the topic. + // The topic needs to be created before the budget is created; see + // https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications + // for more details. + // Caller is expected to have + // `pubsub.topics.setIamPolicy` permission on the topic when it's set for a + // budget, otherwise, the API call will fail with PERMISSION_DENIED. See + // https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task + // for more details on Pub/Sub roles and permissions. + PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"` + // Optional. Required when [AllUpdatesRule.pubsub_topic][google.cloud.billing.budgets.v1beta1.AllUpdatesRule.pubsub_topic] is set. The schema version of + // the notification sent to [AllUpdatesRule.pubsub_topic][google.cloud.billing.budgets.v1beta1.AllUpdatesRule.pubsub_topic]. Only "1.0" is + // accepted. It represents the JSON schema as defined in + // https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + SchemaVersion string `protobuf:"bytes,2,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"` + // Optional. Targets to send notifications to when a threshold is exceeded. This is in + // addition to default recipients who have billing account IAM roles. + // The value is the full REST resource name of a monitoring notification + // channel with the form + // `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 + // channels are allowed. See + // https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients + // for more details. + MonitoringNotificationChannels []string `protobuf:"bytes,3,rep,name=monitoring_notification_channels,json=monitoringNotificationChannels,proto3" json:"monitoring_notification_channels,omitempty"` + // Optional. When set to true, disables default notifications sent when a threshold is + // exceeded. Default notifications are sent to those with Billing Account + // Administrator and Billing Account User IAM roles for the target account. + DisableDefaultIamRecipients bool `protobuf:"varint,4,opt,name=disable_default_iam_recipients,json=disableDefaultIamRecipients,proto3" json:"disable_default_iam_recipients,omitempty"` +} + +func (x *AllUpdatesRule) Reset() { + *x = AllUpdatesRule{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllUpdatesRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllUpdatesRule) ProtoMessage() {} + +func (x *AllUpdatesRule) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllUpdatesRule.ProtoReflect.Descriptor instead. +func (*AllUpdatesRule) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{4} +} + +func (x *AllUpdatesRule) GetPubsubTopic() string { + if x != nil { + return x.PubsubTopic + } + return "" +} + +func (x *AllUpdatesRule) GetSchemaVersion() string { + if x != nil { + return x.SchemaVersion + } + return "" +} + +func (x *AllUpdatesRule) GetMonitoringNotificationChannels() []string { + if x != nil { + return x.MonitoringNotificationChannels + } + return nil +} + +func (x *AllUpdatesRule) GetDisableDefaultIamRecipients() bool { + if x != nil { + return x.DisableDefaultIamRecipients + } + return false +} + +// A filter for a budget, limiting the scope of the cost to calculate. +type Filter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. A set of projects of the form `projects/{project}`, + // specifying that usage from only this set of projects should be + // included in the budget. If omitted, the report will include all usage for + // the billing account, regardless of which project the usage occurred on. + // Only zero or one project can be specified currently. + Projects []string `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` + // Optional. If [Filter.credit_types_treatment][google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment] is INCLUDE_SPECIFIED_CREDITS, this is + // a list of credit types to be subtracted from gross cost to determine the + // spend for threshold calculations. See + // [a list of acceptable credit type + // values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + // + // If [Filter.credit_types_treatment][google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment] is **not** INCLUDE_SPECIFIED_CREDITS, + // this field must be empty. + CreditTypes []string `protobuf:"bytes,7,rep,name=credit_types,json=creditTypes,proto3" json:"credit_types,omitempty"` + // Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + CreditTypesTreatment Filter_CreditTypesTreatment `protobuf:"varint,4,opt,name=credit_types_treatment,json=creditTypesTreatment,proto3,enum=google.cloud.billing.budgets.v1beta1.Filter_CreditTypesTreatment" json:"credit_types_treatment,omitempty"` + // Optional. A set of services of the form `services/{service_id}`, + // specifying that usage from only this set of services should be + // included in the budget. If omitted, the report will include usage for + // all the services. + // The service names are available through the Catalog API: + // https://cloud.google.com/billing/v1/how-tos/catalog-api. + Services []string `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"` + // Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying + // that usage from only this set of subaccounts should be included in the + // budget. If a subaccount is set to the name of the parent account, + // usage from the parent account will be included. If omitted, the + // report will include usage from the parent account and all + // subaccounts, if they exist. + Subaccounts []string `protobuf:"bytes,5,rep,name=subaccounts,proto3" json:"subaccounts,omitempty"` + // Optional. A single label and value pair specifying that usage from only this set of + // labeled resources should be included in the budget. If omitted, the + // report will include all labeled and unlabeled usage. + // + // An object containing a single `"key": value` pair. Example: `{ "name": + // "wrench" }`. + // + // _Currently, multiple entries or multiple values per entry are not + // allowed._ + Labels map[string]*structpb.ListValue `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Multiple options to choose the budget's time period, specifying that only + // usage that occurs during this time period should be included in the budget. + // If not set, the usage_period defaults to CalendarPeriod.MONTH. + // + // Types that are assignable to UsagePeriod: + // + // *Filter_CalendarPeriod + // *Filter_CustomPeriod + UsagePeriod isFilter_UsagePeriod `protobuf_oneof:"usage_period"` +} + +func (x *Filter) Reset() { + *x = Filter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filter) ProtoMessage() {} + +func (x *Filter) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Filter.ProtoReflect.Descriptor instead. +func (*Filter) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{5} +} + +func (x *Filter) GetProjects() []string { + if x != nil { + return x.Projects + } + return nil +} + +func (x *Filter) GetCreditTypes() []string { + if x != nil { + return x.CreditTypes + } + return nil +} + +func (x *Filter) GetCreditTypesTreatment() Filter_CreditTypesTreatment { + if x != nil { + return x.CreditTypesTreatment + } + return Filter_CREDIT_TYPES_TREATMENT_UNSPECIFIED +} + +func (x *Filter) GetServices() []string { + if x != nil { + return x.Services + } + return nil +} + +func (x *Filter) GetSubaccounts() []string { + if x != nil { + return x.Subaccounts + } + return nil +} + +func (x *Filter) GetLabels() map[string]*structpb.ListValue { + if x != nil { + return x.Labels + } + return nil +} + +func (m *Filter) GetUsagePeriod() isFilter_UsagePeriod { + if m != nil { + return m.UsagePeriod + } + return nil +} + +func (x *Filter) GetCalendarPeriod() CalendarPeriod { + if x, ok := x.GetUsagePeriod().(*Filter_CalendarPeriod); ok { + return x.CalendarPeriod + } + return CalendarPeriod_CALENDAR_PERIOD_UNSPECIFIED +} + +func (x *Filter) GetCustomPeriod() *CustomPeriod { + if x, ok := x.GetUsagePeriod().(*Filter_CustomPeriod); ok { + return x.CustomPeriod + } + return nil +} + +type isFilter_UsagePeriod interface { + isFilter_UsagePeriod() +} + +type Filter_CalendarPeriod struct { + // Optional. Specifies to track usage for recurring calendar period. + // For example, assume that CalendarPeriod.QUARTER is set. The budget will + // track usage from April 1 to June 30, when the current calendar month is + // April, May, June. After that, it will track usage from July 1 to + // September 30 when the current calendar month is July, August, September, + // so on. + CalendarPeriod CalendarPeriod `protobuf:"varint,8,opt,name=calendar_period,json=calendarPeriod,proto3,enum=google.cloud.billing.budgets.v1beta1.CalendarPeriod,oneof"` +} + +type Filter_CustomPeriod struct { + // Optional. Specifies to track usage from any start date (required) to any end date + // (optional). This time period is static, it does not recur. + CustomPeriod *CustomPeriod `protobuf:"bytes,9,opt,name=custom_period,json=customPeriod,proto3,oneof"` +} + +func (*Filter_CalendarPeriod) isFilter_UsagePeriod() {} + +func (*Filter_CustomPeriod) isFilter_UsagePeriod() {} + +// All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). +type CustomPeriod struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The start date must be after January 1, 2017. + StartDate *date.Date `protobuf:"bytes,1,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"` + // Optional. The end date of the time period. Budgets with elapsed end date won't be + // processed. If unset, specifies to track all usage + // incurred since the start_date. + EndDate *date.Date `protobuf:"bytes,2,opt,name=end_date,json=endDate,proto3" json:"end_date,omitempty"` +} + +func (x *CustomPeriod) Reset() { + *x = CustomPeriod{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomPeriod) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomPeriod) ProtoMessage() {} + +func (x *CustomPeriod) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomPeriod.ProtoReflect.Descriptor instead. +func (*CustomPeriod) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP(), []int{6} +} + +func (x *CustomPeriod) GetStartDate() *date.Date { + if x != nil { + return x.StartDate + } + return nil +} + +func (x *CustomPeriod) GetEndDate() *date.Date { + if x != nil { + return x.EndDate + } + return nil +} + +var File_google_cloud_billing_budgets_v1beta1_budget_model_proto protoreflect.FileDescriptor + +var file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x6f, 0x6e, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x06, 0x42, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x0f, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x63, 0x0a, + 0x10, 0x61, 0x6c, 0x6c, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x75, 0x6c, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, + 0x6c, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0e, 0x61, 0x6c, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x75, + 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x3a, 0x5d, 0xea, 0x41, 0x5a, + 0x0a, 0x24, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x32, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x73, 0x2f, 0x7b, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x7d, 0x22, 0xc8, 0x01, 0x0a, 0x0c, 0x42, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x10, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x12, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x48, 0x00, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x41, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x4c, 0x61, 0x73, 0x74, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xeb, 0x01, 0x0a, 0x0d, 0x54, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x11, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x74, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, + 0x0b, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x73, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x69, 0x73, 0x22, 0x47, + 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x73, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x41, 0x53, 0x49, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4f, 0x52, 0x45, 0x43, 0x41, 0x53, 0x54, 0x45, 0x44, 0x5f, + 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x02, 0x22, 0xfd, 0x01, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x70, 0x75, + 0x62, 0x73, 0x75, 0x62, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4d, + 0x0a, 0x20, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x6f, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1e, 0x6d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x48, 0x0a, + 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x69, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1b, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x61, 0x6d, 0x52, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xad, 0x06, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, + 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x16, 0x63, + 0x72, 0x65, 0x64, 0x69, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x74, 0x72, 0x65, 0x61, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x54, 0x72, 0x65, 0x61, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x14, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x54, 0x72, 0x65, 0x61, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0b, 0x73, 0x75, + 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x12, 0x55, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x64, 0x0a, 0x0f, 0x63, 0x61, 0x6c, 0x65, + 0x6e, 0x64, 0x61, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, + 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x0e, + 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x5e, + 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, + 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x1a, 0x55, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8f, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x54, 0x72, 0x65, 0x61, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, + 0x0a, 0x22, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x5f, 0x54, + 0x52, 0x45, 0x41, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, + 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x43, + 0x52, 0x45, 0x44, 0x49, 0x54, 0x53, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x4e, 0x43, 0x4c, + 0x55, 0x44, 0x45, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x43, 0x52, + 0x45, 0x44, 0x49, 0x54, 0x53, 0x10, 0x03, 0x42, 0x0e, 0x0a, 0x0c, 0x75, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x78, 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x31, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, + 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, + 0x65, 0x2a, 0x53, 0x0a, 0x0e, 0x43, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x41, 0x4c, 0x45, 0x4e, 0x44, 0x41, 0x52, 0x5f, + 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x51, 0x55, 0x41, 0x52, 0x54, 0x45, 0x52, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, + 0x59, 0x45, 0x41, 0x52, 0x10, 0x03, 0x42, 0x79, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescOnce sync.Once + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescData = file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDesc +) + +func file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescGZIP() []byte { + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescOnce.Do(func() { + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescData) + }) + return file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDescData +} + +var file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_google_cloud_billing_budgets_v1beta1_budget_model_proto_goTypes = []interface{}{ + (CalendarPeriod)(0), // 0: google.cloud.billing.budgets.v1beta1.CalendarPeriod + (ThresholdRule_Basis)(0), // 1: google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis + (Filter_CreditTypesTreatment)(0), // 2: google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment + (*Budget)(nil), // 3: google.cloud.billing.budgets.v1beta1.Budget + (*BudgetAmount)(nil), // 4: google.cloud.billing.budgets.v1beta1.BudgetAmount + (*LastPeriodAmount)(nil), // 5: google.cloud.billing.budgets.v1beta1.LastPeriodAmount + (*ThresholdRule)(nil), // 6: google.cloud.billing.budgets.v1beta1.ThresholdRule + (*AllUpdatesRule)(nil), // 7: google.cloud.billing.budgets.v1beta1.AllUpdatesRule + (*Filter)(nil), // 8: google.cloud.billing.budgets.v1beta1.Filter + (*CustomPeriod)(nil), // 9: google.cloud.billing.budgets.v1beta1.CustomPeriod + nil, // 10: google.cloud.billing.budgets.v1beta1.Filter.LabelsEntry + (*money.Money)(nil), // 11: google.type.Money + (*date.Date)(nil), // 12: google.type.Date + (*structpb.ListValue)(nil), // 13: google.protobuf.ListValue +} +var file_google_cloud_billing_budgets_v1beta1_budget_model_proto_depIdxs = []int32{ + 8, // 0: google.cloud.billing.budgets.v1beta1.Budget.budget_filter:type_name -> google.cloud.billing.budgets.v1beta1.Filter + 4, // 1: google.cloud.billing.budgets.v1beta1.Budget.amount:type_name -> google.cloud.billing.budgets.v1beta1.BudgetAmount + 6, // 2: google.cloud.billing.budgets.v1beta1.Budget.threshold_rules:type_name -> google.cloud.billing.budgets.v1beta1.ThresholdRule + 7, // 3: google.cloud.billing.budgets.v1beta1.Budget.all_updates_rule:type_name -> google.cloud.billing.budgets.v1beta1.AllUpdatesRule + 11, // 4: google.cloud.billing.budgets.v1beta1.BudgetAmount.specified_amount:type_name -> google.type.Money + 5, // 5: google.cloud.billing.budgets.v1beta1.BudgetAmount.last_period_amount:type_name -> google.cloud.billing.budgets.v1beta1.LastPeriodAmount + 1, // 6: google.cloud.billing.budgets.v1beta1.ThresholdRule.spend_basis:type_name -> google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis + 2, // 7: google.cloud.billing.budgets.v1beta1.Filter.credit_types_treatment:type_name -> google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment + 10, // 8: google.cloud.billing.budgets.v1beta1.Filter.labels:type_name -> google.cloud.billing.budgets.v1beta1.Filter.LabelsEntry + 0, // 9: google.cloud.billing.budgets.v1beta1.Filter.calendar_period:type_name -> google.cloud.billing.budgets.v1beta1.CalendarPeriod + 9, // 10: google.cloud.billing.budgets.v1beta1.Filter.custom_period:type_name -> google.cloud.billing.budgets.v1beta1.CustomPeriod + 12, // 11: google.cloud.billing.budgets.v1beta1.CustomPeriod.start_date:type_name -> google.type.Date + 12, // 12: google.cloud.billing.budgets.v1beta1.CustomPeriod.end_date:type_name -> google.type.Date + 13, // 13: google.cloud.billing.budgets.v1beta1.Filter.LabelsEntry.value:type_name -> google.protobuf.ListValue + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_google_cloud_billing_budgets_v1beta1_budget_model_proto_init() } +func file_google_cloud_billing_budgets_v1beta1_budget_model_proto_init() { + if File_google_cloud_billing_budgets_v1beta1_budget_model_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Budget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BudgetAmount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LastPeriodAmount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThresholdRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllUpdatesRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomPeriod); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*BudgetAmount_SpecifiedAmount)(nil), + (*BudgetAmount_LastPeriodAmount)(nil), + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*Filter_CalendarPeriod)(nil), + (*Filter_CustomPeriod)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDesc, + NumEnums: 3, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_billing_budgets_v1beta1_budget_model_proto_goTypes, + DependencyIndexes: file_google_cloud_billing_budgets_v1beta1_budget_model_proto_depIdxs, + EnumInfos: file_google_cloud_billing_budgets_v1beta1_budget_model_proto_enumTypes, + MessageInfos: file_google_cloud_billing_budgets_v1beta1_budget_model_proto_msgTypes, + }.Build() + File_google_cloud_billing_budgets_v1beta1_budget_model_proto = out.File + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_rawDesc = nil + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_goTypes = nil + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_depIdxs = nil +} diff --git a/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go b/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go new file mode 100644 index 000000000000..9de7e7384061 --- /dev/null +++ b/billing/budgets/apiv1beta1/budgetspb/budget_service.pb.go @@ -0,0 +1,957 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/billing/budgets/v1beta1/budget_service.proto + +package budgetspb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request for CreateBudget +type CreateBudgetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the billing account to create the budget in. Values + // are of the form `billingAccounts/{billingAccountId}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Budget to create. + Budget *Budget `protobuf:"bytes,2,opt,name=budget,proto3" json:"budget,omitempty"` +} + +func (x *CreateBudgetRequest) Reset() { + *x = CreateBudgetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBudgetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBudgetRequest) ProtoMessage() {} + +func (x *CreateBudgetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBudgetRequest.ProtoReflect.Descriptor instead. +func (*CreateBudgetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateBudgetRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateBudgetRequest) GetBudget() *Budget { + if x != nil { + return x.Budget + } + return nil +} + +// Request for UpdateBudget +type UpdateBudgetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The updated budget object. + // The budget to update is specified by the budget name in the budget. + Budget *Budget `protobuf:"bytes,1,opt,name=budget,proto3" json:"budget,omitempty"` + // Optional. Indicates which fields in the provided budget to update. + // Read-only fields (such as `name`) cannot be changed. If this is not + // provided, then only fields with non-default values from the request are + // updated. See + // https://developers.google.com/protocol-buffers/docs/proto3#default for more + // details about default values. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateBudgetRequest) Reset() { + *x = UpdateBudgetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBudgetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBudgetRequest) ProtoMessage() {} + +func (x *UpdateBudgetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBudgetRequest.ProtoReflect.Descriptor instead. +func (*UpdateBudgetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP(), []int{1} +} + +func (x *UpdateBudgetRequest) GetBudget() *Budget { + if x != nil { + return x.Budget + } + return nil +} + +func (x *UpdateBudgetRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request for GetBudget +type GetBudgetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of budget to get. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetBudgetRequest) Reset() { + *x = GetBudgetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBudgetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBudgetRequest) ProtoMessage() {} + +func (x *GetBudgetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBudgetRequest.ProtoReflect.Descriptor instead. +func (*GetBudgetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetBudgetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request for ListBudgets +type ListBudgetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of billing account to list budgets under. Values + // are of the form `billingAccounts/{billingAccountId}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. The maximum number of budgets to return per page. + // The default and maximum value are 100. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. The value returned by the last `ListBudgetsResponse` which + // indicates that this is a continuation of a prior `ListBudgets` call, + // and that the system should return the next page of data. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListBudgetsRequest) Reset() { + *x = ListBudgetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBudgetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBudgetsRequest) ProtoMessage() {} + +func (x *ListBudgetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBudgetsRequest.ProtoReflect.Descriptor instead. +func (*ListBudgetsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListBudgetsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListBudgetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListBudgetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response for ListBudgets +type ListBudgetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of the budgets owned by the requested billing account. + Budgets []*Budget `protobuf:"bytes,1,rep,name=budgets,proto3" json:"budgets,omitempty"` + // If not empty, indicates that there may be more budgets that match the + // request; this value should be passed in a new `ListBudgetsRequest`. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListBudgetsResponse) Reset() { + *x = ListBudgetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBudgetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBudgetsResponse) ProtoMessage() {} + +func (x *ListBudgetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBudgetsResponse.ProtoReflect.Descriptor instead. +func (*ListBudgetsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListBudgetsResponse) GetBudgets() []*Budget { + if x != nil { + return x.Budgets + } + return nil +} + +func (x *ListBudgetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request for DeleteBudget +type DeleteBudgetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the budget to delete. Values are of the form + // `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteBudgetRequest) Reset() { + *x = DeleteBudgetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBudgetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBudgetRequest) ProtoMessage() {} + +func (x *DeleteBudgetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBudgetRequest.ProtoReflect.Descriptor instead. +func (*DeleteBudgetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteBudgetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_billing_budgets_v1beta1_budget_service_proto protoreflect.FileDescriptor + +var file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x01, 0x0a, + 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x62, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x06, 0x62, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0xa2, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, + 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x54, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, + 0x24, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x07, 0x62, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x57, 0x0a, 0x13, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xf7, 0x07, 0x0a, 0x0d, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x62, 0x69, 0x6c, 0x6c, 0x69, + 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xb6, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x32, 0x32, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x01, + 0x2a, 0x12, 0xa6, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, + 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x62, 0x69, + 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x0b, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, + 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, + 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x2a, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x1a, 0x7f, 0xca, + 0x41, 0x1d, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, + 0x41, 0x5c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2c, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x79, + 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x75, 0x64, 0x67, 0x65, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, + 0x67, 0x2f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescOnce sync.Once + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescData = file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDesc +) + +func file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescGZIP() []byte { + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescOnce.Do(func() { + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescData) + }) + return file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDescData +} + +var file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_billing_budgets_v1beta1_budget_service_proto_goTypes = []interface{}{ + (*CreateBudgetRequest)(nil), // 0: google.cloud.billing.budgets.v1beta1.CreateBudgetRequest + (*UpdateBudgetRequest)(nil), // 1: google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest + (*GetBudgetRequest)(nil), // 2: google.cloud.billing.budgets.v1beta1.GetBudgetRequest + (*ListBudgetsRequest)(nil), // 3: google.cloud.billing.budgets.v1beta1.ListBudgetsRequest + (*ListBudgetsResponse)(nil), // 4: google.cloud.billing.budgets.v1beta1.ListBudgetsResponse + (*DeleteBudgetRequest)(nil), // 5: google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest + (*Budget)(nil), // 6: google.cloud.billing.budgets.v1beta1.Budget + (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 8: google.protobuf.Empty +} +var file_google_cloud_billing_budgets_v1beta1_budget_service_proto_depIdxs = []int32{ + 6, // 0: google.cloud.billing.budgets.v1beta1.CreateBudgetRequest.budget:type_name -> google.cloud.billing.budgets.v1beta1.Budget + 6, // 1: google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest.budget:type_name -> google.cloud.billing.budgets.v1beta1.Budget + 7, // 2: google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest.update_mask:type_name -> google.protobuf.FieldMask + 6, // 3: google.cloud.billing.budgets.v1beta1.ListBudgetsResponse.budgets:type_name -> google.cloud.billing.budgets.v1beta1.Budget + 0, // 4: google.cloud.billing.budgets.v1beta1.BudgetService.CreateBudget:input_type -> google.cloud.billing.budgets.v1beta1.CreateBudgetRequest + 1, // 5: google.cloud.billing.budgets.v1beta1.BudgetService.UpdateBudget:input_type -> google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest + 2, // 6: google.cloud.billing.budgets.v1beta1.BudgetService.GetBudget:input_type -> google.cloud.billing.budgets.v1beta1.GetBudgetRequest + 3, // 7: google.cloud.billing.budgets.v1beta1.BudgetService.ListBudgets:input_type -> google.cloud.billing.budgets.v1beta1.ListBudgetsRequest + 5, // 8: google.cloud.billing.budgets.v1beta1.BudgetService.DeleteBudget:input_type -> google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest + 6, // 9: google.cloud.billing.budgets.v1beta1.BudgetService.CreateBudget:output_type -> google.cloud.billing.budgets.v1beta1.Budget + 6, // 10: google.cloud.billing.budgets.v1beta1.BudgetService.UpdateBudget:output_type -> google.cloud.billing.budgets.v1beta1.Budget + 6, // 11: google.cloud.billing.budgets.v1beta1.BudgetService.GetBudget:output_type -> google.cloud.billing.budgets.v1beta1.Budget + 4, // 12: google.cloud.billing.budgets.v1beta1.BudgetService.ListBudgets:output_type -> google.cloud.billing.budgets.v1beta1.ListBudgetsResponse + 8, // 13: google.cloud.billing.budgets.v1beta1.BudgetService.DeleteBudget:output_type -> google.protobuf.Empty + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_billing_budgets_v1beta1_budget_service_proto_init() } +func file_google_cloud_billing_budgets_v1beta1_budget_service_proto_init() { + if File_google_cloud_billing_budgets_v1beta1_budget_service_proto != nil { + return + } + file_google_cloud_billing_budgets_v1beta1_budget_model_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBudgetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBudgetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBudgetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBudgetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBudgetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteBudgetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_billing_budgets_v1beta1_budget_service_proto_goTypes, + DependencyIndexes: file_google_cloud_billing_budgets_v1beta1_budget_service_proto_depIdxs, + MessageInfos: file_google_cloud_billing_budgets_v1beta1_budget_service_proto_msgTypes, + }.Build() + File_google_cloud_billing_budgets_v1beta1_budget_service_proto = out.File + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_rawDesc = nil + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_goTypes = nil + file_google_cloud_billing_budgets_v1beta1_budget_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// BudgetServiceClient is the client API for BudgetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BudgetServiceClient interface { + // Creates a new budget. See + // [Quotas and limits](https://cloud.google.com/billing/quotas) + // for more information on the limits of the number of budgets you can create. + CreateBudget(ctx context.Context, in *CreateBudgetRequest, opts ...grpc.CallOption) (*Budget, error) + // Updates a budget and returns the updated budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. Budget fields that are not exposed in + // this API will not be changed by this method. + UpdateBudget(ctx context.Context, in *UpdateBudgetRequest, opts ...grpc.CallOption) (*Budget, error) + // Returns a budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + GetBudget(ctx context.Context, in *GetBudgetRequest, opts ...grpc.CallOption) (*Budget, error) + // Returns a list of budgets for a billing account. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + ListBudgets(ctx context.Context, in *ListBudgetsRequest, opts ...grpc.CallOption) (*ListBudgetsResponse, error) + // Deletes a budget. Returns successfully if already deleted. + DeleteBudget(ctx context.Context, in *DeleteBudgetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type budgetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBudgetServiceClient(cc grpc.ClientConnInterface) BudgetServiceClient { + return &budgetServiceClient{cc} +} + +func (c *budgetServiceClient) CreateBudget(ctx context.Context, in *CreateBudgetRequest, opts ...grpc.CallOption) (*Budget, error) { + out := new(Budget) + err := c.cc.Invoke(ctx, "/google.cloud.billing.budgets.v1beta1.BudgetService/CreateBudget", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *budgetServiceClient) UpdateBudget(ctx context.Context, in *UpdateBudgetRequest, opts ...grpc.CallOption) (*Budget, error) { + out := new(Budget) + err := c.cc.Invoke(ctx, "/google.cloud.billing.budgets.v1beta1.BudgetService/UpdateBudget", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *budgetServiceClient) GetBudget(ctx context.Context, in *GetBudgetRequest, opts ...grpc.CallOption) (*Budget, error) { + out := new(Budget) + err := c.cc.Invoke(ctx, "/google.cloud.billing.budgets.v1beta1.BudgetService/GetBudget", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *budgetServiceClient) ListBudgets(ctx context.Context, in *ListBudgetsRequest, opts ...grpc.CallOption) (*ListBudgetsResponse, error) { + out := new(ListBudgetsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.billing.budgets.v1beta1.BudgetService/ListBudgets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *budgetServiceClient) DeleteBudget(ctx context.Context, in *DeleteBudgetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.billing.budgets.v1beta1.BudgetService/DeleteBudget", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BudgetServiceServer is the server API for BudgetService service. +type BudgetServiceServer interface { + // Creates a new budget. See + // [Quotas and limits](https://cloud.google.com/billing/quotas) + // for more information on the limits of the number of budgets you can create. + CreateBudget(context.Context, *CreateBudgetRequest) (*Budget, error) + // Updates a budget and returns the updated budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. Budget fields that are not exposed in + // this API will not be changed by this method. + UpdateBudget(context.Context, *UpdateBudgetRequest) (*Budget, error) + // Returns a budget. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + GetBudget(context.Context, *GetBudgetRequest) (*Budget, error) + // Returns a list of budgets for a billing account. + // + // WARNING: There are some fields exposed on the Google Cloud Console that + // aren't available on this API. When reading from the API, you will not + // see these fields in the return value, though they may have been set + // in the Cloud Console. + ListBudgets(context.Context, *ListBudgetsRequest) (*ListBudgetsResponse, error) + // Deletes a budget. Returns successfully if already deleted. + DeleteBudget(context.Context, *DeleteBudgetRequest) (*emptypb.Empty, error) +} + +// UnimplementedBudgetServiceServer can be embedded to have forward compatible implementations. +type UnimplementedBudgetServiceServer struct { +} + +func (*UnimplementedBudgetServiceServer) CreateBudget(context.Context, *CreateBudgetRequest) (*Budget, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBudget not implemented") +} +func (*UnimplementedBudgetServiceServer) UpdateBudget(context.Context, *UpdateBudgetRequest) (*Budget, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBudget not implemented") +} +func (*UnimplementedBudgetServiceServer) GetBudget(context.Context, *GetBudgetRequest) (*Budget, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBudget not implemented") +} +func (*UnimplementedBudgetServiceServer) ListBudgets(context.Context, *ListBudgetsRequest) (*ListBudgetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBudgets not implemented") +} +func (*UnimplementedBudgetServiceServer) DeleteBudget(context.Context, *DeleteBudgetRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBudget not implemented") +} + +func RegisterBudgetServiceServer(s *grpc.Server, srv BudgetServiceServer) { + s.RegisterService(&_BudgetService_serviceDesc, srv) +} + +func _BudgetService_CreateBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBudgetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BudgetServiceServer).CreateBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.billing.budgets.v1beta1.BudgetService/CreateBudget", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BudgetServiceServer).CreateBudget(ctx, req.(*CreateBudgetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BudgetService_UpdateBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBudgetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BudgetServiceServer).UpdateBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.billing.budgets.v1beta1.BudgetService/UpdateBudget", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BudgetServiceServer).UpdateBudget(ctx, req.(*UpdateBudgetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BudgetService_GetBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBudgetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BudgetServiceServer).GetBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.billing.budgets.v1beta1.BudgetService/GetBudget", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BudgetServiceServer).GetBudget(ctx, req.(*GetBudgetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BudgetService_ListBudgets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBudgetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BudgetServiceServer).ListBudgets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.billing.budgets.v1beta1.BudgetService/ListBudgets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BudgetServiceServer).ListBudgets(ctx, req.(*ListBudgetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BudgetService_DeleteBudget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBudgetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BudgetServiceServer).DeleteBudget(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.billing.budgets.v1beta1.BudgetService/DeleteBudget", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BudgetServiceServer).DeleteBudget(ctx, req.(*DeleteBudgetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BudgetService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.billing.budgets.v1beta1.BudgetService", + HandlerType: (*BudgetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBudget", + Handler: _BudgetService_CreateBudget_Handler, + }, + { + MethodName: "UpdateBudget", + Handler: _BudgetService_UpdateBudget_Handler, + }, + { + MethodName: "GetBudget", + Handler: _BudgetService_GetBudget_Handler, + }, + { + MethodName: "ListBudgets", + Handler: _BudgetService_ListBudgets_Handler, + }, + { + MethodName: "DeleteBudget", + Handler: _BudgetService_DeleteBudget_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/billing/budgets/v1beta1/budget_service.proto", +} diff --git a/billing/budgets/apiv1beta1/doc.go b/billing/budgets/apiv1beta1/doc.go index d5f0f1609440..458441bf4dbe 100644 --- a/billing/budgets/apiv1beta1/doc.go +++ b/billing/budgets/apiv1beta1/doc.go @@ -21,47 +21,58 @@ // budget plan and the rules to execute as spend is tracked against that // plan. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := budgets.NewBudgetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := budgets.NewBudgetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := budgets.NewBudgetClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &budgetspb.CreateBudgetRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1#CreateBudgetRequest. -// } -// resp, err := c.CreateBudget(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := budgets.NewBudgetClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &budgetspb.CreateBudgetRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/billing/budgets/v1beta1#CreateBudgetRequest. +// } +// resp, err := c.CreateBudget(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewBudgetClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // @@ -73,6 +84,8 @@ package budgets // import "cloud.google.com/go/billing/budgets/apiv1beta1" import ( "context" + "fmt" + "net/http" "os" "runtime" "strconv" @@ -162,3 +175,22 @@ func versionGo() string { } return "UNKNOWN" } + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/billing/budgets/apiv1beta1/gapic_metadata.json b/billing/budgets/apiv1beta1/gapic_metadata.json index 912efba0ed83..b794ebf6b362 100644 --- a/billing/budgets/apiv1beta1/gapic_metadata.json +++ b/billing/budgets/apiv1beta1/gapic_metadata.json @@ -36,6 +36,36 @@ ] } } + }, + "rest": { + "libraryClient": "BudgetClient", + "rpcs": { + "CreateBudget": { + "methods": [ + "CreateBudget" + ] + }, + "DeleteBudget": { + "methods": [ + "DeleteBudget" + ] + }, + "GetBudget": { + "methods": [ + "GetBudget" + ] + }, + "ListBudgets": { + "methods": [ + "ListBudgets" + ] + }, + "UpdateBudget": { + "methods": [ + "UpdateBudget" + ] + } + } } } } diff --git a/billing/go.mod b/billing/go.mod index a5095fe893e0..4c5f86ced959 100644 --- a/billing/go.mod +++ b/billing/go.mod @@ -1,11 +1,25 @@ module cloud.google.com/go/billing -go 1.16 +go 1.17 require ( github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/billing/go.sum b/billing/go.sum index a7f80a16a22d..e75fb777b024 100644 --- a/billing/go.sum +++ b/billing/go.sum @@ -161,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -289,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -310,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -496,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -584,8 +587,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -616,8 +620,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -632,8 +637,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/billing/internal/version.go b/billing/internal/version.go index d0e4a6fd16b3..9fa087b74c6b 100644 --- a/billing/internal/version.go +++ b/billing/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.2.0" +const Version = "1.4.0" diff --git a/binaryauthorization/CHANGES.md b/binaryauthorization/CHANGES.md index 396200595e02..36ad344e891c 100644 --- a/binaryauthorization/CHANGES.md +++ b/binaryauthorization/CHANGES.md @@ -1,6 +1,13 @@ # Changes +## [1.1.0](https://github.com/googleapis/google-cloud-go/compare/binaryauthorization/v1.0.0...binaryauthorization/v1.1.0) (2022-09-19) + + +### Features + +* **binaryauthorization:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + ## [1.0.0](https://github.com/googleapis/google-cloud-go/compare/binaryauthorization/v0.6.0...binaryauthorization/v1.0.0) (2022-06-29) diff --git a/binaryauthorization/apiv1/binauthz_management_client.go b/binaryauthorization/apiv1/binauthz_management_client.go index a0fd5336ae28..0dfb3374577b 100644 --- a/binaryauthorization/apiv1/binauthz_management_client.go +++ b/binaryauthorization/apiv1/binauthz_management_client.go @@ -160,9 +160,9 @@ type internalBinauthzManagementClient interface { // // This API implements a REST model with the following objects: // -// Policy +// Policy // -// Attestor +// Attestor type BinauthzManagementClient struct { // The internal transport-dependent client. internalClient internalBinauthzManagementClient @@ -188,7 +188,8 @@ func (c *BinauthzManagementClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BinauthzManagementClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -273,9 +274,9 @@ type binauthzManagementGRPCClient struct { // // This API implements a REST model with the following objects: // -// Policy +// Policy // -// Attestor +// Attestor func NewBinauthzManagementClient(ctx context.Context, opts ...option.ClientOption) (*BinauthzManagementClient, error) { clientOpts := defaultBinauthzManagementGRPCClientOptions() if newBinauthzManagementClientHook != nil { @@ -312,7 +313,8 @@ func NewBinauthzManagementClient(ctx context.Context, opts ...option.ClientOptio // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *binauthzManagementGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/binaryauthorization/apiv1/binauthz_management_client_example_test.go b/binaryauthorization/apiv1/binauthz_management_client_example_test.go index 4afd3e0446a7..c53ffd1ea383 100644 --- a/binaryauthorization/apiv1/binauthz_management_client_example_test.go +++ b/binaryauthorization/apiv1/binauthz_management_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBinauthzManagementClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBinauthzManagementClient() { func ExampleBinauthzManagementClient_GetPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleBinauthzManagementClient_GetPolicy() { func ExampleBinauthzManagementClient_UpdatePolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleBinauthzManagementClient_UpdatePolicy() { func ExampleBinauthzManagementClient_CreateAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +118,11 @@ func ExampleBinauthzManagementClient_CreateAttestor() { func ExampleBinauthzManagementClient_GetAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -118,6 +143,11 @@ func ExampleBinauthzManagementClient_GetAttestor() { func ExampleBinauthzManagementClient_UpdateAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +168,11 @@ func ExampleBinauthzManagementClient_UpdateAttestor() { func ExampleBinauthzManagementClient_ListAttestors() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleBinauthzManagementClient_ListAttestors() { func ExampleBinauthzManagementClient_DeleteAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementClient(ctx) if err != nil { // TODO: Handle error. diff --git a/binaryauthorization/apiv1/doc.go b/binaryauthorization/apiv1/doc.go index fbcea458e395..4a2f3b416071 100644 --- a/binaryauthorization/apiv1/doc.go +++ b/binaryauthorization/apiv1/doc.go @@ -21,45 +21,56 @@ // policy control for images deployed to Kubernetes Engine clusters, Anthos // clusters on VMware, and Cloud Run. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := binaryauthorization.NewBinauthzManagementClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := binaryauthorization.NewBinauthzManagementClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := binaryauthorization.NewBinauthzManagementClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &binaryauthorizationpb.GetPolicyRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1#GetPolicyRequest. -// } -// resp, err := c.GetPolicy(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := binaryauthorization.NewBinauthzManagementClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &binaryauthorizationpb.GetPolicyRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1#GetPolicyRequest. +// } +// resp, err := c.GetPolicy(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewBinauthzManagementClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/binaryauthorization/apiv1/system_policy_client.go b/binaryauthorization/apiv1/system_policy_client.go index 776c76d50dc7..767d2bce76b8 100644 --- a/binaryauthorization/apiv1/system_policy_client.go +++ b/binaryauthorization/apiv1/system_policy_client.go @@ -93,7 +93,8 @@ func (c *SystemPolicyClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SystemPolicyClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -163,7 +164,8 @@ func NewSystemPolicyClient(ctx context.Context, opts ...option.ClientOption) (*S // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *systemPolicyGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/binaryauthorization/apiv1/system_policy_client_example_test.go b/binaryauthorization/apiv1/system_policy_client_example_test.go index d81d489cc2ed..c3dbd4421725 100644 --- a/binaryauthorization/apiv1/system_policy_client_example_test.go +++ b/binaryauthorization/apiv1/system_policy_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewSystemPolicyClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewSystemPolicyClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewSystemPolicyClient() { func ExampleSystemPolicyClient_GetSystemPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewSystemPolicyClient(ctx) if err != nil { // TODO: Handle error. diff --git a/binaryauthorization/apiv1/validation_helper_client.go b/binaryauthorization/apiv1/validation_helper_client.go index 8ee1c7a64100..d170093df393 100644 --- a/binaryauthorization/apiv1/validation_helper_client.go +++ b/binaryauthorization/apiv1/validation_helper_client.go @@ -93,7 +93,8 @@ func (c *ValidationHelperClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ValidationHelperClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -164,7 +165,8 @@ func NewValidationHelperClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *validationHelperGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/binaryauthorization/apiv1/validation_helper_client_example_test.go b/binaryauthorization/apiv1/validation_helper_client_example_test.go index 18fa485f9ad3..ec7b5143c6ff 100644 --- a/binaryauthorization/apiv1/validation_helper_client_example_test.go +++ b/binaryauthorization/apiv1/validation_helper_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewValidationHelperClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewValidationHelperClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewValidationHelperClient() { func ExampleValidationHelperClient_ValidateAttestationOccurrence() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewValidationHelperClient(ctx) if err != nil { // TODO: Handle error. diff --git a/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go b/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go new file mode 100644 index 000000000000..5e0406a57154 --- /dev/null +++ b/binaryauthorization/apiv1beta1/binaryauthorizationpb/continuous_validation_logging.pb.go @@ -0,0 +1,667 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto + +package binaryauthorizationpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Audit time policy conformance verdict. +type ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict int32 + +const ( + // We should always have a verdict. This is an error. + ContinuousValidationEvent_ContinuousValidationPodEvent_POLICY_CONFORMANCE_VERDICT_UNSPECIFIED ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict = 0 + // The pod violates the policy. + ContinuousValidationEvent_ContinuousValidationPodEvent_VIOLATES_POLICY ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict = 1 +) + +// Enum value maps for ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict. +var ( + ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict_name = map[int32]string{ + 0: "POLICY_CONFORMANCE_VERDICT_UNSPECIFIED", + 1: "VIOLATES_POLICY", + } + ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict_value = map[string]int32{ + "POLICY_CONFORMANCE_VERDICT_UNSPECIFIED": 0, + "VIOLATES_POLICY": 1, + } +) + +func (x ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) Enum() *ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict { + p := new(ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) + *p = x + return p +} + +func (x ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_enumTypes[0].Descriptor() +} + +func (ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) Type() protoreflect.EnumType { + return &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_enumTypes[0] +} + +func (x ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict.Descriptor instead. +func (ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// Result of the audit. +type ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult int32 + +const ( + // Unspecified result. This is an error. + ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AUDIT_RESULT_UNSPECIFIED ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult = 0 + // Image is allowed. + ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_ALLOW ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult = 1 + // Image is denied. + ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_DENY ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult = 2 +) + +// Enum value maps for ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult. +var ( + ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult_name = map[int32]string{ + 0: "AUDIT_RESULT_UNSPECIFIED", + 1: "ALLOW", + 2: "DENY", + } + ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult_value = map[string]int32{ + "AUDIT_RESULT_UNSPECIFIED": 0, + "ALLOW": 1, + "DENY": 2, + } +) + +func (x ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) Enum() *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult { + p := new(ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) + *p = x + return p +} + +func (x ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_enumTypes[1].Descriptor() +} + +func (ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) Type() protoreflect.EnumType { + return &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_enumTypes[1] +} + +func (x ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult.Descriptor instead. +func (ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP(), []int{0, 0, 0, 0} +} + +// Represents an auditing event from Continuous Validation. +type ContinuousValidationEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of CV event. + // + // Types that are assignable to EventType: + // + // *ContinuousValidationEvent_PodEvent + // *ContinuousValidationEvent_UnsupportedPolicyEvent_ + EventType isContinuousValidationEvent_EventType `protobuf_oneof:"event_type"` +} + +func (x *ContinuousValidationEvent) Reset() { + *x = ContinuousValidationEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinuousValidationEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinuousValidationEvent) ProtoMessage() {} + +func (x *ContinuousValidationEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContinuousValidationEvent.ProtoReflect.Descriptor instead. +func (*ContinuousValidationEvent) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP(), []int{0} +} + +func (m *ContinuousValidationEvent) GetEventType() isContinuousValidationEvent_EventType { + if m != nil { + return m.EventType + } + return nil +} + +func (x *ContinuousValidationEvent) GetPodEvent() *ContinuousValidationEvent_ContinuousValidationPodEvent { + if x, ok := x.GetEventType().(*ContinuousValidationEvent_PodEvent); ok { + return x.PodEvent + } + return nil +} + +func (x *ContinuousValidationEvent) GetUnsupportedPolicyEvent() *ContinuousValidationEvent_UnsupportedPolicyEvent { + if x, ok := x.GetEventType().(*ContinuousValidationEvent_UnsupportedPolicyEvent_); ok { + return x.UnsupportedPolicyEvent + } + return nil +} + +type isContinuousValidationEvent_EventType interface { + isContinuousValidationEvent_EventType() +} + +type ContinuousValidationEvent_PodEvent struct { + // Pod event. + PodEvent *ContinuousValidationEvent_ContinuousValidationPodEvent `protobuf:"bytes,1,opt,name=pod_event,json=podEvent,proto3,oneof"` +} + +type ContinuousValidationEvent_UnsupportedPolicyEvent_ struct { + // Unsupported policy event. + UnsupportedPolicyEvent *ContinuousValidationEvent_UnsupportedPolicyEvent `protobuf:"bytes,2,opt,name=unsupported_policy_event,json=unsupportedPolicyEvent,proto3,oneof"` +} + +func (*ContinuousValidationEvent_PodEvent) isContinuousValidationEvent_EventType() {} + +func (*ContinuousValidationEvent_UnsupportedPolicyEvent_) isContinuousValidationEvent_EventType() {} + +// An auditing event for one Pod. +type ContinuousValidationEvent_ContinuousValidationPodEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The k8s namespace of the Pod. + PodNamespace string `protobuf:"bytes,7,opt,name=pod_namespace,json=podNamespace,proto3" json:"pod_namespace,omitempty"` + // The name of the Pod. + Pod string `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"` + // Deploy time of the Pod from k8s. + DeployTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=deploy_time,json=deployTime,proto3" json:"deploy_time,omitempty"` + // Termination time of the Pod from k8s, or nothing if still running. + EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Auditing verdict for this Pod. + Verdict ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict `protobuf:"varint,4,opt,name=verdict,proto3,enum=google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict" json:"verdict,omitempty"` + // List of images with auditing details. + Images []*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails `protobuf:"bytes,5,rep,name=images,proto3" json:"images,omitempty"` +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) Reset() { + *x = ContinuousValidationEvent_ContinuousValidationPodEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinuousValidationEvent_ContinuousValidationPodEvent) ProtoMessage() {} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContinuousValidationEvent_ContinuousValidationPodEvent.ProtoReflect.Descriptor instead. +func (*ContinuousValidationEvent_ContinuousValidationPodEvent) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) GetPodNamespace() string { + if x != nil { + return x.PodNamespace + } + return "" +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) GetPod() string { + if x != nil { + return x.Pod + } + return "" +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) GetDeployTime() *timestamppb.Timestamp { + if x != nil { + return x.DeployTime + } + return nil +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) GetVerdict() ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict { + if x != nil { + return x.Verdict + } + return ContinuousValidationEvent_ContinuousValidationPodEvent_POLICY_CONFORMANCE_VERDICT_UNSPECIFIED +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent) GetImages() []*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails { + if x != nil { + return x.Images + } + return nil +} + +// An event describing that the project policy is unsupported by CV. +type ContinuousValidationEvent_UnsupportedPolicyEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A description of the unsupported policy. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *ContinuousValidationEvent_UnsupportedPolicyEvent) Reset() { + *x = ContinuousValidationEvent_UnsupportedPolicyEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinuousValidationEvent_UnsupportedPolicyEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinuousValidationEvent_UnsupportedPolicyEvent) ProtoMessage() {} + +func (x *ContinuousValidationEvent_UnsupportedPolicyEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContinuousValidationEvent_UnsupportedPolicyEvent.ProtoReflect.Descriptor instead. +func (*ContinuousValidationEvent_UnsupportedPolicyEvent) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ContinuousValidationEvent_UnsupportedPolicyEvent) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// Container image with auditing details. +type ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the image. + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` + // The result of the audit for this image. + Result ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult `protobuf:"varint,2,opt,name=result,proto3,enum=google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult" json:"result,omitempty"` + // Description of the above result. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) Reset() { + *x = ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) ProtoMessage() {} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails.ProtoReflect.Descriptor instead. +func (*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP(), []int{0, 0, 0} +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) GetResult() ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult { + if x != nil { + return x.Result + } + return ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AUDIT_RESULT_UNSPECIFIED +} + +func (x *ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +var File_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto protoreflect.FileDescriptor + +var file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, + 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x09, 0x0a, 0x19, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x7f, 0x0a, 0x09, 0x70, 0x6f, 0x64, 0x5f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x60, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, + 0x70, 0x6f, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x96, 0x01, 0x0a, 0x18, 0x75, 0x6e, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, + 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x16, 0x75, 0x6e, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x1a, 0xe3, 0x06, 0x0a, 0x1c, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6f, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x6f, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x64, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x93, 0x01, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x6e, 0x63, 0x65, 0x56, 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x52, 0x07, 0x76, 0x65, 0x72, 0x64, + 0x69, 0x63, 0x74, 0x12, 0x85, 0x01, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x9c, 0x02, 0x0a, 0x0c, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x40, 0x0a, 0x0b, 0x41, 0x75, 0x64, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x44, 0x49, 0x54, + 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x02, 0x22, 0x5b, 0x0a, 0x18, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x56, + 0x65, 0x72, 0x64, 0x69, 0x63, 0x74, 0x12, 0x2a, 0x0a, 0x26, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x56, 0x45, 0x52, + 0x44, 0x49, 0x43, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x49, 0x4f, 0x4c, 0x41, 0x54, 0x45, 0x53, 0x5f, 0x50, + 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x01, 0x1a, 0x3a, 0x0a, 0x16, 0x55, 0x6e, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x42, 0xb6, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x2b, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x42, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescOnce sync.Once + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescData = file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDesc +) + +func file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescGZIP() []byte { + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescOnce.Do(func() { + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescData) + }) + return file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDescData +} + +var file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_goTypes = []interface{}{ + (ContinuousValidationEvent_ContinuousValidationPodEvent_PolicyConformanceVerdict)(0), // 0: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict + (ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_AuditResult)(0), // 1: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult + (*ContinuousValidationEvent)(nil), // 2: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent + (*ContinuousValidationEvent_ContinuousValidationPodEvent)(nil), // 3: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent + (*ContinuousValidationEvent_UnsupportedPolicyEvent)(nil), // 4: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent + (*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails)(nil), // 5: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_depIdxs = []int32{ + 3, // 0: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.pod_event:type_name -> google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent + 4, // 1: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.unsupported_policy_event:type_name -> google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent + 6, // 2: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.deploy_time:type_name -> google.protobuf.Timestamp + 6, // 3: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.end_time:type_name -> google.protobuf.Timestamp + 0, // 4: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.verdict:type_name -> google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict + 5, // 5: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.images:type_name -> google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails + 1, // 6: google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.result:type_name -> google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_init() } +func file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_init() { + if File_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinuousValidationEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinuousValidationEvent_ContinuousValidationPodEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinuousValidationEvent_UnsupportedPolicyEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ContinuousValidationEvent_PodEvent)(nil), + (*ContinuousValidationEvent_UnsupportedPolicyEvent_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_goTypes, + DependencyIndexes: file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_depIdxs, + EnumInfos: file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_enumTypes, + MessageInfos: file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_msgTypes, + }.Build() + File_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto = out.File + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_rawDesc = nil + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_goTypes = nil + file_google_cloud_binaryauthorization_v1beta1_continuous_validation_logging_proto_depIdxs = nil +} diff --git a/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go b/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go new file mode 100644 index 000000000000..d262cbbd8caf --- /dev/null +++ b/binaryauthorization/apiv1beta1/binaryauthorizationpb/resources.pb.go @@ -0,0 +1,1453 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/binaryauthorization/v1beta1/resources.proto + +package binaryauthorizationpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Policy_GlobalPolicyEvaluationMode int32 + +const ( + // Not specified: DISABLE is assumed. + Policy_GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED Policy_GlobalPolicyEvaluationMode = 0 + // Enables system policy evaluation. + Policy_ENABLE Policy_GlobalPolicyEvaluationMode = 1 + // Disables system policy evaluation. + Policy_DISABLE Policy_GlobalPolicyEvaluationMode = 2 +) + +// Enum value maps for Policy_GlobalPolicyEvaluationMode. +var ( + Policy_GlobalPolicyEvaluationMode_name = map[int32]string{ + 0: "GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED", + 1: "ENABLE", + 2: "DISABLE", + } + Policy_GlobalPolicyEvaluationMode_value = map[string]int32{ + "GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED": 0, + "ENABLE": 1, + "DISABLE": 2, + } +) + +func (x Policy_GlobalPolicyEvaluationMode) Enum() *Policy_GlobalPolicyEvaluationMode { + p := new(Policy_GlobalPolicyEvaluationMode) + *p = x + return p +} + +func (x Policy_GlobalPolicyEvaluationMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Policy_GlobalPolicyEvaluationMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[0].Descriptor() +} + +func (Policy_GlobalPolicyEvaluationMode) Type() protoreflect.EnumType { + return &file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[0] +} + +func (x Policy_GlobalPolicyEvaluationMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Policy_GlobalPolicyEvaluationMode.Descriptor instead. +func (Policy_GlobalPolicyEvaluationMode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{0, 0} +} + +type AdmissionRule_EvaluationMode int32 + +const ( + // Do not use. + AdmissionRule_EVALUATION_MODE_UNSPECIFIED AdmissionRule_EvaluationMode = 0 + // This rule allows all all pod creations. + AdmissionRule_ALWAYS_ALLOW AdmissionRule_EvaluationMode = 1 + // This rule allows a pod creation if all the attestors listed in + // `require_attestations_by` have valid attestations for all of the + // images in the pod spec. + AdmissionRule_REQUIRE_ATTESTATION AdmissionRule_EvaluationMode = 2 + // This rule denies all pod creations. + AdmissionRule_ALWAYS_DENY AdmissionRule_EvaluationMode = 3 +) + +// Enum value maps for AdmissionRule_EvaluationMode. +var ( + AdmissionRule_EvaluationMode_name = map[int32]string{ + 0: "EVALUATION_MODE_UNSPECIFIED", + 1: "ALWAYS_ALLOW", + 2: "REQUIRE_ATTESTATION", + 3: "ALWAYS_DENY", + } + AdmissionRule_EvaluationMode_value = map[string]int32{ + "EVALUATION_MODE_UNSPECIFIED": 0, + "ALWAYS_ALLOW": 1, + "REQUIRE_ATTESTATION": 2, + "ALWAYS_DENY": 3, + } +) + +func (x AdmissionRule_EvaluationMode) Enum() *AdmissionRule_EvaluationMode { + p := new(AdmissionRule_EvaluationMode) + *p = x + return p +} + +func (x AdmissionRule_EvaluationMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdmissionRule_EvaluationMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[1].Descriptor() +} + +func (AdmissionRule_EvaluationMode) Type() protoreflect.EnumType { + return &file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[1] +} + +func (x AdmissionRule_EvaluationMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdmissionRule_EvaluationMode.Descriptor instead. +func (AdmissionRule_EvaluationMode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{2, 0} +} + +// Defines the possible actions when a pod creation is denied by an admission +// rule. +type AdmissionRule_EnforcementMode int32 + +const ( + // Do not use. + AdmissionRule_ENFORCEMENT_MODE_UNSPECIFIED AdmissionRule_EnforcementMode = 0 + // Enforce the admission rule by blocking the pod creation. + AdmissionRule_ENFORCED_BLOCK_AND_AUDIT_LOG AdmissionRule_EnforcementMode = 1 + // Dryrun mode: Audit logging only. This will allow the pod creation as if + // the admission request had specified break-glass. + AdmissionRule_DRYRUN_AUDIT_LOG_ONLY AdmissionRule_EnforcementMode = 2 +) + +// Enum value maps for AdmissionRule_EnforcementMode. +var ( + AdmissionRule_EnforcementMode_name = map[int32]string{ + 0: "ENFORCEMENT_MODE_UNSPECIFIED", + 1: "ENFORCED_BLOCK_AND_AUDIT_LOG", + 2: "DRYRUN_AUDIT_LOG_ONLY", + } + AdmissionRule_EnforcementMode_value = map[string]int32{ + "ENFORCEMENT_MODE_UNSPECIFIED": 0, + "ENFORCED_BLOCK_AND_AUDIT_LOG": 1, + "DRYRUN_AUDIT_LOG_ONLY": 2, + } +) + +func (x AdmissionRule_EnforcementMode) Enum() *AdmissionRule_EnforcementMode { + p := new(AdmissionRule_EnforcementMode) + *p = x + return p +} + +func (x AdmissionRule_EnforcementMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdmissionRule_EnforcementMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[2].Descriptor() +} + +func (AdmissionRule_EnforcementMode) Type() protoreflect.EnumType { + return &file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[2] +} + +func (x AdmissionRule_EnforcementMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdmissionRule_EnforcementMode.Descriptor instead. +func (AdmissionRule_EnforcementMode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{2, 1} +} + +// Represents a signature algorithm and other information necessary to verify +// signatures with a given public key. +// This is based primarily on the public key types supported by Tink's +// PemKeyType, which is in turn based on KMS's supported signing algorithms. +// See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz +// might support additional public key types independently of Tink and/or KMS. +type PkixPublicKey_SignatureAlgorithm int32 + +const ( + // Not specified. + PkixPublicKey_SIGNATURE_ALGORITHM_UNSPECIFIED PkixPublicKey_SignatureAlgorithm = 0 + // RSASSA-PSS 2048 bit key with a SHA256 digest. + PkixPublicKey_RSA_PSS_2048_SHA256 PkixPublicKey_SignatureAlgorithm = 1 + // RSASSA-PSS 3072 bit key with a SHA256 digest. + PkixPublicKey_RSA_PSS_3072_SHA256 PkixPublicKey_SignatureAlgorithm = 2 + // RSASSA-PSS 4096 bit key with a SHA256 digest. + PkixPublicKey_RSA_PSS_4096_SHA256 PkixPublicKey_SignatureAlgorithm = 3 + // RSASSA-PSS 4096 bit key with a SHA512 digest. + PkixPublicKey_RSA_PSS_4096_SHA512 PkixPublicKey_SignatureAlgorithm = 4 + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + PkixPublicKey_RSA_SIGN_PKCS1_2048_SHA256 PkixPublicKey_SignatureAlgorithm = 5 + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + PkixPublicKey_RSA_SIGN_PKCS1_3072_SHA256 PkixPublicKey_SignatureAlgorithm = 6 + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + PkixPublicKey_RSA_SIGN_PKCS1_4096_SHA256 PkixPublicKey_SignatureAlgorithm = 7 + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + PkixPublicKey_RSA_SIGN_PKCS1_4096_SHA512 PkixPublicKey_SignatureAlgorithm = 8 + // ECDSA on the NIST P-256 curve with a SHA256 digest. + PkixPublicKey_ECDSA_P256_SHA256 PkixPublicKey_SignatureAlgorithm = 9 + // ECDSA on the NIST P-256 curve with a SHA256 digest. + PkixPublicKey_EC_SIGN_P256_SHA256 PkixPublicKey_SignatureAlgorithm = 9 + // ECDSA on the NIST P-384 curve with a SHA384 digest. + PkixPublicKey_ECDSA_P384_SHA384 PkixPublicKey_SignatureAlgorithm = 10 + // ECDSA on the NIST P-384 curve with a SHA384 digest. + PkixPublicKey_EC_SIGN_P384_SHA384 PkixPublicKey_SignatureAlgorithm = 10 + // ECDSA on the NIST P-521 curve with a SHA512 digest. + PkixPublicKey_ECDSA_P521_SHA512 PkixPublicKey_SignatureAlgorithm = 11 + // ECDSA on the NIST P-521 curve with a SHA512 digest. + PkixPublicKey_EC_SIGN_P521_SHA512 PkixPublicKey_SignatureAlgorithm = 11 +) + +// Enum value maps for PkixPublicKey_SignatureAlgorithm. +var ( + PkixPublicKey_SignatureAlgorithm_name = map[int32]string{ + 0: "SIGNATURE_ALGORITHM_UNSPECIFIED", + 1: "RSA_PSS_2048_SHA256", + 2: "RSA_PSS_3072_SHA256", + 3: "RSA_PSS_4096_SHA256", + 4: "RSA_PSS_4096_SHA512", + 5: "RSA_SIGN_PKCS1_2048_SHA256", + 6: "RSA_SIGN_PKCS1_3072_SHA256", + 7: "RSA_SIGN_PKCS1_4096_SHA256", + 8: "RSA_SIGN_PKCS1_4096_SHA512", + 9: "ECDSA_P256_SHA256", + // Duplicate value: 9: "EC_SIGN_P256_SHA256", + 10: "ECDSA_P384_SHA384", + // Duplicate value: 10: "EC_SIGN_P384_SHA384", + 11: "ECDSA_P521_SHA512", + // Duplicate value: 11: "EC_SIGN_P521_SHA512", + } + PkixPublicKey_SignatureAlgorithm_value = map[string]int32{ + "SIGNATURE_ALGORITHM_UNSPECIFIED": 0, + "RSA_PSS_2048_SHA256": 1, + "RSA_PSS_3072_SHA256": 2, + "RSA_PSS_4096_SHA256": 3, + "RSA_PSS_4096_SHA512": 4, + "RSA_SIGN_PKCS1_2048_SHA256": 5, + "RSA_SIGN_PKCS1_3072_SHA256": 6, + "RSA_SIGN_PKCS1_4096_SHA256": 7, + "RSA_SIGN_PKCS1_4096_SHA512": 8, + "ECDSA_P256_SHA256": 9, + "EC_SIGN_P256_SHA256": 9, + "ECDSA_P384_SHA384": 10, + "EC_SIGN_P384_SHA384": 10, + "ECDSA_P521_SHA512": 11, + "EC_SIGN_P521_SHA512": 11, + } +) + +func (x PkixPublicKey_SignatureAlgorithm) Enum() *PkixPublicKey_SignatureAlgorithm { + p := new(PkixPublicKey_SignatureAlgorithm) + *p = x + return p +} + +func (x PkixPublicKey_SignatureAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PkixPublicKey_SignatureAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[3].Descriptor() +} + +func (PkixPublicKey_SignatureAlgorithm) Type() protoreflect.EnumType { + return &file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes[3] +} + +func (x PkixPublicKey_SignatureAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PkixPublicKey_SignatureAlgorithm.Descriptor instead. +func (PkixPublicKey_SignatureAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{5, 0} +} + +// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization. +type Policy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name, in the format `projects/*/policy`. There is + // at most one policy per project. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A descriptive comment. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + // Optional. Controls the evaluation of a Google-maintained global admission + // policy for common system-level images. Images not covered by the global + // policy will be subject to the project admission policy. This setting + // has no effect when specified inside a global admission policy. + GlobalPolicyEvaluationMode Policy_GlobalPolicyEvaluationMode `protobuf:"varint,7,opt,name=global_policy_evaluation_mode,json=globalPolicyEvaluationMode,proto3,enum=google.cloud.binaryauthorization.v1beta1.Policy_GlobalPolicyEvaluationMode" json:"global_policy_evaluation_mode,omitempty"` + // Optional. Admission policy allowlisting. A matching admission request will + // always be permitted. This feature is typically used to exclude Google or + // third-party infrastructure images from Binary Authorization policies. + AdmissionWhitelistPatterns []*AdmissionWhitelistPattern `protobuf:"bytes,2,rep,name=admission_whitelist_patterns,json=admissionWhitelistPatterns,proto3" json:"admission_whitelist_patterns,omitempty"` + // Optional. Per-cluster admission rules. Cluster spec format: + // `location.clusterId`. There can be at most one admission rule per cluster + // spec. + // A `location` is either a compute zone (e.g. us-central1-a) or a region + // (e.g. us-central1). + // For `clusterId` syntax restrictions see + // https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + ClusterAdmissionRules map[string]*AdmissionRule `protobuf:"bytes,3,rep,name=cluster_admission_rules,json=clusterAdmissionRules,proto3" json:"cluster_admission_rules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + // + // `[a-z.-]+`, e.g. `some-namespace` + KubernetesNamespaceAdmissionRules map[string]*AdmissionRule `protobuf:"bytes,10,rep,name=kubernetes_namespace_admission_rules,json=kubernetesNamespaceAdmissionRules,proto3" json:"kubernetes_namespace_admission_rules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. Per-kubernetes-service-account admission rules. Service account + // spec format: `namespace:serviceaccount`. e.g. `test-ns:default` + KubernetesServiceAccountAdmissionRules map[string]*AdmissionRule `protobuf:"bytes,8,rep,name=kubernetes_service_account_admission_rules,json=kubernetesServiceAccountAdmissionRules,proto3" json:"kubernetes_service_account_admission_rules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. Per-istio-service-identity admission rules. Istio service + // identity spec format: + // `spiffe:///ns//sa/` or + // `/ns//sa/` + // e.g. `spiffe://example.com/ns/test-ns/sa/default` + IstioServiceIdentityAdmissionRules map[string]*AdmissionRule `protobuf:"bytes,9,rep,name=istio_service_identity_admission_rules,json=istioServiceIdentityAdmissionRules,proto3" json:"istio_service_identity_admission_rules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. Default admission rule for a cluster without a per-cluster, per- + // kubernetes-service-account, or per-istio-service-identity admission rule. + DefaultAdmissionRule *AdmissionRule `protobuf:"bytes,4,opt,name=default_admission_rule,json=defaultAdmissionRule,proto3" json:"default_admission_rule,omitempty"` + // Output only. Time when the policy was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *Policy) Reset() { + *x = Policy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Policy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Policy) ProtoMessage() {} + +func (x *Policy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Policy.ProtoReflect.Descriptor instead. +func (*Policy) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{0} +} + +func (x *Policy) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Policy) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Policy) GetGlobalPolicyEvaluationMode() Policy_GlobalPolicyEvaluationMode { + if x != nil { + return x.GlobalPolicyEvaluationMode + } + return Policy_GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED +} + +func (x *Policy) GetAdmissionWhitelistPatterns() []*AdmissionWhitelistPattern { + if x != nil { + return x.AdmissionWhitelistPatterns + } + return nil +} + +func (x *Policy) GetClusterAdmissionRules() map[string]*AdmissionRule { + if x != nil { + return x.ClusterAdmissionRules + } + return nil +} + +func (x *Policy) GetKubernetesNamespaceAdmissionRules() map[string]*AdmissionRule { + if x != nil { + return x.KubernetesNamespaceAdmissionRules + } + return nil +} + +func (x *Policy) GetKubernetesServiceAccountAdmissionRules() map[string]*AdmissionRule { + if x != nil { + return x.KubernetesServiceAccountAdmissionRules + } + return nil +} + +func (x *Policy) GetIstioServiceIdentityAdmissionRules() map[string]*AdmissionRule { + if x != nil { + return x.IstioServiceIdentityAdmissionRules + } + return nil +} + +func (x *Policy) GetDefaultAdmissionRule() *AdmissionRule { + if x != nil { + return x.DefaultAdmissionRule + } + return nil +} + +func (x *Policy) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images +// from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. +type AdmissionWhitelistPattern struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An image name pattern to allowlist, in the form `registry/path/to/image`. + // This supports a trailing `*` as a wildcard, but this is allowed only in + // text after the `registry/` part. `*` wildcard does not match `/`, i.e., + // `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match + // `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which + // matches subdirectories, i.e., `gcr.io/nginx**` matches + // `gcr.io/nginx/image`. + NamePattern string `protobuf:"bytes,1,opt,name=name_pattern,json=namePattern,proto3" json:"name_pattern,omitempty"` +} + +func (x *AdmissionWhitelistPattern) Reset() { + *x = AdmissionWhitelistPattern{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionWhitelistPattern) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionWhitelistPattern) ProtoMessage() {} + +func (x *AdmissionWhitelistPattern) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionWhitelistPattern.ProtoReflect.Descriptor instead. +func (*AdmissionWhitelistPattern) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *AdmissionWhitelistPattern) GetNamePattern() string { + if x != nil { + return x.NamePattern + } + return "" +} + +// An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images +// used in a pod creation request must be attested to by one or more +// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all +// pod creations will be denied. +// +// Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] +// are exempted from admission rules and will never block a pod creation. +type AdmissionRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. How this admission rule will be evaluated. + EvaluationMode AdmissionRule_EvaluationMode `protobuf:"varint,1,opt,name=evaluation_mode,json=evaluationMode,proto3,enum=google.cloud.binaryauthorization.v1beta1.AdmissionRule_EvaluationMode" json:"evaluation_mode,omitempty"` + // Optional. The resource names of the attestors that must attest to + // a container image, in the format `projects/*/attestors/*`. Each + // attestor must exist before a policy can reference it. To add an attestor + // to a policy the principal issuing the policy change request must be able + // to read the attestor resource. + // + // Note: this field must be non-empty when the evaluation_mode field specifies + // REQUIRE_ATTESTATION, otherwise it must be empty. + RequireAttestationsBy []string `protobuf:"bytes,2,rep,name=require_attestations_by,json=requireAttestationsBy,proto3" json:"require_attestations_by,omitempty"` + // Required. The action when a pod creation is denied by the admission rule. + EnforcementMode AdmissionRule_EnforcementMode `protobuf:"varint,3,opt,name=enforcement_mode,json=enforcementMode,proto3,enum=google.cloud.binaryauthorization.v1beta1.AdmissionRule_EnforcementMode" json:"enforcement_mode,omitempty"` +} + +func (x *AdmissionRule) Reset() { + *x = AdmissionRule{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionRule) ProtoMessage() {} + +func (x *AdmissionRule) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionRule.ProtoReflect.Descriptor instead. +func (*AdmissionRule) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{2} +} + +func (x *AdmissionRule) GetEvaluationMode() AdmissionRule_EvaluationMode { + if x != nil { + return x.EvaluationMode + } + return AdmissionRule_EVALUATION_MODE_UNSPECIFIED +} + +func (x *AdmissionRule) GetRequireAttestationsBy() []string { + if x != nil { + return x.RequireAttestationsBy + } + return nil +} + +func (x *AdmissionRule) GetEnforcementMode() AdmissionRule_EnforcementMode { + if x != nil { + return x.EnforcementMode + } + return AdmissionRule_ENFORCEMENT_MODE_UNSPECIFIED +} + +// An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image +// artifacts. An existing attestor cannot be modified except where +// indicated. +type Attestor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name, in the format: + // `projects/*/attestors/*`. This field may not be updated. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A descriptive comment. This field may be updated. + // The field may be displayed in chooser dialogs. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + // Required. Identifies an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to a + // container image artifact. This determines how an attestation will + // be stored, and how it will be used during policy + // enforcement. Updates may not change the attestor type, but individual + // attestor fields may be updated. + // + // Types that are assignable to AttestorType: + // + // *Attestor_UserOwnedDrydockNote + AttestorType isAttestor_AttestorType `protobuf_oneof:"attestor_type"` + // Output only. Time when the attestor was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *Attestor) Reset() { + *x = Attestor{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attestor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attestor) ProtoMessage() {} + +func (x *Attestor) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Attestor.ProtoReflect.Descriptor instead. +func (*Attestor) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{3} +} + +func (x *Attestor) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Attestor) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (m *Attestor) GetAttestorType() isAttestor_AttestorType { + if m != nil { + return m.AttestorType + } + return nil +} + +func (x *Attestor) GetUserOwnedDrydockNote() *UserOwnedDrydockNote { + if x, ok := x.GetAttestorType().(*Attestor_UserOwnedDrydockNote); ok { + return x.UserOwnedDrydockNote + } + return nil +} + +func (x *Attestor) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +type isAttestor_AttestorType interface { + isAttestor_AttestorType() +} + +type Attestor_UserOwnedDrydockNote struct { + // A Drydock ATTESTATION_AUTHORITY Note, created by the user. + UserOwnedDrydockNote *UserOwnedDrydockNote `protobuf:"bytes,3,opt,name=user_owned_drydock_note,json=userOwnedDrydockNote,proto3,oneof"` +} + +func (*Attestor_UserOwnedDrydockNote) isAttestor_AttestorType() {} + +// An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock +// ATTESTATION_AUTHORITY Note created by the user. +type UserOwnedDrydockNote struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, + // created by the user, in the format: `projects/*/notes/*` (or the legacy + // `providers/*/notes/*`). This field may not be updated. + // + // An attestation by this attestor is stored as a Drydock + // ATTESTATION_AUTHORITY Occurrence that names a container image and that + // links to this Note. Drydock is an external dependency. + NoteReference string `protobuf:"bytes,1,opt,name=note_reference,json=noteReference,proto3" json:"note_reference,omitempty"` + // Optional. Public keys that verify attestations signed by this + // attestor. This field may be updated. + // + // If this field is non-empty, one of the specified public keys must + // verify that an attestation was signed by this attestor for the + // image specified in the admission request. + // + // If this field is empty, this attestor always returns that no + // valid attestations exist. + PublicKeys []*AttestorPublicKey `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"` + // Output only. This field will contain the service account email address + // that this Attestor will use as the principal when querying Container + // Analysis. Attestor administrators must grant this service account the + // IAM role needed to read attestations from the [note_reference][Note] in + // Container Analysis (`containeranalysis.notes.occurrences.viewer`). + // + // This email address is fixed for the lifetime of the Attestor, but callers + // should not make any other assumptions about the service account email; + // future versions may use an email based on a different naming pattern. + DelegationServiceAccountEmail string `protobuf:"bytes,3,opt,name=delegation_service_account_email,json=delegationServiceAccountEmail,proto3" json:"delegation_service_account_email,omitempty"` +} + +func (x *UserOwnedDrydockNote) Reset() { + *x = UserOwnedDrydockNote{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserOwnedDrydockNote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserOwnedDrydockNote) ProtoMessage() {} + +func (x *UserOwnedDrydockNote) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserOwnedDrydockNote.ProtoReflect.Descriptor instead. +func (*UserOwnedDrydockNote) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{4} +} + +func (x *UserOwnedDrydockNote) GetNoteReference() string { + if x != nil { + return x.NoteReference + } + return "" +} + +func (x *UserOwnedDrydockNote) GetPublicKeys() []*AttestorPublicKey { + if x != nil { + return x.PublicKeys + } + return nil +} + +func (x *UserOwnedDrydockNote) GetDelegationServiceAccountEmail() string { + if x != nil { + return x.DelegationServiceAccountEmail + } + return "" +} + +// A public key in the PkixPublicKey format (see +// https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). +// Public keys of this type are typically textually encoded using the PEM +// format. +type PkixPublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A PEM-encoded public key, as described in + // https://tools.ietf.org/html/rfc7468#section-13 + PublicKeyPem string `protobuf:"bytes,1,opt,name=public_key_pem,json=publicKeyPem,proto3" json:"public_key_pem,omitempty"` + // The signature algorithm used to verify a message against a signature using + // this key. + // These signature algorithm must match the structure and any object + // identifiers encoded in `public_key_pem` (i.e. this algorithm must match + // that of the public key). + SignatureAlgorithm PkixPublicKey_SignatureAlgorithm `protobuf:"varint,2,opt,name=signature_algorithm,json=signatureAlgorithm,proto3,enum=google.cloud.binaryauthorization.v1beta1.PkixPublicKey_SignatureAlgorithm" json:"signature_algorithm,omitempty"` +} + +func (x *PkixPublicKey) Reset() { + *x = PkixPublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PkixPublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PkixPublicKey) ProtoMessage() {} + +func (x *PkixPublicKey) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PkixPublicKey.ProtoReflect.Descriptor instead. +func (*PkixPublicKey) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{5} +} + +func (x *PkixPublicKey) GetPublicKeyPem() string { + if x != nil { + return x.PublicKeyPem + } + return "" +} + +func (x *PkixPublicKey) GetSignatureAlgorithm() PkixPublicKey_SignatureAlgorithm { + if x != nil { + return x.SignatureAlgorithm + } + return PkixPublicKey_SIGNATURE_ALGORITHM_UNSPECIFIED +} + +// An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify +// attestations signed by this attestor. +type AttestorPublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. A descriptive comment. This field may be updated. + Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` + // The ID of this public key. + // Signatures verified by BinAuthz must include the ID of the public key that + // can be used to verify them, and that ID must match the contents of this + // field exactly. + // Additional restrictions on this field can be imposed based on which public + // key type is encapsulated. See the documentation on `public_key` cases below + // for details. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // Required. A public key reference or serialized instance. This field may be + // updated. + // + // Types that are assignable to PublicKey: + // + // *AttestorPublicKey_AsciiArmoredPgpPublicKey + // *AttestorPublicKey_PkixPublicKey + PublicKey isAttestorPublicKey_PublicKey `protobuf_oneof:"public_key"` +} + +func (x *AttestorPublicKey) Reset() { + *x = AttestorPublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttestorPublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttestorPublicKey) ProtoMessage() {} + +func (x *AttestorPublicKey) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttestorPublicKey.ProtoReflect.Descriptor instead. +func (*AttestorPublicKey) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP(), []int{6} +} + +func (x *AttestorPublicKey) GetComment() string { + if x != nil { + return x.Comment + } + return "" +} + +func (x *AttestorPublicKey) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *AttestorPublicKey) GetPublicKey() isAttestorPublicKey_PublicKey { + if m != nil { + return m.PublicKey + } + return nil +} + +func (x *AttestorPublicKey) GetAsciiArmoredPgpPublicKey() string { + if x, ok := x.GetPublicKey().(*AttestorPublicKey_AsciiArmoredPgpPublicKey); ok { + return x.AsciiArmoredPgpPublicKey + } + return "" +} + +func (x *AttestorPublicKey) GetPkixPublicKey() *PkixPublicKey { + if x, ok := x.GetPublicKey().(*AttestorPublicKey_PkixPublicKey); ok { + return x.PkixPublicKey + } + return nil +} + +type isAttestorPublicKey_PublicKey interface { + isAttestorPublicKey_PublicKey() +} + +type AttestorPublicKey_AsciiArmoredPgpPublicKey struct { + // ASCII-armored representation of a PGP public key, as the entire output by + // the command `gpg --export --armor foo@example.com` (either LF or CRLF + // line endings). + // When using this field, `id` should be left blank. The BinAuthz API + // handlers will calculate the ID and fill it in automatically. BinAuthz + // computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + // upper-case hex. If `id` is provided by the caller, it will be + // overwritten by the API-calculated ID. + AsciiArmoredPgpPublicKey string `protobuf:"bytes,3,opt,name=ascii_armored_pgp_public_key,json=asciiArmoredPgpPublicKey,proto3,oneof"` +} + +type AttestorPublicKey_PkixPublicKey struct { + // A raw PKIX SubjectPublicKeyInfo format public key. + // + // NOTE: `id` may be explicitly provided by the caller when using this + // type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + // blank, a default one will be computed based on the digest of the DER + // encoding of the public key. + PkixPublicKey *PkixPublicKey `protobuf:"bytes,5,opt,name=pkix_public_key,json=pkixPublicKey,proto3,oneof"` +} + +func (*AttestorPublicKey_AsciiArmoredPgpPublicKey) isAttestorPublicKey_PublicKey() {} + +func (*AttestorPublicKey_PkixPublicKey) isAttestorPublicKey_PublicKey() {} + +var File_google_cloud_binaryauthorization_v1beta1_resources_proto protoreflect.FileDescriptor + +var file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xd8, 0x0f, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x93, 0x01, 0x0a, + 0x1d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x65, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1a, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x1c, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x1a, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, + 0x88, 0x01, 0x0a, 0x17, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x4b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x24, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4b, 0x75, 0x62, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, + 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x21, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0xbd, 0x01, 0x0a, 0x2a, 0x6b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x5c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x26, 0x69, + 0x73, 0x74, 0x69, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x58, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x49, 0x73, + 0x74, 0x69, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x22, 0x69, 0x73, 0x74, 0x69, + 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x72, + 0x0a, 0x16, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x14, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x81, 0x01, 0x0a, 0x1a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8d, 0x01, 0x0a, 0x26, 0x4b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x92, 0x01, 0x0a, 0x2b, 0x4b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8e, 0x01, + 0x0a, 0x27, 0x49, 0x73, 0x74, 0x69, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x75, 0x6c, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x64, + 0x0a, 0x1a, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x29, + 0x47, 0x4c, 0x4f, 0x42, 0x41, 0x4c, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x45, 0x56, + 0x41, 0x4c, 0x55, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, + 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x49, 0x53, 0x41, 0x42, + 0x4c, 0x45, 0x10, 0x02, 0x3a, 0x66, 0xea, 0x41, 0x63, 0x0a, 0x29, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x19, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x3e, 0x0a, 0x19, + 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x9c, 0x04, 0x0a, + 0x0d, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x74, + 0x0a, 0x0f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, + 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x62, 0x79, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x79, 0x12, 0x77, 0x0a, 0x10, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x65, 0x6e, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x6d, 0x0a, 0x0e, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x1b, + 0x45, 0x56, 0x41, 0x4c, 0x55, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x5f, 0x41, 0x54, 0x54, 0x45, 0x53, + 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x4c, 0x57, 0x41, + 0x59, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x03, 0x22, 0x70, 0x0a, 0x0f, 0x45, 0x6e, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x1c, + 0x45, 0x4e, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, + 0x0a, 0x1c, 0x45, 0x4e, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x44, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, + 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x54, 0x5f, 0x4c, 0x4f, 0x47, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x44, 0x52, 0x59, 0x52, 0x55, 0x4e, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x54, + 0x5f, 0x4c, 0x4f, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x22, 0xf1, 0x02, 0x0a, 0x08, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x77, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x5f, 0x64, 0x72, 0x79, 0x64, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x6f, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x44, 0x72, + 0x79, 0x64, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x74, 0x65, 0x48, 0x00, 0x52, 0x14, 0x75, 0x73, 0x65, + 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x44, 0x72, 0x79, 0x64, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x74, + 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x3a, 0x59, 0xea, 0x41, 0x56, 0x0a, 0x2b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x7d, 0x42, 0x0f, + 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, + 0xf3, 0x01, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x77, 0x6e, 0x65, 0x64, 0x44, 0x72, 0x79, + 0x64, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x65, + 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x6e, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x4c, 0x0a, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xe6, 0x04, 0x0a, 0x0d, 0x50, 0x6b, 0x69, 0x78, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x65, 0x6d, 0x12, 0x7b, 0x0a, + 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6b, 0x69, 0x78, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, + 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x22, 0xb1, 0x03, 0x0a, 0x12, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x41, + 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, + 0x53, 0x5f, 0x32, 0x30, 0x34, 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x33, 0x30, 0x37, 0x32, 0x5f, + 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x53, 0x41, 0x5f, + 0x50, 0x53, 0x53, 0x5f, 0x34, 0x30, 0x39, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, + 0x03, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x34, 0x30, 0x39, + 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, + 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x32, 0x30, 0x34, + 0x38, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, + 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x33, 0x30, 0x37, + 0x32, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x06, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, + 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, 0x30, 0x39, + 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x53, + 0x41, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x34, 0x30, 0x39, + 0x36, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, + 0x44, 0x53, 0x41, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, + 0x09, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x32, 0x35, + 0x36, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x09, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, + 0x44, 0x53, 0x41, 0x5f, 0x50, 0x33, 0x38, 0x34, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, + 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x33, 0x38, + 0x34, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x43, + 0x44, 0x53, 0x41, 0x5f, 0x50, 0x35, 0x32, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, + 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x43, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x35, 0x32, + 0x31, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x0b, 0x1a, 0x02, 0x10, 0x01, 0x22, 0xf5, + 0x01, 0x0a, 0x11, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x40, 0x0a, 0x1c, 0x61, 0x73, 0x63, 0x69, 0x69, 0x5f, 0x61, 0x72, 0x6d, + 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x70, 0x67, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x18, 0x61, 0x73, 0x63, + 0x69, 0x69, 0x41, 0x72, 0x6d, 0x6f, 0x72, 0x65, 0x64, 0x50, 0x67, 0x70, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x61, 0x0a, 0x0f, 0x70, 0x6b, 0x69, 0x78, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6b, 0x69, 0x78, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x6b, 0x69, 0x78, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0xb7, 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, + 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x21, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x28, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x42, 0x69, 0x6e, 0x61, + 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xea, 0x02, 0x2b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x3a, 0x3a, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescOnce sync.Once + file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescData = file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDesc +) + +func file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescGZIP() []byte { + file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescOnce.Do(func() { + file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescData) + }) + return file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDescData +} + +var file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_google_cloud_binaryauthorization_v1beta1_resources_proto_goTypes = []interface{}{ + (Policy_GlobalPolicyEvaluationMode)(0), // 0: google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode + (AdmissionRule_EvaluationMode)(0), // 1: google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode + (AdmissionRule_EnforcementMode)(0), // 2: google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode + (PkixPublicKey_SignatureAlgorithm)(0), // 3: google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm + (*Policy)(nil), // 4: google.cloud.binaryauthorization.v1beta1.Policy + (*AdmissionWhitelistPattern)(nil), // 5: google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern + (*AdmissionRule)(nil), // 6: google.cloud.binaryauthorization.v1beta1.AdmissionRule + (*Attestor)(nil), // 7: google.cloud.binaryauthorization.v1beta1.Attestor + (*UserOwnedDrydockNote)(nil), // 8: google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote + (*PkixPublicKey)(nil), // 9: google.cloud.binaryauthorization.v1beta1.PkixPublicKey + (*AttestorPublicKey)(nil), // 10: google.cloud.binaryauthorization.v1beta1.AttestorPublicKey + nil, // 11: google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntry + nil, // 12: google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntry + nil, // 13: google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntry + nil, // 14: google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntry + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp +} +var file_google_cloud_binaryauthorization_v1beta1_resources_proto_depIdxs = []int32{ + 0, // 0: google.cloud.binaryauthorization.v1beta1.Policy.global_policy_evaluation_mode:type_name -> google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode + 5, // 1: google.cloud.binaryauthorization.v1beta1.Policy.admission_whitelist_patterns:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern + 11, // 2: google.cloud.binaryauthorization.v1beta1.Policy.cluster_admission_rules:type_name -> google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntry + 12, // 3: google.cloud.binaryauthorization.v1beta1.Policy.kubernetes_namespace_admission_rules:type_name -> google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntry + 13, // 4: google.cloud.binaryauthorization.v1beta1.Policy.kubernetes_service_account_admission_rules:type_name -> google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntry + 14, // 5: google.cloud.binaryauthorization.v1beta1.Policy.istio_service_identity_admission_rules:type_name -> google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntry + 6, // 6: google.cloud.binaryauthorization.v1beta1.Policy.default_admission_rule:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule + 15, // 7: google.cloud.binaryauthorization.v1beta1.Policy.update_time:type_name -> google.protobuf.Timestamp + 1, // 8: google.cloud.binaryauthorization.v1beta1.AdmissionRule.evaluation_mode:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode + 2, // 9: google.cloud.binaryauthorization.v1beta1.AdmissionRule.enforcement_mode:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode + 8, // 10: google.cloud.binaryauthorization.v1beta1.Attestor.user_owned_drydock_note:type_name -> google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote + 15, // 11: google.cloud.binaryauthorization.v1beta1.Attestor.update_time:type_name -> google.protobuf.Timestamp + 10, // 12: google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.public_keys:type_name -> google.cloud.binaryauthorization.v1beta1.AttestorPublicKey + 3, // 13: google.cloud.binaryauthorization.v1beta1.PkixPublicKey.signature_algorithm:type_name -> google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm + 9, // 14: google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.pkix_public_key:type_name -> google.cloud.binaryauthorization.v1beta1.PkixPublicKey + 6, // 15: google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntry.value:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule + 6, // 16: google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntry.value:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule + 6, // 17: google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntry.value:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule + 6, // 18: google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntry.value:type_name -> google.cloud.binaryauthorization.v1beta1.AdmissionRule + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_google_cloud_binaryauthorization_v1beta1_resources_proto_init() } +func file_google_cloud_binaryauthorization_v1beta1_resources_proto_init() { + if File_google_cloud_binaryauthorization_v1beta1_resources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Policy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionWhitelistPattern); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Attestor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserOwnedDrydockNote); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PkixPublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttestorPublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Attestor_UserOwnedDrydockNote)(nil), + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*AttestorPublicKey_AsciiArmoredPgpPublicKey)(nil), + (*AttestorPublicKey_PkixPublicKey)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDesc, + NumEnums: 4, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_binaryauthorization_v1beta1_resources_proto_goTypes, + DependencyIndexes: file_google_cloud_binaryauthorization_v1beta1_resources_proto_depIdxs, + EnumInfos: file_google_cloud_binaryauthorization_v1beta1_resources_proto_enumTypes, + MessageInfos: file_google_cloud_binaryauthorization_v1beta1_resources_proto_msgTypes, + }.Build() + File_google_cloud_binaryauthorization_v1beta1_resources_proto = out.File + file_google_cloud_binaryauthorization_v1beta1_resources_proto_rawDesc = nil + file_google_cloud_binaryauthorization_v1beta1_resources_proto_goTypes = nil + file_google_cloud_binaryauthorization_v1beta1_resources_proto_depIdxs = nil +} diff --git a/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go b/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go new file mode 100644 index 000000000000..357e13ae1161 --- /dev/null +++ b/binaryauthorization/apiv1beta1/binaryauthorizationpb/service.pb.go @@ -0,0 +1,1379 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/binaryauthorization/v1beta1/service.proto + +package binaryauthorizationpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for [BinauthzManagementService.GetPolicy][]. +type GetPolicyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, + // in the format `projects/*/policy`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPolicyRequest) Reset() { + *x = GetPolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPolicyRequest) ProtoMessage() {} + +func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPolicyRequest.ProtoReflect.Descriptor instead. +func (*GetPolicyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPolicyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [BinauthzManagementService.UpdatePolicy][]. +type UpdatePolicyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will + // overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in + // the request URL, in the format `projects/*/policy`. + Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` +} + +func (x *UpdatePolicyRequest) Reset() { + *x = UpdatePolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePolicyRequest) ProtoMessage() {} + +func (x *UpdatePolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePolicyRequest.ProtoReflect.Descriptor instead. +func (*UpdatePolicyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *UpdatePolicyRequest) GetPolicy() *Policy { + if x != nil { + return x.Policy + } + return nil +} + +// Request message for [BinauthzManagementService.CreateAttestor][]. +type CreateAttestorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID. + AttestorId string `protobuf:"bytes,2,opt,name=attestor_id,json=attestorId,proto3" json:"attestor_id,omitempty"` + // Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will + // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name, + // in the format `projects/*/attestors/*`. + Attestor *Attestor `protobuf:"bytes,3,opt,name=attestor,proto3" json:"attestor,omitempty"` +} + +func (x *CreateAttestorRequest) Reset() { + *x = CreateAttestorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAttestorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAttestorRequest) ProtoMessage() {} + +func (x *CreateAttestorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAttestorRequest.ProtoReflect.Descriptor instead. +func (*CreateAttestorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateAttestorRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateAttestorRequest) GetAttestorId() string { + if x != nil { + return x.AttestorId + } + return "" +} + +func (x *CreateAttestorRequest) GetAttestor() *Attestor { + if x != nil { + return x.Attestor + } + return nil +} + +// Request message for [BinauthzManagementService.GetAttestor][]. +type GetAttestorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format + // `projects/*/attestors/*`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAttestorRequest) Reset() { + *x = GetAttestorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAttestorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAttestorRequest) ProtoMessage() {} + +func (x *GetAttestorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAttestorRequest.ProtoReflect.Descriptor instead. +func (*GetAttestorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetAttestorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [BinauthzManagementService.UpdateAttestor][]. +type UpdateAttestorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will + // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name + // in the request URL, in the format `projects/*/attestors/*`. + Attestor *Attestor `protobuf:"bytes,1,opt,name=attestor,proto3" json:"attestor,omitempty"` +} + +func (x *UpdateAttestorRequest) Reset() { + *x = UpdateAttestorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAttestorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAttestorRequest) ProtoMessage() {} + +func (x *UpdateAttestorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAttestorRequest.ProtoReflect.Descriptor instead. +func (*UpdateAttestorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateAttestorRequest) GetAttestor() *Attestor { + if x != nil { + return x.Attestor + } + return nil +} + +// Request message for [BinauthzManagementService.ListAttestors][]. +type ListAttestorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the project associated with the + // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Requested page size. The server may return fewer results than requested. If + // unspecified, the server will pick an appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying a page of results the server should return. Typically, + // this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned + // from the previous call to the `ListAttestors` method. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAttestorsRequest) Reset() { + *x = ListAttestorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAttestorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAttestorsRequest) ProtoMessage() {} + +func (x *ListAttestorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAttestorsRequest.ProtoReflect.Descriptor instead. +func (*ListAttestorsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListAttestorsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListAttestorsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAttestorsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for [BinauthzManagementService.ListAttestors][]. +type ListAttestorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + Attestors []*Attestor `protobuf:"bytes,1,rep,name=attestors,proto3" json:"attestors,omitempty"` + // A token to retrieve the next page of results. Pass this value in the + // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the + // `ListAttestors` method to retrieve the next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAttestorsResponse) Reset() { + *x = ListAttestorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAttestorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAttestorsResponse) ProtoMessage() {} + +func (x *ListAttestorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAttestorsResponse.ProtoReflect.Descriptor instead. +func (*ListAttestorsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ListAttestorsResponse) GetAttestors() []*Attestor { + if x != nil { + return x.Attestors + } + return nil +} + +func (x *ListAttestorsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [BinauthzManagementService.DeleteAttestor][]. +type DeleteAttestorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format + // `projects/*/attestors/*`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteAttestorRequest) Reset() { + *x = DeleteAttestorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAttestorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAttestorRequest) ProtoMessage() {} + +func (x *DeleteAttestorRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAttestorRequest.ProtoReflect.Descriptor instead. +func (*DeleteAttestorRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteAttestorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request to read the current system policy. +type GetSystemPolicyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name, in the format `locations/*/policy`. + // Note that the system policy is not associated with a project. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSystemPolicyRequest) Reset() { + *x = GetSystemPolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSystemPolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSystemPolicyRequest) ProtoMessage() {} + +func (x *GetSystemPolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSystemPolicyRequest.ProtoReflect.Descriptor instead. +func (*GetSystemPolicyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *GetSystemPolicyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_binaryauthorization_v1beta1_service_proto protoreflect.FileDescriptor + +var file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, + 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xdf, 0x01, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, + 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x08, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, + 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, + 0x5d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x62, 0x69, 0x6e, + 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6c, + 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, 0x9f, 0x01, 0x0a, + 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x91, + 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, + 0x09, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x60, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2d, 0x0a, 0x2b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xcb, 0x0b, 0x0a, 0x20, 0x42, 0x69, 0x6e, 0x61, 0x75, 0x74, + 0x68, 0x7a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0xab, 0x01, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x32, 0x1a, 0x28, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x7d, 0x3a, 0x06, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0xda, 0x41, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0xdd, 0x01, + 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x26, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x73, 0x3a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0xda, + 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x5f, 0x69, 0x64, 0x2c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0xb6, 0x01, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, + 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, + 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd3, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, 0x4c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x2f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0xda, 0x41, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0xc9, 0x01, 0x0a, + 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xa0, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x3f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x2a, 0x26, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x56, 0xca, 0x41, 0x22, + 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x32, 0xa8, 0x02, 0x0a, 0x13, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0x12, 0xb8, 0x01, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, + 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x56, 0xca, 0x41, 0x22, 0x62, 0x69, 0x6e, 0x61, 0x72, + 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xb5, + 0x02, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, + 0x1f, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x62, 0x69, 0x6e, 0x61, + 0x72, 0x79, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xf8, + 0x01, 0x01, 0xaa, 0x02, 0x28, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x28, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x42, 0x69, 0x6e, + 0x61, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x2b, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescOnce sync.Once + file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescData = file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDesc +) + +func file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescGZIP() []byte { + file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescOnce.Do(func() { + file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescData) + }) + return file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDescData +} + +var file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_binaryauthorization_v1beta1_service_proto_goTypes = []interface{}{ + (*GetPolicyRequest)(nil), // 0: google.cloud.binaryauthorization.v1beta1.GetPolicyRequest + (*UpdatePolicyRequest)(nil), // 1: google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest + (*CreateAttestorRequest)(nil), // 2: google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest + (*GetAttestorRequest)(nil), // 3: google.cloud.binaryauthorization.v1beta1.GetAttestorRequest + (*UpdateAttestorRequest)(nil), // 4: google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest + (*ListAttestorsRequest)(nil), // 5: google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest + (*ListAttestorsResponse)(nil), // 6: google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse + (*DeleteAttestorRequest)(nil), // 7: google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest + (*GetSystemPolicyRequest)(nil), // 8: google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + (*Policy)(nil), // 9: google.cloud.binaryauthorization.v1beta1.Policy + (*Attestor)(nil), // 10: google.cloud.binaryauthorization.v1beta1.Attestor + (*emptypb.Empty)(nil), // 11: google.protobuf.Empty +} +var file_google_cloud_binaryauthorization_v1beta1_service_proto_depIdxs = []int32{ + 9, // 0: google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.policy:type_name -> google.cloud.binaryauthorization.v1beta1.Policy + 10, // 1: google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.attestor:type_name -> google.cloud.binaryauthorization.v1beta1.Attestor + 10, // 2: google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.attestor:type_name -> google.cloud.binaryauthorization.v1beta1.Attestor + 10, // 3: google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.attestors:type_name -> google.cloud.binaryauthorization.v1beta1.Attestor + 0, // 4: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetPolicy:input_type -> google.cloud.binaryauthorization.v1beta1.GetPolicyRequest + 1, // 5: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdatePolicy:input_type -> google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest + 2, // 6: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.CreateAttestor:input_type -> google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest + 3, // 7: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetAttestor:input_type -> google.cloud.binaryauthorization.v1beta1.GetAttestorRequest + 4, // 8: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdateAttestor:input_type -> google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest + 5, // 9: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.ListAttestors:input_type -> google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest + 7, // 10: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.DeleteAttestor:input_type -> google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest + 8, // 11: google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1.GetSystemPolicy:input_type -> google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + 9, // 12: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetPolicy:output_type -> google.cloud.binaryauthorization.v1beta1.Policy + 9, // 13: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdatePolicy:output_type -> google.cloud.binaryauthorization.v1beta1.Policy + 10, // 14: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.CreateAttestor:output_type -> google.cloud.binaryauthorization.v1beta1.Attestor + 10, // 15: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetAttestor:output_type -> google.cloud.binaryauthorization.v1beta1.Attestor + 10, // 16: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdateAttestor:output_type -> google.cloud.binaryauthorization.v1beta1.Attestor + 6, // 17: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.ListAttestors:output_type -> google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse + 11, // 18: google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.DeleteAttestor:output_type -> google.protobuf.Empty + 9, // 19: google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1.GetSystemPolicy:output_type -> google.cloud.binaryauthorization.v1beta1.Policy + 12, // [12:20] is the sub-list for method output_type + 4, // [4:12] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_binaryauthorization_v1beta1_service_proto_init() } +func file_google_cloud_binaryauthorization_v1beta1_service_proto_init() { + if File_google_cloud_binaryauthorization_v1beta1_service_proto != nil { + return + } + file_google_cloud_binaryauthorization_v1beta1_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAttestorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAttestorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAttestorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAttestorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAttestorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAttestorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSystemPolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_google_cloud_binaryauthorization_v1beta1_service_proto_goTypes, + DependencyIndexes: file_google_cloud_binaryauthorization_v1beta1_service_proto_depIdxs, + MessageInfos: file_google_cloud_binaryauthorization_v1beta1_service_proto_msgTypes, + }.Build() + File_google_cloud_binaryauthorization_v1beta1_service_proto = out.File + file_google_cloud_binaryauthorization_v1beta1_service_proto_rawDesc = nil + file_google_cloud_binaryauthorization_v1beta1_service_proto_goTypes = nil + file_google_cloud_binaryauthorization_v1beta1_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// BinauthzManagementServiceV1Beta1Client is the client API for BinauthzManagementServiceV1Beta1 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BinauthzManagementServiceV1Beta1Client interface { + // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to + // a container image, before the project is allowed to deploy that + // image. There is at most one policy per project. All image admission + // requests are permitted if a project has no policy. + // + // Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default + // [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. + GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*Policy, error) + // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the + // new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race + // conditions with concurrent policy enforcement (or management!) + // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + // if the request is malformed. + UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, opts ...grpc.CallOption) (*Policy, error) + // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, + // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. + CreateAttestor(ctx context.Context, in *CreateAttestorRequest, opts ...grpc.CallOption) (*Attestor, error) + // Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + GetAttestor(ctx context.Context, in *GetAttestorRequest, opts ...grpc.CallOption) (*Attestor, error) + // Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + UpdateAttestor(ctx context.Context, in *UpdateAttestorRequest, opts ...grpc.CallOption) (*Attestor, error) + // Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns INVALID_ARGUMENT if the project does not exist. + ListAttestors(ctx context.Context, in *ListAttestorsRequest, opts ...grpc.CallOption) (*ListAttestorsResponse, error) + // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + DeleteAttestor(ctx context.Context, in *DeleteAttestorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type binauthzManagementServiceV1Beta1Client struct { + cc grpc.ClientConnInterface +} + +func NewBinauthzManagementServiceV1Beta1Client(cc grpc.ClientConnInterface) BinauthzManagementServiceV1Beta1Client { + return &binauthzManagementServiceV1Beta1Client{cc} +} + +func (c *binauthzManagementServiceV1Beta1Client) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*Policy, error) { + out := new(Policy) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *binauthzManagementServiceV1Beta1Client) UpdatePolicy(ctx context.Context, in *UpdatePolicyRequest, opts ...grpc.CallOption) (*Policy, error) { + out := new(Policy) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdatePolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *binauthzManagementServiceV1Beta1Client) CreateAttestor(ctx context.Context, in *CreateAttestorRequest, opts ...grpc.CallOption) (*Attestor, error) { + out := new(Attestor) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/CreateAttestor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *binauthzManagementServiceV1Beta1Client) GetAttestor(ctx context.Context, in *GetAttestorRequest, opts ...grpc.CallOption) (*Attestor, error) { + out := new(Attestor) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetAttestor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *binauthzManagementServiceV1Beta1Client) UpdateAttestor(ctx context.Context, in *UpdateAttestorRequest, opts ...grpc.CallOption) (*Attestor, error) { + out := new(Attestor) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdateAttestor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *binauthzManagementServiceV1Beta1Client) ListAttestors(ctx context.Context, in *ListAttestorsRequest, opts ...grpc.CallOption) (*ListAttestorsResponse, error) { + out := new(ListAttestorsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/ListAttestors", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *binauthzManagementServiceV1Beta1Client) DeleteAttestor(ctx context.Context, in *DeleteAttestorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/DeleteAttestor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BinauthzManagementServiceV1Beta1Server is the server API for BinauthzManagementServiceV1Beta1 service. +type BinauthzManagementServiceV1Beta1Server interface { + // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to + // a container image, before the project is allowed to deploy that + // image. There is at most one policy per project. All image admission + // requests are permitted if a project has no policy. + // + // Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default + // [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. + GetPolicy(context.Context, *GetPolicyRequest) (*Policy, error) + // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the + // new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race + // conditions with concurrent policy enforcement (or management!) + // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + // if the request is malformed. + UpdatePolicy(context.Context, *UpdatePolicyRequest) (*Policy, error) + // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, + // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. + CreateAttestor(context.Context, *CreateAttestorRequest) (*Attestor, error) + // Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + GetAttestor(context.Context, *GetAttestorRequest) (*Attestor, error) + // Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + UpdateAttestor(context.Context, *UpdateAttestorRequest) (*Attestor, error) + // Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Returns INVALID_ARGUMENT if the project does not exist. + ListAttestors(context.Context, *ListAttestorsRequest) (*ListAttestorsResponse, error) + // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + DeleteAttestor(context.Context, *DeleteAttestorRequest) (*emptypb.Empty, error) +} + +// UnimplementedBinauthzManagementServiceV1Beta1Server can be embedded to have forward compatible implementations. +type UnimplementedBinauthzManagementServiceV1Beta1Server struct { +} + +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) GetPolicy(context.Context, *GetPolicyRequest) (*Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPolicy not implemented") +} +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) UpdatePolicy(context.Context, *UpdatePolicyRequest) (*Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePolicy not implemented") +} +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) CreateAttestor(context.Context, *CreateAttestorRequest) (*Attestor, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAttestor not implemented") +} +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) GetAttestor(context.Context, *GetAttestorRequest) (*Attestor, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttestor not implemented") +} +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) UpdateAttestor(context.Context, *UpdateAttestorRequest) (*Attestor, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAttestor not implemented") +} +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) ListAttestors(context.Context, *ListAttestorsRequest) (*ListAttestorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAttestors not implemented") +} +func (*UnimplementedBinauthzManagementServiceV1Beta1Server) DeleteAttestor(context.Context, *DeleteAttestorRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAttestor not implemented") +} + +func RegisterBinauthzManagementServiceV1Beta1Server(s *grpc.Server, srv BinauthzManagementServiceV1Beta1Server) { + s.RegisterService(&_BinauthzManagementServiceV1Beta1_serviceDesc, srv) +} + +func _BinauthzManagementServiceV1Beta1_GetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).GetPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).GetPolicy(ctx, req.(*GetPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BinauthzManagementServiceV1Beta1_UpdatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).UpdatePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdatePolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).UpdatePolicy(ctx, req.(*UpdatePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BinauthzManagementServiceV1Beta1_CreateAttestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAttestorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).CreateAttestor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/CreateAttestor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).CreateAttestor(ctx, req.(*CreateAttestorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BinauthzManagementServiceV1Beta1_GetAttestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAttestorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).GetAttestor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetAttestor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).GetAttestor(ctx, req.(*GetAttestorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BinauthzManagementServiceV1Beta1_UpdateAttestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAttestorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).UpdateAttestor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdateAttestor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).UpdateAttestor(ctx, req.(*UpdateAttestorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BinauthzManagementServiceV1Beta1_ListAttestors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAttestorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).ListAttestors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/ListAttestors", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).ListAttestors(ctx, req.(*ListAttestorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BinauthzManagementServiceV1Beta1_DeleteAttestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAttestorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BinauthzManagementServiceV1Beta1Server).DeleteAttestor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/DeleteAttestor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BinauthzManagementServiceV1Beta1Server).DeleteAttestor(ctx, req.(*DeleteAttestorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BinauthzManagementServiceV1Beta1_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1", + HandlerType: (*BinauthzManagementServiceV1Beta1Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPolicy", + Handler: _BinauthzManagementServiceV1Beta1_GetPolicy_Handler, + }, + { + MethodName: "UpdatePolicy", + Handler: _BinauthzManagementServiceV1Beta1_UpdatePolicy_Handler, + }, + { + MethodName: "CreateAttestor", + Handler: _BinauthzManagementServiceV1Beta1_CreateAttestor_Handler, + }, + { + MethodName: "GetAttestor", + Handler: _BinauthzManagementServiceV1Beta1_GetAttestor_Handler, + }, + { + MethodName: "UpdateAttestor", + Handler: _BinauthzManagementServiceV1Beta1_UpdateAttestor_Handler, + }, + { + MethodName: "ListAttestors", + Handler: _BinauthzManagementServiceV1Beta1_ListAttestors_Handler, + }, + { + MethodName: "DeleteAttestor", + Handler: _BinauthzManagementServiceV1Beta1_DeleteAttestor_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/binaryauthorization/v1beta1/service.proto", +} + +// SystemPolicyV1Beta1Client is the client API for SystemPolicyV1Beta1 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SystemPolicyV1Beta1Client interface { + // Gets the current system policy in the specified location. + GetSystemPolicy(ctx context.Context, in *GetSystemPolicyRequest, opts ...grpc.CallOption) (*Policy, error) +} + +type systemPolicyV1Beta1Client struct { + cc grpc.ClientConnInterface +} + +func NewSystemPolicyV1Beta1Client(cc grpc.ClientConnInterface) SystemPolicyV1Beta1Client { + return &systemPolicyV1Beta1Client{cc} +} + +func (c *systemPolicyV1Beta1Client) GetSystemPolicy(ctx context.Context, in *GetSystemPolicyRequest, opts ...grpc.CallOption) (*Policy, error) { + out := new(Policy) + err := c.cc.Invoke(ctx, "/google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SystemPolicyV1Beta1Server is the server API for SystemPolicyV1Beta1 service. +type SystemPolicyV1Beta1Server interface { + // Gets the current system policy in the specified location. + GetSystemPolicy(context.Context, *GetSystemPolicyRequest) (*Policy, error) +} + +// UnimplementedSystemPolicyV1Beta1Server can be embedded to have forward compatible implementations. +type UnimplementedSystemPolicyV1Beta1Server struct { +} + +func (*UnimplementedSystemPolicyV1Beta1Server) GetSystemPolicy(context.Context, *GetSystemPolicyRequest) (*Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSystemPolicy not implemented") +} + +func RegisterSystemPolicyV1Beta1Server(s *grpc.Server, srv SystemPolicyV1Beta1Server) { + s.RegisterService(&_SystemPolicyV1Beta1_serviceDesc, srv) +} + +func _SystemPolicyV1Beta1_GetSystemPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSystemPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SystemPolicyV1Beta1Server).GetSystemPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SystemPolicyV1Beta1Server).GetSystemPolicy(ctx, req.(*GetSystemPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _SystemPolicyV1Beta1_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1", + HandlerType: (*SystemPolicyV1Beta1Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSystemPolicy", + Handler: _SystemPolicyV1Beta1_GetSystemPolicy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/binaryauthorization/v1beta1/service.proto", +} diff --git a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go index 19f5d2b20a63..221712fa4af2 100644 --- a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go +++ b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client.go @@ -238,9 +238,9 @@ type internalBinauthzManagementServiceV1Beta1Client interface { // // This API implements a REST model with the following objects: // -// Policy +// Policy // -// Attestor +// Attestor type BinauthzManagementServiceV1Beta1Client struct { // The internal transport-dependent client. internalClient internalBinauthzManagementServiceV1Beta1Client @@ -266,7 +266,8 @@ func (c *BinauthzManagementServiceV1Beta1Client) setGoogleClientInfo(keyval ...s // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BinauthzManagementServiceV1Beta1Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -351,9 +352,9 @@ type binauthzManagementServiceV1Beta1GRPCClient struct { // // This API implements a REST model with the following objects: // -// Policy +// Policy // -// Attestor +// Attestor func NewBinauthzManagementServiceV1Beta1Client(ctx context.Context, opts ...option.ClientOption) (*BinauthzManagementServiceV1Beta1Client, error) { clientOpts := defaultBinauthzManagementServiceV1Beta1GRPCClientOptions() if newBinauthzManagementServiceV1Beta1ClientHook != nil { @@ -390,7 +391,8 @@ func NewBinauthzManagementServiceV1Beta1Client(ctx context.Context, opts ...opti // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *binauthzManagementServiceV1Beta1GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -432,9 +434,9 @@ type binauthzManagementServiceV1Beta1RESTClient struct { // // This API implements a REST model with the following objects: // -// Policy +// Policy // -// Attestor +// Attestor func NewBinauthzManagementServiceV1Beta1RESTClient(ctx context.Context, opts ...option.ClientOption) (*BinauthzManagementServiceV1Beta1Client, error) { clientOpts := append(defaultBinauthzManagementServiceV1Beta1RESTClientOptions(), opts...) httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) @@ -481,7 +483,7 @@ func (c *binauthzManagementServiceV1Beta1RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *binauthzManagementServiceV1Beta1RESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_test.go b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_test.go index 46261ef105dd..31e36e2351f4 100644 --- a/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_test.go +++ b/binaryauthorization/apiv1beta1/binauthz_management_service_v1_beta1_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBinauthzManagementServiceV1Beta1Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBinauthzManagementServiceV1Beta1Client() { func ExampleNewBinauthzManagementServiceV1Beta1RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewBinauthzManagementServiceV1Beta1RESTClient() { func ExampleBinauthzManagementServiceV1Beta1Client_GetPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleBinauthzManagementServiceV1Beta1Client_GetPolicy() { func ExampleBinauthzManagementServiceV1Beta1Client_UpdatePolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -90,6 +110,11 @@ func ExampleBinauthzManagementServiceV1Beta1Client_UpdatePolicy() { func ExampleBinauthzManagementServiceV1Beta1Client_CreateAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +135,11 @@ func ExampleBinauthzManagementServiceV1Beta1Client_CreateAttestor() { func ExampleBinauthzManagementServiceV1Beta1Client_GetAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +160,11 @@ func ExampleBinauthzManagementServiceV1Beta1Client_GetAttestor() { func ExampleBinauthzManagementServiceV1Beta1Client_UpdateAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +185,11 @@ func ExampleBinauthzManagementServiceV1Beta1Client_UpdateAttestor() { func ExampleBinauthzManagementServiceV1Beta1Client_ListAttestors() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +216,11 @@ func ExampleBinauthzManagementServiceV1Beta1Client_ListAttestors() { func ExampleBinauthzManagementServiceV1Beta1Client_DeleteAttestor() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) if err != nil { // TODO: Handle error. diff --git a/binaryauthorization/apiv1beta1/doc.go b/binaryauthorization/apiv1beta1/doc.go index e28c87dcb20c..d3b547466911 100644 --- a/binaryauthorization/apiv1beta1/doc.go +++ b/binaryauthorization/apiv1beta1/doc.go @@ -21,47 +21,58 @@ // policy control for images deployed to Kubernetes Engine clusters, Anthos // clusters on VMware, and Cloud Run. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &binaryauthorizationpb.GetPolicyRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1#GetPolicyRequest. -// } -// resp, err := c.GetPolicy(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &binaryauthorizationpb.GetPolicyRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1#GetPolicyRequest. +// } +// resp, err := c.GetPolicy(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewBinauthzManagementServiceV1Beta1Client is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go b/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go index 0bd5c2cec125..8f43a27e0318 100644 --- a/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go +++ b/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client.go @@ -104,7 +104,8 @@ func (c *SystemPolicyV1Beta1Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SystemPolicyV1Beta1Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -174,7 +175,8 @@ func NewSystemPolicyV1Beta1Client(ctx context.Context, opts ...option.ClientOpti // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *systemPolicyV1Beta1GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -258,7 +260,7 @@ func (c *systemPolicyV1Beta1RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *systemPolicyV1Beta1RESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client_example_test.go b/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client_example_test.go index 6d5b59a59dbb..1c6c0606bd85 100644 --- a/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client_example_test.go +++ b/binaryauthorization/apiv1beta1/system_policy_v1_beta1_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewSystemPolicyV1Beta1Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewSystemPolicyV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewSystemPolicyV1Beta1Client() { func ExampleNewSystemPolicyV1Beta1RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewSystemPolicyV1Beta1RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewSystemPolicyV1Beta1RESTClient() { func ExampleSystemPolicyV1Beta1Client_GetSystemPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := binaryauthorization.NewSystemPolicyV1Beta1Client(ctx) if err != nil { // TODO: Handle error. diff --git a/binaryauthorization/go.mod b/binaryauthorization/go.mod index b1ee7fc07d68..08ab5d5d6fd7 100644 --- a/binaryauthorization/go.mod +++ b/binaryauthorization/go.mod @@ -3,12 +3,11 @@ module cloud.google.com/go/binaryauthorization go 1.18 require ( - cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +17,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/binaryauthorization/go.sum b/binaryauthorization/go.sum index f00d995cec43..da7f573121ce 100644 --- a/binaryauthorization/go.sum +++ b/binaryauthorization/go.sum @@ -28,8 +28,6 @@ cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Ud cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -162,6 +160,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +289,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +310,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +384,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +498,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +586,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +619,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +636,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/binaryauthorization/go_mod_tidy_hack.go b/binaryauthorization/go_mod_tidy_hack.go deleted file mode 100644 index 8e926fab9a6e..000000000000 --- a/binaryauthorization/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package binaryauthorization - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/binaryauthorization/internal/version.go b/binaryauthorization/internal/version.go index db6d2e3e99d1..6aea1adc121f 100644 --- a/binaryauthorization/internal/version.go +++ b/binaryauthorization/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.0.0" +const Version = "1.1.0" diff --git a/certificatemanager/CHANGES.md b/certificatemanager/CHANGES.md index 7d9142b0e409..f597424472c1 100644 --- a/certificatemanager/CHANGES.md +++ b/certificatemanager/CHANGES.md @@ -1,5 +1,19 @@ # Changes +## [1.0.0](https://github.com/googleapis/google-cloud-go/compare/certificatemanager/v0.2.1...certificatemanager/v1.0.0) (2022-09-19) + + +### Features + +* **certificatemanager:** Release 1.0.0 ([#6638](https://github.com/googleapis/google-cloud-go/issues/6638)) ([bb9ae62](https://github.com/googleapis/google-cloud-go/commit/bb9ae62eab152e9e1a3a01282ff68324f2fc9c20)) + +## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/certificatemanager/v0.2.0...certificatemanager/v0.2.1) (2022-07-12) + + +### Bug Fixes + +* **certificatemanager:** Removed resource definition of Compute API resources and incorrect resource references that used them ([feefb9c](https://github.com/googleapis/google-cloud-go/commit/feefb9c16e84498329ab6fbbe311560cb9b65031)) + ## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/certificatemanager/v0.1.0...certificatemanager/v0.2.0) (2022-04-14) diff --git a/certificatemanager/apiv1/certificate_manager_client.go b/certificatemanager/apiv1/certificate_manager_client.go index dc2efa3dbe00..095af9ebe0dd 100644 --- a/certificatemanager/apiv1/certificate_manager_client.go +++ b/certificatemanager/apiv1/certificate_manager_client.go @@ -31,6 +31,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" certificatemanagerpb "google.golang.org/genproto/googleapis/cloud/certificatemanager/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -62,6 +63,12 @@ type CallOptions struct { CreateDnsAuthorization []gax.CallOption UpdateDnsAuthorization []gax.CallOption DeleteDnsAuthorization []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -298,6 +305,72 @@ func defaultCallOptions() *CallOptions { }) }), }, + GetLocation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListLocations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CancelOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetOperation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 200 * time.Millisecond, + Max: 3000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListOperations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, } } @@ -338,12 +411,18 @@ type internalClient interface { UpdateDnsAuthorizationOperation(name string) *UpdateDnsAuthorizationOperation DeleteDnsAuthorization(context.Context, *certificatemanagerpb.DeleteDnsAuthorizationRequest, ...gax.CallOption) (*DeleteDnsAuthorizationOperation, error) DeleteDnsAuthorizationOperation(name string) *DeleteDnsAuthorizationOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // Client is a client for interacting with Certificate Manager API. // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. // -// API Overview +// # API Overview // // Certificates Manager API allows customers to see and manage all their TLS // certificates. @@ -352,25 +431,25 @@ type internalClient interface { // group them into collections, and create serving configuration that can be // easily applied to other Cloud resources e.g. Target Proxies. // -// Data Model +// # Data Model // // The Certificates Manager service exposes the following resources: // -// Certificate which describes a single TLS certificate. +// Certificate which describes a single TLS certificate. // -// CertificateMap which describes a collection of certificates that can be -// attached to a target resource. +// CertificateMap which describes a collection of certificates that can be +// attached to a target resource. // -// CertificateMapEntry which describes a single configuration entry that -// consists of a SNI and a group of certificates. It’s a subresource of -// CertificateMap. +// CertificateMapEntry which describes a single configuration entry that +// consists of a SNI and a group of certificates. It’s a subresource of +// CertificateMap. // // Certificate, CertificateMap and CertificateMapEntry IDs // have to match “^[a-z0-9-]{1,63}$” regexp, which means that // -// only lower case letters, digits, and hyphen are allowed +// only lower case letters, digits, and hyphen are allowed // -// length of the resource ID has to be in [1,63] range. +// length of the resource ID has to be in [1,63] range. // // Provides methods to manage Cloud Certificate Manager entities. type Client struct { @@ -403,7 +482,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -582,6 +662,36 @@ func (c *Client) DeleteDnsAuthorizationOperation(name string) *DeleteDnsAuthoriz return c.internalClient.DeleteDnsAuthorizationOperation(name) } +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Certificate Manager API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -603,6 +713,10 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -610,7 +724,7 @@ type gRPCClient struct { // NewClient creates a new certificate manager client based on gRPC. // The returned client must be Closed when it is done being used to clean up its underlying connections. // -// API Overview +// # API Overview // // Certificates Manager API allows customers to see and manage all their TLS // certificates. @@ -619,25 +733,25 @@ type gRPCClient struct { // group them into collections, and create serving configuration that can be // easily applied to other Cloud resources e.g. Target Proxies. // -// Data Model +// # Data Model // // The Certificates Manager service exposes the following resources: // -// Certificate which describes a single TLS certificate. +// Certificate which describes a single TLS certificate. // -// CertificateMap which describes a collection of certificates that can be -// attached to a target resource. +// CertificateMap which describes a collection of certificates that can be +// attached to a target resource. // -// CertificateMapEntry which describes a single configuration entry that -// consists of a SNI and a group of certificates. It’s a subresource of -// CertificateMap. +// CertificateMapEntry which describes a single configuration entry that +// consists of a SNI and a group of certificates. It’s a subresource of +// CertificateMap. // // Certificate, CertificateMap and CertificateMapEntry IDs // have to match “^[a-z0-9-]{1,63}$” regexp, which means that // -// only lower case letters, digits, and hyphen are allowed +// only lower case letters, digits, and hyphen are allowed // -// length of the resource ID has to be in [1,63] range. +// length of the resource ID has to be in [1,63] range. // // Provides methods to manage Cloud Certificate Manager entities. func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { @@ -666,6 +780,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: certificatemanagerpb.NewCertificateManagerClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -687,7 +803,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -1263,6 +1380,176 @@ func (c *gRPCClient) DeleteDnsAuthorization(ctx context.Context, req *certificat }, nil } +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 5000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateCertificateOperation manages a long-running operation from CreateCertificate. type CreateCertificateOperation struct { lro *longrunning.Operation @@ -2234,3 +2521,97 @@ func (it *DnsAuthorizationIterator) takeBuf() interface{} { it.items = nil return b } + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/certificatemanager/apiv1/certificate_manager_client_example_test.go b/certificatemanager/apiv1/certificate_manager_client_example_test.go index 6a006d3c264b..6b0d066196d0 100644 --- a/certificatemanager/apiv1/certificate_manager_client_example_test.go +++ b/certificatemanager/apiv1/certificate_manager_client_example_test.go @@ -22,10 +22,17 @@ import ( certificatemanager "cloud.google.com/go/certificatemanager/apiv1" "google.golang.org/api/iterator" certificatemanagerpb "google.golang.org/genproto/googleapis/cloud/certificatemanager/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewClient() { func ExampleClient_ListCertificates() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleClient_ListCertificates() { func ExampleClient_GetCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleClient_GetCertificate() { func ExampleClient_CreateCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +131,11 @@ func ExampleClient_CreateCertificate() { func ExampleClient_UpdateCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +161,11 @@ func ExampleClient_UpdateCertificate() { func ExampleClient_DeleteCertificate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +189,11 @@ func ExampleClient_DeleteCertificate() { func ExampleClient_ListCertificateMaps() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +220,11 @@ func ExampleClient_ListCertificateMaps() { func ExampleClient_GetCertificateMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +245,11 @@ func ExampleClient_GetCertificateMap() { func ExampleClient_CreateCertificateMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +275,11 @@ func ExampleClient_CreateCertificateMap() { func ExampleClient_UpdateCertificateMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -253,6 +305,11 @@ func ExampleClient_UpdateCertificateMap() { func ExampleClient_DeleteCertificateMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +333,11 @@ func ExampleClient_DeleteCertificateMap() { func ExampleClient_ListCertificateMapEntries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +364,11 @@ func ExampleClient_ListCertificateMapEntries() { func ExampleClient_GetCertificateMapEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +389,11 @@ func ExampleClient_GetCertificateMapEntry() { func ExampleClient_CreateCertificateMapEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +419,11 @@ func ExampleClient_CreateCertificateMapEntry() { func ExampleClient_UpdateCertificateMapEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +449,11 @@ func ExampleClient_UpdateCertificateMapEntry() { func ExampleClient_DeleteCertificateMapEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -395,6 +477,11 @@ func ExampleClient_DeleteCertificateMapEntry() { func ExampleClient_ListDnsAuthorizations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -421,6 +508,11 @@ func ExampleClient_ListDnsAuthorizations() { func ExampleClient_GetDnsAuthorization() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -441,6 +533,11 @@ func ExampleClient_GetDnsAuthorization() { func ExampleClient_CreateDnsAuthorization() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -466,6 +563,11 @@ func ExampleClient_CreateDnsAuthorization() { func ExampleClient_UpdateDnsAuthorization() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -491,6 +593,11 @@ func ExampleClient_UpdateDnsAuthorization() { func ExampleClient_DeleteDnsAuthorization() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := certificatemanager.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -511,3 +618,161 @@ func ExampleClient_DeleteDnsAuthorization() { // TODO: Handle error. } } + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := certificatemanager.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := certificatemanager.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := certificatemanager.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := certificatemanager.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := certificatemanager.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := certificatemanager.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/certificatemanager/apiv1/doc.go b/certificatemanager/apiv1/doc.go index 4c81e40d3433..2e765886ada1 100644 --- a/certificatemanager/apiv1/doc.go +++ b/certificatemanager/apiv1/doc.go @@ -17,51 +17,60 @@ // Package certificatemanager is an auto-generated package for the // Certificate Manager API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := certificatemanager.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := certificatemanager.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := certificatemanager.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := certificatemanager.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &certificatemanagerpb.ListCertificatesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/certificatemanager/v1#ListCertificatesRequest. -// } -// it := c.ListCertificates(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } +// req := &certificatemanagerpb.ListCertificatesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/certificatemanager/v1#ListCertificatesRequest. +// } +// it := c.ListCertificates(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } // -// Use of Context +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/certificatemanager/apiv1/gapic_metadata.json b/certificatemanager/apiv1/gapic_metadata.json index 75d4b31d467c..cb9b7308a53e 100644 --- a/certificatemanager/apiv1/gapic_metadata.json +++ b/certificatemanager/apiv1/gapic_metadata.json @@ -10,6 +10,11 @@ "grpc": { "libraryClient": "Client", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateCertificate": { "methods": [ "CreateCertificate" @@ -50,6 +55,11 @@ "DeleteDnsAuthorization" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, "GetCertificate": { "methods": [ "GetCertificate" @@ -70,6 +80,16 @@ "GetDnsAuthorization" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListCertificateMapEntries": { "methods": [ "ListCertificateMapEntries" @@ -90,6 +110,16 @@ "ListDnsAuthorizations" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateCertificate": { "methods": [ "UpdateCertificate" diff --git a/certificatemanager/go.mod b/certificatemanager/go.mod index 0bef7d5b8593..ef8ddadd8c40 100644 --- a/certificatemanager/go.mod +++ b/certificatemanager/go.mod @@ -5,10 +5,10 @@ go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/certificatemanager/go.sum b/certificatemanager/go.sum index f00d995cec43..57d64297e190 100644 --- a/certificatemanager/go.sum +++ b/certificatemanager/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63 h1:rRPaZh5mMOfVMRDPKAoVJ4NAXqN4l4AEkKVG6hw2a5A= +google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/certificatemanager/internal/version.go b/certificatemanager/internal/version.go index 8ed44effcd0f..1c81e42de9e0 100644 --- a/certificatemanager/internal/version.go +++ b/certificatemanager/internal/version.go @@ -17,4 +17,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.2.0" +const Version = "1.0.0" diff --git a/channel/apiv1/cloud_channel_client.go b/channel/apiv1/cloud_channel_client.go index 044a63009cb3..7aa5e472dccc 100644 --- a/channel/apiv1/cloud_channel_client.go +++ b/channel/apiv1/cloud_channel_client.go @@ -583,15 +583,15 @@ type internalCloudChannelClient interface { // // CloudChannelService exposes the following resources: // -// Customers: An entity—usually an enterprise—managed by a reseller or -// distributor. +// Customers: An entity—usually an enterprise—managed by a reseller or +// distributor. // -// Entitlements: An entity that provides a customer with the means to use -// a service. Entitlements are created or updated as a result of a successful -// fulfillment. +// Entitlements: An entity that provides a customer with the means to use +// a service. Entitlements are created or updated as a result of a successful +// fulfillment. // -// ChannelPartnerLinks: An entity that identifies links between -// distributors and their indirect resellers in a channel. +// ChannelPartnerLinks: An entity that identifies links between +// distributors and their indirect resellers in a channel. type CloudChannelClient struct { // The internal transport-dependent client. internalClient internalCloudChannelClient @@ -622,7 +622,8 @@ func (c *CloudChannelClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *CloudChannelClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -631,10 +632,10 @@ func (c *CloudChannelClient) Connection() *grpc.ClientConn { // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // // Return value: // List of Customers, or an empty list if there are no customers. @@ -646,13 +647,13 @@ func (c *CloudChannelClient) ListCustomers(ctx context.Context, req *channelpb.L // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The customer resource doesn’t exist. Usually the result of an -// invalid name parameter. +// NOT_FOUND: The customer resource doesn’t exist. Usually the result of an +// invalid name parameter. // // Return value: // The Customer resource. @@ -665,12 +666,12 @@ func (c *CloudChannelClient) GetCustomer(ctx context.Context, req *channelpb.Get // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// INVALID_VALUE: Invalid domain value in the request. +// INVALID_VALUE: Invalid domain value in the request. // // Return value: // A list of CloudIdentityCustomerAccount resources for the domain (may be @@ -687,14 +688,14 @@ func (c *CloudChannelClient) CheckCloudIdentityAccountsExist(ctx context.Context // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: +// INVALID_ARGUMENT: // -// Required request parameters are missing or invalid. +// Required request parameters are missing or invalid. // -// Domain field value doesn’t match the primary email domain. +// Domain field value doesn’t match the primary email domain. // // Return value: // The newly created Customer resource. @@ -707,12 +708,12 @@ func (c *CloudChannelClient) CreateCustomer(ctx context.Context, req *channelpb. // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: No Customer resource found for the name in the request. +// NOT_FOUND: No Customer resource found for the name in the request. // // Return value: // The updated Customer resource. @@ -724,14 +725,14 @@ func (c *CloudChannelClient) UpdateCustomer(ctx context.Context, req *channelpb. // // Possible error codes: // -// PERMISSION_DENIED: The account making the request does not own -// this customer. +// PERMISSION_DENIED: The account making the request does not own +// this customer. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// FAILED_PRECONDITION: The customer has existing entitlements. +// FAILED_PRECONDITION: The customer has existing entitlements. // -// NOT_FOUND: No Customer resource found for the name in the request. +// NOT_FOUND: No Customer resource found for the name in the request. func (c *CloudChannelClient) DeleteCustomer(ctx context.Context, req *channelpb.DeleteCustomerRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteCustomer(ctx, req, opts...) } @@ -743,16 +744,16 @@ func (c *CloudChannelClient) DeleteCustomer(ctx context.Context, req *channelpb. // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// NOT_FOUND: Cloud Identity doesn’t exist or was deleted. +// NOT_FOUND: Cloud Identity doesn’t exist or was deleted. // -// INVALID_ARGUMENT: Required parameters are missing, or the auth_token is -// expired or invalid. +// INVALID_ARGUMENT: Required parameters are missing, or the auth_token is +// expired or invalid. // -// ALREADY_EXISTS: A customer already exists and has conflicting critical -// fields. Requires an overwrite. +// ALREADY_EXISTS: A customer already exists and has conflicting critical +// fields. Requires an overwrite. // // Return value: // The Customer. @@ -765,20 +766,20 @@ func (c *CloudChannelClient) ImportCustomer(ctx context.Context, req *channelpb. // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The customer was not found. +// NOT_FOUND: The customer was not found. // -// ALREADY_EXISTS: The customer’s primary email already exists. Retry -// after changing the customer’s primary contact email. +// ALREADY_EXISTS: The customer’s primary email already exists. Retry +// after changing the customer’s primary contact email. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -800,9 +801,9 @@ func (c *CloudChannelClient) ProvisionCloudIdentityOperation(name string) *Provi // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // // Return value: // A list of the customer’s Entitlements. @@ -819,16 +820,16 @@ func (c *CloudChannelClient) ListEntitlements(ctx context.Context, req *channelp // // Possible error codes: // -// PERMISSION_DENIED: +// PERMISSION_DENIED: // -// The customer doesn’t belong to the reseller and has no auth token. +// The customer doesn’t belong to the reseller and has no auth token. // -// The supplied auth token is invalid. +// The supplied auth token is invalid. // -// The reseller account making the request is different -// from the reseller account in the query. +// The reseller account making the request is different +// from the reseller account in the query. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // // Return value: // A list of the customer’s TransferableSku. @@ -845,16 +846,16 @@ func (c *CloudChannelClient) ListTransferableSkus(ctx context.Context, req *chan // // Possible error codes: // -// PERMISSION_DENIED: +// PERMISSION_DENIED: // -// The customer doesn’t belong to the reseller and has no auth token. +// The customer doesn’t belong to the reseller and has no auth token. // -// The supplied auth token is invalid. +// The supplied auth token is invalid. // -// The reseller account making the request is different -// from the reseller account in the query. +// The reseller account making the request is different +// from the reseller account in the query. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // // Return value: // List of TransferableOffer for the given customer and SKU. @@ -866,11 +867,11 @@ func (c *CloudChannelClient) ListTransferableOffers(ctx context.Context, req *ch // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The customer entitlement was not found. +// NOT_FOUND: The customer entitlement was not found. // // Return value: // The requested Entitlement resource. @@ -882,47 +883,47 @@ func (c *CloudChannelClient) GetEntitlement(ctx context.Context, req *channelpb. // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: +// INVALID_ARGUMENT: // -// Required request parameters are missing or invalid. +// Required request parameters are missing or invalid. // -// There is already a customer entitlement for a SKU from the same -// product family. +// There is already a customer entitlement for a SKU from the same +// product family. // -// INVALID_VALUE: Make sure the OfferId is valid. If it is, contact -// Google Channel support for further troubleshooting. +// INVALID_VALUE: Make sure the OfferId is valid. If it is, contact +// Google Channel support for further troubleshooting. // -// NOT_FOUND: The customer or offer resource was not found. +// NOT_FOUND: The customer or offer resource was not found. // -// ALREADY_EXISTS: +// ALREADY_EXISTS: // -// The SKU was already purchased for the customer. +// The SKU was already purchased for the customer. // -// The customer’s primary email already exists. Retry -// after changing the customer’s primary contact email. +// The customer’s primary email already exists. Retry +// after changing the customer’s primary contact email. // -// CONDITION_NOT_MET or FAILED_PRECONDITION: +// CONDITION_NOT_MET or FAILED_PRECONDITION: // -// The domain required for purchasing a SKU has not been verified. +// The domain required for purchasing a SKU has not been verified. // -// A pre-requisite SKU required to purchase an Add-On SKU is missing. -// For example, Google Workspace Business Starter is required to purchase -// Vault or Drive. +// A pre-requisite SKU required to purchase an Add-On SKU is missing. +// For example, Google Workspace Business Starter is required to purchase +// Vault or Drive. // -// (Developer accounts only) Reseller and resold domain must meet the -// following naming requirements: +// (Developer accounts only) Reseller and resold domain must meet the +// following naming requirements: // -// Domain names must start with goog-test. +// Domain names must start with goog-test. // -// Domain names must include the reseller domain. +// Domain names must include the reseller domain. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -947,19 +948,19 @@ func (c *CloudChannelClient) CreateEntitlementOperation(name string) *CreateEnti // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. -// For example, the number of seats being changed is greater than the allowed -// number of max seats, or decreasing seats for a commitment based plan. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// For example, the number of seats being changed is greater than the allowed +// number of max seats, or decreasing seats for a commitment based plan. // -// NOT_FOUND: Entitlement resource not found. +// NOT_FOUND: Entitlement resource not found. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -984,20 +985,20 @@ func (c *CloudChannelClient) ChangeParametersOperation(name string) *ChangeParam // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Entitlement resource not found. +// NOT_FOUND: Entitlement resource not found. // -// NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a -// commitment plan. Can’t enable or disable renewals for non-commitment plans. +// NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a +// commitment plan. Can’t enable or disable renewals for non-commitment plans. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1022,17 +1023,17 @@ func (c *CloudChannelClient) ChangeRenewalSettingsOperation(name string) *Change // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Offer or Entitlement resource not found. +// NOT_FOUND: Offer or Entitlement resource not found. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1058,20 +1059,20 @@ func (c *CloudChannelClient) ChangeOfferOperation(name string) *ChangeOfferOpera // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Entitlement resource not found. +// NOT_FOUND: Entitlement resource not found. // -// FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for -// entitlement on trial plans. +// FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for +// entitlement on trial plans. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1095,19 +1096,19 @@ func (c *CloudChannelClient) StartPaidServiceOperation(name string) *StartPaidSe // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Entitlement resource not found. +// NOT_FOUND: Entitlement resource not found. // -// NOT_ACTIVE: Entitlement is not active. +// NOT_ACTIVE: Entitlement is not active. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1131,24 +1132,24 @@ func (c *CloudChannelClient) SuspendEntitlementOperation(name string) *SuspendEn // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// FAILED_PRECONDITION: There are Google Cloud projects linked to the -// Google Cloud entitlement’s Cloud Billing subaccount. +// FAILED_PRECONDITION: There are Google Cloud projects linked to the +// Google Cloud entitlement’s Cloud Billing subaccount. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Entitlement resource not found. +// NOT_FOUND: Entitlement resource not found. // -// DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace -// add-ons, or entitlements for Google Cloud’s development platform. +// DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace +// add-ons, or entitlements for Google Cloud’s development platform. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1175,24 +1176,24 @@ func (c *CloudChannelClient) CancelEntitlementOperation(name string) *CancelEnti // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Entitlement resource not found. +// NOT_FOUND: Entitlement resource not found. // -// SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated -// suspensions and entitlements that have accepted the TOS. +// SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated +// suspensions and entitlements that have accepted the TOS. // -// NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE -// state. +// NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE +// state. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1214,36 +1215,36 @@ func (c *CloudChannelClient) ActivateEntitlementOperation(name string) *Activate // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The customer or offer resource was not found. +// NOT_FOUND: The customer or offer resource was not found. // -// ALREADY_EXISTS: The SKU was already transferred for the customer. +// ALREADY_EXISTS: The SKU was already transferred for the customer. // -// CONDITION_NOT_MET or FAILED_PRECONDITION: +// CONDITION_NOT_MET or FAILED_PRECONDITION: // -// The SKU requires domain verification to transfer, but the domain is -// not verified. +// The SKU requires domain verification to transfer, but the domain is +// not verified. // -// An Add-On SKU (example, Vault or Drive) is missing the -// pre-requisite SKU (example, G Suite Basic). +// An Add-On SKU (example, Vault or Drive) is missing the +// pre-requisite SKU (example, G Suite Basic). // -// (Developer accounts only) Reseller and resold domain must meet the -// following naming requirements: +// (Developer accounts only) Reseller and resold domain must meet the +// following naming requirements: // -// Domain names must start with goog-test. +// Domain names must start with goog-test. // -// Domain names must include the reseller domain. +// Domain names must include the reseller domain. // -// Specify all transferring entitlements. +// Specify all transferring entitlements. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1265,34 +1266,34 @@ func (c *CloudChannelClient) TransferEntitlementsOperation(name string) *Transfe // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The customer or offer resource was not found. +// NOT_FOUND: The customer or offer resource was not found. // -// ALREADY_EXISTS: The SKU was already transferred for the customer. +// ALREADY_EXISTS: The SKU was already transferred for the customer. // -// CONDITION_NOT_MET or FAILED_PRECONDITION: +// CONDITION_NOT_MET or FAILED_PRECONDITION: // -// The SKU requires domain verification to transfer, but the domain is -// not verified. +// The SKU requires domain verification to transfer, but the domain is +// not verified. // -// An Add-On SKU (example, Vault or Drive) is missing the -// pre-requisite SKU (example, G Suite Basic). +// An Add-On SKU (example, Vault or Drive) is missing the +// pre-requisite SKU (example, G Suite Basic). // -// (Developer accounts only) Reseller and resold domain must meet the -// following naming requirements: +// (Developer accounts only) Reseller and resold domain must meet the +// following naming requirements: // -// Domain names must start with goog-test. +// Domain names must start with goog-test. // -// Domain names must include the reseller domain. +// Domain names must include the reseller domain. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The ID of a long-running operation. @@ -1316,10 +1317,10 @@ func (c *CloudChannelClient) TransferEntitlementsToGoogleOperation(name string) // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // // Return value: // The list of the distributor account’s ChannelPartnerLink resources. @@ -1332,13 +1333,13 @@ func (c *CloudChannelClient) ListChannelPartnerLinks(ctx context.Context, req *c // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: ChannelPartnerLink resource not found because of an -// invalid channel partner link name. +// NOT_FOUND: ChannelPartnerLink resource not found because of an +// invalid channel partner link name. // // Return value: // The ChannelPartnerLink resource. @@ -1355,21 +1356,21 @@ func (c *CloudChannelClient) GetChannelPartnerLink(ctx context.Context, req *cha // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// ALREADY_EXISTS: The ChannelPartnerLink sent in the request already -// exists. +// ALREADY_EXISTS: The ChannelPartnerLink sent in the request already +// exists. // -// NOT_FOUND: No Cloud Identity customer exists for provided domain. +// NOT_FOUND: No Cloud Identity customer exists for provided domain. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The new ChannelPartnerLink resource. @@ -1383,25 +1384,25 @@ func (c *CloudChannelClient) CreateChannelPartnerLink(ctx context.Context, req * // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request is different -// from the reseller account in the API request. +// PERMISSION_DENIED: The reseller account making the request is different +// from the reseller account in the API request. // -// INVALID_ARGUMENT: +// INVALID_ARGUMENT: // -// Required request parameters are missing or invalid. +// Required request parameters are missing or invalid. // -// Link state cannot change from invited to active or suspended. +// Link state cannot change from invited to active or suspended. // -// Cannot send reseller_cloud_identity_id, invite_url, or name in update -// mask. +// Cannot send reseller_cloud_identity_id, invite_url, or name in update +// mask. // -// NOT_FOUND: ChannelPartnerLink resource not found. +// NOT_FOUND: ChannelPartnerLink resource not found. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The updated ChannelPartnerLink resource. @@ -1414,13 +1415,13 @@ func (c *CloudChannelClient) UpdateChannelPartnerLink(ctx context.Context, req * // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// NOT_FOUND: The CustomerRepricingConfig was not found. +// NOT_FOUND: The CustomerRepricingConfig was not found. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the CustomerRepricingConfig resource, otherwise returns @@ -1434,26 +1435,26 @@ func (c *CloudChannelClient) GetCustomerRepricingConfig(ctx context.Context, req // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// NOT_FOUND: The CustomerRepricingConfig specified does not exist or is -// not associated with the given account. +// NOT_FOUND: The CustomerRepricingConfig specified does not exist or is +// not associated with the given account. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the CustomerRepricingConfig resources. The // data for each resource is displayed in the ascending order of: // -// customer ID +// customer ID // -// RepricingConfig.EntitlementGranularity.entitlement +// RepricingConfig.EntitlementGranularity.entitlement // -// RepricingConfig.effective_invoice_month +// RepricingConfig.effective_invoice_month // -// CustomerRepricingConfig.update_time +// CustomerRepricingConfig.update_time // // If unsuccessful, returns an error. func (c *CloudChannelClient) ListCustomerRepricingConfigs(ctx context.Context, req *channelpb.ListCustomerRepricingConfigsRequest, opts ...gax.CallOption) *CustomerRepricingConfigIterator { @@ -1472,34 +1473,34 @@ func (c *CloudChannelClient) ListCustomerRepricingConfigs(ctx context.Context, r // // The following restrictions are for creating configs in the current month. // -// This functionality is reserved for recovering from an erroneous config, -// and should not be used for regular business cases. +// This functionality is reserved for recovering from an erroneous config, +// and should not be used for regular business cases. // -// The new config will not modify exports used with other configs. -// Changes to the config may be immediate, but may take up to 24 hours. +// The new config will not modify exports used with other configs. +// Changes to the config may be immediate, but may take up to 24 hours. // -// There is a limit of ten configs for any -// RepricingConfig.EntitlementGranularity.entitlement -// or RepricingConfig.effective_invoice_month. +// There is a limit of ten configs for any +// RepricingConfig.EntitlementGranularity.entitlement +// or RepricingConfig.effective_invoice_month. // -// The contained CustomerRepricingConfig.repricing_config vaule must be -// different from the value used in the current config for a -// RepricingConfig.EntitlementGranularity.entitlement. +// The contained CustomerRepricingConfig.repricing_config vaule must be +// different from the value used in the current config for a +// RepricingConfig.EntitlementGranularity.entitlement. // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// INVALID_ARGUMENT: Missing or invalid required parameters in the -// request. Also displays if the updated config is for the current month or -// past months. +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month or +// past months. // -// NOT_FOUND: The CustomerRepricingConfig specified does not exist or is -// not associated with the given account. +// NOT_FOUND: The CustomerRepricingConfig specified does not exist or is +// not associated with the given account. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the updated CustomerRepricingConfig resource, otherwise @@ -1520,22 +1521,22 @@ func (c *CloudChannelClient) CreateCustomerRepricingConfig(ctx context.Context, // // When updating a config in the future: // -// This config must already exist. +// This config must already exist. // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// INVALID_ARGUMENT: Missing or invalid required parameters in the -// request. Also displays if the updated config is for the current month or -// past months. +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month or +// past months. // -// NOT_FOUND: The CustomerRepricingConfig specified does not exist or is -// not associated with the given account. +// NOT_FOUND: The CustomerRepricingConfig specified does not exist or is +// not associated with the given account. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the updated CustomerRepricingConfig resource, otherwise @@ -1550,16 +1551,16 @@ func (c *CloudChannelClient) UpdateCustomerRepricingConfig(ctx context.Context, // // Possible error codes: // -// PERMISSION_DENIED: The account making the request does not own -// this customer. +// PERMISSION_DENIED: The account making the request does not own +// this customer. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the -// past. +// FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the +// past. // -// NOT_FOUND: No CustomerRepricingConfig found for the name in the -// request. +// NOT_FOUND: No CustomerRepricingConfig found for the name in the +// request. func (c *CloudChannelClient) DeleteCustomerRepricingConfig(ctx context.Context, req *channelpb.DeleteCustomerRepricingConfigRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteCustomerRepricingConfig(ctx, req, opts...) } @@ -1569,13 +1570,13 @@ func (c *CloudChannelClient) DeleteCustomerRepricingConfig(ctx context.Context, // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// NOT_FOUND: The ChannelPartnerRepricingConfig was not found. +// NOT_FOUND: The ChannelPartnerRepricingConfig was not found. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the ChannelPartnerRepricingConfig resource, otherwise @@ -1589,24 +1590,24 @@ func (c *CloudChannelClient) GetChannelPartnerRepricingConfig(ctx context.Contex // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist -// or is not associated with the given account. +// NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist +// or is not associated with the given account. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the ChannelPartnerRepricingConfig resources. // The data for each resource is displayed in the ascending order of: // -// channel partner ID +// channel partner ID // -// RepricingConfig.effective_invoice_month +// RepricingConfig.effective_invoice_month // -// ChannelPartnerRepricingConfig.update_time +// ChannelPartnerRepricingConfig.update_time // // If unsuccessful, returns an error. func (c *CloudChannelClient) ListChannelPartnerRepricingConfigs(ctx context.Context, req *channelpb.ListChannelPartnerRepricingConfigsRequest, opts ...gax.CallOption) *ChannelPartnerRepricingConfigIterator { @@ -1625,33 +1626,33 @@ func (c *CloudChannelClient) ListChannelPartnerRepricingConfigs(ctx context.Cont // // The following restrictions are for creating configs in the current month. // -// This functionality is reserved for recovering from an erroneous config, -// and should not be used for regular business cases. +// This functionality is reserved for recovering from an erroneous config, +// and should not be used for regular business cases. // -// The new config will not modify exports used with other configs. -// Changes to the config may be immediate, but may take up to 24 hours. +// The new config will not modify exports used with other configs. +// Changes to the config may be immediate, but may take up to 24 hours. // -// There is a limit of ten configs for any ChannelPartner or -// RepricingConfig.effective_invoice_month. +// There is a limit of ten configs for any ChannelPartner or +// RepricingConfig.effective_invoice_month. // -// The contained ChannelPartnerRepricingConfig.repricing_config vaule -// must be different from the value used in the current config for a -// ChannelPartner. +// The contained ChannelPartnerRepricingConfig.repricing_config vaule +// must be different from the value used in the current config for a +// ChannelPartner. // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// INVALID_ARGUMENT: Missing or invalid required parameters in the -// request. Also displays if the updated config is for the current month or -// past months. +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month or +// past months. // -// NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist -// or is not associated with the given account. +// NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist +// or is not associated with the given account. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the updated ChannelPartnerRepricingConfig resource, @@ -1672,22 +1673,22 @@ func (c *CloudChannelClient) CreateChannelPartnerRepricingConfig(ctx context.Con // // When updating a config in the future: // -// This config must already exist. +// This config must already exist. // // Possible Error Codes: // -// PERMISSION_DENIED: If the account making the request and the account -// being queried are different. +// PERMISSION_DENIED: If the account making the request and the account +// being queried are different. // -// INVALID_ARGUMENT: Missing or invalid required parameters in the -// request. Also displays if the updated config is for the current month or -// past months. +// INVALID_ARGUMENT: Missing or invalid required parameters in the +// request. Also displays if the updated config is for the current month or +// past months. // -// NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist -// or is not associated with the given account. +// NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist +// or is not associated with the given account. // -// INTERNAL: Any non-user error related to technical issues in the -// backend. In this case, contact Cloud Channel support. +// INTERNAL: Any non-user error related to technical issues in the +// backend. In this case, contact Cloud Channel support. // // Return Value: // If successful, the updated ChannelPartnerRepricingConfig resource, @@ -1702,16 +1703,16 @@ func (c *CloudChannelClient) UpdateChannelPartnerRepricingConfig(ctx context.Con // // Possible error codes: // -// PERMISSION_DENIED: The account making the request does not own -// this customer. +// PERMISSION_DENIED: The account making the request does not own +// this customer. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or -// in the past. +// FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or +// in the past. // -// NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the -// request. +// NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the +// request. func (c *CloudChannelClient) DeleteChannelPartnerRepricingConfig(ctx context.Context, req *channelpb.DeleteChannelPartnerRepricingConfigRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteChannelPartnerRepricingConfig(ctx, req, opts...) } @@ -1720,11 +1721,11 @@ func (c *CloudChannelClient) DeleteChannelPartnerRepricingConfig(ctx context.Con // // Possible error codes: // -// PERMISSION_DENIED: The entitlement doesn’t belong to the reseller. +// PERMISSION_DENIED: The entitlement doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: Entitlement or offer was not found. +// NOT_FOUND: Entitlement or offer was not found. // // Return value: // The Offer resource. @@ -1736,7 +1737,7 @@ func (c *CloudChannelClient) LookupOffer(ctx context.Context, req *channelpb.Loo // // Possible error codes: // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. func (c *CloudChannelClient) ListProducts(ctx context.Context, req *channelpb.ListProductsRequest, opts ...gax.CallOption) *ProductIterator { return c.internalClient.ListProducts(ctx, req, opts...) } @@ -1745,7 +1746,7 @@ func (c *CloudChannelClient) ListProducts(ctx context.Context, req *channelpb.Li // // Possible error codes: // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. func (c *CloudChannelClient) ListSkus(ctx context.Context, req *channelpb.ListSkusRequest, opts ...gax.CallOption) *SkuIterator { return c.internalClient.ListSkus(ctx, req, opts...) } @@ -1754,37 +1755,37 @@ func (c *CloudChannelClient) ListSkus(ctx context.Context, req *channelpb.ListSk // // Possible error codes: // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. func (c *CloudChannelClient) ListOffers(ctx context.Context, req *channelpb.ListOffersRequest, opts ...gax.CallOption) *OfferIterator { return c.internalClient.ListOffers(ctx, req, opts...) } // ListPurchasableSkus lists the following: // -// SKUs that you can purchase for a customer +// SKUs that you can purchase for a customer // -// SKUs that you can upgrade or downgrade for an entitlement. +// SKUs that you can upgrade or downgrade for an entitlement. // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller. +// PERMISSION_DENIED: The customer doesn’t belong to the reseller. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. func (c *CloudChannelClient) ListPurchasableSkus(ctx context.Context, req *channelpb.ListPurchasableSkusRequest, opts ...gax.CallOption) *PurchasableSkuIterator { return c.internalClient.ListPurchasableSkus(ctx, req, opts...) } // ListPurchasableOffers lists the following: // -// Offers that you can purchase for a customer. +// Offers that you can purchase for a customer. // -// Offers that you can change for an entitlement. +// Offers that you can change for an entitlement. // // Possible error codes: // -// PERMISSION_DENIED: The customer doesn’t belong to the reseller +// PERMISSION_DENIED: The customer doesn’t belong to the reseller // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. func (c *CloudChannelClient) ListPurchasableOffers(ctx context.Context, req *channelpb.ListPurchasableOffersRequest, opts ...gax.CallOption) *PurchasableOfferIterator { return c.internalClient.ListPurchasableOffers(ctx, req, opts...) } @@ -1795,17 +1796,17 @@ func (c *CloudChannelClient) ListPurchasableOffers(ctx context.Context, req *cha // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request and the -// provided reseller account are different, or the impersonated user -// is not a super admin. +// PERMISSION_DENIED: The reseller account making the request and the +// provided reseller account are different, or the impersonated user +// is not a super admin. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The topic name with the registered service email address. @@ -1820,19 +1821,19 @@ func (c *CloudChannelClient) RegisterSubscriber(ctx context.Context, req *channe // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request and the -// provided reseller account are different, or the impersonated user -// is not a super admin. +// PERMISSION_DENIED: The reseller account making the request and the +// provided reseller account are different, or the impersonated user +// is not a super admin. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The topic resource doesn’t exist. +// NOT_FOUND: The topic resource doesn’t exist. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // The topic name that unregistered the service email address. @@ -1847,19 +1848,19 @@ func (c *CloudChannelClient) UnregisterSubscriber(ctx context.Context, req *chan // // Possible error codes: // -// PERMISSION_DENIED: The reseller account making the request and the -// provided reseller account are different, or the impersonated user -// is not a super admin. +// PERMISSION_DENIED: The reseller account making the request and the +// provided reseller account are different, or the impersonated user +// is not a super admin. // -// INVALID_ARGUMENT: Required request parameters are missing or invalid. +// INVALID_ARGUMENT: Required request parameters are missing or invalid. // -// NOT_FOUND: The topic resource doesn’t exist. +// NOT_FOUND: The topic resource doesn’t exist. // -// INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. +// INTERNAL: Any non-user error related to a technical issue in the +// backend. Contact Cloud Channel support. // -// UNKNOWN: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. +// UNKNOWN: Any non-user error related to a technical issue in the backend. +// Contact Cloud Channel support. // // Return value: // A list of service email addresses. @@ -1931,15 +1932,15 @@ type cloudChannelGRPCClient struct { // // CloudChannelService exposes the following resources: // -// Customers: An entity—usually an enterprise—managed by a reseller or -// distributor. +// Customers: An entity—usually an enterprise—managed by a reseller or +// distributor. // -// Entitlements: An entity that provides a customer with the means to use -// a service. Entitlements are created or updated as a result of a successful -// fulfillment. +// Entitlements: An entity that provides a customer with the means to use +// a service. Entitlements are created or updated as a result of a successful +// fulfillment. // -// ChannelPartnerLinks: An entity that identifies links between -// distributors and their indirect resellers in a channel. +// ChannelPartnerLinks: An entity that identifies links between +// distributors and their indirect resellers in a channel. func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*CloudChannelClient, error) { clientOpts := defaultCloudChannelGRPCClientOptions() if newCloudChannelClientHook != nil { @@ -1988,7 +1989,8 @@ func NewCloudChannelClient(ctx context.Context, opts ...option.ClientOption) (*C // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *cloudChannelGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/channel/apiv1/cloud_channel_client_example_test.go b/channel/apiv1/cloud_channel_client_example_test.go index cf43025ebb7b..5131b7abf0a8 100644 --- a/channel/apiv1/cloud_channel_client_example_test.go +++ b/channel/apiv1/cloud_channel_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewCloudChannelClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewCloudChannelClient() { func ExampleCloudChannelClient_ListCustomers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -65,6 +75,11 @@ func ExampleCloudChannelClient_ListCustomers() { func ExampleCloudChannelClient_GetCustomer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +100,11 @@ func ExampleCloudChannelClient_GetCustomer() { func ExampleCloudChannelClient_CheckCloudIdentityAccountsExist() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +125,11 @@ func ExampleCloudChannelClient_CheckCloudIdentityAccountsExist() { func ExampleCloudChannelClient_CreateCustomer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleCloudChannelClient_CreateCustomer() { func ExampleCloudChannelClient_UpdateCustomer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -145,6 +175,11 @@ func ExampleCloudChannelClient_UpdateCustomer() { func ExampleCloudChannelClient_DeleteCustomer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -163,6 +198,11 @@ func ExampleCloudChannelClient_DeleteCustomer() { func ExampleCloudChannelClient_ImportCustomer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +223,11 @@ func ExampleCloudChannelClient_ImportCustomer() { func ExampleCloudChannelClient_ProvisionCloudIdentity() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleCloudChannelClient_ProvisionCloudIdentity() { func ExampleCloudChannelClient_ListEntitlements() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -234,6 +284,11 @@ func ExampleCloudChannelClient_ListEntitlements() { func ExampleCloudChannelClient_ListTransferableSkus() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -260,6 +315,11 @@ func ExampleCloudChannelClient_ListTransferableSkus() { func ExampleCloudChannelClient_ListTransferableOffers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -286,6 +346,11 @@ func ExampleCloudChannelClient_ListTransferableOffers() { func ExampleCloudChannelClient_GetEntitlement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -306,6 +371,11 @@ func ExampleCloudChannelClient_GetEntitlement() { func ExampleCloudChannelClient_CreateEntitlement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -331,6 +401,11 @@ func ExampleCloudChannelClient_CreateEntitlement() { func ExampleCloudChannelClient_ChangeParameters() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -356,6 +431,11 @@ func ExampleCloudChannelClient_ChangeParameters() { func ExampleCloudChannelClient_ChangeRenewalSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -381,6 +461,11 @@ func ExampleCloudChannelClient_ChangeRenewalSettings() { func ExampleCloudChannelClient_ChangeOffer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -406,6 +491,11 @@ func ExampleCloudChannelClient_ChangeOffer() { func ExampleCloudChannelClient_StartPaidService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -431,6 +521,11 @@ func ExampleCloudChannelClient_StartPaidService() { func ExampleCloudChannelClient_SuspendEntitlement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -456,6 +551,11 @@ func ExampleCloudChannelClient_SuspendEntitlement() { func ExampleCloudChannelClient_CancelEntitlement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -479,6 +579,11 @@ func ExampleCloudChannelClient_CancelEntitlement() { func ExampleCloudChannelClient_ActivateEntitlement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -504,6 +609,11 @@ func ExampleCloudChannelClient_ActivateEntitlement() { func ExampleCloudChannelClient_TransferEntitlements() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -529,6 +639,11 @@ func ExampleCloudChannelClient_TransferEntitlements() { func ExampleCloudChannelClient_TransferEntitlementsToGoogle() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -552,6 +667,11 @@ func ExampleCloudChannelClient_TransferEntitlementsToGoogle() { func ExampleCloudChannelClient_ListChannelPartnerLinks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -578,6 +698,11 @@ func ExampleCloudChannelClient_ListChannelPartnerLinks() { func ExampleCloudChannelClient_GetChannelPartnerLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -598,6 +723,11 @@ func ExampleCloudChannelClient_GetChannelPartnerLink() { func ExampleCloudChannelClient_CreateChannelPartnerLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -618,6 +748,11 @@ func ExampleCloudChannelClient_CreateChannelPartnerLink() { func ExampleCloudChannelClient_UpdateChannelPartnerLink() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -638,6 +773,11 @@ func ExampleCloudChannelClient_UpdateChannelPartnerLink() { func ExampleCloudChannelClient_GetCustomerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -658,6 +798,11 @@ func ExampleCloudChannelClient_GetCustomerRepricingConfig() { func ExampleCloudChannelClient_ListCustomerRepricingConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -684,6 +829,11 @@ func ExampleCloudChannelClient_ListCustomerRepricingConfigs() { func ExampleCloudChannelClient_CreateCustomerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -704,6 +854,11 @@ func ExampleCloudChannelClient_CreateCustomerRepricingConfig() { func ExampleCloudChannelClient_UpdateCustomerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -724,6 +879,11 @@ func ExampleCloudChannelClient_UpdateCustomerRepricingConfig() { func ExampleCloudChannelClient_DeleteCustomerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -742,6 +902,11 @@ func ExampleCloudChannelClient_DeleteCustomerRepricingConfig() { func ExampleCloudChannelClient_GetChannelPartnerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -762,6 +927,11 @@ func ExampleCloudChannelClient_GetChannelPartnerRepricingConfig() { func ExampleCloudChannelClient_ListChannelPartnerRepricingConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -788,6 +958,11 @@ func ExampleCloudChannelClient_ListChannelPartnerRepricingConfigs() { func ExampleCloudChannelClient_CreateChannelPartnerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -808,6 +983,11 @@ func ExampleCloudChannelClient_CreateChannelPartnerRepricingConfig() { func ExampleCloudChannelClient_UpdateChannelPartnerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -828,6 +1008,11 @@ func ExampleCloudChannelClient_UpdateChannelPartnerRepricingConfig() { func ExampleCloudChannelClient_DeleteChannelPartnerRepricingConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -846,6 +1031,11 @@ func ExampleCloudChannelClient_DeleteChannelPartnerRepricingConfig() { func ExampleCloudChannelClient_LookupOffer() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -866,6 +1056,11 @@ func ExampleCloudChannelClient_LookupOffer() { func ExampleCloudChannelClient_ListProducts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -892,6 +1087,11 @@ func ExampleCloudChannelClient_ListProducts() { func ExampleCloudChannelClient_ListSkus() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -918,6 +1118,11 @@ func ExampleCloudChannelClient_ListSkus() { func ExampleCloudChannelClient_ListOffers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -944,6 +1149,11 @@ func ExampleCloudChannelClient_ListOffers() { func ExampleCloudChannelClient_ListPurchasableSkus() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -970,6 +1180,11 @@ func ExampleCloudChannelClient_ListPurchasableSkus() { func ExampleCloudChannelClient_ListPurchasableOffers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -996,6 +1211,11 @@ func ExampleCloudChannelClient_ListPurchasableOffers() { func ExampleCloudChannelClient_RegisterSubscriber() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -1016,6 +1236,11 @@ func ExampleCloudChannelClient_RegisterSubscriber() { func ExampleCloudChannelClient_UnregisterSubscriber() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -1036,6 +1261,11 @@ func ExampleCloudChannelClient_UnregisterSubscriber() { func ExampleCloudChannelClient_ListSubscribers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -1062,6 +1292,11 @@ func ExampleCloudChannelClient_ListSubscribers() { func ExampleCloudChannelClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -1080,6 +1315,11 @@ func ExampleCloudChannelClient_CancelOperation() { func ExampleCloudChannelClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -1098,6 +1338,11 @@ func ExampleCloudChannelClient_DeleteOperation() { func ExampleCloudChannelClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. @@ -1118,6 +1363,11 @@ func ExampleCloudChannelClient_GetOperation() { func ExampleCloudChannelClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := channel.NewCloudChannelClient(ctx) if err != nil { // TODO: Handle error. diff --git a/channel/apiv1/doc.go b/channel/apiv1/doc.go index 13dd8796248b..5728f7950570 100644 --- a/channel/apiv1/doc.go +++ b/channel/apiv1/doc.go @@ -21,51 +21,62 @@ // unified resale platform and APIs across all of Google Cloud including GCP, // Workspace, Maps and Chrome. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := channel.NewCloudChannelClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := channel.NewCloudChannelClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := channel.NewCloudChannelClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &channelpb.ListCustomersRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/channel/v1#ListCustomersRequest. -// } -// it := c.ListCustomers(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := channel.NewCloudChannelClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &channelpb.ListCustomersRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/channel/v1#ListCustomersRequest. +// } +// it := c.ListCustomers(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewCloudChannelClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/channel/go.mod b/channel/go.mod index 5261c4531b95..23ec36681ab4 100644 --- a/channel/go.mod +++ b/channel/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/channel -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/channel/go.sum b/channel/go.sum index cc18f1ad14b3..c796dcdc6677 100644 --- a/channel/go.sum +++ b/channel/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -586,8 +589,9 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -618,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -634,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/civil/civil.go b/civil/civil.go index 5329c2a9dbbd..454deab4af13 100644 --- a/civil/civil.go +++ b/civil/civil.go @@ -66,9 +66,13 @@ func (d Date) IsValid() bool { // // In is always consistent with time.Date, even when time.Date returns a time // on a different day. For example, if loc is America/Indiana/Vincennes, then both -// time.Date(1955, time.May, 1, 0, 0, 0, 0, loc) +// +// time.Date(1955, time.May, 1, 0, 0, 0, 0, loc) +// // and -// civil.Date{Year: 1955, Month: time.May, Day: 1}.In(loc) +// +// civil.Date{Year: 1955, Month: time.May, Day: 1}.In(loc) +// // return 23:00:00 on April 30, 1955. // // In panics if loc is nil. @@ -242,7 +246,9 @@ func DateTimeOf(t time.Time) DateTime { // ParseDateTime accepts a variant of the RFC3339 date-time format that omits // the time offset but includes an optional fractional time, as described in // ParseTime. Informally, the accepted format is -// YYYY-MM-DDTHH:MM:SS[.FFFFFFFFF] +// +// YYYY-MM-DDTHH:MM:SS[.FFFFFFFFF] +// // where the 'T' may be a lower-case 't'. func ParseDateTime(s string) (DateTime, error) { t, err := time.Parse("2006-01-02T15:04:05.999999999", s) @@ -270,11 +276,15 @@ func (dt DateTime) IsValid() bool { // If the time is missing or ambigous at the location, In returns the same // result as time.Date. For example, if loc is America/Indiana/Vincennes, then // both -// time.Date(1955, time.May, 1, 0, 30, 0, 0, loc) +// +// time.Date(1955, time.May, 1, 0, 30, 0, 0, loc) +// // and -// civil.DateTime{ -// civil.Date{Year: 1955, Month: time.May, Day: 1}}, -// civil.Time{Minute: 30}}.In(loc) +// +// civil.DateTime{ +// civil.Date{Year: 1955, Month: time.May, Day: 1}}, +// civil.Time{Minute: 30}}.In(loc) +// // return 23:30:00 on April 30, 1955. // // In panics if loc is nil. diff --git a/cloudbuild/apiv1/cloud_build_client.go b/cloudbuild/apiv1/cloud_build_client.go index 79e4b689d3d5..be3414a8c7c1 100644 --- a/cloudbuild/apiv1/cloud_build_client.go +++ b/cloudbuild/apiv1/cloud_build_client.go @@ -387,28 +387,28 @@ func (c *Client) RunBuildTrigger(ctx context.Context, req *cloudbuildpb.RunBuild // // For triggered builds: // -// Triggered builds resolve to a precise revision; therefore a retry of a -// triggered build will result in a build that uses the same revision. +// Triggered builds resolve to a precise revision; therefore a retry of a +// triggered build will result in a build that uses the same revision. // // For non-triggered builds that specify RepoSource: // -// If the original build built from the tip of a branch, the retried build -// will build from the tip of that branch, which may not be the same revision -// as the original build. +// If the original build built from the tip of a branch, the retried build +// will build from the tip of that branch, which may not be the same revision +// as the original build. // -// If the original build specified a commit sha or revision ID, the retried -// build will use the identical source. +// If the original build specified a commit sha or revision ID, the retried +// build will use the identical source. // // For builds that specify StorageSource: // -// If the original build pulled source from Google Cloud Storage without -// specifying the generation of the object, the new build will use the current -// object, which may be different from the original build source. +// If the original build pulled source from Google Cloud Storage without +// specifying the generation of the object, the new build will use the current +// object, which may be different from the original build source. // -// If the original build pulled source from Cloud Storage and specified the -// generation of the object, the new build will attempt to use the same -// object, which may or may not be available depending on the bucket's -// lifecycle management settings. +// If the original build pulled source from Cloud Storage and specified the +// generation of the object, the new build will attempt to use the same +// object, which may or may not be available depending on the bucket's +// lifecycle management settings. func (c *Client) RetryBuild(ctx context.Context, req *cloudbuildpb.RetryBuildRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append(c.CallOptions.RetryBuild[0:len(c.CallOptions.RetryBuild):len(c.CallOptions.RetryBuild)], opts...) diff --git a/cloudbuild/apiv1/doc.go b/cloudbuild/apiv1/doc.go index 881ef7c2a400..1e9c2502c42c 100644 --- a/cloudbuild/apiv1/doc.go +++ b/cloudbuild/apiv1/doc.go @@ -17,10 +17,9 @@ // Package cloudbuild is an auto-generated package for the // Cloud Build API. -// // Creates and manages builds on Google Cloud Platform. // -// Use of Context +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/cloudbuild/apiv1/v2/cloud_build_client.go b/cloudbuild/apiv1/v2/cloud_build_client.go index b6b7dc3ba15c..2cc46aad4e1b 100644 --- a/cloudbuild/apiv1/v2/cloud_build_client.go +++ b/cloudbuild/apiv1/v2/cloud_build_client.go @@ -247,7 +247,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -295,28 +296,28 @@ func (c *Client) CancelBuild(ctx context.Context, req *cloudbuildpb.CancelBuildR // // For triggered builds: // -// Triggered builds resolve to a precise revision; therefore a retry of a -// triggered build will result in a build that uses the same revision. +// Triggered builds resolve to a precise revision; therefore a retry of a +// triggered build will result in a build that uses the same revision. // // For non-triggered builds that specify RepoSource: // -// If the original build built from the tip of a branch, the retried build -// will build from the tip of that branch, which may not be the same revision -// as the original build. +// If the original build built from the tip of a branch, the retried build +// will build from the tip of that branch, which may not be the same revision +// as the original build. // -// If the original build specified a commit sha or revision ID, the retried -// build will use the identical source. +// If the original build specified a commit sha or revision ID, the retried +// build will use the identical source. // // For builds that specify StorageSource: // -// If the original build pulled source from Google Cloud Storage without -// specifying the generation of the object, the new build will use the current -// object, which may be different from the original build source. +// If the original build pulled source from Google Cloud Storage without +// specifying the generation of the object, the new build will use the current +// object, which may be different from the original build source. // -// If the original build pulled source from Cloud Storage and specified the -// generation of the object, the new build will attempt to use the same -// object, which may or may not be available depending on the bucket’s -// lifecycle management settings. +// If the original build pulled source from Cloud Storage and specified the +// generation of the object, the new build will attempt to use the same +// object, which may or may not be available depending on the bucket’s +// lifecycle management settings. func (c *Client) RetryBuild(ctx context.Context, req *cloudbuildpb.RetryBuildRequest, opts ...gax.CallOption) (*RetryBuildOperation, error) { return c.internalClient.RetryBuild(ctx, req, opts...) } @@ -521,7 +522,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/cloudbuild/apiv1/v2/cloud_build_client_example_test.go b/cloudbuild/apiv1/v2/cloud_build_client_example_test.go index 38811b28a466..9b289626472a 100644 --- a/cloudbuild/apiv1/v2/cloud_build_client_example_test.go +++ b/cloudbuild/apiv1/v2/cloud_build_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_CreateBuild() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +73,11 @@ func ExampleClient_CreateBuild() { func ExampleClient_GetBuild() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +98,11 @@ func ExampleClient_GetBuild() { func ExampleClient_ListBuilds() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleClient_ListBuilds() { func ExampleClient_CancelBuild() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -129,6 +154,11 @@ func ExampleClient_CancelBuild() { func ExampleClient_RetryBuild() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -154,6 +184,11 @@ func ExampleClient_RetryBuild() { func ExampleClient_ApproveBuild() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleClient_ApproveBuild() { func ExampleClient_CreateBuildTrigger() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleClient_CreateBuildTrigger() { func ExampleClient_GetBuildTrigger() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleClient_GetBuildTrigger() { func ExampleClient_ListBuildTriggers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleClient_ListBuildTriggers() { func ExampleClient_DeleteBuildTrigger() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -263,6 +318,11 @@ func ExampleClient_DeleteBuildTrigger() { func ExampleClient_UpdateBuildTrigger() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -283,6 +343,11 @@ func ExampleClient_UpdateBuildTrigger() { func ExampleClient_RunBuildTrigger() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -308,6 +373,11 @@ func ExampleClient_RunBuildTrigger() { func ExampleClient_ReceiveTriggerWebhook() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -328,6 +398,11 @@ func ExampleClient_ReceiveTriggerWebhook() { func ExampleClient_CreateWorkerPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -353,6 +428,11 @@ func ExampleClient_CreateWorkerPool() { func ExampleClient_GetWorkerPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -373,6 +453,11 @@ func ExampleClient_GetWorkerPool() { func ExampleClient_DeleteWorkerPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -396,6 +481,11 @@ func ExampleClient_DeleteWorkerPool() { func ExampleClient_UpdateWorkerPool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -421,6 +511,11 @@ func ExampleClient_UpdateWorkerPool() { func ExampleClient_ListWorkerPools() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudbuild.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/cloudbuild/apiv1/v2/doc.go b/cloudbuild/apiv1/v2/doc.go index 8cbd0adb59c7..86467ea0d7a6 100644 --- a/cloudbuild/apiv1/v2/doc.go +++ b/cloudbuild/apiv1/v2/doc.go @@ -19,48 +19,59 @@ // // Creates and manages builds on Google Cloud Platform. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := cloudbuild.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudbuild.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := cloudbuild.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &cloudbuildpb.CreateBuildRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/cloudbuild/v1#CreateBuildRequest. -// } -// op, err := c.CreateBuild(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudbuild.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &cloudbuildpb.CreateBuildRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/cloudbuild/v1#CreateBuildRequest. +// } +// op, err := c.CreateBuild(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/cloudbuild/go.mod b/cloudbuild/go.mod index 7abb796108b0..d5c0da1fec74 100644 --- a/cloudbuild/go.mod +++ b/cloudbuild/go.mod @@ -1,13 +1,26 @@ module cloud.google.com/go/cloudbuild -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/cloudbuild/go.sum b/cloudbuild/go.sum index f00d995cec43..fe8755ea9d8f 100644 --- a/cloudbuild/go.sum +++ b/cloudbuild/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +621,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +638,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/clouddms/apiv1/data_migration_client.go b/clouddms/apiv1/data_migration_client.go index 5831cfd0f139..56c8286c54fd 100644 --- a/clouddms/apiv1/data_migration_client.go +++ b/clouddms/apiv1/data_migration_client.go @@ -164,7 +164,8 @@ func (c *DataMigrationClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DataMigrationClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -410,7 +411,8 @@ func NewDataMigrationClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *dataMigrationGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/clouddms/apiv1/data_migration_client_example_test.go b/clouddms/apiv1/data_migration_client_example_test.go index 2f75802d76e3..83d9be0fc8bc 100644 --- a/clouddms/apiv1/data_migration_client_example_test.go +++ b/clouddms/apiv1/data_migration_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewDataMigrationClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewDataMigrationClient() { func ExampleDataMigrationClient_ListMigrationJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleDataMigrationClient_ListMigrationJobs() { func ExampleDataMigrationClient_GetMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleDataMigrationClient_GetMigrationJob() { func ExampleDataMigrationClient_CreateMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleDataMigrationClient_CreateMigrationJob() { func ExampleDataMigrationClient_UpdateMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +159,11 @@ func ExampleDataMigrationClient_UpdateMigrationJob() { func ExampleDataMigrationClient_DeleteMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +187,11 @@ func ExampleDataMigrationClient_DeleteMigrationJob() { func ExampleDataMigrationClient_StartMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -182,6 +217,11 @@ func ExampleDataMigrationClient_StartMigrationJob() { func ExampleDataMigrationClient_StopMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +247,11 @@ func ExampleDataMigrationClient_StopMigrationJob() { func ExampleDataMigrationClient_ResumeMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -232,6 +277,11 @@ func ExampleDataMigrationClient_ResumeMigrationJob() { func ExampleDataMigrationClient_PromoteMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -257,6 +307,11 @@ func ExampleDataMigrationClient_PromoteMigrationJob() { func ExampleDataMigrationClient_VerifyMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -282,6 +337,11 @@ func ExampleDataMigrationClient_VerifyMigrationJob() { func ExampleDataMigrationClient_RestartMigrationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -307,6 +367,11 @@ func ExampleDataMigrationClient_RestartMigrationJob() { func ExampleDataMigrationClient_GenerateSshScript() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -327,6 +392,11 @@ func ExampleDataMigrationClient_GenerateSshScript() { func ExampleDataMigrationClient_ListConnectionProfiles() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -353,6 +423,11 @@ func ExampleDataMigrationClient_ListConnectionProfiles() { func ExampleDataMigrationClient_GetConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -373,6 +448,11 @@ func ExampleDataMigrationClient_GetConnectionProfile() { func ExampleDataMigrationClient_CreateConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -398,6 +478,11 @@ func ExampleDataMigrationClient_CreateConnectionProfile() { func ExampleDataMigrationClient_UpdateConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. @@ -423,6 +508,11 @@ func ExampleDataMigrationClient_UpdateConnectionProfile() { func ExampleDataMigrationClient_DeleteConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := clouddms.NewDataMigrationClient(ctx) if err != nil { // TODO: Handle error. diff --git a/clouddms/apiv1/doc.go b/clouddms/apiv1/doc.go index 208ca891c266..67249133cf96 100644 --- a/clouddms/apiv1/doc.go +++ b/clouddms/apiv1/doc.go @@ -20,51 +20,62 @@ // Manage Cloud Database Migration Service resources on Google Cloud // Platform. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := clouddms.NewDataMigrationClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := clouddms.NewDataMigrationClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := clouddms.NewDataMigrationClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &clouddmspb.ListMigrationJobsRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/clouddms/v1#ListMigrationJobsRequest. -// } -// it := c.ListMigrationJobs(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := clouddms.NewDataMigrationClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &clouddmspb.ListMigrationJobsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/clouddms/v1#ListMigrationJobsRequest. +// } +// it := c.ListMigrationJobs(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewDataMigrationClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/clouddms/go.mod b/clouddms/go.mod index dc048a7a7c5d..d8dae4fc61ec 100644 --- a/clouddms/go.mod +++ b/clouddms/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/clouddms -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/clouddms/go.sum b/clouddms/go.sum index f00d995cec43..c796dcdc6677 100644 --- a/clouddms/go.sum +++ b/clouddms/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/cloudtasks/CHANGES.md b/cloudtasks/CHANGES.md index 3f5196a6e577..a14aee6f086d 100644 --- a/cloudtasks/CHANGES.md +++ b/cloudtasks/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/cloudtasks/v1.4.0...cloudtasks/v1.5.0) (2022-09-19) + + +### Features + +* **cloudtasks:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + ## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/cloudtasks/v1.3.0...cloudtasks/v1.4.0) (2022-06-29) diff --git a/cloudtasks/apiv2/cloud_tasks_client.go b/cloudtasks/apiv2/cloud_tasks_client.go index a6dee9ce9c69..01572862337d 100644 --- a/cloudtasks/apiv2/cloud_tasks_client.go +++ b/cloudtasks/apiv2/cloud_tasks_client.go @@ -232,7 +232,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -347,7 +348,7 @@ func (c *Client) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueReques // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.getIamPolicy +// cloudtasks.queues.getIamPolicy func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } @@ -362,7 +363,7 @@ func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReques // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.setIamPolicy +// cloudtasks.queues.setIamPolicy func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -400,7 +401,7 @@ func (c *Client) GetTask(ctx context.Context, req *taskspb.GetTaskRequest, opts // // Tasks cannot be updated after creation; there is no UpdateTask command. // -// The maximum task size is 100KB. +// The maximum task size is 100KB. func (c *Client) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) { return c.internalClient.CreateTask(ctx, req, opts...) } @@ -503,7 +504,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/cloudtasks/apiv2/cloud_tasks_client_example_test.go b/cloudtasks/apiv2/cloud_tasks_client_example_test.go index 8d8e814ad647..c9a1a36580c9 100644 --- a/cloudtasks/apiv2/cloud_tasks_client_example_test.go +++ b/cloudtasks/apiv2/cloud_tasks_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleClient_ListQueues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -65,6 +75,11 @@ func ExampleClient_ListQueues() { func ExampleClient_GetQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +100,11 @@ func ExampleClient_GetQueue() { func ExampleClient_CreateQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +125,11 @@ func ExampleClient_CreateQueue() { func ExampleClient_UpdateQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleClient_UpdateQueue() { func ExampleClient_DeleteQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +173,11 @@ func ExampleClient_DeleteQueue() { func ExampleClient_PurgeQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -163,6 +198,11 @@ func ExampleClient_PurgeQueue() { func ExampleClient_PauseQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +223,11 @@ func ExampleClient_PauseQueue() { func ExampleClient_ResumeQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +248,11 @@ func ExampleClient_ResumeQueue() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -223,6 +273,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -243,6 +298,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -263,6 +323,11 @@ func ExampleClient_TestIamPermissions() { func ExampleClient_ListTasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -289,6 +354,11 @@ func ExampleClient_ListTasks() { func ExampleClient_GetTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -309,6 +379,11 @@ func ExampleClient_GetTask() { func ExampleClient_CreateTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -329,6 +404,11 @@ func ExampleClient_CreateTask() { func ExampleClient_DeleteTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +427,11 @@ func ExampleClient_DeleteTask() { func ExampleClient_RunTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/cloudtasks/apiv2/doc.go b/cloudtasks/apiv2/doc.go index ca538c15ba90..aa9b8ebae20e 100644 --- a/cloudtasks/apiv2/doc.go +++ b/cloudtasks/apiv2/doc.go @@ -19,49 +19,60 @@ // // Manages the execution of large numbers of distributed requests. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := cloudtasks.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudtasks.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := cloudtasks.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &taskspb.ListQueuesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/tasks/v2#ListQueuesRequest. -// } -// it := c.ListQueues(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudtasks.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &taskspb.ListQueuesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/tasks/v2#ListQueuesRequest. +// } +// it := c.ListQueues(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/cloudtasks/apiv2/mock_test.go b/cloudtasks/apiv2/mock_test.go deleted file mode 100644 index 6a8c5f06b68b..000000000000 --- a/cloudtasks/apiv2/mock_test.go +++ /dev/null @@ -1,1269 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package cloudtasks - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2" - iampb "google.golang.org/genproto/googleapis/iam/v1" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockCloudTasksServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - taskspb.CloudTasksServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockCloudTasksServer) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequest) (*taskspb.ListQueuesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.ListQueuesResponse), nil -} - -func (s *mockCloudTasksServer) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) CreateQueue(ctx context.Context, req *taskspb.CreateQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) DeleteQueue(ctx context.Context, req *taskspb.DeleteQueueRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) PurgeQueue(ctx context.Context, req *taskspb.PurgeQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) PauseQueue(ctx context.Context, req *taskspb.PauseQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockCloudTasksServer) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockCloudTasksServer) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.TestIamPermissionsResponse), nil -} - -func (s *mockCloudTasksServer) ListTasks(ctx context.Context, req *taskspb.ListTasksRequest) (*taskspb.ListTasksResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.ListTasksResponse), nil -} - -func (s *mockCloudTasksServer) GetTask(ctx context.Context, req *taskspb.GetTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) DeleteTask(ctx context.Context, req *taskspb.DeleteTaskRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) RunTask(ctx context.Context, req *taskspb.RunTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockCloudTasks mockCloudTasksServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - taskspb.RegisterCloudTasksServer(serv, &mockCloudTasks) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestCloudTasksListQueues(t *testing.T) { - var nextPageToken string = "" - var queuesElement *taskspb.Queue = &taskspb.Queue{} - var queues = []*taskspb.Queue{queuesElement} - var expectedResponse = &taskspb.ListQueuesResponse{ - NextPageToken: nextPageToken, - Queues: queues, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &taskspb.ListQueuesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListQueues(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Queues[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksListQueuesError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &taskspb.ListQueuesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListQueues(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.GetQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.GetQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCreateQueue(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Queue{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.CreateQueueRequest{ - Parent: formattedParent, - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCreateQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.CreateQueueRequest{ - Parent: formattedParent, - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksUpdateQueue(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Queue{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.UpdateQueueRequest{ - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksUpdateQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.UpdateQueueRequest{ - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksDeleteQueue(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.DeleteQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksDeleteQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.DeleteQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksPurgeQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PurgeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PurgeQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksPurgeQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PurgeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PurgeQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksPauseQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PauseQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PauseQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksPauseQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PauseQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PauseQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksResumeQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ResumeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ResumeQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksResumeQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ResumeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ResumeQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksSetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksSetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksTestIamPermissions(t *testing.T) { - var expectedResponse *iampb.TestIamPermissionsResponse = &iampb.TestIamPermissionsResponse{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksTestIamPermissionsError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksListTasks(t *testing.T) { - var nextPageToken string = "" - var tasksElement *taskspb.Task = &taskspb.Task{} - var tasks = []*taskspb.Task{tasksElement} - var expectedResponse = &taskspb.ListTasksResponse{ - NextPageToken: nextPageToken, - Tasks: tasks, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ListTasksRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTasks(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Tasks[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksListTasksError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ListTasksRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTasks(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetTask(t *testing.T) { - var name2 string = "name2-1052831874" - var dispatchCount int32 = 1217252086 - var responseCount int32 = 424727441 - var expectedResponse = &taskspb.Task{ - Name: name2, - DispatchCount: dispatchCount, - ResponseCount: responseCount, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.GetTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.GetTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCreateTask(t *testing.T) { - var name string = "name3373707" - var dispatchCount int32 = 1217252086 - var responseCount int32 = 424727441 - var expectedResponse = &taskspb.Task{ - Name: name, - DispatchCount: dispatchCount, - ResponseCount: responseCount, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var task *taskspb.Task = &taskspb.Task{} - var request = &taskspb.CreateTaskRequest{ - Parent: formattedParent, - Task: task, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCreateTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var task *taskspb.Task = &taskspb.Task{} - var request = &taskspb.CreateTaskRequest{ - Parent: formattedParent, - Task: task, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksDeleteTask(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.DeleteTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksDeleteTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.DeleteTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksRunTask(t *testing.T) { - var name2 string = "name2-1052831874" - var dispatchCount int32 = 1217252086 - var responseCount int32 = 424727441 - var expectedResponse = &taskspb.Task{ - Name: name2, - DispatchCount: dispatchCount, - ResponseCount: responseCount, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.RunTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RunTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksRunTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.RunTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RunTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/cloudtasks/apiv2beta2/cloud_tasks_client.go b/cloudtasks/apiv2beta2/cloud_tasks_client.go index 2b032b1c7770..41cd94ce0c33 100644 --- a/cloudtasks/apiv2beta2/cloud_tasks_client.go +++ b/cloudtasks/apiv2beta2/cloud_tasks_client.go @@ -355,7 +355,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -470,7 +471,7 @@ func (c *Client) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueReques // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.getIamPolicy +// cloudtasks.queues.getIamPolicy func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } @@ -485,7 +486,7 @@ func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReques // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.setIamPolicy +// cloudtasks.queues.setIamPolicy func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -523,10 +524,10 @@ func (c *Client) GetTask(ctx context.Context, req *taskspb.GetTaskRequest, opts // // Tasks cannot be updated after creation; there is no UpdateTask command. // -// For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is -// 100KB. +// For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is +// 100KB. // -// For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. +// For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. func (c *Client) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) { return c.internalClient.CreateTask(ctx, req, opts...) } @@ -694,7 +695,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -779,7 +781,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -1290,8 +1292,12 @@ func (c *restClient) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequ if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } - if req.GetReadMask().GetPaths() != nil { - params.Add("readMask.paths", fmt.Sprintf("%v", req.GetReadMask().GetPaths())) + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) } baseUrl.RawQuery = params.Encode() @@ -1361,8 +1367,12 @@ func (c *restClient) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest, baseUrl.Path += fmt.Sprintf("/v2beta2/%v", req.GetName()) params := url.Values{} - if req.GetReadMask().GetPaths() != nil { - params.Add("readMask.paths", fmt.Sprintf("%v", req.GetReadMask().GetPaths())) + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, err + } + params.Add("readMask", string(readMask)) } baseUrl.RawQuery = params.Encode() @@ -1513,8 +1523,12 @@ func (c *restClient) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRe baseUrl.Path += fmt.Sprintf("/v2beta2/%v", req.GetQueue().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1819,7 +1833,7 @@ func (c *restClient) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRe // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.getIamPolicy +// cloudtasks.queues.getIamPolicy func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -1888,7 +1902,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.setIamPolicy +// cloudtasks.queues.setIamPolicy func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -2174,10 +2188,10 @@ func (c *restClient) GetTask(ctx context.Context, req *taskspb.GetTaskRequest, o // // Tasks cannot be updated after creation; there is no UpdateTask command. // -// For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is -// 100KB. +// For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is +// 100KB. // -// For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. +// For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. func (c *restClient) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) diff --git a/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go b/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go index eaf72bfe6b5b..cc4ade605e1e 100644 --- a/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go +++ b/cloudtasks/apiv2beta2/cloud_tasks_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -51,6 +61,11 @@ func ExampleNewRESTClient() { func ExampleClient_ListQueues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +92,11 @@ func ExampleClient_ListQueues() { func ExampleClient_GetQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -97,6 +117,11 @@ func ExampleClient_GetQueue() { func ExampleClient_CreateQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -117,6 +142,11 @@ func ExampleClient_CreateQueue() { func ExampleClient_UpdateQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +167,11 @@ func ExampleClient_UpdateQueue() { func ExampleClient_DeleteQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +190,11 @@ func ExampleClient_DeleteQueue() { func ExampleClient_PurgeQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -175,6 +215,11 @@ func ExampleClient_PurgeQueue() { func ExampleClient_PauseQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -195,6 +240,11 @@ func ExampleClient_PauseQueue() { func ExampleClient_ResumeQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -215,6 +265,11 @@ func ExampleClient_ResumeQueue() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -235,6 +290,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -255,6 +315,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -275,6 +340,11 @@ func ExampleClient_TestIamPermissions() { func ExampleClient_ListTasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -301,6 +371,11 @@ func ExampleClient_ListTasks() { func ExampleClient_GetTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +396,11 @@ func ExampleClient_GetTask() { func ExampleClient_CreateTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -341,6 +421,11 @@ func ExampleClient_CreateTask() { func ExampleClient_DeleteTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -359,6 +444,11 @@ func ExampleClient_DeleteTask() { func ExampleClient_LeaseTasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -379,6 +469,11 @@ func ExampleClient_LeaseTasks() { func ExampleClient_AcknowledgeTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -397,6 +492,11 @@ func ExampleClient_AcknowledgeTask() { func ExampleClient_RenewLease() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -417,6 +517,11 @@ func ExampleClient_RenewLease() { func ExampleClient_CancelLease() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -437,6 +542,11 @@ func ExampleClient_CancelLease() { func ExampleClient_RunTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go new file mode 100644 index 000000000000..b4d03d396f60 --- /dev/null +++ b/cloudtasks/apiv2beta2/cloudtaskspb/cloudtasks.pb.go @@ -0,0 +1,3533 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package cloudtaskspb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + v1 "google.golang.org/genproto/googleapis/iam/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +type ListQueuesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location name. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue] + // field can be used as a filter and several operators as supported. + // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as + // described in + // [Stackdriver's Advanced Logs + // Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + // + // Sample filter "app_engine_http_target: *". + // + // Note that using filters might cause fewer queues than the + // requested_page size to be returned. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. + // + // The maximum page size is 9800. If unspecified, the page size will + // be the maximum. Fewer queues than requested might be returned, + // even if more queues exist; use the + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the + // response to determine if more queues exist. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *ListQueuesRequest) Reset() { + *x = ListQueuesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListQueuesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQueuesRequest) ProtoMessage() {} + +func (x *ListQueuesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListQueuesRequest.ProtoReflect.Descriptor instead. +func (*ListQueuesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{0} +} + +func (x *ListQueuesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListQueuesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListQueuesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListQueuesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListQueuesRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +type ListQueuesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of queues. + Queues []*Queue `protobuf:"bytes,1,rep,name=queues,proto3" json:"queues,omitempty"` + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the + // [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListQueuesResponse) Reset() { + *x = ListQueuesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListQueuesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQueuesResponse) ProtoMessage() {} + +func (x *ListQueuesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListQueuesResponse.ProtoReflect.Descriptor instead. +func (*ListQueuesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{1} +} + +func (x *ListQueuesResponse) GetQueues() []*Queue { + if x != nil { + return x.Queues + } + return nil +} + +func (x *ListQueuesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. +type GetQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the queue. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *GetQueueRequest) Reset() { + *x = GetQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQueueRequest) ProtoMessage() {} + +func (x *GetQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQueueRequest.ProtoReflect.Descriptor instead. +func (*GetQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{2} +} + +func (x *GetQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetQueueRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. +type CreateQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location name in which the queue will be created. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + // + // The list of allowed locations can be obtained by calling Cloud + // Tasks' implementation of + // [ListLocations][google.cloud.location.Locations.ListLocations]. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The queue to create. + // + // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue. + Queue *Queue `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` +} + +func (x *CreateQueueRequest) Reset() { + *x = CreateQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateQueueRequest) ProtoMessage() {} + +func (x *CreateQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateQueueRequest.ProtoReflect.Descriptor instead. +func (*CreateQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateQueueRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateQueueRequest) GetQueue() *Queue { + if x != nil { + return x.Queue + } + return nil +} + +// Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. +type UpdateQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue to create or update. + // + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. + // + // Output only fields cannot be modified using UpdateQueue. + // Any value specified for an output only field will be ignored. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed. + Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // A mask used to specify which fields of the queue are being updated. + // + // If empty, then all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateQueueRequest) Reset() { + *x = UpdateQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateQueueRequest) ProtoMessage() {} + +func (x *UpdateQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateQueueRequest.ProtoReflect.Descriptor instead. +func (*UpdateQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateQueueRequest) GetQueue() *Queue { + if x != nil { + return x.Queue + } + return nil +} + +func (x *UpdateQueueRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. +type DeleteQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteQueueRequest) Reset() { + *x = DeleteQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQueueRequest) ProtoMessage() {} + +func (x *DeleteQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteQueueRequest.ProtoReflect.Descriptor instead. +func (*DeleteQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. +type PurgeQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PurgeQueueRequest) Reset() { + *x = PurgeQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PurgeQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PurgeQueueRequest) ProtoMessage() {} + +func (x *PurgeQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PurgeQueueRequest.ProtoReflect.Descriptor instead. +func (*PurgeQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{6} +} + +func (x *PurgeQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. +type PauseQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PauseQueueRequest) Reset() { + *x = PauseQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PauseQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseQueueRequest) ProtoMessage() {} + +func (x *PauseQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseQueueRequest.ProtoReflect.Descriptor instead. +func (*PauseQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{7} +} + +func (x *PauseQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. +type ResumeQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ResumeQueueRequest) Reset() { + *x = ResumeQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResumeQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeQueueRequest) ProtoMessage() {} + +func (x *ResumeQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeQueueRequest.ProtoReflect.Descriptor instead. +func (*ResumeQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{8} +} + +func (x *ResumeQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +type ListTasksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + // Maximum page size. + // + // Fewer tasks than requested might be returned, even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the response to + // determine if more tasks exist. + // + // The maximum page size is 1000. If unspecified, the page size will be the + // maximum. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] + // method. + // + // The page token is valid for only 2 hours. + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTasksRequest) Reset() { + *x = ListTasksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksRequest) ProtoMessage() {} + +func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead. +func (*ListTasksRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{9} +} + +func (x *ListTasksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTasksRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +func (x *ListTasksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTasksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +type ListTasksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of tasks. + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the + // [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTasksResponse) Reset() { + *x = ListTasksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksResponse) ProtoMessage() {} + +func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksResponse.ProtoReflect.Descriptor instead. +func (*ListTasksResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{10} +} + +func (x *ListTasksResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +func (x *ListTasksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. +type GetTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` +} + +func (x *GetTaskRequest) Reset() { + *x = GetTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTaskRequest) ProtoMessage() {} + +func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead. +func (*GetTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{11} +} + +func (x *GetTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetTaskRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. +type CreateTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The task to add. + // + // Task names have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + // The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a + // name is not specified then the system will generate a random + // unique task id, which will be set in the task returned in the + // [response][google.cloud.tasks.v2beta2.Task.name]. + // + // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. + // + // Task De-duplication: + // + // Explicitly specifying a task ID enables task de-duplication. If + // a task's ID is identical to that of an existing task or a task + // that was deleted or completed recently then the call will fail + // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + // If the task's queue was created using Cloud Tasks, then another task with + // the same name can't be created for ~1hour after the original task was + // deleted or completed. If the task's queue was created using queue.yaml or + // queue.xml, then another task with the same name can't be created + // for ~9days after the original task was deleted or completed. + // + // Because there is an extra lookup cost to identify duplicate task + // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly + // increased latency. Using hashed strings for the task id or for + // the prefix of the task id is recommended. Choosing task ids that + // are sequential or have sequential prefixes, for example using a + // timestamp, causes an increase in latency and error rates in all + // task commands. The infrastructure relies on an approximately + // uniform distribution of task ids to store and serve tasks + // efficiently. + Task *Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,3,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` +} + +func (x *CreateTaskRequest) Reset() { + *x = CreateTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTaskRequest) ProtoMessage() {} + +func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTaskRequest.ProtoReflect.Descriptor instead. +func (*CreateTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateTaskRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTaskRequest) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *CreateTaskRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for deleting a task using +// [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask]. +type DeleteTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteTaskRequest) Reset() { + *x = DeleteTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTaskRequest) ProtoMessage() {} + +func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTaskRequest.ProtoReflect.Descriptor instead. +func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +type LeaseTasksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of tasks to lease. + // + // The system will make a best effort to return as close to as + // `max_tasks` as possible. + // + // The largest that `max_tasks` can be is 1000. + // + // The maximum total size of a [lease tasks response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is + // 32 MB. If the sum of all task sizes requested reaches this limit, + // fewer tasks than requested are returned. + MaxTasks int32 `protobuf:"varint,2,opt,name=max_tasks,json=maxTasks,proto3" json:"max_tasks,omitempty"` + // Required. The duration of the lease. + // + // Each task returned in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will + // have its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the current + // time plus the `lease_duration`. The task is leased until its + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the task will not be + // returned to another [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call + // before its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + // + // After the worker has successfully finished the work associated + // with the task, the worker must call via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be + // returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so + // that another worker can retry it. + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + LeaseDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=lease_duration,json=leaseDuration,proto3" json:"lease_duration,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,4,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + // `filter` can be used to specify a subset of tasks to lease. + // + // When `filter` is set to `tag=` then the + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to ``. `` must be + // less than 500 characters. + // + // When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + // the same tag as the task with the oldest + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned. + // + // Grammar Syntax: + // + // * `filter = "tag=" tag | "tag_function=" function` + // + // * `tag = string` + // + // * `function = "oldest_tag()"` + // + // The `oldest_tag()` function returns tasks which have the same tag as the + // oldest task (ordered by schedule time). + // + // SDK compatibility: Although the SDK allows tags to be either + // string or + // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + // aren't UTF-8 encoded can't be used in the + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks. + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *LeaseTasksRequest) Reset() { + *x = LeaseTasksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LeaseTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LeaseTasksRequest) ProtoMessage() {} + +func (x *LeaseTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LeaseTasksRequest.ProtoReflect.Descriptor instead. +func (*LeaseTasksRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{14} +} + +func (x *LeaseTasksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *LeaseTasksRequest) GetMaxTasks() int32 { + if x != nil { + return x.MaxTasks + } + return 0 +} + +func (x *LeaseTasksRequest) GetLeaseDuration() *durationpb.Duration { + if x != nil { + return x.LeaseDuration + } + return nil +} + +func (x *LeaseTasksRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +func (x *LeaseTasksRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +type LeaseTasksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The leased tasks. + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` +} + +func (x *LeaseTasksResponse) Reset() { + *x = LeaseTasksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LeaseTasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LeaseTasksResponse) ProtoMessage() {} + +func (x *LeaseTasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LeaseTasksResponse.ProtoReflect.Descriptor instead. +func (*LeaseTasksResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{15} +} + +func (x *LeaseTasksResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +// Request message for acknowledging a task using +// [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]. +type AcknowledgeTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` +} + +func (x *AcknowledgeTaskRequest) Reset() { + *x = AcknowledgeTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AcknowledgeTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcknowledgeTaskRequest) ProtoMessage() {} + +func (x *AcknowledgeTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcknowledgeTaskRequest.ProtoReflect.Descriptor instead. +func (*AcknowledgeTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{16} +} + +func (x *AcknowledgeTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AcknowledgeTaskRequest) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +// Request message for renewing a lease using +// [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease]. +type RenewLeaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // Required. The desired new lease duration, starting from now. + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + LeaseDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=lease_duration,json=leaseDuration,proto3" json:"lease_duration,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,4,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` +} + +func (x *RenewLeaseRequest) Reset() { + *x = RenewLeaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenewLeaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenewLeaseRequest) ProtoMessage() {} + +func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenewLeaseRequest.ProtoReflect.Descriptor instead. +func (*RenewLeaseRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{17} +} + +func (x *RenewLeaseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RenewLeaseRequest) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *RenewLeaseRequest) GetLeaseDuration() *durationpb.Duration { + if x != nil { + return x.LeaseDuration + } + return nil +} + +func (x *RenewLeaseRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for canceling a lease using +// [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease]. +type CancelLeaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,3,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` +} + +func (x *CancelLeaseRequest) Reset() { + *x = CancelLeaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelLeaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelLeaseRequest) ProtoMessage() {} + +func (x *CancelLeaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelLeaseRequest.ProtoReflect.Descriptor instead. +func (*CancelLeaseRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{18} +} + +func (x *CancelLeaseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CancelLeaseRequest) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *CancelLeaseRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for forcing a task to run now using +// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask]. +type RunTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` +} + +func (x *RunTaskRequest) Reset() { + *x = RunTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunTaskRequest) ProtoMessage() {} + +func (x *RunTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunTaskRequest.ProtoReflect.Descriptor instead. +func (*RunTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP(), []int{19} +} + +func (x *RunTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RunTaskRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +var File_google_cloud_tasks_v2beta2_cloudtasks_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x61, 0x6d, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x22, 0x77, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x47, 0x65, + 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, + 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, + 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x3c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x22, 0x8f, + 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, + 0x22, 0x51, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x11, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, + 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x98, 0x01, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, + 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x56, 0x69, 0x65, 0x77, 0x22, 0x4f, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, + 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9b, 0x02, 0x0a, 0x11, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x61, 0x78, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x6d, 0x61, 0x78, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x22, 0x4c, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa8, + 0x02, 0x0a, 0x11, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x44, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x22, 0xe2, 0x01, 0x0a, 0x12, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, + 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x22, 0x98, + 0x01, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x32, 0xd4, 0x1c, 0x0a, 0x0a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, + 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, + 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x9a, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, + 0x22, 0x2f, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x73, 0x3a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x2c, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0xba, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3e, 0x32, 0x35, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, + 0xda, 0x41, 0x11, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa7, 0x01, 0x0a, + 0x0a, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x47, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x75, 0x72, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, + 0x35, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x70, 0x61, 0x75, 0x73, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xaa, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x36, 0x2f, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa1, 0x01, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x45, 0x22, 0x40, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x5d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x22, 0x40, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, + 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0xd3, 0x01, 0x0a, + 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, + 0x22, 0x46, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x14, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x12, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, + 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0xda, 0x41, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x9f, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, + 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3c, 0x22, 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x0b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x9b, 0x01, 0x0a, 0x0a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, + 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xcd, 0x01, 0x0a, 0x0a, 0x4c, 0x65, + 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, + 0x3d, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x3a, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x3a, 0x01, + 0x2a, 0xda, 0x41, 0x15, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xc2, 0x01, 0x0a, 0x0f, 0x41, 0x63, + 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x32, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, + 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x48, 0x22, 0x43, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x63, 0x6b, 0x6e, 0x6f, + 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x12, 0x6e, 0x61, 0x6d, 0x65, + 0x2c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x12, 0xd0, + 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x2d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, + 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x71, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x22, 0x42, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x72, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x21, + 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x2c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0xc4, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x22, 0x43, 0x2f, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x65, 0x61, 0x73, 0x65, + 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x12, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x07, 0x52, 0x75, 0x6e, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x3b, 0x2f, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x75, 0x6e, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, + 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x42, 0x7c, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x42, 0x0f, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0xa2, 0x02, 0x05, 0x54, 0x41, 0x53, 0x4b, 0x53, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescData = file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_google_cloud_tasks_v2beta2_cloudtasks_proto_goTypes = []interface{}{ + (*ListQueuesRequest)(nil), // 0: google.cloud.tasks.v2beta2.ListQueuesRequest + (*ListQueuesResponse)(nil), // 1: google.cloud.tasks.v2beta2.ListQueuesResponse + (*GetQueueRequest)(nil), // 2: google.cloud.tasks.v2beta2.GetQueueRequest + (*CreateQueueRequest)(nil), // 3: google.cloud.tasks.v2beta2.CreateQueueRequest + (*UpdateQueueRequest)(nil), // 4: google.cloud.tasks.v2beta2.UpdateQueueRequest + (*DeleteQueueRequest)(nil), // 5: google.cloud.tasks.v2beta2.DeleteQueueRequest + (*PurgeQueueRequest)(nil), // 6: google.cloud.tasks.v2beta2.PurgeQueueRequest + (*PauseQueueRequest)(nil), // 7: google.cloud.tasks.v2beta2.PauseQueueRequest + (*ResumeQueueRequest)(nil), // 8: google.cloud.tasks.v2beta2.ResumeQueueRequest + (*ListTasksRequest)(nil), // 9: google.cloud.tasks.v2beta2.ListTasksRequest + (*ListTasksResponse)(nil), // 10: google.cloud.tasks.v2beta2.ListTasksResponse + (*GetTaskRequest)(nil), // 11: google.cloud.tasks.v2beta2.GetTaskRequest + (*CreateTaskRequest)(nil), // 12: google.cloud.tasks.v2beta2.CreateTaskRequest + (*DeleteTaskRequest)(nil), // 13: google.cloud.tasks.v2beta2.DeleteTaskRequest + (*LeaseTasksRequest)(nil), // 14: google.cloud.tasks.v2beta2.LeaseTasksRequest + (*LeaseTasksResponse)(nil), // 15: google.cloud.tasks.v2beta2.LeaseTasksResponse + (*AcknowledgeTaskRequest)(nil), // 16: google.cloud.tasks.v2beta2.AcknowledgeTaskRequest + (*RenewLeaseRequest)(nil), // 17: google.cloud.tasks.v2beta2.RenewLeaseRequest + (*CancelLeaseRequest)(nil), // 18: google.cloud.tasks.v2beta2.CancelLeaseRequest + (*RunTaskRequest)(nil), // 19: google.cloud.tasks.v2beta2.RunTaskRequest + (*fieldmaskpb.FieldMask)(nil), // 20: google.protobuf.FieldMask + (*Queue)(nil), // 21: google.cloud.tasks.v2beta2.Queue + (Task_View)(0), // 22: google.cloud.tasks.v2beta2.Task.View + (*Task)(nil), // 23: google.cloud.tasks.v2beta2.Task + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*v1.GetIamPolicyRequest)(nil), // 26: google.iam.v1.GetIamPolicyRequest + (*v1.SetIamPolicyRequest)(nil), // 27: google.iam.v1.SetIamPolicyRequest + (*v1.TestIamPermissionsRequest)(nil), // 28: google.iam.v1.TestIamPermissionsRequest + (*emptypb.Empty)(nil), // 29: google.protobuf.Empty + (*v1.Policy)(nil), // 30: google.iam.v1.Policy + (*v1.TestIamPermissionsResponse)(nil), // 31: google.iam.v1.TestIamPermissionsResponse +} +var file_google_cloud_tasks_v2beta2_cloudtasks_proto_depIdxs = []int32{ + 20, // 0: google.cloud.tasks.v2beta2.ListQueuesRequest.read_mask:type_name -> google.protobuf.FieldMask + 21, // 1: google.cloud.tasks.v2beta2.ListQueuesResponse.queues:type_name -> google.cloud.tasks.v2beta2.Queue + 20, // 2: google.cloud.tasks.v2beta2.GetQueueRequest.read_mask:type_name -> google.protobuf.FieldMask + 21, // 3: google.cloud.tasks.v2beta2.CreateQueueRequest.queue:type_name -> google.cloud.tasks.v2beta2.Queue + 21, // 4: google.cloud.tasks.v2beta2.UpdateQueueRequest.queue:type_name -> google.cloud.tasks.v2beta2.Queue + 20, // 5: google.cloud.tasks.v2beta2.UpdateQueueRequest.update_mask:type_name -> google.protobuf.FieldMask + 22, // 6: google.cloud.tasks.v2beta2.ListTasksRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 23, // 7: google.cloud.tasks.v2beta2.ListTasksResponse.tasks:type_name -> google.cloud.tasks.v2beta2.Task + 22, // 8: google.cloud.tasks.v2beta2.GetTaskRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 23, // 9: google.cloud.tasks.v2beta2.CreateTaskRequest.task:type_name -> google.cloud.tasks.v2beta2.Task + 22, // 10: google.cloud.tasks.v2beta2.CreateTaskRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 24, // 11: google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration:type_name -> google.protobuf.Duration + 22, // 12: google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 23, // 13: google.cloud.tasks.v2beta2.LeaseTasksResponse.tasks:type_name -> google.cloud.tasks.v2beta2.Task + 25, // 14: google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.schedule_time:type_name -> google.protobuf.Timestamp + 25, // 15: google.cloud.tasks.v2beta2.RenewLeaseRequest.schedule_time:type_name -> google.protobuf.Timestamp + 24, // 16: google.cloud.tasks.v2beta2.RenewLeaseRequest.lease_duration:type_name -> google.protobuf.Duration + 22, // 17: google.cloud.tasks.v2beta2.RenewLeaseRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 25, // 18: google.cloud.tasks.v2beta2.CancelLeaseRequest.schedule_time:type_name -> google.protobuf.Timestamp + 22, // 19: google.cloud.tasks.v2beta2.CancelLeaseRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 22, // 20: google.cloud.tasks.v2beta2.RunTaskRequest.response_view:type_name -> google.cloud.tasks.v2beta2.Task.View + 0, // 21: google.cloud.tasks.v2beta2.CloudTasks.ListQueues:input_type -> google.cloud.tasks.v2beta2.ListQueuesRequest + 2, // 22: google.cloud.tasks.v2beta2.CloudTasks.GetQueue:input_type -> google.cloud.tasks.v2beta2.GetQueueRequest + 3, // 23: google.cloud.tasks.v2beta2.CloudTasks.CreateQueue:input_type -> google.cloud.tasks.v2beta2.CreateQueueRequest + 4, // 24: google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue:input_type -> google.cloud.tasks.v2beta2.UpdateQueueRequest + 5, // 25: google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue:input_type -> google.cloud.tasks.v2beta2.DeleteQueueRequest + 6, // 26: google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue:input_type -> google.cloud.tasks.v2beta2.PurgeQueueRequest + 7, // 27: google.cloud.tasks.v2beta2.CloudTasks.PauseQueue:input_type -> google.cloud.tasks.v2beta2.PauseQueueRequest + 8, // 28: google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue:input_type -> google.cloud.tasks.v2beta2.ResumeQueueRequest + 26, // 29: google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest + 27, // 30: google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest + 28, // 31: google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest + 9, // 32: google.cloud.tasks.v2beta2.CloudTasks.ListTasks:input_type -> google.cloud.tasks.v2beta2.ListTasksRequest + 11, // 33: google.cloud.tasks.v2beta2.CloudTasks.GetTask:input_type -> google.cloud.tasks.v2beta2.GetTaskRequest + 12, // 34: google.cloud.tasks.v2beta2.CloudTasks.CreateTask:input_type -> google.cloud.tasks.v2beta2.CreateTaskRequest + 13, // 35: google.cloud.tasks.v2beta2.CloudTasks.DeleteTask:input_type -> google.cloud.tasks.v2beta2.DeleteTaskRequest + 14, // 36: google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks:input_type -> google.cloud.tasks.v2beta2.LeaseTasksRequest + 16, // 37: google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask:input_type -> google.cloud.tasks.v2beta2.AcknowledgeTaskRequest + 17, // 38: google.cloud.tasks.v2beta2.CloudTasks.RenewLease:input_type -> google.cloud.tasks.v2beta2.RenewLeaseRequest + 18, // 39: google.cloud.tasks.v2beta2.CloudTasks.CancelLease:input_type -> google.cloud.tasks.v2beta2.CancelLeaseRequest + 19, // 40: google.cloud.tasks.v2beta2.CloudTasks.RunTask:input_type -> google.cloud.tasks.v2beta2.RunTaskRequest + 1, // 41: google.cloud.tasks.v2beta2.CloudTasks.ListQueues:output_type -> google.cloud.tasks.v2beta2.ListQueuesResponse + 21, // 42: google.cloud.tasks.v2beta2.CloudTasks.GetQueue:output_type -> google.cloud.tasks.v2beta2.Queue + 21, // 43: google.cloud.tasks.v2beta2.CloudTasks.CreateQueue:output_type -> google.cloud.tasks.v2beta2.Queue + 21, // 44: google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue:output_type -> google.cloud.tasks.v2beta2.Queue + 29, // 45: google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue:output_type -> google.protobuf.Empty + 21, // 46: google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue:output_type -> google.cloud.tasks.v2beta2.Queue + 21, // 47: google.cloud.tasks.v2beta2.CloudTasks.PauseQueue:output_type -> google.cloud.tasks.v2beta2.Queue + 21, // 48: google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue:output_type -> google.cloud.tasks.v2beta2.Queue + 30, // 49: google.cloud.tasks.v2beta2.CloudTasks.GetIamPolicy:output_type -> google.iam.v1.Policy + 30, // 50: google.cloud.tasks.v2beta2.CloudTasks.SetIamPolicy:output_type -> google.iam.v1.Policy + 31, // 51: google.cloud.tasks.v2beta2.CloudTasks.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse + 10, // 52: google.cloud.tasks.v2beta2.CloudTasks.ListTasks:output_type -> google.cloud.tasks.v2beta2.ListTasksResponse + 23, // 53: google.cloud.tasks.v2beta2.CloudTasks.GetTask:output_type -> google.cloud.tasks.v2beta2.Task + 23, // 54: google.cloud.tasks.v2beta2.CloudTasks.CreateTask:output_type -> google.cloud.tasks.v2beta2.Task + 29, // 55: google.cloud.tasks.v2beta2.CloudTasks.DeleteTask:output_type -> google.protobuf.Empty + 15, // 56: google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks:output_type -> google.cloud.tasks.v2beta2.LeaseTasksResponse + 29, // 57: google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask:output_type -> google.protobuf.Empty + 23, // 58: google.cloud.tasks.v2beta2.CloudTasks.RenewLease:output_type -> google.cloud.tasks.v2beta2.Task + 23, // 59: google.cloud.tasks.v2beta2.CloudTasks.CancelLease:output_type -> google.cloud.tasks.v2beta2.Task + 23, // 60: google.cloud.tasks.v2beta2.CloudTasks.RunTask:output_type -> google.cloud.tasks.v2beta2.Task + 41, // [41:61] is the sub-list for method output_type + 21, // [21:41] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta2_cloudtasks_proto_init() } +func file_google_cloud_tasks_v2beta2_cloudtasks_proto_init() { + if File_google_cloud_tasks_v2beta2_cloudtasks_proto != nil { + return + } + file_google_cloud_tasks_v2beta2_queue_proto_init() + file_google_cloud_tasks_v2beta2_task_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListQueuesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListQueuesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PurgeQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PauseQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResumeQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LeaseTasksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LeaseTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcknowledgeTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewLeaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelLeaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_tasks_v2beta2_cloudtasks_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta2_cloudtasks_proto_depIdxs, + MessageInfos: file_google_cloud_tasks_v2beta2_cloudtasks_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta2_cloudtasks_proto = out.File + file_google_cloud_tasks_v2beta2_cloudtasks_proto_rawDesc = nil + file_google_cloud_tasks_v2beta2_cloudtasks_proto_goTypes = nil + file_google_cloud_tasks_v2beta2_cloudtasks_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// CloudTasksClient is the client API for CloudTasks service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type CloudTasksClient interface { + // Lists queues. + // + // Queues are returned in lexicographical order. + ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) + // Gets a queue. + GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Creates a queue. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + CreateQueue(ctx context.Context, in *CreateQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // the queue if it does exist. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + UpdateQueue(ctx context.Context, in *UpdateQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + PurgeQueue(ctx context.Context, in *PurgeQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + PauseQueue(ctx context.Context, in *PauseQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + ResumeQueue(ctx context.Context, in *ResumeQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing + // policy. + // + // Note: The Cloud Console does not check queue-level IAM permissions yet. + // Project-level permissions are required to use the Cloud Console. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the + // subset of information which is returned. + // + // The tasks may be returned in any order. The ordering may change at any + // time. + ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) + // Gets a task. + GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // - For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is + // 100KB. + // - For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. + CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has completed successfully or permanently + // failed. + DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Leases tasks from a pull queue for + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // This method is invoked by the worker to obtain a lease. The + // worker must acknowledge the task via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + // performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + // the worker needs to perform the work associated with the task. To + // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per + // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is returned when this limit is + // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is also returned when + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is exceeded. + LeaseTasks(ctx context.Context, in *LeaseTasksRequest, opts ...grpc.CallOption) (*LeaseTasksResponse, error) + // Acknowledges a pull task. + // + // The worker, that is, the entity that + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method + // to indicate that the work associated with the task has finished. + // + // The worker must acknowledge a task within the + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease + // will expire and the task will become available to be leased + // again. After the task is acknowledged, it will not be returned + // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + AcknowledgeTask(ctx context.Context, in *AcknowledgeTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Renew the current lease of a pull task. + // + // The worker can use this method to extend the lease by a new + // duration, starting from now. The new task lease will be + // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*Task, error) + // Cancel a pull task's lease. + // + // The worker can use this method to cancel a task's lease by + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will + // make the task available to be leased to the next caller of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + CancelLease(ctx context.Context, in *CancelLeaseRequest, opts ...grpc.CallOption) (*Task, error) + // Forces a task to run now. + // + // When this method is called, Cloud Tasks will dispatch the task, even if + // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed + // task after a fix has been made or to manually force a task to be + // dispatched now. + // + // The dispatched task is returned. That is, the task that is returned + // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but + // before the task is received by its target. + // + // If Cloud Tasks receives a successful response from the task's + // target, then the task will be deleted; otherwise the task's + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a + // [pull task][google.cloud.tasks.v2beta2.PullMessage]. + RunTask(ctx context.Context, in *RunTaskRequest, opts ...grpc.CallOption) (*Task, error) +} + +type cloudTasksClient struct { + cc grpc.ClientConnInterface +} + +func NewCloudTasksClient(cc grpc.ClientConnInterface) CloudTasksClient { + return &cloudTasksClient{cc} +} + +func (c *cloudTasksClient) ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) { + out := new(ListQueuesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/ListQueues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/GetQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CreateQueue(ctx context.Context, in *CreateQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/CreateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) UpdateQueue(ctx context.Context, in *UpdateQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) PurgeQueue(ctx context.Context, in *PurgeQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) PauseQueue(ctx context.Context, in *PauseQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/PauseQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) ResumeQueue(ctx context.Context, in *ResumeQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) { + out := new(v1.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/ListTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/GetTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/CreateTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/DeleteTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) LeaseTasks(ctx context.Context, in *LeaseTasksRequest, opts ...grpc.CallOption) (*LeaseTasksResponse, error) { + out := new(LeaseTasksResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) AcknowledgeTask(ctx context.Context, in *AcknowledgeTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/RenewLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CancelLease(ctx context.Context, in *CancelLeaseRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/CancelLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) RunTask(ctx context.Context, in *RunTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/RunTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CloudTasksServer is the server API for CloudTasks service. +type CloudTasksServer interface { + // Lists queues. + // + // Queues are returned in lexicographical order. + ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) + // Gets a queue. + GetQueue(context.Context, *GetQueueRequest) (*Queue, error) + // Creates a queue. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + CreateQueue(context.Context, *CreateQueueRequest) (*Queue, error) + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // the queue if it does exist. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + UpdateQueue(context.Context, *UpdateQueueRequest) (*Queue, error) + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + DeleteQueue(context.Context, *DeleteQueueRequest) (*emptypb.Empty, error) + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + PurgeQueue(context.Context, *PurgeQueueRequest) (*Queue, error) + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + PauseQueue(context.Context, *PauseQueueRequest) (*Queue, error) + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + ResumeQueue(context.Context, *ResumeQueueRequest) (*Queue, error) + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing + // policy. + // + // Note: The Cloud Console does not check queue-level IAM permissions yet. + // Project-level permissions are required to use the Cloud Console. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the + // subset of information which is returned. + // + // The tasks may be returned in any order. The ordering may change at any + // time. + ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + // Gets a task. + GetTask(context.Context, *GetTaskRequest) (*Task, error) + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // - For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is + // 100KB. + // - For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB. + CreateTask(context.Context, *CreateTaskRequest) (*Task, error) + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has completed successfully or permanently + // failed. + DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) + // Leases tasks from a pull queue for + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // This method is invoked by the worker to obtain a lease. The + // worker must acknowledge the task via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + // performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + // the worker needs to perform the work associated with the task. To + // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per + // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is returned when this limit is + // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is also returned when + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is exceeded. + LeaseTasks(context.Context, *LeaseTasksRequest) (*LeaseTasksResponse, error) + // Acknowledges a pull task. + // + // The worker, that is, the entity that + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method + // to indicate that the work associated with the task has finished. + // + // The worker must acknowledge a task within the + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease + // will expire and the task will become available to be leased + // again. After the task is acknowledged, it will not be returned + // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + AcknowledgeTask(context.Context, *AcknowledgeTaskRequest) (*emptypb.Empty, error) + // Renew the current lease of a pull task. + // + // The worker can use this method to extend the lease by a new + // duration, starting from now. The new task lease will be + // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + RenewLease(context.Context, *RenewLeaseRequest) (*Task, error) + // Cancel a pull task's lease. + // + // The worker can use this method to cancel a task's lease by + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will + // make the task available to be leased to the next caller of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + CancelLease(context.Context, *CancelLeaseRequest) (*Task, error) + // Forces a task to run now. + // + // When this method is called, Cloud Tasks will dispatch the task, even if + // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed + // task after a fix has been made or to manually force a task to be + // dispatched now. + // + // The dispatched task is returned. That is, the task that is returned + // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but + // before the task is received by its target. + // + // If Cloud Tasks receives a successful response from the task's + // target, then the task will be deleted; otherwise the task's + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a + // [pull task][google.cloud.tasks.v2beta2.PullMessage]. + RunTask(context.Context, *RunTaskRequest) (*Task, error) +} + +// UnimplementedCloudTasksServer can be embedded to have forward compatible implementations. +type UnimplementedCloudTasksServer struct { +} + +func (*UnimplementedCloudTasksServer) ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListQueues not implemented") +} +func (*UnimplementedCloudTasksServer) GetQueue(context.Context, *GetQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented") +} +func (*UnimplementedCloudTasksServer) CreateQueue(context.Context, *CreateQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQueue not implemented") +} +func (*UnimplementedCloudTasksServer) UpdateQueue(context.Context, *UpdateQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQueue not implemented") +} +func (*UnimplementedCloudTasksServer) DeleteQueue(context.Context, *DeleteQueueRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteQueue not implemented") +} +func (*UnimplementedCloudTasksServer) PurgeQueue(context.Context, *PurgeQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method PurgeQueue not implemented") +} +func (*UnimplementedCloudTasksServer) PauseQueue(context.Context, *PauseQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseQueue not implemented") +} +func (*UnimplementedCloudTasksServer) ResumeQueue(context.Context, *ResumeQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResumeQueue not implemented") +} +func (*UnimplementedCloudTasksServer) GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (*UnimplementedCloudTasksServer) SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (*UnimplementedCloudTasksServer) TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} +func (*UnimplementedCloudTasksServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTasks not implemented") +} +func (*UnimplementedCloudTasksServer) GetTask(context.Context, *GetTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented") +} +func (*UnimplementedCloudTasksServer) CreateTask(context.Context, *CreateTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") +} +func (*UnimplementedCloudTasksServer) DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented") +} +func (*UnimplementedCloudTasksServer) LeaseTasks(context.Context, *LeaseTasksRequest) (*LeaseTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LeaseTasks not implemented") +} +func (*UnimplementedCloudTasksServer) AcknowledgeTask(context.Context, *AcknowledgeTaskRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AcknowledgeTask not implemented") +} +func (*UnimplementedCloudTasksServer) RenewLease(context.Context, *RenewLeaseRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method RenewLease not implemented") +} +func (*UnimplementedCloudTasksServer) CancelLease(context.Context, *CancelLeaseRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelLease not implemented") +} +func (*UnimplementedCloudTasksServer) RunTask(context.Context, *RunTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method RunTask not implemented") +} + +func RegisterCloudTasksServer(s *grpc.Server, srv CloudTasksServer) { + s.RegisterService(&_CloudTasks_serviceDesc, srv) +} + +func _CloudTasks_ListQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListQueuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ListQueues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/ListQueues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ListQueues(ctx, req.(*ListQueuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/GetQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetQueue(ctx, req.(*GetQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CreateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/CreateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CreateQueue(ctx, req.(*CreateQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).UpdateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).UpdateQueue(ctx, req.(*UpdateQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).DeleteQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).DeleteQueue(ctx, req.(*DeleteQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_PurgeQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PurgeQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).PurgeQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).PurgeQueue(ctx, req.(*PurgeQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_PauseQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PauseQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).PauseQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/PauseQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).PauseQueue(ctx, req.(*PauseQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_ResumeQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResumeQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ResumeQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ResumeQueue(ctx, req.(*ResumeQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ListTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/ListTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ListTasks(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/GetTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetTask(ctx, req.(*GetTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CreateTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/CreateTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CreateTask(ctx, req.(*CreateTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).DeleteTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/DeleteTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).DeleteTask(ctx, req.(*DeleteTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_LeaseTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LeaseTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).LeaseTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).LeaseTasks(ctx, req.(*LeaseTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_AcknowledgeTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AcknowledgeTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).AcknowledgeTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).AcknowledgeTask(ctx, req.(*AcknowledgeTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_RenewLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RenewLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).RenewLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/RenewLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).RenewLease(ctx, req.(*RenewLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CancelLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CancelLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/CancelLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CancelLease(ctx, req.(*CancelLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_RunTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).RunTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/RunTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).RunTask(ctx, req.(*RunTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _CloudTasks_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.tasks.v2beta2.CloudTasks", + HandlerType: (*CloudTasksServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListQueues", + Handler: _CloudTasks_ListQueues_Handler, + }, + { + MethodName: "GetQueue", + Handler: _CloudTasks_GetQueue_Handler, + }, + { + MethodName: "CreateQueue", + Handler: _CloudTasks_CreateQueue_Handler, + }, + { + MethodName: "UpdateQueue", + Handler: _CloudTasks_UpdateQueue_Handler, + }, + { + MethodName: "DeleteQueue", + Handler: _CloudTasks_DeleteQueue_Handler, + }, + { + MethodName: "PurgeQueue", + Handler: _CloudTasks_PurgeQueue_Handler, + }, + { + MethodName: "PauseQueue", + Handler: _CloudTasks_PauseQueue_Handler, + }, + { + MethodName: "ResumeQueue", + Handler: _CloudTasks_ResumeQueue_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _CloudTasks_GetIamPolicy_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _CloudTasks_SetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _CloudTasks_TestIamPermissions_Handler, + }, + { + MethodName: "ListTasks", + Handler: _CloudTasks_ListTasks_Handler, + }, + { + MethodName: "GetTask", + Handler: _CloudTasks_GetTask_Handler, + }, + { + MethodName: "CreateTask", + Handler: _CloudTasks_CreateTask_Handler, + }, + { + MethodName: "DeleteTask", + Handler: _CloudTasks_DeleteTask_Handler, + }, + { + MethodName: "LeaseTasks", + Handler: _CloudTasks_LeaseTasks_Handler, + }, + { + MethodName: "AcknowledgeTask", + Handler: _CloudTasks_AcknowledgeTask_Handler, + }, + { + MethodName: "RenewLease", + Handler: _CloudTasks_RenewLease_Handler, + }, + { + MethodName: "CancelLease", + Handler: _CloudTasks_CancelLease_Handler, + }, + { + MethodName: "RunTask", + Handler: _CloudTasks_RunTask_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/tasks/v2beta2/cloudtasks.proto", +} diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go new file mode 100644 index 000000000000..674cbeedaccd --- /dev/null +++ b/cloudtasks/apiv2beta2/cloudtaskspb/old_target.pb.go @@ -0,0 +1,92 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta2/old_target.proto + +package cloudtaskspb + +import ( + reflect "reflect" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_google_cloud_tasks_v2beta2_old_target_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta2_old_target_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x6f, 0x6c, 0x64, + 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x1a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x42, 0x73, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x42, 0x0e, 0x4f, 0x6c, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_google_cloud_tasks_v2beta2_old_target_proto_goTypes = []interface{}{} +var file_google_cloud_tasks_v2beta2_old_target_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta2_old_target_proto_init() } +func file_google_cloud_tasks_v2beta2_old_target_proto_init() { + if File_google_cloud_tasks_v2beta2_old_target_proto != nil { + return + } + file_google_cloud_tasks_v2beta2_target_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta2_old_target_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta2_old_target_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta2_old_target_proto_depIdxs, + }.Build() + File_google_cloud_tasks_v2beta2_old_target_proto = out.File + file_google_cloud_tasks_v2beta2_old_target_proto_rawDesc = nil + file_google_cloud_tasks_v2beta2_old_target_proto_goTypes = nil + file_google_cloud_tasks_v2beta2_old_target_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go new file mode 100644 index 000000000000..ad8deaa2846a --- /dev/null +++ b/cloudtasks/apiv2beta2/cloudtaskspb/queue.pb.go @@ -0,0 +1,1074 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta2/queue.proto + +package cloudtaskspb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// State of the queue. +type Queue_State int32 + +const ( + // Unspecified state. + Queue_STATE_UNSPECIFIED Queue_State = 0 + // The queue is running. Tasks can be dispatched. + // + // If the queue was created using Cloud Tasks and the queue has + // had no activity (method calls or task dispatches) for 30 days, + // the queue may take a few minutes to re-activate. Some method + // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + // tasks may not be dispatched for a few minutes until the queue + // has been re-activated. + Queue_RUNNING Queue_State = 1 + // Tasks are paused by the user. If the queue is paused then Cloud + // Tasks will stop delivering tasks from it, but more tasks can + // still be added to it by the user. When a pull queue is paused, + // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a + // [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + Queue_PAUSED Queue_State = 2 + // The queue is disabled. + // + // A queue becomes `DISABLED` when + // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + // or + // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + // is uploaded which does not contain the queue. You cannot directly disable + // a queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched and + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a + // `FAILED_PRECONDITION` error. + // + // To permanently delete this queue and all of its tasks, call + // [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. + Queue_DISABLED Queue_State = 3 +) + +// Enum value maps for Queue_State. +var ( + Queue_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "RUNNING", + 2: "PAUSED", + 3: "DISABLED", + } + Queue_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "PAUSED": 2, + "DISABLED": 3, + } +) + +func (x Queue_State) Enum() *Queue_State { + p := new(Queue_State) + *p = x + return p +} + +func (x Queue_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Queue_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta2_queue_proto_enumTypes[0].Descriptor() +} + +func (Queue_State) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta2_queue_proto_enumTypes[0] +} + +func (x Queue_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Queue_State.Descriptor instead. +func (Queue_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_queue_proto_rawDescGZIP(), []int{0, 0} +} + +// A queue is a container of related tasks. Queues are configured to manage +// how those tasks are dispatched. Configurable properties include rate limits, +// retry options, target types, and others. +type Queue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], + // after which it becomes output only. + // + // The queue name. + // + // The queue name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // - `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // - `LOCATION_ID` is the canonical ID for the queue's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // - `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], + // after which the queue config type becomes output only, though fields within + // the config are mutable. + // + // The queue's target. + // + // The target applies to all tasks in the queue. + // + // Types that are assignable to TargetType: + // + // *Queue_AppEngineHttpTarget + // *Queue_PullTarget + TargetType isQueue_TargetType `protobuf_oneof:"target_type"` + // Rate limits for task dispatches. + // + // [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both + // control task attempts however they control how tasks are + // attempted in different ways: + // + // - [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of + // dispatches from a queue (i.e. all traffic dispatched from the + // queue, regardless of whether the dispatch is from a first + // attempt or a retry). + // - [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to + // particular a task after its first attempt fails. That is, + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). + RateLimits *RateLimits `protobuf:"bytes,5,opt,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + // Settings that determine the retry behavior. + // + // - For tasks created using Cloud Tasks: the queue-level retry settings + // apply to all tasks in the queue that were created using Cloud Tasks. + // Retry settings cannot be set on individual tasks. + // - For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry settings + // explicitly set on the task and were created by the App Engine SDK. See + // [App Engine + // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + RetryConfig *RetryConfig `protobuf:"bytes,6,opt,name=retry_config,json=retryConfig,proto3" json:"retry_config,omitempty"` + // Output only. The state of the queue. + // + // `state` can only be changed by calling + // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading + // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`. + State Queue_State `protobuf:"varint,7,opt,name=state,proto3,enum=google.cloud.tasks.v2beta2.Queue_State" json:"state,omitempty"` + // Output only. The last time this queue was purged. + // + // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time + // were purged. + // + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the + // [App Engine Task Queue SDK, or the Cloud + // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + // + // Purge time will be truncated to the nearest microsecond. Purge + // time will be unset if the queue has never been purged. + PurgeTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=purge_time,json=purgeTime,proto3" json:"purge_time,omitempty"` + // The maximum amount of time that a task will be retained in + // this queue. + // + // Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + // After a task has lived for `task_ttl`, the task will be deleted + // regardless of whether it was dispatched or not. + // + // The `task_ttl` for queues created via queue.yaml/xml is equal to the + // maximum duration because there is a + // [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + // these queues. To view the maximum valid duration, see the documentation for + // [Duration][google.protobuf.Duration]. + TaskTtl *durationpb.Duration `protobuf:"bytes,9,opt,name=task_ttl,json=taskTtl,proto3" json:"task_ttl,omitempty"` + // The task tombstone time to live (TTL). + // + // After a task is deleted or completed, the task's tombstone is + // retained for the length of time specified by `tombstone_ttl`. + // The tombstone is used by task de-duplication; another task with the same + // name can't be created until the tombstone has expired. For more information + // about task de-duplication, see the documentation for + // [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. + // + // Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + TombstoneTtl *durationpb.Duration `protobuf:"bytes,10,opt,name=tombstone_ttl,json=tombstoneTtl,proto3" json:"tombstone_ttl,omitempty"` + // Output only. The realtime, informational statistics for a queue. In order + // to receive the statistics the caller should include this field in the + // FieldMask. + Stats *QueueStats `protobuf:"bytes,16,opt,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *Queue) Reset() { + *x = Queue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Queue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Queue) ProtoMessage() {} + +func (x *Queue) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Queue.ProtoReflect.Descriptor instead. +func (*Queue) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_queue_proto_rawDescGZIP(), []int{0} +} + +func (x *Queue) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *Queue) GetTargetType() isQueue_TargetType { + if m != nil { + return m.TargetType + } + return nil +} + +func (x *Queue) GetAppEngineHttpTarget() *AppEngineHttpTarget { + if x, ok := x.GetTargetType().(*Queue_AppEngineHttpTarget); ok { + return x.AppEngineHttpTarget + } + return nil +} + +func (x *Queue) GetPullTarget() *PullTarget { + if x, ok := x.GetTargetType().(*Queue_PullTarget); ok { + return x.PullTarget + } + return nil +} + +func (x *Queue) GetRateLimits() *RateLimits { + if x != nil { + return x.RateLimits + } + return nil +} + +func (x *Queue) GetRetryConfig() *RetryConfig { + if x != nil { + return x.RetryConfig + } + return nil +} + +func (x *Queue) GetState() Queue_State { + if x != nil { + return x.State + } + return Queue_STATE_UNSPECIFIED +} + +func (x *Queue) GetPurgeTime() *timestamppb.Timestamp { + if x != nil { + return x.PurgeTime + } + return nil +} + +func (x *Queue) GetTaskTtl() *durationpb.Duration { + if x != nil { + return x.TaskTtl + } + return nil +} + +func (x *Queue) GetTombstoneTtl() *durationpb.Duration { + if x != nil { + return x.TombstoneTtl + } + return nil +} + +func (x *Queue) GetStats() *QueueStats { + if x != nil { + return x.Stats + } + return nil +} + +type isQueue_TargetType interface { + isQueue_TargetType() +} + +type Queue_AppEngineHttpTarget struct { + // App Engine HTTP target. + // + // An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + AppEngineHttpTarget *AppEngineHttpTarget `protobuf:"bytes,3,opt,name=app_engine_http_target,json=appEngineHttpTarget,proto3,oneof"` +} + +type Queue_PullTarget struct { + // Pull target. + // + // A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + PullTarget *PullTarget `protobuf:"bytes,4,opt,name=pull_target,json=pullTarget,proto3,oneof"` +} + +func (*Queue_AppEngineHttpTarget) isQueue_TargetType() {} + +func (*Queue_PullTarget) isQueue_TargetType() {} + +// Rate limits. +// +// This message determines the maximum rate that tasks can be dispatched by a +// queue, regardless of whether the dispatch is a first task attempt or a retry. +// +// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. +type RateLimits struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum rate at which tasks are dispatched from this queue. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // - For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum allowed value + // is 500. + // - This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + // `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are allowed per pull queue. + // + // This field has the same meaning as + // [rate in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + MaxTasksDispatchedPerSecond float64 `protobuf:"fixed64,1,opt,name=max_tasks_dispatched_per_second,json=maxTasksDispatchedPerSecond,proto3" json:"max_tasks_dispatched_per_second,omitempty"` + // The max burst size. + // + // Max burst size limits how fast tasks in queue are processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + // algorithm is used to control the rate of task dispatches. Each + // queue has a token bucket that holds tokens, up to the maximum + // specified by `max_burst_size`. Each time a task is dispatched, a + // token is removed from the bucket. Tasks will be dispatched until + // the queue's bucket runs out of tokens. The bucket will be + // continuously refilled with new tokens based on + // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + // + // The default value of `max_burst_size` is picked by Cloud Tasks + // based on the value of + // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + // + // The maximum value of `max_burst_size` is 500. + // + // For App Engine queues that were created or updated using + // `queue.yaml/xml`, `max_burst_size` is equal to + // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + // If + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue without + // explicitly setting a value for `max_burst_size`, + // `max_burst_size` value will get updated if + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is updating + // [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + MaxBurstSize int32 `protobuf:"varint,2,opt,name=max_burst_size,json=maxBurstSize,proto3" json:"max_burst_size,omitempty"` + // The maximum number of concurrent tasks that Cloud Tasks allows + // to be dispatched for this queue. After this threshold has been + // reached, Cloud Tasks stops dispatching tasks until the number of + // concurrent requests decreases. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // The maximum allowed value is 5,000. + // + // This field is output only for + // [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which indicates no limit. No other + // queue types can have `max_concurrent_tasks` set to -1. + // + // This field has the same meaning as + // [max_concurrent_requests in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + MaxConcurrentTasks int32 `protobuf:"varint,3,opt,name=max_concurrent_tasks,json=maxConcurrentTasks,proto3" json:"max_concurrent_tasks,omitempty"` +} + +func (x *RateLimits) Reset() { + *x = RateLimits{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimits) ProtoMessage() {} + +func (x *RateLimits) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimits.ProtoReflect.Descriptor instead. +func (*RateLimits) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_queue_proto_rawDescGZIP(), []int{1} +} + +func (x *RateLimits) GetMaxTasksDispatchedPerSecond() float64 { + if x != nil { + return x.MaxTasksDispatchedPerSecond + } + return 0 +} + +func (x *RateLimits) GetMaxBurstSize() int32 { + if x != nil { + return x.MaxBurstSize + } + return 0 +} + +func (x *RateLimits) GetMaxConcurrentTasks() int32 { + if x != nil { + return x.MaxConcurrentTasks + } + return 0 +} + +// Retry config. +// +// These settings determine how a failed task attempt is retried. +type RetryConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of attempts per task. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field has the same meaning as + // [task_retry_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + // + // Types that are assignable to NumAttempts: + // + // *RetryConfig_MaxAttempts + // *RetryConfig_UnlimitedAttempts + NumAttempts isRetryConfig_NumAttempts `protobuf_oneof:"num_attempts"` + // If positive, `max_retry_duration` specifies the time limit for + // retrying a failed task, measured from when the task was first + // attempted. Once `max_retry_duration` time has passed *and* the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times, no further attempts will be made and the task will be + // deleted. + // + // If zero, then the task age is unlimited. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // + // `max_retry_duration` will be truncated to the nearest second. + // + // This field has the same meaning as + // [task_age_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxRetryDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=max_retry_duration,json=maxRetryDuration,proto3" json:"max_retry_duration,omitempty"` + // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // + // `min_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [min_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MinBackoff *durationpb.Duration `protobuf:"bytes,4,opt,name=min_backoff,json=minBackoff,proto3" json:"min_backoff,omitempty"` + // A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // + // `max_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [max_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxBackoff *durationpb.Duration `protobuf:"bytes,5,opt,name=max_backoff,json=maxBackoff,proto3" json:"max_backoff,omitempty"` + // The time between retries will double `max_doublings` times. + // + // A task's retry interval starts at + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries at intervals of + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + // + // For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and + // `max_doublings` is 3, then the a task will first be retried in + // 10s. The retry interval will double three times, and then + // increase linearly by 2^3 * 10s. Finally, the task will retry at + // intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, + // 240s, 300s, 300s, .... + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. + // + // This field has the same meaning as + // [max_doublings in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxDoublings int32 `protobuf:"varint,6,opt,name=max_doublings,json=maxDoublings,proto3" json:"max_doublings,omitempty"` +} + +func (x *RetryConfig) Reset() { + *x = RetryConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RetryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryConfig) ProtoMessage() {} + +func (x *RetryConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryConfig.ProtoReflect.Descriptor instead. +func (*RetryConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_queue_proto_rawDescGZIP(), []int{2} +} + +func (m *RetryConfig) GetNumAttempts() isRetryConfig_NumAttempts { + if m != nil { + return m.NumAttempts + } + return nil +} + +func (x *RetryConfig) GetMaxAttempts() int32 { + if x, ok := x.GetNumAttempts().(*RetryConfig_MaxAttempts); ok { + return x.MaxAttempts + } + return 0 +} + +func (x *RetryConfig) GetUnlimitedAttempts() bool { + if x, ok := x.GetNumAttempts().(*RetryConfig_UnlimitedAttempts); ok { + return x.UnlimitedAttempts + } + return false +} + +func (x *RetryConfig) GetMaxRetryDuration() *durationpb.Duration { + if x != nil { + return x.MaxRetryDuration + } + return nil +} + +func (x *RetryConfig) GetMinBackoff() *durationpb.Duration { + if x != nil { + return x.MinBackoff + } + return nil +} + +func (x *RetryConfig) GetMaxBackoff() *durationpb.Duration { + if x != nil { + return x.MaxBackoff + } + return nil +} + +func (x *RetryConfig) GetMaxDoublings() int32 { + if x != nil { + return x.MaxDoublings + } + return 0 +} + +type isRetryConfig_NumAttempts interface { + isRetryConfig_NumAttempts() +} + +type RetryConfig_MaxAttempts struct { + // The maximum number of attempts for a task. + // + // Cloud Tasks will attempt the task `max_attempts` times (that + // is, if the first attempt fails, then there will be + // `max_attempts - 1` retries). Must be > 0. + MaxAttempts int32 `protobuf:"varint,1,opt,name=max_attempts,json=maxAttempts,proto3,oneof"` +} + +type RetryConfig_UnlimitedAttempts struct { + // If true, then the number of attempts is unlimited. + UnlimitedAttempts bool `protobuf:"varint,2,opt,name=unlimited_attempts,json=unlimitedAttempts,proto3,oneof"` +} + +func (*RetryConfig_MaxAttempts) isRetryConfig_NumAttempts() {} + +func (*RetryConfig_UnlimitedAttempts) isRetryConfig_NumAttempts() {} + +// Statistics for a queue. +type QueueStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. An estimation of the number of tasks in the queue, that is, the tasks in + // the queue that haven't been executed, the tasks in the queue which the + // queue has dispatched but has not yet received a reply for, and the failed + // tasks that the queue is retrying. + TasksCount int64 `protobuf:"varint,1,opt,name=tasks_count,json=tasksCount,proto3" json:"tasks_count,omitempty"` + // Output only. An estimation of the nearest time in the future where a task in the queue + // is scheduled to be executed. + OldestEstimatedArrivalTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=oldest_estimated_arrival_time,json=oldestEstimatedArrivalTime,proto3" json:"oldest_estimated_arrival_time,omitempty"` + // Output only. The number of tasks that the queue has dispatched and received a reply for + // during the last minute. This variable counts both successful and + // non-successful executions. + ExecutedLastMinuteCount int64 `protobuf:"varint,3,opt,name=executed_last_minute_count,json=executedLastMinuteCount,proto3" json:"executed_last_minute_count,omitempty"` + // Output only. The number of requests that the queue has dispatched but has not received + // a reply for yet. + ConcurrentDispatchesCount int64 `protobuf:"varint,4,opt,name=concurrent_dispatches_count,json=concurrentDispatchesCount,proto3" json:"concurrent_dispatches_count,omitempty"` + // Output only. The current maximum number of tasks per second executed by the queue. + // The maximum value of this variable is controlled by the RateLimits of the + // Queue. However, this value could be less to avoid overloading the endpoints + // tasks in the queue are targeting. + EffectiveExecutionRate float64 `protobuf:"fixed64,5,opt,name=effective_execution_rate,json=effectiveExecutionRate,proto3" json:"effective_execution_rate,omitempty"` +} + +func (x *QueueStats) Reset() { + *x = QueueStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueueStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueueStats) ProtoMessage() {} + +func (x *QueueStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueueStats.ProtoReflect.Descriptor instead. +func (*QueueStats) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_queue_proto_rawDescGZIP(), []int{3} +} + +func (x *QueueStats) GetTasksCount() int64 { + if x != nil { + return x.TasksCount + } + return 0 +} + +func (x *QueueStats) GetOldestEstimatedArrivalTime() *timestamppb.Timestamp { + if x != nil { + return x.OldestEstimatedArrivalTime + } + return nil +} + +func (x *QueueStats) GetExecutedLastMinuteCount() int64 { + if x != nil { + return x.ExecutedLastMinuteCount + } + return 0 +} + +func (x *QueueStats) GetConcurrentDispatchesCount() int64 { + if x != nil { + return x.ConcurrentDispatchesCount + } + return 0 +} + +func (x *QueueStats) GetEffectiveExecutionRate() float64 { + if x != nil { + return x.EffectiveExecutionRate + } + return 0 +} + +var File_google_cloud_tasks_v2beta2_queue_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta2_queue_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x06, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x61, 0x70, 0x70, 0x5f, + 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, + 0x74, 0x74, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x00, 0x52, 0x13, 0x61, 0x70, 0x70, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x12, 0x49, 0x0a, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x00, 0x52, + 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x39, 0x0a, 0x0a, 0x70, 0x75, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x70, 0x75, 0x72, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x74, 0x6c, + 0x12, 0x3e, 0x0a, 0x0d, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x74, + 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x54, 0x74, 0x6c, + 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x5c, 0xea, 0x41, 0x59, 0x0a, + 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x12, 0x36, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, + 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x1f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x1b, 0x6d, 0x61, 0x78, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x64, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0e, + 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x72, 0x73, 0x74, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x22, 0xd9, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, + 0x78, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x12, 0x75, 0x6e, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x11, 0x75, 0x6e, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x6d, 0x61, + 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, + 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, + 0x3a, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x6d, + 0x61, 0x78, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x0e, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, + 0x22, 0xdc, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x24, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x1d, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, + 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, + 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1a, 0x6f, + 0x6c, 0x64, 0x65, 0x73, 0x74, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x41, 0x72, + 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x1a, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, + 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x17, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x4c, 0x61, 0x73, 0x74, + 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1b, 0x63, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x3d, 0x0a, 0x18, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x42, + 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta2_queue_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta2_queue_proto_rawDescData = file_google_cloud_tasks_v2beta2_queue_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta2_queue_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta2_queue_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta2_queue_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta2_queue_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta2_queue_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta2_queue_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_tasks_v2beta2_queue_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_tasks_v2beta2_queue_proto_goTypes = []interface{}{ + (Queue_State)(0), // 0: google.cloud.tasks.v2beta2.Queue.State + (*Queue)(nil), // 1: google.cloud.tasks.v2beta2.Queue + (*RateLimits)(nil), // 2: google.cloud.tasks.v2beta2.RateLimits + (*RetryConfig)(nil), // 3: google.cloud.tasks.v2beta2.RetryConfig + (*QueueStats)(nil), // 4: google.cloud.tasks.v2beta2.QueueStats + (*AppEngineHttpTarget)(nil), // 5: google.cloud.tasks.v2beta2.AppEngineHttpTarget + (*PullTarget)(nil), // 6: google.cloud.tasks.v2beta2.PullTarget + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 8: google.protobuf.Duration +} +var file_google_cloud_tasks_v2beta2_queue_proto_depIdxs = []int32{ + 5, // 0: google.cloud.tasks.v2beta2.Queue.app_engine_http_target:type_name -> google.cloud.tasks.v2beta2.AppEngineHttpTarget + 6, // 1: google.cloud.tasks.v2beta2.Queue.pull_target:type_name -> google.cloud.tasks.v2beta2.PullTarget + 2, // 2: google.cloud.tasks.v2beta2.Queue.rate_limits:type_name -> google.cloud.tasks.v2beta2.RateLimits + 3, // 3: google.cloud.tasks.v2beta2.Queue.retry_config:type_name -> google.cloud.tasks.v2beta2.RetryConfig + 0, // 4: google.cloud.tasks.v2beta2.Queue.state:type_name -> google.cloud.tasks.v2beta2.Queue.State + 7, // 5: google.cloud.tasks.v2beta2.Queue.purge_time:type_name -> google.protobuf.Timestamp + 8, // 6: google.cloud.tasks.v2beta2.Queue.task_ttl:type_name -> google.protobuf.Duration + 8, // 7: google.cloud.tasks.v2beta2.Queue.tombstone_ttl:type_name -> google.protobuf.Duration + 4, // 8: google.cloud.tasks.v2beta2.Queue.stats:type_name -> google.cloud.tasks.v2beta2.QueueStats + 8, // 9: google.cloud.tasks.v2beta2.RetryConfig.max_retry_duration:type_name -> google.protobuf.Duration + 8, // 10: google.cloud.tasks.v2beta2.RetryConfig.min_backoff:type_name -> google.protobuf.Duration + 8, // 11: google.cloud.tasks.v2beta2.RetryConfig.max_backoff:type_name -> google.protobuf.Duration + 7, // 12: google.cloud.tasks.v2beta2.QueueStats.oldest_estimated_arrival_time:type_name -> google.protobuf.Timestamp + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta2_queue_proto_init() } +func file_google_cloud_tasks_v2beta2_queue_proto_init() { + if File_google_cloud_tasks_v2beta2_queue_proto != nil { + return + } + file_google_cloud_tasks_v2beta2_target_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Queue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimits); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RetryConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueueStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Queue_AppEngineHttpTarget)(nil), + (*Queue_PullTarget)(nil), + } + file_google_cloud_tasks_v2beta2_queue_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*RetryConfig_MaxAttempts)(nil), + (*RetryConfig_UnlimitedAttempts)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta2_queue_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta2_queue_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta2_queue_proto_depIdxs, + EnumInfos: file_google_cloud_tasks_v2beta2_queue_proto_enumTypes, + MessageInfos: file_google_cloud_tasks_v2beta2_queue_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta2_queue_proto = out.File + file_google_cloud_tasks_v2beta2_queue_proto_rawDesc = nil + file_google_cloud_tasks_v2beta2_queue_proto_goTypes = nil + file_google_cloud_tasks_v2beta2_queue_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go new file mode 100644 index 000000000000..e5aa8a97a2d2 --- /dev/null +++ b/cloudtasks/apiv2beta2/cloudtaskspb/target.pb.go @@ -0,0 +1,878 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta2/target.proto + +package cloudtaskspb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The HTTP method used to execute the task. +type HttpMethod int32 + +const ( + // HTTP method unspecified + HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0 + // HTTP POST + HttpMethod_POST HttpMethod = 1 + // HTTP GET + HttpMethod_GET HttpMethod = 2 + // HTTP HEAD + HttpMethod_HEAD HttpMethod = 3 + // HTTP PUT + HttpMethod_PUT HttpMethod = 4 + // HTTP DELETE + HttpMethod_DELETE HttpMethod = 5 +) + +// Enum value maps for HttpMethod. +var ( + HttpMethod_name = map[int32]string{ + 0: "HTTP_METHOD_UNSPECIFIED", + 1: "POST", + 2: "GET", + 3: "HEAD", + 4: "PUT", + 5: "DELETE", + } + HttpMethod_value = map[string]int32{ + "HTTP_METHOD_UNSPECIFIED": 0, + "POST": 1, + "GET": 2, + "HEAD": 3, + "PUT": 4, + "DELETE": 5, + } +) + +func (x HttpMethod) Enum() *HttpMethod { + p := new(HttpMethod) + *p = x + return p +} + +func (x HttpMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HttpMethod) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta2_target_proto_enumTypes[0].Descriptor() +} + +func (HttpMethod) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta2_target_proto_enumTypes[0] +} + +func (x HttpMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HttpMethod.Descriptor instead. +func (HttpMethod) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP(), []int{0} +} + +// Pull target. +type PullTarget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PullTarget) Reset() { + *x = PullTarget{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PullTarget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PullTarget) ProtoMessage() {} + +func (x *PullTarget) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PullTarget.ProtoReflect.Descriptor instead. +func (*PullTarget) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP(), []int{0} +} + +// The pull message contains data that can be used by the caller of +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. +// +// This proto can only be used for tasks in a queue which has +// [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set. +type PullMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A data payload consumed by the worker to execute the task. + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // The task's tag. + // + // Tags allow similar tasks to be processed in a batch. If you label + // tasks with a tag, your worker can + // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to + // aggregate the events associated with a specific user once a day, + // you could tag tasks with the user ID. + // + // The task's tag can only be set when the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // + // The tag must be less than 500 characters. + // + // SDK compatibility: Although the SDK allows tags to be either + // string or + // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + // encoded, the tag will be empty when the task is returned by Cloud Tasks. + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *PullMessage) Reset() { + *x = PullMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PullMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PullMessage) ProtoMessage() {} + +func (x *PullMessage) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PullMessage.ProtoReflect.Descriptor instead. +func (*PullMessage) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP(), []int{1} +} + +func (x *PullMessage) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *PullMessage) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +// App Engine HTTP target. +// +// The task will be delivered to the App Engine application hostname +// specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. +// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the +// task's host URL is constructed. +// +// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires +// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +type AppEngineHttpTarget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Overrides for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // + // If set, `app_engine_routing_override` is used for all tasks in + // the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRoutingOverride *AppEngineRouting `protobuf:"bytes,1,opt,name=app_engine_routing_override,json=appEngineRoutingOverride,proto3" json:"app_engine_routing_override,omitempty"` +} + +func (x *AppEngineHttpTarget) Reset() { + *x = AppEngineHttpTarget{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppEngineHttpTarget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppEngineHttpTarget) ProtoMessage() {} + +func (x *AppEngineHttpTarget) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppEngineHttpTarget.ProtoReflect.Descriptor instead. +func (*AppEngineHttpTarget) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP(), []int{2} +} + +func (x *AppEngineHttpTarget) GetAppEngineRoutingOverride() *AppEngineRouting { + if x != nil { + return x.AppEngineRoutingOverride + } + return nil +} + +// App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine app when +// the task is dispatched. +// +// This proto can only be used for tasks in a queue which has +// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set. +// +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires +// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the same +// project as the queue. For more information, see +// [How Requests are +// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) +// and how routing is affected by +// [dispatch +// files](https://cloud.google.com/appengine/docs/python/config/dispatchref). +// Traffic is encrypted during transport and never leaves Google datacenters. +// Because this traffic is carried over a communication mechanism internal to +// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). +// The request to the handler, however, will appear to have used the HTTP +// protocol. +// +// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is +// delivered to can be set at the queue-level or task-level: +// +// - If set, +// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] +// is used for all tasks in the queue, no matter what the setting +// is for the +// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. +// +// The `url` that the task will be sent to is: +// +// - `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+` +// [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url] +// +// Tasks can be dispatched to secure app handlers, unsecure app handlers, and +// URIs restricted with +// [`login: +// admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). +// Because tasks are not run as any user, they cannot be dispatched to URIs +// restricted with +// [`login: +// required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) +// Task dispatches also do not follow redirects. +// +// The task attempt has succeeded if the app's request handler returns an HTTP +// response code in the range [`200` - `299`]. The task attempt has failed if +// the app's handler returns a non-2xx response code or Cloud Tasks does +// not receive response before the [deadline][Task.dispatch_deadline]. Failed +// tasks will be retried according to the +// [retry configuration][google.cloud.tasks.v2beta2.Queue.retry_config]. `503` (Service Unavailable) is +// considered an App Engine system error instead of an application error and +// will cause Cloud Tasks' traffic congestion control to temporarily throttle +// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many +// Requests) response from an app handler does not cause traffic congestion +// control to throttle the queue. +type AppEngineHttpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP method to use for the request. The default is POST. + // + // The app's request handler for the task's target URL must be able to handle + // HTTP requests with this http_method, otherwise the task attempt fails with + // error code 405 (Method Not Allowed). See [Writing a push task request + // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // and the App Engine documentation for your runtime on [How Requests are + // Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + HttpMethod HttpMethod `protobuf:"varint,1,opt,name=http_method,json=httpMethod,proto3,enum=google.cloud.tasks.v2beta2.HttpMethod" json:"http_method,omitempty"` + // Task-level setting for App Engine routing. + // + // If set, + // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + // is used for all tasks in the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting *AppEngineRouting `protobuf:"bytes,2,opt,name=app_engine_routing,json=appEngineRouting,proto3" json:"app_engine_routing,omitempty"` + // The relative URL. + // + // The relative URL must begin with "/" and must be a valid HTTP relative URL. + // It can contain a path and query string arguments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + RelativeUrl string `protobuf:"bytes,3,opt,name=relative_url,json=relativeUrl,proto3" json:"relative_url,omitempty"` + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // Repeated headers are not supported but a header value can contain commas. + // + // Cloud Tasks sets some headers to default values: + // + // - `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Tasks will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // + // If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + // Tasks sets the following headers: + // + // - `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explicitly + // setting `Content-Type` to a particular media type when the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/json"`. + // - `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // In addition, Cloud Tasks sets some headers when the task is dispatched, + // such as headers containing information about the task; see + // [request + // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // These headers are set only when the task is dispatched, so they are not + // visible when the task is returned in a Cloud Tasks response. + // + // Although there is no specific limit for the maximum number of headers or + // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation. + Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Payload. + // + // The payload will be sent as the HTTP message body. A message + // body, and thus a payload, is allowed only if the HTTP method is + // POST or PUT. It is an error to set a data payload on a task with + // an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *AppEngineHttpRequest) Reset() { + *x = AppEngineHttpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppEngineHttpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppEngineHttpRequest) ProtoMessage() {} + +func (x *AppEngineHttpRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppEngineHttpRequest.ProtoReflect.Descriptor instead. +func (*AppEngineHttpRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP(), []int{3} +} + +func (x *AppEngineHttpRequest) GetHttpMethod() HttpMethod { + if x != nil { + return x.HttpMethod + } + return HttpMethod_HTTP_METHOD_UNSPECIFIED +} + +func (x *AppEngineHttpRequest) GetAppEngineRouting() *AppEngineRouting { + if x != nil { + return x.AppEngineRouting + } + return nil +} + +func (x *AppEngineHttpRequest) GetRelativeUrl() string { + if x != nil { + return x.RelativeUrl + } + return "" +} + +func (x *AppEngineHttpRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + +func (x *AppEngineHttpRequest) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// App Engine Routing. +// +// Defines routing characteristics specific to App Engine - service, version, +// and instance. +// +// For more information about services, versions, and instances see +// [An Overview of App +// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), +// and [App Engine Flex request +// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). +type AppEngineRouting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // App service. + // + // By default, the task is sent to the service which is the default + // service when the task is attempted. + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + // App version. + // + // By default, the task is sent to the version which is the default + // version when the task is attempted. + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // App instance. + // + // By default, the task is sent to an instance which is available when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request + // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + // and [App Engine Flex request + // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + Instance string `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"` + // Output only. The host that the task is sent to. + // + // For more information, see + // [How Requests are + // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + // + // The host is constructed as: + // + // - `host = [application_domain_name]`
+ // `| [service] + '.' + [application_domain_name]`
+ // `| [version] + '.' + [application_domain_name]`
+ // `| [version_dot_service]+ '.' + [application_domain_name]`
+ // `| [instance] + '.' + [application_domain_name]`
+ // `| [instance_dot_service] + '.' + [application_domain_name]`
+ // `| [instance_dot_version] + '.' + [application_domain_name]`
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + // + // - `application_domain_name` = The domain name of the app, for + // example .appspot.com, which is associated with the + // queue's project ID. Some tasks which were created using the App Engine + // SDK use a custom domain name. + // + // * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // + // - `version_dot_service =` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + // + // - `instance_dot_service =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // - `instance_dot_version =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // + // - `instance_dot_version_dot_service =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent + // to the service which is the default service when the task is attempted. + // + // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent + // to the version which is the default version when the task is attempted. + // + // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task + // will be sent to an instance which is available when the task is + // attempted. + // + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task + // will be sent to the default version of the default service when + // the task is attempted. + Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"` +} + +func (x *AppEngineRouting) Reset() { + *x = AppEngineRouting{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppEngineRouting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppEngineRouting) ProtoMessage() {} + +func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppEngineRouting.ProtoReflect.Descriptor instead. +func (*AppEngineRouting) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP(), []int{4} +} + +func (x *AppEngineRouting) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *AppEngineRouting) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *AppEngineRouting) GetInstance() string { + if x != nil { + return x.Instance + } + return "" +} + +func (x *AppEngineRouting) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +var File_google_cloud_tasks_v2beta2_target_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta2_target_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x22, 0x0c, 0x0a, 0x0a, 0x50, 0x75, 0x6c, 0x6c, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x22, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x82, + 0x01, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x6b, 0x0a, 0x1b, 0x61, 0x70, 0x70, 0x5f, 0x65, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x18, 0x61, 0x70, 0x70, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x22, 0x8d, 0x03, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0b, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x5a, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x5f, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, + 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x10, 0x61, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x55, 0x72, 0x6c, 0x12, 0x57, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x76, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x2a, 0x5b, 0x0a, 0x0a, 0x48, + 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x54, 0x54, + 0x50, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, + 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, + 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x42, 0x70, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x0b, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta2_target_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta2_target_proto_rawDescData = file_google_cloud_tasks_v2beta2_target_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta2_target_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta2_target_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta2_target_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta2_target_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta2_target_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta2_target_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_tasks_v2beta2_target_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_tasks_v2beta2_target_proto_goTypes = []interface{}{ + (HttpMethod)(0), // 0: google.cloud.tasks.v2beta2.HttpMethod + (*PullTarget)(nil), // 1: google.cloud.tasks.v2beta2.PullTarget + (*PullMessage)(nil), // 2: google.cloud.tasks.v2beta2.PullMessage + (*AppEngineHttpTarget)(nil), // 3: google.cloud.tasks.v2beta2.AppEngineHttpTarget + (*AppEngineHttpRequest)(nil), // 4: google.cloud.tasks.v2beta2.AppEngineHttpRequest + (*AppEngineRouting)(nil), // 5: google.cloud.tasks.v2beta2.AppEngineRouting + nil, // 6: google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry +} +var file_google_cloud_tasks_v2beta2_target_proto_depIdxs = []int32{ + 5, // 0: google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override:type_name -> google.cloud.tasks.v2beta2.AppEngineRouting + 0, // 1: google.cloud.tasks.v2beta2.AppEngineHttpRequest.http_method:type_name -> google.cloud.tasks.v2beta2.HttpMethod + 5, // 2: google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing:type_name -> google.cloud.tasks.v2beta2.AppEngineRouting + 6, // 3: google.cloud.tasks.v2beta2.AppEngineHttpRequest.headers:type_name -> google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta2_target_proto_init() } +func file_google_cloud_tasks_v2beta2_target_proto_init() { + if File_google_cloud_tasks_v2beta2_target_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta2_target_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PullTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_target_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PullMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_target_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppEngineHttpTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_target_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppEngineHttpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_target_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppEngineRouting); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta2_target_proto_rawDesc, + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta2_target_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta2_target_proto_depIdxs, + EnumInfos: file_google_cloud_tasks_v2beta2_target_proto_enumTypes, + MessageInfos: file_google_cloud_tasks_v2beta2_target_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta2_target_proto = out.File + file_google_cloud_tasks_v2beta2_target_proto_rawDesc = nil + file_google_cloud_tasks_v2beta2_target_proto_goTypes = nil + file_google_cloud_tasks_v2beta2_target_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go b/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go new file mode 100644 index 000000000000..0b7e1261affb --- /dev/null +++ b/cloudtasks/apiv2beta2/cloudtaskspb/task.pb.go @@ -0,0 +1,670 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta2/task.proto + +package cloudtaskspb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data. +// +// When a task is returned in a response, not all +// information is retrieved by default because some data, such as +// payloads, might be desirable to return only when needed because +// of its large size or because of the sensitivity of data that it +// contains. +type Task_View int32 + +const ( + // Unspecified. Defaults to BASIC. + Task_VIEW_UNSPECIFIED Task_View = 0 + // The basic view omits fields which can be large or can contain + // sensitive data. + // + // This view does not include the + // ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and + // [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are + // desirable to return only when needed, because they can be large + // and because of the sensitivity of the data that you choose to + // store in it. + Task_BASIC Task_View = 1 + // All information is returned. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource. + Task_FULL Task_View = 2 +) + +// Enum value maps for Task_View. +var ( + Task_View_name = map[int32]string{ + 0: "VIEW_UNSPECIFIED", + 1: "BASIC", + 2: "FULL", + } + Task_View_value = map[string]int32{ + "VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2, + } +) + +func (x Task_View) Enum() *Task_View { + p := new(Task_View) + *p = x + return p +} + +func (x Task_View) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Task_View) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta2_task_proto_enumTypes[0].Descriptor() +} + +func (Task_View) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta2_task_proto_enumTypes[0] +} + +func (x Task_View) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Task_View.Descriptor instead. +func (Task_View) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_task_proto_rawDescGZIP(), []int{0, 0} +} + +// A unit of scheduled work. +type Task struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // + // The task name. + // + // The task name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + // + // - `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // - `LOCATION_ID` is the canonical ID for the task's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // - `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // - `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. + // + // The task's payload is used by the task's target to process the task. + // A payload is valid only if it is compatible with the queue's target. + // + // Types that are assignable to PayloadType: + // + // *Task_AppEngineHttpRequest + // *Task_PullMessage + PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"` + // The time when the task is scheduled to be attempted. + // + // For App Engine queues, this is when the task will be attempted or retried. + // + // For pull queues, this is the time when the task is available to + // be leased; if a task is currently leased, this is the time when + // the current lease expires, that is, the time that the task was + // leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // Output only. The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The task status. + Status *TaskStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has + // been returned. + View Task_View `protobuf:"varint,8,opt,name=view,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"view,omitempty"` +} + +func (x *Task) Reset() { + *x = Task{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task) ProtoMessage() {} + +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_task_proto_rawDescGZIP(), []int{0} +} + +func (x *Task) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *Task) GetPayloadType() isTask_PayloadType { + if m != nil { + return m.PayloadType + } + return nil +} + +func (x *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest { + if x, ok := x.GetPayloadType().(*Task_AppEngineHttpRequest); ok { + return x.AppEngineHttpRequest + } + return nil +} + +func (x *Task) GetPullMessage() *PullMessage { + if x, ok := x.GetPayloadType().(*Task_PullMessage); ok { + return x.PullMessage + } + return nil +} + +func (x *Task) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *Task) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Task) GetStatus() *TaskStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *Task) GetView() Task_View { + if x != nil { + return x.View + } + return Task_VIEW_UNSPECIFIED +} + +type isTask_PayloadType interface { + isTask_PayloadType() +} + +type Task_AppEngineHttpRequest struct { + // App Engine HTTP request that is sent to the task's target. Can + // be set only if + // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set + // on the queue. + // + // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set. + AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"` +} + +type Task_PullMessage struct { + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be + // set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue. + // + // A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + PullMessage *PullMessage `protobuf:"bytes,4,opt,name=pull_message,json=pullMessage,proto3,oneof"` +} + +func (*Task_AppEngineHttpRequest) isTask_PayloadType() {} + +func (*Task_PullMessage) isTask_PayloadType() {} + +// Status of the task. +type TaskStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The number of attempts dispatched. + // + // This count includes attempts which have been dispatched but haven't + // received a response. + AttemptDispatchCount int32 `protobuf:"varint,1,opt,name=attempt_dispatch_count,json=attemptDispatchCount,proto3" json:"attempt_dispatch_count,omitempty"` + // Output only. The number of attempts which have received a response. + // + // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. + AttemptResponseCount int32 `protobuf:"varint,2,opt,name=attempt_response_count,json=attemptResponseCount,proto3" json:"attempt_response_count,omitempty"` + // Output only. The status of the task's first attempt. + // + // Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set. + // The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks. + // + // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. + FirstAttemptStatus *AttemptStatus `protobuf:"bytes,3,opt,name=first_attempt_status,json=firstAttemptStatus,proto3" json:"first_attempt_status,omitempty"` + // Output only. The status of the task's last attempt. + // + // This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage]. + LastAttemptStatus *AttemptStatus `protobuf:"bytes,4,opt,name=last_attempt_status,json=lastAttemptStatus,proto3" json:"last_attempt_status,omitempty"` +} + +func (x *TaskStatus) Reset() { + *x = TaskStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskStatus) ProtoMessage() {} + +func (x *TaskStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead. +func (*TaskStatus) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_task_proto_rawDescGZIP(), []int{1} +} + +func (x *TaskStatus) GetAttemptDispatchCount() int32 { + if x != nil { + return x.AttemptDispatchCount + } + return 0 +} + +func (x *TaskStatus) GetAttemptResponseCount() int32 { + if x != nil { + return x.AttemptResponseCount + } + return 0 +} + +func (x *TaskStatus) GetFirstAttemptStatus() *AttemptStatus { + if x != nil { + return x.FirstAttemptStatus + } + return nil +} + +func (x *TaskStatus) GetLastAttemptStatus() *AttemptStatus { + if x != nil { + return x.LastAttemptStatus + } + return nil +} + +// The status of a task attempt. +type AttemptStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // Output only. The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + DispatchTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"` + // Output only. The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + ResponseTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"` + // Output only. The response from the target for this attempt. + // + // If the task has not been attempted or the task is currently running + // then the response status is unset. + ResponseStatus *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` +} + +func (x *AttemptStatus) Reset() { + *x = AttemptStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttemptStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttemptStatus) ProtoMessage() {} + +func (x *AttemptStatus) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttemptStatus.ProtoReflect.Descriptor instead. +func (*AttemptStatus) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta2_task_proto_rawDescGZIP(), []int{2} +} + +func (x *AttemptStatus) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *AttemptStatus) GetDispatchTime() *timestamppb.Timestamp { + if x != nil { + return x.DispatchTime + } + return nil +} + +func (x *AttemptStatus) GetResponseTime() *timestamppb.Timestamp { + if x != nil { + return x.ResponseTime + } + return nil +} + +func (x *AttemptStatus) GetResponseStatus() *status.Status { + if x != nil { + return x.ResponseStatus + } + return nil +} + +var File_google_cloud_tasks_v2beta2_task_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta2_task_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xf9, 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x69, + 0x0a, 0x17, 0x61, 0x70, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x70, 0x70, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x14, 0x61, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x70, 0x75, 0x6c, + 0x6c, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x75, 0x6c, + 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, + 0x22, 0x31, 0x0a, 0x04, 0x56, 0x69, 0x65, 0x77, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x49, 0x45, 0x57, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, + 0x4c, 0x10, 0x02, 0x3a, 0x68, 0xea, 0x41, 0x65, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x43, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x7d, + 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x7d, 0x42, 0x0e, 0x0a, + 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb0, 0x02, + 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x16, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x61, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x14, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x14, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x12, 0x66, 0x69, 0x72, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x11, 0x6c, + 0x61, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x8f, 0x02, 0x0a, 0x0d, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x42, 0x6e, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x42, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta2_task_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta2_task_proto_rawDescData = file_google_cloud_tasks_v2beta2_task_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta2_task_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta2_task_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta2_task_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta2_task_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta2_task_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta2_task_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_tasks_v2beta2_task_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_tasks_v2beta2_task_proto_goTypes = []interface{}{ + (Task_View)(0), // 0: google.cloud.tasks.v2beta2.Task.View + (*Task)(nil), // 1: google.cloud.tasks.v2beta2.Task + (*TaskStatus)(nil), // 2: google.cloud.tasks.v2beta2.TaskStatus + (*AttemptStatus)(nil), // 3: google.cloud.tasks.v2beta2.AttemptStatus + (*AppEngineHttpRequest)(nil), // 4: google.cloud.tasks.v2beta2.AppEngineHttpRequest + (*PullMessage)(nil), // 5: google.cloud.tasks.v2beta2.PullMessage + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*status.Status)(nil), // 7: google.rpc.Status +} +var file_google_cloud_tasks_v2beta2_task_proto_depIdxs = []int32{ + 4, // 0: google.cloud.tasks.v2beta2.Task.app_engine_http_request:type_name -> google.cloud.tasks.v2beta2.AppEngineHttpRequest + 5, // 1: google.cloud.tasks.v2beta2.Task.pull_message:type_name -> google.cloud.tasks.v2beta2.PullMessage + 6, // 2: google.cloud.tasks.v2beta2.Task.schedule_time:type_name -> google.protobuf.Timestamp + 6, // 3: google.cloud.tasks.v2beta2.Task.create_time:type_name -> google.protobuf.Timestamp + 2, // 4: google.cloud.tasks.v2beta2.Task.status:type_name -> google.cloud.tasks.v2beta2.TaskStatus + 0, // 5: google.cloud.tasks.v2beta2.Task.view:type_name -> google.cloud.tasks.v2beta2.Task.View + 3, // 6: google.cloud.tasks.v2beta2.TaskStatus.first_attempt_status:type_name -> google.cloud.tasks.v2beta2.AttemptStatus + 3, // 7: google.cloud.tasks.v2beta2.TaskStatus.last_attempt_status:type_name -> google.cloud.tasks.v2beta2.AttemptStatus + 6, // 8: google.cloud.tasks.v2beta2.AttemptStatus.schedule_time:type_name -> google.protobuf.Timestamp + 6, // 9: google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time:type_name -> google.protobuf.Timestamp + 6, // 10: google.cloud.tasks.v2beta2.AttemptStatus.response_time:type_name -> google.protobuf.Timestamp + 7, // 11: google.cloud.tasks.v2beta2.AttemptStatus.response_status:type_name -> google.rpc.Status + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta2_task_proto_init() } +func file_google_cloud_tasks_v2beta2_task_proto_init() { + if File_google_cloud_tasks_v2beta2_task_proto != nil { + return + } + file_google_cloud_tasks_v2beta2_target_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_task_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta2_task_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttemptStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_tasks_v2beta2_task_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Task_AppEngineHttpRequest)(nil), + (*Task_PullMessage)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta2_task_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta2_task_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta2_task_proto_depIdxs, + EnumInfos: file_google_cloud_tasks_v2beta2_task_proto_enumTypes, + MessageInfos: file_google_cloud_tasks_v2beta2_task_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta2_task_proto = out.File + file_google_cloud_tasks_v2beta2_task_proto_rawDesc = nil + file_google_cloud_tasks_v2beta2_task_proto_goTypes = nil + file_google_cloud_tasks_v2beta2_task_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta2/doc.go b/cloudtasks/apiv2beta2/doc.go index 9c7d920d1d88..81b7ccca38de 100644 --- a/cloudtasks/apiv2beta2/doc.go +++ b/cloudtasks/apiv2beta2/doc.go @@ -19,51 +19,62 @@ // // Manages the execution of large numbers of distributed requests. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := cloudtasks.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudtasks.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := cloudtasks.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &taskspb.ListQueuesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/tasks/v2beta2#ListQueuesRequest. -// } -// it := c.ListQueues(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudtasks.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &taskspb.ListQueuesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/tasks/v2beta2#ListQueuesRequest. +// } +// it := c.ListQueues(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/cloudtasks/apiv2beta2/mock_test.go b/cloudtasks/apiv2beta2/mock_test.go deleted file mode 100644 index 306468fb8a1f..000000000000 --- a/cloudtasks/apiv2beta2/mock_test.go +++ /dev/null @@ -1,1553 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package cloudtasks - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - durationpb "github.com/golang/protobuf/ptypes/duration" - emptypb "github.com/golang/protobuf/ptypes/empty" - timestamppb "github.com/golang/protobuf/ptypes/timestamp" - "google.golang.org/api/option" - taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2" - iampb "google.golang.org/genproto/googleapis/iam/v1" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockCloudTasksServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - taskspb.CloudTasksServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockCloudTasksServer) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequest) (*taskspb.ListQueuesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.ListQueuesResponse), nil -} - -func (s *mockCloudTasksServer) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) CreateQueue(ctx context.Context, req *taskspb.CreateQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) DeleteQueue(ctx context.Context, req *taskspb.DeleteQueueRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) PurgeQueue(ctx context.Context, req *taskspb.PurgeQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) PauseQueue(ctx context.Context, req *taskspb.PauseQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockCloudTasksServer) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockCloudTasksServer) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.TestIamPermissionsResponse), nil -} - -func (s *mockCloudTasksServer) ListTasks(ctx context.Context, req *taskspb.ListTasksRequest) (*taskspb.ListTasksResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.ListTasksResponse), nil -} - -func (s *mockCloudTasksServer) GetTask(ctx context.Context, req *taskspb.GetTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) DeleteTask(ctx context.Context, req *taskspb.DeleteTaskRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) LeaseTasks(ctx context.Context, req *taskspb.LeaseTasksRequest) (*taskspb.LeaseTasksResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.LeaseTasksResponse), nil -} - -func (s *mockCloudTasksServer) AcknowledgeTask(ctx context.Context, req *taskspb.AcknowledgeTaskRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) RenewLease(ctx context.Context, req *taskspb.RenewLeaseRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) CancelLease(ctx context.Context, req *taskspb.CancelLeaseRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) RunTask(ctx context.Context, req *taskspb.RunTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockCloudTasks mockCloudTasksServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - taskspb.RegisterCloudTasksServer(serv, &mockCloudTasks) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestCloudTasksListQueues(t *testing.T) { - var nextPageToken string = "" - var queuesElement *taskspb.Queue = &taskspb.Queue{} - var queues = []*taskspb.Queue{queuesElement} - var expectedResponse = &taskspb.ListQueuesResponse{ - NextPageToken: nextPageToken, - Queues: queues, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &taskspb.ListQueuesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListQueues(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Queues[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksListQueuesError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &taskspb.ListQueuesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListQueues(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.GetQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.GetQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCreateQueue(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Queue{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.CreateQueueRequest{ - Parent: formattedParent, - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCreateQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.CreateQueueRequest{ - Parent: formattedParent, - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksUpdateQueue(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Queue{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.UpdateQueueRequest{ - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksUpdateQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.UpdateQueueRequest{ - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksDeleteQueue(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.DeleteQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksDeleteQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.DeleteQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksPurgeQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PurgeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PurgeQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksPurgeQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PurgeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PurgeQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksPauseQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PauseQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PauseQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksPauseQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PauseQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PauseQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksResumeQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ResumeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ResumeQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksResumeQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ResumeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ResumeQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksSetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksSetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksTestIamPermissions(t *testing.T) { - var expectedResponse *iampb.TestIamPermissionsResponse = &iampb.TestIamPermissionsResponse{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksTestIamPermissionsError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksListTasks(t *testing.T) { - var nextPageToken string = "" - var tasksElement *taskspb.Task = &taskspb.Task{} - var tasks = []*taskspb.Task{tasksElement} - var expectedResponse = &taskspb.ListTasksResponse{ - NextPageToken: nextPageToken, - Tasks: tasks, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ListTasksRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTasks(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Tasks[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksListTasksError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ListTasksRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTasks(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetTask(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Task{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.GetTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.GetTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCreateTask(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Task{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var task *taskspb.Task = &taskspb.Task{} - var request = &taskspb.CreateTaskRequest{ - Parent: formattedParent, - Task: task, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCreateTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var task *taskspb.Task = &taskspb.Task{} - var request = &taskspb.CreateTaskRequest{ - Parent: formattedParent, - Task: task, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksDeleteTask(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.DeleteTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksDeleteTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.DeleteTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksLeaseTasks(t *testing.T) { - var expectedResponse *taskspb.LeaseTasksResponse = &taskspb.LeaseTasksResponse{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var leaseDuration *durationpb.Duration = &durationpb.Duration{} - var request = &taskspb.LeaseTasksRequest{ - Parent: formattedParent, - LeaseDuration: leaseDuration, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.LeaseTasks(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksLeaseTasksError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var leaseDuration *durationpb.Duration = &durationpb.Duration{} - var request = &taskspb.LeaseTasksRequest{ - Parent: formattedParent, - LeaseDuration: leaseDuration, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.LeaseTasks(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksAcknowledgeTask(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var request = &taskspb.AcknowledgeTaskRequest{ - Name: formattedName, - ScheduleTime: scheduleTime, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.AcknowledgeTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksAcknowledgeTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var request = &taskspb.AcknowledgeTaskRequest{ - Name: formattedName, - ScheduleTime: scheduleTime, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.AcknowledgeTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksRenewLease(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Task{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var leaseDuration *durationpb.Duration = &durationpb.Duration{} - var request = &taskspb.RenewLeaseRequest{ - Name: formattedName, - ScheduleTime: scheduleTime, - LeaseDuration: leaseDuration, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RenewLease(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksRenewLeaseError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var leaseDuration *durationpb.Duration = &durationpb.Duration{} - var request = &taskspb.RenewLeaseRequest{ - Name: formattedName, - ScheduleTime: scheduleTime, - LeaseDuration: leaseDuration, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RenewLease(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCancelLease(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Task{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var request = &taskspb.CancelLeaseRequest{ - Name: formattedName, - ScheduleTime: scheduleTime, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CancelLease(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCancelLeaseError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var scheduleTime *timestamppb.Timestamp = ×tamppb.Timestamp{} - var request = &taskspb.CancelLeaseRequest{ - Name: formattedName, - ScheduleTime: scheduleTime, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CancelLease(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksRunTask(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Task{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.RunTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RunTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksRunTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.RunTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RunTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/cloudtasks/apiv2beta3/cloud_tasks_client.go b/cloudtasks/apiv2beta3/cloud_tasks_client.go index 6994c0c7543d..d000b2b804e3 100644 --- a/cloudtasks/apiv2beta3/cloud_tasks_client.go +++ b/cloudtasks/apiv2beta3/cloud_tasks_client.go @@ -339,7 +339,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -454,7 +455,7 @@ func (c *Client) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueReques // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.getIamPolicy +// cloudtasks.queues.getIamPolicy func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } @@ -469,7 +470,7 @@ func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReques // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.setIamPolicy +// cloudtasks.queues.setIamPolicy func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -507,7 +508,7 @@ func (c *Client) GetTask(ctx context.Context, req *taskspb.GetTaskRequest, opts // // Tasks cannot be updated after creation; there is no UpdateTask command. // -// The maximum task size is 100KB. +// The maximum task size is 100KB. func (c *Client) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) { return c.internalClient.CreateTask(ctx, req, opts...) } @@ -610,7 +611,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -695,7 +697,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -1122,8 +1124,12 @@ func (c *restClient) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequ if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } - if req.GetReadMask().GetPaths() != nil { - params.Add("readMask.paths", fmt.Sprintf("%v", req.GetReadMask().GetPaths())) + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) } baseUrl.RawQuery = params.Encode() @@ -1193,8 +1199,12 @@ func (c *restClient) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest, baseUrl.Path += fmt.Sprintf("/v2beta3/%v", req.GetName()) params := url.Values{} - if req.GetReadMask().GetPaths() != nil { - params.Add("readMask.paths", fmt.Sprintf("%v", req.GetReadMask().GetPaths())) + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, err + } + params.Add("readMask", string(readMask)) } baseUrl.RawQuery = params.Encode() @@ -1345,8 +1355,12 @@ func (c *restClient) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRe baseUrl.Path += fmt.Sprintf("/v2beta3/%v", req.GetQueue().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1651,7 +1665,7 @@ func (c *restClient) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRe // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.getIamPolicy +// cloudtasks.queues.getIamPolicy func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -1720,7 +1734,7 @@ func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRe // Google IAM (at https://cloud.google.com/iam) permission on the specified // resource parent: // -// cloudtasks.queues.setIamPolicy +// cloudtasks.queues.setIamPolicy func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -2006,7 +2020,7 @@ func (c *restClient) GetTask(ctx context.Context, req *taskspb.GetTaskRequest, o // // Tasks cannot be updated after creation; there is no UpdateTask command. // -// The maximum task size is 100KB. +// The maximum task size is 100KB. func (c *restClient) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest, opts ...gax.CallOption) (*taskspb.Task, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) diff --git a/cloudtasks/apiv2beta3/cloud_tasks_client_example_test.go b/cloudtasks/apiv2beta3/cloud_tasks_client_example_test.go index 7c5708adee55..ddd766503766 100644 --- a/cloudtasks/apiv2beta3/cloud_tasks_client_example_test.go +++ b/cloudtasks/apiv2beta3/cloud_tasks_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -51,6 +61,11 @@ func ExampleNewRESTClient() { func ExampleClient_ListQueues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +92,11 @@ func ExampleClient_ListQueues() { func ExampleClient_GetQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -97,6 +117,11 @@ func ExampleClient_GetQueue() { func ExampleClient_CreateQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -117,6 +142,11 @@ func ExampleClient_CreateQueue() { func ExampleClient_UpdateQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +167,11 @@ func ExampleClient_UpdateQueue() { func ExampleClient_DeleteQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +190,11 @@ func ExampleClient_DeleteQueue() { func ExampleClient_PurgeQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -175,6 +215,11 @@ func ExampleClient_PurgeQueue() { func ExampleClient_PauseQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -195,6 +240,11 @@ func ExampleClient_PauseQueue() { func ExampleClient_ResumeQueue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -215,6 +265,11 @@ func ExampleClient_ResumeQueue() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -235,6 +290,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -255,6 +315,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -275,6 +340,11 @@ func ExampleClient_TestIamPermissions() { func ExampleClient_ListTasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -301,6 +371,11 @@ func ExampleClient_ListTasks() { func ExampleClient_GetTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +396,11 @@ func ExampleClient_GetTask() { func ExampleClient_CreateTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -341,6 +421,11 @@ func ExampleClient_CreateTask() { func ExampleClient_DeleteTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -359,6 +444,11 @@ func ExampleClient_DeleteTask() { func ExampleClient_RunTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cloudtasks.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go new file mode 100644 index 000000000000..2b6fc2f3d203 --- /dev/null +++ b/cloudtasks/apiv2beta3/cloudtaskspb/cloudtasks.pb.go @@ -0,0 +1,2636 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta3/cloudtasks.proto + +package cloudtaskspb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + v1 "google.golang.org/genproto/googleapis/iam/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. +type ListQueuesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location name. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta3.Queue] + // field can be used as a filter and several operators as supported. + // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as + // described in + // [Stackdriver's Advanced Logs + // Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + // + // Sample filter "state: PAUSED". + // + // Note that using filters might cause fewer queues than the + // requested page_size to be returned. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Requested page size. + // + // The maximum page size is 9800. If unspecified, the page size will + // be the maximum. Fewer queues than requested might be returned, + // even if more queues exist; use the + // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] in the + // response to determine if more queues exist. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while iterating through pages. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *ListQueuesRequest) Reset() { + *x = ListQueuesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListQueuesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQueuesRequest) ProtoMessage() {} + +func (x *ListQueuesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListQueuesRequest.ProtoReflect.Descriptor instead. +func (*ListQueuesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{0} +} + +func (x *ListQueuesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListQueuesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListQueuesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListQueuesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListQueuesRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. +type ListQueuesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of queues. + Queues []*Queue `protobuf:"bytes,1,rep,name=queues,proto3" json:"queues,omitempty"` + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this value as the + // [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListQueuesResponse) Reset() { + *x = ListQueuesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListQueuesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListQueuesResponse) ProtoMessage() {} + +func (x *ListQueuesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListQueuesResponse.ProtoReflect.Descriptor instead. +func (*ListQueuesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{1} +} + +func (x *ListQueuesResponse) GetQueues() []*Queue { + if x != nil { + return x.Queues + } + return nil +} + +func (x *ListQueuesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue]. +type GetQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the queue. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Read mask is used for a more granular control over what the API returns. + // If the mask is not present all fields will be returned except + // [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + // specified in the mask. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *GetQueueRequest) Reset() { + *x = GetQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQueueRequest) ProtoMessage() {} + +func (x *GetQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQueueRequest.ProtoReflect.Descriptor instead. +func (*GetQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{2} +} + +func (x *GetQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetQueueRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. +type CreateQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location name in which the queue will be created. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + // + // The list of allowed locations can be obtained by calling Cloud + // Tasks' implementation of + // [ListLocations][google.cloud.location.Locations.ListLocations]. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The queue to create. + // + // [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. + Queue *Queue `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"` +} + +func (x *CreateQueueRequest) Reset() { + *x = CreateQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateQueueRequest) ProtoMessage() {} + +func (x *CreateQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateQueueRequest.ProtoReflect.Descriptor instead. +func (*CreateQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateQueueRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateQueueRequest) GetQueue() *Queue { + if x != nil { + return x.Queue + } + return nil +} + +// Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue]. +type UpdateQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue to create or update. + // + // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be specified. + // + // Output only fields cannot be modified using UpdateQueue. + // Any value specified for an output only field will be ignored. + // The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be changed. + Queue *Queue `protobuf:"bytes,1,opt,name=queue,proto3" json:"queue,omitempty"` + // A mask used to specify which fields of the queue are being updated. + // + // If empty, then all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateQueueRequest) Reset() { + *x = UpdateQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateQueueRequest) ProtoMessage() {} + +func (x *UpdateQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateQueueRequest.ProtoReflect.Descriptor instead. +func (*UpdateQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateQueueRequest) GetQueue() *Queue { + if x != nil { + return x.Queue + } + return nil +} + +func (x *UpdateQueueRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. +type DeleteQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteQueueRequest) Reset() { + *x = DeleteQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQueueRequest) ProtoMessage() {} + +func (x *DeleteQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteQueueRequest.ProtoReflect.Descriptor instead. +func (*DeleteQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue]. +type PurgeQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PurgeQueueRequest) Reset() { + *x = PurgeQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PurgeQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PurgeQueueRequest) ProtoMessage() {} + +func (x *PurgeQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PurgeQueueRequest.ProtoReflect.Descriptor instead. +func (*PurgeQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{6} +} + +func (x *PurgeQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue]. +type PauseQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PauseQueueRequest) Reset() { + *x = PauseQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PauseQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseQueueRequest) ProtoMessage() {} + +func (x *PauseQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseQueueRequest.ProtoReflect.Descriptor instead. +func (*PauseQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{7} +} + +func (x *PauseQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. +type ResumeQueueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ResumeQueueRequest) Reset() { + *x = ResumeQueueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResumeQueueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeQueueRequest) ProtoMessage() {} + +func (x *ResumeQueueRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeQueueRequest.ProtoReflect.Descriptor instead. +func (*ResumeQueueRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{8} +} + +func (x *ResumeQueueRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. +type ListTasksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"response_view,omitempty"` + // Maximum page size. + // + // Fewer tasks than requested might be returned, even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] in the response to + // determine if more tasks exist. + // + // The maximum page size is 1000. If unspecified, the page size will be the + // maximum. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] + // method. + // + // The page token is valid for only 2 hours. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTasksRequest) Reset() { + *x = ListTasksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksRequest) ProtoMessage() {} + +func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead. +func (*ListTasksRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{9} +} + +func (x *ListTasksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTasksRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +func (x *ListTasksRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTasksRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. +type ListTasksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of tasks. + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this value as the + // [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTasksResponse) Reset() { + *x = ListTasksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTasksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTasksResponse) ProtoMessage() {} + +func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTasksResponse.ProtoReflect.Descriptor instead. +func (*ListTasksResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{10} +} + +func (x *ListTasksResponse) GetTasks() []*Task { + if x != nil { + return x.Tasks + } + return nil +} + +func (x *ListTasksResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. +type GetTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"response_view,omitempty"` +} + +func (x *GetTaskRequest) Reset() { + *x = GetTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTaskRequest) ProtoMessage() {} + +func (x *GetTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead. +func (*GetTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{11} +} + +func (x *GetTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetTaskRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. +type CreateTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The task to add. + // + // Task names have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + // The user can optionally specify a task [name][google.cloud.tasks.v2beta3.Task.name]. If a + // name is not specified then the system will generate a random + // unique task id, which will be set in the task returned in the + // [response][google.cloud.tasks.v2beta3.Task.name]. + // + // If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. + // + // Task De-duplication: + // + // Explicitly specifying a task ID enables task de-duplication. If + // a task's ID is identical to that of an existing task or a task + // that was deleted or executed recently then the call will fail + // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + // If the task's queue was created using Cloud Tasks, then another task with + // the same name can't be created for ~1hour after the original task was + // deleted or executed. If the task's queue was created using queue.yaml or + // queue.xml, then another task with the same name can't be created + // for ~9days after the original task was deleted or executed. + // + // Because there is an extra lookup cost to identify duplicate task + // names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly + // increased latency. Using hashed strings for the task id or for + // the prefix of the task id is recommended. Choosing task ids that + // are sequential or have sequential prefixes, for example using a + // timestamp, causes an increase in latency and error rates in all + // task commands. The infrastructure relies on an approximately + // uniform distribution of task ids to store and serve tasks + // efficiently. + Task *Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + ResponseView Task_View `protobuf:"varint,3,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"response_view,omitempty"` +} + +func (x *CreateTaskRequest) Reset() { + *x = CreateTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTaskRequest) ProtoMessage() {} + +func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTaskRequest.ProtoReflect.Descriptor instead. +func (*CreateTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateTaskRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTaskRequest) GetTask() *Task { + if x != nil { + return x.Task + } + return nil +} + +func (x *CreateTaskRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for deleting a task using +// [DeleteTask][google.cloud.tasks.v2beta3.CloudTasks.DeleteTask]. +type DeleteTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteTaskRequest) Reset() { + *x = DeleteTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTaskRequest) ProtoMessage() {} + +func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTaskRequest.ProtoReflect.Descriptor instead. +func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for forcing a task to run now using +// [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask]. +type RunTaskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Task][google.cloud.tasks.v2beta3.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"response_view,omitempty"` +} + +func (x *RunTaskRequest) Reset() { + *x = RunTaskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunTaskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunTaskRequest) ProtoMessage() {} + +func (x *RunTaskRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunTaskRequest.ProtoReflect.Descriptor instead. +func (*RunTaskRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP(), []int{14} +} + +func (x *RunTaskRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RunTaskRequest) GetResponseView() Task_View { + if x != nil { + return x.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +var File_google_cloud_tasks_v2beta3_cloudtasks_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x61, 0x6d, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, + 0x77, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x21, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x72, 0x65, 0x61, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x72, + 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x93, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x3c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x22, 0x8f, 0x01, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, + 0x51, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x11, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, 0x65, + 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, + 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, + 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x21, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x4a, + 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x04, + 0x74, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, + 0x69, 0x65, 0x77, 0x22, 0x4f, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x76, 0x69, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, + 0x77, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x56, 0x69, 0x65, 0x77, 0x32, + 0xa5, 0x16, 0x0a, 0x0a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0xad, + 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x12, 0x2d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x71, + 0x75, 0x65, 0x75, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x9a, + 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x0b, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x4d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x2f, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x3a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0xda, 0x41, + 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0xba, 0x01, + 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x32, 0x35, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0xda, 0x41, 0x11, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2c, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x0a, 0x50, 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, + 0x75, 0x72, 0x67, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x75, 0x72, + 0x67, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa7, 0x01, 0x0a, + 0x0a, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x47, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x61, 0x75, 0x73, 0x65, 0x3a, 0x01, 0x2a, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3b, 0x22, 0x36, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, + 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x22, 0x40, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, + 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, + 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x22, 0x40, 0x2f, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, + 0xda, 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0xd3, 0x01, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, + 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x68, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4b, 0x22, 0x46, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x74, 0x65, 0x73, 0x74, + 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, + 0x2a, 0xda, 0x41, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x9f, 0x01, + 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, + 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, + 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x74, 0x61, 0x73, + 0x6b, 0x12, 0x9b, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, + 0x37, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0xa6, 0x01, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x40, 0x22, 0x3b, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x75, 0x6e, 0x3a, 0x01, + 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x7c, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0f, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, + 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0xa2, 0x02, 0x05, + 0x54, 0x41, 0x53, 0x4b, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescData = file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_google_cloud_tasks_v2beta3_cloudtasks_proto_goTypes = []interface{}{ + (*ListQueuesRequest)(nil), // 0: google.cloud.tasks.v2beta3.ListQueuesRequest + (*ListQueuesResponse)(nil), // 1: google.cloud.tasks.v2beta3.ListQueuesResponse + (*GetQueueRequest)(nil), // 2: google.cloud.tasks.v2beta3.GetQueueRequest + (*CreateQueueRequest)(nil), // 3: google.cloud.tasks.v2beta3.CreateQueueRequest + (*UpdateQueueRequest)(nil), // 4: google.cloud.tasks.v2beta3.UpdateQueueRequest + (*DeleteQueueRequest)(nil), // 5: google.cloud.tasks.v2beta3.DeleteQueueRequest + (*PurgeQueueRequest)(nil), // 6: google.cloud.tasks.v2beta3.PurgeQueueRequest + (*PauseQueueRequest)(nil), // 7: google.cloud.tasks.v2beta3.PauseQueueRequest + (*ResumeQueueRequest)(nil), // 8: google.cloud.tasks.v2beta3.ResumeQueueRequest + (*ListTasksRequest)(nil), // 9: google.cloud.tasks.v2beta3.ListTasksRequest + (*ListTasksResponse)(nil), // 10: google.cloud.tasks.v2beta3.ListTasksResponse + (*GetTaskRequest)(nil), // 11: google.cloud.tasks.v2beta3.GetTaskRequest + (*CreateTaskRequest)(nil), // 12: google.cloud.tasks.v2beta3.CreateTaskRequest + (*DeleteTaskRequest)(nil), // 13: google.cloud.tasks.v2beta3.DeleteTaskRequest + (*RunTaskRequest)(nil), // 14: google.cloud.tasks.v2beta3.RunTaskRequest + (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask + (*Queue)(nil), // 16: google.cloud.tasks.v2beta3.Queue + (Task_View)(0), // 17: google.cloud.tasks.v2beta3.Task.View + (*Task)(nil), // 18: google.cloud.tasks.v2beta3.Task + (*v1.GetIamPolicyRequest)(nil), // 19: google.iam.v1.GetIamPolicyRequest + (*v1.SetIamPolicyRequest)(nil), // 20: google.iam.v1.SetIamPolicyRequest + (*v1.TestIamPermissionsRequest)(nil), // 21: google.iam.v1.TestIamPermissionsRequest + (*emptypb.Empty)(nil), // 22: google.protobuf.Empty + (*v1.Policy)(nil), // 23: google.iam.v1.Policy + (*v1.TestIamPermissionsResponse)(nil), // 24: google.iam.v1.TestIamPermissionsResponse +} +var file_google_cloud_tasks_v2beta3_cloudtasks_proto_depIdxs = []int32{ + 15, // 0: google.cloud.tasks.v2beta3.ListQueuesRequest.read_mask:type_name -> google.protobuf.FieldMask + 16, // 1: google.cloud.tasks.v2beta3.ListQueuesResponse.queues:type_name -> google.cloud.tasks.v2beta3.Queue + 15, // 2: google.cloud.tasks.v2beta3.GetQueueRequest.read_mask:type_name -> google.protobuf.FieldMask + 16, // 3: google.cloud.tasks.v2beta3.CreateQueueRequest.queue:type_name -> google.cloud.tasks.v2beta3.Queue + 16, // 4: google.cloud.tasks.v2beta3.UpdateQueueRequest.queue:type_name -> google.cloud.tasks.v2beta3.Queue + 15, // 5: google.cloud.tasks.v2beta3.UpdateQueueRequest.update_mask:type_name -> google.protobuf.FieldMask + 17, // 6: google.cloud.tasks.v2beta3.ListTasksRequest.response_view:type_name -> google.cloud.tasks.v2beta3.Task.View + 18, // 7: google.cloud.tasks.v2beta3.ListTasksResponse.tasks:type_name -> google.cloud.tasks.v2beta3.Task + 17, // 8: google.cloud.tasks.v2beta3.GetTaskRequest.response_view:type_name -> google.cloud.tasks.v2beta3.Task.View + 18, // 9: google.cloud.tasks.v2beta3.CreateTaskRequest.task:type_name -> google.cloud.tasks.v2beta3.Task + 17, // 10: google.cloud.tasks.v2beta3.CreateTaskRequest.response_view:type_name -> google.cloud.tasks.v2beta3.Task.View + 17, // 11: google.cloud.tasks.v2beta3.RunTaskRequest.response_view:type_name -> google.cloud.tasks.v2beta3.Task.View + 0, // 12: google.cloud.tasks.v2beta3.CloudTasks.ListQueues:input_type -> google.cloud.tasks.v2beta3.ListQueuesRequest + 2, // 13: google.cloud.tasks.v2beta3.CloudTasks.GetQueue:input_type -> google.cloud.tasks.v2beta3.GetQueueRequest + 3, // 14: google.cloud.tasks.v2beta3.CloudTasks.CreateQueue:input_type -> google.cloud.tasks.v2beta3.CreateQueueRequest + 4, // 15: google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue:input_type -> google.cloud.tasks.v2beta3.UpdateQueueRequest + 5, // 16: google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue:input_type -> google.cloud.tasks.v2beta3.DeleteQueueRequest + 6, // 17: google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue:input_type -> google.cloud.tasks.v2beta3.PurgeQueueRequest + 7, // 18: google.cloud.tasks.v2beta3.CloudTasks.PauseQueue:input_type -> google.cloud.tasks.v2beta3.PauseQueueRequest + 8, // 19: google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue:input_type -> google.cloud.tasks.v2beta3.ResumeQueueRequest + 19, // 20: google.cloud.tasks.v2beta3.CloudTasks.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest + 20, // 21: google.cloud.tasks.v2beta3.CloudTasks.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest + 21, // 22: google.cloud.tasks.v2beta3.CloudTasks.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest + 9, // 23: google.cloud.tasks.v2beta3.CloudTasks.ListTasks:input_type -> google.cloud.tasks.v2beta3.ListTasksRequest + 11, // 24: google.cloud.tasks.v2beta3.CloudTasks.GetTask:input_type -> google.cloud.tasks.v2beta3.GetTaskRequest + 12, // 25: google.cloud.tasks.v2beta3.CloudTasks.CreateTask:input_type -> google.cloud.tasks.v2beta3.CreateTaskRequest + 13, // 26: google.cloud.tasks.v2beta3.CloudTasks.DeleteTask:input_type -> google.cloud.tasks.v2beta3.DeleteTaskRequest + 14, // 27: google.cloud.tasks.v2beta3.CloudTasks.RunTask:input_type -> google.cloud.tasks.v2beta3.RunTaskRequest + 1, // 28: google.cloud.tasks.v2beta3.CloudTasks.ListQueues:output_type -> google.cloud.tasks.v2beta3.ListQueuesResponse + 16, // 29: google.cloud.tasks.v2beta3.CloudTasks.GetQueue:output_type -> google.cloud.tasks.v2beta3.Queue + 16, // 30: google.cloud.tasks.v2beta3.CloudTasks.CreateQueue:output_type -> google.cloud.tasks.v2beta3.Queue + 16, // 31: google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue:output_type -> google.cloud.tasks.v2beta3.Queue + 22, // 32: google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue:output_type -> google.protobuf.Empty + 16, // 33: google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue:output_type -> google.cloud.tasks.v2beta3.Queue + 16, // 34: google.cloud.tasks.v2beta3.CloudTasks.PauseQueue:output_type -> google.cloud.tasks.v2beta3.Queue + 16, // 35: google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue:output_type -> google.cloud.tasks.v2beta3.Queue + 23, // 36: google.cloud.tasks.v2beta3.CloudTasks.GetIamPolicy:output_type -> google.iam.v1.Policy + 23, // 37: google.cloud.tasks.v2beta3.CloudTasks.SetIamPolicy:output_type -> google.iam.v1.Policy + 24, // 38: google.cloud.tasks.v2beta3.CloudTasks.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse + 10, // 39: google.cloud.tasks.v2beta3.CloudTasks.ListTasks:output_type -> google.cloud.tasks.v2beta3.ListTasksResponse + 18, // 40: google.cloud.tasks.v2beta3.CloudTasks.GetTask:output_type -> google.cloud.tasks.v2beta3.Task + 18, // 41: google.cloud.tasks.v2beta3.CloudTasks.CreateTask:output_type -> google.cloud.tasks.v2beta3.Task + 22, // 42: google.cloud.tasks.v2beta3.CloudTasks.DeleteTask:output_type -> google.protobuf.Empty + 18, // 43: google.cloud.tasks.v2beta3.CloudTasks.RunTask:output_type -> google.cloud.tasks.v2beta3.Task + 28, // [28:44] is the sub-list for method output_type + 12, // [12:28] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta3_cloudtasks_proto_init() } +func file_google_cloud_tasks_v2beta3_cloudtasks_proto_init() { + if File_google_cloud_tasks_v2beta3_cloudtasks_proto != nil { + return + } + file_google_cloud_tasks_v2beta3_queue_proto_init() + file_google_cloud_tasks_v2beta3_task_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListQueuesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListQueuesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PurgeQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PauseQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResumeQueueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_tasks_v2beta3_cloudtasks_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta3_cloudtasks_proto_depIdxs, + MessageInfos: file_google_cloud_tasks_v2beta3_cloudtasks_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta3_cloudtasks_proto = out.File + file_google_cloud_tasks_v2beta3_cloudtasks_proto_rawDesc = nil + file_google_cloud_tasks_v2beta3_cloudtasks_proto_goTypes = nil + file_google_cloud_tasks_v2beta3_cloudtasks_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// CloudTasksClient is the client API for CloudTasks service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type CloudTasksClient interface { + // Lists queues. + // + // Queues are returned in lexicographical order. + ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) + // Gets a queue. + GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Creates a queue. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + CreateQueue(ctx context.Context, in *CreateQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // the queue if it does exist. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + UpdateQueue(ctx context.Context, in *UpdateQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + PurgeQueue(ctx context.Context, in *PurgeQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + PauseQueue(ctx context.Context, in *PauseQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + ResumeQueue(ctx context.Context, in *ResumeQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing + // policy. + // + // Note: The Cloud Console does not check queue-level IAM permissions yet. + // Project-level permissions are required to use the Cloud Console. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the + // subset of information which is returned. + // + // The tasks may be returned in any order. The ordering may change at any + // time. + ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) + // Gets a task. + GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * The maximum task size is 100KB. + CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has executed successfully or permanently + // failed. + DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Forces a task to run now. + // + // When this method is called, Cloud Tasks will dispatch the task, even if + // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed + // task after a fix has been made or to manually force a task to be + // dispatched now. + // + // The dispatched task is returned. That is, the task that is returned + // contains the [status][Task.status] after the task is dispatched but + // before the task is received by its target. + // + // If Cloud Tasks receives a successful response from the task's + // target, then the task will be deleted; otherwise the task's + // [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + RunTask(ctx context.Context, in *RunTaskRequest, opts ...grpc.CallOption) (*Task, error) +} + +type cloudTasksClient struct { + cc grpc.ClientConnInterface +} + +func NewCloudTasksClient(cc grpc.ClientConnInterface) CloudTasksClient { + return &cloudTasksClient{cc} +} + +func (c *cloudTasksClient) ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) { + out := new(ListQueuesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/ListQueues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/GetQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CreateQueue(ctx context.Context, in *CreateQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/CreateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) UpdateQueue(ctx context.Context, in *UpdateQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/UpdateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/DeleteQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) PurgeQueue(ctx context.Context, in *PurgeQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/PurgeQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) PauseQueue(ctx context.Context, in *PauseQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/PauseQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) ResumeQueue(ctx context.Context, in *ResumeQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/ResumeQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/GetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/SetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) { + out := new(v1.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/TestIamPermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/ListTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/GetTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/CreateTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/DeleteTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) RunTask(ctx context.Context, in *RunTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta3.CloudTasks/RunTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CloudTasksServer is the server API for CloudTasks service. +type CloudTasksServer interface { + // Lists queues. + // + // Queues are returned in lexicographical order. + ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) + // Gets a queue. + GetQueue(context.Context, *GetQueueRequest) (*Queue, error) + // Creates a queue. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + CreateQueue(context.Context, *CreateQueueRequest) (*Queue, error) + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // the queue if it does exist. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + UpdateQueue(context.Context, *UpdateQueueRequest) (*Queue, error) + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and + // queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + // this method. + DeleteQueue(context.Context, *DeleteQueueRequest) (*emptypb.Empty, error) + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + PurgeQueue(context.Context, *PurgeQueueRequest) (*Queue, error) + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + PauseQueue(context.Context, *PauseQueueRequest) (*Queue, error) + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling + // Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + ResumeQueue(context.Context, *ResumeQueueRequest) (*Queue, error) + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing + // policy. + // + // Note: The Cloud Console does not check queue-level IAM permissions yet. + // Project-level permissions are required to use the Cloud Console. + // + // Authorization requires the following + // [Google IAM](https://cloud.google.com/iam) permission on the specified + // resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta3.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] controls the + // subset of information which is returned. + // + // The tasks may be returned in any order. The ordering may change at any + // time. + ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + // Gets a task. + GetTask(context.Context, *GetTaskRequest) (*Task, error) + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * The maximum task size is 100KB. + CreateTask(context.Context, *CreateTaskRequest) (*Task, error) + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has executed successfully or permanently + // failed. + DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) + // Forces a task to run now. + // + // When this method is called, Cloud Tasks will dispatch the task, even if + // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be used to retry a failed + // task after a fix has been made or to manually force a task to be + // dispatched now. + // + // The dispatched task is returned. That is, the task that is returned + // contains the [status][Task.status] after the task is dispatched but + // before the task is received by its target. + // + // If Cloud Tasks receives a successful response from the task's + // target, then the task will be deleted; otherwise the task's + // [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + RunTask(context.Context, *RunTaskRequest) (*Task, error) +} + +// UnimplementedCloudTasksServer can be embedded to have forward compatible implementations. +type UnimplementedCloudTasksServer struct { +} + +func (*UnimplementedCloudTasksServer) ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListQueues not implemented") +} +func (*UnimplementedCloudTasksServer) GetQueue(context.Context, *GetQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented") +} +func (*UnimplementedCloudTasksServer) CreateQueue(context.Context, *CreateQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQueue not implemented") +} +func (*UnimplementedCloudTasksServer) UpdateQueue(context.Context, *UpdateQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateQueue not implemented") +} +func (*UnimplementedCloudTasksServer) DeleteQueue(context.Context, *DeleteQueueRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteQueue not implemented") +} +func (*UnimplementedCloudTasksServer) PurgeQueue(context.Context, *PurgeQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method PurgeQueue not implemented") +} +func (*UnimplementedCloudTasksServer) PauseQueue(context.Context, *PauseQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseQueue not implemented") +} +func (*UnimplementedCloudTasksServer) ResumeQueue(context.Context, *ResumeQueueRequest) (*Queue, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResumeQueue not implemented") +} +func (*UnimplementedCloudTasksServer) GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (*UnimplementedCloudTasksServer) SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (*UnimplementedCloudTasksServer) TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} +func (*UnimplementedCloudTasksServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTasks not implemented") +} +func (*UnimplementedCloudTasksServer) GetTask(context.Context, *GetTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented") +} +func (*UnimplementedCloudTasksServer) CreateTask(context.Context, *CreateTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") +} +func (*UnimplementedCloudTasksServer) DeleteTask(context.Context, *DeleteTaskRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented") +} +func (*UnimplementedCloudTasksServer) RunTask(context.Context, *RunTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method RunTask not implemented") +} + +func RegisterCloudTasksServer(s *grpc.Server, srv CloudTasksServer) { + s.RegisterService(&_CloudTasks_serviceDesc, srv) +} + +func _CloudTasks_ListQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListQueuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ListQueues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/ListQueues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ListQueues(ctx, req.(*ListQueuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/GetQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetQueue(ctx, req.(*GetQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CreateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/CreateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CreateQueue(ctx, req.(*CreateQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).UpdateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/UpdateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).UpdateQueue(ctx, req.(*UpdateQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).DeleteQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/DeleteQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).DeleteQueue(ctx, req.(*DeleteQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_PurgeQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PurgeQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).PurgeQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/PurgeQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).PurgeQueue(ctx, req.(*PurgeQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_PauseQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PauseQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).PauseQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/PauseQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).PauseQueue(ctx, req.(*PauseQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_ResumeQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResumeQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ResumeQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/ResumeQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ResumeQueue(ctx, req.(*ResumeQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/GetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/SetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/TestIamPermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ListTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/ListTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ListTasks(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/GetTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetTask(ctx, req.(*GetTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CreateTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/CreateTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CreateTask(ctx, req.(*CreateTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).DeleteTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/DeleteTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).DeleteTask(ctx, req.(*DeleteTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_RunTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).RunTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta3.CloudTasks/RunTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).RunTask(ctx, req.(*RunTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _CloudTasks_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.tasks.v2beta3.CloudTasks", + HandlerType: (*CloudTasksServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListQueues", + Handler: _CloudTasks_ListQueues_Handler, + }, + { + MethodName: "GetQueue", + Handler: _CloudTasks_GetQueue_Handler, + }, + { + MethodName: "CreateQueue", + Handler: _CloudTasks_CreateQueue_Handler, + }, + { + MethodName: "UpdateQueue", + Handler: _CloudTasks_UpdateQueue_Handler, + }, + { + MethodName: "DeleteQueue", + Handler: _CloudTasks_DeleteQueue_Handler, + }, + { + MethodName: "PurgeQueue", + Handler: _CloudTasks_PurgeQueue_Handler, + }, + { + MethodName: "PauseQueue", + Handler: _CloudTasks_PauseQueue_Handler, + }, + { + MethodName: "ResumeQueue", + Handler: _CloudTasks_ResumeQueue_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _CloudTasks_GetIamPolicy_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _CloudTasks_SetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _CloudTasks_TestIamPermissions_Handler, + }, + { + MethodName: "ListTasks", + Handler: _CloudTasks_ListTasks_Handler, + }, + { + MethodName: "GetTask", + Handler: _CloudTasks_GetTask_Handler, + }, + { + MethodName: "CreateTask", + Handler: _CloudTasks_CreateTask_Handler, + }, + { + MethodName: "DeleteTask", + Handler: _CloudTasks_DeleteTask_Handler, + }, + { + MethodName: "RunTask", + Handler: _CloudTasks_RunTask_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/tasks/v2beta3/cloudtasks.proto", +} diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go new file mode 100644 index 000000000000..895aae44701e --- /dev/null +++ b/cloudtasks/apiv2beta3/cloudtaskspb/queue.pb.go @@ -0,0 +1,1152 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta3/queue.proto + +package cloudtaskspb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// State of the queue. +type Queue_State int32 + +const ( + // Unspecified state. + Queue_STATE_UNSPECIFIED Queue_State = 0 + // The queue is running. Tasks can be dispatched. + // + // If the queue was created using Cloud Tasks and the queue has + // had no activity (method calls or task dispatches) for 30 days, + // the queue may take a few minutes to re-activate. Some method + // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + // tasks may not be dispatched for a few minutes until the queue + // has been re-activated. + Queue_RUNNING Queue_State = 1 + // Tasks are paused by the user. If the queue is paused then Cloud + // Tasks will stop delivering tasks from it, but more tasks can + // still be added to it by the user. + Queue_PAUSED Queue_State = 2 + // The queue is disabled. + // + // A queue becomes `DISABLED` when + // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + // or + // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + // is uploaded which does not contain the queue. You cannot directly disable + // a queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched. + // + // To permanently delete this queue and all of its tasks, call + // [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. + Queue_DISABLED Queue_State = 3 +) + +// Enum value maps for Queue_State. +var ( + Queue_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "RUNNING", + 2: "PAUSED", + 3: "DISABLED", + } + Queue_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "PAUSED": 2, + "DISABLED": 3, + } +) + +func (x Queue_State) Enum() *Queue_State { + p := new(Queue_State) + *p = x + return p +} + +func (x Queue_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Queue_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta3_queue_proto_enumTypes[0].Descriptor() +} + +func (Queue_State) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta3_queue_proto_enumTypes[0] +} + +func (x Queue_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Queue_State.Descriptor instead. +func (Queue_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{0, 0} +} + +// The type of the queue. +type Queue_Type int32 + +const ( + // Default value. + Queue_TYPE_UNSPECIFIED Queue_Type = 0 + // A pull queue. + Queue_PULL Queue_Type = 1 + // A push queue. + Queue_PUSH Queue_Type = 2 +) + +// Enum value maps for Queue_Type. +var ( + Queue_Type_name = map[int32]string{ + 0: "TYPE_UNSPECIFIED", + 1: "PULL", + 2: "PUSH", + } + Queue_Type_value = map[string]int32{ + "TYPE_UNSPECIFIED": 0, + "PULL": 1, + "PUSH": 2, + } +) + +func (x Queue_Type) Enum() *Queue_Type { + p := new(Queue_Type) + *p = x + return p +} + +func (x Queue_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Queue_Type) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta3_queue_proto_enumTypes[1].Descriptor() +} + +func (Queue_Type) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta3_queue_proto_enumTypes[1] +} + +func (x Queue_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Queue_Type.Descriptor instead. +func (Queue_Type) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{0, 1} +} + +// A queue is a container of related tasks. Queues are configured to manage +// how those tasks are dispatched. Configurable properties include rate limits, +// retry options, queue types, and others. +type Queue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], + // after which it becomes output only. + // + // The queue name. + // + // The queue name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // - `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // - `LOCATION_ID` is the canonical ID for the queue's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // - `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are assignable to QueueType: + // + // *Queue_AppEngineHttpQueue + QueueType isQueue_QueueType `protobuf_oneof:"queue_type"` + // Rate limits for task dispatches. + // + // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are + // related because they both control task attempts. However they control task + // attempts in different ways: + // + // - [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the total rate of + // dispatches from a queue (i.e. all traffic dispatched from the + // queue, regardless of whether the dispatch is from a first + // attempt or a retry). + // - [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls what happens to + // particular a task after its first attempt fails. That is, + // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). + // + // The queue's actual dispatch rate is the result of: + // + // - Number of tasks in the queue + // - User-specified throttling: [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the + // [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + // - System throttling due to `429` (Too Many Requests) or `503` (Service + // Unavailable) responses from the worker, high error rates, or to smooth + // sudden large traffic spikes. + RateLimits *RateLimits `protobuf:"bytes,4,opt,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + // Settings that determine the retry behavior. + // + // - For tasks created using Cloud Tasks: the queue-level retry settings + // apply to all tasks in the queue that were created using Cloud Tasks. + // Retry settings cannot be set on individual tasks. + // - For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry settings + // explicitly set on the task and were created by the App Engine SDK. See + // [App Engine + // documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + RetryConfig *RetryConfig `protobuf:"bytes,5,opt,name=retry_config,json=retryConfig,proto3" json:"retry_config,omitempty"` + // Output only. The state of the queue. + // + // `state` can only be changed by calling + // [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], + // [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or uploading + // [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be used to change `state`. + State Queue_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.cloud.tasks.v2beta3.Queue_State" json:"state,omitempty"` + // Output only. The last time this queue was purged. + // + // All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] before this time + // were purged. + // + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the + // [App Engine Task Queue SDK, or the Cloud + // Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + // + // Purge time will be truncated to the nearest microsecond. Purge + // time will be unset if the queue has never been purged. + PurgeTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=purge_time,json=purgeTime,proto3" json:"purge_time,omitempty"` + // The maximum amount of time that a task will be retained in + // this queue. + // + // Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + // After a task has lived for `task_ttl`, the task will be deleted + // regardless of whether it was dispatched or not. + // + // The `task_ttl` for queues created via queue.yaml/xml is equal to the + // maximum duration because there is a + // [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + // these queues. To view the maximum valid duration, see the documentation for + // [Duration][google.protobuf.Duration]. + TaskTtl *durationpb.Duration `protobuf:"bytes,8,opt,name=task_ttl,json=taskTtl,proto3" json:"task_ttl,omitempty"` + // The task tombstone time to live (TTL). + // + // After a task is deleted or executed, the task's tombstone is + // retained for the length of time specified by `tombstone_ttl`. + // The tombstone is used by task de-duplication; another task with the same + // name can't be created until the tombstone has expired. For more information + // about task de-duplication, see the documentation for + // [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. + // + // Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + TombstoneTtl *durationpb.Duration `protobuf:"bytes,9,opt,name=tombstone_ttl,json=tombstoneTtl,proto3" json:"tombstone_ttl,omitempty"` + // Configuration options for writing logs to + // [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + // field is unset, then no logs are written. + StackdriverLoggingConfig *StackdriverLoggingConfig `protobuf:"bytes,10,opt,name=stackdriver_logging_config,json=stackdriverLoggingConfig,proto3" json:"stackdriver_logging_config,omitempty"` + // Immutable. The type of a queue (push or pull). + // + // `Queue.type` is an immutable property of the queue that is set at the queue + // creation time. When left unspecified, the default value of `PUSH` is + // selected. + Type Queue_Type `protobuf:"varint,11,opt,name=type,proto3,enum=google.cloud.tasks.v2beta3.Queue_Type" json:"type,omitempty"` + // Output only. The realtime, informational statistics for a queue. In order + // to receive the statistics the caller should include this field in the + // FieldMask. + Stats *QueueStats `protobuf:"bytes,12,opt,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *Queue) Reset() { + *x = Queue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Queue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Queue) ProtoMessage() {} + +func (x *Queue) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Queue.ProtoReflect.Descriptor instead. +func (*Queue) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{0} +} + +func (x *Queue) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *Queue) GetQueueType() isQueue_QueueType { + if m != nil { + return m.QueueType + } + return nil +} + +func (x *Queue) GetAppEngineHttpQueue() *AppEngineHttpQueue { + if x, ok := x.GetQueueType().(*Queue_AppEngineHttpQueue); ok { + return x.AppEngineHttpQueue + } + return nil +} + +func (x *Queue) GetRateLimits() *RateLimits { + if x != nil { + return x.RateLimits + } + return nil +} + +func (x *Queue) GetRetryConfig() *RetryConfig { + if x != nil { + return x.RetryConfig + } + return nil +} + +func (x *Queue) GetState() Queue_State { + if x != nil { + return x.State + } + return Queue_STATE_UNSPECIFIED +} + +func (x *Queue) GetPurgeTime() *timestamppb.Timestamp { + if x != nil { + return x.PurgeTime + } + return nil +} + +func (x *Queue) GetTaskTtl() *durationpb.Duration { + if x != nil { + return x.TaskTtl + } + return nil +} + +func (x *Queue) GetTombstoneTtl() *durationpb.Duration { + if x != nil { + return x.TombstoneTtl + } + return nil +} + +func (x *Queue) GetStackdriverLoggingConfig() *StackdriverLoggingConfig { + if x != nil { + return x.StackdriverLoggingConfig + } + return nil +} + +func (x *Queue) GetType() Queue_Type { + if x != nil { + return x.Type + } + return Queue_TYPE_UNSPECIFIED +} + +func (x *Queue) GetStats() *QueueStats { + if x != nil { + return x.Stats + } + return nil +} + +type isQueue_QueueType interface { + isQueue_QueueType() +} + +type Queue_AppEngineHttpQueue struct { + // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to + // [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + // [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by this proto. + AppEngineHttpQueue *AppEngineHttpQueue `protobuf:"bytes,3,opt,name=app_engine_http_queue,json=appEngineHttpQueue,proto3,oneof"` +} + +func (*Queue_AppEngineHttpQueue) isQueue_QueueType() {} + +// Rate limits. +// +// This message determines the maximum rate that tasks can be dispatched by a +// queue, regardless of whether the dispatch is a first task attempt or a retry. +// +// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits]. +type RateLimits struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum rate at which tasks are dispatched from this queue. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // - For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], the maximum allowed value + // is 500. + // + // This field has the same meaning as + // [rate in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + MaxDispatchesPerSecond float64 `protobuf:"fixed64,1,opt,name=max_dispatches_per_second,json=maxDispatchesPerSecond,proto3" json:"max_dispatches_per_second,omitempty"` + // The max burst size. + // + // Max burst size limits how fast tasks in queue are processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + // algorithm is used to control the rate of task dispatches. Each + // queue has a token bucket that holds tokens, up to the maximum + // specified by `max_burst_size`. Each time a task is dispatched, a + // token is removed from the bucket. Tasks will be dispatched until + // the queue's bucket runs out of tokens. The bucket will be + // continuously refilled with new tokens based on + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + // + // The default value of `max_burst_size` is picked by Cloud Tasks + // based on the value of + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + // + // The maximum value of `max_burst_size` is 500. + // + // For App Engine queues that were created or updated using + // `queue.yaml/xml`, `max_burst_size` is equal to + // [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + // If + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue without + // explicitly setting a value for `max_burst_size`, + // `max_burst_size` value will get updated if + // [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is updating + // [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + MaxBurstSize int32 `protobuf:"varint,2,opt,name=max_burst_size,json=maxBurstSize,proto3" json:"max_burst_size,omitempty"` + // The maximum number of concurrent tasks that Cloud Tasks allows + // to be dispatched for this queue. After this threshold has been + // reached, Cloud Tasks stops dispatching tasks until the number of + // concurrent requests decreases. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // The maximum allowed value is 5,000. + // + // This field has the same meaning as + // [max_concurrent_requests in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + MaxConcurrentDispatches int32 `protobuf:"varint,3,opt,name=max_concurrent_dispatches,json=maxConcurrentDispatches,proto3" json:"max_concurrent_dispatches,omitempty"` +} + +func (x *RateLimits) Reset() { + *x = RateLimits{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimits) ProtoMessage() {} + +func (x *RateLimits) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimits.ProtoReflect.Descriptor instead. +func (*RateLimits) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{1} +} + +func (x *RateLimits) GetMaxDispatchesPerSecond() float64 { + if x != nil { + return x.MaxDispatchesPerSecond + } + return 0 +} + +func (x *RateLimits) GetMaxBurstSize() int32 { + if x != nil { + return x.MaxBurstSize + } + return 0 +} + +func (x *RateLimits) GetMaxConcurrentDispatches() int32 { + if x != nil { + return x.MaxConcurrentDispatches + } + return 0 +} + +// Retry config. +// +// These settings determine when a failed task attempt is retried. +type RetryConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of attempts per task. + // + // Cloud Tasks will attempt the task `max_attempts` times (that is, if the + // first attempt fails, then there will be `max_attempts - 1` retries). Must + // be >= -1. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // -1 indicates unlimited attempts. + // + // This field has the same meaning as + // [task_retry_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxAttempts int32 `protobuf:"varint,1,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"` + // If positive, `max_retry_duration` specifies the time limit for + // retrying a failed task, measured from when the task was first + // attempted. Once `max_retry_duration` time has passed *and* the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] + // times, no further attempts will be made and the task will be + // deleted. + // + // If zero, then the task age is unlimited. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // `max_retry_duration` will be truncated to the nearest second. + // + // This field has the same meaning as + // [task_age_limit in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxRetryDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=max_retry_duration,json=maxRetryDuration,proto3" json:"max_retry_duration,omitempty"` + // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // `min_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [min_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MinBackoff *durationpb.Duration `protobuf:"bytes,3,opt,name=min_backoff,json=minBackoff,proto3" json:"min_backoff,omitempty"` + // A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // `max_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [max_backoff_seconds in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxBackoff *durationpb.Duration `protobuf:"bytes,4,opt,name=max_backoff,json=maxBackoff,proto3" json:"max_backoff,omitempty"` + // The time between retries will double `max_doublings` times. + // + // A task's retry interval starts at + // [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries at intervals of + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to + // [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + // + // For example, if [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, and + // `max_doublings` is 3, then the a task will first be retried in + // 10s. The retry interval will double three times, and then + // increase linearly by 2^3 * 10s. Finally, the task will retry at + // intervals of [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] + // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, + // 240s, 300s, 300s, .... + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field has the same meaning as + // [max_doublings in + // queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxDoublings int32 `protobuf:"varint,5,opt,name=max_doublings,json=maxDoublings,proto3" json:"max_doublings,omitempty"` +} + +func (x *RetryConfig) Reset() { + *x = RetryConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RetryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryConfig) ProtoMessage() {} + +func (x *RetryConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RetryConfig.ProtoReflect.Descriptor instead. +func (*RetryConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{2} +} + +func (x *RetryConfig) GetMaxAttempts() int32 { + if x != nil { + return x.MaxAttempts + } + return 0 +} + +func (x *RetryConfig) GetMaxRetryDuration() *durationpb.Duration { + if x != nil { + return x.MaxRetryDuration + } + return nil +} + +func (x *RetryConfig) GetMinBackoff() *durationpb.Duration { + if x != nil { + return x.MinBackoff + } + return nil +} + +func (x *RetryConfig) GetMaxBackoff() *durationpb.Duration { + if x != nil { + return x.MaxBackoff + } + return nil +} + +func (x *RetryConfig) GetMaxDoublings() int32 { + if x != nil { + return x.MaxDoublings + } + return 0 +} + +// Configuration options for writing logs to +// [Stackdriver Logging](https://cloud.google.com/logging/docs/). +type StackdriverLoggingConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the fraction of operations to write to + // [Stackdriver Logging](https://cloud.google.com/logging/docs/). + // This field may contain any value between 0.0 and 1.0, inclusive. + // 0.0 is the default and means that no operations are logged. + SamplingRatio float64 `protobuf:"fixed64,1,opt,name=sampling_ratio,json=samplingRatio,proto3" json:"sampling_ratio,omitempty"` +} + +func (x *StackdriverLoggingConfig) Reset() { + *x = StackdriverLoggingConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StackdriverLoggingConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StackdriverLoggingConfig) ProtoMessage() {} + +func (x *StackdriverLoggingConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StackdriverLoggingConfig.ProtoReflect.Descriptor instead. +func (*StackdriverLoggingConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{3} +} + +func (x *StackdriverLoggingConfig) GetSamplingRatio() float64 { + if x != nil { + return x.SamplingRatio + } + return 0 +} + +// Statistics for a queue. +type QueueStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. An estimation of the number of tasks in the queue, that is, the tasks in + // the queue that haven't been executed, the tasks in the queue which the + // queue has dispatched but has not yet received a reply for, and the failed + // tasks that the queue is retrying. + TasksCount int64 `protobuf:"varint,1,opt,name=tasks_count,json=tasksCount,proto3" json:"tasks_count,omitempty"` + // Output only. An estimation of the nearest time in the future where a task in the queue + // is scheduled to be executed. + OldestEstimatedArrivalTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=oldest_estimated_arrival_time,json=oldestEstimatedArrivalTime,proto3" json:"oldest_estimated_arrival_time,omitempty"` + // Output only. The number of tasks that the queue has dispatched and received a reply for + // during the last minute. This variable counts both successful and + // non-successful executions. + ExecutedLastMinuteCount int64 `protobuf:"varint,3,opt,name=executed_last_minute_count,json=executedLastMinuteCount,proto3" json:"executed_last_minute_count,omitempty"` + // Output only. The number of requests that the queue has dispatched but has not received + // a reply for yet. + ConcurrentDispatchesCount int64 `protobuf:"varint,4,opt,name=concurrent_dispatches_count,json=concurrentDispatchesCount,proto3" json:"concurrent_dispatches_count,omitempty"` + // Output only. The current maximum number of tasks per second executed by the queue. + // The maximum value of this variable is controlled by the RateLimits of the + // Queue. However, this value could be less to avoid overloading the endpoints + // tasks in the queue are targeting. + EffectiveExecutionRate float64 `protobuf:"fixed64,5,opt,name=effective_execution_rate,json=effectiveExecutionRate,proto3" json:"effective_execution_rate,omitempty"` +} + +func (x *QueueStats) Reset() { + *x = QueueStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueueStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueueStats) ProtoMessage() {} + +func (x *QueueStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueueStats.ProtoReflect.Descriptor instead. +func (*QueueStats) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP(), []int{4} +} + +func (x *QueueStats) GetTasksCount() int64 { + if x != nil { + return x.TasksCount + } + return 0 +} + +func (x *QueueStats) GetOldestEstimatedArrivalTime() *timestamppb.Timestamp { + if x != nil { + return x.OldestEstimatedArrivalTime + } + return nil +} + +func (x *QueueStats) GetExecutedLastMinuteCount() int64 { + if x != nil { + return x.ExecutedLastMinuteCount + } + return 0 +} + +func (x *QueueStats) GetConcurrentDispatchesCount() int64 { + if x != nil { + return x.ConcurrentDispatchesCount + } + return 0 +} + +func (x *QueueStats) GetEffectiveExecutionRate() float64 { + if x != nil { + return x.EffectiveExecutionRate + } + return 0 +} + +var File_google_cloud_tasks_v2beta3_queue_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta3_queue_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x07, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x61, 0x70, 0x70, 0x5f, + 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, + 0x74, 0x70, 0x51, 0x75, 0x65, 0x75, 0x65, 0x48, 0x00, 0x52, 0x12, 0x61, 0x70, 0x70, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x47, 0x0a, + 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x51, + 0x75, 0x65, 0x75, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x70, 0x75, 0x72, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x70, 0x75, 0x72, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x08, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x54, + 0x74, 0x6c, 0x12, 0x3e, 0x0a, 0x0d, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x5f, + 0x74, 0x74, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x54, + 0x74, 0x6c, 0x12, 0x72, 0x0a, 0x1a, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x18, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, + 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, + 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x55, 0x53, 0x45, + 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, + 0x03, 0x22, 0x30, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x50, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x55, 0x53, + 0x48, 0x10, 0x02, 0x3a, 0x5c, 0xea, 0x41, 0x59, 0x0a, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x36, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x7d, 0x42, 0x0c, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, + 0xa9, 0x01, 0x0a, 0x0a, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x39, + 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, + 0x5f, 0x62, 0x75, 0x72, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x72, 0x73, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x3a, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0x96, 0x02, 0x0a, 0x0b, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x61, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x47, + 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x62, + 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x42, 0x61, 0x63, 0x6b, + 0x6f, 0x66, 0x66, 0x12, 0x3a, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, + 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, + 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0x41, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, + 0x6e, 0x67, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x22, 0xdc, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x75, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x62, 0x0a, 0x1d, + 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x61, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1a, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x45, 0x73, 0x74, 0x69, + 0x6d, 0x61, 0x74, 0x65, 0x64, 0x41, 0x72, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x40, 0x0a, 0x1a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x17, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x65, 0x64, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x18, 0x65, 0x66, 0x66, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, + 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x75, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta3_queue_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta3_queue_proto_rawDescData = file_google_cloud_tasks_v2beta3_queue_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta3_queue_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta3_queue_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta3_queue_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta3_queue_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta3_queue_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta3_queue_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_tasks_v2beta3_queue_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_tasks_v2beta3_queue_proto_goTypes = []interface{}{ + (Queue_State)(0), // 0: google.cloud.tasks.v2beta3.Queue.State + (Queue_Type)(0), // 1: google.cloud.tasks.v2beta3.Queue.Type + (*Queue)(nil), // 2: google.cloud.tasks.v2beta3.Queue + (*RateLimits)(nil), // 3: google.cloud.tasks.v2beta3.RateLimits + (*RetryConfig)(nil), // 4: google.cloud.tasks.v2beta3.RetryConfig + (*StackdriverLoggingConfig)(nil), // 5: google.cloud.tasks.v2beta3.StackdriverLoggingConfig + (*QueueStats)(nil), // 6: google.cloud.tasks.v2beta3.QueueStats + (*AppEngineHttpQueue)(nil), // 7: google.cloud.tasks.v2beta3.AppEngineHttpQueue + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration +} +var file_google_cloud_tasks_v2beta3_queue_proto_depIdxs = []int32{ + 7, // 0: google.cloud.tasks.v2beta3.Queue.app_engine_http_queue:type_name -> google.cloud.tasks.v2beta3.AppEngineHttpQueue + 3, // 1: google.cloud.tasks.v2beta3.Queue.rate_limits:type_name -> google.cloud.tasks.v2beta3.RateLimits + 4, // 2: google.cloud.tasks.v2beta3.Queue.retry_config:type_name -> google.cloud.tasks.v2beta3.RetryConfig + 0, // 3: google.cloud.tasks.v2beta3.Queue.state:type_name -> google.cloud.tasks.v2beta3.Queue.State + 8, // 4: google.cloud.tasks.v2beta3.Queue.purge_time:type_name -> google.protobuf.Timestamp + 9, // 5: google.cloud.tasks.v2beta3.Queue.task_ttl:type_name -> google.protobuf.Duration + 9, // 6: google.cloud.tasks.v2beta3.Queue.tombstone_ttl:type_name -> google.protobuf.Duration + 5, // 7: google.cloud.tasks.v2beta3.Queue.stackdriver_logging_config:type_name -> google.cloud.tasks.v2beta3.StackdriverLoggingConfig + 1, // 8: google.cloud.tasks.v2beta3.Queue.type:type_name -> google.cloud.tasks.v2beta3.Queue.Type + 6, // 9: google.cloud.tasks.v2beta3.Queue.stats:type_name -> google.cloud.tasks.v2beta3.QueueStats + 9, // 10: google.cloud.tasks.v2beta3.RetryConfig.max_retry_duration:type_name -> google.protobuf.Duration + 9, // 11: google.cloud.tasks.v2beta3.RetryConfig.min_backoff:type_name -> google.protobuf.Duration + 9, // 12: google.cloud.tasks.v2beta3.RetryConfig.max_backoff:type_name -> google.protobuf.Duration + 8, // 13: google.cloud.tasks.v2beta3.QueueStats.oldest_estimated_arrival_time:type_name -> google.protobuf.Timestamp + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta3_queue_proto_init() } +func file_google_cloud_tasks_v2beta3_queue_proto_init() { + if File_google_cloud_tasks_v2beta3_queue_proto != nil { + return + } + file_google_cloud_tasks_v2beta3_target_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Queue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimits); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RetryConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StackdriverLoggingConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueueStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_tasks_v2beta3_queue_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Queue_AppEngineHttpQueue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta3_queue_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta3_queue_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta3_queue_proto_depIdxs, + EnumInfos: file_google_cloud_tasks_v2beta3_queue_proto_enumTypes, + MessageInfos: file_google_cloud_tasks_v2beta3_queue_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta3_queue_proto = out.File + file_google_cloud_tasks_v2beta3_queue_proto_rawDesc = nil + file_google_cloud_tasks_v2beta3_queue_proto_goTypes = nil + file_google_cloud_tasks_v2beta3_queue_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go new file mode 100644 index 000000000000..c45e82bfcf44 --- /dev/null +++ b/cloudtasks/apiv2beta3/cloudtaskspb/target.pb.go @@ -0,0 +1,1199 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta3/target.proto + +package cloudtaskspb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The HTTP method used to execute the task. +type HttpMethod int32 + +const ( + // HTTP method unspecified + HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0 + // HTTP POST + HttpMethod_POST HttpMethod = 1 + // HTTP GET + HttpMethod_GET HttpMethod = 2 + // HTTP HEAD + HttpMethod_HEAD HttpMethod = 3 + // HTTP PUT + HttpMethod_PUT HttpMethod = 4 + // HTTP DELETE + HttpMethod_DELETE HttpMethod = 5 + // HTTP PATCH + HttpMethod_PATCH HttpMethod = 6 + // HTTP OPTIONS + HttpMethod_OPTIONS HttpMethod = 7 +) + +// Enum value maps for HttpMethod. +var ( + HttpMethod_name = map[int32]string{ + 0: "HTTP_METHOD_UNSPECIFIED", + 1: "POST", + 2: "GET", + 3: "HEAD", + 4: "PUT", + 5: "DELETE", + 6: "PATCH", + 7: "OPTIONS", + } + HttpMethod_value = map[string]int32{ + "HTTP_METHOD_UNSPECIFIED": 0, + "POST": 1, + "GET": 2, + "HEAD": 3, + "PUT": 4, + "DELETE": 5, + "PATCH": 6, + "OPTIONS": 7, + } +) + +func (x HttpMethod) Enum() *HttpMethod { + p := new(HttpMethod) + *p = x + return p +} + +func (x HttpMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HttpMethod) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta3_target_proto_enumTypes[0].Descriptor() +} + +func (HttpMethod) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta3_target_proto_enumTypes[0] +} + +func (x HttpMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HttpMethod.Descriptor instead. +func (HttpMethod) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{0} +} + +// Pull Message. +// +// This proto can only be used for tasks in a queue which has +// [PULL][google.cloud.tasks.v2beta3.Queue.type] type. It currently exists for backwards compatibility with +// the App Engine Task Queue SDK. This message type maybe returned with methods +// [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and +// [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view +// is [FULL][google.cloud.tasks.v2beta3.Task.View.Full]. +type PullMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A data payload consumed by the worker to execute the task. + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // The tasks's tag. + // + // The tag is less than 500 characters. + // + // SDK compatibility: Although the SDK allows tags to be either + // string or + // [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + // encoded, the tag will be empty when the task is returned by Cloud Tasks. + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *PullMessage) Reset() { + *x = PullMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PullMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PullMessage) ProtoMessage() {} + +func (x *PullMessage) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PullMessage.ProtoReflect.Descriptor instead. +func (*PullMessage) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{0} +} + +func (x *PullMessage) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *PullMessage) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +// HTTP request. +// +// The task will be pushed to the worker as an HTTP request. If the worker +// or the redirected worker acknowledges the task by returning a successful HTTP +// response code ([`200` - `299`]), the task will be removed from the queue. If +// any other HTTP response code is returned or no response is received, the +// task will be retried according to the following: +// +// - User-specified throttling: [retry configuration][google.cloud.tasks.v2beta3.Queue.retry_config], +// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits], and the [queue's state][google.cloud.tasks.v2beta3.Queue.state]. +// +// - System throttling: To prevent the worker from overloading, Cloud Tasks may +// temporarily reduce the queue's effective rate. User-specified settings +// will not be changed. +// +// System throttling happens because: +// +// - Cloud Tasks backs off on all errors. Normally the backoff specified in +// [rate limits][google.cloud.tasks.v2beta3.Queue.rate_limits] will be used. But if the worker returns +// `429` (Too Many Requests), `503` (Service Unavailable), or the rate of +// errors is high, Cloud Tasks will use a higher backoff rate. The retry +// specified in the `Retry-After` HTTP response header is considered. +// +// - To prevent traffic spikes and to smooth sudden increases in traffic, +// dispatches ramp up slowly when the queue is newly created or idle and +// if large numbers of tasks suddenly become available to dispatch (due to +// spikes in create task rates, the queue being unpaused, or many tasks +// that are scheduled at the same time). +type HttpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The full url path that the request will be sent to. + // + // This string must begin with either "http://" or "https://". Some examples + // are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + // encode some characters for safety and compatibility. The maximum allowed + // URL length is 2083 characters after encoding. + // + // The `Location` header response from a redirect response [`300` - `399`] + // may be followed. The redirect is not counted as a separate attempt. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // The HTTP method to use for the request. The default is POST. + HttpMethod HttpMethod `protobuf:"varint,2,opt,name=http_method,json=httpMethod,proto3,enum=google.cloud.tasks.v2beta3.HttpMethod" json:"http_method,omitempty"` + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // + // These headers represent a subset of the headers that will accompany the + // task's HTTP request. Some HTTP request headers will be ignored or replaced. + // + // A partial list of headers that will be ignored or replaced is: + // + // - Host: This will be computed by Cloud Tasks and derived from + // [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. + // - Content-Length: This will be computed by Cloud Tasks. + // - User-Agent: This will be set to `"Google-Cloud-Tasks"`. + // - `X-Google-*`: Google use only. + // - `X-AppEngine-*`: Google use only. + // + // `Content-Type` won't be set by Cloud Tasks. You can explicitly set + // `Content-Type` to a media type when the + // + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/octet-stream"` or + // `"application/json"`. + // + // Headers which can have multiple values (according to RFC2616) can be + // specified using comma-separated values. + // + // The size of the headers must be less than 80KB. + Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // HTTP request body. + // + // A request body is allowed only if the + // [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, PUT, or PATCH. It is an + // error to set body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + // The mode for generating an `Authorization` header for HTTP requests. + // + // If specified, all `Authorization` headers in the [HttpRequest.headers][google.cloud.tasks.v2beta3.HttpRequest.headers] + // field will be overridden. + // + // Types that are assignable to AuthorizationHeader: + // + // *HttpRequest_OauthToken + // *HttpRequest_OidcToken + AuthorizationHeader isHttpRequest_AuthorizationHeader `protobuf_oneof:"authorization_header"` +} + +func (x *HttpRequest) Reset() { + *x = HttpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpRequest) ProtoMessage() {} + +func (x *HttpRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpRequest.ProtoReflect.Descriptor instead. +func (*HttpRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{1} +} + +func (x *HttpRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *HttpRequest) GetHttpMethod() HttpMethod { + if x != nil { + return x.HttpMethod + } + return HttpMethod_HTTP_METHOD_UNSPECIFIED +} + +func (x *HttpRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + +func (x *HttpRequest) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +func (m *HttpRequest) GetAuthorizationHeader() isHttpRequest_AuthorizationHeader { + if m != nil { + return m.AuthorizationHeader + } + return nil +} + +func (x *HttpRequest) GetOauthToken() *OAuthToken { + if x, ok := x.GetAuthorizationHeader().(*HttpRequest_OauthToken); ok { + return x.OauthToken + } + return nil +} + +func (x *HttpRequest) GetOidcToken() *OidcToken { + if x, ok := x.GetAuthorizationHeader().(*HttpRequest_OidcToken); ok { + return x.OidcToken + } + return nil +} + +type isHttpRequest_AuthorizationHeader interface { + isHttpRequest_AuthorizationHeader() +} + +type HttpRequest_OauthToken struct { + // If specified, an + // [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + // will be generated and attached as an `Authorization` header in the HTTP + // request. + // + // This type of authorization should generally only be used when calling + // Google APIs hosted on *.googleapis.com. + OauthToken *OAuthToken `protobuf:"bytes,5,opt,name=oauth_token,json=oauthToken,proto3,oneof"` +} + +type HttpRequest_OidcToken struct { + // If specified, an + // [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in the + // HTTP request. + // + // This type of authorization can be used for many scenarios, including + // calling Cloud Run, or endpoints where you intend to validate the token + // yourself. + OidcToken *OidcToken `protobuf:"bytes,6,opt,name=oidc_token,json=oidcToken,proto3,oneof"` +} + +func (*HttpRequest_OauthToken) isHttpRequest_AuthorizationHeader() {} + +func (*HttpRequest_OidcToken) isHttpRequest_AuthorizationHeader() {} + +// App Engine HTTP queue. +// +// The task will be delivered to the App Engine application hostname +// specified by its [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest]. +// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] explains how the +// task's host URL is constructed. +// +// Using [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] requires +// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +type AppEngineHttpQueue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Overrides for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + // + // If set, `app_engine_routing_override` is used for all tasks in + // the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + AppEngineRoutingOverride *AppEngineRouting `protobuf:"bytes,1,opt,name=app_engine_routing_override,json=appEngineRoutingOverride,proto3" json:"app_engine_routing_override,omitempty"` +} + +func (x *AppEngineHttpQueue) Reset() { + *x = AppEngineHttpQueue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppEngineHttpQueue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppEngineHttpQueue) ProtoMessage() {} + +func (x *AppEngineHttpQueue) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppEngineHttpQueue.ProtoReflect.Descriptor instead. +func (*AppEngineHttpQueue) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{2} +} + +func (x *AppEngineHttpQueue) GetAppEngineRoutingOverride() *AppEngineRouting { + if x != nil { + return x.AppEngineRoutingOverride + } + return nil +} + +// App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine app when +// the task is dispatched. +// +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] requires +// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the same +// project as the queue. For more information, see +// [How Requests are +// Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) +// and how routing is affected by +// [dispatch +// files](https://cloud.google.com/appengine/docs/python/config/dispatchref). +// Traffic is encrypted during transport and never leaves Google datacenters. +// Because this traffic is carried over a communication mechanism internal to +// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). +// The request to the handler, however, will appear to have used the HTTP +// protocol. +// +// The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to construct the URL that the task is +// delivered to can be set at the queue-level or task-level: +// +// - If set, +// [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] +// is used for all tasks in the queue, no matter what the setting +// is for the +// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. +// +// The `url` that the task will be sent to is: +// +// - `url =` [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] `+` +// [relative_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relative_uri] +// +// Tasks can be dispatched to secure app handlers, unsecure app handlers, and +// URIs restricted with +// [`login: +// admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). +// Because tasks are not run as any user, they cannot be dispatched to URIs +// restricted with +// [`login: +// required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) +// Task dispatches also do not follow redirects. +// +// The task attempt has succeeded if the app's request handler returns an HTTP +// response code in the range [`200` - `299`]. The task attempt has failed if +// the app's handler returns a non-2xx response code or Cloud Tasks does +// not receive response before the [deadline][google.cloud.tasks.v2beta3.Task.dispatch_deadline]. Failed +// tasks will be retried according to the +// [retry configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service Unavailable) is +// considered an App Engine system error instead of an application error and +// will cause Cloud Tasks' traffic congestion control to temporarily throttle +// the queue's dispatches. Unlike other types of task targets, a `429` (Too Many +// Requests) response from an app handler does not cause traffic congestion +// control to throttle the queue. +type AppEngineHttpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP method to use for the request. The default is POST. + // + // The app's request handler for the task's target URL must be able to handle + // HTTP requests with this http_method, otherwise the task attempt fails with + // error code 405 (Method Not Allowed). See [Writing a push task request + // handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // and the App Engine documentation for your runtime on [How Requests are + // Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + HttpMethod HttpMethod `protobuf:"varint,1,opt,name=http_method,json=httpMethod,proto3,enum=google.cloud.tasks.v2beta3.HttpMethod" json:"http_method,omitempty"` + // Task-level setting for App Engine routing. + // + // If set, + // [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] + // is used for all tasks in the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting *AppEngineRouting `protobuf:"bytes,2,opt,name=app_engine_routing,json=appEngineRouting,proto3" json:"app_engine_routing,omitempty"` + // The relative URI. + // + // The relative URI must begin with "/" and must be a valid HTTP relative URI. + // It can contain a path and query string arguments. + // If the relative URI is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + RelativeUri string `protobuf:"bytes,3,opt,name=relative_uri,json=relativeUri,proto3" json:"relative_uri,omitempty"` + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // Repeated headers are not supported but a header value can contain commas. + // + // Cloud Tasks sets some headers to default values: + // + // - `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Tasks will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // + // If the task has a [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud + // Tasks sets the following headers: + // + // - `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explicitly + // setting `Content-Type` to a particular media type when the + // [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // For example, `Content-Type` can be set to `"application/json"`. + // - `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // In addition, Cloud Tasks sets some headers when the task is dispatched, + // such as headers containing information about the task; see + // [request + // headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + // These headers are set only when the task is dispatched, so they are not + // visible when the task is returned in a Cloud Tasks response. + // + // Although there is no specific limit for the maximum number of headers or + // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta3.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] documentation. + Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // HTTP request body. + // + // A request body is allowed only if the HTTP method is POST or PUT. It is + // an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *AppEngineHttpRequest) Reset() { + *x = AppEngineHttpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppEngineHttpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppEngineHttpRequest) ProtoMessage() {} + +func (x *AppEngineHttpRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppEngineHttpRequest.ProtoReflect.Descriptor instead. +func (*AppEngineHttpRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{3} +} + +func (x *AppEngineHttpRequest) GetHttpMethod() HttpMethod { + if x != nil { + return x.HttpMethod + } + return HttpMethod_HTTP_METHOD_UNSPECIFIED +} + +func (x *AppEngineHttpRequest) GetAppEngineRouting() *AppEngineRouting { + if x != nil { + return x.AppEngineRouting + } + return nil +} + +func (x *AppEngineHttpRequest) GetRelativeUri() string { + if x != nil { + return x.RelativeUri + } + return "" +} + +func (x *AppEngineHttpRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + +func (x *AppEngineHttpRequest) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +// App Engine Routing. +// +// Defines routing characteristics specific to App Engine - service, version, +// and instance. +// +// For more information about services, versions, and instances see +// [An Overview of App +// Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), +// [Microservices Architecture on Google App +// Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request +// routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), +// and [App Engine Flex request +// routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). +type AppEngineRouting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // App service. + // + // By default, the task is sent to the service which is the default + // service when the task is attempted. + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string. + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + // App version. + // + // By default, the task is sent to the version which is the default + // version when the task is attempted. + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // App instance. + // + // By default, the task is sent to an instance which is available when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine + // Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request + // routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + // and [App Engine Flex request + // routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + Instance string `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"` + // Output only. The host that the task is sent to. + // + // The host is constructed from the domain name of the app associated with + // the queue's project ID (for example .appspot.com), and the + // [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], + // and [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks which were created using + // the App Engine SDK might have a custom domain name. + // + // For more information, see + // [How Requests are + // Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"` +} + +func (x *AppEngineRouting) Reset() { + *x = AppEngineRouting{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppEngineRouting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppEngineRouting) ProtoMessage() {} + +func (x *AppEngineRouting) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppEngineRouting.ProtoReflect.Descriptor instead. +func (*AppEngineRouting) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{4} +} + +func (x *AppEngineRouting) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *AppEngineRouting) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *AppEngineRouting) GetInstance() string { + if x != nil { + return x.Instance + } + return "" +} + +func (x *AppEngineRouting) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +// Contains information needed for generating an +// [OAuth token](https://developers.google.com/identity/protocols/OAuth2). +// This type of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. +type OAuthToken struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [Service account email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating OAuth token. + // The service account must be within the same project as the queue. The + // caller must have iam.serviceAccounts.actAs permission for the service + // account. + ServiceAccountEmail string `protobuf:"bytes,1,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"` + // OAuth scope to be used for generating OAuth access token. + // If not specified, "https://www.googleapis.com/auth/cloud-platform" + // will be used. + Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` +} + +func (x *OAuthToken) Reset() { + *x = OAuthToken{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuthToken) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuthToken) ProtoMessage() {} + +func (x *OAuthToken) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuthToken.ProtoReflect.Descriptor instead. +func (*OAuthToken) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{5} +} + +func (x *OAuthToken) GetServiceAccountEmail() string { + if x != nil { + return x.ServiceAccountEmail + } + return "" +} + +func (x *OAuthToken) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +// Contains information needed for generating an +// [OpenID Connect +// token](https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the token +// yourself. +type OidcToken struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [Service account email](https://cloud.google.com/iam/docs/service-accounts) + // to be used for generating OIDC token. + // The service account must be within the same project as the queue. The + // caller must have iam.serviceAccounts.actAs permission for the service + // account. + ServiceAccountEmail string `protobuf:"bytes,1,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"` + // Audience to be used when generating OIDC token. If not specified, the URI + // specified in target will be used. + Audience string `protobuf:"bytes,2,opt,name=audience,proto3" json:"audience,omitempty"` +} + +func (x *OidcToken) Reset() { + *x = OidcToken{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OidcToken) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OidcToken) ProtoMessage() {} + +func (x *OidcToken) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OidcToken.ProtoReflect.Descriptor instead. +func (*OidcToken) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP(), []int{6} +} + +func (x *OidcToken) GetServiceAccountEmail() string { + if x != nil { + return x.ServiceAccountEmail + } + return "" +} + +func (x *OidcToken) GetAudience() string { + if x != nil { + return x.Audience + } + return "" +} + +var File_google_cloud_tasks_v2beta3_target_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta3_target_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x22, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, + 0x22, 0xb3, 0x03, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x47, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, + 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x4e, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, + 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, + 0x49, 0x0a, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x0a, + 0x6f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x46, 0x0a, 0x0a, 0x6f, 0x69, + 0x64, 0x63, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4f, 0x69, 0x64, 0x63, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x69, 0x64, 0x63, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x16, + 0x0a, 0x14, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x81, 0x01, 0x0a, 0x12, 0x41, 0x70, 0x70, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x6b, 0x0a, + 0x1b, 0x61, 0x70, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x18, 0x61, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x87, 0x03, 0x0a, 0x14, 0x41, + 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x5a, 0x0a, 0x12, + 0x61, 0x70, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x61, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x55, 0x72, 0x69, 0x12, 0x57, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x76, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x56, 0x0a, 0x0a, + 0x4f, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x22, 0x5b, 0x0a, 0x09, 0x4f, 0x69, 0x64, 0x63, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x2a, 0x73, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x1b, 0x0a, 0x17, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x50, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, + 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x05, 0x12, 0x09, + 0x0a, 0x05, 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x07, 0x42, 0x70, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta3_target_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta3_target_proto_rawDescData = file_google_cloud_tasks_v2beta3_target_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta3_target_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta3_target_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta3_target_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta3_target_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta3_target_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta3_target_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_tasks_v2beta3_target_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_tasks_v2beta3_target_proto_goTypes = []interface{}{ + (HttpMethod)(0), // 0: google.cloud.tasks.v2beta3.HttpMethod + (*PullMessage)(nil), // 1: google.cloud.tasks.v2beta3.PullMessage + (*HttpRequest)(nil), // 2: google.cloud.tasks.v2beta3.HttpRequest + (*AppEngineHttpQueue)(nil), // 3: google.cloud.tasks.v2beta3.AppEngineHttpQueue + (*AppEngineHttpRequest)(nil), // 4: google.cloud.tasks.v2beta3.AppEngineHttpRequest + (*AppEngineRouting)(nil), // 5: google.cloud.tasks.v2beta3.AppEngineRouting + (*OAuthToken)(nil), // 6: google.cloud.tasks.v2beta3.OAuthToken + (*OidcToken)(nil), // 7: google.cloud.tasks.v2beta3.OidcToken + nil, // 8: google.cloud.tasks.v2beta3.HttpRequest.HeadersEntry + nil, // 9: google.cloud.tasks.v2beta3.AppEngineHttpRequest.HeadersEntry +} +var file_google_cloud_tasks_v2beta3_target_proto_depIdxs = []int32{ + 0, // 0: google.cloud.tasks.v2beta3.HttpRequest.http_method:type_name -> google.cloud.tasks.v2beta3.HttpMethod + 8, // 1: google.cloud.tasks.v2beta3.HttpRequest.headers:type_name -> google.cloud.tasks.v2beta3.HttpRequest.HeadersEntry + 6, // 2: google.cloud.tasks.v2beta3.HttpRequest.oauth_token:type_name -> google.cloud.tasks.v2beta3.OAuthToken + 7, // 3: google.cloud.tasks.v2beta3.HttpRequest.oidc_token:type_name -> google.cloud.tasks.v2beta3.OidcToken + 5, // 4: google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override:type_name -> google.cloud.tasks.v2beta3.AppEngineRouting + 0, // 5: google.cloud.tasks.v2beta3.AppEngineHttpRequest.http_method:type_name -> google.cloud.tasks.v2beta3.HttpMethod + 5, // 6: google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing:type_name -> google.cloud.tasks.v2beta3.AppEngineRouting + 9, // 7: google.cloud.tasks.v2beta3.AppEngineHttpRequest.headers:type_name -> google.cloud.tasks.v2beta3.AppEngineHttpRequest.HeadersEntry + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta3_target_proto_init() } +func file_google_cloud_tasks_v2beta3_target_proto_init() { + if File_google_cloud_tasks_v2beta3_target_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PullMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppEngineHttpQueue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppEngineHttpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppEngineRouting); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuthToken); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OidcToken); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_tasks_v2beta3_target_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*HttpRequest_OauthToken)(nil), + (*HttpRequest_OidcToken)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta3_target_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta3_target_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta3_target_proto_depIdxs, + EnumInfos: file_google_cloud_tasks_v2beta3_target_proto_enumTypes, + MessageInfos: file_google_cloud_tasks_v2beta3_target_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta3_target_proto = out.File + file_google_cloud_tasks_v2beta3_target_proto_rawDesc = nil + file_google_cloud_tasks_v2beta3_target_proto_goTypes = nil + file_google_cloud_tasks_v2beta3_target_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go b/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go new file mode 100644 index 000000000000..d9ed3dc7984e --- /dev/null +++ b/cloudtasks/apiv2beta3/cloudtaskspb/task.pb.go @@ -0,0 +1,656 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/tasks/v2beta3/task.proto + +package cloudtaskspb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] data. +// +// When a task is returned in a response, not all +// information is retrieved by default because some data, such as +// payloads, might be desirable to return only when needed because +// of its large size or because of the sensitivity of data that it +// contains. +type Task_View int32 + +const ( + // Unspecified. Defaults to BASIC. + Task_VIEW_UNSPECIFIED Task_View = 0 + // The basic view omits fields which can be large or can contain + // sensitive data. + // + // This view does not include the + // [body in AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. + // Bodies are desirable to return only when needed, because they + // can be large and because of the sensitivity of the data that you + // choose to store in it. + Task_BASIC Task_View = 1 + // All information is returned. + // + // Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2beta3.Queue] resource. + Task_FULL Task_View = 2 +) + +// Enum value maps for Task_View. +var ( + Task_View_name = map[int32]string{ + 0: "VIEW_UNSPECIFIED", + 1: "BASIC", + 2: "FULL", + } + Task_View_value = map[string]int32{ + "VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2, + } +) + +func (x Task_View) Enum() *Task_View { + p := new(Task_View) + *p = x + return p +} + +func (x Task_View) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Task_View) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_tasks_v2beta3_task_proto_enumTypes[0].Descriptor() +} + +func (Task_View) Type() protoreflect.EnumType { + return &file_google_cloud_tasks_v2beta3_task_proto_enumTypes[0] +} + +func (x Task_View) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Task_View.Descriptor instead. +func (Task_View) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_task_proto_rawDescGZIP(), []int{0, 0} +} + +// A unit of scheduled work. +type Task struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + // + // The task name. + // + // The task name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + // + // - `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying + // projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + // - `LOCATION_ID` is the canonical ID for the task's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // - `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // - `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The message to send to the worker. + // + // Types that are assignable to PayloadType: + // + // *Task_AppEngineHttpRequest + // *Task_HttpRequest + // *Task_PullMessage + PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"` + // The time when the task is scheduled to be attempted. + // + // For App Engine queues, this is when the task will be attempted or retried. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // Output only. The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The deadline for requests sent to the worker. If the worker does not + // respond by this deadline then the request is cancelled and the attempt + // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + // task according to the [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // + // Note that when the request is cancelled, Cloud Tasks will stop listening + // for the response, but whether the worker stops processing depends on the + // worker. For example, if the worker is stuck, it may not react to cancelled + // requests. + // + // The default and maximum values depend on the type of request: + // + // - For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 10 minutes. The deadline + // must be in the interval [15 seconds, 30 minutes]. + // + // - For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the + // request has the default deadline. The default deadline depends on the + // [scaling + // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + // of the service: 10 minutes for standard apps with automatic scaling, 24 + // hours for standard apps with manual and basic scaling, and 60 minutes for + // flex apps. If the request deadline is set, it must be in the interval [15 + // seconds, 24 hours 15 seconds]. Regardless of the task's + // `dispatch_deadline`, the app handler will not run for longer than than + // the service's timeout. We recommend setting the `dispatch_deadline` to + // at most a few seconds more than the app handler's timeout. For more + // information see + // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + // + // `dispatch_deadline` will be truncated to the nearest millisecond. The + // deadline is an approximate deadline. + DispatchDeadline *durationpb.Duration `protobuf:"bytes,12,opt,name=dispatch_deadline,json=dispatchDeadline,proto3" json:"dispatch_deadline,omitempty"` + // Output only. The number of attempts dispatched. + // + // This count includes attempts which have been dispatched but haven't + // received a response. + DispatchCount int32 `protobuf:"varint,6,opt,name=dispatch_count,json=dispatchCount,proto3" json:"dispatch_count,omitempty"` + // Output only. The number of attempts which have received a response. + ResponseCount int32 `protobuf:"varint,7,opt,name=response_count,json=responseCount,proto3" json:"response_count,omitempty"` + // Output only. The status of the task's first attempt. + // + // Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will be set. + // The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information is not retained by Cloud Tasks. + FirstAttempt *Attempt `protobuf:"bytes,8,opt,name=first_attempt,json=firstAttempt,proto3" json:"first_attempt,omitempty"` + // Output only. The status of the task's last attempt. + LastAttempt *Attempt `protobuf:"bytes,9,opt,name=last_attempt,json=lastAttempt,proto3" json:"last_attempt,omitempty"` + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] has + // been returned. + View Task_View `protobuf:"varint,10,opt,name=view,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"view,omitempty"` +} + +func (x *Task) Reset() { + *x = Task{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task) ProtoMessage() {} + +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_task_proto_rawDescGZIP(), []int{0} +} + +func (x *Task) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *Task) GetPayloadType() isTask_PayloadType { + if m != nil { + return m.PayloadType + } + return nil +} + +func (x *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest { + if x, ok := x.GetPayloadType().(*Task_AppEngineHttpRequest); ok { + return x.AppEngineHttpRequest + } + return nil +} + +func (x *Task) GetHttpRequest() *HttpRequest { + if x, ok := x.GetPayloadType().(*Task_HttpRequest); ok { + return x.HttpRequest + } + return nil +} + +func (x *Task) GetPullMessage() *PullMessage { + if x, ok := x.GetPayloadType().(*Task_PullMessage); ok { + return x.PullMessage + } + return nil +} + +func (x *Task) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *Task) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Task) GetDispatchDeadline() *durationpb.Duration { + if x != nil { + return x.DispatchDeadline + } + return nil +} + +func (x *Task) GetDispatchCount() int32 { + if x != nil { + return x.DispatchCount + } + return 0 +} + +func (x *Task) GetResponseCount() int32 { + if x != nil { + return x.ResponseCount + } + return 0 +} + +func (x *Task) GetFirstAttempt() *Attempt { + if x != nil { + return x.FirstAttempt + } + return nil +} + +func (x *Task) GetLastAttempt() *Attempt { + if x != nil { + return x.LastAttempt + } + return nil +} + +func (x *Task) GetView() Task_View { + if x != nil { + return x.View + } + return Task_VIEW_UNSPECIFIED +} + +type isTask_PayloadType interface { + isTask_PayloadType() +} + +type Task_AppEngineHttpRequest struct { + // HTTP request that is sent to the App Engine app handler. + // + // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] set. + AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"` +} + +type Task_HttpRequest struct { + // HTTP request that is sent to the task's target. + // + // An HTTP task is a task that has [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + HttpRequest *HttpRequest `protobuf:"bytes,11,opt,name=http_request,json=httpRequest,proto3,oneof"` +} + +type Task_PullMessage struct { + // Pull Message contained in a task in a [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This + // payload type cannot be explicitly set through Cloud Tasks API. Its + // purpose, currently is to provide backward compatibility with App Engine + // Task Queue + // [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) + // queues to provide a way to inspect contents of pull tasks through the + // [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. + PullMessage *PullMessage `protobuf:"bytes,13,opt,name=pull_message,json=pullMessage,proto3,oneof"` +} + +func (*Task_AppEngineHttpRequest) isTask_PayloadType() {} + +func (*Task_HttpRequest) isTask_PayloadType() {} + +func (*Task_PullMessage) isTask_PayloadType() {} + +// The status of a task attempt. +type Attempt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // Output only. The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + DispatchTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"` + // Output only. The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + ResponseTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"` + // Output only. The response from the worker for this attempt. + // + // If `response_time` is unset, then the task has not been attempted or is + // currently running and the `response_status` field is meaningless. + ResponseStatus *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` +} + +func (x *Attempt) Reset() { + *x = Attempt{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attempt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attempt) ProtoMessage() {} + +func (x *Attempt) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Attempt.ProtoReflect.Descriptor instead. +func (*Attempt) Descriptor() ([]byte, []int) { + return file_google_cloud_tasks_v2beta3_task_proto_rawDescGZIP(), []int{1} +} + +func (x *Attempt) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *Attempt) GetDispatchTime() *timestamppb.Timestamp { + if x != nil { + return x.DispatchTime + } + return nil +} + +func (x *Attempt) GetResponseTime() *timestamppb.Timestamp { + if x != nil { + return x.ResponseTime + } + return nil +} + +func (x *Attempt) GetResponseStatus() *status.Status { + if x != nil { + return x.ResponseStatus + } + return nil +} + +var File_google_cloud_tasks_v2beta3_task_proto protoreflect.FileDescriptor + +var file_google_cloud_tasks_v2beta3_task_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xaf, 0x07, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x69, + 0x0a, 0x17, 0x61, 0x70, 0x70, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x70, 0x70, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x14, 0x61, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x74, + 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x64, 0x69, 0x73, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, + 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0d, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x74, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x52, 0x0c, 0x66, 0x69, 0x72, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x12, 0x46, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x52, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x76, + 0x69, 0x65, 0x77, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x56, 0x69, 0x65, 0x77, + 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x31, 0x0a, 0x04, 0x56, 0x69, 0x65, 0x77, 0x12, 0x14, + 0x0a, 0x10, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x3a, 0x68, 0xea, 0x41, 0x65, 0x0a, 0x1e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x43, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x2f, 0x7b, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x7d, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x7b, 0x74, 0x61, + 0x73, 0x6b, 0x7d, 0x42, 0x0e, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x89, 0x02, 0x0a, 0x07, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, + 0x3f, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x6e, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x42, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_tasks_v2beta3_task_proto_rawDescOnce sync.Once + file_google_cloud_tasks_v2beta3_task_proto_rawDescData = file_google_cloud_tasks_v2beta3_task_proto_rawDesc +) + +func file_google_cloud_tasks_v2beta3_task_proto_rawDescGZIP() []byte { + file_google_cloud_tasks_v2beta3_task_proto_rawDescOnce.Do(func() { + file_google_cloud_tasks_v2beta3_task_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_tasks_v2beta3_task_proto_rawDescData) + }) + return file_google_cloud_tasks_v2beta3_task_proto_rawDescData +} + +var file_google_cloud_tasks_v2beta3_task_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_tasks_v2beta3_task_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_tasks_v2beta3_task_proto_goTypes = []interface{}{ + (Task_View)(0), // 0: google.cloud.tasks.v2beta3.Task.View + (*Task)(nil), // 1: google.cloud.tasks.v2beta3.Task + (*Attempt)(nil), // 2: google.cloud.tasks.v2beta3.Attempt + (*AppEngineHttpRequest)(nil), // 3: google.cloud.tasks.v2beta3.AppEngineHttpRequest + (*HttpRequest)(nil), // 4: google.cloud.tasks.v2beta3.HttpRequest + (*PullMessage)(nil), // 5: google.cloud.tasks.v2beta3.PullMessage + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration + (*status.Status)(nil), // 8: google.rpc.Status +} +var file_google_cloud_tasks_v2beta3_task_proto_depIdxs = []int32{ + 3, // 0: google.cloud.tasks.v2beta3.Task.app_engine_http_request:type_name -> google.cloud.tasks.v2beta3.AppEngineHttpRequest + 4, // 1: google.cloud.tasks.v2beta3.Task.http_request:type_name -> google.cloud.tasks.v2beta3.HttpRequest + 5, // 2: google.cloud.tasks.v2beta3.Task.pull_message:type_name -> google.cloud.tasks.v2beta3.PullMessage + 6, // 3: google.cloud.tasks.v2beta3.Task.schedule_time:type_name -> google.protobuf.Timestamp + 6, // 4: google.cloud.tasks.v2beta3.Task.create_time:type_name -> google.protobuf.Timestamp + 7, // 5: google.cloud.tasks.v2beta3.Task.dispatch_deadline:type_name -> google.protobuf.Duration + 2, // 6: google.cloud.tasks.v2beta3.Task.first_attempt:type_name -> google.cloud.tasks.v2beta3.Attempt + 2, // 7: google.cloud.tasks.v2beta3.Task.last_attempt:type_name -> google.cloud.tasks.v2beta3.Attempt + 0, // 8: google.cloud.tasks.v2beta3.Task.view:type_name -> google.cloud.tasks.v2beta3.Task.View + 6, // 9: google.cloud.tasks.v2beta3.Attempt.schedule_time:type_name -> google.protobuf.Timestamp + 6, // 10: google.cloud.tasks.v2beta3.Attempt.dispatch_time:type_name -> google.protobuf.Timestamp + 6, // 11: google.cloud.tasks.v2beta3.Attempt.response_time:type_name -> google.protobuf.Timestamp + 8, // 12: google.cloud.tasks.v2beta3.Attempt.response_status:type_name -> google.rpc.Status + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_google_cloud_tasks_v2beta3_task_proto_init() } +func file_google_cloud_tasks_v2beta3_task_proto_init() { + if File_google_cloud_tasks_v2beta3_task_proto != nil { + return + } + file_google_cloud_tasks_v2beta3_target_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_tasks_v2beta3_task_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Attempt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_tasks_v2beta3_task_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Task_AppEngineHttpRequest)(nil), + (*Task_HttpRequest)(nil), + (*Task_PullMessage)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_tasks_v2beta3_task_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_tasks_v2beta3_task_proto_goTypes, + DependencyIndexes: file_google_cloud_tasks_v2beta3_task_proto_depIdxs, + EnumInfos: file_google_cloud_tasks_v2beta3_task_proto_enumTypes, + MessageInfos: file_google_cloud_tasks_v2beta3_task_proto_msgTypes, + }.Build() + File_google_cloud_tasks_v2beta3_task_proto = out.File + file_google_cloud_tasks_v2beta3_task_proto_rawDesc = nil + file_google_cloud_tasks_v2beta3_task_proto_goTypes = nil + file_google_cloud_tasks_v2beta3_task_proto_depIdxs = nil +} diff --git a/cloudtasks/apiv2beta3/doc.go b/cloudtasks/apiv2beta3/doc.go index 67a93a5de3ee..45c29f5fe5ce 100644 --- a/cloudtasks/apiv2beta3/doc.go +++ b/cloudtasks/apiv2beta3/doc.go @@ -19,51 +19,62 @@ // // Manages the execution of large numbers of distributed requests. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := cloudtasks.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudtasks.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := cloudtasks.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &taskspb.ListQueuesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/tasks/v2beta3#ListQueuesRequest. -// } -// it := c.ListQueues(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cloudtasks.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &taskspb.ListQueuesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/tasks/v2beta3#ListQueuesRequest. +// } +// it := c.ListQueues(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/cloudtasks/apiv2beta3/mock_test.go b/cloudtasks/apiv2beta3/mock_test.go deleted file mode 100644 index 3e1eb8643470..000000000000 --- a/cloudtasks/apiv2beta3/mock_test.go +++ /dev/null @@ -1,1269 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package cloudtasks - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - taskspb "google.golang.org/genproto/googleapis/cloud/tasks/v2beta3" - iampb "google.golang.org/genproto/googleapis/iam/v1" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockCloudTasksServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - taskspb.CloudTasksServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockCloudTasksServer) ListQueues(ctx context.Context, req *taskspb.ListQueuesRequest) (*taskspb.ListQueuesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.ListQueuesResponse), nil -} - -func (s *mockCloudTasksServer) GetQueue(ctx context.Context, req *taskspb.GetQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) CreateQueue(ctx context.Context, req *taskspb.CreateQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) UpdateQueue(ctx context.Context, req *taskspb.UpdateQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) DeleteQueue(ctx context.Context, req *taskspb.DeleteQueueRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) PurgeQueue(ctx context.Context, req *taskspb.PurgeQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) PauseQueue(ctx context.Context, req *taskspb.PauseQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) ResumeQueue(ctx context.Context, req *taskspb.ResumeQueueRequest) (*taskspb.Queue, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Queue), nil -} - -func (s *mockCloudTasksServer) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockCloudTasksServer) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockCloudTasksServer) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.TestIamPermissionsResponse), nil -} - -func (s *mockCloudTasksServer) ListTasks(ctx context.Context, req *taskspb.ListTasksRequest) (*taskspb.ListTasksResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.ListTasksResponse), nil -} - -func (s *mockCloudTasksServer) GetTask(ctx context.Context, req *taskspb.GetTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) CreateTask(ctx context.Context, req *taskspb.CreateTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -func (s *mockCloudTasksServer) DeleteTask(ctx context.Context, req *taskspb.DeleteTaskRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockCloudTasksServer) RunTask(ctx context.Context, req *taskspb.RunTaskRequest) (*taskspb.Task, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*taskspb.Task), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockCloudTasks mockCloudTasksServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - taskspb.RegisterCloudTasksServer(serv, &mockCloudTasks) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestCloudTasksListQueues(t *testing.T) { - var nextPageToken string = "" - var queuesElement *taskspb.Queue = &taskspb.Queue{} - var queues = []*taskspb.Queue{queuesElement} - var expectedResponse = &taskspb.ListQueuesResponse{ - NextPageToken: nextPageToken, - Queues: queues, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &taskspb.ListQueuesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListQueues(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Queues[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksListQueuesError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var request = &taskspb.ListQueuesRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListQueues(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.GetQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.GetQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCreateQueue(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Queue{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.CreateQueueRequest{ - Parent: formattedParent, - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCreateQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s", "[PROJECT]", "[LOCATION]") - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.CreateQueueRequest{ - Parent: formattedParent, - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksUpdateQueue(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &taskspb.Queue{ - Name: name, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.UpdateQueueRequest{ - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksUpdateQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var queue *taskspb.Queue = &taskspb.Queue{} - var request = &taskspb.UpdateQueueRequest{ - Queue: queue, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksDeleteQueue(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.DeleteQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksDeleteQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.DeleteQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksPurgeQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PurgeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PurgeQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksPurgeQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PurgeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PurgeQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksPauseQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PauseQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PauseQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksPauseQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.PauseQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.PauseQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksResumeQueue(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &taskspb.Queue{ - Name: name2, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ResumeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ResumeQueue(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksResumeQueueError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ResumeQueueRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ResumeQueue(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksSetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksSetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksTestIamPermissions(t *testing.T) { - var expectedResponse *iampb.TestIamPermissionsResponse = &iampb.TestIamPermissionsResponse{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksTestIamPermissionsError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksListTasks(t *testing.T) { - var nextPageToken string = "" - var tasksElement *taskspb.Task = &taskspb.Task{} - var tasks = []*taskspb.Task{tasksElement} - var expectedResponse = &taskspb.ListTasksResponse{ - NextPageToken: nextPageToken, - Tasks: tasks, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ListTasksRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTasks(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Tasks[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksListTasksError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var request = &taskspb.ListTasksRequest{ - Parent: formattedParent, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListTasks(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksGetTask(t *testing.T) { - var name2 string = "name2-1052831874" - var dispatchCount int32 = 1217252086 - var responseCount int32 = 424727441 - var expectedResponse = &taskspb.Task{ - Name: name2, - DispatchCount: dispatchCount, - ResponseCount: responseCount, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.GetTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksGetTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.GetTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksCreateTask(t *testing.T) { - var name string = "name3373707" - var dispatchCount int32 = 1217252086 - var responseCount int32 = 424727441 - var expectedResponse = &taskspb.Task{ - Name: name, - DispatchCount: dispatchCount, - ResponseCount: responseCount, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var task *taskspb.Task = &taskspb.Task{} - var request = &taskspb.CreateTaskRequest{ - Parent: formattedParent, - Task: task, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksCreateTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/locations/%s/queues/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]") - var task *taskspb.Task = &taskspb.Task{} - var request = &taskspb.CreateTaskRequest{ - Parent: formattedParent, - Task: task, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestCloudTasksDeleteTask(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.DeleteTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestCloudTasksDeleteTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.DeleteTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestCloudTasksRunTask(t *testing.T) { - var name2 string = "name2-1052831874" - var dispatchCount int32 = 1217252086 - var responseCount int32 = 424727441 - var expectedResponse = &taskspb.Task{ - Name: name2, - DispatchCount: dispatchCount, - ResponseCount: responseCount, - } - - mockCloudTasks.err = nil - mockCloudTasks.reqs = nil - - mockCloudTasks.resps = append(mockCloudTasks.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.RunTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RunTask(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockCloudTasks.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestCloudTasksRunTaskError(t *testing.T) { - errCode := codes.PermissionDenied - mockCloudTasks.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/locations/%s/queues/%s/tasks/%s", "[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]") - var request = &taskspb.RunTaskRequest{ - Name: formattedName, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RunTask(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/cloudtasks/go.mod b/cloudtasks/go.mod index 24af465c58f9..3cce2943a972 100644 --- a/cloudtasks/go.mod +++ b/cloudtasks/go.mod @@ -1,12 +1,25 @@ module cloud.google.com/go/cloudtasks -go 1.16 +go 1.17 require ( - github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/cloudtasks/go.sum b/cloudtasks/go.sum index a7f80a16a22d..b56eeb960121 100644 --- a/cloudtasks/go.sum +++ b/cloudtasks/go.sum @@ -161,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -289,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -310,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -496,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -584,8 +587,8 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -616,8 +619,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -632,8 +636,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/cloudtasks/internal/version.go b/cloudtasks/internal/version.go index 9fa087b74c6b..e93235c20322 100644 --- a/cloudtasks/internal/version.go +++ b/cloudtasks/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.4.0" +const Version = "1.5.0" diff --git a/cmd/go-cloud-debug-agent/internal/debug/dwarf/entry.go b/cmd/go-cloud-debug-agent/internal/debug/dwarf/entry.go index fc24c4cb8815..302ecd3afdb1 100644 --- a/cmd/go-cloud-debug-agent/internal/debug/dwarf/entry.go +++ b/cmd/go-cloud-debug-agent/internal/debug/dwarf/entry.go @@ -122,8 +122,8 @@ type Field struct { // // A common idiom is to merge the check for nil return with // the check that the value has the expected dynamic type, as in: -// v, ok := e.Val(AttrSibling).(int64); // +// v, ok := e.Val(AttrSibling).(int64); func (e *Entry) Val(a Attr) interface{} { for _, f := range e.Field { if f.Attr == a { @@ -280,7 +280,7 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry { return e } -// A Reader allows reading Entry structures from a DWARF ``info'' section. +// A Reader allows reading Entry structures from a DWARF “info” section. // The Entry structures are arranged in a tree. The Reader's Next function // return successive entries from a pre-order traversal of the tree. // If an entry has children, its Children field will be true, and the children @@ -295,7 +295,7 @@ type Reader struct { } // Reader returns a new Reader for Data. -// The reader is positioned at byte offset 0 in the DWARF ``info'' section. +// The reader is positioned at byte offset 0 in the DWARF “info” section. func (d *Data) Reader() *Reader { r := &Reader{d: d} r.Seek(0) diff --git a/cmd/go-cloud-debug-agent/internal/debug/dwarf/type.go b/cmd/go-cloud-debug-agent/internal/debug/dwarf/type.go index c63b2b0f51ba..d6534ae10fed 100644 --- a/cmd/go-cloud-debug-agent/internal/debug/dwarf/type.go +++ b/cmd/go-cloud-debug-agent/internal/debug/dwarf/type.go @@ -352,7 +352,7 @@ type typeReader interface { AddressSize() int } -// Type reads the type at off in the DWARF ``info'' section. +// Type reads the type at off in the DWARF “info” section. func (d *Data) Type(off Offset) (Type, error) { return d.readType("info", d.Reader(), off, d.typeCache) } diff --git a/cmd/go-cloud-debug-agent/internal/debug/server/eval.go b/cmd/go-cloud-debug-agent/internal/debug/server/eval.go index 1d0ead287716..874ba0d79a35 100644 --- a/cmd/go-cloud-debug-agent/internal/debug/server/eval.go +++ b/cmd/go-cloud-debug-agent/internal/debug/server/eval.go @@ -206,6 +206,7 @@ func (e *evaluator) setNode(node ast.Node) (old ast.Node) { // err saves an error that occurred during evaluation. // It returns a zero result, so that functions can exit and set an error with +// // return e.err(...) func (e *evaluator) err(s string) result { if e.evalError != nil { diff --git a/compute/CHANGES.md b/compute/CHANGES.md index 1dc8c44ea1a4..9d1664c5669e 100644 --- a/compute/CHANGES.md +++ b/compute/CHANGES.md @@ -1,5 +1,26 @@ # Changes +## [1.10.0](https://github.com/googleapis/google-cloud-go/compare/compute/v1.9.0...compute/v1.10.0) (2022-09-15) + + +### Features + +* **compute:** Update Compute Engine API to revision 20220831 ([#729](https://github.com/googleapis/google-cloud-go/issues/729)) ([a679a5a](https://github.com/googleapis/google-cloud-go/commit/a679a5a9b1ea60cb155eb6c8be4afcc43d3b121f)) + +## [1.9.0](https://github.com/googleapis/google-cloud-go/compare/compute/v1.8.0...compute/v1.9.0) (2022-08-18) + + +### Features + +* **compute/metadata:** add http timeout to metadata client ([#6499](https://github.com/googleapis/google-cloud-go/issues/6499)) ([37d49f7](https://github.com/googleapis/google-cloud-go/commit/37d49f7a6a004baf55d880f6aa9e42e2e2d1e27e)), refs [#6498](https://github.com/googleapis/google-cloud-go/issues/6498) + +## [1.8.0](https://github.com/googleapis/google-cloud-go/compare/compute/v1.7.0...compute/v1.8.0) (2022-08-09) + + +### Features + +* **compute:** Update Compute Engine API to revision 20220720 ([#723](https://github.com/googleapis/google-cloud-go/issues/723)) ([3db735c](https://github.com/googleapis/google-cloud-go/commit/3db735c3c35ab3473ceb1948cf4da09b87728ef9)) + ## [1.7.0](https://github.com/googleapis/google-cloud-go/compare/compute/v1.6.1...compute/v1.7.0) (2022-06-16) diff --git a/compute/apiv1/accelerator_types_client.go b/compute/apiv1/accelerator_types_client.go index 6681aca5787e..23c62f827b2b 100644 --- a/compute/apiv1/accelerator_types_client.go +++ b/compute/apiv1/accelerator_types_client.go @@ -68,7 +68,7 @@ type internalAcceleratorTypesClient interface { // AcceleratorTypesClient is a client for interacting with Google Compute Engine API. // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. // -// Services +// # Services // // The AcceleratorTypes API. type AcceleratorTypesClient struct { @@ -96,7 +96,8 @@ func (c *AcceleratorTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AcceleratorTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -133,7 +134,7 @@ type acceleratorTypesRESTClient struct { // NewAcceleratorTypesRESTClient creates a new accelerator types rest client. // -// Services +// # Services // // The AcceleratorTypes API. func NewAcceleratorTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*AcceleratorTypesClient, error) { @@ -182,7 +183,7 @@ func (c *acceleratorTypesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *acceleratorTypesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/accelerator_types_client_example_test.go b/compute/apiv1/accelerator_types_client_example_test.go index b8b48b86fc4c..d3d2194938dc 100644 --- a/compute/apiv1/accelerator_types_client_example_test.go +++ b/compute/apiv1/accelerator_types_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAcceleratorTypesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAcceleratorTypesRESTClient() { func ExampleAcceleratorTypesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleAcceleratorTypesClient_AggregatedList() { func ExampleAcceleratorTypesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleAcceleratorTypesClient_Get() { func ExampleAcceleratorTypesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAcceleratorTypesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/addresses_client.go b/compute/apiv1/addresses_client.go index ccea254655d9..e5f643d7134d 100644 --- a/compute/apiv1/addresses_client.go +++ b/compute/apiv1/addresses_client.go @@ -48,6 +48,7 @@ type AddressesCallOptions struct { Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption + SetLabels []gax.CallOption } func defaultAddressesRESTCallOptions() *AddressesCallOptions { @@ -57,6 +58,7 @@ func defaultAddressesRESTCallOptions() *AddressesCallOptions { Get: []gax.CallOption{}, Insert: []gax.CallOption{}, List: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -70,6 +72,7 @@ type internalAddressesClient interface { Get(context.Context, *computepb.GetAddressRequest, ...gax.CallOption) (*computepb.Address, error) Insert(context.Context, *computepb.InsertAddressRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListAddressesRequest, ...gax.CallOption) *AddressIterator + SetLabels(context.Context, *computepb.SetLabelsAddressRequest, ...gax.CallOption) (*Operation, error) } // AddressesClient is a client for interacting with Google Compute Engine API. @@ -101,7 +104,8 @@ func (c *AddressesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AddressesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -131,6 +135,11 @@ func (c *AddressesClient) List(ctx context.Context, req *computepb.ListAddresses return c.internalClient.List(ctx, req, opts...) } +// SetLabels sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. +func (c *AddressesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsAddressRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type addressesRESTClient struct { // The http endpoint to connect to. @@ -211,7 +220,7 @@ func (c *addressesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *addressesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -614,6 +623,81 @@ func (c *addressesRESTClient) List(ctx context.Context, req *computepb.ListAddre return it } +// SetLabels sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. +func (c *addressesRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsAddressRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetRegionSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/addresses/%v/setLabels", req.GetProject(), req.GetRegion(), req.GetResource()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + // AddressIterator manages a stream of *computepb.Address. type AddressIterator struct { items []*computepb.Address diff --git a/compute/apiv1/addresses_client_example_test.go b/compute/apiv1/addresses_client_example_test.go index e7d5083cac9b..91d1a2a7cbf4 100644 --- a/compute/apiv1/addresses_client_example_test.go +++ b/compute/apiv1/addresses_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAddressesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAddressesRESTClient() { func ExampleAddressesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleAddressesClient_AggregatedList() { func ExampleAddressesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleAddressesClient_Delete() { func ExampleAddressesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleAddressesClient_Get() { func ExampleAddressesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleAddressesClient_Insert() { func ExampleAddressesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,3 +183,31 @@ func ExampleAddressesClient_List() { _ = resp } } + +func ExampleAddressesClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewAddressesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsAddressRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsAddressRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/autoscalers_client.go b/compute/apiv1/autoscalers_client.go index 3b4bb54f01f2..d7154496a637 100644 --- a/compute/apiv1/autoscalers_client.go +++ b/compute/apiv1/autoscalers_client.go @@ -107,7 +107,8 @@ func (c *AutoscalersClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AutoscalersClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -227,7 +228,7 @@ func (c *autoscalersRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *autoscalersRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/autoscalers_client_example_test.go b/compute/apiv1/autoscalers_client_example_test.go index e299bd42125b..c07a3cedbd2e 100644 --- a/compute/apiv1/autoscalers_client_example_test.go +++ b/compute/apiv1/autoscalers_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAutoscalersRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAutoscalersRESTClient() { func ExampleAutoscalersClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleAutoscalersClient_AggregatedList() { func ExampleAutoscalersClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleAutoscalersClient_Delete() { func ExampleAutoscalersClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleAutoscalersClient_Get() { func ExampleAutoscalersClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleAutoscalersClient_Insert() { func ExampleAutoscalersClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleAutoscalersClient_List() { func ExampleAutoscalersClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleAutoscalersClient_Patch() { func ExampleAutoscalersClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/backend_buckets_client.go b/compute/apiv1/backend_buckets_client.go index 7f5c6f2d0686..ab048164a95c 100644 --- a/compute/apiv1/backend_buckets_client.go +++ b/compute/apiv1/backend_buckets_client.go @@ -112,7 +112,8 @@ func (c *BackendBucketsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BackendBucketsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -242,7 +243,7 @@ func (c *backendBucketsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *backendBucketsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/backend_buckets_client_example_test.go b/compute/apiv1/backend_buckets_client_example_test.go index 377840ea5062..88d4c49bca03 100644 --- a/compute/apiv1/backend_buckets_client_example_test.go +++ b/compute/apiv1/backend_buckets_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBackendBucketsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBackendBucketsRESTClient() { func ExampleBackendBucketsClient_AddSignedUrlKey() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleBackendBucketsClient_AddSignedUrlKey() { func ExampleBackendBucketsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleBackendBucketsClient_Delete() { func ExampleBackendBucketsClient_DeleteSignedUrlKey() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleBackendBucketsClient_DeleteSignedUrlKey() { func ExampleBackendBucketsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleBackendBucketsClient_Get() { func ExampleBackendBucketsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleBackendBucketsClient_Insert() { func ExampleBackendBucketsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleBackendBucketsClient_List() { func ExampleBackendBucketsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleBackendBucketsClient_Patch() { func ExampleBackendBucketsClient_SetEdgeSecurityPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleBackendBucketsClient_SetEdgeSecurityPolicy() { func ExampleBackendBucketsClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendBucketsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/backend_services_client.go b/compute/apiv1/backend_services_client.go index 20cb60db6d29..a332027bb334 100644 --- a/compute/apiv1/backend_services_client.go +++ b/compute/apiv1/backend_services_client.go @@ -49,10 +49,12 @@ type BackendServicesCallOptions struct { DeleteSignedUrlKey []gax.CallOption Get []gax.CallOption GetHealth []gax.CallOption + GetIamPolicy []gax.CallOption Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption SetEdgeSecurityPolicy []gax.CallOption + SetIamPolicy []gax.CallOption SetSecurityPolicy []gax.CallOption Update []gax.CallOption } @@ -65,10 +67,12 @@ func defaultBackendServicesRESTCallOptions() *BackendServicesCallOptions { DeleteSignedUrlKey: []gax.CallOption{}, Get: []gax.CallOption{}, GetHealth: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, Insert: []gax.CallOption{}, List: []gax.CallOption{}, Patch: []gax.CallOption{}, SetEdgeSecurityPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, SetSecurityPolicy: []gax.CallOption{}, Update: []gax.CallOption{}, } @@ -85,10 +89,12 @@ type internalBackendServicesClient interface { DeleteSignedUrlKey(context.Context, *computepb.DeleteSignedUrlKeyBackendServiceRequest, ...gax.CallOption) (*Operation, error) Get(context.Context, *computepb.GetBackendServiceRequest, ...gax.CallOption) (*computepb.BackendService, error) GetHealth(context.Context, *computepb.GetHealthBackendServiceRequest, ...gax.CallOption) (*computepb.BackendServiceGroupHealth, error) + GetIamPolicy(context.Context, *computepb.GetIamPolicyBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error) Insert(context.Context, *computepb.InsertBackendServiceRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListBackendServicesRequest, ...gax.CallOption) *BackendServiceIterator Patch(context.Context, *computepb.PatchBackendServiceRequest, ...gax.CallOption) (*Operation, error) SetEdgeSecurityPolicy(context.Context, *computepb.SetEdgeSecurityPolicyBackendServiceRequest, ...gax.CallOption) (*Operation, error) + SetIamPolicy(context.Context, *computepb.SetIamPolicyBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error) SetSecurityPolicy(context.Context, *computepb.SetSecurityPolicyBackendServiceRequest, ...gax.CallOption) (*Operation, error) Update(context.Context, *computepb.UpdateBackendServiceRequest, ...gax.CallOption) (*Operation, error) } @@ -122,7 +128,8 @@ func (c *BackendServicesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BackendServicesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -157,6 +164,11 @@ func (c *BackendServicesClient) GetHealth(ctx context.Context, req *computepb.Ge return c.internalClient.GetHealth(ctx, req, opts...) } +// GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists. +func (c *BackendServicesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + // Insert creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview . func (c *BackendServicesClient) Insert(ctx context.Context, req *computepb.InsertBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.Insert(ctx, req, opts...) @@ -177,6 +189,11 @@ func (c *BackendServicesClient) SetEdgeSecurityPolicy(ctx context.Context, req * return c.internalClient.SetEdgeSecurityPolicy(ctx, req, opts...) } +// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy. +func (c *BackendServicesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + // SetSecurityPolicy sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview func (c *BackendServicesClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.SetSecurityPolicy(ctx, req, opts...) @@ -267,7 +284,7 @@ func (c *backendServicesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *backendServicesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -700,6 +717,66 @@ func (c *backendServicesRESTClient) GetHealth(ctx context.Context, req *computep return resp, nil } +// GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists. +func (c *backendServicesRESTClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/backendServices/%v/getIamPolicy", req.GetProject(), req.GetResource()) + + params := url.Values{} + if req != nil && req.OptionsRequestedPolicyVersion != nil { + params.Add("optionsRequestedPolicyVersion", fmt.Sprintf("%v", req.GetOptionsRequestedPolicyVersion())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // Insert creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview . func (c *backendServicesRESTClient) Insert(ctx context.Context, req *computepb.InsertBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} @@ -1018,6 +1095,66 @@ func (c *backendServicesRESTClient) SetEdgeSecurityPolicy(ctx context.Context, r return op, nil } +// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy. +func (c *backendServicesRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetGlobalSetPolicyRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/backendServices/%v/setIamPolicy", req.GetProject(), req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // SetSecurityPolicy sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview func (c *backendServicesRESTClient) SetSecurityPolicy(ctx context.Context, req *computepb.SetSecurityPolicyBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} diff --git a/compute/apiv1/backend_services_client_example_test.go b/compute/apiv1/backend_services_client_example_test.go index 92818209ee2e..6cf6645c1c5e 100644 --- a/compute/apiv1/backend_services_client_example_test.go +++ b/compute/apiv1/backend_services_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBackendServicesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBackendServicesRESTClient() { func ExampleBackendServicesClient_AddSignedUrlKey() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleBackendServicesClient_AddSignedUrlKey() { func ExampleBackendServicesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleBackendServicesClient_AggregatedList() { func ExampleBackendServicesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleBackendServicesClient_Delete() { func ExampleBackendServicesClient_DeleteSignedUrlKey() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleBackendServicesClient_DeleteSignedUrlKey() { func ExampleBackendServicesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleBackendServicesClient_Get() { func ExampleBackendServicesClient_GetHealth() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -171,8 +206,38 @@ func ExampleBackendServicesClient_GetHealth() { _ = resp } +func ExampleBackendServicesClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewBackendServicesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.GetIamPolicyBackendServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyBackendServiceRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleBackendServicesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +261,11 @@ func ExampleBackendServicesClient_Insert() { func ExampleBackendServicesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +292,11 @@ func ExampleBackendServicesClient_List() { func ExampleBackendServicesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +320,11 @@ func ExampleBackendServicesClient_Patch() { func ExampleBackendServicesClient_SetEdgeSecurityPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -266,8 +346,38 @@ func ExampleBackendServicesClient_SetEdgeSecurityPolicy() { } } +func ExampleBackendServicesClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewBackendServicesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetIamPolicyBackendServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyBackendServiceRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleBackendServicesClient_SetSecurityPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +401,11 @@ func ExampleBackendServicesClient_SetSecurityPolicy() { func ExampleBackendServicesClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/disk_types_client.go b/compute/apiv1/disk_types_client.go index a583fb1b1c70..cf2028c0557d 100644 --- a/compute/apiv1/disk_types_client.go +++ b/compute/apiv1/disk_types_client.go @@ -94,7 +94,8 @@ func (c *DiskTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DiskTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -178,7 +179,7 @@ func (c *diskTypesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *diskTypesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/disk_types_client_example_test.go b/compute/apiv1/disk_types_client_example_test.go index 70fa28bc874d..c488a7f356d9 100644 --- a/compute/apiv1/disk_types_client_example_test.go +++ b/compute/apiv1/disk_types_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewDiskTypesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewDiskTypesRESTClient() { func ExampleDiskTypesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleDiskTypesClient_AggregatedList() { func ExampleDiskTypesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleDiskTypesClient_Get() { func ExampleDiskTypesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/disks_client.go b/compute/apiv1/disks_client.go index 19675e75bc4e..dbe77434c4ba 100644 --- a/compute/apiv1/disks_client.go +++ b/compute/apiv1/disks_client.go @@ -125,7 +125,8 @@ func (c *DisksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DisksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -275,7 +276,7 @@ func (c *disksRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *disksRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/disks_client_example_test.go b/compute/apiv1/disks_client_example_test.go index 03e7c2ffaf31..e2a23bd08710 100644 --- a/compute/apiv1/disks_client_example_test.go +++ b/compute/apiv1/disks_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewDisksRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewDisksRESTClient() { func ExampleDisksClient_AddResourcePolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleDisksClient_AddResourcePolicies() { func ExampleDisksClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleDisksClient_AggregatedList() { func ExampleDisksClient_CreateSnapshot() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleDisksClient_CreateSnapshot() { func ExampleDisksClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleDisksClient_Delete() { func ExampleDisksClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleDisksClient_Get() { func ExampleDisksClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -173,6 +208,11 @@ func ExampleDisksClient_GetIamPolicy() { func ExampleDisksClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleDisksClient_Insert() { func ExampleDisksClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleDisksClient_List() { func ExampleDisksClient_RemoveResourcePolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleDisksClient_RemoveResourcePolicies() { func ExampleDisksClient_Resize() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +323,11 @@ func ExampleDisksClient_Resize() { func ExampleDisksClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -288,6 +348,11 @@ func ExampleDisksClient_SetIamPolicy() { func ExampleDisksClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -311,6 +376,11 @@ func ExampleDisksClient_SetLabels() { func ExampleDisksClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewDisksRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/doc.go b/compute/apiv1/doc.go index 75ef1bd0ba97..8cf1e892bfab 100644 --- a/compute/apiv1/doc.go +++ b/compute/apiv1/doc.go @@ -17,51 +17,62 @@ // Package compute is an auto-generated package for the // Google Compute Engine API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := compute.NewAcceleratorTypesClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := compute.NewAcceleratorTypesClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := compute.NewAcceleratorTypesRESTClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := compute.NewAcceleratorTypesRESTClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &computepb.AggregatedListAcceleratorTypesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListAcceleratorTypesRequest. -// } -// it := c.AggregatedList(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } +// req := &computepb.AggregatedListAcceleratorTypesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListAcceleratorTypesRequest. +// } +// it := c.AggregatedList(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } // -// Use of Context +// # Use of Context // -// The ctx passed to NewClient is used for authentication requests and +// The ctx passed to NewAcceleratorTypesClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/compute/apiv1/external_vpn_gateways_client.go b/compute/apiv1/external_vpn_gateways_client.go index c7cb9a52bca1..f27f8cd267b6 100644 --- a/compute/apiv1/external_vpn_gateways_client.go +++ b/compute/apiv1/external_vpn_gateways_client.go @@ -103,7 +103,8 @@ func (c *ExternalVpnGatewaysClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ExternalVpnGatewaysClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,7 +219,7 @@ func (c *externalVpnGatewaysRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *externalVpnGatewaysRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/external_vpn_gateways_client_example_test.go b/compute/apiv1/external_vpn_gateways_client_example_test.go index 2eb14356dcb6..d3586ae4ab88 100644 --- a/compute/apiv1/external_vpn_gateways_client_example_test.go +++ b/compute/apiv1/external_vpn_gateways_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewExternalVpnGatewaysRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewExternalVpnGatewaysRESTClient() { func ExampleExternalVpnGatewaysClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleExternalVpnGatewaysClient_Delete() { func ExampleExternalVpnGatewaysClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleExternalVpnGatewaysClient_Get() { func ExampleExternalVpnGatewaysClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleExternalVpnGatewaysClient_Insert() { func ExampleExternalVpnGatewaysClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleExternalVpnGatewaysClient_List() { func ExampleExternalVpnGatewaysClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleExternalVpnGatewaysClient_SetLabels() { func ExampleExternalVpnGatewaysClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewExternalVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/firewall_policies_client.go b/compute/apiv1/firewall_policies_client.go index 9e548c468ca6..519a6f43b2c0 100644 --- a/compute/apiv1/firewall_policies_client.go +++ b/compute/apiv1/firewall_policies_client.go @@ -139,7 +139,8 @@ func (c *FirewallPoliciesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FirewallPoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -314,7 +315,7 @@ func (c *firewallPoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *firewallPoliciesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/firewall_policies_client_example_test.go b/compute/apiv1/firewall_policies_client_example_test.go index b6dd3ece8ffd..397965c1c59c 100644 --- a/compute/apiv1/firewall_policies_client_example_test.go +++ b/compute/apiv1/firewall_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewFirewallPoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewFirewallPoliciesRESTClient() { func ExampleFirewallPoliciesClient_AddAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleFirewallPoliciesClient_AddAssociation() { func ExampleFirewallPoliciesClient_AddRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleFirewallPoliciesClient_AddRule() { func ExampleFirewallPoliciesClient_CloneRules() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleFirewallPoliciesClient_CloneRules() { func ExampleFirewallPoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleFirewallPoliciesClient_Delete() { func ExampleFirewallPoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleFirewallPoliciesClient_Get() { func ExampleFirewallPoliciesClient_GetAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleFirewallPoliciesClient_GetAssociation() { func ExampleFirewallPoliciesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleFirewallPoliciesClient_GetIamPolicy() { func ExampleFirewallPoliciesClient_GetRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -210,6 +255,11 @@ func ExampleFirewallPoliciesClient_GetRule() { func ExampleFirewallPoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -233,6 +283,11 @@ func ExampleFirewallPoliciesClient_Insert() { func ExampleFirewallPoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -259,6 +314,11 @@ func ExampleFirewallPoliciesClient_List() { func ExampleFirewallPoliciesClient_ListAssociations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -279,6 +339,11 @@ func ExampleFirewallPoliciesClient_ListAssociations() { func ExampleFirewallPoliciesClient_Move() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +367,11 @@ func ExampleFirewallPoliciesClient_Move() { func ExampleFirewallPoliciesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -325,6 +395,11 @@ func ExampleFirewallPoliciesClient_Patch() { func ExampleFirewallPoliciesClient_PatchRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -348,6 +423,11 @@ func ExampleFirewallPoliciesClient_PatchRule() { func ExampleFirewallPoliciesClient_RemoveAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -371,6 +451,11 @@ func ExampleFirewallPoliciesClient_RemoveAssociation() { func ExampleFirewallPoliciesClient_RemoveRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -394,6 +479,11 @@ func ExampleFirewallPoliciesClient_RemoveRule() { func ExampleFirewallPoliciesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -414,6 +504,11 @@ func ExampleFirewallPoliciesClient_SetIamPolicy() { func ExampleFirewallPoliciesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/firewalls_client.go b/compute/apiv1/firewalls_client.go index b22e1640324d..2856b5b9b20c 100644 --- a/compute/apiv1/firewalls_client.go +++ b/compute/apiv1/firewalls_client.go @@ -103,7 +103,8 @@ func (c *FirewallsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FirewallsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,7 +219,7 @@ func (c *firewallsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *firewallsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/firewalls_client_example_test.go b/compute/apiv1/firewalls_client_example_test.go index a0b53514acb5..d880b0834ab7 100644 --- a/compute/apiv1/firewalls_client_example_test.go +++ b/compute/apiv1/firewalls_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewFirewallsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewFirewallsRESTClient() { func ExampleFirewallsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleFirewallsClient_Delete() { func ExampleFirewallsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleFirewallsClient_Get() { func ExampleFirewallsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleFirewallsClient_Insert() { func ExampleFirewallsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleFirewallsClient_List() { func ExampleFirewallsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleFirewallsClient_Patch() { func ExampleFirewallsClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewFirewallsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/forwarding_rules_client.go b/compute/apiv1/forwarding_rules_client.go index 0e0b52e8267e..5eee1caf9b2e 100644 --- a/compute/apiv1/forwarding_rules_client.go +++ b/compute/apiv1/forwarding_rules_client.go @@ -110,7 +110,8 @@ func (c *ForwardingRulesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ForwardingRulesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -235,7 +236,7 @@ func (c *forwardingRulesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *forwardingRulesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/forwarding_rules_client_example_test.go b/compute/apiv1/forwarding_rules_client_example_test.go index 7937a5760620..53e0f5cd99f7 100644 --- a/compute/apiv1/forwarding_rules_client_example_test.go +++ b/compute/apiv1/forwarding_rules_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewForwardingRulesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewForwardingRulesRESTClient() { func ExampleForwardingRulesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleForwardingRulesClient_AggregatedList() { func ExampleForwardingRulesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleForwardingRulesClient_Delete() { func ExampleForwardingRulesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleForwardingRulesClient_Get() { func ExampleForwardingRulesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleForwardingRulesClient_Insert() { func ExampleForwardingRulesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleForwardingRulesClient_List() { func ExampleForwardingRulesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleForwardingRulesClient_Patch() { func ExampleForwardingRulesClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleForwardingRulesClient_SetLabels() { func ExampleForwardingRulesClient_SetTarget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/gapic_metadata.json b/compute/apiv1/gapic_metadata.json index fac5f88daac9..ae8339cae21f 100644 --- a/compute/apiv1/gapic_metadata.json +++ b/compute/apiv1/gapic_metadata.json @@ -58,6 +58,11 @@ "methods": [ "List" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } @@ -196,6 +201,11 @@ "GetHealth" ] }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, "Insert": { "methods": [ "Insert" @@ -216,6 +226,11 @@ "SetEdgeSecurityPolicy" ] }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, "SetSecurityPolicy": { "methods": [ "SetSecurityPolicy" @@ -578,6 +593,11 @@ "methods": [ "List" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } @@ -1360,6 +1380,11 @@ "methods": [ "Patch" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } @@ -1418,6 +1443,11 @@ "methods": [ "Patch" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } @@ -2192,6 +2222,11 @@ "GetHealth" ] }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, "Insert": { "methods": [ "Insert" @@ -2207,6 +2242,11 @@ "Patch" ] }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, "Update": { "methods": [ "Update" @@ -2802,6 +2842,45 @@ } } }, + "RegionSslPolicies": { + "clients": { + "rest": { + "libraryClient": "RegionSslPoliciesClient", + "rpcs": { + "Delete": { + "methods": [ + "Delete" + ] + }, + "Get": { + "methods": [ + "Get" + ] + }, + "Insert": { + "methods": [ + "Insert" + ] + }, + "List": { + "methods": [ + "List" + ] + }, + "ListAvailableFeatures": { + "methods": [ + "ListAvailableFeatures" + ] + }, + "Patch": { + "methods": [ + "Patch" + ] + } + } + } + } + }, "RegionTargetHttpProxies": { "clients": { "rest": { @@ -2880,6 +2959,35 @@ } } }, + "RegionTargetTcpProxies": { + "clients": { + "rest": { + "libraryClient": "RegionTargetTcpProxiesClient", + "rpcs": { + "Delete": { + "methods": [ + "Delete" + ] + }, + "Get": { + "methods": [ + "Get" + ] + }, + "Insert": { + "methods": [ + "Insert" + ] + }, + "List": { + "methods": [ + "List" + ] + } + } + } + } + }, "RegionUrlMaps": { "clients": { "rest": { @@ -3198,6 +3306,11 @@ "methods": [ "RemoveRule" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } @@ -3345,6 +3458,11 @@ "rest": { "libraryClient": "SslPoliciesClient", "rpcs": { + "AggregatedList": { + "methods": [ + "AggregatedList" + ] + }, "Delete": { "methods": [ "Delete" @@ -3810,6 +3928,11 @@ "methods": [ "List" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } @@ -3947,6 +4070,11 @@ "methods": [ "List" ] + }, + "SetLabels": { + "methods": [ + "SetLabels" + ] } } } diff --git a/compute/apiv1/global_addresses_client.go b/compute/apiv1/global_addresses_client.go index 2c2d5eb39416..4d25559917c8 100644 --- a/compute/apiv1/global_addresses_client.go +++ b/compute/apiv1/global_addresses_client.go @@ -42,18 +42,20 @@ var newGlobalAddressesClientHook clientHook // GlobalAddressesCallOptions contains the retry settings for each method of GlobalAddressesClient. type GlobalAddressesCallOptions struct { - Delete []gax.CallOption - Get []gax.CallOption - Insert []gax.CallOption - List []gax.CallOption + Delete []gax.CallOption + Get []gax.CallOption + Insert []gax.CallOption + List []gax.CallOption + SetLabels []gax.CallOption } func defaultGlobalAddressesRESTCallOptions() *GlobalAddressesCallOptions { return &GlobalAddressesCallOptions{ - Delete: []gax.CallOption{}, - Get: []gax.CallOption{}, - Insert: []gax.CallOption{}, - List: []gax.CallOption{}, + Delete: []gax.CallOption{}, + Get: []gax.CallOption{}, + Insert: []gax.CallOption{}, + List: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -66,6 +68,7 @@ type internalGlobalAddressesClient interface { Get(context.Context, *computepb.GetGlobalAddressRequest, ...gax.CallOption) (*computepb.Address, error) Insert(context.Context, *computepb.InsertGlobalAddressRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListGlobalAddressesRequest, ...gax.CallOption) *AddressIterator + SetLabels(context.Context, *computepb.SetLabelsGlobalAddressRequest, ...gax.CallOption) (*Operation, error) } // GlobalAddressesClient is a client for interacting with Google Compute Engine API. @@ -97,7 +100,8 @@ func (c *GlobalAddressesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GlobalAddressesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -122,6 +126,11 @@ func (c *GlobalAddressesClient) List(ctx context.Context, req *computepb.ListGlo return c.internalClient.List(ctx, req, opts...) } +// SetLabels sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. +func (c *GlobalAddressesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsGlobalAddressRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type globalAddressesRESTClient struct { // The http endpoint to connect to. @@ -202,7 +211,7 @@ func (c *globalAddressesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *globalAddressesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -496,3 +505,70 @@ func (c *globalAddressesRESTClient) List(ctx context.Context, req *computepb.Lis return it } + +// SetLabels sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. +func (c *globalAddressesRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsGlobalAddressRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetGlobalSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/addresses/%v/setLabels", req.GetProject(), req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + &globalOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + }, + } + return op, nil +} diff --git a/compute/apiv1/global_addresses_client_example_test.go b/compute/apiv1/global_addresses_client_example_test.go index 53b23f003e81..2612e3c6f0a8 100644 --- a/compute/apiv1/global_addresses_client_example_test.go +++ b/compute/apiv1/global_addresses_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGlobalAddressesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGlobalAddressesRESTClient() { func ExampleGlobalAddressesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleGlobalAddressesClient_Delete() { func ExampleGlobalAddressesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleGlobalAddressesClient_Get() { func ExampleGlobalAddressesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleGlobalAddressesClient_Insert() { func ExampleGlobalAddressesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalAddressesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,3 +152,31 @@ func ExampleGlobalAddressesClient_List() { _ = resp } } + +func ExampleGlobalAddressesClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewGlobalAddressesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsGlobalAddressRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsGlobalAddressRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/global_forwarding_rules_client.go b/compute/apiv1/global_forwarding_rules_client.go index 3e41765fcf95..c888d517df18 100644 --- a/compute/apiv1/global_forwarding_rules_client.go +++ b/compute/apiv1/global_forwarding_rules_client.go @@ -106,7 +106,8 @@ func (c *GlobalForwardingRulesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GlobalForwardingRulesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *globalForwardingRulesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *globalForwardingRulesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/global_forwarding_rules_client_example_test.go b/compute/apiv1/global_forwarding_rules_client_example_test.go index 062142cffc72..8e9103936d6a 100644 --- a/compute/apiv1/global_forwarding_rules_client_example_test.go +++ b/compute/apiv1/global_forwarding_rules_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGlobalForwardingRulesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGlobalForwardingRulesRESTClient() { func ExampleGlobalForwardingRulesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleGlobalForwardingRulesClient_Delete() { func ExampleGlobalForwardingRulesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleGlobalForwardingRulesClient_Get() { func ExampleGlobalForwardingRulesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleGlobalForwardingRulesClient_Insert() { func ExampleGlobalForwardingRulesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleGlobalForwardingRulesClient_List() { func ExampleGlobalForwardingRulesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleGlobalForwardingRulesClient_Patch() { func ExampleGlobalForwardingRulesClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleGlobalForwardingRulesClient_SetLabels() { func ExampleGlobalForwardingRulesClient_SetTarget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalForwardingRulesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/global_network_endpoint_groups_client.go b/compute/apiv1/global_network_endpoint_groups_client.go index 21828b42b19f..8cfd3e52f8c8 100644 --- a/compute/apiv1/global_network_endpoint_groups_client.go +++ b/compute/apiv1/global_network_endpoint_groups_client.go @@ -106,7 +106,8 @@ func (c *GlobalNetworkEndpointGroupsClient) setGoogleClientInfo(keyval ...string // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GlobalNetworkEndpointGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *globalNetworkEndpointGroupsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *globalNetworkEndpointGroupsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/global_network_endpoint_groups_client_example_test.go b/compute/apiv1/global_network_endpoint_groups_client_example_test.go index c1f1c3809efb..ddd9b769ddfc 100644 --- a/compute/apiv1/global_network_endpoint_groups_client_example_test.go +++ b/compute/apiv1/global_network_endpoint_groups_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGlobalNetworkEndpointGroupsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGlobalNetworkEndpointGroupsRESTClient() { func ExampleGlobalNetworkEndpointGroupsClient_AttachNetworkEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleGlobalNetworkEndpointGroupsClient_AttachNetworkEndpoints() { func ExampleGlobalNetworkEndpointGroupsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleGlobalNetworkEndpointGroupsClient_Delete() { func ExampleGlobalNetworkEndpointGroupsClient_DetachNetworkEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleGlobalNetworkEndpointGroupsClient_DetachNetworkEndpoints() { func ExampleGlobalNetworkEndpointGroupsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleGlobalNetworkEndpointGroupsClient_Get() { func ExampleGlobalNetworkEndpointGroupsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleGlobalNetworkEndpointGroupsClient_Insert() { func ExampleGlobalNetworkEndpointGroupsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleGlobalNetworkEndpointGroupsClient_List() { func ExampleGlobalNetworkEndpointGroupsClient_ListNetworkEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/global_operations_client.go b/compute/apiv1/global_operations_client.go index c3e9898c7bfd..ab1757e598ee 100644 --- a/compute/apiv1/global_operations_client.go +++ b/compute/apiv1/global_operations_client.go @@ -100,7 +100,8 @@ func (c *GlobalOperationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GlobalOperationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -194,7 +195,7 @@ func (c *globalOperationsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *globalOperationsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/global_operations_client_example_test.go b/compute/apiv1/global_operations_client_example_test.go index b02d48c0a9b7..a1546ef0058b 100644 --- a/compute/apiv1/global_operations_client_example_test.go +++ b/compute/apiv1/global_operations_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGlobalOperationsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGlobalOperationsRESTClient() { func ExampleGlobalOperationsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleGlobalOperationsClient_AggregatedList() { func ExampleGlobalOperationsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleGlobalOperationsClient_Delete() { func ExampleGlobalOperationsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleGlobalOperationsClient_Get() { func ExampleGlobalOperationsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleGlobalOperationsClient_List() { func ExampleGlobalOperationsClient_Wait() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/global_organization_operations_client.go b/compute/apiv1/global_organization_operations_client.go index a5d3fee98c70..351c4bf6cd9c 100644 --- a/compute/apiv1/global_organization_operations_client.go +++ b/compute/apiv1/global_organization_operations_client.go @@ -93,7 +93,8 @@ func (c *GlobalOrganizationOperationsClient) setGoogleClientInfo(keyval ...strin // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GlobalOrganizationOperationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -177,7 +178,7 @@ func (c *globalOrganizationOperationsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *globalOrganizationOperationsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/global_organization_operations_client_example_test.go b/compute/apiv1/global_organization_operations_client_example_test.go index 6dc645792b6d..9d62310e57fd 100644 --- a/compute/apiv1/global_organization_operations_client_example_test.go +++ b/compute/apiv1/global_organization_operations_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGlobalOrganizationOperationsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGlobalOrganizationOperationsRESTClient() { func ExampleGlobalOrganizationOperationsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleGlobalOrganizationOperationsClient_Delete() { func ExampleGlobalOrganizationOperationsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleGlobalOrganizationOperationsClient_Get() { func ExampleGlobalOrganizationOperationsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/global_public_delegated_prefixes_client.go b/compute/apiv1/global_public_delegated_prefixes_client.go index f26870f38708..6e90cff89332 100644 --- a/compute/apiv1/global_public_delegated_prefixes_client.go +++ b/compute/apiv1/global_public_delegated_prefixes_client.go @@ -100,7 +100,8 @@ func (c *GlobalPublicDelegatedPrefixesClient) setGoogleClientInfo(keyval ...stri // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GlobalPublicDelegatedPrefixesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,7 +211,7 @@ func (c *globalPublicDelegatedPrefixesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *globalPublicDelegatedPrefixesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/global_public_delegated_prefixes_client_example_test.go b/compute/apiv1/global_public_delegated_prefixes_client_example_test.go index 398a6edd138b..d5c72a01b762 100644 --- a/compute/apiv1/global_public_delegated_prefixes_client_example_test.go +++ b/compute/apiv1/global_public_delegated_prefixes_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGlobalPublicDelegatedPrefixesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGlobalPublicDelegatedPrefixesRESTClient() { func ExampleGlobalPublicDelegatedPrefixesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleGlobalPublicDelegatedPrefixesClient_Delete() { func ExampleGlobalPublicDelegatedPrefixesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleGlobalPublicDelegatedPrefixesClient_Get() { func ExampleGlobalPublicDelegatedPrefixesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleGlobalPublicDelegatedPrefixesClient_Insert() { func ExampleGlobalPublicDelegatedPrefixesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleGlobalPublicDelegatedPrefixesClient_List() { func ExampleGlobalPublicDelegatedPrefixesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/health_checks_client.go b/compute/apiv1/health_checks_client.go index 34325ac69381..9a5fff077e90 100644 --- a/compute/apiv1/health_checks_client.go +++ b/compute/apiv1/health_checks_client.go @@ -107,7 +107,8 @@ func (c *HealthChecksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *HealthChecksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -227,7 +228,7 @@ func (c *healthChecksRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *healthChecksRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/health_checks_client_example_test.go b/compute/apiv1/health_checks_client_example_test.go index c628e4ab3e1e..2a233a0a3959 100644 --- a/compute/apiv1/health_checks_client_example_test.go +++ b/compute/apiv1/health_checks_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewHealthChecksRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewHealthChecksRESTClient() { func ExampleHealthChecksClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleHealthChecksClient_AggregatedList() { func ExampleHealthChecksClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleHealthChecksClient_Delete() { func ExampleHealthChecksClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleHealthChecksClient_Get() { func ExampleHealthChecksClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleHealthChecksClient_Insert() { func ExampleHealthChecksClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleHealthChecksClient_List() { func ExampleHealthChecksClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleHealthChecksClient_Patch() { func ExampleHealthChecksClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/image_family_views_client.go b/compute/apiv1/image_family_views_client.go index 216f48499c0b..3e4e5eaba43e 100644 --- a/compute/apiv1/image_family_views_client.go +++ b/compute/apiv1/image_family_views_client.go @@ -84,7 +84,8 @@ func (c *ImageFamilyViewsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ImageFamilyViewsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -158,7 +159,7 @@ func (c *imageFamilyViewsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *imageFamilyViewsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/image_family_views_client_example_test.go b/compute/apiv1/image_family_views_client_example_test.go index dc92550210c9..c2dda7100cba 100644 --- a/compute/apiv1/image_family_views_client_example_test.go +++ b/compute/apiv1/image_family_views_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewImageFamilyViewsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImageFamilyViewsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewImageFamilyViewsRESTClient() { func ExampleImageFamilyViewsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImageFamilyViewsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/images_client.go b/compute/apiv1/images_client.go index e4dd01339e9a..7711f5465848 100644 --- a/compute/apiv1/images_client.go +++ b/compute/apiv1/images_client.go @@ -118,7 +118,8 @@ func (c *ImagesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ImagesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -258,7 +259,7 @@ func (c *imagesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *imagesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/images_client_example_test.go b/compute/apiv1/images_client_example_test.go index 32c3f678a51b..e3716cd77db4 100644 --- a/compute/apiv1/images_client_example_test.go +++ b/compute/apiv1/images_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewImagesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewImagesRESTClient() { func ExampleImagesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleImagesClient_Delete() { func ExampleImagesClient_Deprecate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleImagesClient_Deprecate() { func ExampleImagesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleImagesClient_Get() { func ExampleImagesClient_GetFromFamily() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleImagesClient_GetFromFamily() { func ExampleImagesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleImagesClient_GetIamPolicy() { func ExampleImagesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +202,11 @@ func ExampleImagesClient_Insert() { func ExampleImagesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -193,6 +233,11 @@ func ExampleImagesClient_List() { func ExampleImagesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -216,6 +261,11 @@ func ExampleImagesClient_Patch() { func ExampleImagesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -236,6 +286,11 @@ func ExampleImagesClient_SetIamPolicy() { func ExampleImagesClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -259,6 +314,11 @@ func ExampleImagesClient_SetLabels() { func ExampleImagesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewImagesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/instance_group_managers_client.go b/compute/apiv1/instance_group_managers_client.go index 5e7560ca2c0f..514a3a3e9682 100644 --- a/compute/apiv1/instance_group_managers_client.go +++ b/compute/apiv1/instance_group_managers_client.go @@ -146,7 +146,8 @@ func (c *InstanceGroupManagersClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InstanceGroupManagersClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -206,7 +207,7 @@ func (c *InstanceGroupManagersClient) ListErrors(ctx context.Context, req *compu return c.internalClient.ListErrors(ctx, req, opts...) } -// ListManagedInstances lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. +// ListManagedInstances lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group’s listManagedInstancesResults field is set to PAGINATED. func (c *InstanceGroupManagersClient) ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesInstanceGroupManagersRequest, opts ...gax.CallOption) *ManagedInstanceIterator { return c.internalClient.ListManagedInstances(ctx, req, opts...) } @@ -331,7 +332,7 @@ func (c *instanceGroupManagersRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *instanceGroupManagersRESTClient) Connection() *grpc.ClientConn { return nil } @@ -1191,7 +1192,7 @@ func (c *instanceGroupManagersRESTClient) ListErrors(ctx context.Context, req *c return it } -// ListManagedInstances lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. +// ListManagedInstances lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group’s listManagedInstancesResults field is set to PAGINATED. func (c *instanceGroupManagersRESTClient) ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesInstanceGroupManagersRequest, opts ...gax.CallOption) *ManagedInstanceIterator { it := &ManagedInstanceIterator{} req = proto.Clone(req).(*computepb.ListManagedInstancesInstanceGroupManagersRequest) diff --git a/compute/apiv1/instance_group_managers_client_example_test.go b/compute/apiv1/instance_group_managers_client_example_test.go index 9b42406b42e8..791d8158b53d 100644 --- a/compute/apiv1/instance_group_managers_client_example_test.go +++ b/compute/apiv1/instance_group_managers_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInstanceGroupManagersRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInstanceGroupManagersRESTClient() { func ExampleInstanceGroupManagersClient_AbandonInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleInstanceGroupManagersClient_AbandonInstances() { func ExampleInstanceGroupManagersClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleInstanceGroupManagersClient_AggregatedList() { func ExampleInstanceGroupManagersClient_ApplyUpdatesToInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleInstanceGroupManagersClient_ApplyUpdatesToInstances() { func ExampleInstanceGroupManagersClient_CreateInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleInstanceGroupManagersClient_CreateInstances() { func ExampleInstanceGroupManagersClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleInstanceGroupManagersClient_Delete() { func ExampleInstanceGroupManagersClient_DeleteInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleInstanceGroupManagersClient_DeleteInstances() { func ExampleInstanceGroupManagersClient_DeletePerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleInstanceGroupManagersClient_DeletePerInstanceConfigs() { func ExampleInstanceGroupManagersClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleInstanceGroupManagersClient_Get() { func ExampleInstanceGroupManagersClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleInstanceGroupManagersClient_Insert() { func ExampleInstanceGroupManagersClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +326,11 @@ func ExampleInstanceGroupManagersClient_List() { func ExampleInstanceGroupManagersClient_ListErrors() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -297,6 +357,11 @@ func ExampleInstanceGroupManagersClient_ListErrors() { func ExampleInstanceGroupManagersClient_ListManagedInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -323,6 +388,11 @@ func ExampleInstanceGroupManagersClient_ListManagedInstances() { func ExampleInstanceGroupManagersClient_ListPerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -349,6 +419,11 @@ func ExampleInstanceGroupManagersClient_ListPerInstanceConfigs() { func ExampleInstanceGroupManagersClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -372,6 +447,11 @@ func ExampleInstanceGroupManagersClient_Patch() { func ExampleInstanceGroupManagersClient_PatchPerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -395,6 +475,11 @@ func ExampleInstanceGroupManagersClient_PatchPerInstanceConfigs() { func ExampleInstanceGroupManagersClient_RecreateInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -418,6 +503,11 @@ func ExampleInstanceGroupManagersClient_RecreateInstances() { func ExampleInstanceGroupManagersClient_Resize() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -441,6 +531,11 @@ func ExampleInstanceGroupManagersClient_Resize() { func ExampleInstanceGroupManagersClient_SetInstanceTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -464,6 +559,11 @@ func ExampleInstanceGroupManagersClient_SetInstanceTemplate() { func ExampleInstanceGroupManagersClient_SetTargetPools() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -487,6 +587,11 @@ func ExampleInstanceGroupManagersClient_SetTargetPools() { func ExampleInstanceGroupManagersClient_UpdatePerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/instance_groups_client.go b/compute/apiv1/instance_groups_client.go index 3ccf31d2c5cb..a1c50573ddd5 100644 --- a/compute/apiv1/instance_groups_client.go +++ b/compute/apiv1/instance_groups_client.go @@ -113,7 +113,8 @@ func (c *InstanceGroupsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InstanceGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -243,7 +244,7 @@ func (c *instanceGroupsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *instanceGroupsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/instance_groups_client_example_test.go b/compute/apiv1/instance_groups_client_example_test.go index 856c83895a9a..ac0f98bf5490 100644 --- a/compute/apiv1/instance_groups_client_example_test.go +++ b/compute/apiv1/instance_groups_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInstanceGroupsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInstanceGroupsRESTClient() { func ExampleInstanceGroupsClient_AddInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleInstanceGroupsClient_AddInstances() { func ExampleInstanceGroupsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleInstanceGroupsClient_AggregatedList() { func ExampleInstanceGroupsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleInstanceGroupsClient_Delete() { func ExampleInstanceGroupsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleInstanceGroupsClient_Get() { func ExampleInstanceGroupsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleInstanceGroupsClient_Insert() { func ExampleInstanceGroupsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleInstanceGroupsClient_List() { func ExampleInstanceGroupsClient_ListInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +245,11 @@ func ExampleInstanceGroupsClient_ListInstances() { func ExampleInstanceGroupsClient_RemoveInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +273,11 @@ func ExampleInstanceGroupsClient_RemoveInstances() { func ExampleInstanceGroupsClient_SetNamedPorts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/instance_templates_client.go b/compute/apiv1/instance_templates_client.go index b76c1d88da03..ac9a23d3b628 100644 --- a/compute/apiv1/instance_templates_client.go +++ b/compute/apiv1/instance_templates_client.go @@ -106,7 +106,8 @@ func (c *InstanceTemplatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InstanceTemplatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *instanceTemplatesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *instanceTemplatesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/instance_templates_client_example_test.go b/compute/apiv1/instance_templates_client_example_test.go index 11a4789bc786..c55d3881bfd1 100644 --- a/compute/apiv1/instance_templates_client_example_test.go +++ b/compute/apiv1/instance_templates_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInstanceTemplatesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInstanceTemplatesRESTClient() { func ExampleInstanceTemplatesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleInstanceTemplatesClient_Delete() { func ExampleInstanceTemplatesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleInstanceTemplatesClient_Get() { func ExampleInstanceTemplatesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleInstanceTemplatesClient_GetIamPolicy() { func ExampleInstanceTemplatesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleInstanceTemplatesClient_Insert() { func ExampleInstanceTemplatesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleInstanceTemplatesClient_List() { func ExampleInstanceTemplatesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleInstanceTemplatesClient_SetIamPolicy() { func ExampleInstanceTemplatesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstanceTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/instances_client.go b/compute/apiv1/instances_client.go index 023966dffffa..7cf86d452525 100644 --- a/compute/apiv1/instances_client.go +++ b/compute/apiv1/instances_client.go @@ -221,7 +221,8 @@ func (c *InstancesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InstancesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -246,7 +247,7 @@ func (c *InstancesClient) AttachDisk(ctx context.Context, req *computepb.AttachD return c.internalClient.AttachDisk(ctx, req, opts...) } -// BulkInsert creates multiple instances. Count specifies the number of instances to create. +// BulkInsert creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs. func (c *InstancesClient) BulkInsert(ctx context.Context, req *computepb.BulkInsertInstanceRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.BulkInsert(ctx, req, opts...) } @@ -531,7 +532,7 @@ func (c *instancesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *instancesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -871,7 +872,7 @@ func (c *instancesRESTClient) AttachDisk(ctx context.Context, req *computepb.Att return op, nil } -// BulkInsert creates multiple instances. Count specifies the number of instances to create. +// BulkInsert creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs. func (c *instancesRESTClient) BulkInsert(ctx context.Context, req *computepb.BulkInsertInstanceRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetBulkInsertInstanceResourceResource() diff --git a/compute/apiv1/instances_client_example_test.go b/compute/apiv1/instances_client_example_test.go index 9c144acc52fb..a1b51a4d4ad2 100644 --- a/compute/apiv1/instances_client_example_test.go +++ b/compute/apiv1/instances_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInstancesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInstancesRESTClient() { func ExampleInstancesClient_AddAccessConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleInstancesClient_AddAccessConfig() { func ExampleInstancesClient_AddResourcePolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleInstancesClient_AddResourcePolicies() { func ExampleInstancesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleInstancesClient_AggregatedList() { func ExampleInstancesClient_AttachDisk() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleInstancesClient_AttachDisk() { func ExampleInstancesClient_BulkInsert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleInstancesClient_BulkInsert() { func ExampleInstancesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleInstancesClient_Delete() { func ExampleInstancesClient_DeleteAccessConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleInstancesClient_DeleteAccessConfig() { func ExampleInstancesClient_DetachDisk() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +270,11 @@ func ExampleInstancesClient_DetachDisk() { func ExampleInstancesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleInstancesClient_Get() { func ExampleInstancesClient_GetEffectiveFirewalls() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -265,6 +320,11 @@ func ExampleInstancesClient_GetEffectiveFirewalls() { func ExampleInstancesClient_GetGuestAttributes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -285,6 +345,11 @@ func ExampleInstancesClient_GetGuestAttributes() { func ExampleInstancesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -305,6 +370,11 @@ func ExampleInstancesClient_GetIamPolicy() { func ExampleInstancesClient_GetScreenshot() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -325,6 +395,11 @@ func ExampleInstancesClient_GetScreenshot() { func ExampleInstancesClient_GetSerialPortOutput() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -345,6 +420,11 @@ func ExampleInstancesClient_GetSerialPortOutput() { func ExampleInstancesClient_GetShieldedInstanceIdentity() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -365,6 +445,11 @@ func ExampleInstancesClient_GetShieldedInstanceIdentity() { func ExampleInstancesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -388,6 +473,11 @@ func ExampleInstancesClient_Insert() { func ExampleInstancesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -414,6 +504,11 @@ func ExampleInstancesClient_List() { func ExampleInstancesClient_ListReferrers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -440,6 +535,11 @@ func ExampleInstancesClient_ListReferrers() { func ExampleInstancesClient_RemoveResourcePolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -463,6 +563,11 @@ func ExampleInstancesClient_RemoveResourcePolicies() { func ExampleInstancesClient_Reset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -486,6 +591,11 @@ func ExampleInstancesClient_Reset() { func ExampleInstancesClient_Resume() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -509,6 +619,11 @@ func ExampleInstancesClient_Resume() { func ExampleInstancesClient_SendDiagnosticInterrupt() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -529,6 +644,11 @@ func ExampleInstancesClient_SendDiagnosticInterrupt() { func ExampleInstancesClient_SetDeletionProtection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -552,6 +672,11 @@ func ExampleInstancesClient_SetDeletionProtection() { func ExampleInstancesClient_SetDiskAutoDelete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -575,6 +700,11 @@ func ExampleInstancesClient_SetDiskAutoDelete() { func ExampleInstancesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -595,6 +725,11 @@ func ExampleInstancesClient_SetIamPolicy() { func ExampleInstancesClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -618,6 +753,11 @@ func ExampleInstancesClient_SetLabels() { func ExampleInstancesClient_SetMachineResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -641,6 +781,11 @@ func ExampleInstancesClient_SetMachineResources() { func ExampleInstancesClient_SetMachineType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -664,6 +809,11 @@ func ExampleInstancesClient_SetMachineType() { func ExampleInstancesClient_SetMetadata() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -687,6 +837,11 @@ func ExampleInstancesClient_SetMetadata() { func ExampleInstancesClient_SetMinCpuPlatform() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -710,6 +865,11 @@ func ExampleInstancesClient_SetMinCpuPlatform() { func ExampleInstancesClient_SetScheduling() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -733,6 +893,11 @@ func ExampleInstancesClient_SetScheduling() { func ExampleInstancesClient_SetServiceAccount() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -756,6 +921,11 @@ func ExampleInstancesClient_SetServiceAccount() { func ExampleInstancesClient_SetShieldedInstanceIntegrityPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -779,6 +949,11 @@ func ExampleInstancesClient_SetShieldedInstanceIntegrityPolicy() { func ExampleInstancesClient_SetTags() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -802,6 +977,11 @@ func ExampleInstancesClient_SetTags() { func ExampleInstancesClient_SimulateMaintenanceEvent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -825,6 +1005,11 @@ func ExampleInstancesClient_SimulateMaintenanceEvent() { func ExampleInstancesClient_Start() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -848,6 +1033,11 @@ func ExampleInstancesClient_Start() { func ExampleInstancesClient_StartWithEncryptionKey() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -871,6 +1061,11 @@ func ExampleInstancesClient_StartWithEncryptionKey() { func ExampleInstancesClient_Stop() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -894,6 +1089,11 @@ func ExampleInstancesClient_Stop() { func ExampleInstancesClient_Suspend() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -917,6 +1117,11 @@ func ExampleInstancesClient_Suspend() { func ExampleInstancesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -937,6 +1142,11 @@ func ExampleInstancesClient_TestIamPermissions() { func ExampleInstancesClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -960,6 +1170,11 @@ func ExampleInstancesClient_Update() { func ExampleInstancesClient_UpdateAccessConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -983,6 +1198,11 @@ func ExampleInstancesClient_UpdateAccessConfig() { func ExampleInstancesClient_UpdateDisplayDevice() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -1006,6 +1226,11 @@ func ExampleInstancesClient_UpdateDisplayDevice() { func ExampleInstancesClient_UpdateNetworkInterface() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -1029,6 +1254,11 @@ func ExampleInstancesClient_UpdateNetworkInterface() { func ExampleInstancesClient_UpdateShieldedInstanceConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/interconnect_attachments_client.go b/compute/apiv1/interconnect_attachments_client.go index 2fd324880a20..024bd08ed2dd 100644 --- a/compute/apiv1/interconnect_attachments_client.go +++ b/compute/apiv1/interconnect_attachments_client.go @@ -49,6 +49,7 @@ type InterconnectAttachmentsCallOptions struct { Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption + SetLabels []gax.CallOption } func defaultInterconnectAttachmentsRESTCallOptions() *InterconnectAttachmentsCallOptions { @@ -59,6 +60,7 @@ func defaultInterconnectAttachmentsRESTCallOptions() *InterconnectAttachmentsCal Insert: []gax.CallOption{}, List: []gax.CallOption{}, Patch: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -73,6 +75,7 @@ type internalInterconnectAttachmentsClient interface { Insert(context.Context, *computepb.InsertInterconnectAttachmentRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListInterconnectAttachmentsRequest, ...gax.CallOption) *InterconnectAttachmentIterator Patch(context.Context, *computepb.PatchInterconnectAttachmentRequest, ...gax.CallOption) (*Operation, error) + SetLabels(context.Context, *computepb.SetLabelsInterconnectAttachmentRequest, ...gax.CallOption) (*Operation, error) } // InterconnectAttachmentsClient is a client for interacting with Google Compute Engine API. @@ -104,7 +107,8 @@ func (c *InterconnectAttachmentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InterconnectAttachmentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -139,6 +143,11 @@ func (c *InterconnectAttachmentsClient) Patch(ctx context.Context, req *computep return c.internalClient.Patch(ctx, req, opts...) } +// SetLabels sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. +func (c *InterconnectAttachmentsClient) SetLabels(ctx context.Context, req *computepb.SetLabelsInterconnectAttachmentRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type interconnectAttachmentsRESTClient struct { // The http endpoint to connect to. @@ -219,7 +228,7 @@ func (c *interconnectAttachmentsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *interconnectAttachmentsRESTClient) Connection() *grpc.ClientConn { return nil } @@ -700,6 +709,81 @@ func (c *interconnectAttachmentsRESTClient) Patch(ctx context.Context, req *comp return op, nil } +// SetLabels sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. +func (c *interconnectAttachmentsRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsInterconnectAttachmentRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetRegionSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/interconnectAttachments/%v/setLabels", req.GetProject(), req.GetRegion(), req.GetResource()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + // InterconnectAttachmentIterator manages a stream of *computepb.InterconnectAttachment. type InterconnectAttachmentIterator struct { items []*computepb.InterconnectAttachment diff --git a/compute/apiv1/interconnect_attachments_client_example_test.go b/compute/apiv1/interconnect_attachments_client_example_test.go index 8562e6774774..c6ae6a794027 100644 --- a/compute/apiv1/interconnect_attachments_client_example_test.go +++ b/compute/apiv1/interconnect_attachments_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInterconnectAttachmentsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInterconnectAttachmentsRESTClient() { func ExampleInterconnectAttachmentsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleInterconnectAttachmentsClient_AggregatedList() { func ExampleInterconnectAttachmentsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleInterconnectAttachmentsClient_Delete() { func ExampleInterconnectAttachmentsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleInterconnectAttachmentsClient_Get() { func ExampleInterconnectAttachmentsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleInterconnectAttachmentsClient_Insert() { func ExampleInterconnectAttachmentsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleInterconnectAttachmentsClient_List() { func ExampleInterconnectAttachmentsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,3 +211,31 @@ func ExampleInterconnectAttachmentsClient_Patch() { // TODO: Handle error. } } + +func ExampleInterconnectAttachmentsClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewInterconnectAttachmentsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsInterconnectAttachmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsInterconnectAttachmentRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/interconnect_locations_client.go b/compute/apiv1/interconnect_locations_client.go index 36b6a3d78052..fe99819b4eae 100644 --- a/compute/apiv1/interconnect_locations_client.go +++ b/compute/apiv1/interconnect_locations_client.go @@ -90,7 +90,8 @@ func (c *InterconnectLocationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InterconnectLocationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -169,7 +170,7 @@ func (c *interconnectLocationsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *interconnectLocationsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/interconnect_locations_client_example_test.go b/compute/apiv1/interconnect_locations_client_example_test.go index 69c45c79125c..41b6de2210d7 100644 --- a/compute/apiv1/interconnect_locations_client_example_test.go +++ b/compute/apiv1/interconnect_locations_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInterconnectLocationsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectLocationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInterconnectLocationsRESTClient() { func ExampleInterconnectLocationsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectLocationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleInterconnectLocationsClient_Get() { func ExampleInterconnectLocationsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectLocationsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/interconnects_client.go b/compute/apiv1/interconnects_client.go index 581b610dfdf5..cc7eeed48c15 100644 --- a/compute/apiv1/interconnects_client.go +++ b/compute/apiv1/interconnects_client.go @@ -48,6 +48,7 @@ type InterconnectsCallOptions struct { Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption + SetLabels []gax.CallOption } func defaultInterconnectsRESTCallOptions() *InterconnectsCallOptions { @@ -58,6 +59,7 @@ func defaultInterconnectsRESTCallOptions() *InterconnectsCallOptions { Insert: []gax.CallOption{}, List: []gax.CallOption{}, Patch: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -72,6 +74,7 @@ type internalInterconnectsClient interface { Insert(context.Context, *computepb.InsertInterconnectRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListInterconnectsRequest, ...gax.CallOption) *InterconnectIterator Patch(context.Context, *computepb.PatchInterconnectRequest, ...gax.CallOption) (*Operation, error) + SetLabels(context.Context, *computepb.SetLabelsInterconnectRequest, ...gax.CallOption) (*Operation, error) } // InterconnectsClient is a client for interacting with Google Compute Engine API. @@ -103,7 +106,8 @@ func (c *InterconnectsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *InterconnectsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -138,6 +142,11 @@ func (c *InterconnectsClient) Patch(ctx context.Context, req *computepb.PatchInt return c.internalClient.Patch(ctx, req, opts...) } +// SetLabels sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. +func (c *InterconnectsClient) SetLabels(ctx context.Context, req *computepb.SetLabelsInterconnectRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type interconnectsRESTClient struct { // The http endpoint to connect to. @@ -218,7 +227,7 @@ func (c *interconnectsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *interconnectsRESTClient) Connection() *grpc.ClientConn { return nil } @@ -640,6 +649,73 @@ func (c *interconnectsRESTClient) Patch(ctx context.Context, req *computepb.Patc return op, nil } +// SetLabels sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. +func (c *interconnectsRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsInterconnectRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetGlobalSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/interconnects/%v/setLabels", req.GetProject(), req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + &globalOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + }, + } + return op, nil +} + // InterconnectIterator manages a stream of *computepb.Interconnect. type InterconnectIterator struct { items []*computepb.Interconnect diff --git a/compute/apiv1/interconnects_client_example_test.go b/compute/apiv1/interconnects_client_example_test.go index 65e736fb6914..4f2730375010 100644 --- a/compute/apiv1/interconnects_client_example_test.go +++ b/compute/apiv1/interconnects_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewInterconnectsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewInterconnectsRESTClient() { func ExampleInterconnectsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleInterconnectsClient_Delete() { func ExampleInterconnectsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleInterconnectsClient_Get() { func ExampleInterconnectsClient_GetDiagnostics() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleInterconnectsClient_GetDiagnostics() { func ExampleInterconnectsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleInterconnectsClient_Insert() { func ExampleInterconnectsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleInterconnectsClient_List() { func ExampleInterconnectsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewInterconnectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,3 +205,31 @@ func ExampleInterconnectsClient_Patch() { // TODO: Handle error. } } + +func ExampleInterconnectsClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewInterconnectsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsInterconnectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsInterconnectRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/license_codes_client.go b/compute/apiv1/license_codes_client.go index 9e8e6781187f..3e1c3bde0d05 100644 --- a/compute/apiv1/license_codes_client.go +++ b/compute/apiv1/license_codes_client.go @@ -88,7 +88,8 @@ func (c *LicenseCodesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *LicenseCodesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -167,7 +168,7 @@ func (c *licenseCodesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *licenseCodesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/license_codes_client_example_test.go b/compute/apiv1/license_codes_client_example_test.go index 2dabbbb6bccd..5a783aa6bf0f 100644 --- a/compute/apiv1/license_codes_client_example_test.go +++ b/compute/apiv1/license_codes_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewLicenseCodesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicenseCodesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewLicenseCodesRESTClient() { func ExampleLicenseCodesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicenseCodesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExampleLicenseCodesClient_Get() { func ExampleLicenseCodesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicenseCodesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/licenses_client.go b/compute/apiv1/licenses_client.go index f285cb423145..f15a762dbe09 100644 --- a/compute/apiv1/licenses_client.go +++ b/compute/apiv1/licenses_client.go @@ -106,7 +106,8 @@ func (c *LicensesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *LicensesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *licensesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *licensesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/licenses_client_example_test.go b/compute/apiv1/licenses_client_example_test.go index e88b2f058e3d..31aeda986adb 100644 --- a/compute/apiv1/licenses_client_example_test.go +++ b/compute/apiv1/licenses_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewLicensesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewLicensesRESTClient() { func ExampleLicensesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleLicensesClient_Delete() { func ExampleLicensesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleLicensesClient_Get() { func ExampleLicensesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleLicensesClient_GetIamPolicy() { func ExampleLicensesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleLicensesClient_Insert() { func ExampleLicensesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleLicensesClient_List() { func ExampleLicensesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleLicensesClient_SetIamPolicy() { func ExampleLicensesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewLicensesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/machine_images_client.go b/compute/apiv1/machine_images_client.go index e04d3a093b36..c80785ee58e8 100644 --- a/compute/apiv1/machine_images_client.go +++ b/compute/apiv1/machine_images_client.go @@ -106,7 +106,8 @@ func (c *MachineImagesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MachineImagesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *machineImagesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *machineImagesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/machine_images_client_example_test.go b/compute/apiv1/machine_images_client_example_test.go index 31b85f67138b..2b61beb8cb59 100644 --- a/compute/apiv1/machine_images_client_example_test.go +++ b/compute/apiv1/machine_images_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewMachineImagesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewMachineImagesRESTClient() { func ExampleMachineImagesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleMachineImagesClient_Delete() { func ExampleMachineImagesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleMachineImagesClient_Get() { func ExampleMachineImagesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleMachineImagesClient_GetIamPolicy() { func ExampleMachineImagesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleMachineImagesClient_Insert() { func ExampleMachineImagesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleMachineImagesClient_List() { func ExampleMachineImagesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleMachineImagesClient_SetIamPolicy() { func ExampleMachineImagesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineImagesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/machine_types_client.go b/compute/apiv1/machine_types_client.go index 039d1822e8cf..6ef577f6f72b 100644 --- a/compute/apiv1/machine_types_client.go +++ b/compute/apiv1/machine_types_client.go @@ -94,7 +94,8 @@ func (c *MachineTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MachineTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -178,7 +179,7 @@ func (c *machineTypesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *machineTypesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/machine_types_client_example_test.go b/compute/apiv1/machine_types_client_example_test.go index 281a40bb9c5a..9b8f03b63b8f 100644 --- a/compute/apiv1/machine_types_client_example_test.go +++ b/compute/apiv1/machine_types_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewMachineTypesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewMachineTypesRESTClient() { func ExampleMachineTypesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleMachineTypesClient_AggregatedList() { func ExampleMachineTypesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleMachineTypesClient_Get() { func ExampleMachineTypesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewMachineTypesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/network_edge_security_services_client.go b/compute/apiv1/network_edge_security_services_client.go index b6f917274e65..0423738f83f5 100644 --- a/compute/apiv1/network_edge_security_services_client.go +++ b/compute/apiv1/network_edge_security_services_client.go @@ -101,7 +101,8 @@ func (c *NetworkEdgeSecurityServicesClient) setGoogleClientInfo(keyval ...string // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NetworkEdgeSecurityServicesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -211,7 +212,7 @@ func (c *networkEdgeSecurityServicesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *networkEdgeSecurityServicesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/network_edge_security_services_client_example_test.go b/compute/apiv1/network_edge_security_services_client_example_test.go index 018bf3c85a55..2a1697015ebd 100644 --- a/compute/apiv1/network_edge_security_services_client_example_test.go +++ b/compute/apiv1/network_edge_security_services_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNetworkEdgeSecurityServicesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEdgeSecurityServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNetworkEdgeSecurityServicesRESTClient() { func ExampleNetworkEdgeSecurityServicesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEdgeSecurityServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleNetworkEdgeSecurityServicesClient_AggregatedList() { func ExampleNetworkEdgeSecurityServicesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEdgeSecurityServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleNetworkEdgeSecurityServicesClient_Delete() { func ExampleNetworkEdgeSecurityServicesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEdgeSecurityServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleNetworkEdgeSecurityServicesClient_Get() { func ExampleNetworkEdgeSecurityServicesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEdgeSecurityServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleNetworkEdgeSecurityServicesClient_Insert() { func ExampleNetworkEdgeSecurityServicesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEdgeSecurityServicesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/network_endpoint_groups_client.go b/compute/apiv1/network_endpoint_groups_client.go index 0108e72f581f..3082c35d753d 100644 --- a/compute/apiv1/network_endpoint_groups_client.go +++ b/compute/apiv1/network_endpoint_groups_client.go @@ -113,7 +113,8 @@ func (c *NetworkEndpointGroupsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NetworkEndpointGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -243,7 +244,7 @@ func (c *networkEndpointGroupsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *networkEndpointGroupsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/network_endpoint_groups_client_example_test.go b/compute/apiv1/network_endpoint_groups_client_example_test.go index a73ad44940c2..d97b1f05fb49 100644 --- a/compute/apiv1/network_endpoint_groups_client_example_test.go +++ b/compute/apiv1/network_endpoint_groups_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNetworkEndpointGroupsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNetworkEndpointGroupsRESTClient() { func ExampleNetworkEndpointGroupsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleNetworkEndpointGroupsClient_AggregatedList() { func ExampleNetworkEndpointGroupsClient_AttachNetworkEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleNetworkEndpointGroupsClient_AttachNetworkEndpoints() { func ExampleNetworkEndpointGroupsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleNetworkEndpointGroupsClient_Delete() { func ExampleNetworkEndpointGroupsClient_DetachNetworkEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleNetworkEndpointGroupsClient_DetachNetworkEndpoints() { func ExampleNetworkEndpointGroupsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleNetworkEndpointGroupsClient_Get() { func ExampleNetworkEndpointGroupsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleNetworkEndpointGroupsClient_Insert() { func ExampleNetworkEndpointGroupsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleNetworkEndpointGroupsClient_List() { func ExampleNetworkEndpointGroupsClient_ListNetworkEndpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +273,11 @@ func ExampleNetworkEndpointGroupsClient_ListNetworkEndpoints() { func ExampleNetworkEndpointGroupsClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/network_firewall_policies_client.go b/compute/apiv1/network_firewall_policies_client.go index 48d3260dadf0..c60273d5861e 100644 --- a/compute/apiv1/network_firewall_policies_client.go +++ b/compute/apiv1/network_firewall_policies_client.go @@ -133,7 +133,8 @@ func (c *NetworkFirewallPoliciesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NetworkFirewallPoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -298,7 +299,7 @@ func (c *networkFirewallPoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *networkFirewallPoliciesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/network_firewall_policies_client_example_test.go b/compute/apiv1/network_firewall_policies_client_example_test.go index 4a4848166579..5ba92281f1aa 100644 --- a/compute/apiv1/network_firewall_policies_client_example_test.go +++ b/compute/apiv1/network_firewall_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNetworkFirewallPoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNetworkFirewallPoliciesRESTClient() { func ExampleNetworkFirewallPoliciesClient_AddAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleNetworkFirewallPoliciesClient_AddAssociation() { func ExampleNetworkFirewallPoliciesClient_AddRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleNetworkFirewallPoliciesClient_AddRule() { func ExampleNetworkFirewallPoliciesClient_CloneRules() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleNetworkFirewallPoliciesClient_CloneRules() { func ExampleNetworkFirewallPoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleNetworkFirewallPoliciesClient_Delete() { func ExampleNetworkFirewallPoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleNetworkFirewallPoliciesClient_Get() { func ExampleNetworkFirewallPoliciesClient_GetAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleNetworkFirewallPoliciesClient_GetAssociation() { func ExampleNetworkFirewallPoliciesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleNetworkFirewallPoliciesClient_GetIamPolicy() { func ExampleNetworkFirewallPoliciesClient_GetRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -210,6 +255,11 @@ func ExampleNetworkFirewallPoliciesClient_GetRule() { func ExampleNetworkFirewallPoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -233,6 +283,11 @@ func ExampleNetworkFirewallPoliciesClient_Insert() { func ExampleNetworkFirewallPoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -259,6 +314,11 @@ func ExampleNetworkFirewallPoliciesClient_List() { func ExampleNetworkFirewallPoliciesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -282,6 +342,11 @@ func ExampleNetworkFirewallPoliciesClient_Patch() { func ExampleNetworkFirewallPoliciesClient_PatchRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -305,6 +370,11 @@ func ExampleNetworkFirewallPoliciesClient_PatchRule() { func ExampleNetworkFirewallPoliciesClient_RemoveAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -328,6 +398,11 @@ func ExampleNetworkFirewallPoliciesClient_RemoveAssociation() { func ExampleNetworkFirewallPoliciesClient_RemoveRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -351,6 +426,11 @@ func ExampleNetworkFirewallPoliciesClient_RemoveRule() { func ExampleNetworkFirewallPoliciesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -371,6 +451,11 @@ func ExampleNetworkFirewallPoliciesClient_SetIamPolicy() { func ExampleNetworkFirewallPoliciesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/networks_client.go b/compute/apiv1/networks_client.go index e518c1de46c4..a14d8b975662 100644 --- a/compute/apiv1/networks_client.go +++ b/compute/apiv1/networks_client.go @@ -118,7 +118,8 @@ func (c *NetworksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NetworksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -258,7 +259,7 @@ func (c *networksRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *networksRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/networks_client_example_test.go b/compute/apiv1/networks_client_example_test.go index 8d5a4c9405df..f8159d5bd8b8 100644 --- a/compute/apiv1/networks_client_example_test.go +++ b/compute/apiv1/networks_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNetworksRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNetworksRESTClient() { func ExampleNetworksClient_AddPeering() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleNetworksClient_AddPeering() { func ExampleNetworksClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleNetworksClient_Delete() { func ExampleNetworksClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleNetworksClient_Get() { func ExampleNetworksClient_GetEffectiveFirewalls() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleNetworksClient_GetEffectiveFirewalls() { func ExampleNetworksClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +177,11 @@ func ExampleNetworksClient_Insert() { func ExampleNetworksClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -173,6 +208,11 @@ func ExampleNetworksClient_List() { func ExampleNetworksClient_ListPeeringRoutes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleNetworksClient_ListPeeringRoutes() { func ExampleNetworksClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleNetworksClient_Patch() { func ExampleNetworksClient_RemovePeering() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleNetworksClient_RemovePeering() { func ExampleNetworksClient_SwitchToCustomMode() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +323,11 @@ func ExampleNetworksClient_SwitchToCustomMode() { func ExampleNetworksClient_UpdatePeering() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNetworksRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/node_groups_client.go b/compute/apiv1/node_groups_client.go index a46b1224b8be..bd3856d4525d 100644 --- a/compute/apiv1/node_groups_client.go +++ b/compute/apiv1/node_groups_client.go @@ -125,7 +125,8 @@ func (c *NodeGroupsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NodeGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -275,7 +276,7 @@ func (c *nodeGroupsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *nodeGroupsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/node_groups_client_example_test.go b/compute/apiv1/node_groups_client_example_test.go index 88accce87201..6e08cbd74171 100644 --- a/compute/apiv1/node_groups_client_example_test.go +++ b/compute/apiv1/node_groups_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNodeGroupsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNodeGroupsRESTClient() { func ExampleNodeGroupsClient_AddNodes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleNodeGroupsClient_AddNodes() { func ExampleNodeGroupsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleNodeGroupsClient_AggregatedList() { func ExampleNodeGroupsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleNodeGroupsClient_Delete() { func ExampleNodeGroupsClient_DeleteNodes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleNodeGroupsClient_DeleteNodes() { func ExampleNodeGroupsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleNodeGroupsClient_Get() { func ExampleNodeGroupsClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -173,6 +208,11 @@ func ExampleNodeGroupsClient_GetIamPolicy() { func ExampleNodeGroupsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleNodeGroupsClient_Insert() { func ExampleNodeGroupsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleNodeGroupsClient_List() { func ExampleNodeGroupsClient_ListNodes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -248,6 +298,11 @@ func ExampleNodeGroupsClient_ListNodes() { func ExampleNodeGroupsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +326,11 @@ func ExampleNodeGroupsClient_Patch() { func ExampleNodeGroupsClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +351,11 @@ func ExampleNodeGroupsClient_SetIamPolicy() { func ExampleNodeGroupsClient_SetNodeTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -314,6 +379,11 @@ func ExampleNodeGroupsClient_SetNodeTemplate() { func ExampleNodeGroupsClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/node_templates_client.go b/compute/apiv1/node_templates_client.go index b72ee6ad6346..7727a3573a65 100644 --- a/compute/apiv1/node_templates_client.go +++ b/compute/apiv1/node_templates_client.go @@ -110,7 +110,8 @@ func (c *NodeTemplatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NodeTemplatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -235,7 +236,7 @@ func (c *nodeTemplatesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *nodeTemplatesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/node_templates_client_example_test.go b/compute/apiv1/node_templates_client_example_test.go index b18990e985ac..ef10a8c3b6ca 100644 --- a/compute/apiv1/node_templates_client_example_test.go +++ b/compute/apiv1/node_templates_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNodeTemplatesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNodeTemplatesRESTClient() { func ExampleNodeTemplatesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleNodeTemplatesClient_AggregatedList() { func ExampleNodeTemplatesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleNodeTemplatesClient_Delete() { func ExampleNodeTemplatesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleNodeTemplatesClient_Get() { func ExampleNodeTemplatesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleNodeTemplatesClient_GetIamPolicy() { func ExampleNodeTemplatesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleNodeTemplatesClient_Insert() { func ExampleNodeTemplatesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleNodeTemplatesClient_List() { func ExampleNodeTemplatesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleNodeTemplatesClient_SetIamPolicy() { func ExampleNodeTemplatesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/node_types_client.go b/compute/apiv1/node_types_client.go index e25eadafe1f3..ce42c1e6c5a4 100644 --- a/compute/apiv1/node_types_client.go +++ b/compute/apiv1/node_types_client.go @@ -94,7 +94,8 @@ func (c *NodeTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *NodeTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -178,7 +179,7 @@ func (c *nodeTypesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *nodeTypesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/node_types_client_example_test.go b/compute/apiv1/node_types_client_example_test.go index c56732db86fb..afbbd391cc9a 100644 --- a/compute/apiv1/node_types_client_example_test.go +++ b/compute/apiv1/node_types_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewNodeTypesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewNodeTypesRESTClient() { func ExampleNodeTypesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleNodeTypesClient_AggregatedList() { func ExampleNodeTypesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleNodeTypesClient_Get() { func ExampleNodeTypesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewNodeTypesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/packet_mirrorings_client.go b/compute/apiv1/packet_mirrorings_client.go index 526c252e897d..fa673f39dd5a 100644 --- a/compute/apiv1/packet_mirrorings_client.go +++ b/compute/apiv1/packet_mirrorings_client.go @@ -107,7 +107,8 @@ func (c *PacketMirroringsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PacketMirroringsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -227,7 +228,7 @@ func (c *packetMirroringsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *packetMirroringsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/packet_mirrorings_client_example_test.go b/compute/apiv1/packet_mirrorings_client_example_test.go index d0178de22f3e..8684e9b1a3e9 100644 --- a/compute/apiv1/packet_mirrorings_client_example_test.go +++ b/compute/apiv1/packet_mirrorings_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewPacketMirroringsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewPacketMirroringsRESTClient() { func ExamplePacketMirroringsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExamplePacketMirroringsClient_AggregatedList() { func ExamplePacketMirroringsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExamplePacketMirroringsClient_Delete() { func ExamplePacketMirroringsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExamplePacketMirroringsClient_Get() { func ExamplePacketMirroringsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExamplePacketMirroringsClient_Insert() { func ExamplePacketMirroringsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExamplePacketMirroringsClient_List() { func ExamplePacketMirroringsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExamplePacketMirroringsClient_Patch() { func ExamplePacketMirroringsClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPacketMirroringsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/projects_client.go b/compute/apiv1/projects_client.go index 016de47a7ccb..b79746f20772 100644 --- a/compute/apiv1/projects_client.go +++ b/compute/apiv1/projects_client.go @@ -124,7 +124,8 @@ func (c *ProjectsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ProjectsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -274,7 +275,7 @@ func (c *projectsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *projectsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/projects_client_example_test.go b/compute/apiv1/projects_client_example_test.go index 0012c42d7ea4..e60ce7cbccbc 100644 --- a/compute/apiv1/projects_client_example_test.go +++ b/compute/apiv1/projects_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewProjectsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewProjectsRESTClient() { func ExampleProjectsClient_DisableXpnHost() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleProjectsClient_DisableXpnHost() { func ExampleProjectsClient_DisableXpnResource() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleProjectsClient_DisableXpnResource() { func ExampleProjectsClient_EnableXpnHost() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleProjectsClient_EnableXpnHost() { func ExampleProjectsClient_EnableXpnResource() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleProjectsClient_EnableXpnResource() { func ExampleProjectsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleProjectsClient_Get() { func ExampleProjectsClient_GetXpnHost() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleProjectsClient_GetXpnHost() { func ExampleProjectsClient_GetXpnResources() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleProjectsClient_GetXpnResources() { func ExampleProjectsClient_ListXpnHosts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleProjectsClient_ListXpnHosts() { func ExampleProjectsClient_MoveDisk() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleProjectsClient_MoveDisk() { func ExampleProjectsClient_MoveInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +323,11 @@ func ExampleProjectsClient_MoveInstance() { func ExampleProjectsClient_SetCommonInstanceMetadata() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +351,11 @@ func ExampleProjectsClient_SetCommonInstanceMetadata() { func ExampleProjectsClient_SetDefaultNetworkTier() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -314,6 +379,11 @@ func ExampleProjectsClient_SetDefaultNetworkTier() { func ExampleProjectsClient_SetUsageExportBucket() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewProjectsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/public_advertised_prefixes_client.go b/compute/apiv1/public_advertised_prefixes_client.go index 5dbd933bc07e..60f87f4479c4 100644 --- a/compute/apiv1/public_advertised_prefixes_client.go +++ b/compute/apiv1/public_advertised_prefixes_client.go @@ -100,7 +100,8 @@ func (c *PublicAdvertisedPrefixesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PublicAdvertisedPrefixesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,7 +211,7 @@ func (c *publicAdvertisedPrefixesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *publicAdvertisedPrefixesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/public_advertised_prefixes_client_example_test.go b/compute/apiv1/public_advertised_prefixes_client_example_test.go index 07f23cd7e5d7..d6133cf720e6 100644 --- a/compute/apiv1/public_advertised_prefixes_client_example_test.go +++ b/compute/apiv1/public_advertised_prefixes_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewPublicAdvertisedPrefixesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewPublicAdvertisedPrefixesRESTClient() { func ExamplePublicAdvertisedPrefixesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExamplePublicAdvertisedPrefixesClient_Delete() { func ExamplePublicAdvertisedPrefixesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExamplePublicAdvertisedPrefixesClient_Get() { func ExamplePublicAdvertisedPrefixesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExamplePublicAdvertisedPrefixesClient_Insert() { func ExamplePublicAdvertisedPrefixesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExamplePublicAdvertisedPrefixesClient_List() { func ExamplePublicAdvertisedPrefixesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/public_delegated_prefixes_client.go b/compute/apiv1/public_delegated_prefixes_client.go index d68ac8f56d73..f3a440c0785f 100644 --- a/compute/apiv1/public_delegated_prefixes_client.go +++ b/compute/apiv1/public_delegated_prefixes_client.go @@ -104,7 +104,8 @@ func (c *PublicDelegatedPrefixesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PublicDelegatedPrefixesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -219,7 +220,7 @@ func (c *publicDelegatedPrefixesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *publicDelegatedPrefixesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/public_delegated_prefixes_client_example_test.go b/compute/apiv1/public_delegated_prefixes_client_example_test.go index 4f5c60ce0857..2013bd8dd991 100644 --- a/compute/apiv1/public_delegated_prefixes_client_example_test.go +++ b/compute/apiv1/public_delegated_prefixes_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewPublicDelegatedPrefixesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewPublicDelegatedPrefixesRESTClient() { func ExamplePublicDelegatedPrefixesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExamplePublicDelegatedPrefixesClient_AggregatedList() { func ExamplePublicDelegatedPrefixesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExamplePublicDelegatedPrefixesClient_Delete() { func ExamplePublicDelegatedPrefixesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExamplePublicDelegatedPrefixesClient_Get() { func ExamplePublicDelegatedPrefixesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExamplePublicDelegatedPrefixesClient_Insert() { func ExamplePublicDelegatedPrefixesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExamplePublicDelegatedPrefixesClient_List() { func ExamplePublicDelegatedPrefixesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_autoscalers_client.go b/compute/apiv1/region_autoscalers_client.go index 98f7478f1e03..a0fe6490513b 100644 --- a/compute/apiv1/region_autoscalers_client.go +++ b/compute/apiv1/region_autoscalers_client.go @@ -103,7 +103,8 @@ func (c *RegionAutoscalersClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionAutoscalersClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,7 +219,7 @@ func (c *regionAutoscalersRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionAutoscalersRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_autoscalers_client_example_test.go b/compute/apiv1/region_autoscalers_client_example_test.go index 21a554391cc6..0c16c23db773 100644 --- a/compute/apiv1/region_autoscalers_client_example_test.go +++ b/compute/apiv1/region_autoscalers_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionAutoscalersRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionAutoscalersRESTClient() { func ExampleRegionAutoscalersClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionAutoscalersClient_Delete() { func ExampleRegionAutoscalersClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionAutoscalersClient_Get() { func ExampleRegionAutoscalersClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionAutoscalersClient_Insert() { func ExampleRegionAutoscalersClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionAutoscalersClient_List() { func ExampleRegionAutoscalersClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleRegionAutoscalersClient_Patch() { func ExampleRegionAutoscalersClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionAutoscalersRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_backend_services_client.go b/compute/apiv1/region_backend_services_client.go index 7305026d6c65..5096901779e9 100644 --- a/compute/apiv1/region_backend_services_client.go +++ b/compute/apiv1/region_backend_services_client.go @@ -42,24 +42,28 @@ var newRegionBackendServicesClientHook clientHook // RegionBackendServicesCallOptions contains the retry settings for each method of RegionBackendServicesClient. type RegionBackendServicesCallOptions struct { - Delete []gax.CallOption - Get []gax.CallOption - GetHealth []gax.CallOption - Insert []gax.CallOption - List []gax.CallOption - Patch []gax.CallOption - Update []gax.CallOption + Delete []gax.CallOption + Get []gax.CallOption + GetHealth []gax.CallOption + GetIamPolicy []gax.CallOption + Insert []gax.CallOption + List []gax.CallOption + Patch []gax.CallOption + SetIamPolicy []gax.CallOption + Update []gax.CallOption } func defaultRegionBackendServicesRESTCallOptions() *RegionBackendServicesCallOptions { return &RegionBackendServicesCallOptions{ - Delete: []gax.CallOption{}, - Get: []gax.CallOption{}, - GetHealth: []gax.CallOption{}, - Insert: []gax.CallOption{}, - List: []gax.CallOption{}, - Patch: []gax.CallOption{}, - Update: []gax.CallOption{}, + Delete: []gax.CallOption{}, + Get: []gax.CallOption{}, + GetHealth: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + Insert: []gax.CallOption{}, + List: []gax.CallOption{}, + Patch: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + Update: []gax.CallOption{}, } } @@ -71,9 +75,11 @@ type internalRegionBackendServicesClient interface { Delete(context.Context, *computepb.DeleteRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error) Get(context.Context, *computepb.GetRegionBackendServiceRequest, ...gax.CallOption) (*computepb.BackendService, error) GetHealth(context.Context, *computepb.GetHealthRegionBackendServiceRequest, ...gax.CallOption) (*computepb.BackendServiceGroupHealth, error) + GetIamPolicy(context.Context, *computepb.GetIamPolicyRegionBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error) Insert(context.Context, *computepb.InsertRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListRegionBackendServicesRequest, ...gax.CallOption) *BackendServiceIterator Patch(context.Context, *computepb.PatchRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error) + SetIamPolicy(context.Context, *computepb.SetIamPolicyRegionBackendServiceRequest, ...gax.CallOption) (*computepb.Policy, error) Update(context.Context, *computepb.UpdateRegionBackendServiceRequest, ...gax.CallOption) (*Operation, error) } @@ -106,7 +112,8 @@ func (c *RegionBackendServicesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionBackendServicesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -126,6 +133,11 @@ func (c *RegionBackendServicesClient) GetHealth(ctx context.Context, req *comput return c.internalClient.GetHealth(ctx, req, opts...) } +// GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists. +func (c *RegionBackendServicesClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + // Insert creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview. func (c *RegionBackendServicesClient) Insert(ctx context.Context, req *computepb.InsertRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.Insert(ctx, req, opts...) @@ -141,6 +153,11 @@ func (c *RegionBackendServicesClient) Patch(ctx context.Context, req *computepb. return c.internalClient.Patch(ctx, req, opts...) } +// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy. +func (c *RegionBackendServicesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + // Update updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview . func (c *RegionBackendServicesClient) Update(ctx context.Context, req *computepb.UpdateRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.Update(ctx, req, opts...) @@ -226,7 +243,7 @@ func (c *regionBackendServicesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionBackendServicesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -412,6 +429,66 @@ func (c *regionBackendServicesRESTClient) GetHealth(ctx context.Context, req *co return resp, nil } +// GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists. +func (c *regionBackendServicesRESTClient) GetIamPolicy(ctx context.Context, req *computepb.GetIamPolicyRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/backendServices/%v/getIamPolicy", req.GetProject(), req.GetRegion(), req.GetResource()) + + params := url.Values{} + if req != nil && req.OptionsRequestedPolicyVersion != nil { + params.Add("optionsRequestedPolicyVersion", fmt.Sprintf("%v", req.GetOptionsRequestedPolicyVersion())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // Insert creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview. func (c *regionBackendServicesRESTClient) Insert(ctx context.Context, req *computepb.InsertRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} @@ -658,6 +735,66 @@ func (c *regionBackendServicesRESTClient) Patch(ctx context.Context, req *comput return op, nil } +// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy. +func (c *regionBackendServicesRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyRegionBackendServiceRequest, opts ...gax.CallOption) (*computepb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetRegionSetPolicyRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/backendServices/%v/setIamPolicy", req.GetProject(), req.GetRegion(), req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // Update updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview . func (c *regionBackendServicesRESTClient) Update(ctx context.Context, req *computepb.UpdateRegionBackendServiceRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} diff --git a/compute/apiv1/region_backend_services_client_example_test.go b/compute/apiv1/region_backend_services_client_example_test.go index 14aeebed616d..32256dbd3d5c 100644 --- a/compute/apiv1/region_backend_services_client_example_test.go +++ b/compute/apiv1/region_backend_services_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionBackendServicesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionBackendServicesRESTClient() { func ExampleRegionBackendServicesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionBackendServicesClient_Delete() { func ExampleRegionBackendServicesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionBackendServicesClient_Get() { func ExampleRegionBackendServicesClient_GetHealth() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -99,8 +119,38 @@ func ExampleRegionBackendServicesClient_GetHealth() { _ = resp } +func ExampleRegionBackendServicesClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionBackendServicesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.GetIamPolicyRegionBackendServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyRegionBackendServiceRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleRegionBackendServicesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +174,11 @@ func ExampleRegionBackendServicesClient_Insert() { func ExampleRegionBackendServicesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +205,11 @@ func ExampleRegionBackendServicesClient_List() { func ExampleRegionBackendServicesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -171,8 +231,38 @@ func ExampleRegionBackendServicesClient_Patch() { } } +func ExampleRegionBackendServicesClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionBackendServicesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetIamPolicyRegionBackendServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyRegionBackendServiceRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleRegionBackendServicesClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionBackendServicesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_commitments_client.go b/compute/apiv1/region_commitments_client.go index 8234ef96c791..ef8032320ab2 100644 --- a/compute/apiv1/region_commitments_client.go +++ b/compute/apiv1/region_commitments_client.go @@ -101,7 +101,8 @@ func (c *RegionCommitmentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionCommitmentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -211,7 +212,7 @@ func (c *regionCommitmentsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionCommitmentsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_commitments_client_example_test.go b/compute/apiv1/region_commitments_client_example_test.go index 1b7ab080c79c..bbb4891a9ffe 100644 --- a/compute/apiv1/region_commitments_client_example_test.go +++ b/compute/apiv1/region_commitments_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionCommitmentsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionCommitmentsRESTClient() { func ExampleRegionCommitmentsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleRegionCommitmentsClient_AggregatedList() { func ExampleRegionCommitmentsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleRegionCommitmentsClient_Get() { func ExampleRegionCommitmentsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleRegionCommitmentsClient_Insert() { func ExampleRegionCommitmentsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleRegionCommitmentsClient_List() { func ExampleRegionCommitmentsClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionCommitmentsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_disk_types_client.go b/compute/apiv1/region_disk_types_client.go index 61a6a53f616a..48a24e98fe3d 100644 --- a/compute/apiv1/region_disk_types_client.go +++ b/compute/apiv1/region_disk_types_client.go @@ -90,7 +90,8 @@ func (c *RegionDiskTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionDiskTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -169,7 +170,7 @@ func (c *regionDiskTypesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionDiskTypesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_disk_types_client_example_test.go b/compute/apiv1/region_disk_types_client_example_test.go index 6c10043f63d7..c3d0c149f2e0 100644 --- a/compute/apiv1/region_disk_types_client_example_test.go +++ b/compute/apiv1/region_disk_types_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionDiskTypesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionDiskTypesRESTClient() { func ExampleRegionDiskTypesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleRegionDiskTypesClient_Get() { func ExampleRegionDiskTypesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDiskTypesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_disks_client.go b/compute/apiv1/region_disks_client.go index 35e4ecc63ae4..12fe8dd29acd 100644 --- a/compute/apiv1/region_disks_client.go +++ b/compute/apiv1/region_disks_client.go @@ -121,7 +121,8 @@ func (c *RegionDisksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionDisksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -266,7 +267,7 @@ func (c *regionDisksRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionDisksRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_disks_client_example_test.go b/compute/apiv1/region_disks_client_example_test.go index e75bb8935ff9..08541637cc60 100644 --- a/compute/apiv1/region_disks_client_example_test.go +++ b/compute/apiv1/region_disks_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionDisksRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionDisksRESTClient() { func ExampleRegionDisksClient_AddResourcePolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionDisksClient_AddResourcePolicies() { func ExampleRegionDisksClient_CreateSnapshot() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleRegionDisksClient_CreateSnapshot() { func ExampleRegionDisksClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleRegionDisksClient_Delete() { func ExampleRegionDisksClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleRegionDisksClient_Get() { func ExampleRegionDisksClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +177,11 @@ func ExampleRegionDisksClient_GetIamPolicy() { func ExampleRegionDisksClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleRegionDisksClient_Insert() { func ExampleRegionDisksClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleRegionDisksClient_List() { func ExampleRegionDisksClient_RemoveResourcePolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleRegionDisksClient_RemoveResourcePolicies() { func ExampleRegionDisksClient_Resize() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -242,6 +292,11 @@ func ExampleRegionDisksClient_Resize() { func ExampleRegionDisksClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -262,6 +317,11 @@ func ExampleRegionDisksClient_SetIamPolicy() { func ExampleRegionDisksClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -285,6 +345,11 @@ func ExampleRegionDisksClient_SetLabels() { func ExampleRegionDisksClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionDisksRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_health_check_services_client.go b/compute/apiv1/region_health_check_services_client.go index 1c7e10416744..6be27603ca9b 100644 --- a/compute/apiv1/region_health_check_services_client.go +++ b/compute/apiv1/region_health_check_services_client.go @@ -100,7 +100,8 @@ func (c *RegionHealthCheckServicesClient) setGoogleClientInfo(keyval ...string) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionHealthCheckServicesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,7 +211,7 @@ func (c *regionHealthCheckServicesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionHealthCheckServicesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_health_check_services_client_example_test.go b/compute/apiv1/region_health_check_services_client_example_test.go index 846ea0876df0..4e5586254b22 100644 --- a/compute/apiv1/region_health_check_services_client_example_test.go +++ b/compute/apiv1/region_health_check_services_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionHealthCheckServicesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionHealthCheckServicesRESTClient() { func ExampleRegionHealthCheckServicesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionHealthCheckServicesClient_Delete() { func ExampleRegionHealthCheckServicesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionHealthCheckServicesClient_Get() { func ExampleRegionHealthCheckServicesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionHealthCheckServicesClient_Insert() { func ExampleRegionHealthCheckServicesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionHealthCheckServicesClient_List() { func ExampleRegionHealthCheckServicesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_health_checks_client.go b/compute/apiv1/region_health_checks_client.go index 4b2a20c5a4e7..7f6e97121512 100644 --- a/compute/apiv1/region_health_checks_client.go +++ b/compute/apiv1/region_health_checks_client.go @@ -103,7 +103,8 @@ func (c *RegionHealthChecksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionHealthChecksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,7 +219,7 @@ func (c *regionHealthChecksRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionHealthChecksRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_health_checks_client_example_test.go b/compute/apiv1/region_health_checks_client_example_test.go index 24f1e7fb5623..7e0cbed9a9a7 100644 --- a/compute/apiv1/region_health_checks_client_example_test.go +++ b/compute/apiv1/region_health_checks_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionHealthChecksRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionHealthChecksRESTClient() { func ExampleRegionHealthChecksClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionHealthChecksClient_Delete() { func ExampleRegionHealthChecksClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionHealthChecksClient_Get() { func ExampleRegionHealthChecksClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionHealthChecksClient_Insert() { func ExampleRegionHealthChecksClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionHealthChecksClient_List() { func ExampleRegionHealthChecksClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleRegionHealthChecksClient_Patch() { func ExampleRegionHealthChecksClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionHealthChecksRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_instance_group_managers_client.go b/compute/apiv1/region_instance_group_managers_client.go index 188c487e68a6..973f478597b3 100644 --- a/compute/apiv1/region_instance_group_managers_client.go +++ b/compute/apiv1/region_instance_group_managers_client.go @@ -142,7 +142,8 @@ func (c *RegionInstanceGroupManagersClient) setGoogleClientInfo(keyval ...string // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionInstanceGroupManagersClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -197,7 +198,7 @@ func (c *RegionInstanceGroupManagersClient) ListErrors(ctx context.Context, req return c.internalClient.ListErrors(ctx, req, opts...) } -// ListManagedInstances lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. +// ListManagedInstances lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group’s listManagedInstancesResults field is set to PAGINATED. func (c *RegionInstanceGroupManagersClient) ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesRegionInstanceGroupManagersRequest, opts ...gax.CallOption) *ManagedInstanceIterator { return c.internalClient.ListManagedInstances(ctx, req, opts...) } @@ -322,7 +323,7 @@ func (c *regionInstanceGroupManagersRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionInstanceGroupManagersRESTClient) Connection() *grpc.ClientConn { return nil } @@ -1076,7 +1077,7 @@ func (c *regionInstanceGroupManagersRESTClient) ListErrors(ctx context.Context, return it } -// ListManagedInstances lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. +// ListManagedInstances lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group’s listManagedInstancesResults field is set to PAGINATED. func (c *regionInstanceGroupManagersRESTClient) ListManagedInstances(ctx context.Context, req *computepb.ListManagedInstancesRegionInstanceGroupManagersRequest, opts ...gax.CallOption) *ManagedInstanceIterator { it := &ManagedInstanceIterator{} req = proto.Clone(req).(*computepb.ListManagedInstancesRegionInstanceGroupManagersRequest) diff --git a/compute/apiv1/region_instance_group_managers_client_example_test.go b/compute/apiv1/region_instance_group_managers_client_example_test.go index 724a5ed068f4..c5d1162f1fdf 100644 --- a/compute/apiv1/region_instance_group_managers_client_example_test.go +++ b/compute/apiv1/region_instance_group_managers_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionInstanceGroupManagersRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionInstanceGroupManagersRESTClient() { func ExampleRegionInstanceGroupManagersClient_AbandonInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionInstanceGroupManagersClient_AbandonInstances() { func ExampleRegionInstanceGroupManagersClient_ApplyUpdatesToInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleRegionInstanceGroupManagersClient_ApplyUpdatesToInstances() { func ExampleRegionInstanceGroupManagersClient_CreateInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleRegionInstanceGroupManagersClient_CreateInstances() { func ExampleRegionInstanceGroupManagersClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionInstanceGroupManagersClient_Delete() { func ExampleRegionInstanceGroupManagersClient_DeleteInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleRegionInstanceGroupManagersClient_DeleteInstances() { func ExampleRegionInstanceGroupManagersClient_DeletePerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleRegionInstanceGroupManagersClient_DeletePerInstanceConfigs() { func ExampleRegionInstanceGroupManagersClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleRegionInstanceGroupManagersClient_Get() { func ExampleRegionInstanceGroupManagersClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleRegionInstanceGroupManagersClient_Insert() { func ExampleRegionInstanceGroupManagersClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleRegionInstanceGroupManagersClient_List() { func ExampleRegionInstanceGroupManagersClient_ListErrors() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +326,11 @@ func ExampleRegionInstanceGroupManagersClient_ListErrors() { func ExampleRegionInstanceGroupManagersClient_ListManagedInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -297,6 +357,11 @@ func ExampleRegionInstanceGroupManagersClient_ListManagedInstances() { func ExampleRegionInstanceGroupManagersClient_ListPerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -323,6 +388,11 @@ func ExampleRegionInstanceGroupManagersClient_ListPerInstanceConfigs() { func ExampleRegionInstanceGroupManagersClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -346,6 +416,11 @@ func ExampleRegionInstanceGroupManagersClient_Patch() { func ExampleRegionInstanceGroupManagersClient_PatchPerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -369,6 +444,11 @@ func ExampleRegionInstanceGroupManagersClient_PatchPerInstanceConfigs() { func ExampleRegionInstanceGroupManagersClient_RecreateInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -392,6 +472,11 @@ func ExampleRegionInstanceGroupManagersClient_RecreateInstances() { func ExampleRegionInstanceGroupManagersClient_Resize() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -415,6 +500,11 @@ func ExampleRegionInstanceGroupManagersClient_Resize() { func ExampleRegionInstanceGroupManagersClient_SetInstanceTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +528,11 @@ func ExampleRegionInstanceGroupManagersClient_SetInstanceTemplate() { func ExampleRegionInstanceGroupManagersClient_SetTargetPools() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -461,6 +556,11 @@ func ExampleRegionInstanceGroupManagersClient_SetTargetPools() { func ExampleRegionInstanceGroupManagersClient_UpdatePerInstanceConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_instance_groups_client.go b/compute/apiv1/region_instance_groups_client.go index 60914d28e54c..21f83efefd48 100644 --- a/compute/apiv1/region_instance_groups_client.go +++ b/compute/apiv1/region_instance_groups_client.go @@ -97,7 +97,8 @@ func (c *RegionInstanceGroupsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionInstanceGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -202,7 +203,7 @@ func (c *regionInstanceGroupsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionInstanceGroupsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_instance_groups_client_example_test.go b/compute/apiv1/region_instance_groups_client_example_test.go index f2e1b8f144b7..8c2df969a16a 100644 --- a/compute/apiv1/region_instance_groups_client_example_test.go +++ b/compute/apiv1/region_instance_groups_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionInstanceGroupsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionInstanceGroupsRESTClient() { func ExampleRegionInstanceGroupsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleRegionInstanceGroupsClient_Get() { func ExampleRegionInstanceGroupsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleRegionInstanceGroupsClient_List() { func ExampleRegionInstanceGroupsClient_ListInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleRegionInstanceGroupsClient_ListInstances() { func ExampleRegionInstanceGroupsClient_SetNamedPorts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstanceGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_instances_client.go b/compute/apiv1/region_instances_client.go index 328534e8bccd..206e8de56bc7 100644 --- a/compute/apiv1/region_instances_client.go +++ b/compute/apiv1/region_instances_client.go @@ -85,7 +85,8 @@ func (c *RegionInstancesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionInstancesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -175,7 +176,7 @@ func (c *regionInstancesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionInstancesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_instances_client_example_test.go b/compute/apiv1/region_instances_client_example_test.go index 61baa64c6af3..463301bf150d 100644 --- a/compute/apiv1/region_instances_client_example_test.go +++ b/compute/apiv1/region_instances_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewRegionInstancesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewRegionInstancesRESTClient() { func ExampleRegionInstancesClient_BulkInsert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_network_endpoint_groups_client.go b/compute/apiv1/region_network_endpoint_groups_client.go index 433e0f1a22fc..38aadf5fab09 100644 --- a/compute/apiv1/region_network_endpoint_groups_client.go +++ b/compute/apiv1/region_network_endpoint_groups_client.go @@ -97,7 +97,8 @@ func (c *RegionNetworkEndpointGroupsClient) setGoogleClientInfo(keyval ...string // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionNetworkEndpointGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -202,7 +203,7 @@ func (c *regionNetworkEndpointGroupsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionNetworkEndpointGroupsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_network_endpoint_groups_client_example_test.go b/compute/apiv1/region_network_endpoint_groups_client_example_test.go index 3d00aea023ce..634c79b0f309 100644 --- a/compute/apiv1/region_network_endpoint_groups_client_example_test.go +++ b/compute/apiv1/region_network_endpoint_groups_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionNetworkEndpointGroupsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionNetworkEndpointGroupsRESTClient() { func ExampleRegionNetworkEndpointGroupsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionNetworkEndpointGroupsClient_Delete() { func ExampleRegionNetworkEndpointGroupsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionNetworkEndpointGroupsClient_Get() { func ExampleRegionNetworkEndpointGroupsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionNetworkEndpointGroupsClient_Insert() { func ExampleRegionNetworkEndpointGroupsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_network_firewall_policies_client.go b/compute/apiv1/region_network_firewall_policies_client.go index 59ed6cd69af4..e4286de95c5c 100644 --- a/compute/apiv1/region_network_firewall_policies_client.go +++ b/compute/apiv1/region_network_firewall_policies_client.go @@ -136,7 +136,8 @@ func (c *RegionNetworkFirewallPoliciesClient) setGoogleClientInfo(keyval ...stri // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionNetworkFirewallPoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -306,7 +307,7 @@ func (c *regionNetworkFirewallPoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionNetworkFirewallPoliciesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_network_firewall_policies_client_example_test.go b/compute/apiv1/region_network_firewall_policies_client_example_test.go index 460c85a48698..ca640b9a2bcd 100644 --- a/compute/apiv1/region_network_firewall_policies_client_example_test.go +++ b/compute/apiv1/region_network_firewall_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionNetworkFirewallPoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionNetworkFirewallPoliciesRESTClient() { func ExampleRegionNetworkFirewallPoliciesClient_AddAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_AddAssociation() { func ExampleRegionNetworkFirewallPoliciesClient_AddRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_AddRule() { func ExampleRegionNetworkFirewallPoliciesClient_CloneRules() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_CloneRules() { func ExampleRegionNetworkFirewallPoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_Delete() { func ExampleRegionNetworkFirewallPoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_Get() { func ExampleRegionNetworkFirewallPoliciesClient_GetAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_GetAssociation() { func ExampleRegionNetworkFirewallPoliciesClient_GetEffectiveFirewalls() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_GetEffectiveFirewalls() { func ExampleRegionNetworkFirewallPoliciesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -210,6 +255,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_GetIamPolicy() { func ExampleRegionNetworkFirewallPoliciesClient_GetRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -230,6 +280,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_GetRule() { func ExampleRegionNetworkFirewallPoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -253,6 +308,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_Insert() { func ExampleRegionNetworkFirewallPoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -279,6 +339,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_List() { func ExampleRegionNetworkFirewallPoliciesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +367,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_Patch() { func ExampleRegionNetworkFirewallPoliciesClient_PatchRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -325,6 +395,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_PatchRule() { func ExampleRegionNetworkFirewallPoliciesClient_RemoveAssociation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -348,6 +423,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_RemoveAssociation() { func ExampleRegionNetworkFirewallPoliciesClient_RemoveRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -371,6 +451,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_RemoveRule() { func ExampleRegionNetworkFirewallPoliciesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -391,6 +476,11 @@ func ExampleRegionNetworkFirewallPoliciesClient_SetIamPolicy() { func ExampleRegionNetworkFirewallPoliciesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNetworkFirewallPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_notification_endpoints_client.go b/compute/apiv1/region_notification_endpoints_client.go index f3ab95a70c4a..abd08b15b995 100644 --- a/compute/apiv1/region_notification_endpoints_client.go +++ b/compute/apiv1/region_notification_endpoints_client.go @@ -97,7 +97,8 @@ func (c *RegionNotificationEndpointsClient) setGoogleClientInfo(keyval ...string // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionNotificationEndpointsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -202,7 +203,7 @@ func (c *regionNotificationEndpointsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionNotificationEndpointsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_notification_endpoints_client_example_test.go b/compute/apiv1/region_notification_endpoints_client_example_test.go index b382c5e4053f..59037b9b95aa 100644 --- a/compute/apiv1/region_notification_endpoints_client_example_test.go +++ b/compute/apiv1/region_notification_endpoints_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionNotificationEndpointsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionNotificationEndpointsRESTClient() { func ExampleRegionNotificationEndpointsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionNotificationEndpointsClient_Delete() { func ExampleRegionNotificationEndpointsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionNotificationEndpointsClient_Get() { func ExampleRegionNotificationEndpointsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionNotificationEndpointsClient_Insert() { func ExampleRegionNotificationEndpointsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_operations_client.go b/compute/apiv1/region_operations_client.go index 25fa748b7a40..9b8d6fb94a9b 100644 --- a/compute/apiv1/region_operations_client.go +++ b/compute/apiv1/region_operations_client.go @@ -96,7 +96,8 @@ func (c *RegionOperationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionOperationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -185,7 +186,7 @@ func (c *regionOperationsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionOperationsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_operations_client_example_test.go b/compute/apiv1/region_operations_client_example_test.go index c824fe842599..5fa4deed8f7b 100644 --- a/compute/apiv1/region_operations_client_example_test.go +++ b/compute/apiv1/region_operations_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionOperationsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionOperationsRESTClient() { func ExampleRegionOperationsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleRegionOperationsClient_Delete() { func ExampleRegionOperationsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleRegionOperationsClient_Get() { func ExampleRegionOperationsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionOperationsClient_List() { func ExampleRegionOperationsClient_Wait() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_security_policies_client.go b/compute/apiv1/region_security_policies_client.go index 8a2240686091..e63830f799c4 100644 --- a/compute/apiv1/region_security_policies_client.go +++ b/compute/apiv1/region_security_policies_client.go @@ -100,7 +100,8 @@ func (c *RegionSecurityPoliciesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionSecurityPoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,7 +211,7 @@ func (c *regionSecurityPoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionSecurityPoliciesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_security_policies_client_example_test.go b/compute/apiv1/region_security_policies_client_example_test.go index 8755b540b6d2..ce884b8ef589 100644 --- a/compute/apiv1/region_security_policies_client_example_test.go +++ b/compute/apiv1/region_security_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionSecurityPoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionSecurityPoliciesRESTClient() { func ExampleRegionSecurityPoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionSecurityPoliciesClient_Delete() { func ExampleRegionSecurityPoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionSecurityPoliciesClient_Get() { func ExampleRegionSecurityPoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionSecurityPoliciesClient_Insert() { func ExampleRegionSecurityPoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionSecurityPoliciesClient_List() { func ExampleRegionSecurityPoliciesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_ssl_certificates_client.go b/compute/apiv1/region_ssl_certificates_client.go index 939bc762a54e..f0e81e62ea0f 100644 --- a/compute/apiv1/region_ssl_certificates_client.go +++ b/compute/apiv1/region_ssl_certificates_client.go @@ -97,7 +97,8 @@ func (c *RegionSslCertificatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionSslCertificatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -202,7 +203,7 @@ func (c *regionSslCertificatesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionSslCertificatesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_ssl_certificates_client_example_test.go b/compute/apiv1/region_ssl_certificates_client_example_test.go index 3d90f002e6de..a554975fa73d 100644 --- a/compute/apiv1/region_ssl_certificates_client_example_test.go +++ b/compute/apiv1/region_ssl_certificates_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionSslCertificatesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionSslCertificatesRESTClient() { func ExampleRegionSslCertificatesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionSslCertificatesClient_Delete() { func ExampleRegionSslCertificatesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionSslCertificatesClient_Get() { func ExampleRegionSslCertificatesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionSslCertificatesClient_Insert() { func ExampleRegionSslCertificatesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_ssl_policies_client.go b/compute/apiv1/region_ssl_policies_client.go new file mode 100644 index 000000000000..05c5109662f8 --- /dev/null +++ b/compute/apiv1/region_ssl_policies_client.go @@ -0,0 +1,711 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package compute + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + httptransport "google.golang.org/api/transport/http" + computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newRegionSslPoliciesClientHook clientHook + +// RegionSslPoliciesCallOptions contains the retry settings for each method of RegionSslPoliciesClient. +type RegionSslPoliciesCallOptions struct { + Delete []gax.CallOption + Get []gax.CallOption + Insert []gax.CallOption + List []gax.CallOption + ListAvailableFeatures []gax.CallOption + Patch []gax.CallOption +} + +func defaultRegionSslPoliciesRESTCallOptions() *RegionSslPoliciesCallOptions { + return &RegionSslPoliciesCallOptions{ + Delete: []gax.CallOption{}, + Get: []gax.CallOption{}, + Insert: []gax.CallOption{}, + List: []gax.CallOption{}, + ListAvailableFeatures: []gax.CallOption{}, + Patch: []gax.CallOption{}, + } +} + +// internalRegionSslPoliciesClient is an interface that defines the methods available from Google Compute Engine API. +type internalRegionSslPoliciesClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + Delete(context.Context, *computepb.DeleteRegionSslPolicyRequest, ...gax.CallOption) (*Operation, error) + Get(context.Context, *computepb.GetRegionSslPolicyRequest, ...gax.CallOption) (*computepb.SslPolicy, error) + Insert(context.Context, *computepb.InsertRegionSslPolicyRequest, ...gax.CallOption) (*Operation, error) + List(context.Context, *computepb.ListRegionSslPoliciesRequest, ...gax.CallOption) *SslPolicyIterator + ListAvailableFeatures(context.Context, *computepb.ListAvailableFeaturesRegionSslPoliciesRequest, ...gax.CallOption) (*computepb.SslPoliciesListAvailableFeaturesResponse, error) + Patch(context.Context, *computepb.PatchRegionSslPolicyRequest, ...gax.CallOption) (*Operation, error) +} + +// RegionSslPoliciesClient is a client for interacting with Google Compute Engine API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// The RegionSslPolicies API. +type RegionSslPoliciesClient struct { + // The internal transport-dependent client. + internalClient internalRegionSslPoliciesClient + + // The call options for this service. + CallOptions *RegionSslPoliciesCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *RegionSslPoliciesClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *RegionSslPoliciesClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *RegionSslPoliciesClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// Delete deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. +func (c *RegionSslPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteRegionSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.Delete(ctx, req, opts...) +} + +// Get lists all of the ordered rules present in a single specified policy. +func (c *RegionSslPoliciesClient) Get(ctx context.Context, req *computepb.GetRegionSslPolicyRequest, opts ...gax.CallOption) (*computepb.SslPolicy, error) { + return c.internalClient.Get(ctx, req, opts...) +} + +// Insert creates a new policy in the specified project and region using the data included in the request. +func (c *RegionSslPoliciesClient) Insert(ctx context.Context, req *computepb.InsertRegionSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.Insert(ctx, req, opts...) +} + +// List lists all the SSL policies that have been configured for the specified project and region. +func (c *RegionSslPoliciesClient) List(ctx context.Context, req *computepb.ListRegionSslPoliciesRequest, opts ...gax.CallOption) *SslPolicyIterator { + return c.internalClient.List(ctx, req, opts...) +} + +// ListAvailableFeatures lists all features that can be specified in the SSL policy when using custom profile. +func (c *RegionSslPoliciesClient) ListAvailableFeatures(ctx context.Context, req *computepb.ListAvailableFeaturesRegionSslPoliciesRequest, opts ...gax.CallOption) (*computepb.SslPoliciesListAvailableFeaturesResponse, error) { + return c.internalClient.ListAvailableFeatures(ctx, req, opts...) +} + +// Patch patches the specified SSL policy with the data included in the request. +func (c *RegionSslPoliciesClient) Patch(ctx context.Context, req *computepb.PatchRegionSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.Patch(ctx, req, opts...) +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type regionSslPoliciesRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // operationClient is used to call the operation-specific management service. + operationClient *RegionOperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing RegionSslPoliciesClient + CallOptions **RegionSslPoliciesCallOptions +} + +// NewRegionSslPoliciesRESTClient creates a new region ssl policies rest client. +// +// The RegionSslPolicies API. +func NewRegionSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionSslPoliciesClient, error) { + clientOpts := append(defaultRegionSslPoliciesRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRegionSslPoliciesRESTCallOptions() + c := ®ionSslPoliciesRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + o := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opC, err := NewRegionOperationsRESTClient(ctx, o...) + if err != nil { + return nil, err + } + c.operationClient = opC + + return &RegionSslPoliciesClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRegionSslPoliciesRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://compute.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://compute.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *regionSslPoliciesRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *regionSslPoliciesRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + if err := c.operationClient.Close(); err != nil { + return err + } + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *regionSslPoliciesRESTClient) Connection() *grpc.ClientConn { + return nil +} + +// Delete deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. +func (c *regionSslPoliciesRESTClient) Delete(ctx context.Context, req *computepb.DeleteRegionSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/sslPolicies/%v", req.GetProject(), req.GetRegion(), req.GetSslPolicy()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "ssl_policy", url.QueryEscape(req.GetSslPolicy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Delete[0:len((*c.CallOptions).Delete):len((*c.CallOptions).Delete)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + +// Get lists all of the ordered rules present in a single specified policy. +func (c *regionSslPoliciesRESTClient) Get(ctx context.Context, req *computepb.GetRegionSslPolicyRequest, opts ...gax.CallOption) (*computepb.SslPolicy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/sslPolicies/%v", req.GetProject(), req.GetRegion(), req.GetSslPolicy()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "ssl_policy", url.QueryEscape(req.GetSslPolicy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Get[0:len((*c.CallOptions).Get):len((*c.CallOptions).Get)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.SslPolicy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// Insert creates a new policy in the specified project and region using the data included in the request. +func (c *regionSslPoliciesRESTClient) Insert(ctx context.Context, req *computepb.InsertRegionSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetSslPolicyResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/sslPolicies", req.GetProject(), req.GetRegion()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Insert[0:len((*c.CallOptions).Insert):len((*c.CallOptions).Insert)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + +// List lists all the SSL policies that have been configured for the specified project and region. +func (c *regionSslPoliciesRESTClient) List(ctx context.Context, req *computepb.ListRegionSslPoliciesRequest, opts ...gax.CallOption) *SslPolicyIterator { + it := &SslPolicyIterator{} + req = proto.Clone(req).(*computepb.ListRegionSslPoliciesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.SslPolicy, string, error) { + resp := &computepb.SslPoliciesList{} + if pageToken != "" { + req.PageToken = proto.String(pageToken) + } + if pageSize > math.MaxInt32 { + req.MaxResults = proto.Uint32(math.MaxInt32) + } else if pageSize != 0 { + req.MaxResults = proto.Uint32(uint32(pageSize)) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/sslPolicies", req.GetProject(), req.GetRegion()) + + params := url.Values{} + if req != nil && req.Filter != nil { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req != nil && req.MaxResults != nil { + params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults())) + } + if req != nil && req.OrderBy != nil { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req != nil && req.PageToken != nil { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req != nil && req.ReturnPartialSuccess != nil { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetItems(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetMaxResults()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListAvailableFeatures lists all features that can be specified in the SSL policy when using custom profile. +func (c *regionSslPoliciesRESTClient) ListAvailableFeatures(ctx context.Context, req *computepb.ListAvailableFeaturesRegionSslPoliciesRequest, opts ...gax.CallOption) (*computepb.SslPoliciesListAvailableFeaturesResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/sslPolicies/listAvailableFeatures", req.GetProject(), req.GetRegion()) + + params := url.Values{} + if req != nil && req.Filter != nil { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req != nil && req.MaxResults != nil { + params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults())) + } + if req != nil && req.OrderBy != nil { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req != nil && req.PageToken != nil { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req != nil && req.ReturnPartialSuccess != nil { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ListAvailableFeatures[0:len((*c.CallOptions).ListAvailableFeatures):len((*c.CallOptions).ListAvailableFeatures)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.SslPoliciesListAvailableFeaturesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// Patch patches the specified SSL policy with the data included in the request. +func (c *regionSslPoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchRegionSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetSslPolicyResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/sslPolicies/%v", req.GetProject(), req.GetRegion(), req.GetSslPolicy()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "ssl_policy", url.QueryEscape(req.GetSslPolicy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Patch[0:len((*c.CallOptions).Patch):len((*c.CallOptions).Patch)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + +// SslPolicyIterator manages a stream of *computepb.SslPolicy. +type SslPolicyIterator struct { + items []*computepb.SslPolicy + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*computepb.SslPolicy, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *SslPolicyIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *SslPolicyIterator) Next() (*computepb.SslPolicy, error) { + var item *computepb.SslPolicy + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SslPolicyIterator) bufLen() int { + return len(it.items) +} + +func (it *SslPolicyIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/compute/apiv1/region_ssl_policies_client_example_test.go b/compute/apiv1/region_ssl_policies_client_example_test.go new file mode 100644 index 000000000000..9c34f825aa0a --- /dev/null +++ b/compute/apiv1/region_ssl_policies_client_example_test.go @@ -0,0 +1,207 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package compute_test + +import ( + "context" + + compute "cloud.google.com/go/compute/apiv1" + "google.golang.org/api/iterator" + computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" +) + +func ExampleNewRegionSslPoliciesRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleRegionSslPoliciesClient_Delete() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.DeleteRegionSslPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionSslPolicyRequest. + } + op, err := c.Delete(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegionSslPoliciesClient_Get() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.GetRegionSslPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionSslPolicyRequest. + } + resp, err := c.Get(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegionSslPoliciesClient_Insert() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.InsertRegionSslPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionSslPolicyRequest. + } + op, err := c.Insert(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegionSslPoliciesClient_List() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.ListRegionSslPoliciesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionSslPoliciesRequest. + } + it := c.List(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegionSslPoliciesClient_ListAvailableFeatures() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.ListAvailableFeaturesRegionSslPoliciesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListAvailableFeaturesRegionSslPoliciesRequest. + } + resp, err := c.ListAvailableFeatures(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegionSslPoliciesClient_Patch() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.PatchRegionSslPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionSslPolicyRequest. + } + op, err := c.Patch(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/region_target_http_proxies_client.go b/compute/apiv1/region_target_http_proxies_client.go index a469c06615dc..9083b222f398 100644 --- a/compute/apiv1/region_target_http_proxies_client.go +++ b/compute/apiv1/region_target_http_proxies_client.go @@ -100,7 +100,8 @@ func (c *RegionTargetHttpProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionTargetHttpProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,7 +211,7 @@ func (c *regionTargetHttpProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionTargetHttpProxiesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_target_http_proxies_client_example_test.go b/compute/apiv1/region_target_http_proxies_client_example_test.go index 7551c3a5b3dc..1949c3100b27 100644 --- a/compute/apiv1/region_target_http_proxies_client_example_test.go +++ b/compute/apiv1/region_target_http_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionTargetHttpProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionTargetHttpProxiesRESTClient() { func ExampleRegionTargetHttpProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionTargetHttpProxiesClient_Delete() { func ExampleRegionTargetHttpProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionTargetHttpProxiesClient_Get() { func ExampleRegionTargetHttpProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionTargetHttpProxiesClient_Insert() { func ExampleRegionTargetHttpProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionTargetHttpProxiesClient_List() { func ExampleRegionTargetHttpProxiesClient_SetUrlMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_target_https_proxies_client.go b/compute/apiv1/region_target_https_proxies_client.go index 8751afa613ba..89d1cf6635ba 100644 --- a/compute/apiv1/region_target_https_proxies_client.go +++ b/compute/apiv1/region_target_https_proxies_client.go @@ -106,7 +106,8 @@ func (c *RegionTargetHttpsProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionTargetHttpsProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *regionTargetHttpsProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionTargetHttpsProxiesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_target_https_proxies_client_example_test.go b/compute/apiv1/region_target_https_proxies_client_example_test.go index b6ccb9441eaf..c60efb61af5a 100644 --- a/compute/apiv1/region_target_https_proxies_client_example_test.go +++ b/compute/apiv1/region_target_https_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionTargetHttpsProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionTargetHttpsProxiesRESTClient() { func ExampleRegionTargetHttpsProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionTargetHttpsProxiesClient_Delete() { func ExampleRegionTargetHttpsProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionTargetHttpsProxiesClient_Get() { func ExampleRegionTargetHttpsProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionTargetHttpsProxiesClient_Insert() { func ExampleRegionTargetHttpsProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionTargetHttpsProxiesClient_List() { func ExampleRegionTargetHttpsProxiesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleRegionTargetHttpsProxiesClient_Patch() { func ExampleRegionTargetHttpsProxiesClient_SetSslCertificates() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleRegionTargetHttpsProxiesClient_SetSslCertificates() { func ExampleRegionTargetHttpsProxiesClient_SetUrlMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/region_target_tcp_proxies_client.go b/compute/apiv1/region_target_tcp_proxies_client.go new file mode 100644 index 000000000000..e6233fc622cd --- /dev/null +++ b/compute/apiv1/region_target_tcp_proxies_client.go @@ -0,0 +1,548 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package compute + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + httptransport "google.golang.org/api/transport/http" + computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newRegionTargetTcpProxiesClientHook clientHook + +// RegionTargetTcpProxiesCallOptions contains the retry settings for each method of RegionTargetTcpProxiesClient. +type RegionTargetTcpProxiesCallOptions struct { + Delete []gax.CallOption + Get []gax.CallOption + Insert []gax.CallOption + List []gax.CallOption +} + +func defaultRegionTargetTcpProxiesRESTCallOptions() *RegionTargetTcpProxiesCallOptions { + return &RegionTargetTcpProxiesCallOptions{ + Delete: []gax.CallOption{}, + Get: []gax.CallOption{}, + Insert: []gax.CallOption{}, + List: []gax.CallOption{}, + } +} + +// internalRegionTargetTcpProxiesClient is an interface that defines the methods available from Google Compute Engine API. +type internalRegionTargetTcpProxiesClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + Delete(context.Context, *computepb.DeleteRegionTargetTcpProxyRequest, ...gax.CallOption) (*Operation, error) + Get(context.Context, *computepb.GetRegionTargetTcpProxyRequest, ...gax.CallOption) (*computepb.TargetTcpProxy, error) + Insert(context.Context, *computepb.InsertRegionTargetTcpProxyRequest, ...gax.CallOption) (*Operation, error) + List(context.Context, *computepb.ListRegionTargetTcpProxiesRequest, ...gax.CallOption) *TargetTcpProxyIterator +} + +// RegionTargetTcpProxiesClient is a client for interacting with Google Compute Engine API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// The RegionTargetTcpProxies API. +type RegionTargetTcpProxiesClient struct { + // The internal transport-dependent client. + internalClient internalRegionTargetTcpProxiesClient + + // The call options for this service. + CallOptions *RegionTargetTcpProxiesCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *RegionTargetTcpProxiesClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *RegionTargetTcpProxiesClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *RegionTargetTcpProxiesClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// Delete deletes the specified TargetTcpProxy resource. +func (c *RegionTargetTcpProxiesClient) Delete(ctx context.Context, req *computepb.DeleteRegionTargetTcpProxyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.Delete(ctx, req, opts...) +} + +// Get returns the specified TargetTcpProxy resource. +func (c *RegionTargetTcpProxiesClient) Get(ctx context.Context, req *computepb.GetRegionTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.TargetTcpProxy, error) { + return c.internalClient.Get(ctx, req, opts...) +} + +// Insert creates a TargetTcpProxy resource in the specified project and region using the data included in the request. +func (c *RegionTargetTcpProxiesClient) Insert(ctx context.Context, req *computepb.InsertRegionTargetTcpProxyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.Insert(ctx, req, opts...) +} + +// List retrieves a list of TargetTcpProxy resources available to the specified project in a given region. +func (c *RegionTargetTcpProxiesClient) List(ctx context.Context, req *computepb.ListRegionTargetTcpProxiesRequest, opts ...gax.CallOption) *TargetTcpProxyIterator { + return c.internalClient.List(ctx, req, opts...) +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type regionTargetTcpProxiesRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // operationClient is used to call the operation-specific management service. + operationClient *RegionOperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing RegionTargetTcpProxiesClient + CallOptions **RegionTargetTcpProxiesCallOptions +} + +// NewRegionTargetTcpProxiesRESTClient creates a new region target tcp proxies rest client. +// +// The RegionTargetTcpProxies API. +func NewRegionTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionTargetTcpProxiesClient, error) { + clientOpts := append(defaultRegionTargetTcpProxiesRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRegionTargetTcpProxiesRESTCallOptions() + c := ®ionTargetTcpProxiesRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + o := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opC, err := NewRegionOperationsRESTClient(ctx, o...) + if err != nil { + return nil, err + } + c.operationClient = opC + + return &RegionTargetTcpProxiesClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRegionTargetTcpProxiesRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://compute.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://compute.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://compute.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *regionTargetTcpProxiesRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *regionTargetTcpProxiesRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + if err := c.operationClient.Close(); err != nil { + return err + } + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *regionTargetTcpProxiesRESTClient) Connection() *grpc.ClientConn { + return nil +} + +// Delete deletes the specified TargetTcpProxy resource. +func (c *regionTargetTcpProxiesRESTClient) Delete(ctx context.Context, req *computepb.DeleteRegionTargetTcpProxyRequest, opts ...gax.CallOption) (*Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/targetTcpProxies/%v", req.GetProject(), req.GetRegion(), req.GetTargetTcpProxy()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "target_tcp_proxy", url.QueryEscape(req.GetTargetTcpProxy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Delete[0:len((*c.CallOptions).Delete):len((*c.CallOptions).Delete)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + +// Get returns the specified TargetTcpProxy resource. +func (c *regionTargetTcpProxiesRESTClient) Get(ctx context.Context, req *computepb.GetRegionTargetTcpProxyRequest, opts ...gax.CallOption) (*computepb.TargetTcpProxy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/targetTcpProxies/%v", req.GetProject(), req.GetRegion(), req.GetTargetTcpProxy()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "target_tcp_proxy", url.QueryEscape(req.GetTargetTcpProxy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Get[0:len((*c.CallOptions).Get):len((*c.CallOptions).Get)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.TargetTcpProxy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// Insert creates a TargetTcpProxy resource in the specified project and region using the data included in the request. +func (c *regionTargetTcpProxiesRESTClient) Insert(ctx context.Context, req *computepb.InsertRegionTargetTcpProxyRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetTargetTcpProxyResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/targetTcpProxies", req.GetProject(), req.GetRegion()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).Insert[0:len((*c.CallOptions).Insert):len((*c.CallOptions).Insert)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + +// List retrieves a list of TargetTcpProxy resources available to the specified project in a given region. +func (c *regionTargetTcpProxiesRESTClient) List(ctx context.Context, req *computepb.ListRegionTargetTcpProxiesRequest, opts ...gax.CallOption) *TargetTcpProxyIterator { + it := &TargetTcpProxyIterator{} + req = proto.Clone(req).(*computepb.ListRegionTargetTcpProxiesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*computepb.TargetTcpProxy, string, error) { + resp := &computepb.TargetTcpProxyList{} + if pageToken != "" { + req.PageToken = proto.String(pageToken) + } + if pageSize > math.MaxInt32 { + req.MaxResults = proto.Uint32(math.MaxInt32) + } else if pageSize != 0 { + req.MaxResults = proto.Uint32(uint32(pageSize)) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/targetTcpProxies", req.GetProject(), req.GetRegion()) + + params := url.Values{} + if req != nil && req.Filter != nil { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req != nil && req.MaxResults != nil { + params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults())) + } + if req != nil && req.OrderBy != nil { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req != nil && req.PageToken != nil { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req != nil && req.ReturnPartialSuccess != nil { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetItems(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetMaxResults()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// TargetTcpProxyIterator manages a stream of *computepb.TargetTcpProxy. +type TargetTcpProxyIterator struct { + items []*computepb.TargetTcpProxy + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetTcpProxy, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TargetTcpProxyIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *TargetTcpProxyIterator) Next() (*computepb.TargetTcpProxy, error) { + var item *computepb.TargetTcpProxy + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TargetTcpProxyIterator) bufLen() int { + return len(it.items) +} + +func (it *TargetTcpProxyIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/compute/apiv1/region_target_tcp_proxies_client_example_test.go b/compute/apiv1/region_target_tcp_proxies_client_example_test.go new file mode 100644 index 000000000000..2c71acdbaa45 --- /dev/null +++ b/compute/apiv1/region_target_tcp_proxies_client_example_test.go @@ -0,0 +1,154 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package compute_test + +import ( + "context" + + compute "cloud.google.com/go/compute/apiv1" + "google.golang.org/api/iterator" + computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" +) + +func ExampleNewRegionTargetTcpProxiesRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionTargetTcpProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleRegionTargetTcpProxiesClient_Delete() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionTargetTcpProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.DeleteRegionTargetTcpProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionTargetTcpProxyRequest. + } + op, err := c.Delete(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegionTargetTcpProxiesClient_Get() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionTargetTcpProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.GetRegionTargetTcpProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionTargetTcpProxyRequest. + } + resp, err := c.Get(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegionTargetTcpProxiesClient_Insert() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionTargetTcpProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.InsertRegionTargetTcpProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionTargetTcpProxyRequest. + } + op, err := c.Insert(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegionTargetTcpProxiesClient_List() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewRegionTargetTcpProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.ListRegionTargetTcpProxiesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionTargetTcpProxiesRequest. + } + it := c.List(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/compute/apiv1/region_url_maps_client.go b/compute/apiv1/region_url_maps_client.go index 287dac8856f8..f08416d1a322 100644 --- a/compute/apiv1/region_url_maps_client.go +++ b/compute/apiv1/region_url_maps_client.go @@ -106,7 +106,8 @@ func (c *RegionUrlMapsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionUrlMapsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -226,7 +227,7 @@ func (c *regionUrlMapsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionUrlMapsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/region_url_maps_client_example_test.go b/compute/apiv1/region_url_maps_client_example_test.go index 683370d37fe7..6ec72c31f080 100644 --- a/compute/apiv1/region_url_maps_client_example_test.go +++ b/compute/apiv1/region_url_maps_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionUrlMapsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionUrlMapsRESTClient() { func ExampleRegionUrlMapsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRegionUrlMapsClient_Delete() { func ExampleRegionUrlMapsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRegionUrlMapsClient_Get() { func ExampleRegionUrlMapsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRegionUrlMapsClient_Insert() { func ExampleRegionUrlMapsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleRegionUrlMapsClient_List() { func ExampleRegionUrlMapsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleRegionUrlMapsClient_Patch() { func ExampleRegionUrlMapsClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleRegionUrlMapsClient_Update() { func ExampleRegionUrlMapsClient_Validate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/regions_client.go b/compute/apiv1/regions_client.go index 01f01fdd2800..5301f8d8cf75 100644 --- a/compute/apiv1/regions_client.go +++ b/compute/apiv1/regions_client.go @@ -90,7 +90,8 @@ func (c *RegionsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RegionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -169,7 +170,7 @@ func (c *regionsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *regionsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/regions_client_example_test.go b/compute/apiv1/regions_client_example_test.go index 8c77af8156f2..e0b7ac6cccb7 100644 --- a/compute/apiv1/regions_client_example_test.go +++ b/compute/apiv1/regions_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRegionsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRegionsRESTClient() { func ExampleRegionsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleRegionsClient_Get() { func ExampleRegionsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRegionsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/reservations_client.go b/compute/apiv1/reservations_client.go index fe90bb494609..43e82ea3c82b 100644 --- a/compute/apiv1/reservations_client.go +++ b/compute/apiv1/reservations_client.go @@ -116,7 +116,8 @@ func (c *ReservationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ReservationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -251,7 +252,7 @@ func (c *reservationsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *reservationsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/reservations_client_example_test.go b/compute/apiv1/reservations_client_example_test.go index d8f42abb275b..4e7daf4d9d84 100644 --- a/compute/apiv1/reservations_client_example_test.go +++ b/compute/apiv1/reservations_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewReservationsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewReservationsRESTClient() { func ExampleReservationsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleReservationsClient_AggregatedList() { func ExampleReservationsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleReservationsClient_Delete() { func ExampleReservationsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleReservationsClient_Get() { func ExampleReservationsClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleReservationsClient_GetIamPolicy() { func ExampleReservationsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleReservationsClient_Insert() { func ExampleReservationsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleReservationsClient_List() { func ExampleReservationsClient_Resize() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleReservationsClient_Resize() { func ExampleReservationsClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleReservationsClient_SetIamPolicy() { func ExampleReservationsClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -239,6 +289,11 @@ func ExampleReservationsClient_TestIamPermissions() { func ExampleReservationsClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewReservationsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/resource_policies_client.go b/compute/apiv1/resource_policies_client.go index 90a41c6bc0a8..50f401a27c64 100644 --- a/compute/apiv1/resource_policies_client.go +++ b/compute/apiv1/resource_policies_client.go @@ -110,7 +110,8 @@ func (c *ResourcePoliciesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ResourcePoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -235,7 +236,7 @@ func (c *resourcePoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *resourcePoliciesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/resource_policies_client_example_test.go b/compute/apiv1/resource_policies_client_example_test.go index 7f183618a610..316ff814c8c0 100644 --- a/compute/apiv1/resource_policies_client_example_test.go +++ b/compute/apiv1/resource_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewResourcePoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewResourcePoliciesRESTClient() { func ExampleResourcePoliciesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleResourcePoliciesClient_AggregatedList() { func ExampleResourcePoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleResourcePoliciesClient_Delete() { func ExampleResourcePoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleResourcePoliciesClient_Get() { func ExampleResourcePoliciesClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleResourcePoliciesClient_GetIamPolicy() { func ExampleResourcePoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleResourcePoliciesClient_Insert() { func ExampleResourcePoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleResourcePoliciesClient_List() { func ExampleResourcePoliciesClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleResourcePoliciesClient_SetIamPolicy() { func ExampleResourcePoliciesClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewResourcePoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/routers_client.go b/compute/apiv1/routers_client.go index f0d5257e667c..5af848e0acf4 100644 --- a/compute/apiv1/routers_client.go +++ b/compute/apiv1/routers_client.go @@ -116,7 +116,8 @@ func (c *RoutersClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RoutersClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -251,7 +252,7 @@ func (c *routersRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *routersRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/routers_client_example_test.go b/compute/apiv1/routers_client_example_test.go index 0c0bf657dcca..146db82bf8ab 100644 --- a/compute/apiv1/routers_client_example_test.go +++ b/compute/apiv1/routers_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRoutersRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRoutersRESTClient() { func ExampleRoutersClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleRoutersClient_AggregatedList() { func ExampleRoutersClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleRoutersClient_Delete() { func ExampleRoutersClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleRoutersClient_Get() { func ExampleRoutersClient_GetNatMappingInfo() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleRoutersClient_GetNatMappingInfo() { func ExampleRoutersClient_GetRouterStatus() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleRoutersClient_GetRouterStatus() { func ExampleRoutersClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleRoutersClient_Insert() { func ExampleRoutersClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleRoutersClient_List() { func ExampleRoutersClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +270,11 @@ func ExampleRoutersClient_Patch() { func ExampleRoutersClient_Preview() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleRoutersClient_Preview() { func ExampleRoutersClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutersRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/routes_client.go b/compute/apiv1/routes_client.go index 0c8947d2af56..8c7b2913b812 100644 --- a/compute/apiv1/routes_client.go +++ b/compute/apiv1/routes_client.go @@ -97,7 +97,8 @@ func (c *RoutesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *RoutesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -202,7 +203,7 @@ func (c *routesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *routesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/routes_client_example_test.go b/compute/apiv1/routes_client_example_test.go index b8ed6e4975aa..422ef0fdcd5e 100644 --- a/compute/apiv1/routes_client_example_test.go +++ b/compute/apiv1/routes_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewRoutesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewRoutesRESTClient() { func ExampleRoutesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleRoutesClient_Delete() { func ExampleRoutesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleRoutesClient_Get() { func ExampleRoutesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleRoutesClient_Insert() { func ExampleRoutesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewRoutesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/security_policies_client.go b/compute/apiv1/security_policies_client.go index 1d84d65fb658..9d9c66564388 100644 --- a/compute/apiv1/security_policies_client.go +++ b/compute/apiv1/security_policies_client.go @@ -54,6 +54,7 @@ type SecurityPoliciesCallOptions struct { Patch []gax.CallOption PatchRule []gax.CallOption RemoveRule []gax.CallOption + SetLabels []gax.CallOption } func defaultSecurityPoliciesRESTCallOptions() *SecurityPoliciesCallOptions { @@ -69,6 +70,7 @@ func defaultSecurityPoliciesRESTCallOptions() *SecurityPoliciesCallOptions { Patch: []gax.CallOption{}, PatchRule: []gax.CallOption{}, RemoveRule: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -88,6 +90,7 @@ type internalSecurityPoliciesClient interface { Patch(context.Context, *computepb.PatchSecurityPolicyRequest, ...gax.CallOption) (*Operation, error) PatchRule(context.Context, *computepb.PatchRuleSecurityPolicyRequest, ...gax.CallOption) (*Operation, error) RemoveRule(context.Context, *computepb.RemoveRuleSecurityPolicyRequest, ...gax.CallOption) (*Operation, error) + SetLabels(context.Context, *computepb.SetLabelsSecurityPolicyRequest, ...gax.CallOption) (*Operation, error) } // SecurityPoliciesClient is a client for interacting with Google Compute Engine API. @@ -119,7 +122,8 @@ func (c *SecurityPoliciesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SecurityPoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -179,6 +183,11 @@ func (c *SecurityPoliciesClient) RemoveRule(ctx context.Context, req *computepb. return c.internalClient.RemoveRule(ctx, req, opts...) } +// SetLabels sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. +func (c *SecurityPoliciesClient) SetLabels(ctx context.Context, req *computepb.SetLabelsSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type securityPoliciesRESTClient struct { // The http endpoint to connect to. @@ -259,7 +268,7 @@ func (c *securityPoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *securityPoliciesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -1087,6 +1096,73 @@ func (c *securityPoliciesRESTClient) RemoveRule(ctx context.Context, req *comput return op, nil } +// SetLabels sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation. +func (c *securityPoliciesRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetGlobalSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/securityPolicies/%v/setLabels", req.GetProject(), req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + &globalOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + }, + } + return op, nil +} + // SecurityPoliciesScopedListPair is a holder type for string/*computepb.SecurityPoliciesScopedList map entries type SecurityPoliciesScopedListPair struct { Key string diff --git a/compute/apiv1/security_policies_client_example_test.go b/compute/apiv1/security_policies_client_example_test.go index a7cbc07e059f..00d3453ab543 100644 --- a/compute/apiv1/security_policies_client_example_test.go +++ b/compute/apiv1/security_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewSecurityPoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewSecurityPoliciesRESTClient() { func ExampleSecurityPoliciesClient_AddRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleSecurityPoliciesClient_AddRule() { func ExampleSecurityPoliciesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleSecurityPoliciesClient_AggregatedList() { func ExampleSecurityPoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleSecurityPoliciesClient_Delete() { func ExampleSecurityPoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleSecurityPoliciesClient_Get() { func ExampleSecurityPoliciesClient_GetRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleSecurityPoliciesClient_GetRule() { func ExampleSecurityPoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -173,6 +208,11 @@ func ExampleSecurityPoliciesClient_Insert() { func ExampleSecurityPoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleSecurityPoliciesClient_List() { func ExampleSecurityPoliciesClient_ListPreconfiguredExpressionSets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleSecurityPoliciesClient_ListPreconfiguredExpressionSets() { func ExampleSecurityPoliciesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -242,6 +292,11 @@ func ExampleSecurityPoliciesClient_Patch() { func ExampleSecurityPoliciesClient_PatchRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -265,6 +320,11 @@ func ExampleSecurityPoliciesClient_PatchRule() { func ExampleSecurityPoliciesClient_RemoveRule() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSecurityPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -285,3 +345,31 @@ func ExampleSecurityPoliciesClient_RemoveRule() { // TODO: Handle error. } } + +func ExampleSecurityPoliciesClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewSecurityPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsSecurityPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsSecurityPolicyRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/service_attachments_client.go b/compute/apiv1/service_attachments_client.go index 8e02b91f1e6b..0eaa2bae1419 100644 --- a/compute/apiv1/service_attachments_client.go +++ b/compute/apiv1/service_attachments_client.go @@ -113,7 +113,8 @@ func (c *ServiceAttachmentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ServiceAttachmentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -243,7 +244,7 @@ func (c *serviceAttachmentsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *serviceAttachmentsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/service_attachments_client_example_test.go b/compute/apiv1/service_attachments_client_example_test.go index d2a1a92f09b7..ee092095ee82 100644 --- a/compute/apiv1/service_attachments_client_example_test.go +++ b/compute/apiv1/service_attachments_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewServiceAttachmentsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewServiceAttachmentsRESTClient() { func ExampleServiceAttachmentsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleServiceAttachmentsClient_AggregatedList() { func ExampleServiceAttachmentsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleServiceAttachmentsClient_Delete() { func ExampleServiceAttachmentsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleServiceAttachmentsClient_Get() { func ExampleServiceAttachmentsClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleServiceAttachmentsClient_GetIamPolicy() { func ExampleServiceAttachmentsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleServiceAttachmentsClient_Insert() { func ExampleServiceAttachmentsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleServiceAttachmentsClient_List() { func ExampleServiceAttachmentsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleServiceAttachmentsClient_Patch() { func ExampleServiceAttachmentsClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleServiceAttachmentsClient_SetIamPolicy() { func ExampleServiceAttachmentsClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewServiceAttachmentsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/smoke_test.go b/compute/apiv1/smoke_test.go index 9c66a43f0227..15f81065f00e 100644 --- a/compute/apiv1/smoke_test.go +++ b/compute/apiv1/smoke_test.go @@ -27,9 +27,6 @@ import ( "google.golang.org/api/option" - "cloud.google.com/go/internal" - "github.com/googleapis/gax-go/v2" - "github.com/google/go-cmp/cmp" "cloud.google.com/go/internal/testutil" @@ -476,17 +473,25 @@ func TestCapitalLetter(t *testing.T) { t.Fatal(err) } defer func() { - timeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Minute) - defer cancel() - err = internal.Retry(timeoutCtx, gax.Backoff{}, func() (stop bool, err error) { - _, err = c.Delete(timeoutCtx, + var op *Operation + var err error + ok := testutil.Retry(t, 20, 10*time.Second, func(r *testutil.R) { + var err error + op, err = c.Delete(ctx, &computepb.DeleteFirewallRequest{ Project: projectId, Firewall: name, }) - return err == nil, err + if err != nil { + r.Errorf("%v", err) + } }) - if err != nil { + if !ok { + t.Fatal(err) + } + timeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Minute) + defer cancel() + if err = op.Wait(timeoutCtx); err != nil { t.Error(err) } }() @@ -495,7 +500,7 @@ func TestCapitalLetter(t *testing.T) { Firewall: name, }) if err != nil { - t.Error(err) + t.Fatal(err) } if diff := cmp.Diff(fetched.GetAllowed(), allowed, cmp.Comparer(proto.Equal)); diff != "" { t.Fatalf("got(-),want(+):\n%s", diff) @@ -637,11 +642,7 @@ func TestInstanceGroupResize(t *testing.T) { if err != nil { t.Error(err) } - err = internal.Retry(timeoutCtx, gax.Backoff{}, func() (stop bool, err error) { - err = deleteOp.Wait(ctx) - return deleteOp.Done(), err - }) - if err != nil { + if err := deleteOp.Wait(ctx); err != nil { t.Error(err) } }() diff --git a/compute/apiv1/snapshots_client.go b/compute/apiv1/snapshots_client.go index c347ed33460f..3e6a1075d6d7 100644 --- a/compute/apiv1/snapshots_client.go +++ b/compute/apiv1/snapshots_client.go @@ -109,7 +109,8 @@ func (c *SnapshotsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SnapshotsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -234,7 +235,7 @@ func (c *snapshotsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *snapshotsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/snapshots_client_example_test.go b/compute/apiv1/snapshots_client_example_test.go index 091e8b114806..d010863e1361 100644 --- a/compute/apiv1/snapshots_client_example_test.go +++ b/compute/apiv1/snapshots_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewSnapshotsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewSnapshotsRESTClient() { func ExampleSnapshotsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleSnapshotsClient_Delete() { func ExampleSnapshotsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleSnapshotsClient_Get() { func ExampleSnapshotsClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleSnapshotsClient_GetIamPolicy() { func ExampleSnapshotsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleSnapshotsClient_Insert() { func ExampleSnapshotsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleSnapshotsClient_List() { func ExampleSnapshotsClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleSnapshotsClient_SetIamPolicy() { func ExampleSnapshotsClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -193,6 +233,11 @@ func ExampleSnapshotsClient_SetLabels() { func ExampleSnapshotsClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSnapshotsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/ssl_certificates_client.go b/compute/apiv1/ssl_certificates_client.go index e2d8ba2f746f..99f45d613a3e 100644 --- a/compute/apiv1/ssl_certificates_client.go +++ b/compute/apiv1/ssl_certificates_client.go @@ -101,7 +101,8 @@ func (c *SslCertificatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SslCertificatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -211,7 +212,7 @@ func (c *sslCertificatesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *sslCertificatesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/ssl_certificates_client_example_test.go b/compute/apiv1/ssl_certificates_client_example_test.go index 2c63170bc480..d89cc42dc732 100644 --- a/compute/apiv1/ssl_certificates_client_example_test.go +++ b/compute/apiv1/ssl_certificates_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewSslCertificatesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewSslCertificatesRESTClient() { func ExampleSslCertificatesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleSslCertificatesClient_AggregatedList() { func ExampleSslCertificatesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleSslCertificatesClient_Delete() { func ExampleSslCertificatesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleSslCertificatesClient_Get() { func ExampleSslCertificatesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleSslCertificatesClient_Insert() { func ExampleSslCertificatesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslCertificatesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/ssl_policies_client.go b/compute/apiv1/ssl_policies_client.go index 0178aa8679e8..63081fa1e18f 100644 --- a/compute/apiv1/ssl_policies_client.go +++ b/compute/apiv1/ssl_policies_client.go @@ -24,6 +24,7 @@ import ( "math" "net/http" "net/url" + "sort" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/googleapi" @@ -42,6 +43,7 @@ var newSslPoliciesClientHook clientHook // SslPoliciesCallOptions contains the retry settings for each method of SslPoliciesClient. type SslPoliciesCallOptions struct { + AggregatedList []gax.CallOption Delete []gax.CallOption Get []gax.CallOption Insert []gax.CallOption @@ -52,6 +54,7 @@ type SslPoliciesCallOptions struct { func defaultSslPoliciesRESTCallOptions() *SslPoliciesCallOptions { return &SslPoliciesCallOptions{ + AggregatedList: []gax.CallOption{}, Delete: []gax.CallOption{}, Get: []gax.CallOption{}, Insert: []gax.CallOption{}, @@ -66,6 +69,7 @@ type internalSslPoliciesClient interface { Close() error setGoogleClientInfo(...string) Connection() *grpc.ClientConn + AggregatedList(context.Context, *computepb.AggregatedListSslPoliciesRequest, ...gax.CallOption) *SslPoliciesScopedListPairIterator Delete(context.Context, *computepb.DeleteSslPolicyRequest, ...gax.CallOption) (*Operation, error) Get(context.Context, *computepb.GetSslPolicyRequest, ...gax.CallOption) (*computepb.SslPolicy, error) Insert(context.Context, *computepb.InsertSslPolicyRequest, ...gax.CallOption) (*Operation, error) @@ -103,11 +107,17 @@ func (c *SslPoliciesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SslPoliciesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } +// AggregatedList retrieves the list of all SslPolicy resources, regional and global, available to the specified project. +func (c *SslPoliciesClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListSslPoliciesRequest, opts ...gax.CallOption) *SslPoliciesScopedListPairIterator { + return c.internalClient.AggregatedList(ctx, req, opts...) +} + // Delete deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. func (c *SslPoliciesClient) Delete(ctx context.Context, req *computepb.DeleteSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.Delete(ctx, req, opts...) @@ -218,11 +228,117 @@ func (c *sslPoliciesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *sslPoliciesRESTClient) Connection() *grpc.ClientConn { return nil } +// AggregatedList retrieves the list of all SslPolicy resources, regional and global, available to the specified project. +func (c *sslPoliciesRESTClient) AggregatedList(ctx context.Context, req *computepb.AggregatedListSslPoliciesRequest, opts ...gax.CallOption) *SslPoliciesScopedListPairIterator { + it := &SslPoliciesScopedListPairIterator{} + req = proto.Clone(req).(*computepb.AggregatedListSslPoliciesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]SslPoliciesScopedListPair, string, error) { + resp := &computepb.SslPoliciesAggregatedList{} + if pageToken != "" { + req.PageToken = proto.String(pageToken) + } + if pageSize > math.MaxInt32 { + req.MaxResults = proto.Uint32(math.MaxInt32) + } else if pageSize != 0 { + req.MaxResults = proto.Uint32(uint32(pageSize)) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/aggregated/sslPolicies", req.GetProject()) + + params := url.Values{} + if req != nil && req.Filter != nil { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req != nil && req.IncludeAllScopes != nil { + params.Add("includeAllScopes", fmt.Sprintf("%v", req.GetIncludeAllScopes())) + } + if req != nil && req.MaxResults != nil { + params.Add("maxResults", fmt.Sprintf("%v", req.GetMaxResults())) + } + if req != nil && req.OrderBy != nil { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req != nil && req.PageToken != nil { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req != nil && req.ReturnPartialSuccess != nil { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + + elems := make([]SslPoliciesScopedListPair, 0, len(resp.GetItems())) + for k, v := range resp.GetItems() { + elems = append(elems, SslPoliciesScopedListPair{k, v}) + } + sort.Slice(elems, func(i, j int) bool { return elems[i].Key < elems[j].Key }) + + return elems, resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetMaxResults()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // Delete deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. func (c *sslPoliciesRESTClient) Delete(ctx context.Context, req *computepb.DeleteSslPolicyRequest, opts ...gax.CallOption) (*Operation, error) { baseUrl, err := url.Parse(c.endpoint) @@ -659,9 +775,15 @@ func (c *sslPoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchS return op, nil } -// SslPolicyIterator manages a stream of *computepb.SslPolicy. -type SslPolicyIterator struct { - items []*computepb.SslPolicy +// SslPoliciesScopedListPair is a holder type for string/*computepb.SslPoliciesScopedList map entries +type SslPoliciesScopedListPair struct { + Key string + Value *computepb.SslPoliciesScopedList +} + +// SslPoliciesScopedListPairIterator manages a stream of SslPoliciesScopedListPair. +type SslPoliciesScopedListPairIterator struct { + items []SslPoliciesScopedListPair pageInfo *iterator.PageInfo nextFunc func() error @@ -676,18 +798,18 @@ type SslPolicyIterator struct { // InternalFetch returns results from a single call to the underlying RPC. // The number of results is no greater than pageSize. // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*computepb.SslPolicy, nextPageToken string, err error) + InternalFetch func(pageSize int, pageToken string) (results []SslPoliciesScopedListPair, nextPageToken string, err error) } // PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *SslPolicyIterator) PageInfo() *iterator.PageInfo { +func (it *SslPoliciesScopedListPairIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } // Next returns the next result. Its second return value is iterator.Done if there are no more // results. Once Next returns Done, all subsequent calls will return Done. -func (it *SslPolicyIterator) Next() (*computepb.SslPolicy, error) { - var item *computepb.SslPolicy +func (it *SslPoliciesScopedListPairIterator) Next() (SslPoliciesScopedListPair, error) { + var item SslPoliciesScopedListPair if err := it.nextFunc(); err != nil { return item, err } @@ -696,11 +818,11 @@ func (it *SslPolicyIterator) Next() (*computepb.SslPolicy, error) { return item, nil } -func (it *SslPolicyIterator) bufLen() int { +func (it *SslPoliciesScopedListPairIterator) bufLen() int { return len(it.items) } -func (it *SslPolicyIterator) takeBuf() interface{} { +func (it *SslPoliciesScopedListPairIterator) takeBuf() interface{} { b := it.items it.items = nil return b diff --git a/compute/apiv1/ssl_policies_client_example_test.go b/compute/apiv1/ssl_policies_client_example_test.go index f6f8d187e841..4bc699a5b9c2 100644 --- a/compute/apiv1/ssl_policies_client_example_test.go +++ b/compute/apiv1/ssl_policies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewSslPoliciesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -36,8 +41,44 @@ func ExampleNewSslPoliciesRESTClient() { _ = c } +func ExampleSslPoliciesClient_AggregatedList() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewSslPoliciesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.AggregatedListSslPoliciesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListSslPoliciesRequest. + } + it := c.AggregatedList(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + func ExampleSslPoliciesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +102,11 @@ func ExampleSslPoliciesClient_Delete() { func ExampleSslPoliciesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +127,11 @@ func ExampleSslPoliciesClient_Get() { func ExampleSslPoliciesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +155,11 @@ func ExampleSslPoliciesClient_Insert() { func ExampleSslPoliciesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +186,11 @@ func ExampleSslPoliciesClient_List() { func ExampleSslPoliciesClient_ListAvailableFeatures() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +211,11 @@ func ExampleSslPoliciesClient_ListAvailableFeatures() { func ExampleSslPoliciesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSslPoliciesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/subnetworks_client.go b/compute/apiv1/subnetworks_client.go index 5a00b93e530e..7f11c662686d 100644 --- a/compute/apiv1/subnetworks_client.go +++ b/compute/apiv1/subnetworks_client.go @@ -122,7 +122,8 @@ func (c *SubnetworksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SubnetworksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -267,7 +268,7 @@ func (c *subnetworksRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *subnetworksRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/subnetworks_client_example_test.go b/compute/apiv1/subnetworks_client_example_test.go index dddcd2a08044..1e8a6dc5a1d0 100644 --- a/compute/apiv1/subnetworks_client_example_test.go +++ b/compute/apiv1/subnetworks_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewSubnetworksRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewSubnetworksRESTClient() { func ExampleSubnetworksClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleSubnetworksClient_AggregatedList() { func ExampleSubnetworksClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleSubnetworksClient_Delete() { func ExampleSubnetworksClient_ExpandIpCidrRange() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleSubnetworksClient_ExpandIpCidrRange() { func ExampleSubnetworksClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleSubnetworksClient_Get() { func ExampleSubnetworksClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleSubnetworksClient_GetIamPolicy() { func ExampleSubnetworksClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -173,6 +208,11 @@ func ExampleSubnetworksClient_Insert() { func ExampleSubnetworksClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleSubnetworksClient_List() { func ExampleSubnetworksClient_ListUsable() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +270,11 @@ func ExampleSubnetworksClient_ListUsable() { func ExampleSubnetworksClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -248,6 +298,11 @@ func ExampleSubnetworksClient_Patch() { func ExampleSubnetworksClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +323,11 @@ func ExampleSubnetworksClient_SetIamPolicy() { func ExampleSubnetworksClient_SetPrivateIpGoogleAccess() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -291,6 +351,11 @@ func ExampleSubnetworksClient_SetPrivateIpGoogleAccess() { func ExampleSubnetworksClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewSubnetworksRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_grpc_proxies_client.go b/compute/apiv1/target_grpc_proxies_client.go index 5987381d7b13..3f02afde6e61 100644 --- a/compute/apiv1/target_grpc_proxies_client.go +++ b/compute/apiv1/target_grpc_proxies_client.go @@ -100,7 +100,8 @@ func (c *TargetGrpcProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetGrpcProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,7 +211,7 @@ func (c *targetGrpcProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetGrpcProxiesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/target_grpc_proxies_client_example_test.go b/compute/apiv1/target_grpc_proxies_client_example_test.go index 814d65171185..01d3a7a143e0 100644 --- a/compute/apiv1/target_grpc_proxies_client_example_test.go +++ b/compute/apiv1/target_grpc_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetGrpcProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetGrpcProxiesRESTClient() { func ExampleTargetGrpcProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleTargetGrpcProxiesClient_Delete() { func ExampleTargetGrpcProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleTargetGrpcProxiesClient_Get() { func ExampleTargetGrpcProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleTargetGrpcProxiesClient_Insert() { func ExampleTargetGrpcProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetGrpcProxiesClient_List() { func ExampleTargetGrpcProxiesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetGrpcProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_http_proxies_client.go b/compute/apiv1/target_http_proxies_client.go index 8f9965767838..178a2ba7942c 100644 --- a/compute/apiv1/target_http_proxies_client.go +++ b/compute/apiv1/target_http_proxies_client.go @@ -107,7 +107,8 @@ func (c *TargetHttpProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetHttpProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -227,7 +228,7 @@ func (c *targetHttpProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetHttpProxiesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/target_http_proxies_client_example_test.go b/compute/apiv1/target_http_proxies_client_example_test.go index c2cd5aa52320..688ab8b4c8fa 100644 --- a/compute/apiv1/target_http_proxies_client_example_test.go +++ b/compute/apiv1/target_http_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetHttpProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetHttpProxiesRESTClient() { func ExampleTargetHttpProxiesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleTargetHttpProxiesClient_AggregatedList() { func ExampleTargetHttpProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleTargetHttpProxiesClient_Delete() { func ExampleTargetHttpProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleTargetHttpProxiesClient_Get() { func ExampleTargetHttpProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetHttpProxiesClient_Insert() { func ExampleTargetHttpProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleTargetHttpProxiesClient_List() { func ExampleTargetHttpProxiesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleTargetHttpProxiesClient_Patch() { func ExampleTargetHttpProxiesClient_SetUrlMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_https_proxies_client.go b/compute/apiv1/target_https_proxies_client.go index 1e31119389b2..4ad1946c92c8 100644 --- a/compute/apiv1/target_https_proxies_client.go +++ b/compute/apiv1/target_https_proxies_client.go @@ -119,7 +119,8 @@ func (c *TargetHttpsProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetHttpsProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -259,7 +260,7 @@ func (c *targetHttpsProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetHttpsProxiesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/target_https_proxies_client_example_test.go b/compute/apiv1/target_https_proxies_client_example_test.go index 308366b6f6f5..20e9a6014d02 100644 --- a/compute/apiv1/target_https_proxies_client_example_test.go +++ b/compute/apiv1/target_https_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetHttpsProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetHttpsProxiesRESTClient() { func ExampleTargetHttpsProxiesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleTargetHttpsProxiesClient_AggregatedList() { func ExampleTargetHttpsProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleTargetHttpsProxiesClient_Delete() { func ExampleTargetHttpsProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleTargetHttpsProxiesClient_Get() { func ExampleTargetHttpsProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetHttpsProxiesClient_Insert() { func ExampleTargetHttpsProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleTargetHttpsProxiesClient_List() { func ExampleTargetHttpsProxiesClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleTargetHttpsProxiesClient_Patch() { func ExampleTargetHttpsProxiesClient_SetCertificateMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleTargetHttpsProxiesClient_SetCertificateMap() { func ExampleTargetHttpsProxiesClient_SetQuicOverride() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +270,11 @@ func ExampleTargetHttpsProxiesClient_SetQuicOverride() { func ExampleTargetHttpsProxiesClient_SetSslCertificates() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -248,6 +298,11 @@ func ExampleTargetHttpsProxiesClient_SetSslCertificates() { func ExampleTargetHttpsProxiesClient_SetSslPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -271,6 +326,11 @@ func ExampleTargetHttpsProxiesClient_SetSslPolicy() { func ExampleTargetHttpsProxiesClient_SetUrlMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_instances_client.go b/compute/apiv1/target_instances_client.go index 6349f301521b..2a1e24276119 100644 --- a/compute/apiv1/target_instances_client.go +++ b/compute/apiv1/target_instances_client.go @@ -101,7 +101,8 @@ func (c *TargetInstancesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetInstancesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -211,7 +212,7 @@ func (c *targetInstancesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetInstancesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/target_instances_client_example_test.go b/compute/apiv1/target_instances_client_example_test.go index 3d132954f605..5236bd6f6521 100644 --- a/compute/apiv1/target_instances_client_example_test.go +++ b/compute/apiv1/target_instances_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetInstancesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetInstancesRESTClient() { func ExampleTargetInstancesClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleTargetInstancesClient_AggregatedList() { func ExampleTargetInstancesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleTargetInstancesClient_Delete() { func ExampleTargetInstancesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleTargetInstancesClient_Get() { func ExampleTargetInstancesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetInstancesClient_Insert() { func ExampleTargetInstancesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetInstancesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_pools_client.go b/compute/apiv1/target_pools_client.go index cf77fd9fd658..8e304b33d470 100644 --- a/compute/apiv1/target_pools_client.go +++ b/compute/apiv1/target_pools_client.go @@ -119,7 +119,8 @@ func (c *TargetPoolsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetPoolsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -259,7 +260,7 @@ func (c *targetPoolsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetPoolsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/target_pools_client_example_test.go b/compute/apiv1/target_pools_client_example_test.go index 9c86cbbc52dc..97bb8f40fc87 100644 --- a/compute/apiv1/target_pools_client_example_test.go +++ b/compute/apiv1/target_pools_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetPoolsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetPoolsRESTClient() { func ExampleTargetPoolsClient_AddHealthCheck() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleTargetPoolsClient_AddHealthCheck() { func ExampleTargetPoolsClient_AddInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleTargetPoolsClient_AddInstance() { func ExampleTargetPoolsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleTargetPoolsClient_AggregatedList() { func ExampleTargetPoolsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -133,6 +158,11 @@ func ExampleTargetPoolsClient_Delete() { func ExampleTargetPoolsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleTargetPoolsClient_Get() { func ExampleTargetPoolsClient_GetHealth() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -173,6 +208,11 @@ func ExampleTargetPoolsClient_GetHealth() { func ExampleTargetPoolsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -196,6 +236,11 @@ func ExampleTargetPoolsClient_Insert() { func ExampleTargetPoolsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleTargetPoolsClient_List() { func ExampleTargetPoolsClient_RemoveHealthCheck() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -245,6 +295,11 @@ func ExampleTargetPoolsClient_RemoveHealthCheck() { func ExampleTargetPoolsClient_RemoveInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +323,11 @@ func ExampleTargetPoolsClient_RemoveInstance() { func ExampleTargetPoolsClient_SetBackup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetPoolsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_ssl_proxies_client.go b/compute/apiv1/target_ssl_proxies_client.go index c96f8f2d98ca..5f7d94e43d07 100644 --- a/compute/apiv1/target_ssl_proxies_client.go +++ b/compute/apiv1/target_ssl_proxies_client.go @@ -112,7 +112,8 @@ func (c *TargetSslProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetSslProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -242,7 +243,7 @@ func (c *targetSslProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetSslProxiesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/target_ssl_proxies_client_example_test.go b/compute/apiv1/target_ssl_proxies_client_example_test.go index fde6bcad9b81..3af2d582a206 100644 --- a/compute/apiv1/target_ssl_proxies_client_example_test.go +++ b/compute/apiv1/target_ssl_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetSslProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetSslProxiesRESTClient() { func ExampleTargetSslProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleTargetSslProxiesClient_Delete() { func ExampleTargetSslProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleTargetSslProxiesClient_Get() { func ExampleTargetSslProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleTargetSslProxiesClient_Insert() { func ExampleTargetSslProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetSslProxiesClient_List() { func ExampleTargetSslProxiesClient_SetBackendService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleTargetSslProxiesClient_SetBackendService() { func ExampleTargetSslProxiesClient_SetCertificateMap() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleTargetSslProxiesClient_SetCertificateMap() { func ExampleTargetSslProxiesClient_SetProxyHeader() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleTargetSslProxiesClient_SetProxyHeader() { func ExampleTargetSslProxiesClient_SetSslCertificates() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -222,6 +267,11 @@ func ExampleTargetSslProxiesClient_SetSslCertificates() { func ExampleTargetSslProxiesClient_SetSslPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetSslProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_tcp_proxies_client.go b/compute/apiv1/target_tcp_proxies_client.go index 3410577e3ddf..74b4b11a923e 100644 --- a/compute/apiv1/target_tcp_proxies_client.go +++ b/compute/apiv1/target_tcp_proxies_client.go @@ -103,7 +103,8 @@ func (c *TargetTcpProxiesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetTcpProxiesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,7 +219,7 @@ func (c *targetTcpProxiesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetTcpProxiesRESTClient) Connection() *grpc.ClientConn { return nil } @@ -660,50 +661,3 @@ func (c *targetTcpProxiesRESTClient) SetProxyHeader(ctx context.Context, req *co } return op, nil } - -// TargetTcpProxyIterator manages a stream of *computepb.TargetTcpProxy. -type TargetTcpProxyIterator struct { - items []*computepb.TargetTcpProxy - pageInfo *iterator.PageInfo - nextFunc func() error - - // Response is the raw response for the current page. - // It must be cast to the RPC response type. - // Calling Next() or InternalFetch() updates this value. - Response interface{} - - // InternalFetch is for use by the Google Cloud Libraries only. - // It is not part of the stable interface of this package. - // - // InternalFetch returns results from a single call to the underlying RPC. - // The number of results is no greater than pageSize. - // If there are no more results, nextPageToken is empty and err is nil. - InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetTcpProxy, nextPageToken string, err error) -} - -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. -func (it *TargetTcpProxyIterator) PageInfo() *iterator.PageInfo { - return it.pageInfo -} - -// Next returns the next result. Its second return value is iterator.Done if there are no more -// results. Once Next returns Done, all subsequent calls will return Done. -func (it *TargetTcpProxyIterator) Next() (*computepb.TargetTcpProxy, error) { - var item *computepb.TargetTcpProxy - if err := it.nextFunc(); err != nil { - return item, err - } - item = it.items[0] - it.items = it.items[1:] - return item, nil -} - -func (it *TargetTcpProxyIterator) bufLen() int { - return len(it.items) -} - -func (it *TargetTcpProxyIterator) takeBuf() interface{} { - b := it.items - it.items = nil - return b -} diff --git a/compute/apiv1/target_tcp_proxies_client_example_test.go b/compute/apiv1/target_tcp_proxies_client_example_test.go index 1e9c7826dd22..debca114d908 100644 --- a/compute/apiv1/target_tcp_proxies_client_example_test.go +++ b/compute/apiv1/target_tcp_proxies_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetTcpProxiesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetTcpProxiesRESTClient() { func ExampleTargetTcpProxiesClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleTargetTcpProxiesClient_Delete() { func ExampleTargetTcpProxiesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -81,6 +96,11 @@ func ExampleTargetTcpProxiesClient_Get() { func ExampleTargetTcpProxiesClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleTargetTcpProxiesClient_Insert() { func ExampleTargetTcpProxiesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetTcpProxiesClient_List() { func ExampleTargetTcpProxiesClient_SetBackendService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleTargetTcpProxiesClient_SetBackendService() { func ExampleTargetTcpProxiesClient_SetProxyHeader() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetTcpProxiesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/target_vpn_gateways_client.go b/compute/apiv1/target_vpn_gateways_client.go index 7ffbc98ab2ee..8c91a836ad4f 100644 --- a/compute/apiv1/target_vpn_gateways_client.go +++ b/compute/apiv1/target_vpn_gateways_client.go @@ -48,6 +48,7 @@ type TargetVpnGatewaysCallOptions struct { Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption + SetLabels []gax.CallOption } func defaultTargetVpnGatewaysRESTCallOptions() *TargetVpnGatewaysCallOptions { @@ -57,6 +58,7 @@ func defaultTargetVpnGatewaysRESTCallOptions() *TargetVpnGatewaysCallOptions { Get: []gax.CallOption{}, Insert: []gax.CallOption{}, List: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -70,6 +72,7 @@ type internalTargetVpnGatewaysClient interface { Get(context.Context, *computepb.GetTargetVpnGatewayRequest, ...gax.CallOption) (*computepb.TargetVpnGateway, error) Insert(context.Context, *computepb.InsertTargetVpnGatewayRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListTargetVpnGatewaysRequest, ...gax.CallOption) *TargetVpnGatewayIterator + SetLabels(context.Context, *computepb.SetLabelsTargetVpnGatewayRequest, ...gax.CallOption) (*Operation, error) } // TargetVpnGatewaysClient is a client for interacting with Google Compute Engine API. @@ -101,7 +104,8 @@ func (c *TargetVpnGatewaysClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TargetVpnGatewaysClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -131,6 +135,11 @@ func (c *TargetVpnGatewaysClient) List(ctx context.Context, req *computepb.ListT return c.internalClient.List(ctx, req, opts...) } +// SetLabels sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. +func (c *TargetVpnGatewaysClient) SetLabels(ctx context.Context, req *computepb.SetLabelsTargetVpnGatewayRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type targetVpnGatewaysRESTClient struct { // The http endpoint to connect to. @@ -211,7 +220,7 @@ func (c *targetVpnGatewaysRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *targetVpnGatewaysRESTClient) Connection() *grpc.ClientConn { return nil } @@ -614,6 +623,81 @@ func (c *targetVpnGatewaysRESTClient) List(ctx context.Context, req *computepb.L return it } +// SetLabels sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. +func (c *targetVpnGatewaysRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsTargetVpnGatewayRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetRegionSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/targetVpnGateways/%v/setLabels", req.GetProject(), req.GetRegion(), req.GetResource()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + // TargetVpnGatewayIterator manages a stream of *computepb.TargetVpnGateway. type TargetVpnGatewayIterator struct { items []*computepb.TargetVpnGateway diff --git a/compute/apiv1/target_vpn_gateways_client_example_test.go b/compute/apiv1/target_vpn_gateways_client_example_test.go index f57670225f50..82fb32446ba6 100644 --- a/compute/apiv1/target_vpn_gateways_client_example_test.go +++ b/compute/apiv1/target_vpn_gateways_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewTargetVpnGatewaysRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewTargetVpnGatewaysRESTClient() { func ExampleTargetVpnGatewaysClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleTargetVpnGatewaysClient_AggregatedList() { func ExampleTargetVpnGatewaysClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleTargetVpnGatewaysClient_Delete() { func ExampleTargetVpnGatewaysClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleTargetVpnGatewaysClient_Get() { func ExampleTargetVpnGatewaysClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleTargetVpnGatewaysClient_Insert() { func ExampleTargetVpnGatewaysClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,3 +183,31 @@ func ExampleTargetVpnGatewaysClient_List() { _ = resp } } + +func ExampleTargetVpnGatewaysClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewTargetVpnGatewaysRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsTargetVpnGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsTargetVpnGatewayRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/url_maps_client.go b/compute/apiv1/url_maps_client.go index 884baa704d22..9e3bf35b45e9 100644 --- a/compute/apiv1/url_maps_client.go +++ b/compute/apiv1/url_maps_client.go @@ -113,7 +113,8 @@ func (c *UrlMapsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *UrlMapsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -243,7 +244,7 @@ func (c *urlMapsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *urlMapsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/url_maps_client_example_test.go b/compute/apiv1/url_maps_client_example_test.go index 1c2293224ee6..f6c4529b1f4c 100644 --- a/compute/apiv1/url_maps_client_example_test.go +++ b/compute/apiv1/url_maps_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewUrlMapsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewUrlMapsRESTClient() { func ExampleUrlMapsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleUrlMapsClient_AggregatedList() { func ExampleUrlMapsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleUrlMapsClient_Delete() { func ExampleUrlMapsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleUrlMapsClient_Get() { func ExampleUrlMapsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleUrlMapsClient_Insert() { func ExampleUrlMapsClient_InvalidateCache() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,6 +183,11 @@ func ExampleUrlMapsClient_InvalidateCache() { func ExampleUrlMapsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -179,6 +214,11 @@ func ExampleUrlMapsClient_List() { func ExampleUrlMapsClient_Patch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -202,6 +242,11 @@ func ExampleUrlMapsClient_Patch() { func ExampleUrlMapsClient_Update() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -225,6 +270,11 @@ func ExampleUrlMapsClient_Update() { func ExampleUrlMapsClient_Validate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewUrlMapsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/vpn_gateways_client.go b/compute/apiv1/vpn_gateways_client.go index 5f64f8b3474b..674bc3efb5c4 100644 --- a/compute/apiv1/vpn_gateways_client.go +++ b/compute/apiv1/vpn_gateways_client.go @@ -110,7 +110,8 @@ func (c *VpnGatewaysClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VpnGatewaysClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -235,7 +236,7 @@ func (c *vpnGatewaysRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *vpnGatewaysRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/vpn_gateways_client_example_test.go b/compute/apiv1/vpn_gateways_client_example_test.go index 1e11fd72fa0d..5ca7225ea501 100644 --- a/compute/apiv1/vpn_gateways_client_example_test.go +++ b/compute/apiv1/vpn_gateways_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewVpnGatewaysRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewVpnGatewaysRESTClient() { func ExampleVpnGatewaysClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleVpnGatewaysClient_AggregatedList() { func ExampleVpnGatewaysClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleVpnGatewaysClient_Delete() { func ExampleVpnGatewaysClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleVpnGatewaysClient_Get() { func ExampleVpnGatewaysClient_GetStatus() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -127,6 +152,11 @@ func ExampleVpnGatewaysClient_GetStatus() { func ExampleVpnGatewaysClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleVpnGatewaysClient_Insert() { func ExampleVpnGatewaysClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -176,6 +211,11 @@ func ExampleVpnGatewaysClient_List() { func ExampleVpnGatewaysClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -199,6 +239,11 @@ func ExampleVpnGatewaysClient_SetLabels() { func ExampleVpnGatewaysClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnGatewaysRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/vpn_tunnels_client.go b/compute/apiv1/vpn_tunnels_client.go index a37395dccb43..3cf65e51415e 100644 --- a/compute/apiv1/vpn_tunnels_client.go +++ b/compute/apiv1/vpn_tunnels_client.go @@ -48,6 +48,7 @@ type VpnTunnelsCallOptions struct { Get []gax.CallOption Insert []gax.CallOption List []gax.CallOption + SetLabels []gax.CallOption } func defaultVpnTunnelsRESTCallOptions() *VpnTunnelsCallOptions { @@ -57,6 +58,7 @@ func defaultVpnTunnelsRESTCallOptions() *VpnTunnelsCallOptions { Get: []gax.CallOption{}, Insert: []gax.CallOption{}, List: []gax.CallOption{}, + SetLabels: []gax.CallOption{}, } } @@ -70,6 +72,7 @@ type internalVpnTunnelsClient interface { Get(context.Context, *computepb.GetVpnTunnelRequest, ...gax.CallOption) (*computepb.VpnTunnel, error) Insert(context.Context, *computepb.InsertVpnTunnelRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListVpnTunnelsRequest, ...gax.CallOption) *VpnTunnelIterator + SetLabels(context.Context, *computepb.SetLabelsVpnTunnelRequest, ...gax.CallOption) (*Operation, error) } // VpnTunnelsClient is a client for interacting with Google Compute Engine API. @@ -101,7 +104,8 @@ func (c *VpnTunnelsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VpnTunnelsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -131,6 +135,11 @@ func (c *VpnTunnelsClient) List(ctx context.Context, req *computepb.ListVpnTunne return c.internalClient.List(ctx, req, opts...) } +// SetLabels sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. +func (c *VpnTunnelsClient) SetLabels(ctx context.Context, req *computepb.SetLabelsVpnTunnelRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetLabels(ctx, req, opts...) +} + // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. type vpnTunnelsRESTClient struct { // The http endpoint to connect to. @@ -211,7 +220,7 @@ func (c *vpnTunnelsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *vpnTunnelsRESTClient) Connection() *grpc.ClientConn { return nil } @@ -614,6 +623,81 @@ func (c *vpnTunnelsRESTClient) List(ctx context.Context, req *computepb.ListVpnT return it } +// SetLabels sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. +func (c *vpnTunnelsRESTClient) SetLabels(ctx context.Context, req *computepb.SetLabelsVpnTunnelRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetRegionSetLabelsRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/vpnTunnels/%v/setLabels", req.GetProject(), req.GetRegion(), req.GetResource()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetLabels[0:len((*c.CallOptions).SetLabels):len((*c.CallOptions).SetLabels)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + ®ionOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + region: req.GetRegion(), + }, + } + return op, nil +} + // VpnTunnelIterator manages a stream of *computepb.VpnTunnel. type VpnTunnelIterator struct { items []*computepb.VpnTunnel diff --git a/compute/apiv1/vpn_tunnels_client_example_test.go b/compute/apiv1/vpn_tunnels_client_example_test.go index b17e460a7605..70a667e0f9b5 100644 --- a/compute/apiv1/vpn_tunnels_client_example_test.go +++ b/compute/apiv1/vpn_tunnels_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewVpnTunnelsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewVpnTunnelsRESTClient() { func ExampleVpnTunnelsClient_AggregatedList() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleVpnTunnelsClient_AggregatedList() { func ExampleVpnTunnelsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleVpnTunnelsClient_Delete() { func ExampleVpnTunnelsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -107,6 +127,11 @@ func ExampleVpnTunnelsClient_Get() { func ExampleVpnTunnelsClient_Insert() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -130,6 +155,11 @@ func ExampleVpnTunnelsClient_Insert() { func ExampleVpnTunnelsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewVpnTunnelsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -153,3 +183,31 @@ func ExampleVpnTunnelsClient_List() { _ = resp } } + +func ExampleVpnTunnelsClient_SetLabels() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := compute.NewVpnTunnelsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetLabelsVpnTunnelRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsVpnTunnelRequest. + } + op, err := c.SetLabels(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} diff --git a/compute/apiv1/zone_operations_client.go b/compute/apiv1/zone_operations_client.go index 5431635f4328..9a33a4412c69 100644 --- a/compute/apiv1/zone_operations_client.go +++ b/compute/apiv1/zone_operations_client.go @@ -96,7 +96,8 @@ func (c *ZoneOperationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ZoneOperationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -185,7 +186,7 @@ func (c *zoneOperationsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *zoneOperationsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/zone_operations_client_example_test.go b/compute/apiv1/zone_operations_client_example_test.go index 262a92209557..3807ad199833 100644 --- a/compute/apiv1/zone_operations_client_example_test.go +++ b/compute/apiv1/zone_operations_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewZoneOperationsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewZoneOperationsRESTClient() { func ExampleZoneOperationsClient_Delete() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleZoneOperationsClient_Delete() { func ExampleZoneOperationsClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleZoneOperationsClient_Get() { func ExampleZoneOperationsClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleZoneOperationsClient_List() { func ExampleZoneOperationsClient_Wait() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZoneOperationsRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/apiv1/zones_client.go b/compute/apiv1/zones_client.go index 48d1edbcd617..dbb26d7e78bf 100644 --- a/compute/apiv1/zones_client.go +++ b/compute/apiv1/zones_client.go @@ -90,7 +90,8 @@ func (c *ZonesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ZonesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -169,7 +170,7 @@ func (c *zonesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *zonesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/compute/apiv1/zones_client_example_test.go b/compute/apiv1/zones_client_example_test.go index 8ffbc469d00b..661beccda5f6 100644 --- a/compute/apiv1/zones_client_example_test.go +++ b/compute/apiv1/zones_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewZonesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZonesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewZonesRESTClient() { func ExampleZonesClient_Get() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZonesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleZonesClient_Get() { func ExampleZonesClient_List() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := compute.NewZonesRESTClient(ctx) if err != nil { // TODO: Handle error. diff --git a/compute/go.mod b/compute/go.mod index 39daeb45eea3..65ec9ba600f8 100644 --- a/compute/go.mod +++ b/compute/go.mod @@ -1,13 +1,25 @@ module cloud.google.com/go/compute -go 1.15 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/google/go-cmp v0.5.8 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.96.0 + google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/compute/go.sum b/compute/go.sum index 937faa624f6a..42ad952fdb8a 100644 --- a/compute/go.sum +++ b/compute/go.sum @@ -30,6 +30,7 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -49,6 +50,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -161,6 +163,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -289,8 +292,9 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -310,8 +314,11 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,8 +389,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -496,8 +504,9 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -584,8 +593,11 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de h1:5ANeKFmGdtiputJJYeUVg8nTGA/1bEirx4CgzcnPSx8= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -616,8 +628,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -632,8 +645,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/compute/internal/version.go b/compute/internal/version.go index 7c251d994559..1850527884a3 100644 --- a/compute/internal/version.go +++ b/compute/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.7.0" +const Version = "1.10.0" diff --git a/compute/metadata/metadata.go b/compute/metadata/metadata.go index 1405d0967468..50538b1d343e 100644 --- a/compute/metadata/metadata.go +++ b/compute/metadata/metadata.go @@ -71,6 +71,7 @@ func newDefaultHTTPClient() *http.Client { KeepAlive: 30 * time.Second, }).Dial, }, + Timeout: 5 * time.Second, } } diff --git a/contactcenterinsights/CHANGES.md b/contactcenterinsights/CHANGES.md index fcb9549e4355..2f04f11f2ad7 100644 --- a/contactcenterinsights/CHANGES.md +++ b/contactcenterinsights/CHANGES.md @@ -1,5 +1,26 @@ # Changes +## [1.2.3](https://github.com/googleapis/google-cloud-go/compare/contactcenterinsights/v1.2.2...contactcenterinsights/v1.2.3) (2022-08-23) + + +### Documentation + +* **contactcenterinsights:** Updating comments chore: added LRO to API list ([7b01462](https://github.com/googleapis/google-cloud-go/commit/7b014626f07dd2974d6f72f926c2df1d25fa1f4a)) + +## [1.2.2](https://github.com/googleapis/google-cloud-go/compare/contactcenterinsights/v1.2.1...contactcenterinsights/v1.2.2) (2022-08-02) + + +### Documentation + +* **contactcenterinsights:** Updating comments chore:remove LRO to API list ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) + +## [1.2.1](https://github.com/googleapis/google-cloud-go/compare/contactcenterinsights/v1.2.0...contactcenterinsights/v1.2.1) (2022-07-12) + + +### Documentation + +* **contactcenterinsights:** Updating comments ([4134941](https://github.com/googleapis/google-cloud-go/commit/41349411e601f57dc6d9e246f1748fd86d17bb15)) + ## [1.2.0](https://github.com/googleapis/google-cloud-go/compare/contactcenterinsights/v1.1.0...contactcenterinsights/v1.2.0) (2022-02-23) diff --git a/contactcenterinsights/apiv1/contact_center_insights_client.go b/contactcenterinsights/apiv1/contact_center_insights_client.go index 6e0512228463..30de245b45de 100644 --- a/contactcenterinsights/apiv1/contact_center_insights_client.go +++ b/contactcenterinsights/apiv1/contact_center_insights_client.go @@ -589,7 +589,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -897,7 +898,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go b/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go index 30e7fab8816c..dac72900913b 100644 --- a/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go +++ b/contactcenterinsights/apiv1/contact_center_insights_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleClient_CreateConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -59,6 +69,11 @@ func ExampleClient_CreateConversation() { func ExampleClient_UpdateConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -79,6 +94,11 @@ func ExampleClient_UpdateConversation() { func ExampleClient_GetConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -99,6 +119,11 @@ func ExampleClient_GetConversation() { func ExampleClient_ListConversations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleClient_ListConversations() { func ExampleClient_DeleteConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +173,11 @@ func ExampleClient_DeleteConversation() { func ExampleClient_CreateAnalysis() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -168,6 +203,11 @@ func ExampleClient_CreateAnalysis() { func ExampleClient_GetAnalysis() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -188,6 +228,11 @@ func ExampleClient_GetAnalysis() { func ExampleClient_ListAnalyses() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +259,11 @@ func ExampleClient_ListAnalyses() { func ExampleClient_DeleteAnalysis() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -232,6 +282,11 @@ func ExampleClient_DeleteAnalysis() { func ExampleClient_ExportInsightsData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -257,6 +312,11 @@ func ExampleClient_ExportInsightsData() { func ExampleClient_CreateIssueModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -282,6 +342,11 @@ func ExampleClient_CreateIssueModel() { func ExampleClient_UpdateIssueModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +367,11 @@ func ExampleClient_UpdateIssueModel() { func ExampleClient_GetIssueModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +392,11 @@ func ExampleClient_GetIssueModel() { func ExampleClient_ListIssueModels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -342,6 +417,11 @@ func ExampleClient_ListIssueModels() { func ExampleClient_DeleteIssueModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -365,6 +445,11 @@ func ExampleClient_DeleteIssueModel() { func ExampleClient_DeployIssueModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -390,6 +475,11 @@ func ExampleClient_DeployIssueModel() { func ExampleClient_UndeployIssueModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -415,6 +505,11 @@ func ExampleClient_UndeployIssueModel() { func ExampleClient_GetIssue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -435,6 +530,11 @@ func ExampleClient_GetIssue() { func ExampleClient_ListIssues() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -455,6 +555,11 @@ func ExampleClient_ListIssues() { func ExampleClient_UpdateIssue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -475,6 +580,11 @@ func ExampleClient_UpdateIssue() { func ExampleClient_CalculateIssueModelStats() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -495,6 +605,11 @@ func ExampleClient_CalculateIssueModelStats() { func ExampleClient_CreatePhraseMatcher() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -515,6 +630,11 @@ func ExampleClient_CreatePhraseMatcher() { func ExampleClient_GetPhraseMatcher() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -535,6 +655,11 @@ func ExampleClient_GetPhraseMatcher() { func ExampleClient_ListPhraseMatchers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -561,6 +686,11 @@ func ExampleClient_ListPhraseMatchers() { func ExampleClient_DeletePhraseMatcher() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -579,6 +709,11 @@ func ExampleClient_DeletePhraseMatcher() { func ExampleClient_UpdatePhraseMatcher() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -599,6 +734,11 @@ func ExampleClient_UpdatePhraseMatcher() { func ExampleClient_CalculateStats() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -619,6 +759,11 @@ func ExampleClient_CalculateStats() { func ExampleClient_GetSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -639,6 +784,11 @@ func ExampleClient_GetSettings() { func ExampleClient_UpdateSettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -659,6 +809,11 @@ func ExampleClient_UpdateSettings() { func ExampleClient_CreateView() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -679,6 +834,11 @@ func ExampleClient_CreateView() { func ExampleClient_GetView() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -699,6 +859,11 @@ func ExampleClient_GetView() { func ExampleClient_ListViews() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -725,6 +890,11 @@ func ExampleClient_ListViews() { func ExampleClient_UpdateView() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -745,6 +915,11 @@ func ExampleClient_UpdateView() { func ExampleClient_DeleteView() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -763,6 +938,11 @@ func ExampleClient_DeleteView() { func ExampleClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -781,6 +961,11 @@ func ExampleClient_CancelOperation() { func ExampleClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -801,6 +986,11 @@ func ExampleClient_GetOperation() { func ExampleClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := contactcenterinsights.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/contactcenterinsights/apiv1/doc.go b/contactcenterinsights/apiv1/doc.go index 1acec8899886..2efd0a472236 100644 --- a/contactcenterinsights/apiv1/doc.go +++ b/contactcenterinsights/apiv1/doc.go @@ -17,43 +17,54 @@ // Package contactcenterinsights is an auto-generated package for the // Contact Center AI Insights API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := contactcenterinsights.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := contactcenterinsights.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := contactcenterinsights.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := contactcenterinsights.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &contactcenterinsightspb.CreateConversationRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreateConversationRequest. -// } -// resp, err := c.CreateConversation(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp +// req := &contactcenterinsightspb.CreateConversationRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1#CreateConversationRequest. +// } +// resp, err := c.CreateConversation(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp // -// Use of Context +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/contactcenterinsights/go.mod b/contactcenterinsights/go.mod index 7f37edca232e..96778b024f7a 100644 --- a/contactcenterinsights/go.mod +++ b/contactcenterinsights/go.mod @@ -5,10 +5,10 @@ go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/contactcenterinsights/go.sum b/contactcenterinsights/go.sum index cc18f1ad14b3..98ea25417acd 100644 --- a/contactcenterinsights/go.sum +++ b/contactcenterinsights/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -586,8 +589,9 @@ google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc h1:Nf+EdcTLHR8qDNN/KfkQL0u0ssxt9OhbaWCl5C0ucEI= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -618,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -634,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/contactcenterinsights/internal/version.go b/contactcenterinsights/internal/version.go index d0e4a6fd16b3..81a2ea03583c 100644 --- a/contactcenterinsights/internal/version.go +++ b/contactcenterinsights/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.2.0" +const Version = "1.2.3" diff --git a/container/CHANGES.md b/container/CHANGES.md index d404f31cbec9..cec1eeea79ae 100644 --- a/container/CHANGES.md +++ b/container/CHANGES.md @@ -1,5 +1,26 @@ # Changes +## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/container/v1.3.1...container/v1.4.0) (2022-09-19) + + +### Features + +* **container:** added High Throughput Logging API for Google Kubernetes Engine docs: ReservationAffinity key field docs incorrect docs: missing period in description for min CPU platform ([bc7a5f6](https://github.com/googleapis/google-cloud-go/commit/bc7a5f609994f73e26f72a78f0ff14aa75c1c227)) + +## [1.3.1](https://github.com/googleapis/google-cloud-go/compare/container/v1.3.0...container/v1.3.1) (2022-08-02) + + +### Documentation + +* **container:** BinaryAuthorization.enabled field is marked as deprecated ([338d9c3](https://github.com/googleapis/google-cloud-go/commit/338d9c38b9c7f1b5e75493a2e3437c50785c561c)) + +## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/container/v1.2.0...container/v1.3.0) (2022-07-12) + + +### Features + +* **container:** add support to modify kubelet pod pid limit in node system configuration feat: support spot VM feat: support Tier 1 bandwidth feat: update support for node pool labels, taints and network tags feat: add Binauthz Evaluation mode support to GKE Classic feat: add GKE Identity Service feat: add network tags to autopilot cluster feat: support enabling Confidential Nodes in the node pool feat: support node pool blue-green upgrade feat: add Location Policy API feat: support GPU timesharing feat: add managed prometheus feature ([963efe2](https://github.com/googleapis/google-cloud-go/commit/963efe22cf67bc04fed09b5fa8f9cb20b9edf1a3)) + ## [1.2.0](https://github.com/googleapis/google-cloud-go/compare/container/v1.1.0...container/v1.2.0) (2022-02-23) diff --git a/container/apiv1/cluster_manager_client.go b/container/apiv1/cluster_manager_client.go index 52d8c70475a1..86b6ab7a6cd8 100644 --- a/container/apiv1/cluster_manager_client.go +++ b/container/apiv1/cluster_manager_client.go @@ -61,6 +61,7 @@ type ClusterManagerCallOptions struct { GetNodePool []gax.CallOption CreateNodePool []gax.CallOption DeleteNodePool []gax.CallOption + CompleteNodePoolUpgrade []gax.CallOption RollbackNodePoolUpgrade []gax.CallOption SetNodePoolManagement []gax.CallOption SetLabels []gax.CallOption @@ -208,6 +209,7 @@ func defaultClusterManagerCallOptions() *ClusterManagerCallOptions { }) }), }, + CompleteNodePoolUpgrade: []gax.CallOption{}, RollbackNodePoolUpgrade: []gax.CallOption{}, SetNodePoolManagement: []gax.CallOption{}, SetLabels: []gax.CallOption{}, @@ -248,6 +250,7 @@ type internalClusterManagerClient interface { GetNodePool(context.Context, *containerpb.GetNodePoolRequest, ...gax.CallOption) (*containerpb.NodePool, error) CreateNodePool(context.Context, *containerpb.CreateNodePoolRequest, ...gax.CallOption) (*containerpb.Operation, error) DeleteNodePool(context.Context, *containerpb.DeleteNodePoolRequest, ...gax.CallOption) (*containerpb.Operation, error) + CompleteNodePoolUpgrade(context.Context, *containerpb.CompleteNodePoolUpgradeRequest, ...gax.CallOption) error RollbackNodePoolUpgrade(context.Context, *containerpb.RollbackNodePoolUpgradeRequest, ...gax.CallOption) (*containerpb.Operation, error) SetNodePoolManagement(context.Context, *containerpb.SetNodePoolManagementRequest, ...gax.CallOption) (*containerpb.Operation, error) SetLabels(context.Context, *containerpb.SetLabelsRequest, ...gax.CallOption) (*containerpb.Operation, error) @@ -289,7 +292,8 @@ func (c *ClusterManagerClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ClusterManagerClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -436,6 +440,12 @@ func (c *ClusterManagerClient) DeleteNodePool(ctx context.Context, req *containe return c.internalClient.DeleteNodePool(ctx, req, opts...) } +// CompleteNodePoolUpgrade completeNodePoolUpgrade will signal an on-going node pool upgrade to +// complete. +func (c *ClusterManagerClient) CompleteNodePoolUpgrade(ctx context.Context, req *containerpb.CompleteNodePoolUpgradeRequest, opts ...gax.CallOption) error { + return c.internalClient.CompleteNodePoolUpgrade(ctx, req, opts...) +} + // RollbackNodePoolUpgrade rolls back a previously Aborted or Failed NodePool upgrade. // This makes no changes if the last upgrade successfully completed. func (c *ClusterManagerClient) RollbackNodePoolUpgrade(ctx context.Context, req *containerpb.RollbackNodePoolUpgradeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { @@ -549,7 +559,8 @@ func NewClusterManagerClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *clusterManagerGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -1044,6 +1055,19 @@ func (c *clusterManagerGRPCClient) DeleteNodePool(ctx context.Context, req *cont return resp, nil } +func (c *clusterManagerGRPCClient) CompleteNodePoolUpgrade(ctx context.Context, req *containerpb.CompleteNodePoolUpgradeRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CompleteNodePoolUpgrade[0:len((*c.CallOptions).CompleteNodePoolUpgrade):len((*c.CallOptions).CompleteNodePoolUpgrade)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.clusterManagerClient.CompleteNodePoolUpgrade(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + func (c *clusterManagerGRPCClient) RollbackNodePoolUpgrade(ctx context.Context, req *containerpb.RollbackNodePoolUpgradeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 45000*time.Millisecond) diff --git a/container/apiv1/cluster_manager_client_example_test.go b/container/apiv1/cluster_manager_client_example_test.go index 00fde1050170..a24ee68e3ebc 100644 --- a/container/apiv1/cluster_manager_client_example_test.go +++ b/container/apiv1/cluster_manager_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClusterManagerClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClusterManagerClient() { func ExampleClusterManagerClient_ListClusters() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleClusterManagerClient_ListClusters() { func ExampleClusterManagerClient_GetCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleClusterManagerClient_GetCluster() { func ExampleClusterManagerClient_CreateCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +118,11 @@ func ExampleClusterManagerClient_CreateCluster() { func ExampleClusterManagerClient_UpdateCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -118,6 +143,11 @@ func ExampleClusterManagerClient_UpdateCluster() { func ExampleClusterManagerClient_UpdateNodePool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +168,11 @@ func ExampleClusterManagerClient_UpdateNodePool() { func ExampleClusterManagerClient_SetNodePoolAutoscaling() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +193,11 @@ func ExampleClusterManagerClient_SetNodePoolAutoscaling() { func ExampleClusterManagerClient_SetLoggingService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -178,6 +218,11 @@ func ExampleClusterManagerClient_SetLoggingService() { func ExampleClusterManagerClient_SetMonitoringService() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -198,6 +243,11 @@ func ExampleClusterManagerClient_SetMonitoringService() { func ExampleClusterManagerClient_SetAddonsConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -218,6 +268,11 @@ func ExampleClusterManagerClient_SetAddonsConfig() { func ExampleClusterManagerClient_SetLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -238,6 +293,11 @@ func ExampleClusterManagerClient_SetLocations() { func ExampleClusterManagerClient_UpdateMaster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -258,6 +318,11 @@ func ExampleClusterManagerClient_UpdateMaster() { func ExampleClusterManagerClient_SetMasterAuth() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -278,6 +343,11 @@ func ExampleClusterManagerClient_SetMasterAuth() { func ExampleClusterManagerClient_DeleteCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -298,6 +368,11 @@ func ExampleClusterManagerClient_DeleteCluster() { func ExampleClusterManagerClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -318,6 +393,11 @@ func ExampleClusterManagerClient_ListOperations() { func ExampleClusterManagerClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -338,6 +418,11 @@ func ExampleClusterManagerClient_GetOperation() { func ExampleClusterManagerClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -356,6 +441,11 @@ func ExampleClusterManagerClient_CancelOperation() { func ExampleClusterManagerClient_GetServerConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -376,6 +466,11 @@ func ExampleClusterManagerClient_GetServerConfig() { func ExampleClusterManagerClient_GetJSONWebKeys() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -396,6 +491,11 @@ func ExampleClusterManagerClient_GetJSONWebKeys() { func ExampleClusterManagerClient_ListNodePools() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -416,6 +516,11 @@ func ExampleClusterManagerClient_ListNodePools() { func ExampleClusterManagerClient_GetNodePool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -436,6 +541,11 @@ func ExampleClusterManagerClient_GetNodePool() { func ExampleClusterManagerClient_CreateNodePool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -456,6 +566,11 @@ func ExampleClusterManagerClient_CreateNodePool() { func ExampleClusterManagerClient_DeleteNodePool() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -474,8 +589,36 @@ func ExampleClusterManagerClient_DeleteNodePool() { _ = resp } +func ExampleClusterManagerClient_CompleteNodePoolUpgrade() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := container.NewClusterManagerClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &containerpb.CompleteNodePoolUpgradeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/container/v1#CompleteNodePoolUpgradeRequest. + } + err = c.CompleteNodePoolUpgrade(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + func ExampleClusterManagerClient_RollbackNodePoolUpgrade() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -496,6 +639,11 @@ func ExampleClusterManagerClient_RollbackNodePoolUpgrade() { func ExampleClusterManagerClient_SetNodePoolManagement() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -516,6 +664,11 @@ func ExampleClusterManagerClient_SetNodePoolManagement() { func ExampleClusterManagerClient_SetLabels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -536,6 +689,11 @@ func ExampleClusterManagerClient_SetLabels() { func ExampleClusterManagerClient_SetLegacyAbac() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -556,6 +714,11 @@ func ExampleClusterManagerClient_SetLegacyAbac() { func ExampleClusterManagerClient_StartIPRotation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -576,6 +739,11 @@ func ExampleClusterManagerClient_StartIPRotation() { func ExampleClusterManagerClient_CompleteIPRotation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -596,6 +764,11 @@ func ExampleClusterManagerClient_CompleteIPRotation() { func ExampleClusterManagerClient_SetNodePoolSize() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -616,6 +789,11 @@ func ExampleClusterManagerClient_SetNodePoolSize() { func ExampleClusterManagerClient_SetNetworkPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -636,6 +814,11 @@ func ExampleClusterManagerClient_SetNetworkPolicy() { func ExampleClusterManagerClient_SetMaintenancePolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -656,6 +839,11 @@ func ExampleClusterManagerClient_SetMaintenancePolicy() { func ExampleClusterManagerClient_ListUsableSubnetworks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := container.NewClusterManagerClient(ctx) if err != nil { // TODO: Handle error. diff --git a/container/apiv1/doc.go b/container/apiv1/doc.go index 6086f3969d86..9e7a13ef71e0 100644 --- a/container/apiv1/doc.go +++ b/container/apiv1/doc.go @@ -20,45 +20,56 @@ // Builds and manages container-based applications, powered by the open // source Kubernetes technology. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := container.NewClusterManagerClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := container.NewClusterManagerClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := container.NewClusterManagerClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &containerpb.ListClustersRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/container/v1#ListClustersRequest. -// } -// resp, err := c.ListClusters(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := container.NewClusterManagerClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &containerpb.ListClustersRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/container/v1#ListClustersRequest. +// } +// resp, err := c.ListClusters(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewClusterManagerClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/container/apiv1/gapic_metadata.json b/container/apiv1/gapic_metadata.json index 7cdf466eea3b..dbb5c4ab80d1 100644 --- a/container/apiv1/gapic_metadata.json +++ b/container/apiv1/gapic_metadata.json @@ -20,6 +20,11 @@ "CompleteIPRotation" ] }, + "CompleteNodePoolUpgrade": { + "methods": [ + "CompleteNodePoolUpgrade" + ] + }, "CreateCluster": { "methods": [ "CreateCluster" diff --git a/container/apiv1/mock_test.go b/container/apiv1/mock_test.go deleted file mode 100644 index 7e55e1a07a04..000000000000 --- a/container/apiv1/mock_test.go +++ /dev/null @@ -1,2911 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// AUTO-GENERATED CODE. DO NOT EDIT. - -package container - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - containerpb "google.golang.org/genproto/googleapis/container/v1" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockClusterManagerServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - containerpb.ClusterManagerServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockClusterManagerServer) ListClusters(ctx context.Context, req *containerpb.ListClustersRequest) (*containerpb.ListClustersResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.ListClustersResponse), nil -} - -func (s *mockClusterManagerServer) GetCluster(ctx context.Context, req *containerpb.GetClusterRequest) (*containerpb.Cluster, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Cluster), nil -} - -func (s *mockClusterManagerServer) CreateCluster(ctx context.Context, req *containerpb.CreateClusterRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) UpdateCluster(ctx context.Context, req *containerpb.UpdateClusterRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) UpdateNodePool(ctx context.Context, req *containerpb.UpdateNodePoolRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetNodePoolAutoscaling(ctx context.Context, req *containerpb.SetNodePoolAutoscalingRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetLoggingService(ctx context.Context, req *containerpb.SetLoggingServiceRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetMonitoringService(ctx context.Context, req *containerpb.SetMonitoringServiceRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetAddonsConfig(ctx context.Context, req *containerpb.SetAddonsConfigRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetLocations(ctx context.Context, req *containerpb.SetLocationsRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) UpdateMaster(ctx context.Context, req *containerpb.UpdateMasterRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetMasterAuth(ctx context.Context, req *containerpb.SetMasterAuthRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) DeleteCluster(ctx context.Context, req *containerpb.DeleteClusterRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) ListOperations(ctx context.Context, req *containerpb.ListOperationsRequest) (*containerpb.ListOperationsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.ListOperationsResponse), nil -} - -func (s *mockClusterManagerServer) GetOperation(ctx context.Context, req *containerpb.GetOperationRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) CancelOperation(ctx context.Context, req *containerpb.CancelOperationRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockClusterManagerServer) GetServerConfig(ctx context.Context, req *containerpb.GetServerConfigRequest) (*containerpb.ServerConfig, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.ServerConfig), nil -} - -func (s *mockClusterManagerServer) ListNodePools(ctx context.Context, req *containerpb.ListNodePoolsRequest) (*containerpb.ListNodePoolsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.ListNodePoolsResponse), nil -} - -func (s *mockClusterManagerServer) GetNodePool(ctx context.Context, req *containerpb.GetNodePoolRequest) (*containerpb.NodePool, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.NodePool), nil -} - -func (s *mockClusterManagerServer) CreateNodePool(ctx context.Context, req *containerpb.CreateNodePoolRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) DeleteNodePool(ctx context.Context, req *containerpb.DeleteNodePoolRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) RollbackNodePoolUpgrade(ctx context.Context, req *containerpb.RollbackNodePoolUpgradeRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetNodePoolManagement(ctx context.Context, req *containerpb.SetNodePoolManagementRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetLabels(ctx context.Context, req *containerpb.SetLabelsRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetLegacyAbac(ctx context.Context, req *containerpb.SetLegacyAbacRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) StartIPRotation(ctx context.Context, req *containerpb.StartIPRotationRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) CompleteIPRotation(ctx context.Context, req *containerpb.CompleteIPRotationRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetNodePoolSize(ctx context.Context, req *containerpb.SetNodePoolSizeRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetNetworkPolicy(ctx context.Context, req *containerpb.SetNetworkPolicyRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -func (s *mockClusterManagerServer) SetMaintenancePolicy(ctx context.Context, req *containerpb.SetMaintenancePolicyRequest) (*containerpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containerpb.Operation), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockClusterManager mockClusterManagerServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - containerpb.RegisterClusterManagerServer(serv, &mockClusterManager) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestClusterManagerListClusters(t *testing.T) { - var expectedResponse *containerpb.ListClustersResponse = &containerpb.ListClustersResponse{} - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var request = &containerpb.ListClustersRequest{ - ProjectId: projectId, - Zone: zone, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListClusters(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerListClustersError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var request = &containerpb.ListClustersRequest{ - ProjectId: projectId, - Zone: zone, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListClusters(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerGetCluster(t *testing.T) { - var name string = "name3373707" - var description string = "description-1724546052" - var initialNodeCount int32 = 1682564205 - var loggingService string = "loggingService-1700501035" - var monitoringService string = "monitoringService1469270462" - var network string = "network1843485230" - var clusterIpv4Cidr string = "clusterIpv4Cidr-141875831" - var subnetwork string = "subnetwork-1302785042" - var enableKubernetesAlpha bool = false - var labelFingerprint string = "labelFingerprint714995737" - var selfLink string = "selfLink-1691268851" - var zone2 string = "zone2-696322977" - var endpoint string = "endpoint1741102485" - var initialClusterVersion string = "initialClusterVersion-276373352" - var currentMasterVersion string = "currentMasterVersion-920953983" - var currentNodeVersion string = "currentNodeVersion-407476063" - var createTime string = "createTime-493574096" - var statusMessage string = "statusMessage-239442758" - var nodeIpv4CidrSize int32 = 1181176815 - var servicesIpv4Cidr string = "servicesIpv4Cidr1966438125" - var currentNodeCount int32 = 178977560 - var expireTime string = "expireTime-96179731" - var expectedResponse = &containerpb.Cluster{ - Name: name, - Description: description, - InitialNodeCount: initialNodeCount, - LoggingService: loggingService, - MonitoringService: monitoringService, - Network: network, - ClusterIpv4Cidr: clusterIpv4Cidr, - Subnetwork: subnetwork, - EnableKubernetesAlpha: enableKubernetesAlpha, - LabelFingerprint: labelFingerprint, - SelfLink: selfLink, - Zone: zone2, - Endpoint: endpoint, - InitialClusterVersion: initialClusterVersion, - CurrentMasterVersion: currentMasterVersion, - CurrentNodeVersion: currentNodeVersion, - CreateTime: createTime, - StatusMessage: statusMessage, - NodeIpv4CidrSize: nodeIpv4CidrSize, - ServicesIpv4Cidr: servicesIpv4Cidr, - CurrentNodeCount: currentNodeCount, - ExpireTime: expireTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.GetClusterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetCluster(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerGetClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.GetClusterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetCluster(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerCreateCluster(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var cluster *containerpb.Cluster = &containerpb.Cluster{} - var request = &containerpb.CreateClusterRequest{ - ProjectId: projectId, - Zone: zone, - Cluster: cluster, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateCluster(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerCreateClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var cluster *containerpb.Cluster = &containerpb.Cluster{} - var request = &containerpb.CreateClusterRequest{ - ProjectId: projectId, - Zone: zone, - Cluster: cluster, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateCluster(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerUpdateCluster(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var update *containerpb.ClusterUpdate = &containerpb.ClusterUpdate{} - var request = &containerpb.UpdateClusterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Update: update, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateCluster(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerUpdateClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var update *containerpb.ClusterUpdate = &containerpb.ClusterUpdate{} - var request = &containerpb.UpdateClusterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Update: update, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateCluster(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerUpdateNodePool(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var nodeVersion string = "nodeVersion1790136219" - var imageType string = "imageType-1442758754" - var request = &containerpb.UpdateNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - NodeVersion: nodeVersion, - ImageType: imageType, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateNodePool(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerUpdateNodePoolError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var nodeVersion string = "nodeVersion1790136219" - var imageType string = "imageType-1442758754" - var request = &containerpb.UpdateNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - NodeVersion: nodeVersion, - ImageType: imageType, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateNodePool(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetNodePoolAutoscaling(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var autoscaling *containerpb.NodePoolAutoscaling = &containerpb.NodePoolAutoscaling{} - var request = &containerpb.SetNodePoolAutoscalingRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - Autoscaling: autoscaling, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNodePoolAutoscaling(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetNodePoolAutoscalingError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var autoscaling *containerpb.NodePoolAutoscaling = &containerpb.NodePoolAutoscaling{} - var request = &containerpb.SetNodePoolAutoscalingRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - Autoscaling: autoscaling, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNodePoolAutoscaling(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetLoggingService(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var loggingService string = "loggingService-1700501035" - var request = &containerpb.SetLoggingServiceRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - LoggingService: loggingService, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLoggingService(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetLoggingServiceError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var loggingService string = "loggingService-1700501035" - var request = &containerpb.SetLoggingServiceRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - LoggingService: loggingService, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLoggingService(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetMonitoringService(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var monitoringService string = "monitoringService1469270462" - var request = &containerpb.SetMonitoringServiceRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - MonitoringService: monitoringService, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetMonitoringService(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetMonitoringServiceError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var monitoringService string = "monitoringService1469270462" - var request = &containerpb.SetMonitoringServiceRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - MonitoringService: monitoringService, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetMonitoringService(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetAddonsConfig(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var addonsConfig *containerpb.AddonsConfig = &containerpb.AddonsConfig{} - var request = &containerpb.SetAddonsConfigRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - AddonsConfig: addonsConfig, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetAddonsConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetAddonsConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var addonsConfig *containerpb.AddonsConfig = &containerpb.AddonsConfig{} - var request = &containerpb.SetAddonsConfigRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - AddonsConfig: addonsConfig, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetAddonsConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetLocations(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var locations []string = nil - var request = &containerpb.SetLocationsRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Locations: locations, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLocations(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetLocationsError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var locations []string = nil - var request = &containerpb.SetLocationsRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Locations: locations, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLocations(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerUpdateMaster(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var masterVersion string = "masterVersion-2139460613" - var request = &containerpb.UpdateMasterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - MasterVersion: masterVersion, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateMaster(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerUpdateMasterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var masterVersion string = "masterVersion-2139460613" - var request = &containerpb.UpdateMasterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - MasterVersion: masterVersion, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateMaster(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetMasterAuth(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var action containerpb.SetMasterAuthRequest_Action = containerpb.SetMasterAuthRequest_UNKNOWN - var update *containerpb.MasterAuth = &containerpb.MasterAuth{} - var request = &containerpb.SetMasterAuthRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Action: action, - Update: update, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetMasterAuth(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetMasterAuthError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var action containerpb.SetMasterAuthRequest_Action = containerpb.SetMasterAuthRequest_UNKNOWN - var update *containerpb.MasterAuth = &containerpb.MasterAuth{} - var request = &containerpb.SetMasterAuthRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Action: action, - Update: update, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetMasterAuth(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerDeleteCluster(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.DeleteClusterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.DeleteCluster(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerDeleteClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.DeleteClusterRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.DeleteCluster(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerListOperations(t *testing.T) { - var expectedResponse *containerpb.ListOperationsResponse = &containerpb.ListOperationsResponse{} - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var request = &containerpb.ListOperationsRequest{ - ProjectId: projectId, - Zone: zone, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListOperations(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerListOperationsError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var request = &containerpb.ListOperationsRequest{ - ProjectId: projectId, - Zone: zone, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListOperations(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerGetOperation(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var operationId string = "operationId-274116877" - var request = &containerpb.GetOperationRequest{ - ProjectId: projectId, - Zone: zone, - OperationId: operationId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetOperation(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerGetOperationError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var operationId string = "operationId-274116877" - var request = &containerpb.GetOperationRequest{ - ProjectId: projectId, - Zone: zone, - OperationId: operationId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetOperation(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerCancelOperation(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var operationId string = "operationId-274116877" - var request = &containerpb.CancelOperationRequest{ - ProjectId: projectId, - Zone: zone, - OperationId: operationId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.CancelOperation(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestClusterManagerCancelOperationError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var operationId string = "operationId-274116877" - var request = &containerpb.CancelOperationRequest{ - ProjectId: projectId, - Zone: zone, - OperationId: operationId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.CancelOperation(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestClusterManagerGetServerConfig(t *testing.T) { - var defaultClusterVersion string = "defaultClusterVersion111003029" - var defaultImageType string = "defaultImageType-918225828" - var expectedResponse = &containerpb.ServerConfig{ - DefaultClusterVersion: defaultClusterVersion, - DefaultImageType: defaultImageType, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var request = &containerpb.GetServerConfigRequest{ - ProjectId: projectId, - Zone: zone, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetServerConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerGetServerConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var request = &containerpb.GetServerConfigRequest{ - ProjectId: projectId, - Zone: zone, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetServerConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerListNodePools(t *testing.T) { - var expectedResponse *containerpb.ListNodePoolsResponse = &containerpb.ListNodePoolsResponse{} - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.ListNodePoolsRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListNodePools(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerListNodePoolsError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.ListNodePoolsRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListNodePools(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerGetNodePool(t *testing.T) { - var name string = "name3373707" - var initialNodeCount int32 = 1682564205 - var selfLink string = "selfLink-1691268851" - var version string = "version351608024" - var statusMessage string = "statusMessage-239442758" - var expectedResponse = &containerpb.NodePool{ - Name: name, - InitialNodeCount: initialNodeCount, - SelfLink: selfLink, - Version: version, - StatusMessage: statusMessage, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var request = &containerpb.GetNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetNodePool(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerGetNodePoolError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var request = &containerpb.GetNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetNodePool(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerCreateNodePool(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePool *containerpb.NodePool = &containerpb.NodePool{} - var request = &containerpb.CreateNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePool: nodePool, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateNodePool(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerCreateNodePoolError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePool *containerpb.NodePool = &containerpb.NodePool{} - var request = &containerpb.CreateNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePool: nodePool, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateNodePool(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerDeleteNodePool(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var request = &containerpb.DeleteNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.DeleteNodePool(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerDeleteNodePoolError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var request = &containerpb.DeleteNodePoolRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.DeleteNodePool(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerRollbackNodePoolUpgrade(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var request = &containerpb.RollbackNodePoolUpgradeRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RollbackNodePoolUpgrade(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerRollbackNodePoolUpgradeError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var request = &containerpb.RollbackNodePoolUpgradeRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.RollbackNodePoolUpgrade(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetNodePoolManagement(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var management *containerpb.NodeManagement = &containerpb.NodeManagement{} - var request = &containerpb.SetNodePoolManagementRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - Management: management, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNodePoolManagement(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetNodePoolManagementError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var management *containerpb.NodeManagement = &containerpb.NodeManagement{} - var request = &containerpb.SetNodePoolManagementRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - Management: management, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNodePoolManagement(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetLabels(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var resourceLabels map[string]string = nil - var labelFingerprint string = "labelFingerprint714995737" - var request = &containerpb.SetLabelsRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - ResourceLabels: resourceLabels, - LabelFingerprint: labelFingerprint, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLabels(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetLabelsError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var resourceLabels map[string]string = nil - var labelFingerprint string = "labelFingerprint714995737" - var request = &containerpb.SetLabelsRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - ResourceLabels: resourceLabels, - LabelFingerprint: labelFingerprint, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLabels(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetLegacyAbac(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var enabled bool = false - var request = &containerpb.SetLegacyAbacRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Enabled: enabled, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLegacyAbac(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetLegacyAbacError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var enabled bool = false - var request = &containerpb.SetLegacyAbacRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - Enabled: enabled, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetLegacyAbac(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerStartIPRotation(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.StartIPRotationRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.StartIPRotation(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerStartIPRotationError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.StartIPRotationRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.StartIPRotation(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerCompleteIPRotation(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.CompleteIPRotationRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CompleteIPRotation(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerCompleteIPRotationError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var request = &containerpb.CompleteIPRotationRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CompleteIPRotation(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetNodePoolSize(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var nodeCount int32 = 1539922066 - var request = &containerpb.SetNodePoolSizeRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - NodeCount: nodeCount, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNodePoolSize(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetNodePoolSizeError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var nodePoolId string = "nodePoolId1043384033" - var nodeCount int32 = 1539922066 - var request = &containerpb.SetNodePoolSizeRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NodePoolId: nodePoolId, - NodeCount: nodeCount, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNodePoolSize(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetNetworkPolicy(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var networkPolicy *containerpb.NetworkPolicy = &containerpb.NetworkPolicy{} - var request = &containerpb.SetNetworkPolicyRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NetworkPolicy: networkPolicy, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNetworkPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetNetworkPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var networkPolicy *containerpb.NetworkPolicy = &containerpb.NetworkPolicy{} - var request = &containerpb.SetNetworkPolicyRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - NetworkPolicy: networkPolicy, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetNetworkPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterManagerSetMaintenancePolicy(t *testing.T) { - var name string = "name3373707" - var zone2 string = "zone2-696322977" - var detail string = "detail-1335224239" - var statusMessage string = "statusMessage-239442758" - var selfLink string = "selfLink-1691268851" - var targetLink string = "targetLink-2084812312" - var startTime string = "startTime-1573145462" - var endTime string = "endTime1725551537" - var expectedResponse = &containerpb.Operation{ - Name: name, - Zone: zone2, - Detail: detail, - StatusMessage: statusMessage, - SelfLink: selfLink, - TargetLink: targetLink, - StartTime: startTime, - EndTime: endTime, - } - - mockClusterManager.err = nil - mockClusterManager.reqs = nil - - mockClusterManager.resps = append(mockClusterManager.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var maintenancePolicy *containerpb.MaintenancePolicy = &containerpb.MaintenancePolicy{} - var request = &containerpb.SetMaintenancePolicyRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - MaintenancePolicy: maintenancePolicy, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetMaintenancePolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterManager.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterManagerSetMaintenancePolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterManager.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var zone string = "zone3744684" - var clusterId string = "clusterId240280960" - var maintenancePolicy *containerpb.MaintenancePolicy = &containerpb.MaintenancePolicy{} - var request = &containerpb.SetMaintenancePolicyRequest{ - ProjectId: projectId, - Zone: zone, - ClusterId: clusterId, - MaintenancePolicy: maintenancePolicy, - } - - c, err := NewClusterManagerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetMaintenancePolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/container/go.mod b/container/go.mod index de290ff9f722..0de938967b94 100644 --- a/container/go.mod +++ b/container/go.mod @@ -1,13 +1,27 @@ module cloud.google.com/go/container -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 - github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.86.0 - google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.96.0 + google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/container/go.sum b/container/go.sum index 465e3466de2f..a53bbbcc969d 100644 --- a/container/go.sum +++ b/container/go.sum @@ -30,6 +30,7 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -50,6 +51,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -292,8 +294,9 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591 h1:D0B/7al0LLrVC8aWF4+oxpv/m8bc7ViFfVS8/gXGdqI= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -314,8 +317,10 @@ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 h1:+jnHzr9VPj32ykQVai5DNahi9+NSp7yYuCsl5eAQtL0= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -386,8 +391,9 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -501,8 +507,9 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.86.0 h1:ZAnyOHQFIuWso1BodVfSaRyffD74T9ERGFa3k1fNk/U= -google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.96.0 h1:F60cuQPJq7K7FzsxMYHAUJSiXh2oKctHxBMbDygxhfM= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -591,8 +598,9 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 h1:W70HjnmXFJm+8RNjOpIDYW2nKsSi/af0VvIZUtYkwuU= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa h1:VWkrxnAx2C2hirAP+W5ADU7e/+93Yhk//ioKd2XFyDI= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -623,8 +631,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -639,8 +648,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/container/internal/version.go b/container/internal/version.go index d0e4a6fd16b3..9fa087b74c6b 100644 --- a/container/internal/version.go +++ b/container/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.2.0" +const Version = "1.4.0" diff --git a/containeranalysis/apiv1/doc.go b/containeranalysis/apiv1/doc.go index ec58aae665b5..9fff15ed7259 100644 --- a/containeranalysis/apiv1/doc.go +++ b/containeranalysis/apiv1/doc.go @@ -17,12 +17,12 @@ // Package containeranalysis is an auto-generated package for the // Container Analysis API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // // An implementation of the Grafeas API, which stores, and enables querying // and retrieval of critical metadata about all of your software artifacts. // -// Use of Context +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/containeranalysis/apiv1/mock_test.go b/containeranalysis/apiv1/mock_test.go deleted file mode 100644 index 9fd2eba984b8..000000000000 --- a/containeranalysis/apiv1/mock_test.go +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package containeranalysis - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - "google.golang.org/api/option" - containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1" - iampb "google.golang.org/genproto/googleapis/iam/v1" - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockContainerAnalysisServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - containeranalysispb.ContainerAnalysisServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockContainerAnalysisServer) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockContainerAnalysisServer) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockContainerAnalysisServer) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.TestIamPermissionsResponse), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockContainerAnalysis mockContainerAnalysisServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - containeranalysispb.RegisterContainerAnalysisServer(serv, &mockContainerAnalysis) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestContainerAnalysisSetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockContainerAnalysis.err = nil - mockContainerAnalysis.reqs = nil - - mockContainerAnalysis.resps = append(mockContainerAnalysis.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysis.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisSetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysis.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisGetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockContainerAnalysis.err = nil - mockContainerAnalysis.reqs = nil - - mockContainerAnalysis.resps = append(mockContainerAnalysis.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysis.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisGetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysis.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisTestIamPermissions(t *testing.T) { - var expectedResponse *iampb.TestIamPermissionsResponse = &iampb.TestIamPermissionsResponse{} - - mockContainerAnalysis.err = nil - mockContainerAnalysis.reqs = nil - - mockContainerAnalysis.resps = append(mockContainerAnalysis.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysis.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisTestIamPermissionsError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysis.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go b/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go index 7b380c6cb800..d8f788eebd72 100644 --- a/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go +++ b/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client.go @@ -184,7 +184,8 @@ func (c *ContainerAnalysisV1Beta1Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ContainerAnalysisV1Beta1Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -311,7 +312,8 @@ func NewContainerAnalysisV1Beta1Client(ctx context.Context, opts ...option.Clien // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *containerAnalysisV1Beta1GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -407,7 +409,7 @@ func (c *containerAnalysisV1Beta1RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *containerAnalysisV1Beta1RESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client_example_test.go b/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client_example_test.go index f447c5a61219..bdf4bf68ce8b 100644 --- a/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client_example_test.go +++ b/containeranalysis/apiv1beta1/container_analysis_v1_beta1_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewContainerAnalysisV1Beta1Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewContainerAnalysisV1Beta1Client() { func ExampleNewContainerAnalysisV1Beta1RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -51,6 +61,11 @@ func ExampleNewContainerAnalysisV1Beta1RESTClient() { func ExampleContainerAnalysisV1Beta1Client_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -71,6 +86,11 @@ func ExampleContainerAnalysisV1Beta1Client_SetIamPolicy() { func ExampleContainerAnalysisV1Beta1Client_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -91,6 +111,11 @@ func ExampleContainerAnalysisV1Beta1Client_GetIamPolicy() { func ExampleContainerAnalysisV1Beta1Client_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -111,6 +136,11 @@ func ExampleContainerAnalysisV1Beta1Client_TestIamPermissions() { func ExampleContainerAnalysisV1Beta1Client_GetScanConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -131,6 +161,11 @@ func ExampleContainerAnalysisV1Beta1Client_GetScanConfig() { func ExampleContainerAnalysisV1Beta1Client_ListScanConfigs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +192,11 @@ func ExampleContainerAnalysisV1Beta1Client_ListScanConfigs() { func ExampleContainerAnalysisV1Beta1Client_UpdateScanConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) if err != nil { // TODO: Handle error. diff --git a/containeranalysis/apiv1beta1/doc.go b/containeranalysis/apiv1beta1/doc.go index be02efa7540b..ef8aebf4daf1 100644 --- a/containeranalysis/apiv1beta1/doc.go +++ b/containeranalysis/apiv1beta1/doc.go @@ -20,47 +20,58 @@ // An implementation of the Grafeas API, which stores, and enables querying // and retrieval of critical metadata about all of your software artifacts. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &grafeaspb.GetOccurrenceRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas#GetOccurrenceRequest. -// } -// resp, err := c.GetOccurrence(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &grafeaspb.GetOccurrenceRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas#GetOccurrenceRequest. +// } +// resp, err := c.GetOccurrence(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewGrafeasV1Beta1Client is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go index 36ebccfe06b0..83c658a0e4e9 100644 --- a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go +++ b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client.go @@ -367,7 +367,8 @@ func (c *GrafeasV1Beta1Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *GrafeasV1Beta1Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -525,7 +526,8 @@ func NewGrafeasV1Beta1Client(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *grafeasV1Beta1GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -622,7 +624,7 @@ func (c *grafeasV1Beta1RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *grafeasV1Beta1RESTClient) Connection() *grpc.ClientConn { return nil } @@ -1332,8 +1334,12 @@ func (c *grafeasV1Beta1RESTClient) UpdateOccurrence(ctx context.Context, req *gr baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1757,8 +1763,12 @@ func (c *grafeasV1Beta1RESTClient) UpdateNote(ctx context.Context, req *grafeasp baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() diff --git a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_test.go b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_test.go index c35c88b10298..5ffbd64a8bf4 100644 --- a/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_test.go +++ b/containeranalysis/apiv1beta1/grafeas_v1_beta1_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewGrafeasV1Beta1Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewGrafeasV1Beta1Client() { func ExampleNewGrafeasV1Beta1RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewGrafeasV1Beta1RESTClient() { func ExampleGrafeasV1Beta1Client_GetOccurrence() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleGrafeasV1Beta1Client_GetOccurrence() { func ExampleGrafeasV1Beta1Client_ListOccurrences() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +116,11 @@ func ExampleGrafeasV1Beta1Client_ListOccurrences() { func ExampleGrafeasV1Beta1Client_DeleteOccurrence() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -114,6 +139,11 @@ func ExampleGrafeasV1Beta1Client_DeleteOccurrence() { func ExampleGrafeasV1Beta1Client_CreateOccurrence() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +164,11 @@ func ExampleGrafeasV1Beta1Client_CreateOccurrence() { func ExampleGrafeasV1Beta1Client_BatchCreateOccurrences() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -154,6 +189,11 @@ func ExampleGrafeasV1Beta1Client_BatchCreateOccurrences() { func ExampleGrafeasV1Beta1Client_UpdateOccurrence() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -174,6 +214,11 @@ func ExampleGrafeasV1Beta1Client_UpdateOccurrence() { func ExampleGrafeasV1Beta1Client_GetOccurrenceNote() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -194,6 +239,11 @@ func ExampleGrafeasV1Beta1Client_GetOccurrenceNote() { func ExampleGrafeasV1Beta1Client_GetNote() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +264,11 @@ func ExampleGrafeasV1Beta1Client_GetNote() { func ExampleGrafeasV1Beta1Client_ListNotes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -240,6 +295,11 @@ func ExampleGrafeasV1Beta1Client_ListNotes() { func ExampleGrafeasV1Beta1Client_DeleteNote() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -258,6 +318,11 @@ func ExampleGrafeasV1Beta1Client_DeleteNote() { func ExampleGrafeasV1Beta1Client_CreateNote() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -278,6 +343,11 @@ func ExampleGrafeasV1Beta1Client_CreateNote() { func ExampleGrafeasV1Beta1Client_BatchCreateNotes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -298,6 +368,11 @@ func ExampleGrafeasV1Beta1Client_BatchCreateNotes() { func ExampleGrafeasV1Beta1Client_UpdateNote() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -318,6 +393,11 @@ func ExampleGrafeasV1Beta1Client_UpdateNote() { func ExampleGrafeasV1Beta1Client_ListNoteOccurrences() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. @@ -344,6 +424,11 @@ func ExampleGrafeasV1Beta1Client_ListNoteOccurrences() { func ExampleGrafeasV1Beta1Client_GetVulnerabilityOccurrencesSummary() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) if err != nil { // TODO: Handle error. diff --git a/containeranalysis/apiv1beta1/mock_test.go b/containeranalysis/apiv1beta1/mock_test.go deleted file mode 100644 index 8a71e8f2a4a1..000000000000 --- a/containeranalysis/apiv1beta1/mock_test.go +++ /dev/null @@ -1,1707 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package containeranalysis - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" - grafeaspb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas" - iampb "google.golang.org/genproto/googleapis/iam/v1" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockContainerAnalysisV1Beta1Server struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - containeranalysispb.ContainerAnalysisV1Beta1Server - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockContainerAnalysisV1Beta1Server) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockContainerAnalysisV1Beta1Server) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest) (*iampb.Policy, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.Policy), nil -} - -func (s *mockContainerAnalysisV1Beta1Server) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*iampb.TestIamPermissionsResponse), nil -} - -func (s *mockContainerAnalysisV1Beta1Server) GetScanConfig(ctx context.Context, req *containeranalysispb.GetScanConfigRequest) (*containeranalysispb.ScanConfig, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containeranalysispb.ScanConfig), nil -} - -func (s *mockContainerAnalysisV1Beta1Server) ListScanConfigs(ctx context.Context, req *containeranalysispb.ListScanConfigsRequest) (*containeranalysispb.ListScanConfigsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containeranalysispb.ListScanConfigsResponse), nil -} - -func (s *mockContainerAnalysisV1Beta1Server) UpdateScanConfig(ctx context.Context, req *containeranalysispb.UpdateScanConfigRequest) (*containeranalysispb.ScanConfig, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*containeranalysispb.ScanConfig), nil -} - -type mockGrafeasV1Beta1Server struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - grafeaspb.GrafeasV1Beta1Server - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockGrafeasV1Beta1Server) GetOccurrence(ctx context.Context, req *grafeaspb.GetOccurrenceRequest) (*grafeaspb.Occurrence, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Occurrence), nil -} - -func (s *mockGrafeasV1Beta1Server) ListOccurrences(ctx context.Context, req *grafeaspb.ListOccurrencesRequest) (*grafeaspb.ListOccurrencesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.ListOccurrencesResponse), nil -} - -func (s *mockGrafeasV1Beta1Server) DeleteOccurrence(ctx context.Context, req *grafeaspb.DeleteOccurrenceRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockGrafeasV1Beta1Server) CreateOccurrence(ctx context.Context, req *grafeaspb.CreateOccurrenceRequest) (*grafeaspb.Occurrence, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Occurrence), nil -} - -func (s *mockGrafeasV1Beta1Server) BatchCreateOccurrences(ctx context.Context, req *grafeaspb.BatchCreateOccurrencesRequest) (*grafeaspb.BatchCreateOccurrencesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.BatchCreateOccurrencesResponse), nil -} - -func (s *mockGrafeasV1Beta1Server) UpdateOccurrence(ctx context.Context, req *grafeaspb.UpdateOccurrenceRequest) (*grafeaspb.Occurrence, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Occurrence), nil -} - -func (s *mockGrafeasV1Beta1Server) GetOccurrenceNote(ctx context.Context, req *grafeaspb.GetOccurrenceNoteRequest) (*grafeaspb.Note, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Note), nil -} - -func (s *mockGrafeasV1Beta1Server) GetNote(ctx context.Context, req *grafeaspb.GetNoteRequest) (*grafeaspb.Note, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Note), nil -} - -func (s *mockGrafeasV1Beta1Server) ListNotes(ctx context.Context, req *grafeaspb.ListNotesRequest) (*grafeaspb.ListNotesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.ListNotesResponse), nil -} - -func (s *mockGrafeasV1Beta1Server) DeleteNote(ctx context.Context, req *grafeaspb.DeleteNoteRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockGrafeasV1Beta1Server) CreateNote(ctx context.Context, req *grafeaspb.CreateNoteRequest) (*grafeaspb.Note, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Note), nil -} - -func (s *mockGrafeasV1Beta1Server) BatchCreateNotes(ctx context.Context, req *grafeaspb.BatchCreateNotesRequest) (*grafeaspb.BatchCreateNotesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.BatchCreateNotesResponse), nil -} - -func (s *mockGrafeasV1Beta1Server) UpdateNote(ctx context.Context, req *grafeaspb.UpdateNoteRequest) (*grafeaspb.Note, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.Note), nil -} - -func (s *mockGrafeasV1Beta1Server) ListNoteOccurrences(ctx context.Context, req *grafeaspb.ListNoteOccurrencesRequest) (*grafeaspb.ListNoteOccurrencesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.ListNoteOccurrencesResponse), nil -} - -func (s *mockGrafeasV1Beta1Server) GetVulnerabilityOccurrencesSummary(ctx context.Context, req *grafeaspb.GetVulnerabilityOccurrencesSummaryRequest) (*grafeaspb.VulnerabilityOccurrencesSummary, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*grafeaspb.VulnerabilityOccurrencesSummary), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockContainerAnalysisV1Beta1 mockContainerAnalysisV1Beta1Server - mockGrafeasV1Beta1 mockGrafeasV1Beta1Server -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - containeranalysispb.RegisterContainerAnalysisV1Beta1Server(serv, &mockContainerAnalysisV1Beta1) - grafeaspb.RegisterGrafeasV1Beta1Server(serv, &mockGrafeasV1Beta1) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestContainerAnalysisV1Beta1SetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockContainerAnalysisV1Beta1.err = nil - mockContainerAnalysisV1Beta1.reqs = nil - - mockContainerAnalysisV1Beta1.resps = append(mockContainerAnalysisV1Beta1.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysisV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisV1Beta1SetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysisV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var policy *iampb.Policy = &iampb.Policy{} - var request = &iampb.SetIamPolicyRequest{ - Resource: formattedResource, - Policy: policy, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisV1Beta1GetIamPolicy(t *testing.T) { - var version int32 = 351608024 - var etag []byte = []byte("21") - var expectedResponse = &iampb.Policy{ - Version: version, - Etag: etag, - } - - mockContainerAnalysisV1Beta1.err = nil - mockContainerAnalysisV1Beta1.reqs = nil - - mockContainerAnalysisV1Beta1.resps = append(mockContainerAnalysisV1Beta1.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysisV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisV1Beta1GetIamPolicyError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysisV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &iampb.GetIamPolicyRequest{ - Resource: formattedResource, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIamPolicy(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisV1Beta1TestIamPermissions(t *testing.T) { - var expectedResponse *iampb.TestIamPermissionsResponse = &iampb.TestIamPermissionsResponse{} - - mockContainerAnalysisV1Beta1.err = nil - mockContainerAnalysisV1Beta1.reqs = nil - - mockContainerAnalysisV1Beta1.resps = append(mockContainerAnalysisV1Beta1.resps[:0], expectedResponse) - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysisV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisV1Beta1TestIamPermissionsError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysisV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedResource string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var permissions []string = nil - var request = &iampb.TestIamPermissionsRequest{ - Resource: formattedResource, - Permissions: permissions, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.TestIamPermissions(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisV1Beta1GetScanConfig(t *testing.T) { - var name2 string = "name2-1052831874" - var description string = "description-1724546052" - var enabled bool = false - var expectedResponse = &containeranalysispb.ScanConfig{ - Name: name2, - Description: description, - Enabled: enabled, - } - - mockContainerAnalysisV1Beta1.err = nil - mockContainerAnalysisV1Beta1.reqs = nil - - mockContainerAnalysisV1Beta1.resps = append(mockContainerAnalysisV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/scanConfigs/%s", "[PROJECT]", "[SCAN_CONFIG]") - var request = &containeranalysispb.GetScanConfigRequest{ - Name: formattedName, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetScanConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysisV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisV1Beta1GetScanConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysisV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/scanConfigs/%s", "[PROJECT]", "[SCAN_CONFIG]") - var request = &containeranalysispb.GetScanConfigRequest{ - Name: formattedName, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetScanConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisV1Beta1ListScanConfigs(t *testing.T) { - var nextPageToken string = "" - var scanConfigsElement *containeranalysispb.ScanConfig = &containeranalysispb.ScanConfig{} - var scanConfigs = []*containeranalysispb.ScanConfig{scanConfigsElement} - var expectedResponse = &containeranalysispb.ListScanConfigsResponse{ - NextPageToken: nextPageToken, - ScanConfigs: scanConfigs, - } - - mockContainerAnalysisV1Beta1.err = nil - mockContainerAnalysisV1Beta1.reqs = nil - - mockContainerAnalysisV1Beta1.resps = append(mockContainerAnalysisV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &containeranalysispb.ListScanConfigsRequest{ - Parent: formattedParent, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListScanConfigs(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysisV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.ScanConfigs[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisV1Beta1ListScanConfigsError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysisV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &containeranalysispb.ListScanConfigsRequest{ - Parent: formattedParent, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListScanConfigs(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContainerAnalysisV1Beta1UpdateScanConfig(t *testing.T) { - var name2 string = "name2-1052831874" - var description string = "description-1724546052" - var enabled bool = false - var expectedResponse = &containeranalysispb.ScanConfig{ - Name: name2, - Description: description, - Enabled: enabled, - } - - mockContainerAnalysisV1Beta1.err = nil - mockContainerAnalysisV1Beta1.reqs = nil - - mockContainerAnalysisV1Beta1.resps = append(mockContainerAnalysisV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/scanConfigs/%s", "[PROJECT]", "[SCAN_CONFIG]") - var scanConfig *containeranalysispb.ScanConfig = &containeranalysispb.ScanConfig{} - var request = &containeranalysispb.UpdateScanConfigRequest{ - Name: formattedName, - ScanConfig: scanConfig, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateScanConfig(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContainerAnalysisV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContainerAnalysisV1Beta1UpdateScanConfigError(t *testing.T) { - errCode := codes.PermissionDenied - mockContainerAnalysisV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/scanConfigs/%s", "[PROJECT]", "[SCAN_CONFIG]") - var scanConfig *containeranalysispb.ScanConfig = &containeranalysispb.ScanConfig{} - var request = &containeranalysispb.UpdateScanConfigRequest{ - Name: formattedName, - ScanConfig: scanConfig, - } - - c, err := NewContainerAnalysisV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateScanConfig(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1GetOccurrence(t *testing.T) { - var name2 string = "name2-1052831874" - var noteName string = "noteName1780787896" - var remediation string = "remediation779381797" - var expectedResponse = &grafeaspb.Occurrence{ - Name: name2, - NoteName: noteName, - Remediation: remediation, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var request = &grafeaspb.GetOccurrenceRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetOccurrence(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1GetOccurrenceError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var request = &grafeaspb.GetOccurrenceRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetOccurrence(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1ListOccurrences(t *testing.T) { - var nextPageToken string = "" - var occurrencesElement *grafeaspb.Occurrence = &grafeaspb.Occurrence{} - var occurrences = []*grafeaspb.Occurrence{occurrencesElement} - var expectedResponse = &grafeaspb.ListOccurrencesResponse{ - NextPageToken: nextPageToken, - Occurrences: occurrences, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &grafeaspb.ListOccurrencesRequest{ - Parent: formattedParent, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListOccurrences(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Occurrences[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1ListOccurrencesError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &grafeaspb.ListOccurrencesRequest{ - Parent: formattedParent, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListOccurrences(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1DeleteOccurrence(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var request = &grafeaspb.DeleteOccurrenceRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteOccurrence(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestGrafeasV1Beta1DeleteOccurrenceError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var request = &grafeaspb.DeleteOccurrenceRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteOccurrence(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestGrafeasV1Beta1CreateOccurrence(t *testing.T) { - var name string = "name3373707" - var noteName string = "noteName1780787896" - var remediation string = "remediation779381797" - var expectedResponse = &grafeaspb.Occurrence{ - Name: name, - NoteName: noteName, - Remediation: remediation, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var occurrence *grafeaspb.Occurrence = &grafeaspb.Occurrence{} - var request = &grafeaspb.CreateOccurrenceRequest{ - Parent: formattedParent, - Occurrence: occurrence, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateOccurrence(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1CreateOccurrenceError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var occurrence *grafeaspb.Occurrence = &grafeaspb.Occurrence{} - var request = &grafeaspb.CreateOccurrenceRequest{ - Parent: formattedParent, - Occurrence: occurrence, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateOccurrence(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1BatchCreateOccurrences(t *testing.T) { - var expectedResponse *grafeaspb.BatchCreateOccurrencesResponse = &grafeaspb.BatchCreateOccurrencesResponse{} - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var occurrences []*grafeaspb.Occurrence = nil - var request = &grafeaspb.BatchCreateOccurrencesRequest{ - Parent: formattedParent, - Occurrences: occurrences, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchCreateOccurrences(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1BatchCreateOccurrencesError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var occurrences []*grafeaspb.Occurrence = nil - var request = &grafeaspb.BatchCreateOccurrencesRequest{ - Parent: formattedParent, - Occurrences: occurrences, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchCreateOccurrences(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1UpdateOccurrence(t *testing.T) { - var name2 string = "name2-1052831874" - var noteName string = "noteName1780787896" - var remediation string = "remediation779381797" - var expectedResponse = &grafeaspb.Occurrence{ - Name: name2, - NoteName: noteName, - Remediation: remediation, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var occurrence *grafeaspb.Occurrence = &grafeaspb.Occurrence{} - var request = &grafeaspb.UpdateOccurrenceRequest{ - Name: formattedName, - Occurrence: occurrence, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateOccurrence(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1UpdateOccurrenceError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var occurrence *grafeaspb.Occurrence = &grafeaspb.Occurrence{} - var request = &grafeaspb.UpdateOccurrenceRequest{ - Name: formattedName, - Occurrence: occurrence, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateOccurrence(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1GetOccurrenceNote(t *testing.T) { - var name2 string = "name2-1052831874" - var shortDescription string = "shortDescription-235369287" - var longDescription string = "longDescription-1747792199" - var expectedResponse = &grafeaspb.Note{ - Name: name2, - ShortDescription: shortDescription, - LongDescription: longDescription, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var request = &grafeaspb.GetOccurrenceNoteRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetOccurrenceNote(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1GetOccurrenceNoteError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/occurrences/%s", "[PROJECT]", "[OCCURRENCE]") - var request = &grafeaspb.GetOccurrenceNoteRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetOccurrenceNote(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1GetNote(t *testing.T) { - var name2 string = "name2-1052831874" - var shortDescription string = "shortDescription-235369287" - var longDescription string = "longDescription-1747792199" - var expectedResponse = &grafeaspb.Note{ - Name: name2, - ShortDescription: shortDescription, - LongDescription: longDescription, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &grafeaspb.GetNoteRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetNote(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1GetNoteError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &grafeaspb.GetNoteRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetNote(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1ListNotes(t *testing.T) { - var nextPageToken string = "" - var notesElement *grafeaspb.Note = &grafeaspb.Note{} - var notes = []*grafeaspb.Note{notesElement} - var expectedResponse = &grafeaspb.ListNotesResponse{ - NextPageToken: nextPageToken, - Notes: notes, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &grafeaspb.ListNotesRequest{ - Parent: formattedParent, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListNotes(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Notes[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1ListNotesError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &grafeaspb.ListNotesRequest{ - Parent: formattedParent, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListNotes(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1DeleteNote(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &grafeaspb.DeleteNoteRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteNote(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestGrafeasV1Beta1DeleteNoteError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &grafeaspb.DeleteNoteRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteNote(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestGrafeasV1Beta1CreateNote(t *testing.T) { - var name string = "name3373707" - var shortDescription string = "shortDescription-235369287" - var longDescription string = "longDescription-1747792199" - var expectedResponse = &grafeaspb.Note{ - Name: name, - ShortDescription: shortDescription, - LongDescription: longDescription, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var noteId string = "noteId2129224840" - var note *grafeaspb.Note = &grafeaspb.Note{} - var request = &grafeaspb.CreateNoteRequest{ - Parent: formattedParent, - NoteId: noteId, - Note: note, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateNote(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1CreateNoteError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var noteId string = "noteId2129224840" - var note *grafeaspb.Note = &grafeaspb.Note{} - var request = &grafeaspb.CreateNoteRequest{ - Parent: formattedParent, - NoteId: noteId, - Note: note, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateNote(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1BatchCreateNotes(t *testing.T) { - var expectedResponse *grafeaspb.BatchCreateNotesResponse = &grafeaspb.BatchCreateNotesResponse{} - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var notes map[string]*grafeaspb.Note = nil - var request = &grafeaspb.BatchCreateNotesRequest{ - Parent: formattedParent, - Notes: notes, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchCreateNotes(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1BatchCreateNotesError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var notes map[string]*grafeaspb.Note = nil - var request = &grafeaspb.BatchCreateNotesRequest{ - Parent: formattedParent, - Notes: notes, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.BatchCreateNotes(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1UpdateNote(t *testing.T) { - var name2 string = "name2-1052831874" - var shortDescription string = "shortDescription-235369287" - var longDescription string = "longDescription-1747792199" - var expectedResponse = &grafeaspb.Note{ - Name: name2, - ShortDescription: shortDescription, - LongDescription: longDescription, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var note *grafeaspb.Note = &grafeaspb.Note{} - var request = &grafeaspb.UpdateNoteRequest{ - Name: formattedName, - Note: note, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateNote(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1UpdateNoteError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var note *grafeaspb.Note = &grafeaspb.Note{} - var request = &grafeaspb.UpdateNoteRequest{ - Name: formattedName, - Note: note, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateNote(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1ListNoteOccurrences(t *testing.T) { - var nextPageToken string = "" - var occurrencesElement *grafeaspb.Occurrence = &grafeaspb.Occurrence{} - var occurrences = []*grafeaspb.Occurrence{occurrencesElement} - var expectedResponse = &grafeaspb.ListNoteOccurrencesResponse{ - NextPageToken: nextPageToken, - Occurrences: occurrences, - } - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &grafeaspb.ListNoteOccurrencesRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListNoteOccurrences(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Occurrences[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1ListNoteOccurrencesError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/notes/%s", "[PROJECT]", "[NOTE]") - var request = &grafeaspb.ListNoteOccurrencesRequest{ - Name: formattedName, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListNoteOccurrences(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestGrafeasV1Beta1GetVulnerabilityOccurrencesSummary(t *testing.T) { - var expectedResponse *grafeaspb.VulnerabilityOccurrencesSummary = &grafeaspb.VulnerabilityOccurrencesSummary{} - - mockGrafeasV1Beta1.err = nil - mockGrafeasV1Beta1.reqs = nil - - mockGrafeasV1Beta1.resps = append(mockGrafeasV1Beta1.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &grafeaspb.GetVulnerabilityOccurrencesSummaryRequest{ - Parent: formattedParent, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetVulnerabilityOccurrencesSummary(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockGrafeasV1Beta1.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestGrafeasV1Beta1GetVulnerabilityOccurrencesSummaryError(t *testing.T) { - errCode := codes.PermissionDenied - mockGrafeasV1Beta1.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &grafeaspb.GetVulnerabilityOccurrencesSummaryRequest{ - Parent: formattedParent, - } - - c, err := NewGrafeasV1Beta1Client(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetVulnerabilityOccurrencesSummary(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/containeranalysis/go.mod b/containeranalysis/go.mod index a9e640c4d3a6..629ba713ddcd 100644 --- a/containeranalysis/go.mod +++ b/containeranalysis/go.mod @@ -1,14 +1,27 @@ module cloud.google.com/go/containeranalysis -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 cloud.google.com/go/grafeas v0.2.0 - github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/containeranalysis/go.sum b/containeranalysis/go.sum index 442d5f4991c1..d43a1194f3a2 100644 --- a/containeranalysis/go.sum +++ b/containeranalysis/go.sum @@ -164,6 +164,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -292,8 +293,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -313,8 +314,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -385,8 +388,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -499,8 +502,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -587,8 +590,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -619,8 +624,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -635,8 +641,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/containeranalysis/go_mod_tidy_hack.go b/containeranalysis/go_mod_tidy_hack.go deleted file mode 100644 index f7dcd341ae2c..000000000000 --- a/containeranalysis/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package containeranalysis - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/datacatalog/CHANGES.md b/datacatalog/CHANGES.md index bf316ff6fed5..e250129d5f2e 100644 --- a/datacatalog/CHANGES.md +++ b/datacatalog/CHANGES.md @@ -1,5 +1,26 @@ # Changes +## [1.5.0](https://github.com/googleapis/google-cloud-go/compare/datacatalog/v1.4.0...datacatalog/v1.5.0) (2022-09-19) + + +### Features + +* **datacatalog:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [1.4.0](https://github.com/googleapis/google-cloud-go/compare/datacatalog/v1.3.1...datacatalog/v1.4.0) (2022-09-15) + + +### Features + +* **datacatalog/apiv1beta1:** add REST transport ([f7b0822](https://github.com/googleapis/google-cloud-go/commit/f7b082212b1e46ff2f4126b52d49618785c2e8ca)) + +## [1.3.1](https://github.com/googleapis/google-cloud-go/compare/datacatalog/v1.3.0...datacatalog/v1.3.1) (2022-07-12) + + +### Documentation + +* **datacatalog:** update taxonomy display_name comment feat: added Dataplex specific fields ([19a9ef2](https://github.com/googleapis/google-cloud-go/commit/19a9ef2d9b8d77d3bc3e4c11c7f1f3e47700edd4)) + ## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/datacatalog/v1.2.0...datacatalog/v1.3.0) (2022-02-23) diff --git a/datacatalog/apiv1/data_catalog_client.go b/datacatalog/apiv1/data_catalog_client.go index b4779de6d6d5..db4a00458c4f 100644 --- a/datacatalog/apiv1/data_catalog_client.go +++ b/datacatalog/apiv1/data_catalog_client.go @@ -272,7 +272,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -306,11 +307,11 @@ func (c *Client) SearchCatalog(ctx context.Context, req *datacatalogpb.SearchCat // Data Catalog automatically creates entry groups with names that start with // the @ symbol for the following resources: // -// BigQuery entries (@bigquery) +// BigQuery entries (@bigquery) // -// Pub/Sub topics (@pubsub) +// Pub/Sub topics (@pubsub) // -// Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH}) +// Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH}) // // You can create your own entry groups for Cloud Storage fileset entries // and custom entries together with the corresponding IAM policies. @@ -523,11 +524,11 @@ func (c *Client) DeleteTagTemplateField(ctx context.Context, req *datacatalogpb. // CreateTag creates a tag and assigns it to: // -// An Entry if the method name is -// projects.locations.entryGroups.entries.tags.create. +// An Entry if the method name is +// projects.locations.entryGroups.entries.tags.create. // -// Or EntryGroupif the method -// name is projects.locations.entryGroups.tags.create. +// Or EntryGroupif the method +// name is projects.locations.entryGroups.tags.create. // // Note: The project identified by the parent parameter for the [tag] // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters (at https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)) @@ -572,9 +573,9 @@ func (c *Client) UnstarEntry(ctx context.Context, req *datacatalogpb.UnstarEntry // // Supported resources are: // -// Tag templates +// Tag templates // -// Entry groups +// Entry groups // // Note: This method sets policies only within Data Catalog and can’t be // used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any @@ -582,10 +583,10 @@ func (c *Client) UnstarEntry(ctx context.Context, req *datacatalogpb.UnstarEntry // // To call this method, you must have the following Google IAM permissions: // -// datacatalog.tagTemplates.setIamPolicy to set policies on tag -// templates. +// datacatalog.tagTemplates.setIamPolicy to set policies on tag +// templates. // -// datacatalog.entryGroups.setIamPolicy to set policies on entry groups. +// datacatalog.entryGroups.setIamPolicy to set policies on entry groups. func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -594,26 +595,26 @@ func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyReques // // May return: // -// ANOT_FOUND error if the resource doesn’t exist or you don’t have the -// permission to view it. +// ANOT_FOUND error if the resource doesn’t exist or you don’t have the +// permission to view it. // -// An empty policy if the resource exists but doesn’t have a set policy. +// An empty policy if the resource exists but doesn’t have a set policy. // // Supported resources are: // -// Tag templates +// Tag templates // -// Entry groups +// Entry groups // // Note: This method doesn’t get policies from Google Cloud Platform // resources ingested into Data Catalog. // // To call this method, you must have the following Google IAM permissions: // -// datacatalog.tagTemplates.getIamPolicy to get policies on tag -// templates. +// datacatalog.tagTemplates.getIamPolicy to get policies on tag +// templates. // -// datacatalog.entryGroups.getIamPolicy to get policies on entry groups. +// datacatalog.entryGroups.getIamPolicy to get policies on entry groups. func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } @@ -624,9 +625,9 @@ func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReques // // Supported resources are: // -// Tag templates +// Tag templates // -// Entry groups +// Entry groups // // Note: This method gets policies only within Data Catalog and can’t be // used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any @@ -698,7 +699,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/datacatalog/apiv1/data_catalog_client_example_test.go b/datacatalog/apiv1/data_catalog_client_example_test.go index cb21edccecb1..1bacac3f1fd6 100644 --- a/datacatalog/apiv1/data_catalog_client_example_test.go +++ b/datacatalog/apiv1/data_catalog_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewClient() { func ExampleClient_SearchCatalog() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -65,6 +75,11 @@ func ExampleClient_SearchCatalog() { func ExampleClient_CreateEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +100,11 @@ func ExampleClient_CreateEntryGroup() { func ExampleClient_GetEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +125,11 @@ func ExampleClient_GetEntryGroup() { func ExampleClient_UpdateEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +150,11 @@ func ExampleClient_UpdateEntryGroup() { func ExampleClient_DeleteEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +173,11 @@ func ExampleClient_DeleteEntryGroup() { func ExampleClient_ListEntryGroups() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +204,11 @@ func ExampleClient_ListEntryGroups() { func ExampleClient_CreateEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -189,6 +229,11 @@ func ExampleClient_CreateEntry() { func ExampleClient_UpdateEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -209,6 +254,11 @@ func ExampleClient_UpdateEntry() { func ExampleClient_DeleteEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -227,6 +277,11 @@ func ExampleClient_DeleteEntry() { func ExampleClient_GetEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -247,6 +302,11 @@ func ExampleClient_GetEntry() { func ExampleClient_LookupEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -267,6 +327,11 @@ func ExampleClient_LookupEntry() { func ExampleClient_ListEntries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -293,6 +358,11 @@ func ExampleClient_ListEntries() { func ExampleClient_ModifyEntryOverview() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -313,6 +383,11 @@ func ExampleClient_ModifyEntryOverview() { func ExampleClient_ModifyEntryContacts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -333,6 +408,11 @@ func ExampleClient_ModifyEntryContacts() { func ExampleClient_CreateTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -353,6 +433,11 @@ func ExampleClient_CreateTagTemplate() { func ExampleClient_GetTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -373,6 +458,11 @@ func ExampleClient_GetTagTemplate() { func ExampleClient_UpdateTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -393,6 +483,11 @@ func ExampleClient_UpdateTagTemplate() { func ExampleClient_DeleteTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -411,6 +506,11 @@ func ExampleClient_DeleteTagTemplate() { func ExampleClient_CreateTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -431,6 +531,11 @@ func ExampleClient_CreateTagTemplateField() { func ExampleClient_UpdateTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -451,6 +556,11 @@ func ExampleClient_UpdateTagTemplateField() { func ExampleClient_RenameTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -471,6 +581,11 @@ func ExampleClient_RenameTagTemplateField() { func ExampleClient_RenameTagTemplateFieldEnumValue() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -491,6 +606,11 @@ func ExampleClient_RenameTagTemplateFieldEnumValue() { func ExampleClient_DeleteTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -509,6 +629,11 @@ func ExampleClient_DeleteTagTemplateField() { func ExampleClient_CreateTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -529,6 +654,11 @@ func ExampleClient_CreateTag() { func ExampleClient_UpdateTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -549,6 +679,11 @@ func ExampleClient_UpdateTag() { func ExampleClient_DeleteTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -567,6 +702,11 @@ func ExampleClient_DeleteTag() { func ExampleClient_ListTags() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -593,6 +733,11 @@ func ExampleClient_ListTags() { func ExampleClient_StarEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -613,6 +758,11 @@ func ExampleClient_StarEntry() { func ExampleClient_UnstarEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -633,6 +783,11 @@ func ExampleClient_UnstarEntry() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -653,6 +808,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -673,6 +833,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datacatalog/apiv1/doc.go b/datacatalog/apiv1/doc.go index a472c99bbb9d..bf60e8dcd136 100644 --- a/datacatalog/apiv1/doc.go +++ b/datacatalog/apiv1/doc.go @@ -20,49 +20,60 @@ // A fully managed and highly scalable data discovery and metadata management // service. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datacatalog.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datacatalog.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datacatalog.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &datacatalogpb.SearchCatalogRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datacatalog/v1#SearchCatalogRequest. -// } -// it := c.SearchCatalog(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datacatalog.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &datacatalogpb.SearchCatalogRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datacatalog/v1#SearchCatalogRequest. +// } +// it := c.SearchCatalog(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/datacatalog/apiv1/policy_tag_manager_client.go b/datacatalog/apiv1/policy_tag_manager_client.go index bec7c6bb5c53..6814e0f06f18 100644 --- a/datacatalog/apiv1/policy_tag_manager_client.go +++ b/datacatalog/apiv1/policy_tag_manager_client.go @@ -138,7 +138,8 @@ func (c *PolicyTagManagerClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PolicyTagManagerClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -181,12 +182,12 @@ func (c *PolicyTagManagerClient) CreatePolicyTag(ctx context.Context, req *datac // DeletePolicyTag deletes a policy tag together with the following: // -// All of its descendant policy tags, if any +// All of its descendant policy tags, if any // -// Policies associated with the policy tag and its descendants +// Policies associated with the policy tag and its descendants // -// References from BigQuery table schema of the policy tag and its -// descendants +// References from BigQuery table schema of the policy tag and its +// descendants func (c *PolicyTagManagerClient) DeletePolicyTag(ctx context.Context, req *datacatalogpb.DeletePolicyTagRequest, opts ...gax.CallOption) error { return c.internalClient.DeletePolicyTag(ctx, req, opts...) } @@ -288,7 +289,8 @@ func NewPolicyTagManagerClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *policyTagManagerGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/datacatalog/apiv1/policy_tag_manager_client_example_test.go b/datacatalog/apiv1/policy_tag_manager_client_example_test.go index ce8ef086a788..660ad24dbc97 100644 --- a/datacatalog/apiv1/policy_tag_manager_client_example_test.go +++ b/datacatalog/apiv1/policy_tag_manager_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewPolicyTagManagerClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewPolicyTagManagerClient() { func ExamplePolicyTagManagerClient_CreateTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -59,6 +69,11 @@ func ExamplePolicyTagManagerClient_CreateTaxonomy() { func ExamplePolicyTagManagerClient_DeleteTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +92,11 @@ func ExamplePolicyTagManagerClient_DeleteTaxonomy() { func ExamplePolicyTagManagerClient_UpdateTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -97,6 +117,11 @@ func ExamplePolicyTagManagerClient_UpdateTaxonomy() { func ExamplePolicyTagManagerClient_ListTaxonomies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -123,6 +148,11 @@ func ExamplePolicyTagManagerClient_ListTaxonomies() { func ExamplePolicyTagManagerClient_GetTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +173,11 @@ func ExamplePolicyTagManagerClient_GetTaxonomy() { func ExamplePolicyTagManagerClient_CreatePolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -163,6 +198,11 @@ func ExamplePolicyTagManagerClient_CreatePolicyTag() { func ExamplePolicyTagManagerClient_DeletePolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -181,6 +221,11 @@ func ExamplePolicyTagManagerClient_DeletePolicyTag() { func ExamplePolicyTagManagerClient_UpdatePolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -201,6 +246,11 @@ func ExamplePolicyTagManagerClient_UpdatePolicyTag() { func ExamplePolicyTagManagerClient_ListPolicyTags() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -227,6 +277,11 @@ func ExamplePolicyTagManagerClient_ListPolicyTags() { func ExamplePolicyTagManagerClient_GetPolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -247,6 +302,11 @@ func ExamplePolicyTagManagerClient_GetPolicyTag() { func ExamplePolicyTagManagerClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -267,6 +327,11 @@ func ExamplePolicyTagManagerClient_GetIamPolicy() { func ExamplePolicyTagManagerClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -287,6 +352,11 @@ func ExamplePolicyTagManagerClient_SetIamPolicy() { func ExamplePolicyTagManagerClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datacatalog/apiv1/policy_tag_manager_serialization_client.go b/datacatalog/apiv1/policy_tag_manager_serialization_client.go index 13a906cbfe43..7a6e3d04275d 100644 --- a/datacatalog/apiv1/policy_tag_manager_serialization_client.go +++ b/datacatalog/apiv1/policy_tag_manager_serialization_client.go @@ -103,7 +103,8 @@ func (c *PolicyTagManagerSerializationClient) setGoogleClientInfo(keyval ...stri // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PolicyTagManagerSerializationClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -116,13 +117,13 @@ func (c *PolicyTagManagerSerializationClient) Connection() *grpc.ClientConn { // // This operation automatically does the following: // -// Deletes the existing policy tags that are missing from the -// SerializedPolicyTag. +// Deletes the existing policy tags that are missing from the +// SerializedPolicyTag. // -// Creates policy tags that don’t have resource names. They are considered -// new. +// Creates policy tags that don’t have resource names. They are considered +// new. // -// Updates policy tags with valid resources names accordingly. +// Updates policy tags with valid resources names accordingly. func (c *PolicyTagManagerSerializationClient) ReplaceTaxonomy(ctx context.Context, req *datacatalogpb.ReplaceTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error) { return c.internalClient.ReplaceTaxonomy(ctx, req, opts...) } @@ -212,7 +213,8 @@ func NewPolicyTagManagerSerializationClient(ctx context.Context, opts ...option. // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *policyTagManagerSerializationGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/datacatalog/apiv1/policy_tag_manager_serialization_client_example_test.go b/datacatalog/apiv1/policy_tag_manager_serialization_client_example_test.go index 1c76848e9263..59865554db06 100644 --- a/datacatalog/apiv1/policy_tag_manager_serialization_client_example_test.go +++ b/datacatalog/apiv1/policy_tag_manager_serialization_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewPolicyTagManagerSerializationClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewPolicyTagManagerSerializationClient() { func ExamplePolicyTagManagerSerializationClient_ReplaceTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExamplePolicyTagManagerSerializationClient_ReplaceTaxonomy() { func ExamplePolicyTagManagerSerializationClient_ImportTaxonomies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +92,11 @@ func ExamplePolicyTagManagerSerializationClient_ImportTaxonomies() { func ExamplePolicyTagManagerSerializationClient_ExportTaxonomies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datacatalog/apiv1beta1/data_catalog_client.go b/datacatalog/apiv1beta1/data_catalog_client.go index ae5702e901aa..5eff11595a6c 100644 --- a/datacatalog/apiv1beta1/data_catalog_client.go +++ b/datacatalog/apiv1beta1/data_catalog_client.go @@ -17,22 +17,28 @@ package datacatalog import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" datacatalogpb "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1" iampb "google.golang.org/genproto/googleapis/iam/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -223,6 +229,138 @@ func defaultCallOptions() *CallOptions { } } +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + SearchCatalog: []gax.CallOption{}, + CreateEntryGroup: []gax.CallOption{}, + UpdateEntryGroup: []gax.CallOption{}, + GetEntryGroup: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteEntryGroup: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListEntryGroups: []gax.CallOption{}, + CreateEntry: []gax.CallOption{}, + UpdateEntry: []gax.CallOption{}, + DeleteEntry: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetEntry: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + LookupEntry: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListEntries: []gax.CallOption{}, + CreateTagTemplate: []gax.CallOption{}, + GetTagTemplate: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + UpdateTagTemplate: []gax.CallOption{}, + DeleteTagTemplate: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + CreateTagTemplateField: []gax.CallOption{}, + UpdateTagTemplateField: []gax.CallOption{}, + RenameTagTemplateField: []gax.CallOption{}, + DeleteTagTemplateField: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + CreateTag: []gax.CallOption{}, + UpdateTag: []gax.CallOption{}, + DeleteTag: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListTags: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + SetIamPolicy: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + } +} + // internalClient is an interface that defines the methods available from Google Cloud Data Catalog API. type internalClient interface { Close() error @@ -287,7 +425,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -501,22 +640,22 @@ func (c *Client) ListTags(ctx context.Context, req *datacatalogpb.ListTagsReques // policy. // Supported resources are: // -// Tag templates. +// Tag templates. // -// Entries. +// Entries. // -// Entry groups. -// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub -// and any external Google Cloud Platform resources synced to Data Catalog. +// Entry groups. +// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub +// and any external Google Cloud Platform resources synced to Data Catalog. // // Callers must have following Google IAM permission // -// datacatalog.tagTemplates.setIamPolicy to set policies on tag -// templates. +// datacatalog.tagTemplates.setIamPolicy to set policies on tag +// templates. // -// datacatalog.entries.setIamPolicy to set policies on entries. +// datacatalog.entries.setIamPolicy to set policies on entries. // -// datacatalog.entryGroups.setIamPolicy to set policies on entry groups. +// datacatalog.entryGroups.setIamPolicy to set policies on entry groups. func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.SetIamPolicy(ctx, req, opts...) } @@ -527,22 +666,22 @@ func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyReques // // Supported resources are: // -// Tag templates. +// Tag templates. // -// Entries. +// Entries. // -// Entry groups. -// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub -// and any external Google Cloud Platform resources synced to Data Catalog. +// Entry groups. +// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub +// and any external Google Cloud Platform resources synced to Data Catalog. // // Callers must have following Google IAM permission // -// datacatalog.tagTemplates.getIamPolicy to get policies on tag -// templates. +// datacatalog.tagTemplates.getIamPolicy to get policies on tag +// templates. // -// datacatalog.entries.getIamPolicy to get policies on entries. +// datacatalog.entries.getIamPolicy to get policies on entries. // -// datacatalog.entryGroups.getIamPolicy to get policies on entry groups. +// datacatalog.entryGroups.getIamPolicy to get policies on entry groups. func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { return c.internalClient.GetIamPolicy(ctx, req, opts...) } @@ -553,13 +692,13 @@ func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyReques // // Supported resources are: // -// Tag templates. +// Tag templates. // -// Entries. +// Entries. // -// Entry groups. -// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub -// and any external Google Cloud Platform resources synced to Data Catalog. +// Entry groups. +// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub +// and any external Google Cloud Platform resources synced to Data Catalog. // // A caller is not required to have Google IAM permission to make this // request. @@ -628,7 +767,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -648,6 +788,75 @@ func (c *gRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions +} + +// NewRESTClient creates a new data catalog rest client. +// +// Data Catalog API service allows clients to discover, understand, and manage +// their data. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://datacatalog.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://datacatalog.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://datacatalog.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} func (c *gRPCClient) SearchCatalog(ctx context.Context, req *datacatalogpb.SearchCatalogRequest, opts ...gax.CallOption) *SearchCatalogResultIterator { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append((*c.CallOptions).SearchCatalog[0:len((*c.CallOptions).SearchCatalog):len((*c.CallOptions).SearchCatalog)], opts...) @@ -1310,6 +1519,1831 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP return resp, nil } +// SearchCatalog searches Data Catalog for multiple resources like entries, tags that +// match a query. +// +// This is a custom method +// (https://cloud.google.com/apis/design/custom_methods (at https://cloud.google.com/apis/design/custom_methods)) and does not return +// the complete resource, only the resource identifier and high level +// fields. Clients can subsequentally call Get methods. +// +// Note that Data Catalog search queries do not guarantee full recall. Query +// results that match your query may not be returned, even in subsequent +// result pages. Also note that results returned (and not returned) can vary +// across repeated search queries. +// +// See Data Catalog Search +// Syntax (at https://cloud.google.com/data-catalog/docs/how-to/search-reference) +// for more information. +func (c *restClient) SearchCatalog(ctx context.Context, req *datacatalogpb.SearchCatalogRequest, opts ...gax.CallOption) *SearchCatalogResultIterator { + it := &SearchCatalogResultIterator{} + req = proto.Clone(req).(*datacatalogpb.SearchCatalogRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datacatalogpb.SearchCatalogResult, string, error) { + resp := &datacatalogpb.SearchCatalogResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/catalog:search") + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetResults(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateEntryGroup a maximum of 10,000 entry groups may be created per organization across all +// locations. +// +// Users should enable the Data Catalog API in the project identified by +// the parent parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) CreateEntryGroup(ctx context.Context, req *datacatalogpb.CreateEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntryGroup() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/entryGroups", req.GetParent()) + + params := url.Values{} + params.Add("entryGroupId", fmt.Sprintf("%v", req.GetEntryGroupId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateEntryGroup[0:len((*c.CallOptions).CreateEntryGroup):len((*c.CallOptions).CreateEntryGroup)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.EntryGroup{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateEntryGroup updates an EntryGroup. The user should enable the Data Catalog API in the +// project identified by the entry_group.name parameter (see [Data Catalog +// Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) UpdateEntryGroup(ctx context.Context, req *datacatalogpb.UpdateEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntryGroup() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetEntryGroup().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entry_group.name", url.QueryEscape(req.GetEntryGroup().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEntryGroup[0:len((*c.CallOptions).UpdateEntryGroup):len((*c.CallOptions).UpdateEntryGroup)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.EntryGroup{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetEntryGroup gets an EntryGroup. +func (c *restClient) GetEntryGroup(ctx context.Context, req *datacatalogpb.GetEntryGroupRequest, opts ...gax.CallOption) (*datacatalogpb.EntryGroup, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEntryGroup[0:len((*c.CallOptions).GetEntryGroup):len((*c.CallOptions).GetEntryGroup)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.EntryGroup{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteEntryGroup deletes an EntryGroup. Only entry groups that do not contain entries can be +// deleted. Users should enable the Data Catalog API in the project +// identified by the name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) DeleteEntryGroup(ctx context.Context, req *datacatalogpb.DeleteEntryGroupRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ListEntryGroups lists entry groups. +func (c *restClient) ListEntryGroups(ctx context.Context, req *datacatalogpb.ListEntryGroupsRequest, opts ...gax.CallOption) *EntryGroupIterator { + it := &EntryGroupIterator{} + req = proto.Clone(req).(*datacatalogpb.ListEntryGroupsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datacatalogpb.EntryGroup, string, error) { + resp := &datacatalogpb.ListEntryGroupsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/entryGroups", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEntryGroups(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateEntry creates an entry. Only entries of ‘FILESET’ type or user-specified type can +// be created. +// +// Users should enable the Data Catalog API in the project identified by +// the parent parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +// +// A maximum of 100,000 entries may be created per entry group. +func (c *restClient) CreateEntry(ctx context.Context, req *datacatalogpb.CreateEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntry() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/entries", req.GetParent()) + + params := url.Values{} + params.Add("entryId", fmt.Sprintf("%v", req.GetEntryId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateEntry[0:len((*c.CallOptions).CreateEntry):len((*c.CallOptions).CreateEntry)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Entry{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateEntry updates an existing entry. +// Users should enable the Data Catalog API in the project identified by +// the entry.name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) UpdateEntry(ctx context.Context, req *datacatalogpb.UpdateEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntry() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetEntry().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entry.name", url.QueryEscape(req.GetEntry().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEntry[0:len((*c.CallOptions).UpdateEntry):len((*c.CallOptions).UpdateEntry)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Entry{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteEntry deletes an existing entry. Only entries created through +// CreateEntry +// method can be deleted. +// Users should enable the Data Catalog API in the project identified by +// the name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) DeleteEntry(ctx context.Context, req *datacatalogpb.DeleteEntryRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetEntry gets an entry. +func (c *restClient) GetEntry(ctx context.Context, req *datacatalogpb.GetEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEntry[0:len((*c.CallOptions).GetEntry):len((*c.CallOptions).GetEntry)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Entry{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// LookupEntry get an entry by target resource name. This method allows clients to use +// the resource name from the source Google Cloud Platform service to get the +// Data Catalog Entry. +func (c *restClient) LookupEntry(ctx context.Context, req *datacatalogpb.LookupEntryRequest, opts ...gax.CallOption) (*datacatalogpb.Entry, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/entries:lookup") + + params := url.Values{} + if req.GetLinkedResource() != "" { + params.Add("linkedResource", fmt.Sprintf("%v", req.GetLinkedResource())) + } + if req.GetSqlResource() != "" { + params.Add("sqlResource", fmt.Sprintf("%v", req.GetSqlResource())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).LookupEntry[0:len((*c.CallOptions).LookupEntry):len((*c.CallOptions).LookupEntry)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Entry{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListEntries lists entries. +func (c *restClient) ListEntries(ctx context.Context, req *datacatalogpb.ListEntriesRequest, opts ...gax.CallOption) *EntryIterator { + it := &EntryIterator{} + req = proto.Clone(req).(*datacatalogpb.ListEntriesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datacatalogpb.Entry, string, error) { + resp := &datacatalogpb.ListEntriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/entries", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, "", err + } + params.Add("readMask", string(readMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEntries(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateTagTemplate creates a tag template. The user should enable the Data Catalog API in +// the project identified by the parent parameter (see Data Catalog +// Resource +// Project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project) +// for more information). +func (c *restClient) CreateTagTemplate(ctx context.Context, req *datacatalogpb.CreateTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTagTemplate() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/tagTemplates", req.GetParent()) + + params := url.Values{} + params.Add("tagTemplateId", fmt.Sprintf("%v", req.GetTagTemplateId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTagTemplate[0:len((*c.CallOptions).CreateTagTemplate):len((*c.CallOptions).CreateTagTemplate)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.TagTemplate{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetTagTemplate gets a tag template. +func (c *restClient) GetTagTemplate(ctx context.Context, req *datacatalogpb.GetTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTagTemplate[0:len((*c.CallOptions).GetTagTemplate):len((*c.CallOptions).GetTagTemplate)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.TagTemplate{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTagTemplate updates a tag template. This method cannot be used to update the fields of +// a template. The tag template fields are represented as separate resources +// and should be updated using their own create/update/delete methods. +// Users should enable the Data Catalog API in the project identified by +// the tag_template.name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) UpdateTagTemplate(ctx context.Context, req *datacatalogpb.UpdateTagTemplateRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplate, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTagTemplate() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTagTemplate().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tag_template.name", url.QueryEscape(req.GetTagTemplate().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTagTemplate[0:len((*c.CallOptions).UpdateTagTemplate):len((*c.CallOptions).UpdateTagTemplate)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.TagTemplate{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteTagTemplate deletes a tag template and all tags using the template. +// Users should enable the Data Catalog API in the project identified by +// the name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) DeleteTagTemplate(ctx context.Context, req *datacatalogpb.DeleteTagTemplateRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateTagTemplateField creates a field in a tag template. The user should enable the Data Catalog +// API in the project identified by the parent parameter (see +// Data Catalog Resource +// Project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project) +// for more information). +func (c *restClient) CreateTagTemplateField(ctx context.Context, req *datacatalogpb.CreateTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTagTemplateField() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/fields", req.GetParent()) + + params := url.Values{} + params.Add("tagTemplateFieldId", fmt.Sprintf("%v", req.GetTagTemplateFieldId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTagTemplateField[0:len((*c.CallOptions).CreateTagTemplateField):len((*c.CallOptions).CreateTagTemplateField)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.TagTemplateField{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTagTemplateField updates a field in a tag template. This method cannot be used to update the +// field type. Users should enable the Data Catalog API in the project +// identified by the name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) UpdateTagTemplateField(ctx context.Context, req *datacatalogpb.UpdateTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTagTemplateField() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTagTemplateField[0:len((*c.CallOptions).UpdateTagTemplateField):len((*c.CallOptions).UpdateTagTemplateField)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.TagTemplateField{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RenameTagTemplateField renames a field in a tag template. The user should enable the Data Catalog +// API in the project identified by the name parameter (see Data Catalog +// Resource +// Project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project) +// for more information). +func (c *restClient) RenameTagTemplateField(ctx context.Context, req *datacatalogpb.RenameTagTemplateFieldRequest, opts ...gax.CallOption) (*datacatalogpb.TagTemplateField, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:rename", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).RenameTagTemplateField[0:len((*c.CallOptions).RenameTagTemplateField):len((*c.CallOptions).RenameTagTemplateField)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.TagTemplateField{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteTagTemplateField deletes a field in a tag template and all uses of that field. +// Users should enable the Data Catalog API in the project identified by +// the name parameter (see [Data Catalog Resource Project] +// (https://cloud.google.com/data-catalog/docs/concepts/resource-project (at https://cloud.google.com/data-catalog/docs/concepts/resource-project)) for +// more information). +func (c *restClient) DeleteTagTemplateField(ctx context.Context, req *datacatalogpb.DeleteTagTemplateFieldRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateTag creates a tag on an Entry. +// Note: The project identified by the parent parameter for the +// tag (at https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) +// and the +// tag +// template (at https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) +// used to create the tag must be from the same organization. +func (c *restClient) CreateTag(ctx context.Context, req *datacatalogpb.CreateTagRequest, opts ...gax.CallOption) (*datacatalogpb.Tag, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTag() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/tags", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTag[0:len((*c.CallOptions).CreateTag):len((*c.CallOptions).CreateTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Tag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateTag updates an existing tag. +func (c *restClient) UpdateTag(ctx context.Context, req *datacatalogpb.UpdateTagRequest, opts ...gax.CallOption) (*datacatalogpb.Tag, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTag() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTag().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tag.name", url.QueryEscape(req.GetTag().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTag[0:len((*c.CallOptions).UpdateTag):len((*c.CallOptions).UpdateTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Tag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteTag deletes a tag. +func (c *restClient) DeleteTag(ctx context.Context, req *datacatalogpb.DeleteTagRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ListTags lists the tags on an Entry. +func (c *restClient) ListTags(ctx context.Context, req *datacatalogpb.ListTagsRequest, opts ...gax.CallOption) *TagIterator { + it := &TagIterator{} + req = proto.Clone(req).(*datacatalogpb.ListTagsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datacatalogpb.Tag, string, error) { + resp := &datacatalogpb.ListTagsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/tags", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTags(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// SetIamPolicy sets the access control policy for a resource. Replaces any existing +// policy. +// Supported resources are: +// +// Tag templates. +// +// Entries. +// +// Entry groups. +// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub +// and any external Google Cloud Platform resources synced to Data Catalog. +// +// Callers must have following Google IAM permission +// +// datacatalog.tagTemplates.setIamPolicy to set policies on tag +// templates. +// +// datacatalog.entries.setIamPolicy to set policies on entries. +// +// datacatalog.entryGroups.setIamPolicy to set policies on entry groups. +func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetIamPolicy gets the access control policy for a resource. A NOT_FOUND error +// is returned if the resource does not exist. An empty policy is returned +// if the resource exists but does not have a policy set on it. +// +// Supported resources are: +// +// Tag templates. +// +// Entries. +// +// Entry groups. +// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub +// and any external Google Cloud Platform resources synced to Data Catalog. +// +// Callers must have following Google IAM permission +// +// datacatalog.tagTemplates.getIamPolicy to get policies on tag +// templates. +// +// datacatalog.entries.getIamPolicy to get policies on entries. +// +// datacatalog.entryGroups.getIamPolicy to get policies on entry groups. +func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns the caller’s permissions on a resource. +// If the resource does not exist, an empty set of permissions is returned +// (We don’t return a NOT_FOUND error). +// +// Supported resources are: +// +// Tag templates. +// +// Entries. +// +// Entry groups. +// Note, this method cannot be used to manage policies for BigQuery, Pub/Sub +// and any external Google Cloud Platform resources synced to Data Catalog. +// +// A caller is not required to have Google IAM permission to make this +// request. +func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // EntryGroupIterator manages a stream of *datacatalogpb.EntryGroup. type EntryGroupIterator struct { items []*datacatalogpb.EntryGroup diff --git a/datacatalog/apiv1beta1/data_catalog_client_example_test.go b/datacatalog/apiv1beta1/data_catalog_client_example_test.go index 5278da60391d..2fec0343fcbd 100644 --- a/datacatalog/apiv1beta1/data_catalog_client_example_test.go +++ b/datacatalog/apiv1beta1/data_catalog_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -37,8 +42,30 @@ func ExampleNewClient() { _ = c } +func ExampleNewRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datacatalog.NewRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleClient_SearchCatalog() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -65,6 +92,11 @@ func ExampleClient_SearchCatalog() { func ExampleClient_CreateEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +117,11 @@ func ExampleClient_CreateEntryGroup() { func ExampleClient_UpdateEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -105,6 +142,11 @@ func ExampleClient_UpdateEntryGroup() { func ExampleClient_GetEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -125,6 +167,11 @@ func ExampleClient_GetEntryGroup() { func ExampleClient_DeleteEntryGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +190,11 @@ func ExampleClient_DeleteEntryGroup() { func ExampleClient_ListEntryGroups() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +221,11 @@ func ExampleClient_ListEntryGroups() { func ExampleClient_CreateEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -189,6 +246,11 @@ func ExampleClient_CreateEntry() { func ExampleClient_UpdateEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -209,6 +271,11 @@ func ExampleClient_UpdateEntry() { func ExampleClient_DeleteEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -227,6 +294,11 @@ func ExampleClient_DeleteEntry() { func ExampleClient_GetEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -247,6 +319,11 @@ func ExampleClient_GetEntry() { func ExampleClient_LookupEntry() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -267,6 +344,11 @@ func ExampleClient_LookupEntry() { func ExampleClient_ListEntries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -293,6 +375,11 @@ func ExampleClient_ListEntries() { func ExampleClient_CreateTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -313,6 +400,11 @@ func ExampleClient_CreateTagTemplate() { func ExampleClient_GetTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -333,6 +425,11 @@ func ExampleClient_GetTagTemplate() { func ExampleClient_UpdateTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -353,6 +450,11 @@ func ExampleClient_UpdateTagTemplate() { func ExampleClient_DeleteTagTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -371,6 +473,11 @@ func ExampleClient_DeleteTagTemplate() { func ExampleClient_CreateTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -391,6 +498,11 @@ func ExampleClient_CreateTagTemplateField() { func ExampleClient_UpdateTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -411,6 +523,11 @@ func ExampleClient_UpdateTagTemplateField() { func ExampleClient_RenameTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -431,6 +548,11 @@ func ExampleClient_RenameTagTemplateField() { func ExampleClient_DeleteTagTemplateField() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -449,6 +571,11 @@ func ExampleClient_DeleteTagTemplateField() { func ExampleClient_CreateTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -469,6 +596,11 @@ func ExampleClient_CreateTag() { func ExampleClient_UpdateTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -489,6 +621,11 @@ func ExampleClient_UpdateTag() { func ExampleClient_DeleteTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -507,6 +644,11 @@ func ExampleClient_DeleteTag() { func ExampleClient_ListTags() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -533,6 +675,11 @@ func ExampleClient_ListTags() { func ExampleClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -553,6 +700,11 @@ func ExampleClient_SetIamPolicy() { func ExampleClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -573,6 +725,11 @@ func ExampleClient_GetIamPolicy() { func ExampleClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datacatalog/apiv1beta1/datacatalogpb/common.pb.go b/datacatalog/apiv1beta1/datacatalogpb/common.pb.go new file mode 100644 index 000000000000..c2706c1b9ac8 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/common.pb.go @@ -0,0 +1,170 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/common.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This enum describes all the possible systems that Data Catalog integrates +// with. +type IntegratedSystem int32 + +const ( + // Default unknown system. + IntegratedSystem_INTEGRATED_SYSTEM_UNSPECIFIED IntegratedSystem = 0 + // BigQuery. + IntegratedSystem_BIGQUERY IntegratedSystem = 1 + // Cloud Pub/Sub. + IntegratedSystem_CLOUD_PUBSUB IntegratedSystem = 2 +) + +// Enum value maps for IntegratedSystem. +var ( + IntegratedSystem_name = map[int32]string{ + 0: "INTEGRATED_SYSTEM_UNSPECIFIED", + 1: "BIGQUERY", + 2: "CLOUD_PUBSUB", + } + IntegratedSystem_value = map[string]int32{ + "INTEGRATED_SYSTEM_UNSPECIFIED": 0, + "BIGQUERY": 1, + "CLOUD_PUBSUB": 2, + } +) + +func (x IntegratedSystem) Enum() *IntegratedSystem { + p := new(IntegratedSystem) + *p = x + return p +} + +func (x IntegratedSystem) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IntegratedSystem) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datacatalog_v1beta1_common_proto_enumTypes[0].Descriptor() +} + +func (IntegratedSystem) Type() protoreflect.EnumType { + return &file_google_cloud_datacatalog_v1beta1_common_proto_enumTypes[0] +} + +func (x IntegratedSystem) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IntegratedSystem.Descriptor instead. +func (IntegratedSystem) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_common_proto_rawDescGZIP(), []int{0} +} + +var File_google_cloud_datacatalog_v1beta1_common_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_common_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2a, 0x55, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x65, 0x64, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x52, 0x41, + 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x49, 0x47, 0x51, + 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, + 0x50, 0x55, 0x42, 0x53, 0x55, 0x42, 0x10, 0x02, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, + 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_common_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_common_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_common_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_common_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_common_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_common_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_common_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datacatalog_v1beta1_common_proto_goTypes = []interface{}{ + (IntegratedSystem)(0), // 0: google.cloud.datacatalog.v1beta1.IntegratedSystem +} +var file_google_cloud_datacatalog_v1beta1_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_common_proto_init() } +func file_google_cloud_datacatalog_v1beta1_common_proto_init() { + if File_google_cloud_datacatalog_v1beta1_common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_common_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_common_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_common_proto_depIdxs, + EnumInfos: file_google_cloud_datacatalog_v1beta1_common_proto_enumTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_common_proto = out.File + file_google_cloud_datacatalog_v1beta1_common_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_common_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_common_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go b/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go new file mode 100644 index 000000000000..027f852464b5 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/datacatalog.pb.go @@ -0,0 +1,5240 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/datacatalog.proto + +package datacatalogpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + v1 "google.golang.org/genproto/googleapis/iam/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Entry resources in Data Catalog can be of different types e.g. a BigQuery +// Table entry is of type `TABLE`. This enum describes all the possible types +// Data Catalog contains. +type EntryType int32 + +const ( + // Default unknown type. + EntryType_ENTRY_TYPE_UNSPECIFIED EntryType = 0 + // Output only. The type of entry that has a GoogleSQL schema, including + // logical views. + EntryType_TABLE EntryType = 2 + // Output only. The type of models. + // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro + EntryType_MODEL EntryType = 5 + // Output only. An entry type which is used for streaming entries. Example: + // Pub/Sub topic. + EntryType_DATA_STREAM EntryType = 3 + // An entry type which is a set of files or objects. Example: + // Cloud Storage fileset. + EntryType_FILESET EntryType = 4 +) + +// Enum value maps for EntryType. +var ( + EntryType_name = map[int32]string{ + 0: "ENTRY_TYPE_UNSPECIFIED", + 2: "TABLE", + 5: "MODEL", + 3: "DATA_STREAM", + 4: "FILESET", + } + EntryType_value = map[string]int32{ + "ENTRY_TYPE_UNSPECIFIED": 0, + "TABLE": 2, + "MODEL": 5, + "DATA_STREAM": 3, + "FILESET": 4, + } +) + +func (x EntryType) Enum() *EntryType { + p := new(EntryType) + *p = x + return p +} + +func (x EntryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EntryType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_enumTypes[0].Descriptor() +} + +func (EntryType) Type() protoreflect.EnumType { + return &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_enumTypes[0] +} + +func (x EntryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EntryType.Descriptor instead. +func (EntryType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{0} +} + +// Request message for +// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. +type SearchCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The scope of this search request. A `scope` that has empty + // `include_org_ids`, `include_project_ids` AND false + // `include_gcp_public_datasets` is considered invalid. Data Catalog will + // return an error in such a case. + Scope *SearchCatalogRequest_Scope `protobuf:"bytes,6,opt,name=scope,proto3" json:"scope,omitempty"` + // Required. The query string in search query syntax. The query must be non-empty. + // + // Query strings can be simple as "x" or more qualified as: + // + // * name:x + // * column:x + // * description:y + // + // Note: Query tokens need to have a minimum of 3 characters for substring + // matching to work correctly. See [Data Catalog Search + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + // Number of results in the search page. If <=0 then defaults to 10. Max limit + // for page_size is 1000. Throws an invalid argument for page_size > 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Pagination token returned in an earlier + // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which + // indicates that this is a continuation of a prior + // [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] + // call, and that the system should return the next page of data. If empty, + // the first page is returned. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Specifies the ordering of results, currently supported case-sensitive + // choices are: + // + // - `relevance`, only supports descending + // - `last_modified_timestamp [asc|desc]`, defaults to descending if not + // specified + // + // If not specified, defaults to `relevance` descending. + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *SearchCatalogRequest) Reset() { + *x = SearchCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchCatalogRequest) ProtoMessage() {} + +func (x *SearchCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchCatalogRequest.ProtoReflect.Descriptor instead. +func (*SearchCatalogRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{0} +} + +func (x *SearchCatalogRequest) GetScope() *SearchCatalogRequest_Scope { + if x != nil { + return x.Scope + } + return nil +} + +func (x *SearchCatalogRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchCatalogRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchCatalogRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *SearchCatalogRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// Response message for +// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. +type SearchCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Search results. + Results []*SearchCatalogResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + // The token that can be used to retrieve the next page of results. + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *SearchCatalogResponse) Reset() { + *x = SearchCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchCatalogResponse) ProtoMessage() {} + +func (x *SearchCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchCatalogResponse.ProtoReflect.Descriptor instead. +func (*SearchCatalogResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{1} +} + +func (x *SearchCatalogResponse) GetResults() []*SearchCatalogResult { + if x != nil { + return x.Results + } + return nil +} + +func (x *SearchCatalogResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [CreateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup]. +type CreateEntryGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the project this entry group is in. Example: + // + // * projects/{project_id}/locations/{location} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The id of the entry group to create. + // The id must begin with a letter or underscore, contain only English + // letters, numbers and underscores, and be at most 64 characters. + EntryGroupId string `protobuf:"bytes,3,opt,name=entry_group_id,json=entryGroupId,proto3" json:"entry_group_id,omitempty"` + // The entry group to create. Defaults to an empty entry group. + EntryGroup *EntryGroup `protobuf:"bytes,2,opt,name=entry_group,json=entryGroup,proto3" json:"entry_group,omitempty"` +} + +func (x *CreateEntryGroupRequest) Reset() { + *x = CreateEntryGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEntryGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEntryGroupRequest) ProtoMessage() {} + +func (x *CreateEntryGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEntryGroupRequest.ProtoReflect.Descriptor instead. +func (*CreateEntryGroupRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateEntryGroupRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateEntryGroupRequest) GetEntryGroupId() string { + if x != nil { + return x.EntryGroupId + } + return "" +} + +func (x *CreateEntryGroupRequest) GetEntryGroup() *EntryGroup { + if x != nil { + return x.EntryGroup + } + return nil +} + +// Request message for +// [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. +type UpdateEntryGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The updated entry group. "name" field must be set. + EntryGroup *EntryGroup `protobuf:"bytes,1,opt,name=entry_group,json=entryGroup,proto3" json:"entry_group,omitempty"` + // The fields to update on the entry group. If absent or empty, all modifiable + // fields are updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateEntryGroupRequest) Reset() { + *x = UpdateEntryGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEntryGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEntryGroupRequest) ProtoMessage() {} + +func (x *UpdateEntryGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEntryGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateEntryGroupRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateEntryGroupRequest) GetEntryGroup() *EntryGroup { + if x != nil { + return x.EntryGroup + } + return nil +} + +func (x *UpdateEntryGroupRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [GetEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup]. +type GetEntryGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The fields to return. If not set or empty, all fields are returned. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *GetEntryGroupRequest) Reset() { + *x = GetEntryGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEntryGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntryGroupRequest) ProtoMessage() {} + +func (x *GetEntryGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntryGroupRequest.ProtoReflect.Descriptor instead. +func (*GetEntryGroupRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{4} +} + +func (x *GetEntryGroupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetEntryGroupRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Request message for +// [DeleteEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup]. +type DeleteEntryGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entry group. For example, + // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. If true, deletes all entries in the entry group. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteEntryGroupRequest) Reset() { + *x = DeleteEntryGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEntryGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEntryGroupRequest) ProtoMessage() {} + +func (x *DeleteEntryGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEntryGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteEntryGroupRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteEntryGroupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteEntryGroupRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// Request message for +// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. +type ListEntryGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the location that contains the entry groups, which can be + // provided in URL format. Example: + // + // * projects/{project_id}/locations/{location} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Token that specifies which page is requested. If empty, the first page is + // returned. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListEntryGroupsRequest) Reset() { + *x = ListEntryGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEntryGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEntryGroupsRequest) ProtoMessage() {} + +func (x *ListEntryGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEntryGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListEntryGroupsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{6} +} + +func (x *ListEntryGroupsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListEntryGroupsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListEntryGroupsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. +type ListEntryGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // EntryGroup details. + EntryGroups []*EntryGroup `protobuf:"bytes,1,rep,name=entry_groups,json=entryGroups,proto3" json:"entry_groups,omitempty"` + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListEntryGroupsResponse) Reset() { + *x = ListEntryGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEntryGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEntryGroupsResponse) ProtoMessage() {} + +func (x *ListEntryGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEntryGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListEntryGroupsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{7} +} + +func (x *ListEntryGroupsResponse) GetEntryGroups() []*EntryGroup { + if x != nil { + return x.EntryGroups + } + return nil +} + +func (x *ListEntryGroupsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]. +type CreateEntryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entry group this entry is in. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The id of the entry to create. + EntryId string `protobuf:"bytes,3,opt,name=entry_id,json=entryId,proto3" json:"entry_id,omitempty"` + // Required. The entry to create. + Entry *Entry `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"` +} + +func (x *CreateEntryRequest) Reset() { + *x = CreateEntryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEntryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEntryRequest) ProtoMessage() {} + +func (x *CreateEntryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEntryRequest.ProtoReflect.Descriptor instead. +func (*CreateEntryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateEntryRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateEntryRequest) GetEntryId() string { + if x != nil { + return x.EntryId + } + return "" +} + +func (x *CreateEntryRequest) GetEntry() *Entry { + if x != nil { + return x.Entry + } + return nil +} + +// Request message for +// [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. +type UpdateEntryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The updated entry. The "name" field must be set. + Entry *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` + // The fields to update on the entry. If absent or empty, all modifiable + // fields are updated. + // + // The following fields are modifiable: + // * For entries with type `DATA_STREAM`: + // - `schema` + // + // * For entries with type `FILESET` + // - `schema` + // - `display_name` + // - `description` + // - `gcs_fileset_spec` + // - `gcs_fileset_spec.file_patterns` + // + // * For entries with `user_specified_type` + // - `schema` + // - `display_name` + // - `description` + // - user_specified_type + // - user_specified_system + // - linked_resource + // - source_system_timestamps + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateEntryRequest) Reset() { + *x = UpdateEntryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEntryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEntryRequest) ProtoMessage() {} + +func (x *UpdateEntryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEntryRequest.ProtoReflect.Descriptor instead. +func (*UpdateEntryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateEntryRequest) GetEntry() *Entry { + if x != nil { + return x.Entry + } + return nil +} + +func (x *UpdateEntryRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [DeleteEntry][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry]. +type DeleteEntryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteEntryRequest) Reset() { + *x = DeleteEntryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEntryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEntryRequest) ProtoMessage() {} + +func (x *DeleteEntryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEntryRequest.ProtoReflect.Descriptor instead. +func (*DeleteEntryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteEntryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [GetEntry][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry]. +type GetEntryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entry. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetEntryRequest) Reset() { + *x = GetEntryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEntryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntryRequest) ProtoMessage() {} + +func (x *GetEntryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntryRequest.ProtoReflect.Descriptor instead. +func (*GetEntryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{11} +} + +func (x *GetEntryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. +type LookupEntryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Represents either the Google Cloud Platform resource or SQL name + // for a Google Cloud Platform resource. + // + // Types that are assignable to TargetName: + // + // *LookupEntryRequest_LinkedResource + // *LookupEntryRequest_SqlResource + TargetName isLookupEntryRequest_TargetName `protobuf_oneof:"target_name"` +} + +func (x *LookupEntryRequest) Reset() { + *x = LookupEntryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupEntryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupEntryRequest) ProtoMessage() {} + +func (x *LookupEntryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupEntryRequest.ProtoReflect.Descriptor instead. +func (*LookupEntryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{12} +} + +func (m *LookupEntryRequest) GetTargetName() isLookupEntryRequest_TargetName { + if m != nil { + return m.TargetName + } + return nil +} + +func (x *LookupEntryRequest) GetLinkedResource() string { + if x, ok := x.GetTargetName().(*LookupEntryRequest_LinkedResource); ok { + return x.LinkedResource + } + return "" +} + +func (x *LookupEntryRequest) GetSqlResource() string { + if x, ok := x.GetTargetName().(*LookupEntryRequest_SqlResource); ok { + return x.SqlResource + } + return "" +} + +type isLookupEntryRequest_TargetName interface { + isLookupEntryRequest_TargetName() +} + +type LookupEntryRequest_LinkedResource struct { + // The full name of the Google Cloud Platform resource the Data Catalog + // entry represents. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name. + // Full names are case-sensitive. + // + // Examples: + // + // - //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // - //pubsub.googleapis.com/projects/projectId/topics/topicId + LinkedResource string `protobuf:"bytes,1,opt,name=linked_resource,json=linkedResource,proto3,oneof"` +} + +type LookupEntryRequest_SqlResource struct { + // The SQL name of the entry. SQL names are case-sensitive. + // + // Examples: + // + // - `pubsub.project_id.topic_id` + // - “pubsub.project_id.`topic.id.with.dots` “ + // - `bigquery.table.project_id.dataset_id.table_id` + // - `bigquery.dataset.project_id.dataset_id` + // - `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` + // + // `*_id`s shoud satisfy the standard SQL rules for identifiers. + // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. + SqlResource string `protobuf:"bytes,3,opt,name=sql_resource,json=sqlResource,proto3,oneof"` +} + +func (*LookupEntryRequest_LinkedResource) isLookupEntryRequest_TargetName() {} + +func (*LookupEntryRequest_SqlResource) isLookupEntryRequest_TargetName() {} + +// Entry Metadata. +// A Data Catalog Entry resource represents another resource in Google +// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or +// outside of Google Cloud Platform. Clients can use the `linked_resource` field +// in the Entry resource to refer to the original resource ID of the source +// system. +// +// An Entry resource contains resource details, such as its schema. An Entry can +// also be used to attach flexible metadata, such as a +// [Tag][google.cloud.datacatalog.v1beta1.Tag]. +type Entry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Data Catalog resource name of the entry in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // + // Note that this Entry and its child resources may not actually be stored in + // the location in this name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The resource this metadata entry refers to. + // + // For Google Cloud Platform resources, `linked_resource` is the [full name of + // the + // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). + // For example, the `linked_resource` for a table resource from BigQuery is: + // + // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId + // + // Output only when Entry is of type in the EntryType enum. For entries with + // user_specified_type, this field is optional and defaults to an empty + // string. + LinkedResource string `protobuf:"bytes,9,opt,name=linked_resource,json=linkedResource,proto3" json:"linked_resource,omitempty"` + // Required. Entry type. + // + // Types that are assignable to EntryType: + // + // *Entry_Type + // *Entry_UserSpecifiedType + EntryType isEntry_EntryType `protobuf_oneof:"entry_type"` + // The source system of the entry. + // + // Types that are assignable to System: + // + // *Entry_IntegratedSystem + // *Entry_UserSpecifiedSystem + System isEntry_System `protobuf_oneof:"system"` + // Type specification information. + // + // Types that are assignable to TypeSpec: + // + // *Entry_GcsFilesetSpec + // *Entry_BigqueryTableSpec + // *Entry_BigqueryDateShardedSpec + TypeSpec isEntry_TypeSpec `protobuf_oneof:"type_spec"` + // Display information such as title and description. A short name to identify + // the entry, for example, "Analytics Data - Jan 2011". Default value is an + // empty string. + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Entry description, which can consist of several sentences or paragraphs + // that describe entry contents. Default value is an empty string. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // Schema of the entry. An entry might not have any schema attached to it. + Schema *Schema `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` + // Output only. Timestamps about the underlying resource, not about this Data Catalog + // entry. Output only when Entry is of type in the EntryType enum. For entries + // with user_specified_type, this field is optional and defaults to an empty + // timestamp. + SourceSystemTimestamps *SystemTimestamps `protobuf:"bytes,7,opt,name=source_system_timestamps,json=sourceSystemTimestamps,proto3" json:"source_system_timestamps,omitempty"` +} + +func (x *Entry) Reset() { + *x = Entry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Entry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Entry) ProtoMessage() {} + +func (x *Entry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Entry.ProtoReflect.Descriptor instead. +func (*Entry) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{13} +} + +func (x *Entry) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Entry) GetLinkedResource() string { + if x != nil { + return x.LinkedResource + } + return "" +} + +func (m *Entry) GetEntryType() isEntry_EntryType { + if m != nil { + return m.EntryType + } + return nil +} + +func (x *Entry) GetType() EntryType { + if x, ok := x.GetEntryType().(*Entry_Type); ok { + return x.Type + } + return EntryType_ENTRY_TYPE_UNSPECIFIED +} + +func (x *Entry) GetUserSpecifiedType() string { + if x, ok := x.GetEntryType().(*Entry_UserSpecifiedType); ok { + return x.UserSpecifiedType + } + return "" +} + +func (m *Entry) GetSystem() isEntry_System { + if m != nil { + return m.System + } + return nil +} + +func (x *Entry) GetIntegratedSystem() IntegratedSystem { + if x, ok := x.GetSystem().(*Entry_IntegratedSystem); ok { + return x.IntegratedSystem + } + return IntegratedSystem_INTEGRATED_SYSTEM_UNSPECIFIED +} + +func (x *Entry) GetUserSpecifiedSystem() string { + if x, ok := x.GetSystem().(*Entry_UserSpecifiedSystem); ok { + return x.UserSpecifiedSystem + } + return "" +} + +func (m *Entry) GetTypeSpec() isEntry_TypeSpec { + if m != nil { + return m.TypeSpec + } + return nil +} + +func (x *Entry) GetGcsFilesetSpec() *GcsFilesetSpec { + if x, ok := x.GetTypeSpec().(*Entry_GcsFilesetSpec); ok { + return x.GcsFilesetSpec + } + return nil +} + +func (x *Entry) GetBigqueryTableSpec() *BigQueryTableSpec { + if x, ok := x.GetTypeSpec().(*Entry_BigqueryTableSpec); ok { + return x.BigqueryTableSpec + } + return nil +} + +func (x *Entry) GetBigqueryDateShardedSpec() *BigQueryDateShardedSpec { + if x, ok := x.GetTypeSpec().(*Entry_BigqueryDateShardedSpec); ok { + return x.BigqueryDateShardedSpec + } + return nil +} + +func (x *Entry) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Entry) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Entry) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Entry) GetSourceSystemTimestamps() *SystemTimestamps { + if x != nil { + return x.SourceSystemTimestamps + } + return nil +} + +type isEntry_EntryType interface { + isEntry_EntryType() +} + +type Entry_Type struct { + // The type of the entry. + // Only used for Entries with types in the EntryType enum. + Type EntryType `protobuf:"varint,2,opt,name=type,proto3,enum=google.cloud.datacatalog.v1beta1.EntryType,oneof"` +} + +type Entry_UserSpecifiedType struct { + // Entry type if it does not fit any of the input-allowed values listed in + // `EntryType` enum above. When creating an entry, users should check the + // enum values first, if nothing matches the entry to be created, then + // provide a custom value, for example "my_special_type". + // `user_specified_type` strings must begin with a letter or underscore and + // can only contain letters, numbers, and underscores; are case insensitive; + // must be at least 1 character and at most 64 characters long. + // + // Currently, only FILESET enum value is allowed. All other entries created + // through Data Catalog must use `user_specified_type`. + UserSpecifiedType string `protobuf:"bytes,16,opt,name=user_specified_type,json=userSpecifiedType,proto3,oneof"` +} + +func (*Entry_Type) isEntry_EntryType() {} + +func (*Entry_UserSpecifiedType) isEntry_EntryType() {} + +type isEntry_System interface { + isEntry_System() +} + +type Entry_IntegratedSystem struct { + // Output only. This field indicates the entry's source system that Data Catalog + // integrates with, such as BigQuery or Pub/Sub. + IntegratedSystem IntegratedSystem `protobuf:"varint,17,opt,name=integrated_system,json=integratedSystem,proto3,enum=google.cloud.datacatalog.v1beta1.IntegratedSystem,oneof"` +} + +type Entry_UserSpecifiedSystem struct { + // This field indicates the entry's source system that Data Catalog does not + // integrate with. `user_specified_system` strings must begin with a letter + // or underscore and can only contain letters, numbers, and underscores; are + // case insensitive; must be at least 1 character and at most 64 characters + // long. + UserSpecifiedSystem string `protobuf:"bytes,18,opt,name=user_specified_system,json=userSpecifiedSystem,proto3,oneof"` +} + +func (*Entry_IntegratedSystem) isEntry_System() {} + +func (*Entry_UserSpecifiedSystem) isEntry_System() {} + +type isEntry_TypeSpec interface { + isEntry_TypeSpec() +} + +type Entry_GcsFilesetSpec struct { + // Specification that applies to a Cloud Storage fileset. This is only valid + // on entries of type FILESET. + GcsFilesetSpec *GcsFilesetSpec `protobuf:"bytes,6,opt,name=gcs_fileset_spec,json=gcsFilesetSpec,proto3,oneof"` +} + +type Entry_BigqueryTableSpec struct { + // Specification that applies to a BigQuery table. This is only valid on + // entries of type `TABLE`. + BigqueryTableSpec *BigQueryTableSpec `protobuf:"bytes,12,opt,name=bigquery_table_spec,json=bigqueryTableSpec,proto3,oneof"` +} + +type Entry_BigqueryDateShardedSpec struct { + // Specification for a group of BigQuery tables with name pattern + // `[prefix]YYYYMMDD`. Context: + // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. + BigqueryDateShardedSpec *BigQueryDateShardedSpec `protobuf:"bytes,15,opt,name=bigquery_date_sharded_spec,json=bigqueryDateShardedSpec,proto3,oneof"` +} + +func (*Entry_GcsFilesetSpec) isEntry_TypeSpec() {} + +func (*Entry_BigqueryTableSpec) isEntry_TypeSpec() {} + +func (*Entry_BigqueryDateShardedSpec) isEntry_TypeSpec() {} + +// EntryGroup Metadata. +// An EntryGroup resource represents a logical grouping of zero or more +// Data Catalog [Entry][google.cloud.datacatalog.v1beta1.Entry] resources. +type EntryGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the entry group in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // + // Note that this EntryGroup and its child resources may not actually be + // stored in the location in this name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A short name to identify the entry group, for example, + // "analytics data - jan 2011". Default value is an empty string. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Entry group description, which can consist of several sentences or + // paragraphs that describe entry group contents. Default value is an empty + // string. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. + DataCatalogTimestamps *SystemTimestamps `protobuf:"bytes,4,opt,name=data_catalog_timestamps,json=dataCatalogTimestamps,proto3" json:"data_catalog_timestamps,omitempty"` +} + +func (x *EntryGroup) Reset() { + *x = EntryGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntryGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntryGroup) ProtoMessage() {} + +func (x *EntryGroup) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntryGroup.ProtoReflect.Descriptor instead. +func (*EntryGroup) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{14} +} + +func (x *EntryGroup) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EntryGroup) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *EntryGroup) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *EntryGroup) GetDataCatalogTimestamps() *SystemTimestamps { + if x != nil { + return x.DataCatalogTimestamps + } + return nil +} + +// Request message for +// [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. +type CreateTagTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the project and the template location + // [region](https://cloud.google.com/data-catalog/docs/concepts/regions. + // + // Example: + // + // * projects/{project_id}/locations/us-central1 + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The id of the tag template to create. + TagTemplateId string `protobuf:"bytes,3,opt,name=tag_template_id,json=tagTemplateId,proto3" json:"tag_template_id,omitempty"` + // Required. The tag template to create. + TagTemplate *TagTemplate `protobuf:"bytes,2,opt,name=tag_template,json=tagTemplate,proto3" json:"tag_template,omitempty"` +} + +func (x *CreateTagTemplateRequest) Reset() { + *x = CreateTagTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTagTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTagTemplateRequest) ProtoMessage() {} + +func (x *CreateTagTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTagTemplateRequest.ProtoReflect.Descriptor instead. +func (*CreateTagTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateTagTemplateRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTagTemplateRequest) GetTagTemplateId() string { + if x != nil { + return x.TagTemplateId + } + return "" +} + +func (x *CreateTagTemplateRequest) GetTagTemplate() *TagTemplate { + if x != nil { + return x.TagTemplate + } + return nil +} + +// Request message for +// [GetTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate]. +type GetTagTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetTagTemplateRequest) Reset() { + *x = GetTagTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTagTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTagTemplateRequest) ProtoMessage() {} + +func (x *GetTagTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTagTemplateRequest.ProtoReflect.Descriptor instead. +func (*GetTagTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{16} +} + +func (x *GetTagTemplateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. +type UpdateTagTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The template to update. The "name" field must be set. + TagTemplate *TagTemplate `protobuf:"bytes,1,opt,name=tag_template,json=tagTemplate,proto3" json:"tag_template,omitempty"` + // The field mask specifies the parts of the template to overwrite. + // + // Allowed fields: + // + // - `display_name` + // + // If absent or empty, all of the allowed fields above will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateTagTemplateRequest) Reset() { + *x = UpdateTagTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTagTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTagTemplateRequest) ProtoMessage() {} + +func (x *UpdateTagTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTagTemplateRequest.ProtoReflect.Descriptor instead. +func (*UpdateTagTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{17} +} + +func (x *UpdateTagTemplateRequest) GetTagTemplate() *TagTemplate { + if x != nil { + return x.TagTemplate + } + return nil +} + +func (x *UpdateTagTemplateRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate]. +type DeleteTagTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the tag template to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Currently, this field must always be set to `true`. + // This confirms the deletion of any possible tags using this template. + // `force = false` will be supported in the future. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteTagTemplateRequest) Reset() { + *x = DeleteTagTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTagTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTagTemplateRequest) ProtoMessage() {} + +func (x *DeleteTagTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTagTemplateRequest.ProtoReflect.Descriptor instead. +func (*DeleteTagTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{18} +} + +func (x *DeleteTagTemplateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteTagTemplateRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// Request message for +// [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. +type CreateTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the resource to attach this tag to. Tags can be attached to + // Entries. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + // + // Note that this Tag and its child resources may not actually be stored in + // the location in this name. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The tag to create. + Tag *Tag `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *CreateTagRequest) Reset() { + *x = CreateTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTagRequest) ProtoMessage() {} + +func (x *CreateTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTagRequest.ProtoReflect.Descriptor instead. +func (*CreateTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{19} +} + +func (x *CreateTagRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTagRequest) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + +// Request message for +// [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. +type UpdateTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The updated tag. The "name" field must be set. + Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + // The fields to update on the Tag. If absent or empty, all modifiable fields + // are updated. Currently the only modifiable field is the field `fields`. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateTagRequest) Reset() { + *x = UpdateTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTagRequest) ProtoMessage() {} + +func (x *UpdateTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTagRequest.ProtoReflect.Descriptor instead. +func (*UpdateTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{20} +} + +func (x *UpdateTagRequest) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + +func (x *UpdateTagRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [DeleteTag][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag]. +type DeleteTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the tag to delete. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteTagRequest) Reset() { + *x = DeleteTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTagRequest) ProtoMessage() {} + +func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTagRequest.ProtoReflect.Descriptor instead. +func (*DeleteTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{21} +} + +func (x *DeleteTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField]. +type CreateTagTemplateFieldRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the project and the template location + // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). + // + // Example: + // + // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The ID of the tag template field to create. + // Field ids can contain letters (both uppercase and lowercase), numbers + // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 + // character long and at most 128 characters long. Field IDs must also be + // unique within their template. + TagTemplateFieldId string `protobuf:"bytes,2,opt,name=tag_template_field_id,json=tagTemplateFieldId,proto3" json:"tag_template_field_id,omitempty"` + // Required. The tag template field to create. + TagTemplateField *TagTemplateField `protobuf:"bytes,3,opt,name=tag_template_field,json=tagTemplateField,proto3" json:"tag_template_field,omitempty"` +} + +func (x *CreateTagTemplateFieldRequest) Reset() { + *x = CreateTagTemplateFieldRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTagTemplateFieldRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTagTemplateFieldRequest) ProtoMessage() {} + +func (x *CreateTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTagTemplateFieldRequest.ProtoReflect.Descriptor instead. +func (*CreateTagTemplateFieldRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{22} +} + +func (x *CreateTagTemplateFieldRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTagTemplateFieldRequest) GetTagTemplateFieldId() string { + if x != nil { + return x.TagTemplateFieldId + } + return "" +} + +func (x *CreateTagTemplateFieldRequest) GetTagTemplateField() *TagTemplateField { + if x != nil { + return x.TagTemplateField + } + return nil +} + +// Request message for +// [UpdateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField]. +type UpdateTagTemplateFieldRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the tag template field. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The template to update. + TagTemplateField *TagTemplateField `protobuf:"bytes,2,opt,name=tag_template_field,json=tagTemplateField,proto3" json:"tag_template_field,omitempty"` + // Optional. The field mask specifies the parts of the template to be updated. + // Allowed fields: + // + // - `display_name` + // - `type.enum_type` + // - `is_required` + // + // If `update_mask` is not set or empty, all of the allowed fields above will + // be updated. + // + // When updating an enum type, the provided values will be merged with the + // existing values. Therefore, enum values can only be added, existing enum + // values cannot be deleted nor renamed. Updating a template field from + // optional to required is NOT allowed. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateTagTemplateFieldRequest) Reset() { + *x = UpdateTagTemplateFieldRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTagTemplateFieldRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTagTemplateFieldRequest) ProtoMessage() {} + +func (x *UpdateTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTagTemplateFieldRequest.ProtoReflect.Descriptor instead. +func (*UpdateTagTemplateFieldRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{23} +} + +func (x *UpdateTagTemplateFieldRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateTagTemplateFieldRequest) GetTagTemplateField() *TagTemplateField { + if x != nil { + return x.TagTemplateField + } + return nil +} + +func (x *UpdateTagTemplateFieldRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [RenameTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField]. +type RenameTagTemplateFieldRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the tag template. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The new ID of this tag template field. For example, `my_new_field`. + NewTagTemplateFieldId string `protobuf:"bytes,2,opt,name=new_tag_template_field_id,json=newTagTemplateFieldId,proto3" json:"new_tag_template_field_id,omitempty"` +} + +func (x *RenameTagTemplateFieldRequest) Reset() { + *x = RenameTagTemplateFieldRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RenameTagTemplateFieldRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RenameTagTemplateFieldRequest) ProtoMessage() {} + +func (x *RenameTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RenameTagTemplateFieldRequest.ProtoReflect.Descriptor instead. +func (*RenameTagTemplateFieldRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{24} +} + +func (x *RenameTagTemplateFieldRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RenameTagTemplateFieldRequest) GetNewTagTemplateFieldId() string { + if x != nil { + return x.NewTagTemplateFieldId + } + return "" +} + +// Request message for +// [DeleteTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField]. +type DeleteTagTemplateFieldRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the tag template field to delete. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Currently, this field must always be set to `true`. + // This confirms the deletion of this field from any tags using this field. + // `force = false` will be supported in the future. + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteTagTemplateFieldRequest) Reset() { + *x = DeleteTagTemplateFieldRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTagTemplateFieldRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTagTemplateFieldRequest) ProtoMessage() {} + +func (x *DeleteTagTemplateFieldRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTagTemplateFieldRequest.ProtoReflect.Descriptor instead. +func (*DeleteTagTemplateFieldRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{25} +} + +func (x *DeleteTagTemplateFieldRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteTagTemplateFieldRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// Request message for +// [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. +type ListTagsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Data Catalog resource to list the tags of. The resource + // could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an + // [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. + // + // Examples: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of tags to return. Default is 10. Max limit is 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token that specifies which page is requested. If empty, the first page is + // returned. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTagsRequest) Reset() { + *x = ListTagsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTagsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTagsRequest) ProtoMessage() {} + +func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead. +func (*ListTagsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{26} +} + +func (x *ListTagsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTagsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTagsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. +type ListTagsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [Tag][google.cloud.datacatalog.v1beta1.Tag] details. + Tags []*Tag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTagsResponse) Reset() { + *x = ListTagsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTagsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTagsResponse) ProtoMessage() {} + +func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead. +func (*ListTagsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{27} +} + +func (x *ListTagsResponse) GetTags() []*Tag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *ListTagsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. +type ListEntriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entry group that contains the entries, which can + // be provided in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return. Default is 10. Max limit is 1000. + // Throws an invalid argument for `page_size > 1000`. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Token that specifies which page is requested. If empty, the first page is + // returned. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // The fields to return for each Entry. If not set or empty, all + // fields are returned. + // For example, setting read_mask to contain only one path "name" will cause + // ListEntries to return a list of Entries with only "name" field. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,4,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *ListEntriesRequest) Reset() { + *x = ListEntriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEntriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEntriesRequest) ProtoMessage() {} + +func (x *ListEntriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEntriesRequest.ProtoReflect.Descriptor instead. +func (*ListEntriesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{28} +} + +func (x *ListEntriesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListEntriesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListEntriesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListEntriesRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Response message for +// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. +type ListEntriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Entry details. + Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + // Token to retrieve the next page of results. It is set to empty if no items + // remain in results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListEntriesResponse) Reset() { + *x = ListEntriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEntriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEntriesResponse) ProtoMessage() {} + +func (x *ListEntriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEntriesResponse.ProtoReflect.Descriptor instead. +func (*ListEntriesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{29} +} + +func (x *ListEntriesResponse) GetEntries() []*Entry { + if x != nil { + return x.Entries + } + return nil +} + +func (x *ListEntriesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The criteria that select the subspace used for query matching. +type SearchCatalogRequest_Scope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of organization IDs to search within. To find your organization + // ID, follow instructions in + // https://cloud.google.com/resource-manager/docs/creating-managing-organization. + IncludeOrgIds []string `protobuf:"bytes,2,rep,name=include_org_ids,json=includeOrgIds,proto3" json:"include_org_ids,omitempty"` + // The list of project IDs to search within. To learn more about the + // distinction between project names/IDs/numbers, go to + // https://cloud.google.com/docs/overview/#projects. + IncludeProjectIds []string `protobuf:"bytes,3,rep,name=include_project_ids,json=includeProjectIds,proto3" json:"include_project_ids,omitempty"` + // If `true`, include Google Cloud Platform (GCP) public datasets in the + // search results. Info on GCP public datasets is available at + // https://cloud.google.com/public-datasets/. By default, GCP public + // datasets are excluded. + IncludeGcpPublicDatasets bool `protobuf:"varint,7,opt,name=include_gcp_public_datasets,json=includeGcpPublicDatasets,proto3" json:"include_gcp_public_datasets,omitempty"` +} + +func (x *SearchCatalogRequest_Scope) Reset() { + *x = SearchCatalogRequest_Scope{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchCatalogRequest_Scope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchCatalogRequest_Scope) ProtoMessage() {} + +func (x *SearchCatalogRequest_Scope) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchCatalogRequest_Scope.ProtoReflect.Descriptor instead. +func (*SearchCatalogRequest_Scope) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SearchCatalogRequest_Scope) GetIncludeOrgIds() []string { + if x != nil { + return x.IncludeOrgIds + } + return nil +} + +func (x *SearchCatalogRequest_Scope) GetIncludeProjectIds() []string { + if x != nil { + return x.IncludeProjectIds + } + return nil +} + +func (x *SearchCatalogRequest_Scope) GetIncludeGcpPublicDatasets() bool { + if x != nil { + return x.IncludeGcpPublicDatasets + } + return false +} + +var File_google_cloud_datacatalog_v1beta1_datacatalog_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x63, 0x73, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x03, + 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x1a, 0x9e, 0x01, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x4f, 0x72, 0x67, 0x49, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x67, 0x63, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x47, 0x63, 0x70, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4f, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x17, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x12, 0x25, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, + 0x0e, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0a, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xaa, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x92, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, + 0x08, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x77, 0x0a, 0x17, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x27, 0x12, 0x25, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0xbf, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, + 0x08, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x42, 0x0a, + 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x22, 0x95, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x52, 0x0a, 0x12, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x73, + 0x0a, 0x12, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x23, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x71, 0x6c, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xdb, 0x08, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3e, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x41, 0x27, + 0x0a, 0x25, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x66, 0x0a, 0x11, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, + 0x01, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x65, 0x64, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x12, 0x34, 0x0a, 0x15, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x01, 0x52, 0x13, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x5c, 0x0a, 0x10, 0x67, 0x63, 0x73, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x65, + 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, 0x0e, 0x67, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x65, 0x0a, 0x13, 0x62, 0x69, 0x67, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, 0x11, 0x62, 0x69, 0x67, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x78, + 0x0a, 0x1a, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x73, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, + 0x74, 0x65, 0x53, 0x68, 0x61, 0x72, 0x64, 0x65, 0x64, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, + 0x17, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x53, 0x68, 0x61, + 0x72, 0x64, 0x65, 0x64, 0x53, 0x70, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, + 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x71, 0x0a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x73, 0x3a, 0x78, 0xea, 0x41, 0x75, 0x0a, 0x20, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x51, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x7d, 0x2f, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x7d, 0x42, 0x0c, 0x0a, 0x0a, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x22, 0xc5, 0x02, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6f, 0x0a, 0x17, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x3a, 0x6d, 0xea, 0x41, 0x6a, 0x0a, + 0x25, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x41, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x7d, 0x22, 0xe6, 0x01, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x2b, + 0x0a, 0x0f, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x74, 0x61, + 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x0c, 0x74, + 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x22, 0x5b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x28, 0x0a, 0x26, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, + 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xae, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x0c, + 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, + 0x22, 0x79, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x28, 0x0a, 0x26, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, + 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x10, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x3c, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x54, 0x61, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x8d, + 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x74, 0x61, + 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, + 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4e, + 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x86, + 0x02, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x15, 0x74, 0x61, 0x67, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x74, 0x61, + 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, + 0x12, 0x65, 0x0a, 0x12, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x91, 0x02, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, + 0x2b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xa7, 0x01, 0x0a, 0x1d, + 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, + 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x15, + 0x6e, 0x65, 0x77, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x0f, + 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x75, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0xd0, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x27, 0x0a, 0x25, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x37, 0x0a, 0x09, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x72, 0x65, 0x61, + 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x80, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, + 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0x5b, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, + 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x41, 0x54, 0x41, 0x5f, + 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x49, 0x4c, 0x45, + 0x53, 0x45, 0x54, 0x10, 0x04, 0x32, 0xbc, 0x32, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0xb2, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, + 0x22, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x0b, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x2c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0xea, 0x01, 0x0a, 0x10, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, + 0x22, 0x34, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x3a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0xda, 0x41, 0x21, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x2c, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0xfa, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x39, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x32, 0x40, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0xda, 0x41, 0x0b, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0xda, 0x41, 0x17, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xcb, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x54, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0xda, 0x41, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x12, 0xaa, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x36, 0x2a, 0x34, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0xcd, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, + 0x12, 0x34, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0xd3, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x22, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xda, 0x41, 0x15, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x2c, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0xdd, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x32, 0x44, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xda, 0x41, 0x05, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0xda, 0x41, 0x11, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xaa, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x2a, 0x3e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, + 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xb5, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x4d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x3a, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0xcb, 0x01, 0x0a, 0x0b, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, + 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xf1, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x3a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, + 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x71, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x45, 0x22, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x0c, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xda, 0x41, 0x23, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x2c, + 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xbe, 0x01, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, + 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x83, 0x02, + 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x82, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x32, 0x42, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0c, 0x74, 0x61, 0x67, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xda, 0x41, 0x0c, 0x74, 0x61, 0x67, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xda, 0x41, 0x18, 0x74, 0x61, 0x67, 0x5f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x12, 0xb3, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x2a, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x0a, 0x6e, + 0x61, 0x6d, 0x65, 0x2c, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x9c, 0x02, 0x0a, 0x16, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x8c, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x54, 0x22, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x3a, 0x12, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0xda, 0x41, 0x2f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x2c, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0xaa, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x9a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x54, 0x32, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x12, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0xda, 0x41, 0x17, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x74, 0x61, 0x67, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0xda, + 0x41, 0x23, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x80, 0x02, 0x0a, 0x16, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x71, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x22, 0x45, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x1e, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x6e, + 0x65, 0x77, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x12, 0xc6, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x53, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x40, 0x2a, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x12, 0x8d, 0x02, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x22, 0xa4, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x90, 0x01, 0x22, 0x45, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x03, 0x74, 0x61, 0x67, + 0x5a, 0x42, 0x22, 0x3b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, + 0x03, 0x74, 0x61, 0x67, 0xda, 0x41, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x74, 0x61, + 0x67, 0x12, 0xa0, 0x02, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x22, 0xb7, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x98, 0x01, 0x32, 0x49, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x74, 0x61, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x03, 0x74, 0x61, 0x67, 0x5a, 0x46, 0x32, 0x3f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, + 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x03, 0x74, 0x61, 0x67, 0xda, 0x41, 0x03, 0x74, + 0x61, 0x67, 0xda, 0x41, 0x0f, 0x74, 0x61, 0x67, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xee, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x67, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x94, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x86, 0x01, 0x2a, 0x45, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x5a, + 0x3d, 0x2a, 0x3b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8a, 0x02, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x86, 0x01, 0x12, 0x45, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x5a, 0x3d, 0x12, 0x3b, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0xfc, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xb0, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x97, 0x01, 0x22, 0x46, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x3a, 0x01, 0x2a, 0x5a, 0x4a, 0x22, 0x45, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0xda, + 0x41, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0xcb, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xff, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xed, 0x01, 0x22, 0x46, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, + 0x01, 0x2a, 0x5a, 0x4a, 0x22, 0x45, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, + 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0x5a, 0x54, + 0x22, 0x4f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0xf2, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x86, 0x02, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0xff, 0x01, 0x22, 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x5a, 0x50, 0x22, 0x4b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x5a, 0x5a, 0x22, 0x55, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x74, + 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x3a, 0x01, 0x2a, 0x1a, 0x4e, 0xca, 0x41, 0x1a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, + 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xf8, 0x01, 0x01, 0xaa, + 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, + 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_datacatalog_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_google_cloud_datacatalog_v1beta1_datacatalog_proto_goTypes = []interface{}{ + (EntryType)(0), // 0: google.cloud.datacatalog.v1beta1.EntryType + (*SearchCatalogRequest)(nil), // 1: google.cloud.datacatalog.v1beta1.SearchCatalogRequest + (*SearchCatalogResponse)(nil), // 2: google.cloud.datacatalog.v1beta1.SearchCatalogResponse + (*CreateEntryGroupRequest)(nil), // 3: google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + (*UpdateEntryGroupRequest)(nil), // 4: google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest + (*GetEntryGroupRequest)(nil), // 5: google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + (*DeleteEntryGroupRequest)(nil), // 6: google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + (*ListEntryGroupsRequest)(nil), // 7: google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest + (*ListEntryGroupsResponse)(nil), // 8: google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse + (*CreateEntryRequest)(nil), // 9: google.cloud.datacatalog.v1beta1.CreateEntryRequest + (*UpdateEntryRequest)(nil), // 10: google.cloud.datacatalog.v1beta1.UpdateEntryRequest + (*DeleteEntryRequest)(nil), // 11: google.cloud.datacatalog.v1beta1.DeleteEntryRequest + (*GetEntryRequest)(nil), // 12: google.cloud.datacatalog.v1beta1.GetEntryRequest + (*LookupEntryRequest)(nil), // 13: google.cloud.datacatalog.v1beta1.LookupEntryRequest + (*Entry)(nil), // 14: google.cloud.datacatalog.v1beta1.Entry + (*EntryGroup)(nil), // 15: google.cloud.datacatalog.v1beta1.EntryGroup + (*CreateTagTemplateRequest)(nil), // 16: google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + (*GetTagTemplateRequest)(nil), // 17: google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + (*UpdateTagTemplateRequest)(nil), // 18: google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + (*DeleteTagTemplateRequest)(nil), // 19: google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + (*CreateTagRequest)(nil), // 20: google.cloud.datacatalog.v1beta1.CreateTagRequest + (*UpdateTagRequest)(nil), // 21: google.cloud.datacatalog.v1beta1.UpdateTagRequest + (*DeleteTagRequest)(nil), // 22: google.cloud.datacatalog.v1beta1.DeleteTagRequest + (*CreateTagTemplateFieldRequest)(nil), // 23: google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + (*UpdateTagTemplateFieldRequest)(nil), // 24: google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + (*RenameTagTemplateFieldRequest)(nil), // 25: google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest + (*DeleteTagTemplateFieldRequest)(nil), // 26: google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + (*ListTagsRequest)(nil), // 27: google.cloud.datacatalog.v1beta1.ListTagsRequest + (*ListTagsResponse)(nil), // 28: google.cloud.datacatalog.v1beta1.ListTagsResponse + (*ListEntriesRequest)(nil), // 29: google.cloud.datacatalog.v1beta1.ListEntriesRequest + (*ListEntriesResponse)(nil), // 30: google.cloud.datacatalog.v1beta1.ListEntriesResponse + (*SearchCatalogRequest_Scope)(nil), // 31: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + (*SearchCatalogResult)(nil), // 32: google.cloud.datacatalog.v1beta1.SearchCatalogResult + (*fieldmaskpb.FieldMask)(nil), // 33: google.protobuf.FieldMask + (IntegratedSystem)(0), // 34: google.cloud.datacatalog.v1beta1.IntegratedSystem + (*GcsFilesetSpec)(nil), // 35: google.cloud.datacatalog.v1beta1.GcsFilesetSpec + (*BigQueryTableSpec)(nil), // 36: google.cloud.datacatalog.v1beta1.BigQueryTableSpec + (*BigQueryDateShardedSpec)(nil), // 37: google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + (*Schema)(nil), // 38: google.cloud.datacatalog.v1beta1.Schema + (*SystemTimestamps)(nil), // 39: google.cloud.datacatalog.v1beta1.SystemTimestamps + (*TagTemplate)(nil), // 40: google.cloud.datacatalog.v1beta1.TagTemplate + (*Tag)(nil), // 41: google.cloud.datacatalog.v1beta1.Tag + (*TagTemplateField)(nil), // 42: google.cloud.datacatalog.v1beta1.TagTemplateField + (*v1.SetIamPolicyRequest)(nil), // 43: google.iam.v1.SetIamPolicyRequest + (*v1.GetIamPolicyRequest)(nil), // 44: google.iam.v1.GetIamPolicyRequest + (*v1.TestIamPermissionsRequest)(nil), // 45: google.iam.v1.TestIamPermissionsRequest + (*emptypb.Empty)(nil), // 46: google.protobuf.Empty + (*v1.Policy)(nil), // 47: google.iam.v1.Policy + (*v1.TestIamPermissionsResponse)(nil), // 48: google.iam.v1.TestIamPermissionsResponse +} +var file_google_cloud_datacatalog_v1beta1_datacatalog_proto_depIdxs = []int32{ + 31, // 0: google.cloud.datacatalog.v1beta1.SearchCatalogRequest.scope:type_name -> google.cloud.datacatalog.v1beta1.SearchCatalogRequest.Scope + 32, // 1: google.cloud.datacatalog.v1beta1.SearchCatalogResponse.results:type_name -> google.cloud.datacatalog.v1beta1.SearchCatalogResult + 15, // 2: google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest.entry_group:type_name -> google.cloud.datacatalog.v1beta1.EntryGroup + 15, // 3: google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.entry_group:type_name -> google.cloud.datacatalog.v1beta1.EntryGroup + 33, // 4: google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest.update_mask:type_name -> google.protobuf.FieldMask + 33, // 5: google.cloud.datacatalog.v1beta1.GetEntryGroupRequest.read_mask:type_name -> google.protobuf.FieldMask + 15, // 6: google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse.entry_groups:type_name -> google.cloud.datacatalog.v1beta1.EntryGroup + 14, // 7: google.cloud.datacatalog.v1beta1.CreateEntryRequest.entry:type_name -> google.cloud.datacatalog.v1beta1.Entry + 14, // 8: google.cloud.datacatalog.v1beta1.UpdateEntryRequest.entry:type_name -> google.cloud.datacatalog.v1beta1.Entry + 33, // 9: google.cloud.datacatalog.v1beta1.UpdateEntryRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 10: google.cloud.datacatalog.v1beta1.Entry.type:type_name -> google.cloud.datacatalog.v1beta1.EntryType + 34, // 11: google.cloud.datacatalog.v1beta1.Entry.integrated_system:type_name -> google.cloud.datacatalog.v1beta1.IntegratedSystem + 35, // 12: google.cloud.datacatalog.v1beta1.Entry.gcs_fileset_spec:type_name -> google.cloud.datacatalog.v1beta1.GcsFilesetSpec + 36, // 13: google.cloud.datacatalog.v1beta1.Entry.bigquery_table_spec:type_name -> google.cloud.datacatalog.v1beta1.BigQueryTableSpec + 37, // 14: google.cloud.datacatalog.v1beta1.Entry.bigquery_date_sharded_spec:type_name -> google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec + 38, // 15: google.cloud.datacatalog.v1beta1.Entry.schema:type_name -> google.cloud.datacatalog.v1beta1.Schema + 39, // 16: google.cloud.datacatalog.v1beta1.Entry.source_system_timestamps:type_name -> google.cloud.datacatalog.v1beta1.SystemTimestamps + 39, // 17: google.cloud.datacatalog.v1beta1.EntryGroup.data_catalog_timestamps:type_name -> google.cloud.datacatalog.v1beta1.SystemTimestamps + 40, // 18: google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest.tag_template:type_name -> google.cloud.datacatalog.v1beta1.TagTemplate + 40, // 19: google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.tag_template:type_name -> google.cloud.datacatalog.v1beta1.TagTemplate + 33, // 20: google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest.update_mask:type_name -> google.protobuf.FieldMask + 41, // 21: google.cloud.datacatalog.v1beta1.CreateTagRequest.tag:type_name -> google.cloud.datacatalog.v1beta1.Tag + 41, // 22: google.cloud.datacatalog.v1beta1.UpdateTagRequest.tag:type_name -> google.cloud.datacatalog.v1beta1.Tag + 33, // 23: google.cloud.datacatalog.v1beta1.UpdateTagRequest.update_mask:type_name -> google.protobuf.FieldMask + 42, // 24: google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest.tag_template_field:type_name -> google.cloud.datacatalog.v1beta1.TagTemplateField + 42, // 25: google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.tag_template_field:type_name -> google.cloud.datacatalog.v1beta1.TagTemplateField + 33, // 26: google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest.update_mask:type_name -> google.protobuf.FieldMask + 41, // 27: google.cloud.datacatalog.v1beta1.ListTagsResponse.tags:type_name -> google.cloud.datacatalog.v1beta1.Tag + 33, // 28: google.cloud.datacatalog.v1beta1.ListEntriesRequest.read_mask:type_name -> google.protobuf.FieldMask + 14, // 29: google.cloud.datacatalog.v1beta1.ListEntriesResponse.entries:type_name -> google.cloud.datacatalog.v1beta1.Entry + 1, // 30: google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog:input_type -> google.cloud.datacatalog.v1beta1.SearchCatalogRequest + 3, // 31: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup:input_type -> google.cloud.datacatalog.v1beta1.CreateEntryGroupRequest + 4, // 32: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup:input_type -> google.cloud.datacatalog.v1beta1.UpdateEntryGroupRequest + 5, // 33: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup:input_type -> google.cloud.datacatalog.v1beta1.GetEntryGroupRequest + 6, // 34: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup:input_type -> google.cloud.datacatalog.v1beta1.DeleteEntryGroupRequest + 7, // 35: google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups:input_type -> google.cloud.datacatalog.v1beta1.ListEntryGroupsRequest + 9, // 36: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry:input_type -> google.cloud.datacatalog.v1beta1.CreateEntryRequest + 10, // 37: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry:input_type -> google.cloud.datacatalog.v1beta1.UpdateEntryRequest + 11, // 38: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry:input_type -> google.cloud.datacatalog.v1beta1.DeleteEntryRequest + 12, // 39: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry:input_type -> google.cloud.datacatalog.v1beta1.GetEntryRequest + 13, // 40: google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry:input_type -> google.cloud.datacatalog.v1beta1.LookupEntryRequest + 29, // 41: google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries:input_type -> google.cloud.datacatalog.v1beta1.ListEntriesRequest + 16, // 42: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate:input_type -> google.cloud.datacatalog.v1beta1.CreateTagTemplateRequest + 17, // 43: google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate:input_type -> google.cloud.datacatalog.v1beta1.GetTagTemplateRequest + 18, // 44: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate:input_type -> google.cloud.datacatalog.v1beta1.UpdateTagTemplateRequest + 19, // 45: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate:input_type -> google.cloud.datacatalog.v1beta1.DeleteTagTemplateRequest + 23, // 46: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField:input_type -> google.cloud.datacatalog.v1beta1.CreateTagTemplateFieldRequest + 24, // 47: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField:input_type -> google.cloud.datacatalog.v1beta1.UpdateTagTemplateFieldRequest + 25, // 48: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField:input_type -> google.cloud.datacatalog.v1beta1.RenameTagTemplateFieldRequest + 26, // 49: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField:input_type -> google.cloud.datacatalog.v1beta1.DeleteTagTemplateFieldRequest + 20, // 50: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag:input_type -> google.cloud.datacatalog.v1beta1.CreateTagRequest + 21, // 51: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag:input_type -> google.cloud.datacatalog.v1beta1.UpdateTagRequest + 22, // 52: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag:input_type -> google.cloud.datacatalog.v1beta1.DeleteTagRequest + 27, // 53: google.cloud.datacatalog.v1beta1.DataCatalog.ListTags:input_type -> google.cloud.datacatalog.v1beta1.ListTagsRequest + 43, // 54: google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest + 44, // 55: google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest + 45, // 56: google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest + 2, // 57: google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog:output_type -> google.cloud.datacatalog.v1beta1.SearchCatalogResponse + 15, // 58: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup:output_type -> google.cloud.datacatalog.v1beta1.EntryGroup + 15, // 59: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup:output_type -> google.cloud.datacatalog.v1beta1.EntryGroup + 15, // 60: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup:output_type -> google.cloud.datacatalog.v1beta1.EntryGroup + 46, // 61: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup:output_type -> google.protobuf.Empty + 8, // 62: google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups:output_type -> google.cloud.datacatalog.v1beta1.ListEntryGroupsResponse + 14, // 63: google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry:output_type -> google.cloud.datacatalog.v1beta1.Entry + 14, // 64: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry:output_type -> google.cloud.datacatalog.v1beta1.Entry + 46, // 65: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry:output_type -> google.protobuf.Empty + 14, // 66: google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry:output_type -> google.cloud.datacatalog.v1beta1.Entry + 14, // 67: google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry:output_type -> google.cloud.datacatalog.v1beta1.Entry + 30, // 68: google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries:output_type -> google.cloud.datacatalog.v1beta1.ListEntriesResponse + 40, // 69: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate:output_type -> google.cloud.datacatalog.v1beta1.TagTemplate + 40, // 70: google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate:output_type -> google.cloud.datacatalog.v1beta1.TagTemplate + 40, // 71: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate:output_type -> google.cloud.datacatalog.v1beta1.TagTemplate + 46, // 72: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate:output_type -> google.protobuf.Empty + 42, // 73: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField:output_type -> google.cloud.datacatalog.v1beta1.TagTemplateField + 42, // 74: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField:output_type -> google.cloud.datacatalog.v1beta1.TagTemplateField + 42, // 75: google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField:output_type -> google.cloud.datacatalog.v1beta1.TagTemplateField + 46, // 76: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField:output_type -> google.protobuf.Empty + 41, // 77: google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag:output_type -> google.cloud.datacatalog.v1beta1.Tag + 41, // 78: google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag:output_type -> google.cloud.datacatalog.v1beta1.Tag + 46, // 79: google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag:output_type -> google.protobuf.Empty + 28, // 80: google.cloud.datacatalog.v1beta1.DataCatalog.ListTags:output_type -> google.cloud.datacatalog.v1beta1.ListTagsResponse + 47, // 81: google.cloud.datacatalog.v1beta1.DataCatalog.SetIamPolicy:output_type -> google.iam.v1.Policy + 47, // 82: google.cloud.datacatalog.v1beta1.DataCatalog.GetIamPolicy:output_type -> google.iam.v1.Policy + 48, // 83: google.cloud.datacatalog.v1beta1.DataCatalog.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse + 57, // [57:84] is the sub-list for method output_type + 30, // [30:57] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_datacatalog_proto_init() } +func file_google_cloud_datacatalog_v1beta1_datacatalog_proto_init() { + if File_google_cloud_datacatalog_v1beta1_datacatalog_proto != nil { + return + } + file_google_cloud_datacatalog_v1beta1_common_proto_init() + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_init() + file_google_cloud_datacatalog_v1beta1_schema_proto_init() + file_google_cloud_datacatalog_v1beta1_search_proto_init() + file_google_cloud_datacatalog_v1beta1_table_spec_proto_init() + file_google_cloud_datacatalog_v1beta1_tags_proto_init() + file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEntryGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEntryGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEntryGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteEntryGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntryGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntryGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEntryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEntryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteEntryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEntryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupEntryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Entry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntryGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTagTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTagTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTagTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTagTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTagTemplateFieldRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTagTemplateFieldRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenameTagTemplateFieldRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTagTemplateFieldRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTagsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTagsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchCatalogRequest_Scope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*LookupEntryRequest_LinkedResource)(nil), + (*LookupEntryRequest_SqlResource)(nil), + } + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*Entry_Type)(nil), + (*Entry_UserSpecifiedType)(nil), + (*Entry_IntegratedSystem)(nil), + (*Entry_UserSpecifiedSystem)(nil), + (*Entry_GcsFilesetSpec)(nil), + (*Entry_BigqueryTableSpec)(nil), + (*Entry_BigqueryDateShardedSpec)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDesc, + NumEnums: 1, + NumMessages: 31, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_datacatalog_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_datacatalog_proto_depIdxs, + EnumInfos: file_google_cloud_datacatalog_v1beta1_datacatalog_proto_enumTypes, + MessageInfos: file_google_cloud_datacatalog_v1beta1_datacatalog_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_datacatalog_proto = out.File + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_datacatalog_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DataCatalogClient is the client API for DataCatalog service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DataCatalogClient interface { + // Searches Data Catalog for multiple resources like entries, tags that + // match a query. + // + // This is a custom method + // (https://cloud.google.com/apis/design/custom_methods) and does not return + // the complete resource, only the resource identifier and high level + // fields. Clients can subsequentally call `Get` methods. + // + // Note that Data Catalog search queries do not guarantee full recall. Query + // results that match your query may not be returned, even in subsequent + // result pages. Also note that results returned (and not returned) can vary + // across repeated search queries. + // + // See [Data Catalog Search + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. + SearchCatalog(ctx context.Context, in *SearchCatalogRequest, opts ...grpc.CallOption) (*SearchCatalogResponse, error) + // A maximum of 10,000 entry groups may be created per organization across all + // locations. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + CreateEntryGroup(ctx context.Context, in *CreateEntryGroupRequest, opts ...grpc.CallOption) (*EntryGroup, error) + // Updates an EntryGroup. The user should enable the Data Catalog API in the + // project identified by the `entry_group.name` parameter (see [Data Catalog + // Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateEntryGroup(ctx context.Context, in *UpdateEntryGroupRequest, opts ...grpc.CallOption) (*EntryGroup, error) + // Gets an EntryGroup. + GetEntryGroup(ctx context.Context, in *GetEntryGroupRequest, opts ...grpc.CallOption) (*EntryGroup, error) + // Deletes an EntryGroup. Only entry groups that do not contain entries can be + // deleted. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteEntryGroup(ctx context.Context, in *DeleteEntryGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists entry groups. + ListEntryGroups(ctx context.Context, in *ListEntryGroupsRequest, opts ...grpc.CallOption) (*ListEntryGroupsResponse, error) + // Creates an entry. Only entries of 'FILESET' type or user-specified type can + // be created. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + // + // A maximum of 100,000 entries may be created per entry group. + CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*Entry, error) + // Updates an existing entry. + // Users should enable the Data Catalog API in the project identified by + // the `entry.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*Entry, error) + // Deletes an existing entry. Only entries created through + // [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] + // method can be deleted. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Gets an entry. + GetEntry(ctx context.Context, in *GetEntryRequest, opts ...grpc.CallOption) (*Entry, error) + // Get an entry by target resource name. This method allows clients to use + // the resource name from the source Google Cloud Platform service to get the + // Data Catalog Entry. + LookupEntry(ctx context.Context, in *LookupEntryRequest, opts ...grpc.CallOption) (*Entry, error) + // Lists entries. + ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (*ListEntriesResponse, error) + // Creates a tag template. The user should enable the Data Catalog API in + // the project identified by the `parent` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + CreateTagTemplate(ctx context.Context, in *CreateTagTemplateRequest, opts ...grpc.CallOption) (*TagTemplate, error) + // Gets a tag template. + GetTagTemplate(ctx context.Context, in *GetTagTemplateRequest, opts ...grpc.CallOption) (*TagTemplate, error) + // Updates a tag template. This method cannot be used to update the fields of + // a template. The tag template fields are represented as separate resources + // and should be updated using their own create/update/delete methods. + // Users should enable the Data Catalog API in the project identified by + // the `tag_template.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateTagTemplate(ctx context.Context, in *UpdateTagTemplateRequest, opts ...grpc.CallOption) (*TagTemplate, error) + // Deletes a tag template and all tags using the template. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteTagTemplate(ctx context.Context, in *DeleteTagTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Creates a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `parent` parameter (see + // [Data Catalog Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + CreateTagTemplateField(ctx context.Context, in *CreateTagTemplateFieldRequest, opts ...grpc.CallOption) (*TagTemplateField, error) + // Updates a field in a tag template. This method cannot be used to update the + // field type. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateTagTemplateField(ctx context.Context, in *UpdateTagTemplateFieldRequest, opts ...grpc.CallOption) (*TagTemplateField, error) + // Renames a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `name` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + RenameTagTemplateField(ctx context.Context, in *RenameTagTemplateFieldRequest, opts ...grpc.CallOption) (*TagTemplateField, error) + // Deletes a field in a tag template and all uses of that field. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteTagTemplateField(ctx context.Context, in *DeleteTagTemplateFieldRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + // Note: The project identified by the `parent` parameter for the + // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) + // and the + // [tag + // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) + // used to create the tag must be from the same organization. + CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*Tag, error) + // Updates an existing tag. + UpdateTag(ctx context.Context, in *UpdateTagRequest, opts ...grpc.CallOption) (*Tag, error) + // Deletes a tag. + DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) + // Sets the access control policy for a resource. Replaces any existing + // policy. + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + // templates. + // - `datacatalog.entries.setIamPolicy` to set policies on entries. + // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Gets the access control policy for a resource. A `NOT_FOUND` error + // is returned if the resource does not exist. An empty policy is returned + // if the resource exists but does not have a policy set on it. + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + // templates. + // - `datacatalog.entries.getIamPolicy` to get policies on entries. + // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Returns the caller's permissions on a resource. + // If the resource does not exist, an empty set of permissions is returned + // (We don't return a `NOT_FOUND` error). + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // A caller is not required to have Google IAM permission to make this + // request. + TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) +} + +type dataCatalogClient struct { + cc grpc.ClientConnInterface +} + +func NewDataCatalogClient(cc grpc.ClientConnInterface) DataCatalogClient { + return &dataCatalogClient{cc} +} + +func (c *dataCatalogClient) SearchCatalog(ctx context.Context, in *SearchCatalogRequest, opts ...grpc.CallOption) (*SearchCatalogResponse, error) { + out := new(SearchCatalogResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/SearchCatalog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) CreateEntryGroup(ctx context.Context, in *CreateEntryGroupRequest, opts ...grpc.CallOption) (*EntryGroup, error) { + out := new(EntryGroup) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateEntryGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) UpdateEntryGroup(ctx context.Context, in *UpdateEntryGroupRequest, opts ...grpc.CallOption) (*EntryGroup, error) { + out := new(EntryGroup) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateEntryGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) GetEntryGroup(ctx context.Context, in *GetEntryGroupRequest, opts ...grpc.CallOption) (*EntryGroup, error) { + out := new(EntryGroup) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/GetEntryGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) DeleteEntryGroup(ctx context.Context, in *DeleteEntryGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteEntryGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) ListEntryGroups(ctx context.Context, in *ListEntryGroupsRequest, opts ...grpc.CallOption) (*ListEntryGroupsResponse, error) { + out := new(ListEntryGroupsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/ListEntryGroups", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*Entry, error) { + out := new(Entry) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateEntry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*Entry, error) { + out := new(Entry) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateEntry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteEntry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) GetEntry(ctx context.Context, in *GetEntryRequest, opts ...grpc.CallOption) (*Entry, error) { + out := new(Entry) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/GetEntry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) LookupEntry(ctx context.Context, in *LookupEntryRequest, opts ...grpc.CallOption) (*Entry, error) { + out := new(Entry) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/LookupEntry", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (*ListEntriesResponse, error) { + out := new(ListEntriesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/ListEntries", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) CreateTagTemplate(ctx context.Context, in *CreateTagTemplateRequest, opts ...grpc.CallOption) (*TagTemplate, error) { + out := new(TagTemplate) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateTagTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) GetTagTemplate(ctx context.Context, in *GetTagTemplateRequest, opts ...grpc.CallOption) (*TagTemplate, error) { + out := new(TagTemplate) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/GetTagTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) UpdateTagTemplate(ctx context.Context, in *UpdateTagTemplateRequest, opts ...grpc.CallOption) (*TagTemplate, error) { + out := new(TagTemplate) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTagTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) DeleteTagTemplate(ctx context.Context, in *DeleteTagTemplateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTagTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) CreateTagTemplateField(ctx context.Context, in *CreateTagTemplateFieldRequest, opts ...grpc.CallOption) (*TagTemplateField, error) { + out := new(TagTemplateField) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateTagTemplateField", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) UpdateTagTemplateField(ctx context.Context, in *UpdateTagTemplateFieldRequest, opts ...grpc.CallOption) (*TagTemplateField, error) { + out := new(TagTemplateField) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTagTemplateField", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) RenameTagTemplateField(ctx context.Context, in *RenameTagTemplateFieldRequest, opts ...grpc.CallOption) (*TagTemplateField, error) { + out := new(TagTemplateField) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/RenameTagTemplateField", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) DeleteTagTemplateField(ctx context.Context, in *DeleteTagTemplateFieldRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTagTemplateField", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) CreateTag(ctx context.Context, in *CreateTagRequest, opts ...grpc.CallOption) (*Tag, error) { + out := new(Tag) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) UpdateTag(ctx context.Context, in *UpdateTagRequest, opts ...grpc.CallOption) (*Tag, error) { + out := new(Tag) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) { + out := new(ListTagsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/ListTags", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/SetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/GetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataCatalogClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) { + out := new(v1.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.DataCatalog/TestIamPermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataCatalogServer is the server API for DataCatalog service. +type DataCatalogServer interface { + // Searches Data Catalog for multiple resources like entries, tags that + // match a query. + // + // This is a custom method + // (https://cloud.google.com/apis/design/custom_methods) and does not return + // the complete resource, only the resource identifier and high level + // fields. Clients can subsequentally call `Get` methods. + // + // Note that Data Catalog search queries do not guarantee full recall. Query + // results that match your query may not be returned, even in subsequent + // result pages. Also note that results returned (and not returned) can vary + // across repeated search queries. + // + // See [Data Catalog Search + // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) + // for more information. + SearchCatalog(context.Context, *SearchCatalogRequest) (*SearchCatalogResponse, error) + // A maximum of 10,000 entry groups may be created per organization across all + // locations. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + CreateEntryGroup(context.Context, *CreateEntryGroupRequest) (*EntryGroup, error) + // Updates an EntryGroup. The user should enable the Data Catalog API in the + // project identified by the `entry_group.name` parameter (see [Data Catalog + // Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateEntryGroup(context.Context, *UpdateEntryGroupRequest) (*EntryGroup, error) + // Gets an EntryGroup. + GetEntryGroup(context.Context, *GetEntryGroupRequest) (*EntryGroup, error) + // Deletes an EntryGroup. Only entry groups that do not contain entries can be + // deleted. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteEntryGroup(context.Context, *DeleteEntryGroupRequest) (*emptypb.Empty, error) + // Lists entry groups. + ListEntryGroups(context.Context, *ListEntryGroupsRequest) (*ListEntryGroupsResponse, error) + // Creates an entry. Only entries of 'FILESET' type or user-specified type can + // be created. + // + // Users should enable the Data Catalog API in the project identified by + // the `parent` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + // + // A maximum of 100,000 entries may be created per entry group. + CreateEntry(context.Context, *CreateEntryRequest) (*Entry, error) + // Updates an existing entry. + // Users should enable the Data Catalog API in the project identified by + // the `entry.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateEntry(context.Context, *UpdateEntryRequest) (*Entry, error) + // Deletes an existing entry. Only entries created through + // [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] + // method can be deleted. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteEntry(context.Context, *DeleteEntryRequest) (*emptypb.Empty, error) + // Gets an entry. + GetEntry(context.Context, *GetEntryRequest) (*Entry, error) + // Get an entry by target resource name. This method allows clients to use + // the resource name from the source Google Cloud Platform service to get the + // Data Catalog Entry. + LookupEntry(context.Context, *LookupEntryRequest) (*Entry, error) + // Lists entries. + ListEntries(context.Context, *ListEntriesRequest) (*ListEntriesResponse, error) + // Creates a tag template. The user should enable the Data Catalog API in + // the project identified by the `parent` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + CreateTagTemplate(context.Context, *CreateTagTemplateRequest) (*TagTemplate, error) + // Gets a tag template. + GetTagTemplate(context.Context, *GetTagTemplateRequest) (*TagTemplate, error) + // Updates a tag template. This method cannot be used to update the fields of + // a template. The tag template fields are represented as separate resources + // and should be updated using their own create/update/delete methods. + // Users should enable the Data Catalog API in the project identified by + // the `tag_template.name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateTagTemplate(context.Context, *UpdateTagTemplateRequest) (*TagTemplate, error) + // Deletes a tag template and all tags using the template. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteTagTemplate(context.Context, *DeleteTagTemplateRequest) (*emptypb.Empty, error) + // Creates a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `parent` parameter (see + // [Data Catalog Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + CreateTagTemplateField(context.Context, *CreateTagTemplateFieldRequest) (*TagTemplateField, error) + // Updates a field in a tag template. This method cannot be used to update the + // field type. Users should enable the Data Catalog API in the project + // identified by the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + UpdateTagTemplateField(context.Context, *UpdateTagTemplateFieldRequest) (*TagTemplateField, error) + // Renames a field in a tag template. The user should enable the Data Catalog + // API in the project identified by the `name` parameter (see [Data Catalog + // Resource + // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) + // for more information). + RenameTagTemplateField(context.Context, *RenameTagTemplateFieldRequest) (*TagTemplateField, error) + // Deletes a field in a tag template and all uses of that field. + // Users should enable the Data Catalog API in the project identified by + // the `name` parameter (see [Data Catalog Resource Project] + // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for + // more information). + DeleteTagTemplateField(context.Context, *DeleteTagTemplateFieldRequest) (*emptypb.Empty, error) + // Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + // Note: The project identified by the `parent` parameter for the + // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) + // and the + // [tag + // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) + // used to create the tag must be from the same organization. + CreateTag(context.Context, *CreateTagRequest) (*Tag, error) + // Updates an existing tag. + UpdateTag(context.Context, *UpdateTagRequest) (*Tag, error) + // Deletes a tag. + DeleteTag(context.Context, *DeleteTagRequest) (*emptypb.Empty, error) + // Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. + ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) + // Sets the access control policy for a resource. Replaces any existing + // policy. + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag + // templates. + // - `datacatalog.entries.setIamPolicy` to set policies on entries. + // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. + SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) + // Gets the access control policy for a resource. A `NOT_FOUND` error + // is returned if the resource does not exist. An empty policy is returned + // if the resource exists but does not have a policy set on it. + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // Callers must have following Google IAM permission + // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag + // templates. + // - `datacatalog.entries.getIamPolicy` to get policies on entries. + // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. + GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) + // Returns the caller's permissions on a resource. + // If the resource does not exist, an empty set of permissions is returned + // (We don't return a `NOT_FOUND` error). + // + // Supported resources are: + // - Tag templates. + // - Entries. + // - Entry groups. + // + // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub + // and any external Google Cloud Platform resources synced to Data Catalog. + // + // A caller is not required to have Google IAM permission to make this + // request. + TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) +} + +// UnimplementedDataCatalogServer can be embedded to have forward compatible implementations. +type UnimplementedDataCatalogServer struct { +} + +func (*UnimplementedDataCatalogServer) SearchCatalog(context.Context, *SearchCatalogRequest) (*SearchCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchCatalog not implemented") +} +func (*UnimplementedDataCatalogServer) CreateEntryGroup(context.Context, *CreateEntryGroupRequest) (*EntryGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEntryGroup not implemented") +} +func (*UnimplementedDataCatalogServer) UpdateEntryGroup(context.Context, *UpdateEntryGroupRequest) (*EntryGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEntryGroup not implemented") +} +func (*UnimplementedDataCatalogServer) GetEntryGroup(context.Context, *GetEntryGroupRequest) (*EntryGroup, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEntryGroup not implemented") +} +func (*UnimplementedDataCatalogServer) DeleteEntryGroup(context.Context, *DeleteEntryGroupRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteEntryGroup not implemented") +} +func (*UnimplementedDataCatalogServer) ListEntryGroups(context.Context, *ListEntryGroupsRequest) (*ListEntryGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEntryGroups not implemented") +} +func (*UnimplementedDataCatalogServer) CreateEntry(context.Context, *CreateEntryRequest) (*Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEntry not implemented") +} +func (*UnimplementedDataCatalogServer) UpdateEntry(context.Context, *UpdateEntryRequest) (*Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEntry not implemented") +} +func (*UnimplementedDataCatalogServer) DeleteEntry(context.Context, *DeleteEntryRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteEntry not implemented") +} +func (*UnimplementedDataCatalogServer) GetEntry(context.Context, *GetEntryRequest) (*Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEntry not implemented") +} +func (*UnimplementedDataCatalogServer) LookupEntry(context.Context, *LookupEntryRequest) (*Entry, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupEntry not implemented") +} +func (*UnimplementedDataCatalogServer) ListEntries(context.Context, *ListEntriesRequest) (*ListEntriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEntries not implemented") +} +func (*UnimplementedDataCatalogServer) CreateTagTemplate(context.Context, *CreateTagTemplateRequest) (*TagTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTagTemplate not implemented") +} +func (*UnimplementedDataCatalogServer) GetTagTemplate(context.Context, *GetTagTemplateRequest) (*TagTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTagTemplate not implemented") +} +func (*UnimplementedDataCatalogServer) UpdateTagTemplate(context.Context, *UpdateTagTemplateRequest) (*TagTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTagTemplate not implemented") +} +func (*UnimplementedDataCatalogServer) DeleteTagTemplate(context.Context, *DeleteTagTemplateRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTagTemplate not implemented") +} +func (*UnimplementedDataCatalogServer) CreateTagTemplateField(context.Context, *CreateTagTemplateFieldRequest) (*TagTemplateField, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTagTemplateField not implemented") +} +func (*UnimplementedDataCatalogServer) UpdateTagTemplateField(context.Context, *UpdateTagTemplateFieldRequest) (*TagTemplateField, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTagTemplateField not implemented") +} +func (*UnimplementedDataCatalogServer) RenameTagTemplateField(context.Context, *RenameTagTemplateFieldRequest) (*TagTemplateField, error) { + return nil, status.Errorf(codes.Unimplemented, "method RenameTagTemplateField not implemented") +} +func (*UnimplementedDataCatalogServer) DeleteTagTemplateField(context.Context, *DeleteTagTemplateFieldRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTagTemplateField not implemented") +} +func (*UnimplementedDataCatalogServer) CreateTag(context.Context, *CreateTagRequest) (*Tag, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTag not implemented") +} +func (*UnimplementedDataCatalogServer) UpdateTag(context.Context, *UpdateTagRequest) (*Tag, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTag not implemented") +} +func (*UnimplementedDataCatalogServer) DeleteTag(context.Context, *DeleteTagRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTag not implemented") +} +func (*UnimplementedDataCatalogServer) ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTags not implemented") +} +func (*UnimplementedDataCatalogServer) SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (*UnimplementedDataCatalogServer) GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (*UnimplementedDataCatalogServer) TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} + +func RegisterDataCatalogServer(s *grpc.Server, srv DataCatalogServer) { + s.RegisterService(&_DataCatalog_serviceDesc, srv) +} + +func _DataCatalog_SearchCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).SearchCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/SearchCatalog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).SearchCatalog(ctx, req.(*SearchCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_CreateEntryGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEntryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).CreateEntryGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateEntryGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).CreateEntryGroup(ctx, req.(*CreateEntryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_UpdateEntryGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEntryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).UpdateEntryGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateEntryGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).UpdateEntryGroup(ctx, req.(*UpdateEntryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_GetEntryGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEntryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).GetEntryGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/GetEntryGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).GetEntryGroup(ctx, req.(*GetEntryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_DeleteEntryGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEntryGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).DeleteEntryGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteEntryGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).DeleteEntryGroup(ctx, req.(*DeleteEntryGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_ListEntryGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEntryGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).ListEntryGroups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/ListEntryGroups", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).ListEntryGroups(ctx, req.(*ListEntryGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_CreateEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).CreateEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).CreateEntry(ctx, req.(*CreateEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_UpdateEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).UpdateEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).UpdateEntry(ctx, req.(*UpdateEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_DeleteEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).DeleteEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).DeleteEntry(ctx, req.(*DeleteEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_GetEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).GetEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/GetEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).GetEntry(ctx, req.(*GetEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_LookupEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).LookupEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/LookupEntry", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).LookupEntry(ctx, req.(*LookupEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_ListEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEntriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).ListEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/ListEntries", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).ListEntries(ctx, req.(*ListEntriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_CreateTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTagTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).CreateTagTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateTagTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).CreateTagTemplate(ctx, req.(*CreateTagTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_GetTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTagTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).GetTagTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/GetTagTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).GetTagTemplate(ctx, req.(*GetTagTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_UpdateTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTagTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).UpdateTagTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTagTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).UpdateTagTemplate(ctx, req.(*UpdateTagTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_DeleteTagTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTagTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).DeleteTagTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTagTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).DeleteTagTemplate(ctx, req.(*DeleteTagTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_CreateTagTemplateField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTagTemplateFieldRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).CreateTagTemplateField(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateTagTemplateField", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).CreateTagTemplateField(ctx, req.(*CreateTagTemplateFieldRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_UpdateTagTemplateField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTagTemplateFieldRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).UpdateTagTemplateField(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTagTemplateField", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).UpdateTagTemplateField(ctx, req.(*UpdateTagTemplateFieldRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_RenameTagTemplateField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RenameTagTemplateFieldRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).RenameTagTemplateField(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/RenameTagTemplateField", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).RenameTagTemplateField(ctx, req.(*RenameTagTemplateFieldRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_DeleteTagTemplateField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTagTemplateFieldRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).DeleteTagTemplateField(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTagTemplateField", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).DeleteTagTemplateField(ctx, req.(*DeleteTagTemplateFieldRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_CreateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).CreateTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/CreateTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).CreateTag(ctx, req.(*CreateTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_UpdateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).UpdateTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/UpdateTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).UpdateTag(ctx, req.(*UpdateTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_DeleteTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).DeleteTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/DeleteTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).DeleteTag(ctx, req.(*DeleteTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_ListTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTagsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).ListTags(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/ListTags", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).ListTags(ctx, req.(*ListTagsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/SetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/GetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataCatalog_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.DataCatalog/TestIamPermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _DataCatalog_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.datacatalog.v1beta1.DataCatalog", + HandlerType: (*DataCatalogServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SearchCatalog", + Handler: _DataCatalog_SearchCatalog_Handler, + }, + { + MethodName: "CreateEntryGroup", + Handler: _DataCatalog_CreateEntryGroup_Handler, + }, + { + MethodName: "UpdateEntryGroup", + Handler: _DataCatalog_UpdateEntryGroup_Handler, + }, + { + MethodName: "GetEntryGroup", + Handler: _DataCatalog_GetEntryGroup_Handler, + }, + { + MethodName: "DeleteEntryGroup", + Handler: _DataCatalog_DeleteEntryGroup_Handler, + }, + { + MethodName: "ListEntryGroups", + Handler: _DataCatalog_ListEntryGroups_Handler, + }, + { + MethodName: "CreateEntry", + Handler: _DataCatalog_CreateEntry_Handler, + }, + { + MethodName: "UpdateEntry", + Handler: _DataCatalog_UpdateEntry_Handler, + }, + { + MethodName: "DeleteEntry", + Handler: _DataCatalog_DeleteEntry_Handler, + }, + { + MethodName: "GetEntry", + Handler: _DataCatalog_GetEntry_Handler, + }, + { + MethodName: "LookupEntry", + Handler: _DataCatalog_LookupEntry_Handler, + }, + { + MethodName: "ListEntries", + Handler: _DataCatalog_ListEntries_Handler, + }, + { + MethodName: "CreateTagTemplate", + Handler: _DataCatalog_CreateTagTemplate_Handler, + }, + { + MethodName: "GetTagTemplate", + Handler: _DataCatalog_GetTagTemplate_Handler, + }, + { + MethodName: "UpdateTagTemplate", + Handler: _DataCatalog_UpdateTagTemplate_Handler, + }, + { + MethodName: "DeleteTagTemplate", + Handler: _DataCatalog_DeleteTagTemplate_Handler, + }, + { + MethodName: "CreateTagTemplateField", + Handler: _DataCatalog_CreateTagTemplateField_Handler, + }, + { + MethodName: "UpdateTagTemplateField", + Handler: _DataCatalog_UpdateTagTemplateField_Handler, + }, + { + MethodName: "RenameTagTemplateField", + Handler: _DataCatalog_RenameTagTemplateField_Handler, + }, + { + MethodName: "DeleteTagTemplateField", + Handler: _DataCatalog_DeleteTagTemplateField_Handler, + }, + { + MethodName: "CreateTag", + Handler: _DataCatalog_CreateTag_Handler, + }, + { + MethodName: "UpdateTag", + Handler: _DataCatalog_UpdateTag_Handler, + }, + { + MethodName: "DeleteTag", + Handler: _DataCatalog_DeleteTag_Handler, + }, + { + MethodName: "ListTags", + Handler: _DataCatalog_ListTags_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _DataCatalog_SetIamPolicy_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _DataCatalog_GetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _DataCatalog_TestIamPermissions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/datacatalog/v1beta1/datacatalog.proto", +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go b/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go new file mode 100644 index 000000000000..f4dda6c1d21c --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/gcs_fileset_spec.pb.go @@ -0,0 +1,323 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Describes a Cloud Storage fileset entry. +type GcsFilesetSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Patterns to identify a set of files in Google Cloud Storage. + // See [Cloud Storage + // documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames) + // for more information. Note that bucket wildcards are currently not + // supported. + // + // Examples of valid file_patterns: + // + // - `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` + // directory. + // - `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` + // spanning all subdirectories. + // - `gs://bucket_name/file*`: matches files prefixed by `file` in + // `bucket_name` + // - `gs://bucket_name/??.txt`: matches files with two characters followed by + // `.txt` in `bucket_name` + // - `gs://bucket_name/[aeiou].txt`: matches files that contain a single + // vowel character followed by `.txt` in + // `bucket_name` + // - `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... + // or `m` followed by `.txt` in `bucket_name` + // - `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match + // `a/*/b` pattern, such as `a/c/b`, `a/d/b` + // - `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` + // + // You can combine wildcards to provide more powerful matches, for example: + // + // - `gs://bucket_name/[a-m]??.j*g` + FilePatterns []string `protobuf:"bytes,1,rep,name=file_patterns,json=filePatterns,proto3" json:"file_patterns,omitempty"` + // Output only. Sample files contained in this fileset, not all files contained in this + // fileset are represented here. + SampleGcsFileSpecs []*GcsFileSpec `protobuf:"bytes,2,rep,name=sample_gcs_file_specs,json=sampleGcsFileSpecs,proto3" json:"sample_gcs_file_specs,omitempty"` +} + +func (x *GcsFilesetSpec) Reset() { + *x = GcsFilesetSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsFilesetSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsFilesetSpec) ProtoMessage() {} + +func (x *GcsFilesetSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsFilesetSpec.ProtoReflect.Descriptor instead. +func (*GcsFilesetSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescGZIP(), []int{0} +} + +func (x *GcsFilesetSpec) GetFilePatterns() []string { + if x != nil { + return x.FilePatterns + } + return nil +} + +func (x *GcsFilesetSpec) GetSampleGcsFileSpecs() []*GcsFileSpec { + if x != nil { + return x.SampleGcsFileSpecs + } + return nil +} + +// Specifications of a single file in Cloud Storage. +type GcsFileSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. + FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + // Output only. Timestamps about the Cloud Storage file. + GcsTimestamps *SystemTimestamps `protobuf:"bytes,2,opt,name=gcs_timestamps,json=gcsTimestamps,proto3" json:"gcs_timestamps,omitempty"` + // Output only. The size of the file, in bytes. + SizeBytes int64 `protobuf:"varint,4,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` +} + +func (x *GcsFileSpec) Reset() { + *x = GcsFileSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsFileSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsFileSpec) ProtoMessage() {} + +func (x *GcsFileSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsFileSpec.ProtoReflect.Descriptor instead. +func (*GcsFileSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescGZIP(), []int{1} +} + +func (x *GcsFileSpec) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (x *GcsFileSpec) GetGcsTimestamps() *SystemTimestamps { + if x != nil { + return x.GcsTimestamps + } + return nil +} + +func (x *GcsFileSpec) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +var File_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x67, 0x63, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa1, 0x01, 0x0a, 0x0e, 0x47, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x28, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, + 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x65, 0x0a, 0x15, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x67, 0x63, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x12, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x47, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x0b, 0x47, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x5e, 0x0a, 0x0e, 0x67, 0x63, 0x73, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x67, 0x63, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_goTypes = []interface{}{ + (*GcsFilesetSpec)(nil), // 0: google.cloud.datacatalog.v1beta1.GcsFilesetSpec + (*GcsFileSpec)(nil), // 1: google.cloud.datacatalog.v1beta1.GcsFileSpec + (*SystemTimestamps)(nil), // 2: google.cloud.datacatalog.v1beta1.SystemTimestamps +} +var file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_depIdxs = []int32{ + 1, // 0: google.cloud.datacatalog.v1beta1.GcsFilesetSpec.sample_gcs_file_specs:type_name -> google.cloud.datacatalog.v1beta1.GcsFileSpec + 2, // 1: google.cloud.datacatalog.v1beta1.GcsFileSpec.gcs_timestamps:type_name -> google.cloud.datacatalog.v1beta1.SystemTimestamps + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_init() } +func file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_init() { + if File_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto != nil { + return + } + file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsFilesetSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsFileSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_depIdxs, + MessageInfos: file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto = out.File + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_gcs_fileset_spec_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go b/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go new file mode 100644 index 000000000000..0211420df90e --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/policytagmanager.pb.go @@ -0,0 +1,2187 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/policytagmanager.proto + +package datacatalogpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + v1 "google.golang.org/genproto/googleapis/iam/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines policy types where policy tag can be used for. +type Taxonomy_PolicyType int32 + +const ( + // Unspecified policy type. + Taxonomy_POLICY_TYPE_UNSPECIFIED Taxonomy_PolicyType = 0 + // Fine grained access control policy, which enables access control on + // tagged resources. + Taxonomy_FINE_GRAINED_ACCESS_CONTROL Taxonomy_PolicyType = 1 +) + +// Enum value maps for Taxonomy_PolicyType. +var ( + Taxonomy_PolicyType_name = map[int32]string{ + 0: "POLICY_TYPE_UNSPECIFIED", + 1: "FINE_GRAINED_ACCESS_CONTROL", + } + Taxonomy_PolicyType_value = map[string]int32{ + "POLICY_TYPE_UNSPECIFIED": 0, + "FINE_GRAINED_ACCESS_CONTROL": 1, + } +) + +func (x Taxonomy_PolicyType) Enum() *Taxonomy_PolicyType { + p := new(Taxonomy_PolicyType) + *p = x + return p +} + +func (x Taxonomy_PolicyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Taxonomy_PolicyType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_enumTypes[0].Descriptor() +} + +func (Taxonomy_PolicyType) Type() protoreflect.EnumType { + return &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_enumTypes[0] +} + +func (x Taxonomy_PolicyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Taxonomy_PolicyType.Descriptor instead. +func (Taxonomy_PolicyType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{0, 0} +} + +// A taxonomy is a collection of policy tags that classify data along a common +// axis. For instance a data *sensitivity* taxonomy could contain policy tags +// denoting PII such as age, zipcode, and SSN. A data *origin* taxonomy could +// contain policy tags to distinguish user data, employee data, partner data, +// public data. +type Taxonomy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this taxonomy, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. User defined name of this taxonomy. It must: contain only unicode letters, + // numbers, underscores, dashes and spaces; not start or end with spaces; and + // be at most 200 bytes long when encoded in UTF-8. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. Description of this taxonomy. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Optional. A list of policy types that are activated for this taxonomy. If not set, + // defaults to an empty list. + ActivatedPolicyTypes []Taxonomy_PolicyType `protobuf:"varint,6,rep,packed,name=activated_policy_types,json=activatedPolicyTypes,proto3,enum=google.cloud.datacatalog.v1beta1.Taxonomy_PolicyType" json:"activated_policy_types,omitempty"` +} + +func (x *Taxonomy) Reset() { + *x = Taxonomy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Taxonomy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Taxonomy) ProtoMessage() {} + +func (x *Taxonomy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Taxonomy.ProtoReflect.Descriptor instead. +func (*Taxonomy) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{0} +} + +func (x *Taxonomy) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Taxonomy) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Taxonomy) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Taxonomy) GetActivatedPolicyTypes() []Taxonomy_PolicyType { + if x != nil { + return x.ActivatedPolicyTypes + } + return nil +} + +// Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined +// in a hierarchy. For example, consider the following hierarchy: +// Geolocation -> (LatLong, City, ZipCode). PolicyTag "Geolocation" +// contains three child policy tags: "LatLong", "City", and "ZipCode". +type PolicyTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of this policy tag, whose format is: + // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. User defined name of this policy tag. It must: be unique within the parent + // taxonomy; contain only unicode letters, numbers, underscores, dashes and + // spaces; not start or end with spaces; and be at most 200 bytes long when + // encoded in UTF-8. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Description of this policy tag. It must: contain only unicode characters, + // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes + // long when encoded in UTF-8. If not set, defaults to an empty description. + // If not set, defaults to an empty description. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Resource name of this policy tag's parent policy tag (e.g. for the + // "LatLong" policy tag in the example above, this field contains the + // resource name of the "Geolocation" policy tag). If empty, it means this + // policy tag is a top level policy tag (e.g. this field is empty for the + // "Geolocation" policy tag in the example above). If not set, defaults to an + // empty string. + ParentPolicyTag string `protobuf:"bytes,4,opt,name=parent_policy_tag,json=parentPolicyTag,proto3" json:"parent_policy_tag,omitempty"` + // Output only. Resource names of child policy tags of this policy tag. + ChildPolicyTags []string `protobuf:"bytes,5,rep,name=child_policy_tags,json=childPolicyTags,proto3" json:"child_policy_tags,omitempty"` +} + +func (x *PolicyTag) Reset() { + *x = PolicyTag{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PolicyTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolicyTag) ProtoMessage() {} + +func (x *PolicyTag) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PolicyTag.ProtoReflect.Descriptor instead. +func (*PolicyTag) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{1} +} + +func (x *PolicyTag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PolicyTag) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *PolicyTag) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PolicyTag) GetParentPolicyTag() string { + if x != nil { + return x.ParentPolicyTag + } + return "" +} + +func (x *PolicyTag) GetChildPolicyTags() []string { + if x != nil { + return x.ChildPolicyTags + } + return nil +} + +// Request message for +// [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. +type CreateTaxonomyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the project that the taxonomy will belong to. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The taxonomy to be created. + Taxonomy *Taxonomy `protobuf:"bytes,2,opt,name=taxonomy,proto3" json:"taxonomy,omitempty"` +} + +func (x *CreateTaxonomyRequest) Reset() { + *x = CreateTaxonomyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTaxonomyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTaxonomyRequest) ProtoMessage() {} + +func (x *CreateTaxonomyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTaxonomyRequest.ProtoReflect.Descriptor instead. +func (*CreateTaxonomyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateTaxonomyRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTaxonomyRequest) GetTaxonomy() *Taxonomy { + if x != nil { + return x.Taxonomy + } + return nil +} + +// Request message for +// [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. +type DeleteTaxonomyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the taxonomy to be deleted. All policy tags in + // this taxonomy will also be deleted. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteTaxonomyRequest) Reset() { + *x = DeleteTaxonomyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTaxonomyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTaxonomyRequest) ProtoMessage() {} + +func (x *DeleteTaxonomyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTaxonomyRequest.ProtoReflect.Descriptor instead. +func (*DeleteTaxonomyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteTaxonomyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. +type UpdateTaxonomyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The taxonomy to update. Only description, display_name, and activated + // policy types can be updated. + Taxonomy *Taxonomy `protobuf:"bytes,1,opt,name=taxonomy,proto3" json:"taxonomy,omitempty"` + // The update mask applies to the resource. For the `FieldMask` definition, + // see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateTaxonomyRequest) Reset() { + *x = UpdateTaxonomyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateTaxonomyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateTaxonomyRequest) ProtoMessage() {} + +func (x *UpdateTaxonomyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateTaxonomyRequest.ProtoReflect.Descriptor instead. +func (*UpdateTaxonomyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateTaxonomyRequest) GetTaxonomy() *Taxonomy { + if x != nil { + return x.Taxonomy + } + return nil +} + +func (x *UpdateTaxonomyRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. +type ListTaxonomiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the project to list the taxonomies of. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request, if any. If + // not set, defaults to an empty string. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTaxonomiesRequest) Reset() { + *x = ListTaxonomiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTaxonomiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTaxonomiesRequest) ProtoMessage() {} + +func (x *ListTaxonomiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTaxonomiesRequest.ProtoReflect.Descriptor instead. +func (*ListTaxonomiesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{5} +} + +func (x *ListTaxonomiesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTaxonomiesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTaxonomiesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. +type ListTaxonomiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Taxonomies that the project contains. + Taxonomies []*Taxonomy `protobuf:"bytes,1,rep,name=taxonomies,proto3" json:"taxonomies,omitempty"` + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTaxonomiesResponse) Reset() { + *x = ListTaxonomiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTaxonomiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTaxonomiesResponse) ProtoMessage() {} + +func (x *ListTaxonomiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTaxonomiesResponse.ProtoReflect.Descriptor instead. +func (*ListTaxonomiesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{6} +} + +func (x *ListTaxonomiesResponse) GetTaxonomies() []*Taxonomy { + if x != nil { + return x.Taxonomies + } + return nil +} + +func (x *ListTaxonomiesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. +type GetTaxonomyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the requested taxonomy. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetTaxonomyRequest) Reset() { + *x = GetTaxonomyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTaxonomyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTaxonomyRequest) ProtoMessage() {} + +func (x *GetTaxonomyRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTaxonomyRequest.ProtoReflect.Descriptor instead. +func (*GetTaxonomyRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{7} +} + +func (x *GetTaxonomyRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. +type CreatePolicyTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the taxonomy that the policy tag will belong to. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The policy tag to be created. + PolicyTag *PolicyTag `protobuf:"bytes,2,opt,name=policy_tag,json=policyTag,proto3" json:"policy_tag,omitempty"` +} + +func (x *CreatePolicyTagRequest) Reset() { + *x = CreatePolicyTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePolicyTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePolicyTagRequest) ProtoMessage() {} + +func (x *CreatePolicyTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePolicyTagRequest.ProtoReflect.Descriptor instead. +func (*CreatePolicyTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{8} +} + +func (x *CreatePolicyTagRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreatePolicyTagRequest) GetPolicyTag() *PolicyTag { + if x != nil { + return x.PolicyTag + } + return nil +} + +// Request message for +// [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. +type DeletePolicyTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the policy tag to be deleted. All of its descendant + // policy tags will also be deleted. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeletePolicyTagRequest) Reset() { + *x = DeletePolicyTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePolicyTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePolicyTagRequest) ProtoMessage() {} + +func (x *DeletePolicyTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePolicyTagRequest.ProtoReflect.Descriptor instead. +func (*DeletePolicyTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{9} +} + +func (x *DeletePolicyTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. +type UpdatePolicyTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The policy tag to update. Only the description, display_name, and + // parent_policy_tag fields can be updated. + PolicyTag *PolicyTag `protobuf:"bytes,1,opt,name=policy_tag,json=policyTag,proto3" json:"policy_tag,omitempty"` + // The update mask applies to the resource. Only display_name, description and + // parent_policy_tag can be updated and thus can be listed in the mask. If + // update_mask is not provided, all allowed fields (i.e. display_name, + // description and parent) will be updated. For more information including the + // `FieldMask` definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdatePolicyTagRequest) Reset() { + *x = UpdatePolicyTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePolicyTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePolicyTagRequest) ProtoMessage() {} + +func (x *UpdatePolicyTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePolicyTagRequest.ProtoReflect.Descriptor instead. +func (*UpdatePolicyTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdatePolicyTagRequest) GetPolicyTag() *PolicyTag { + if x != nil { + return x.PolicyTag + } + return nil +} + +func (x *UpdatePolicyTagRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. +type ListPolicyTagsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the taxonomy to list the policy tags of. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return. Must be a value between 1 and 1000. + // If not set, defaults to 50. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous List request, if any. If + // not set, defaults to an empty string. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListPolicyTagsRequest) Reset() { + *x = ListPolicyTagsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPolicyTagsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPolicyTagsRequest) ProtoMessage() {} + +func (x *ListPolicyTagsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPolicyTagsRequest.ProtoReflect.Descriptor instead. +func (*ListPolicyTagsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{11} +} + +func (x *ListPolicyTagsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListPolicyTagsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPolicyTagsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. +type ListPolicyTagsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The policy tags that are in the requested taxonomy. + PolicyTags []*PolicyTag `protobuf:"bytes,1,rep,name=policy_tags,json=policyTags,proto3" json:"policy_tags,omitempty"` + // Token used to retrieve the next page of results, or empty if there are no + // more results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPolicyTagsResponse) Reset() { + *x = ListPolicyTagsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPolicyTagsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPolicyTagsResponse) ProtoMessage() {} + +func (x *ListPolicyTagsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPolicyTagsResponse.ProtoReflect.Descriptor instead. +func (*ListPolicyTagsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{12} +} + +func (x *ListPolicyTagsResponse) GetPolicyTags() []*PolicyTag { + if x != nil { + return x.PolicyTags + } + return nil +} + +func (x *ListPolicyTagsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. +type GetPolicyTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the requested policy tag. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPolicyTagRequest) Reset() { + *x = GetPolicyTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPolicyTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPolicyTagRequest) ProtoMessage() {} + +func (x *GetPolicyTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPolicyTagRequest.ProtoReflect.Descriptor instead. +func (*GetPolicyTagRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP(), []int{13} +} + +func (x *GetPolicyTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_datacatalog_v1beta1_policytagmanager_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x74, 0x61, 0x67, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x03, 0x0a, + 0x08, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x70, 0x0a, 0x16, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x2e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x14, 0x61, + 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x0a, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, + 0x0a, 0x1b, 0x46, 0x49, 0x4e, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x41, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x10, 0x01, 0x3a, + 0x67, 0xea, 0x41, 0x64, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x74, + 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x7d, 0x22, 0xce, 0x02, 0x0a, 0x09, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x54, 0x61, 0x67, 0x12, 0x2f, 0x0a, 0x11, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x80, 0x01, 0xea, 0x41, 0x7d, 0x0a, 0x24, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, + 0x61, 0x67, 0x12, 0x55, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x74, 0x61, 0x78, 0x6f, + 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x2f, 0x7b, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x7d, 0x22, 0xa4, 0x01, 0x0a, 0x15, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x12, 0x23, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x61, 0x78, 0x6f, + 0x6e, 0x6f, 0x6d, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, + 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x08, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x22, 0x58, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, + 0x6d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, + 0x23, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x78, 0x6f, + 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x15, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, + 0x6d, 0x79, 0x52, 0x08, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x3b, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x98, 0x01, 0x0a, 0x15, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x12, 0x23, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4a, 0x0a, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, + 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, + 0x6d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, + 0x23, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x78, 0x6f, + 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x16, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x54, 0x61, 0x67, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x09, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x22, 0x5a, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, + 0x0a, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, + 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, + 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, + 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x57, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x26, 0x0a, 0x24, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xe5, 0x16, + 0x0a, 0x10, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x12, 0xce, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3f, 0x22, 0x33, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x3a, 0x08, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, + 0x79, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x74, 0x61, 0x78, 0x6f, 0x6e, + 0x6f, 0x6d, 0x79, 0x12, 0xa5, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x2a, + 0x33, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd0, 0x01, 0x0a, 0x0e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x37, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x78, 0x6f, 0x6e, + 0x6f, 0x6d, 0x79, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x32, 0x3c, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, + 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x08, 0x74, 0x61, 0x78, 0x6f, 0x6e, + 0x6f, 0x6d, 0x79, 0xda, 0x41, 0x08, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0xc9, + 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, + 0x73, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, + 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xb3, 0x01, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x22, 0x42, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, + 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xe2, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x61, 0x67, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x22, 0x68, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4e, 0x22, 0x40, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, + 0x67, 0xda, 0x41, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x74, 0x61, 0x67, 0x12, 0xb4, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x42, 0x2a, 0x40, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, + 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, + 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe6, 0x01, 0x0a, + 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, + 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x22, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x32, + 0x4b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0a, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0xda, 0x41, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x74, 0x61, 0x67, 0x12, 0xd6, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, + 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x42, 0x12, 0x40, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x54, 0x61, 0x67, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xc3, + 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x12, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x54, 0x61, 0x67, 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, 0x40, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xf4, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x22, 0xa8, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xa1, 0x01, 0x22, 0x44, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x3a, 0x01, 0x2a, 0x5a, 0x56, 0x22, 0x51, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x49, + 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0xf4, 0x01, 0x0a, 0x0c, + 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xa8, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xa1, + 0x01, 0x22, 0x44, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x01, 0x2a, 0x5a, 0x56, 0x22, 0x51, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, + 0x01, 0x2a, 0x12, 0xa0, 0x02, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, + 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb4, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xad, 0x01, 0x22, 0x4a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x5a, 0x5c, 0x22, 0x57, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0x1a, 0x4e, 0xca, 0x41, 0x1a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xfb, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x15, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, + 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_goTypes = []interface{}{ + (Taxonomy_PolicyType)(0), // 0: google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType + (*Taxonomy)(nil), // 1: google.cloud.datacatalog.v1beta1.Taxonomy + (*PolicyTag)(nil), // 2: google.cloud.datacatalog.v1beta1.PolicyTag + (*CreateTaxonomyRequest)(nil), // 3: google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest + (*DeleteTaxonomyRequest)(nil), // 4: google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest + (*UpdateTaxonomyRequest)(nil), // 5: google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest + (*ListTaxonomiesRequest)(nil), // 6: google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest + (*ListTaxonomiesResponse)(nil), // 7: google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse + (*GetTaxonomyRequest)(nil), // 8: google.cloud.datacatalog.v1beta1.GetTaxonomyRequest + (*CreatePolicyTagRequest)(nil), // 9: google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest + (*DeletePolicyTagRequest)(nil), // 10: google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest + (*UpdatePolicyTagRequest)(nil), // 11: google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest + (*ListPolicyTagsRequest)(nil), // 12: google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest + (*ListPolicyTagsResponse)(nil), // 13: google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse + (*GetPolicyTagRequest)(nil), // 14: google.cloud.datacatalog.v1beta1.GetPolicyTagRequest + (*fieldmaskpb.FieldMask)(nil), // 15: google.protobuf.FieldMask + (*v1.GetIamPolicyRequest)(nil), // 16: google.iam.v1.GetIamPolicyRequest + (*v1.SetIamPolicyRequest)(nil), // 17: google.iam.v1.SetIamPolicyRequest + (*v1.TestIamPermissionsRequest)(nil), // 18: google.iam.v1.TestIamPermissionsRequest + (*emptypb.Empty)(nil), // 19: google.protobuf.Empty + (*v1.Policy)(nil), // 20: google.iam.v1.Policy + (*v1.TestIamPermissionsResponse)(nil), // 21: google.iam.v1.TestIamPermissionsResponse +} +var file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_depIdxs = []int32{ + 0, // 0: google.cloud.datacatalog.v1beta1.Taxonomy.activated_policy_types:type_name -> google.cloud.datacatalog.v1beta1.Taxonomy.PolicyType + 1, // 1: google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest.taxonomy:type_name -> google.cloud.datacatalog.v1beta1.Taxonomy + 1, // 2: google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.taxonomy:type_name -> google.cloud.datacatalog.v1beta1.Taxonomy + 15, // 3: google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 4: google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse.taxonomies:type_name -> google.cloud.datacatalog.v1beta1.Taxonomy + 2, // 5: google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest.policy_tag:type_name -> google.cloud.datacatalog.v1beta1.PolicyTag + 2, // 6: google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.policy_tag:type_name -> google.cloud.datacatalog.v1beta1.PolicyTag + 15, // 7: google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest.update_mask:type_name -> google.protobuf.FieldMask + 2, // 8: google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse.policy_tags:type_name -> google.cloud.datacatalog.v1beta1.PolicyTag + 3, // 9: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy:input_type -> google.cloud.datacatalog.v1beta1.CreateTaxonomyRequest + 4, // 10: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy:input_type -> google.cloud.datacatalog.v1beta1.DeleteTaxonomyRequest + 5, // 11: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy:input_type -> google.cloud.datacatalog.v1beta1.UpdateTaxonomyRequest + 6, // 12: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies:input_type -> google.cloud.datacatalog.v1beta1.ListTaxonomiesRequest + 8, // 13: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy:input_type -> google.cloud.datacatalog.v1beta1.GetTaxonomyRequest + 9, // 14: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag:input_type -> google.cloud.datacatalog.v1beta1.CreatePolicyTagRequest + 10, // 15: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag:input_type -> google.cloud.datacatalog.v1beta1.DeletePolicyTagRequest + 11, // 16: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag:input_type -> google.cloud.datacatalog.v1beta1.UpdatePolicyTagRequest + 12, // 17: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags:input_type -> google.cloud.datacatalog.v1beta1.ListPolicyTagsRequest + 14, // 18: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag:input_type -> google.cloud.datacatalog.v1beta1.GetPolicyTagRequest + 16, // 19: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest + 17, // 20: google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest + 18, // 21: google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest + 1, // 22: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy:output_type -> google.cloud.datacatalog.v1beta1.Taxonomy + 19, // 23: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy:output_type -> google.protobuf.Empty + 1, // 24: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy:output_type -> google.cloud.datacatalog.v1beta1.Taxonomy + 7, // 25: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies:output_type -> google.cloud.datacatalog.v1beta1.ListTaxonomiesResponse + 1, // 26: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy:output_type -> google.cloud.datacatalog.v1beta1.Taxonomy + 2, // 27: google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag:output_type -> google.cloud.datacatalog.v1beta1.PolicyTag + 19, // 28: google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag:output_type -> google.protobuf.Empty + 2, // 29: google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag:output_type -> google.cloud.datacatalog.v1beta1.PolicyTag + 13, // 30: google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags:output_type -> google.cloud.datacatalog.v1beta1.ListPolicyTagsResponse + 2, // 31: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag:output_type -> google.cloud.datacatalog.v1beta1.PolicyTag + 20, // 32: google.cloud.datacatalog.v1beta1.PolicyTagManager.GetIamPolicy:output_type -> google.iam.v1.Policy + 20, // 33: google.cloud.datacatalog.v1beta1.PolicyTagManager.SetIamPolicy:output_type -> google.iam.v1.Policy + 21, // 34: google.cloud.datacatalog.v1beta1.PolicyTagManager.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse + 22, // [22:35] is the sub-list for method output_type + 9, // [9:22] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_init() } +func file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_init() { + if File_google_cloud_datacatalog_v1beta1_policytagmanager_proto != nil { + return + } + file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Taxonomy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolicyTag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTaxonomyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTaxonomyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateTaxonomyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTaxonomiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTaxonomiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTaxonomyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreatePolicyTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePolicyTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePolicyTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPolicyTagsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPolicyTagsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPolicyTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDesc, + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_depIdxs, + EnumInfos: file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_enumTypes, + MessageInfos: file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_policytagmanager_proto = out.File + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// PolicyTagManagerClient is the client API for PolicyTagManager service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PolicyTagManagerClient interface { + // Creates a taxonomy in the specified project. + CreateTaxonomy(ctx context.Context, in *CreateTaxonomyRequest, opts ...grpc.CallOption) (*Taxonomy, error) + // Deletes a taxonomy. This operation will also delete all + // policy tags in this taxonomy along with their associated policies. + DeleteTaxonomy(ctx context.Context, in *DeleteTaxonomyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates a taxonomy. + UpdateTaxonomy(ctx context.Context, in *UpdateTaxonomyRequest, opts ...grpc.CallOption) (*Taxonomy, error) + // Lists all taxonomies in a project in a particular location that the caller + // has permission to view. + ListTaxonomies(ctx context.Context, in *ListTaxonomiesRequest, opts ...grpc.CallOption) (*ListTaxonomiesResponse, error) + // Gets a taxonomy. + GetTaxonomy(ctx context.Context, in *GetTaxonomyRequest, opts ...grpc.CallOption) (*Taxonomy, error) + // Creates a policy tag in the specified taxonomy. + CreatePolicyTag(ctx context.Context, in *CreatePolicyTagRequest, opts ...grpc.CallOption) (*PolicyTag, error) + // Deletes a policy tag. Also deletes all of its descendant policy tags. + DeletePolicyTag(ctx context.Context, in *DeletePolicyTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Updates a policy tag. + UpdatePolicyTag(ctx context.Context, in *UpdatePolicyTagRequest, opts ...grpc.CallOption) (*PolicyTag, error) + // Lists all policy tags in a taxonomy. + ListPolicyTags(ctx context.Context, in *ListPolicyTagsRequest, opts ...grpc.CallOption) (*ListPolicyTagsResponse, error) + // Gets a policy tag. + GetPolicyTag(ctx context.Context, in *GetPolicyTagRequest, opts ...grpc.CallOption) (*PolicyTag, error) + // Gets the IAM policy for a taxonomy or a policy tag. + GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Sets the IAM policy for a taxonomy or a policy tag. + SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Returns the permissions that a caller has on the specified taxonomy or + // policy tag. + TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) +} + +type policyTagManagerClient struct { + cc grpc.ClientConnInterface +} + +func NewPolicyTagManagerClient(cc grpc.ClientConnInterface) PolicyTagManagerClient { + return &policyTagManagerClient{cc} +} + +func (c *policyTagManagerClient) CreateTaxonomy(ctx context.Context, in *CreateTaxonomyRequest, opts ...grpc.CallOption) (*Taxonomy, error) { + out := new(Taxonomy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/CreateTaxonomy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) DeleteTaxonomy(ctx context.Context, in *DeleteTaxonomyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/DeleteTaxonomy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) UpdateTaxonomy(ctx context.Context, in *UpdateTaxonomyRequest, opts ...grpc.CallOption) (*Taxonomy, error) { + out := new(Taxonomy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/UpdateTaxonomy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) ListTaxonomies(ctx context.Context, in *ListTaxonomiesRequest, opts ...grpc.CallOption) (*ListTaxonomiesResponse, error) { + out := new(ListTaxonomiesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/ListTaxonomies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) GetTaxonomy(ctx context.Context, in *GetTaxonomyRequest, opts ...grpc.CallOption) (*Taxonomy, error) { + out := new(Taxonomy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/GetTaxonomy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) CreatePolicyTag(ctx context.Context, in *CreatePolicyTagRequest, opts ...grpc.CallOption) (*PolicyTag, error) { + out := new(PolicyTag) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/CreatePolicyTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) DeletePolicyTag(ctx context.Context, in *DeletePolicyTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/DeletePolicyTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) UpdatePolicyTag(ctx context.Context, in *UpdatePolicyTagRequest, opts ...grpc.CallOption) (*PolicyTag, error) { + out := new(PolicyTag) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/UpdatePolicyTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) ListPolicyTags(ctx context.Context, in *ListPolicyTagsRequest, opts ...grpc.CallOption) (*ListPolicyTagsResponse, error) { + out := new(ListPolicyTagsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/ListPolicyTags", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) GetPolicyTag(ctx context.Context, in *GetPolicyTagRequest, opts ...grpc.CallOption) (*PolicyTag, error) { + out := new(PolicyTag) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/GetPolicyTag", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/GetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/SetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) { + out := new(v1.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManager/TestIamPermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PolicyTagManagerServer is the server API for PolicyTagManager service. +type PolicyTagManagerServer interface { + // Creates a taxonomy in the specified project. + CreateTaxonomy(context.Context, *CreateTaxonomyRequest) (*Taxonomy, error) + // Deletes a taxonomy. This operation will also delete all + // policy tags in this taxonomy along with their associated policies. + DeleteTaxonomy(context.Context, *DeleteTaxonomyRequest) (*emptypb.Empty, error) + // Updates a taxonomy. + UpdateTaxonomy(context.Context, *UpdateTaxonomyRequest) (*Taxonomy, error) + // Lists all taxonomies in a project in a particular location that the caller + // has permission to view. + ListTaxonomies(context.Context, *ListTaxonomiesRequest) (*ListTaxonomiesResponse, error) + // Gets a taxonomy. + GetTaxonomy(context.Context, *GetTaxonomyRequest) (*Taxonomy, error) + // Creates a policy tag in the specified taxonomy. + CreatePolicyTag(context.Context, *CreatePolicyTagRequest) (*PolicyTag, error) + // Deletes a policy tag. Also deletes all of its descendant policy tags. + DeletePolicyTag(context.Context, *DeletePolicyTagRequest) (*emptypb.Empty, error) + // Updates a policy tag. + UpdatePolicyTag(context.Context, *UpdatePolicyTagRequest) (*PolicyTag, error) + // Lists all policy tags in a taxonomy. + ListPolicyTags(context.Context, *ListPolicyTagsRequest) (*ListPolicyTagsResponse, error) + // Gets a policy tag. + GetPolicyTag(context.Context, *GetPolicyTagRequest) (*PolicyTag, error) + // Gets the IAM policy for a taxonomy or a policy tag. + GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) + // Sets the IAM policy for a taxonomy or a policy tag. + SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) + // Returns the permissions that a caller has on the specified taxonomy or + // policy tag. + TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) +} + +// UnimplementedPolicyTagManagerServer can be embedded to have forward compatible implementations. +type UnimplementedPolicyTagManagerServer struct { +} + +func (*UnimplementedPolicyTagManagerServer) CreateTaxonomy(context.Context, *CreateTaxonomyRequest) (*Taxonomy, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTaxonomy not implemented") +} +func (*UnimplementedPolicyTagManagerServer) DeleteTaxonomy(context.Context, *DeleteTaxonomyRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTaxonomy not implemented") +} +func (*UnimplementedPolicyTagManagerServer) UpdateTaxonomy(context.Context, *UpdateTaxonomyRequest) (*Taxonomy, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateTaxonomy not implemented") +} +func (*UnimplementedPolicyTagManagerServer) ListTaxonomies(context.Context, *ListTaxonomiesRequest) (*ListTaxonomiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTaxonomies not implemented") +} +func (*UnimplementedPolicyTagManagerServer) GetTaxonomy(context.Context, *GetTaxonomyRequest) (*Taxonomy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTaxonomy not implemented") +} +func (*UnimplementedPolicyTagManagerServer) CreatePolicyTag(context.Context, *CreatePolicyTagRequest) (*PolicyTag, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePolicyTag not implemented") +} +func (*UnimplementedPolicyTagManagerServer) DeletePolicyTag(context.Context, *DeletePolicyTagRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePolicyTag not implemented") +} +func (*UnimplementedPolicyTagManagerServer) UpdatePolicyTag(context.Context, *UpdatePolicyTagRequest) (*PolicyTag, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePolicyTag not implemented") +} +func (*UnimplementedPolicyTagManagerServer) ListPolicyTags(context.Context, *ListPolicyTagsRequest) (*ListPolicyTagsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPolicyTags not implemented") +} +func (*UnimplementedPolicyTagManagerServer) GetPolicyTag(context.Context, *GetPolicyTagRequest) (*PolicyTag, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPolicyTag not implemented") +} +func (*UnimplementedPolicyTagManagerServer) GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented") +} +func (*UnimplementedPolicyTagManagerServer) SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented") +} +func (*UnimplementedPolicyTagManagerServer) TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented") +} + +func RegisterPolicyTagManagerServer(s *grpc.Server, srv PolicyTagManagerServer) { + s.RegisterService(&_PolicyTagManager_serviceDesc, srv) +} + +func _PolicyTagManager_CreateTaxonomy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTaxonomyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).CreateTaxonomy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/CreateTaxonomy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).CreateTaxonomy(ctx, req.(*CreateTaxonomyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_DeleteTaxonomy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTaxonomyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).DeleteTaxonomy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/DeleteTaxonomy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).DeleteTaxonomy(ctx, req.(*DeleteTaxonomyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_UpdateTaxonomy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateTaxonomyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).UpdateTaxonomy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/UpdateTaxonomy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).UpdateTaxonomy(ctx, req.(*UpdateTaxonomyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_ListTaxonomies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTaxonomiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).ListTaxonomies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/ListTaxonomies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).ListTaxonomies(ctx, req.(*ListTaxonomiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_GetTaxonomy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaxonomyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).GetTaxonomy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/GetTaxonomy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).GetTaxonomy(ctx, req.(*GetTaxonomyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_CreatePolicyTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePolicyTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).CreatePolicyTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/CreatePolicyTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).CreatePolicyTag(ctx, req.(*CreatePolicyTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_DeletePolicyTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePolicyTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).DeletePolicyTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/DeletePolicyTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).DeletePolicyTag(ctx, req.(*DeletePolicyTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_UpdatePolicyTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePolicyTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).UpdatePolicyTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/UpdatePolicyTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).UpdatePolicyTag(ctx, req.(*UpdatePolicyTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_ListPolicyTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPolicyTagsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).ListPolicyTags(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/ListPolicyTags", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).ListPolicyTags(ctx, req.(*ListPolicyTagsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_GetPolicyTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPolicyTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).GetPolicyTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/GetPolicyTag", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).GetPolicyTag(ctx, req.(*GetPolicyTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/GetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/SetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManager_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManager/TestIamPermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _PolicyTagManager_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.datacatalog.v1beta1.PolicyTagManager", + HandlerType: (*PolicyTagManagerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTaxonomy", + Handler: _PolicyTagManager_CreateTaxonomy_Handler, + }, + { + MethodName: "DeleteTaxonomy", + Handler: _PolicyTagManager_DeleteTaxonomy_Handler, + }, + { + MethodName: "UpdateTaxonomy", + Handler: _PolicyTagManager_UpdateTaxonomy_Handler, + }, + { + MethodName: "ListTaxonomies", + Handler: _PolicyTagManager_ListTaxonomies_Handler, + }, + { + MethodName: "GetTaxonomy", + Handler: _PolicyTagManager_GetTaxonomy_Handler, + }, + { + MethodName: "CreatePolicyTag", + Handler: _PolicyTagManager_CreatePolicyTag_Handler, + }, + { + MethodName: "DeletePolicyTag", + Handler: _PolicyTagManager_DeletePolicyTag_Handler, + }, + { + MethodName: "UpdatePolicyTag", + Handler: _PolicyTagManager_UpdatePolicyTag_Handler, + }, + { + MethodName: "ListPolicyTags", + Handler: _PolicyTagManager_ListPolicyTags_Handler, + }, + { + MethodName: "GetPolicyTag", + Handler: _PolicyTagManager_GetPolicyTag_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _PolicyTagManager_GetIamPolicy_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _PolicyTagManager_SetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _PolicyTagManager_TestIamPermissions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/datacatalog/v1beta1/policytagmanager.proto", +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go b/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go new file mode 100644 index 000000000000..16bbd75d7cb7 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/policytagmanagerserialization.pb.go @@ -0,0 +1,943 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto + +package datacatalogpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/iam/v1" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Message capturing a taxonomy and its policy tag hierarchy as a nested proto. +// Used for taxonomy import/export and mutation. +type SerializedTaxonomy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Display name of the taxonomy. Max 200 bytes when encoded in UTF-8. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Description of the serialized taxonomy. The length of the + // description is limited to 2000 bytes when encoded in UTF-8. If not set, + // defaults to an empty description. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Top level policy tags associated with the taxonomy if any. + PolicyTags []*SerializedPolicyTag `protobuf:"bytes,3,rep,name=policy_tags,json=policyTags,proto3" json:"policy_tags,omitempty"` +} + +func (x *SerializedTaxonomy) Reset() { + *x = SerializedTaxonomy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SerializedTaxonomy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SerializedTaxonomy) ProtoMessage() {} + +func (x *SerializedTaxonomy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SerializedTaxonomy.ProtoReflect.Descriptor instead. +func (*SerializedTaxonomy) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{0} +} + +func (x *SerializedTaxonomy) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *SerializedTaxonomy) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SerializedTaxonomy) GetPolicyTags() []*SerializedPolicyTag { + if x != nil { + return x.PolicyTags + } + return nil +} + +// Message representing one policy tag when exported as a nested proto. +type SerializedPolicyTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Display name of the policy tag. Max 200 bytes when encoded in UTF-8. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Description of the serialized policy tag. The length of the + // description is limited to 2000 bytes when encoded in UTF-8. If not set, + // defaults to an empty description. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Children of the policy tag if any. + ChildPolicyTags []*SerializedPolicyTag `protobuf:"bytes,4,rep,name=child_policy_tags,json=childPolicyTags,proto3" json:"child_policy_tags,omitempty"` +} + +func (x *SerializedPolicyTag) Reset() { + *x = SerializedPolicyTag{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SerializedPolicyTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SerializedPolicyTag) ProtoMessage() {} + +func (x *SerializedPolicyTag) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SerializedPolicyTag.ProtoReflect.Descriptor instead. +func (*SerializedPolicyTag) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{1} +} + +func (x *SerializedPolicyTag) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *SerializedPolicyTag) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SerializedPolicyTag) GetChildPolicyTags() []*SerializedPolicyTag { + if x != nil { + return x.ChildPolicyTags + } + return nil +} + +// Request message for +// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. +type ImportTaxonomiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of project that the newly created taxonomies will + // belong to. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Source taxonomies to be imported in a tree structure. + // + // Types that are assignable to Source: + // + // *ImportTaxonomiesRequest_InlineSource + Source isImportTaxonomiesRequest_Source `protobuf_oneof:"source"` +} + +func (x *ImportTaxonomiesRequest) Reset() { + *x = ImportTaxonomiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportTaxonomiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportTaxonomiesRequest) ProtoMessage() {} + +func (x *ImportTaxonomiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportTaxonomiesRequest.ProtoReflect.Descriptor instead. +func (*ImportTaxonomiesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{2} +} + +func (x *ImportTaxonomiesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (m *ImportTaxonomiesRequest) GetSource() isImportTaxonomiesRequest_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *ImportTaxonomiesRequest) GetInlineSource() *InlineSource { + if x, ok := x.GetSource().(*ImportTaxonomiesRequest_InlineSource); ok { + return x.InlineSource + } + return nil +} + +type isImportTaxonomiesRequest_Source interface { + isImportTaxonomiesRequest_Source() +} + +type ImportTaxonomiesRequest_InlineSource struct { + // Inline source used for taxonomies import + InlineSource *InlineSource `protobuf:"bytes,2,opt,name=inline_source,json=inlineSource,proto3,oneof"` +} + +func (*ImportTaxonomiesRequest_InlineSource) isImportTaxonomiesRequest_Source() {} + +// Inline source used for taxonomies import. +type InlineSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Taxonomies to be imported. + Taxonomies []*SerializedTaxonomy `protobuf:"bytes,1,rep,name=taxonomies,proto3" json:"taxonomies,omitempty"` +} + +func (x *InlineSource) Reset() { + *x = InlineSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InlineSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InlineSource) ProtoMessage() {} + +func (x *InlineSource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InlineSource.ProtoReflect.Descriptor instead. +func (*InlineSource) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{3} +} + +func (x *InlineSource) GetTaxonomies() []*SerializedTaxonomy { + if x != nil { + return x.Taxonomies + } + return nil +} + +// Response message for +// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. +type ImportTaxonomiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Taxonomies that were imported. + Taxonomies []*Taxonomy `protobuf:"bytes,1,rep,name=taxonomies,proto3" json:"taxonomies,omitempty"` +} + +func (x *ImportTaxonomiesResponse) Reset() { + *x = ImportTaxonomiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportTaxonomiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportTaxonomiesResponse) ProtoMessage() {} + +func (x *ImportTaxonomiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportTaxonomiesResponse.ProtoReflect.Descriptor instead. +func (*ImportTaxonomiesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{4} +} + +func (x *ImportTaxonomiesResponse) GetTaxonomies() []*Taxonomy { + if x != nil { + return x.Taxonomies + } + return nil +} + +// Request message for +// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. +type ExportTaxonomiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the project that taxonomies to be exported + // will share. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Resource names of the taxonomies to be exported. + Taxonomies []string `protobuf:"bytes,2,rep,name=taxonomies,proto3" json:"taxonomies,omitempty"` + // Required. Taxonomies export destination. + // + // Types that are assignable to Destination: + // + // *ExportTaxonomiesRequest_SerializedTaxonomies + Destination isExportTaxonomiesRequest_Destination `protobuf_oneof:"destination"` +} + +func (x *ExportTaxonomiesRequest) Reset() { + *x = ExportTaxonomiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportTaxonomiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportTaxonomiesRequest) ProtoMessage() {} + +func (x *ExportTaxonomiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportTaxonomiesRequest.ProtoReflect.Descriptor instead. +func (*ExportTaxonomiesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{5} +} + +func (x *ExportTaxonomiesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ExportTaxonomiesRequest) GetTaxonomies() []string { + if x != nil { + return x.Taxonomies + } + return nil +} + +func (m *ExportTaxonomiesRequest) GetDestination() isExportTaxonomiesRequest_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *ExportTaxonomiesRequest) GetSerializedTaxonomies() bool { + if x, ok := x.GetDestination().(*ExportTaxonomiesRequest_SerializedTaxonomies); ok { + return x.SerializedTaxonomies + } + return false +} + +type isExportTaxonomiesRequest_Destination interface { + isExportTaxonomiesRequest_Destination() +} + +type ExportTaxonomiesRequest_SerializedTaxonomies struct { + // Export taxonomies as serialized taxonomies. + SerializedTaxonomies bool `protobuf:"varint,3,opt,name=serialized_taxonomies,json=serializedTaxonomies,proto3,oneof"` +} + +func (*ExportTaxonomiesRequest_SerializedTaxonomies) isExportTaxonomiesRequest_Destination() {} + +// Response message for +// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. +type ExportTaxonomiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of taxonomies and policy tags in a tree structure. + Taxonomies []*SerializedTaxonomy `protobuf:"bytes,1,rep,name=taxonomies,proto3" json:"taxonomies,omitempty"` +} + +func (x *ExportTaxonomiesResponse) Reset() { + *x = ExportTaxonomiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportTaxonomiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportTaxonomiesResponse) ProtoMessage() {} + +func (x *ExportTaxonomiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportTaxonomiesResponse.ProtoReflect.Descriptor instead. +func (*ExportTaxonomiesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP(), []int{6} +} + +func (x *ExportTaxonomiesResponse) GetTaxonomies() []*SerializedTaxonomy { + if x != nil { + return x.Taxonomies + } + return nil +} + +var File_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x74, 0x61, 0x67, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x74, 0x61, 0x67, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xb6, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, + 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x56, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x53, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, + 0x67, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x61, 0x0a, 0x11, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x52, 0x0f, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, 0x22, 0xbf, + 0x01, 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x25, 0x12, 0x23, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, + 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x55, 0x0a, 0x0d, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0x69, 0x0a, 0x0c, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x59, 0x0a, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x18, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, + 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, + 0x69, 0x65, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, + 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x12, 0x23, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, + 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, + 0x73, 0x12, 0x35, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, + 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x14, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, 0x61, + 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x18, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0a, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x79, 0x52, 0x0a, 0x74, + 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x32, 0x92, 0x04, 0x0a, 0x1d, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xd0, 0x01, 0x0a, 0x10, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, + 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, + 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, + 0x3a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x78, 0x6f, 0x6e, 0x6f, + 0x6d, 0x69, 0x65, 0x73, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xcd, + 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, + 0x69, 0x65, 0x73, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x78, 0x6f, 0x6e, 0x6f, 0x6d, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x78, + 0x6f, 0x6e, 0x6f, 0x6d, 0x69, 0x65, 0x73, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x4e, + 0xca, 0x41, 0x1a, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x88, + 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x22, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, + 0x61, 0x67, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x20, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, + 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, + 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_goTypes = []interface{}{ + (*SerializedTaxonomy)(nil), // 0: google.cloud.datacatalog.v1beta1.SerializedTaxonomy + (*SerializedPolicyTag)(nil), // 1: google.cloud.datacatalog.v1beta1.SerializedPolicyTag + (*ImportTaxonomiesRequest)(nil), // 2: google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest + (*InlineSource)(nil), // 3: google.cloud.datacatalog.v1beta1.InlineSource + (*ImportTaxonomiesResponse)(nil), // 4: google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse + (*ExportTaxonomiesRequest)(nil), // 5: google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + (*ExportTaxonomiesResponse)(nil), // 6: google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + (*Taxonomy)(nil), // 7: google.cloud.datacatalog.v1beta1.Taxonomy +} +var file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_depIdxs = []int32{ + 1, // 0: google.cloud.datacatalog.v1beta1.SerializedTaxonomy.policy_tags:type_name -> google.cloud.datacatalog.v1beta1.SerializedPolicyTag + 1, // 1: google.cloud.datacatalog.v1beta1.SerializedPolicyTag.child_policy_tags:type_name -> google.cloud.datacatalog.v1beta1.SerializedPolicyTag + 3, // 2: google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest.inline_source:type_name -> google.cloud.datacatalog.v1beta1.InlineSource + 0, // 3: google.cloud.datacatalog.v1beta1.InlineSource.taxonomies:type_name -> google.cloud.datacatalog.v1beta1.SerializedTaxonomy + 7, // 4: google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse.taxonomies:type_name -> google.cloud.datacatalog.v1beta1.Taxonomy + 0, // 5: google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse.taxonomies:type_name -> google.cloud.datacatalog.v1beta1.SerializedTaxonomy + 2, // 6: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies:input_type -> google.cloud.datacatalog.v1beta1.ImportTaxonomiesRequest + 5, // 7: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies:input_type -> google.cloud.datacatalog.v1beta1.ExportTaxonomiesRequest + 4, // 8: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies:output_type -> google.cloud.datacatalog.v1beta1.ImportTaxonomiesResponse + 6, // 9: google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies:output_type -> google.cloud.datacatalog.v1beta1.ExportTaxonomiesResponse + 8, // [8:10] is the sub-list for method output_type + 6, // [6:8] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_init() } +func file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_init() { + if File_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto != nil { + return + } + file_google_cloud_datacatalog_v1beta1_policytagmanager_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SerializedTaxonomy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SerializedPolicyTag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportTaxonomiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InlineSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportTaxonomiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportTaxonomiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportTaxonomiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ImportTaxonomiesRequest_InlineSource)(nil), + } + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*ExportTaxonomiesRequest_SerializedTaxonomies)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_depIdxs, + MessageInfos: file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto = out.File + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_policytagmanagerserialization_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// PolicyTagManagerSerializationClient is the client API for PolicyTagManagerSerialization service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PolicyTagManagerSerializationClient interface { + // Imports all taxonomies and their policy tags to a project as new + // taxonomies. + // + // This method provides a bulk taxonomy / policy tag creation using nested + // proto structure. + ImportTaxonomies(ctx context.Context, in *ImportTaxonomiesRequest, opts ...grpc.CallOption) (*ImportTaxonomiesResponse, error) + // Exports all taxonomies and their policy tags in a project. + // + // This method generates SerializedTaxonomy protos with nested policy tags + // that can be used as an input for future ImportTaxonomies calls. + ExportTaxonomies(ctx context.Context, in *ExportTaxonomiesRequest, opts ...grpc.CallOption) (*ExportTaxonomiesResponse, error) +} + +type policyTagManagerSerializationClient struct { + cc grpc.ClientConnInterface +} + +func NewPolicyTagManagerSerializationClient(cc grpc.ClientConnInterface) PolicyTagManagerSerializationClient { + return &policyTagManagerSerializationClient{cc} +} + +func (c *policyTagManagerSerializationClient) ImportTaxonomies(ctx context.Context, in *ImportTaxonomiesRequest, opts ...grpc.CallOption) (*ImportTaxonomiesResponse, error) { + out := new(ImportTaxonomiesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ImportTaxonomies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyTagManagerSerializationClient) ExportTaxonomies(ctx context.Context, in *ExportTaxonomiesRequest, opts ...grpc.CallOption) (*ExportTaxonomiesResponse, error) { + out := new(ExportTaxonomiesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ExportTaxonomies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PolicyTagManagerSerializationServer is the server API for PolicyTagManagerSerialization service. +type PolicyTagManagerSerializationServer interface { + // Imports all taxonomies and their policy tags to a project as new + // taxonomies. + // + // This method provides a bulk taxonomy / policy tag creation using nested + // proto structure. + ImportTaxonomies(context.Context, *ImportTaxonomiesRequest) (*ImportTaxonomiesResponse, error) + // Exports all taxonomies and their policy tags in a project. + // + // This method generates SerializedTaxonomy protos with nested policy tags + // that can be used as an input for future ImportTaxonomies calls. + ExportTaxonomies(context.Context, *ExportTaxonomiesRequest) (*ExportTaxonomiesResponse, error) +} + +// UnimplementedPolicyTagManagerSerializationServer can be embedded to have forward compatible implementations. +type UnimplementedPolicyTagManagerSerializationServer struct { +} + +func (*UnimplementedPolicyTagManagerSerializationServer) ImportTaxonomies(context.Context, *ImportTaxonomiesRequest) (*ImportTaxonomiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportTaxonomies not implemented") +} +func (*UnimplementedPolicyTagManagerSerializationServer) ExportTaxonomies(context.Context, *ExportTaxonomiesRequest) (*ExportTaxonomiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportTaxonomies not implemented") +} + +func RegisterPolicyTagManagerSerializationServer(s *grpc.Server, srv PolicyTagManagerSerializationServer) { + s.RegisterService(&_PolicyTagManagerSerialization_serviceDesc, srv) +} + +func _PolicyTagManagerSerialization_ImportTaxonomies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportTaxonomiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerSerializationServer).ImportTaxonomies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ImportTaxonomies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerSerializationServer).ImportTaxonomies(ctx, req.(*ImportTaxonomiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyTagManagerSerialization_ExportTaxonomies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportTaxonomiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyTagManagerSerializationServer).ExportTaxonomies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ExportTaxonomies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyTagManagerSerializationServer).ExportTaxonomies(ctx, req.(*ExportTaxonomiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _PolicyTagManagerSerialization_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization", + HandlerType: (*PolicyTagManagerSerializationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ImportTaxonomies", + Handler: _PolicyTagManagerSerialization_ImportTaxonomies_Handler, + }, + { + MethodName: "ExportTaxonomies", + Handler: _PolicyTagManagerSerialization_ExportTaxonomies_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/datacatalog/v1beta1/policytagmanagerserialization.proto", +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go b/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go new file mode 100644 index 000000000000..c23c783ca92e --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/schema.pb.go @@ -0,0 +1,300 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/schema.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). +type Schema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be + // specified. + Columns []*ColumnSchema `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` +} + +func (x *Schema) Reset() { + *x = Schema{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Schema.ProtoReflect.Descriptor instead. +func (*Schema) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescGZIP(), []int{0} +} + +func (x *Schema) GetColumns() []*ColumnSchema { + if x != nil { + return x.Columns + } + return nil +} + +// Representation of a column within a schema. Columns could be nested inside +// other columns. +type ColumnSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the column. + Column string `protobuf:"bytes,6,opt,name=column,proto3" json:"column,omitempty"` + // Required. Type of the column. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // Optional. Description of the column. Default value is an empty string. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Optional. A column's mode indicates whether the values in this column are required, + // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. + // Default mode is `NULLABLE`. + Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"` + // Optional. Schema of sub-columns. A column can have zero or more sub-columns. + Subcolumns []*ColumnSchema `protobuf:"bytes,7,rep,name=subcolumns,proto3" json:"subcolumns,omitempty"` +} + +func (x *ColumnSchema) Reset() { + *x = ColumnSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnSchema) ProtoMessage() {} + +func (x *ColumnSchema) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnSchema.ProtoReflect.Descriptor instead. +func (*ColumnSchema) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescGZIP(), []int{1} +} + +func (x *ColumnSchema) GetColumn() string { + if x != nil { + return x.Column + } + return "" +} + +func (x *ColumnSchema) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ColumnSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ColumnSchema) GetMode() string { + if x != nil { + return x.Mode + } + return "" +} + +func (x *ColumnSchema) GetSubcolumns() []*ColumnSchema { + if x != nil { + return x.Subcolumns + } + return nil +} + +var File_google_cloud_datacatalog_v1beta1_schema_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_schema_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x4d, 0x0a, 0x07, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x0c, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1b, 0x0a, 0x06, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x6d, 0x6f, + 0x64, 0x65, 0x12, 0x53, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xf8, + 0x01, 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, + 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_schema_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_schema_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_datacatalog_v1beta1_schema_proto_goTypes = []interface{}{ + (*Schema)(nil), // 0: google.cloud.datacatalog.v1beta1.Schema + (*ColumnSchema)(nil), // 1: google.cloud.datacatalog.v1beta1.ColumnSchema +} +var file_google_cloud_datacatalog_v1beta1_schema_proto_depIdxs = []int32{ + 1, // 0: google.cloud.datacatalog.v1beta1.Schema.columns:type_name -> google.cloud.datacatalog.v1beta1.ColumnSchema + 1, // 1: google.cloud.datacatalog.v1beta1.ColumnSchema.subcolumns:type_name -> google.cloud.datacatalog.v1beta1.ColumnSchema + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_schema_proto_init() } +func file_google_cloud_datacatalog_v1beta1_schema_proto_init() { + if File_google_cloud_datacatalog_v1beta1_schema_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_schema_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_schema_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_schema_proto_depIdxs, + MessageInfos: file_google_cloud_datacatalog_v1beta1_schema_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_schema_proto = out.File + file_google_cloud_datacatalog_v1beta1_schema_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_schema_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_schema_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/search.pb.go b/datacatalog/apiv1beta1/datacatalogpb/search.pb.go new file mode 100644 index 000000000000..6144654bb348 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/search.pb.go @@ -0,0 +1,302 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/search.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The different types of resources that can be returned in search. +type SearchResultType int32 + +const ( + // Default unknown type. + SearchResultType_SEARCH_RESULT_TYPE_UNSPECIFIED SearchResultType = 0 + // An [Entry][google.cloud.datacatalog.v1beta1.Entry]. + SearchResultType_ENTRY SearchResultType = 1 + // A [TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate]. + SearchResultType_TAG_TEMPLATE SearchResultType = 2 + // An [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. + SearchResultType_ENTRY_GROUP SearchResultType = 3 +) + +// Enum value maps for SearchResultType. +var ( + SearchResultType_name = map[int32]string{ + 0: "SEARCH_RESULT_TYPE_UNSPECIFIED", + 1: "ENTRY", + 2: "TAG_TEMPLATE", + 3: "ENTRY_GROUP", + } + SearchResultType_value = map[string]int32{ + "SEARCH_RESULT_TYPE_UNSPECIFIED": 0, + "ENTRY": 1, + "TAG_TEMPLATE": 2, + "ENTRY_GROUP": 3, + } +) + +func (x SearchResultType) Enum() *SearchResultType { + p := new(SearchResultType) + *p = x + return p +} + +func (x SearchResultType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SearchResultType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datacatalog_v1beta1_search_proto_enumTypes[0].Descriptor() +} + +func (SearchResultType) Type() protoreflect.EnumType { + return &file_google_cloud_datacatalog_v1beta1_search_proto_enumTypes[0] +} + +func (x SearchResultType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SearchResultType.Descriptor instead. +func (SearchResultType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_search_proto_rawDescGZIP(), []int{0} +} + +// A result that appears in the response of a search request. Each result +// captures details of one entry that matches the search. +type SearchCatalogResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of the search result. This field can be used to determine which Get + // method to call to fetch the full resource. + SearchResultType SearchResultType `protobuf:"varint,1,opt,name=search_result_type,json=searchResultType,proto3,enum=google.cloud.datacatalog.v1beta1.SearchResultType" json:"search_result_type,omitempty"` + // Sub-type of the search result. This is a dot-delimited description of the + // resource's full type, and is the same as the value callers would provide in + // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, + // `tagTemplate`. + SearchResultSubtype string `protobuf:"bytes,2,opt,name=search_result_subtype,json=searchResultSubtype,proto3" json:"search_result_subtype,omitempty"` + // The relative resource name of the resource in URL format. + // Examples: + // + // - `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` + // - `projects/{project_id}/tagTemplates/{tag_template_id}` + RelativeResourceName string `protobuf:"bytes,3,opt,name=relative_resource_name,json=relativeResourceName,proto3" json:"relative_resource_name,omitempty"` + // The full name of the cloud resource the entry belongs to. See: + // https://cloud.google.com/apis/design/resource_names#full_resource_name. + // Example: + // + // - `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` + LinkedResource string `protobuf:"bytes,4,opt,name=linked_resource,json=linkedResource,proto3" json:"linked_resource,omitempty"` +} + +func (x *SearchCatalogResult) Reset() { + *x = SearchCatalogResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchCatalogResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchCatalogResult) ProtoMessage() {} + +func (x *SearchCatalogResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchCatalogResult.ProtoReflect.Descriptor instead. +func (*SearchCatalogResult) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_search_proto_rawDescGZIP(), []int{0} +} + +func (x *SearchCatalogResult) GetSearchResultType() SearchResultType { + if x != nil { + return x.SearchResultType + } + return SearchResultType_SEARCH_RESULT_TYPE_UNSPECIFIED +} + +func (x *SearchCatalogResult) GetSearchResultSubtype() string { + if x != nil { + return x.SearchResultSubtype + } + return "" +} + +func (x *SearchCatalogResult) GetRelativeResourceName() string { + if x != nil { + return x.RelativeResourceName + } + return "" +} + +func (x *SearchCatalogResult) GetLinkedResource() string { + if x != nil { + return x.LinkedResource + } + return "" +} + +var File_google_cloud_datacatalog_v1beta1_search_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_search_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8a, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x60, 0x0a, 0x12, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x10, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x75, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x34, + 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, + 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2a, 0x64, 0x0a, + 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x52, 0x45, 0x53, 0x55, + 0x4c, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x01, + 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x41, 0x47, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, + 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x5f, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x10, 0x03, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xf8, 0x01, 0x01, 0xaa, 0x02, + 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_search_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_search_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_search_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_search_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_search_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_search_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_search_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_search_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_search_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_datacatalog_v1beta1_search_proto_goTypes = []interface{}{ + (SearchResultType)(0), // 0: google.cloud.datacatalog.v1beta1.SearchResultType + (*SearchCatalogResult)(nil), // 1: google.cloud.datacatalog.v1beta1.SearchCatalogResult +} +var file_google_cloud_datacatalog_v1beta1_search_proto_depIdxs = []int32{ + 0, // 0: google.cloud.datacatalog.v1beta1.SearchCatalogResult.search_result_type:type_name -> google.cloud.datacatalog.v1beta1.SearchResultType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_search_proto_init() } +func file_google_cloud_datacatalog_v1beta1_search_proto_init() { + if File_google_cloud_datacatalog_v1beta1_search_proto != nil { + return + } + file_google_cloud_datacatalog_v1beta1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchCatalogResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_search_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_search_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_search_proto_depIdxs, + EnumInfos: file_google_cloud_datacatalog_v1beta1_search_proto_enumTypes, + MessageInfos: file_google_cloud_datacatalog_v1beta1_search_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_search_proto = out.File + file_google_cloud_datacatalog_v1beta1_search_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_search_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_search_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go b/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go new file mode 100644 index 000000000000..698b32af9a58 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/table_spec.pb.go @@ -0,0 +1,547 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/table_spec.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Table source type. +type TableSourceType int32 + +const ( + // Default unknown type. + TableSourceType_TABLE_SOURCE_TYPE_UNSPECIFIED TableSourceType = 0 + // Table view. + TableSourceType_BIGQUERY_VIEW TableSourceType = 2 + // BigQuery native table. + TableSourceType_BIGQUERY_TABLE TableSourceType = 5 +) + +// Enum value maps for TableSourceType. +var ( + TableSourceType_name = map[int32]string{ + 0: "TABLE_SOURCE_TYPE_UNSPECIFIED", + 2: "BIGQUERY_VIEW", + 5: "BIGQUERY_TABLE", + } + TableSourceType_value = map[string]int32{ + "TABLE_SOURCE_TYPE_UNSPECIFIED": 0, + "BIGQUERY_VIEW": 2, + "BIGQUERY_TABLE": 5, + } +) + +func (x TableSourceType) Enum() *TableSourceType { + p := new(TableSourceType) + *p = x + return p +} + +func (x TableSourceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TableSourceType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_enumTypes[0].Descriptor() +} + +func (TableSourceType) Type() protoreflect.EnumType { + return &file_google_cloud_datacatalog_v1beta1_table_spec_proto_enumTypes[0] +} + +func (x TableSourceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TableSourceType.Descriptor instead. +func (TableSourceType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescGZIP(), []int{0} +} + +// Describes a BigQuery table. +type BigQueryTableSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The table source type. + TableSourceType TableSourceType `protobuf:"varint,1,opt,name=table_source_type,json=tableSourceType,proto3,enum=google.cloud.datacatalog.v1beta1.TableSourceType" json:"table_source_type,omitempty"` + // Output only. + // + // Types that are assignable to TypeSpec: + // + // *BigQueryTableSpec_ViewSpec + // *BigQueryTableSpec_TableSpec + TypeSpec isBigQueryTableSpec_TypeSpec `protobuf_oneof:"type_spec"` +} + +func (x *BigQueryTableSpec) Reset() { + *x = BigQueryTableSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQueryTableSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQueryTableSpec) ProtoMessage() {} + +func (x *BigQueryTableSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQueryTableSpec.ProtoReflect.Descriptor instead. +func (*BigQueryTableSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescGZIP(), []int{0} +} + +func (x *BigQueryTableSpec) GetTableSourceType() TableSourceType { + if x != nil { + return x.TableSourceType + } + return TableSourceType_TABLE_SOURCE_TYPE_UNSPECIFIED +} + +func (m *BigQueryTableSpec) GetTypeSpec() isBigQueryTableSpec_TypeSpec { + if m != nil { + return m.TypeSpec + } + return nil +} + +func (x *BigQueryTableSpec) GetViewSpec() *ViewSpec { + if x, ok := x.GetTypeSpec().(*BigQueryTableSpec_ViewSpec); ok { + return x.ViewSpec + } + return nil +} + +func (x *BigQueryTableSpec) GetTableSpec() *TableSpec { + if x, ok := x.GetTypeSpec().(*BigQueryTableSpec_TableSpec); ok { + return x.TableSpec + } + return nil +} + +type isBigQueryTableSpec_TypeSpec interface { + isBigQueryTableSpec_TypeSpec() +} + +type BigQueryTableSpec_ViewSpec struct { + // Table view specification. This field should only be populated if + // `table_source_type` is `BIGQUERY_VIEW`. + ViewSpec *ViewSpec `protobuf:"bytes,2,opt,name=view_spec,json=viewSpec,proto3,oneof"` +} + +type BigQueryTableSpec_TableSpec struct { + // Spec of a BigQuery table. This field should only be populated if + // `table_source_type` is `BIGQUERY_TABLE`. + TableSpec *TableSpec `protobuf:"bytes,3,opt,name=table_spec,json=tableSpec,proto3,oneof"` +} + +func (*BigQueryTableSpec_ViewSpec) isBigQueryTableSpec_TypeSpec() {} + +func (*BigQueryTableSpec_TableSpec) isBigQueryTableSpec_TypeSpec() {} + +// Table view specification. +type ViewSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The query that defines the table view. + ViewQuery string `protobuf:"bytes,1,opt,name=view_query,json=viewQuery,proto3" json:"view_query,omitempty"` +} + +func (x *ViewSpec) Reset() { + *x = ViewSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ViewSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewSpec) ProtoMessage() {} + +func (x *ViewSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ViewSpec.ProtoReflect.Descriptor instead. +func (*ViewSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescGZIP(), []int{1} +} + +func (x *ViewSpec) GetViewQuery() string { + if x != nil { + return x.ViewQuery + } + return "" +} + +// Normal BigQuery table spec. +type TableSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, + // `grouped_entry` is the Data Catalog resource name of the date sharded + // grouped entry, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + // Otherwise, `grouped_entry` is empty. + GroupedEntry string `protobuf:"bytes,1,opt,name=grouped_entry,json=groupedEntry,proto3" json:"grouped_entry,omitempty"` +} + +func (x *TableSpec) Reset() { + *x = TableSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableSpec) ProtoMessage() {} + +func (x *TableSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TableSpec.ProtoReflect.Descriptor instead. +func (*TableSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescGZIP(), []int{2} +} + +func (x *TableSpec) GetGroupedEntry() string { + if x != nil { + return x.GroupedEntry + } + return "" +} + +// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. +// Context: +// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding +type BigQueryDateShardedSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The Data Catalog resource name of the dataset entry the current table + // belongs to, for example, + // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. + Dataset string `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Output only. The table name prefix of the shards. The name of any given shard is + // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the + // `table_prefix` is `MyTable`. + TablePrefix string `protobuf:"bytes,2,opt,name=table_prefix,json=tablePrefix,proto3" json:"table_prefix,omitempty"` + // Output only. Total number of shards. + ShardCount int64 `protobuf:"varint,3,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty"` +} + +func (x *BigQueryDateShardedSpec) Reset() { + *x = BigQueryDateShardedSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQueryDateShardedSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQueryDateShardedSpec) ProtoMessage() {} + +func (x *BigQueryDateShardedSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQueryDateShardedSpec.ProtoReflect.Descriptor instead. +func (*BigQueryDateShardedSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescGZIP(), []int{3} +} + +func (x *BigQueryDateShardedSpec) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *BigQueryDateShardedSpec) GetTablePrefix() string { + if x != nil { + return x.TablePrefix + } + return "" +} + +func (x *BigQueryDateShardedSpec) GetShardCount() int64 { + if x != nil { + return x.ShardCount + } + return 0 +} + +var File_google_cloud_datacatalog_v1beta1_table_spec_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x9d, 0x02, 0x0a, 0x11, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x62, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x76, + 0x69, 0x65, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x08, 0x76, 0x69, + 0x65, 0x77, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4c, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x22, 0x2e, 0x0a, 0x08, 0x56, 0x69, 0x65, 0x77, 0x53, 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, + 0x0a, 0x76, 0x69, 0x65, 0x77, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x76, 0x69, 0x65, 0x77, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x22, 0x5a, 0x0a, 0x09, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4d, + 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xab, 0x01, + 0x0a, 0x17, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x65, 0x53, 0x68, + 0x61, 0x72, 0x64, 0x65, 0x64, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x07, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x03, 0xfa, + 0x41, 0x22, 0x0a, 0x20, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x26, 0x0a, + 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0a, 0x73, 0x68, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x5b, 0x0a, 0x0f, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, + 0x0a, 0x1d, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x42, 0x49, 0x47, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x56, 0x49, + 0x45, 0x57, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x49, 0x47, 0x51, 0x55, 0x45, 0x52, 0x59, + 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, + 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_table_spec_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_datacatalog_v1beta1_table_spec_proto_goTypes = []interface{}{ + (TableSourceType)(0), // 0: google.cloud.datacatalog.v1beta1.TableSourceType + (*BigQueryTableSpec)(nil), // 1: google.cloud.datacatalog.v1beta1.BigQueryTableSpec + (*ViewSpec)(nil), // 2: google.cloud.datacatalog.v1beta1.ViewSpec + (*TableSpec)(nil), // 3: google.cloud.datacatalog.v1beta1.TableSpec + (*BigQueryDateShardedSpec)(nil), // 4: google.cloud.datacatalog.v1beta1.BigQueryDateShardedSpec +} +var file_google_cloud_datacatalog_v1beta1_table_spec_proto_depIdxs = []int32{ + 0, // 0: google.cloud.datacatalog.v1beta1.BigQueryTableSpec.table_source_type:type_name -> google.cloud.datacatalog.v1beta1.TableSourceType + 2, // 1: google.cloud.datacatalog.v1beta1.BigQueryTableSpec.view_spec:type_name -> google.cloud.datacatalog.v1beta1.ViewSpec + 3, // 2: google.cloud.datacatalog.v1beta1.BigQueryTableSpec.table_spec:type_name -> google.cloud.datacatalog.v1beta1.TableSpec + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_table_spec_proto_init() } +func file_google_cloud_datacatalog_v1beta1_table_spec_proto_init() { + if File_google_cloud_datacatalog_v1beta1_table_spec_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQueryTableSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ViewSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQueryDateShardedSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*BigQueryTableSpec_ViewSpec)(nil), + (*BigQueryTableSpec_TableSpec)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_table_spec_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_table_spec_proto_depIdxs, + EnumInfos: file_google_cloud_datacatalog_v1beta1_table_spec_proto_enumTypes, + MessageInfos: file_google_cloud_datacatalog_v1beta1_table_spec_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_table_spec_proto = out.File + file_google_cloud_datacatalog_v1beta1_table_spec_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_table_spec_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_table_spec_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go b/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go new file mode 100644 index 000000000000..739dfa3b98f8 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/tags.pb.go @@ -0,0 +1,1144 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/tags.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FieldType_PrimitiveType int32 + +const ( + // This is the default invalid value for a type. + FieldType_PRIMITIVE_TYPE_UNSPECIFIED FieldType_PrimitiveType = 0 + // A double precision number. + FieldType_DOUBLE FieldType_PrimitiveType = 1 + // An UTF-8 string. + FieldType_STRING FieldType_PrimitiveType = 2 + // A boolean value. + FieldType_BOOL FieldType_PrimitiveType = 3 + // A timestamp. + FieldType_TIMESTAMP FieldType_PrimitiveType = 4 +) + +// Enum value maps for FieldType_PrimitiveType. +var ( + FieldType_PrimitiveType_name = map[int32]string{ + 0: "PRIMITIVE_TYPE_UNSPECIFIED", + 1: "DOUBLE", + 2: "STRING", + 3: "BOOL", + 4: "TIMESTAMP", + } + FieldType_PrimitiveType_value = map[string]int32{ + "PRIMITIVE_TYPE_UNSPECIFIED": 0, + "DOUBLE": 1, + "STRING": 2, + "BOOL": 3, + "TIMESTAMP": 4, + } +) + +func (x FieldType_PrimitiveType) Enum() *FieldType_PrimitiveType { + p := new(FieldType_PrimitiveType) + *p = x + return p +} + +func (x FieldType_PrimitiveType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldType_PrimitiveType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datacatalog_v1beta1_tags_proto_enumTypes[0].Descriptor() +} + +func (FieldType_PrimitiveType) Type() protoreflect.EnumType { + return &file_google_cloud_datacatalog_v1beta1_tags_proto_enumTypes[0] +} + +func (x FieldType_PrimitiveType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FieldType_PrimitiveType.Descriptor instead. +func (FieldType_PrimitiveType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{4, 0} +} + +// Tags are used to attach custom metadata to Data Catalog resources. Tags +// conform to the specifications within their tag template. +// +// See [Data Catalog +// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information +// on the permissions needed to create or view tags. +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the tag in URL format. Example: + // + // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} + // + // where `tag_id` is a system-generated identifier. + // Note that this Tag may not actually be stored in the location in this name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The resource name of the tag template that this tag uses. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // + // This field cannot be modified after creation. + Template string `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` + // Output only. The display name of the tag template. + TemplateDisplayName string `protobuf:"bytes,5,opt,name=template_display_name,json=templateDisplayName,proto3" json:"template_display_name,omitempty"` + // The scope within the parent resource that this tag is attached to. If not + // provided, the tag is attached to the parent resource itself. + // Deleting the scope from the parent resource will delete all tags attached + // to that scope. These fields cannot be updated after creation. + // + // Types that are assignable to Scope: + // + // *Tag_Column + Scope isTag_Scope `protobuf_oneof:"scope"` + // Required. This maps the ID of a tag field to the value of and additional information + // about that field. Valid field IDs are defined by the tag's template. A tag + // must have at least 1 field and at most 500 fields. + Fields map[string]*TagField `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{0} +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetTemplate() string { + if x != nil { + return x.Template + } + return "" +} + +func (x *Tag) GetTemplateDisplayName() string { + if x != nil { + return x.TemplateDisplayName + } + return "" +} + +func (m *Tag) GetScope() isTag_Scope { + if m != nil { + return m.Scope + } + return nil +} + +func (x *Tag) GetColumn() string { + if x, ok := x.GetScope().(*Tag_Column); ok { + return x.Column + } + return "" +} + +func (x *Tag) GetFields() map[string]*TagField { + if x != nil { + return x.Fields + } + return nil +} + +type isTag_Scope interface { + isTag_Scope() +} + +type Tag_Column struct { + // Resources like Entry can have schemas associated with them. This scope + // allows users to attach tags to an individual column based on that schema. + // + // For attaching a tag to a nested column, use `.` to separate the column + // names. Example: + // + // * `outer_column.inner_column` + Column string `protobuf:"bytes,4,opt,name=column,proto3,oneof"` +} + +func (*Tag_Column) isTag_Scope() {} + +// Contains the value and supporting information for a field within +// a [Tag][google.cloud.datacatalog.v1beta1.Tag]. +type TagField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The display name of this field. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. The value of this field. + // + // Types that are assignable to Kind: + // + // *TagField_DoubleValue + // *TagField_StringValue + // *TagField_BoolValue + // *TagField_TimestampValue + // *TagField_EnumValue_ + Kind isTagField_Kind `protobuf_oneof:"kind"` + // Output only. The order of this field with respect to other fields in this tag. It can be + // set in [Tag][google.cloud.datacatalog.v1beta1.TagTemplateField.order]. For + // example, a higher value can indicate a more important field. The value can + // be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + Order int32 `protobuf:"varint,7,opt,name=order,proto3" json:"order,omitempty"` +} + +func (x *TagField) Reset() { + *x = TagField{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TagField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TagField) ProtoMessage() {} + +func (x *TagField) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TagField.ProtoReflect.Descriptor instead. +func (*TagField) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{1} +} + +func (x *TagField) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (m *TagField) GetKind() isTagField_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *TagField) GetDoubleValue() float64 { + if x, ok := x.GetKind().(*TagField_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (x *TagField) GetStringValue() string { + if x, ok := x.GetKind().(*TagField_StringValue); ok { + return x.StringValue + } + return "" +} + +func (x *TagField) GetBoolValue() bool { + if x, ok := x.GetKind().(*TagField_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (x *TagField) GetTimestampValue() *timestamppb.Timestamp { + if x, ok := x.GetKind().(*TagField_TimestampValue); ok { + return x.TimestampValue + } + return nil +} + +func (x *TagField) GetEnumValue() *TagField_EnumValue { + if x, ok := x.GetKind().(*TagField_EnumValue_); ok { + return x.EnumValue + } + return nil +} + +func (x *TagField) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +type isTagField_Kind interface { + isTagField_Kind() +} + +type TagField_DoubleValue struct { + // Holds the value for a tag field with double type. + DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,proto3,oneof"` +} + +type TagField_StringValue struct { + // Holds the value for a tag field with string type. + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type TagField_BoolValue struct { + // Holds the value for a tag field with boolean type. + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type TagField_TimestampValue struct { + // Holds the value for a tag field with timestamp type. + TimestampValue *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp_value,json=timestampValue,proto3,oneof"` +} + +type TagField_EnumValue_ struct { + // Holds the value for a tag field with enum type. This value must be + // one of the allowed values in the definition of this enum. + EnumValue *TagField_EnumValue `protobuf:"bytes,6,opt,name=enum_value,json=enumValue,proto3,oneof"` +} + +func (*TagField_DoubleValue) isTagField_Kind() {} + +func (*TagField_StringValue) isTagField_Kind() {} + +func (*TagField_BoolValue) isTagField_Kind() {} + +func (*TagField_TimestampValue) isTagField_Kind() {} + +func (*TagField_EnumValue_) isTagField_Kind() {} + +// A tag template defines a tag, which can have one or more typed fields. +// The template is used to create and attach the tag to GCP resources. +// [Tag template +// roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) +// provide permissions to create, edit, and use the template. See, for example, +// the [TagTemplate +// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role, +// which includes permission to use the tag template to tag resources. +type TagTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the tag template in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} + // + // Note that this TagTemplate and its child resources may not actually be + // stored in the location in this name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The display name for this template. Defaults to an empty string. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Map of tag template field IDs to the settings for the field. + // This map is an exhaustive list of the allowed fields. This map must contain + // at least one field and at most 500 fields. + // + // The keys to this map are tag template field IDs. Field IDs can contain + // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). + // Field IDs must be at least 1 character long and at most + // 64 characters long. Field IDs must start with a letter or underscore. + Fields map[string]*TagTemplateField `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TagTemplate) Reset() { + *x = TagTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TagTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TagTemplate) ProtoMessage() {} + +func (x *TagTemplate) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TagTemplate.ProtoReflect.Descriptor instead. +func (*TagTemplate) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{2} +} + +func (x *TagTemplate) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TagTemplate) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *TagTemplate) GetFields() map[string]*TagTemplateField { + if x != nil { + return x.Fields + } + return nil +} + +// The template for an individual field within a tag template. +type TagTemplateField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name of the tag template field in URL format. Example: + // + // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} + // + // Note that this TagTemplateField may not actually be stored in the location + // in this name. + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // The display name for this field. Defaults to an empty string. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. The type of value this tag field can contain. + Type *FieldType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // Whether this is a required field. Defaults to false. + IsRequired bool `protobuf:"varint,3,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + // The order of this field with respect to other fields in this tag + // template. A higher value indicates a more important field. The value can + // be negative. Multiple fields can have the same order, and field orders + // within a tag do not have to be sequential. + Order int32 `protobuf:"varint,5,opt,name=order,proto3" json:"order,omitempty"` +} + +func (x *TagTemplateField) Reset() { + *x = TagTemplateField{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TagTemplateField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TagTemplateField) ProtoMessage() {} + +func (x *TagTemplateField) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TagTemplateField.ProtoReflect.Descriptor instead. +func (*TagTemplateField) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{3} +} + +func (x *TagTemplateField) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TagTemplateField) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *TagTemplateField) GetType() *FieldType { + if x != nil { + return x.Type + } + return nil +} + +func (x *TagTemplateField) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +func (x *TagTemplateField) GetOrder() int32 { + if x != nil { + return x.Order + } + return 0 +} + +type FieldType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. + // + // Types that are assignable to TypeDecl: + // + // *FieldType_PrimitiveType_ + // *FieldType_EnumType_ + TypeDecl isFieldType_TypeDecl `protobuf_oneof:"type_decl"` +} + +func (x *FieldType) Reset() { + *x = FieldType{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldType) ProtoMessage() {} + +func (x *FieldType) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldType.ProtoReflect.Descriptor instead. +func (*FieldType) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{4} +} + +func (m *FieldType) GetTypeDecl() isFieldType_TypeDecl { + if m != nil { + return m.TypeDecl + } + return nil +} + +func (x *FieldType) GetPrimitiveType() FieldType_PrimitiveType { + if x, ok := x.GetTypeDecl().(*FieldType_PrimitiveType_); ok { + return x.PrimitiveType + } + return FieldType_PRIMITIVE_TYPE_UNSPECIFIED +} + +func (x *FieldType) GetEnumType() *FieldType_EnumType { + if x, ok := x.GetTypeDecl().(*FieldType_EnumType_); ok { + return x.EnumType + } + return nil +} + +type isFieldType_TypeDecl interface { + isFieldType_TypeDecl() +} + +type FieldType_PrimitiveType_ struct { + // Represents primitive types - string, bool etc. + PrimitiveType FieldType_PrimitiveType `protobuf:"varint,1,opt,name=primitive_type,json=primitiveType,proto3,enum=google.cloud.datacatalog.v1beta1.FieldType_PrimitiveType,oneof"` +} + +type FieldType_EnumType_ struct { + // Represents an enum type. + EnumType *FieldType_EnumType `protobuf:"bytes,2,opt,name=enum_type,json=enumType,proto3,oneof"` +} + +func (*FieldType_PrimitiveType_) isFieldType_TypeDecl() {} + +func (*FieldType_EnumType_) isFieldType_TypeDecl() {} + +// Holds an enum value. +type TagField_EnumValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The display name of the enum value. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` +} + +func (x *TagField_EnumValue) Reset() { + *x = TagField_EnumValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TagField_EnumValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TagField_EnumValue) ProtoMessage() {} + +func (x *TagField_EnumValue) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TagField_EnumValue.ProtoReflect.Descriptor instead. +func (*TagField_EnumValue) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *TagField_EnumValue) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +type FieldType_EnumType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required on create; optional on update. The set of allowed values for + // this enum. This set must not be empty, the display names of the values in + // this set must not be empty and the display names of the values must be + // case-insensitively unique within this set. Currently, enum values can + // only be added to the list of allowed values. Deletion and renaming of + // enum values are not supported. Can have up to 500 allowed values. + AllowedValues []*FieldType_EnumType_EnumValue `protobuf:"bytes,1,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"` +} + +func (x *FieldType_EnumType) Reset() { + *x = FieldType_EnumType{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldType_EnumType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldType_EnumType) ProtoMessage() {} + +func (x *FieldType_EnumType) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldType_EnumType.ProtoReflect.Descriptor instead. +func (*FieldType_EnumType) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *FieldType_EnumType) GetAllowedValues() []*FieldType_EnumType_EnumValue { + if x != nil { + return x.AllowedValues + } + return nil +} + +type FieldType_EnumType_EnumValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The display name of the enum value. Must not be an empty string. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` +} + +func (x *FieldType_EnumType_EnumValue) Reset() { + *x = FieldType_EnumType_EnumValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldType_EnumType_EnumValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldType_EnumType_EnumValue) ProtoMessage() {} + +func (x *FieldType_EnumType_EnumValue) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldType_EnumType_EnumValue.ProtoReflect.Descriptor instead. +func (*FieldType_EnumType_EnumValue) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP(), []int{4, 0, 0} +} + +func (x *FieldType_EnumType_EnumValue) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +var File_google_cloud_datacatalog_v1beta1_tags_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_tags_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x03, 0x0a, + 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x15, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x13, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x4e, 0x0a, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x61, 0x67, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x65, 0x0a, 0x0b, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x61, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x3a, 0x81, 0x01, 0xea, 0x41, 0x7e, 0x0a, 0x1e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x12, 0x5c, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x7d, 0x2f, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x7d, 0x2f, 0x74, 0x61, 0x67, + 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x7d, 0x42, 0x07, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x22, 0x8e, 0x03, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x26, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x61, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x48, 0x00, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x1a, 0x2e, 0x0a, 0x09, 0x45, 0x6e, 0x75, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x22, 0xfd, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x1a, 0x6d, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, + 0x70, 0xea, 0x41, 0x6d, 0x0a, 0x26, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x43, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x7d, 0x22, 0xd3, 0x02, 0x0a, 0x10, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, + 0x85, 0x01, 0xea, 0x41, 0x81, 0x01, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x54, 0x61, 0x67, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x52, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x74, 0x61, 0x67, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x5f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x7d, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2f, + 0x7b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x7d, 0x22, 0xdc, 0x03, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x62, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x6d, + 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x65, 0x6e, 0x75, + 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x1a, 0xa6, + 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x65, 0x0a, 0x0e, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x1a, 0x33, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x6d, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x52, 0x49, 0x4d, + 0x49, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, + 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, + 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x04, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, + 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xf8, 0x01, + 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_tags_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_tags_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_tags_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_google_cloud_datacatalog_v1beta1_tags_proto_goTypes = []interface{}{ + (FieldType_PrimitiveType)(0), // 0: google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType + (*Tag)(nil), // 1: google.cloud.datacatalog.v1beta1.Tag + (*TagField)(nil), // 2: google.cloud.datacatalog.v1beta1.TagField + (*TagTemplate)(nil), // 3: google.cloud.datacatalog.v1beta1.TagTemplate + (*TagTemplateField)(nil), // 4: google.cloud.datacatalog.v1beta1.TagTemplateField + (*FieldType)(nil), // 5: google.cloud.datacatalog.v1beta1.FieldType + nil, // 6: google.cloud.datacatalog.v1beta1.Tag.FieldsEntry + (*TagField_EnumValue)(nil), // 7: google.cloud.datacatalog.v1beta1.TagField.EnumValue + nil, // 8: google.cloud.datacatalog.v1beta1.TagTemplate.FieldsEntry + (*FieldType_EnumType)(nil), // 9: google.cloud.datacatalog.v1beta1.FieldType.EnumType + (*FieldType_EnumType_EnumValue)(nil), // 10: google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp +} +var file_google_cloud_datacatalog_v1beta1_tags_proto_depIdxs = []int32{ + 6, // 0: google.cloud.datacatalog.v1beta1.Tag.fields:type_name -> google.cloud.datacatalog.v1beta1.Tag.FieldsEntry + 11, // 1: google.cloud.datacatalog.v1beta1.TagField.timestamp_value:type_name -> google.protobuf.Timestamp + 7, // 2: google.cloud.datacatalog.v1beta1.TagField.enum_value:type_name -> google.cloud.datacatalog.v1beta1.TagField.EnumValue + 8, // 3: google.cloud.datacatalog.v1beta1.TagTemplate.fields:type_name -> google.cloud.datacatalog.v1beta1.TagTemplate.FieldsEntry + 5, // 4: google.cloud.datacatalog.v1beta1.TagTemplateField.type:type_name -> google.cloud.datacatalog.v1beta1.FieldType + 0, // 5: google.cloud.datacatalog.v1beta1.FieldType.primitive_type:type_name -> google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType + 9, // 6: google.cloud.datacatalog.v1beta1.FieldType.enum_type:type_name -> google.cloud.datacatalog.v1beta1.FieldType.EnumType + 2, // 7: google.cloud.datacatalog.v1beta1.Tag.FieldsEntry.value:type_name -> google.cloud.datacatalog.v1beta1.TagField + 4, // 8: google.cloud.datacatalog.v1beta1.TagTemplate.FieldsEntry.value:type_name -> google.cloud.datacatalog.v1beta1.TagTemplateField + 10, // 9: google.cloud.datacatalog.v1beta1.FieldType.EnumType.allowed_values:type_name -> google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_tags_proto_init() } +func file_google_cloud_datacatalog_v1beta1_tags_proto_init() { + if File_google_cloud_datacatalog_v1beta1_tags_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TagField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TagTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TagTemplateField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TagField_EnumValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldType_EnumType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldType_EnumType_EnumValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Tag_Column)(nil), + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*TagField_DoubleValue)(nil), + (*TagField_StringValue)(nil), + (*TagField_BoolValue)(nil), + (*TagField_TimestampValue)(nil), + (*TagField_EnumValue_)(nil), + } + file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*FieldType_PrimitiveType_)(nil), + (*FieldType_EnumType_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_tags_proto_rawDesc, + NumEnums: 1, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_tags_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_tags_proto_depIdxs, + EnumInfos: file_google_cloud_datacatalog_v1beta1_tags_proto_enumTypes, + MessageInfos: file_google_cloud_datacatalog_v1beta1_tags_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_tags_proto = out.File + file_google_cloud_datacatalog_v1beta1_tags_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_tags_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_tags_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go b/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go new file mode 100644 index 000000000000..f7b63f6bd427 --- /dev/null +++ b/datacatalog/apiv1beta1/datacatalogpb/timestamps.pb.go @@ -0,0 +1,216 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datacatalog/v1beta1/timestamps.proto + +package datacatalogpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Timestamps about this resource according to a particular system. +type SystemTimestamps struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The creation time of the resource within the given system. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The last-modified time of the resource within the given system. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. The expiration time of the resource within the given system. + // Currently only apllicable to BigQuery resources. + ExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` +} + +func (x *SystemTimestamps) Reset() { + *x = SystemTimestamps{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SystemTimestamps) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemTimestamps) ProtoMessage() {} + +func (x *SystemTimestamps) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SystemTimestamps.ProtoReflect.Descriptor instead. +func (*SystemTimestamps) Descriptor() ([]byte, []int) { + return file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescGZIP(), []int{0} +} + +func (x *SystemTimestamps) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *SystemTimestamps) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *SystemTimestamps) GetExpireTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpireTime + } + return nil +} + +var File_google_cloud_datacatalog_v1beta1_timestamps_proto protoreflect.FileDescriptor + +var file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x01, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x3b, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x42, 0xe4, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, + 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescOnce sync.Once + file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescData = file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDesc +) + +func file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescGZIP() []byte { + file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescOnce.Do(func() { + file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescData) + }) + return file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDescData +} + +var file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_datacatalog_v1beta1_timestamps_proto_goTypes = []interface{}{ + (*SystemTimestamps)(nil), // 0: google.cloud.datacatalog.v1beta1.SystemTimestamps + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_google_cloud_datacatalog_v1beta1_timestamps_proto_depIdxs = []int32{ + 1, // 0: google.cloud.datacatalog.v1beta1.SystemTimestamps.create_time:type_name -> google.protobuf.Timestamp + 1, // 1: google.cloud.datacatalog.v1beta1.SystemTimestamps.update_time:type_name -> google.protobuf.Timestamp + 1, // 2: google.cloud.datacatalog.v1beta1.SystemTimestamps.expire_time:type_name -> google.protobuf.Timestamp + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() } +func file_google_cloud_datacatalog_v1beta1_timestamps_proto_init() { + if File_google_cloud_datacatalog_v1beta1_timestamps_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SystemTimestamps); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datacatalog_v1beta1_timestamps_proto_goTypes, + DependencyIndexes: file_google_cloud_datacatalog_v1beta1_timestamps_proto_depIdxs, + MessageInfos: file_google_cloud_datacatalog_v1beta1_timestamps_proto_msgTypes, + }.Build() + File_google_cloud_datacatalog_v1beta1_timestamps_proto = out.File + file_google_cloud_datacatalog_v1beta1_timestamps_proto_rawDesc = nil + file_google_cloud_datacatalog_v1beta1_timestamps_proto_goTypes = nil + file_google_cloud_datacatalog_v1beta1_timestamps_proto_depIdxs = nil +} diff --git a/datacatalog/apiv1beta1/doc.go b/datacatalog/apiv1beta1/doc.go index e99ec7ec73b2..698231e9f533 100644 --- a/datacatalog/apiv1beta1/doc.go +++ b/datacatalog/apiv1beta1/doc.go @@ -20,51 +20,62 @@ // A fully managed and highly scalable data discovery and metadata management // service. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datacatalog.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datacatalog.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datacatalog.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &datacatalogpb.SearchCatalogRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1#SearchCatalogRequest. -// } -// it := c.SearchCatalog(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datacatalog.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &datacatalogpb.SearchCatalogRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1#SearchCatalogRequest. +// } +// it := c.SearchCatalog(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. @@ -78,6 +89,8 @@ package datacatalog // import "cloud.google.com/go/datacatalog/apiv1beta1" import ( "context" + "fmt" + "net/http" "os" "runtime" "strconv" @@ -166,3 +179,22 @@ func versionGo() string { } return "UNKNOWN" } + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/datacatalog/apiv1beta1/gapic_metadata.json b/datacatalog/apiv1beta1/gapic_metadata.json index 7d06dd470a03..37ab69f63b84 100644 --- a/datacatalog/apiv1beta1/gapic_metadata.json +++ b/datacatalog/apiv1beta1/gapic_metadata.json @@ -146,6 +146,146 @@ ] } } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CreateEntry": { + "methods": [ + "CreateEntry" + ] + }, + "CreateEntryGroup": { + "methods": [ + "CreateEntryGroup" + ] + }, + "CreateTag": { + "methods": [ + "CreateTag" + ] + }, + "CreateTagTemplate": { + "methods": [ + "CreateTagTemplate" + ] + }, + "CreateTagTemplateField": { + "methods": [ + "CreateTagTemplateField" + ] + }, + "DeleteEntry": { + "methods": [ + "DeleteEntry" + ] + }, + "DeleteEntryGroup": { + "methods": [ + "DeleteEntryGroup" + ] + }, + "DeleteTag": { + "methods": [ + "DeleteTag" + ] + }, + "DeleteTagTemplate": { + "methods": [ + "DeleteTagTemplate" + ] + }, + "DeleteTagTemplateField": { + "methods": [ + "DeleteTagTemplateField" + ] + }, + "GetEntry": { + "methods": [ + "GetEntry" + ] + }, + "GetEntryGroup": { + "methods": [ + "GetEntryGroup" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetTagTemplate": { + "methods": [ + "GetTagTemplate" + ] + }, + "ListEntries": { + "methods": [ + "ListEntries" + ] + }, + "ListEntryGroups": { + "methods": [ + "ListEntryGroups" + ] + }, + "ListTags": { + "methods": [ + "ListTags" + ] + }, + "LookupEntry": { + "methods": [ + "LookupEntry" + ] + }, + "RenameTagTemplateField": { + "methods": [ + "RenameTagTemplateField" + ] + }, + "SearchCatalog": { + "methods": [ + "SearchCatalog" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateEntry": { + "methods": [ + "UpdateEntry" + ] + }, + "UpdateEntryGroup": { + "methods": [ + "UpdateEntryGroup" + ] + }, + "UpdateTag": { + "methods": [ + "UpdateTag" + ] + }, + "UpdateTagTemplate": { + "methods": [ + "UpdateTagTemplate" + ] + }, + "UpdateTagTemplateField": { + "methods": [ + "UpdateTagTemplateField" + ] + } + } } } }, @@ -220,6 +360,76 @@ ] } } + }, + "rest": { + "libraryClient": "PolicyTagManagerClient", + "rpcs": { + "CreatePolicyTag": { + "methods": [ + "CreatePolicyTag" + ] + }, + "CreateTaxonomy": { + "methods": [ + "CreateTaxonomy" + ] + }, + "DeletePolicyTag": { + "methods": [ + "DeletePolicyTag" + ] + }, + "DeleteTaxonomy": { + "methods": [ + "DeleteTaxonomy" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetPolicyTag": { + "methods": [ + "GetPolicyTag" + ] + }, + "GetTaxonomy": { + "methods": [ + "GetTaxonomy" + ] + }, + "ListPolicyTags": { + "methods": [ + "ListPolicyTags" + ] + }, + "ListTaxonomies": { + "methods": [ + "ListTaxonomies" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdatePolicyTag": { + "methods": [ + "UpdatePolicyTag" + ] + }, + "UpdateTaxonomy": { + "methods": [ + "UpdateTaxonomy" + ] + } + } } } }, @@ -239,6 +449,21 @@ ] } } + }, + "rest": { + "libraryClient": "PolicyTagManagerSerializationClient", + "rpcs": { + "ExportTaxonomies": { + "methods": [ + "ExportTaxonomies" + ] + }, + "ImportTaxonomies": { + "methods": [ + "ImportTaxonomies" + ] + } + } } } } diff --git a/datacatalog/apiv1beta1/policy_tag_manager_client.go b/datacatalog/apiv1beta1/policy_tag_manager_client.go index 098a744c336d..3fa3bf63f446 100644 --- a/datacatalog/apiv1beta1/policy_tag_manager_client.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_client.go @@ -17,20 +17,26 @@ package datacatalog import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" datacatalogpb "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1" iampb "google.golang.org/genproto/googleapis/iam/v1" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -83,6 +89,24 @@ func defaultPolicyTagManagerCallOptions() *PolicyTagManagerCallOptions { } } +func defaultPolicyTagManagerRESTCallOptions() *PolicyTagManagerCallOptions { + return &PolicyTagManagerCallOptions{ + CreateTaxonomy: []gax.CallOption{}, + DeleteTaxonomy: []gax.CallOption{}, + UpdateTaxonomy: []gax.CallOption{}, + ListTaxonomies: []gax.CallOption{}, + GetTaxonomy: []gax.CallOption{}, + CreatePolicyTag: []gax.CallOption{}, + DeletePolicyTag: []gax.CallOption{}, + UpdatePolicyTag: []gax.CallOption{}, + ListPolicyTags: []gax.CallOption{}, + GetPolicyTag: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + } +} + // internalPolicyTagManagerClient is an interface that defines the methods available from Google Cloud Data Catalog API. type internalPolicyTagManagerClient interface { Close() error @@ -133,7 +157,8 @@ func (c *PolicyTagManagerClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PolicyTagManagerClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -267,7 +292,8 @@ func NewPolicyTagManagerClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *policyTagManagerGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -287,6 +313,75 @@ func (c *policyTagManagerGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type policyTagManagerRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing PolicyTagManagerClient + CallOptions **PolicyTagManagerCallOptions +} + +// NewPolicyTagManagerRESTClient creates a new policy tag manager rest client. +// +// The policy tag manager API service allows clients to manage their taxonomies +// and policy tags. +func NewPolicyTagManagerRESTClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerClient, error) { + clientOpts := append(defaultPolicyTagManagerRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultPolicyTagManagerRESTCallOptions() + c := &policyTagManagerRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &PolicyTagManagerClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultPolicyTagManagerRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://datacatalog.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://datacatalog.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://datacatalog.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *policyTagManagerRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *policyTagManagerRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *policyTagManagerRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *policyTagManagerGRPCClient) CreateTaxonomy(ctx context.Context, req *datacatalogpb.CreateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -556,6 +651,798 @@ func (c *policyTagManagerGRPCClient) TestIamPermissions(ctx context.Context, req return resp, nil } +// CreateTaxonomy creates a taxonomy in the specified project. +func (c *policyTagManagerRESTClient) CreateTaxonomy(ctx context.Context, req *datacatalogpb.CreateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTaxonomy() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/taxonomies", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateTaxonomy[0:len((*c.CallOptions).CreateTaxonomy):len((*c.CallOptions).CreateTaxonomy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Taxonomy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteTaxonomy deletes a taxonomy. This operation will also delete all +// policy tags in this taxonomy along with their associated policies. +func (c *policyTagManagerRESTClient) DeleteTaxonomy(ctx context.Context, req *datacatalogpb.DeleteTaxonomyRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// UpdateTaxonomy updates a taxonomy. +func (c *policyTagManagerRESTClient) UpdateTaxonomy(ctx context.Context, req *datacatalogpb.UpdateTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetTaxonomy() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetTaxonomy().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "taxonomy.name", url.QueryEscape(req.GetTaxonomy().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateTaxonomy[0:len((*c.CallOptions).UpdateTaxonomy):len((*c.CallOptions).UpdateTaxonomy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Taxonomy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListTaxonomies lists all taxonomies in a project in a particular location that the caller +// has permission to view. +func (c *policyTagManagerRESTClient) ListTaxonomies(ctx context.Context, req *datacatalogpb.ListTaxonomiesRequest, opts ...gax.CallOption) *TaxonomyIterator { + it := &TaxonomyIterator{} + req = proto.Clone(req).(*datacatalogpb.ListTaxonomiesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datacatalogpb.Taxonomy, string, error) { + resp := &datacatalogpb.ListTaxonomiesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/taxonomies", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetTaxonomies(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetTaxonomy gets a taxonomy. +func (c *policyTagManagerRESTClient) GetTaxonomy(ctx context.Context, req *datacatalogpb.GetTaxonomyRequest, opts ...gax.CallOption) (*datacatalogpb.Taxonomy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetTaxonomy[0:len((*c.CallOptions).GetTaxonomy):len((*c.CallOptions).GetTaxonomy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.Taxonomy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreatePolicyTag creates a policy tag in the specified taxonomy. +func (c *policyTagManagerRESTClient) CreatePolicyTag(ctx context.Context, req *datacatalogpb.CreatePolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetPolicyTag() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/policyTags", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreatePolicyTag[0:len((*c.CallOptions).CreatePolicyTag):len((*c.CallOptions).CreatePolicyTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.PolicyTag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeletePolicyTag deletes a policy tag. Also deletes all of its descendant policy tags. +func (c *policyTagManagerRESTClient) DeletePolicyTag(ctx context.Context, req *datacatalogpb.DeletePolicyTagRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// UpdatePolicyTag updates a policy tag. +func (c *policyTagManagerRESTClient) UpdatePolicyTag(ctx context.Context, req *datacatalogpb.UpdatePolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetPolicyTag() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetPolicyTag().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "policy_tag.name", url.QueryEscape(req.GetPolicyTag().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdatePolicyTag[0:len((*c.CallOptions).UpdatePolicyTag):len((*c.CallOptions).UpdatePolicyTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.PolicyTag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListPolicyTags lists all policy tags in a taxonomy. +func (c *policyTagManagerRESTClient) ListPolicyTags(ctx context.Context, req *datacatalogpb.ListPolicyTagsRequest, opts ...gax.CallOption) *PolicyTagIterator { + it := &PolicyTagIterator{} + req = proto.Clone(req).(*datacatalogpb.ListPolicyTagsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datacatalogpb.PolicyTag, string, error) { + resp := &datacatalogpb.ListPolicyTagsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/policyTags", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetPolicyTags(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetPolicyTag gets a policy tag. +func (c *policyTagManagerRESTClient) GetPolicyTag(ctx context.Context, req *datacatalogpb.GetPolicyTagRequest, opts ...gax.CallOption) (*datacatalogpb.PolicyTag, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetPolicyTag[0:len((*c.CallOptions).GetPolicyTag):len((*c.CallOptions).GetPolicyTag)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.PolicyTag{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetIamPolicy gets the IAM policy for a taxonomy or a policy tag. +func (c *policyTagManagerRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the IAM policy for a taxonomy or a policy tag. +func (c *policyTagManagerRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns the permissions that a caller has on the specified taxonomy or +// policy tag. +func (c *policyTagManagerRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + // PolicyTagIterator manages a stream of *datacatalogpb.PolicyTag. type PolicyTagIterator struct { items []*datacatalogpb.PolicyTag diff --git a/datacatalog/apiv1beta1/policy_tag_manager_client_example_test.go b/datacatalog/apiv1beta1/policy_tag_manager_client_example_test.go index bcc24bc979aa..9c92ba8d3ce8 100644 --- a/datacatalog/apiv1beta1/policy_tag_manager_client_example_test.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewPolicyTagManagerClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -37,8 +42,30 @@ func ExampleNewPolicyTagManagerClient() { _ = c } +func ExampleNewPolicyTagManagerRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datacatalog.NewPolicyTagManagerRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExamplePolicyTagManagerClient_CreateTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -59,6 +86,11 @@ func ExamplePolicyTagManagerClient_CreateTaxonomy() { func ExamplePolicyTagManagerClient_DeleteTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +109,11 @@ func ExamplePolicyTagManagerClient_DeleteTaxonomy() { func ExamplePolicyTagManagerClient_UpdateTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -97,6 +134,11 @@ func ExamplePolicyTagManagerClient_UpdateTaxonomy() { func ExamplePolicyTagManagerClient_ListTaxonomies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -123,6 +165,11 @@ func ExamplePolicyTagManagerClient_ListTaxonomies() { func ExamplePolicyTagManagerClient_GetTaxonomy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -143,6 +190,11 @@ func ExamplePolicyTagManagerClient_GetTaxonomy() { func ExamplePolicyTagManagerClient_CreatePolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -163,6 +215,11 @@ func ExamplePolicyTagManagerClient_CreatePolicyTag() { func ExamplePolicyTagManagerClient_DeletePolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -181,6 +238,11 @@ func ExamplePolicyTagManagerClient_DeletePolicyTag() { func ExamplePolicyTagManagerClient_UpdatePolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -201,6 +263,11 @@ func ExamplePolicyTagManagerClient_UpdatePolicyTag() { func ExamplePolicyTagManagerClient_ListPolicyTags() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -227,6 +294,11 @@ func ExamplePolicyTagManagerClient_ListPolicyTags() { func ExamplePolicyTagManagerClient_GetPolicyTag() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -247,6 +319,11 @@ func ExamplePolicyTagManagerClient_GetPolicyTag() { func ExamplePolicyTagManagerClient_GetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -267,6 +344,11 @@ func ExamplePolicyTagManagerClient_GetIamPolicy() { func ExamplePolicyTagManagerClient_SetIamPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. @@ -287,6 +369,11 @@ func ExamplePolicyTagManagerClient_SetIamPolicy() { func ExamplePolicyTagManagerClient_TestIamPermissions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go b/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go index 1dcf8cd092e9..8c810eecbfd8 100644 --- a/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_serialization_client.go @@ -17,18 +17,24 @@ package datacatalog import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" datacatalogpb "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" ) var newPolicyTagManagerSerializationClientHook clientHook @@ -58,6 +64,13 @@ func defaultPolicyTagManagerSerializationCallOptions() *PolicyTagManagerSerializ } } +func defaultPolicyTagManagerSerializationRESTCallOptions() *PolicyTagManagerSerializationCallOptions { + return &PolicyTagManagerSerializationCallOptions{ + ImportTaxonomies: []gax.CallOption{}, + ExportTaxonomies: []gax.CallOption{}, + } +} + // internalPolicyTagManagerSerializationClient is an interface that defines the methods available from Google Cloud Data Catalog API. type internalPolicyTagManagerSerializationClient interface { Close() error @@ -97,7 +110,8 @@ func (c *PolicyTagManagerSerializationClient) setGoogleClientInfo(keyval ...stri // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PolicyTagManagerSerializationClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -180,7 +194,8 @@ func NewPolicyTagManagerSerializationClient(ctx context.Context, opts ...option. // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *policyTagManagerSerializationGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -200,6 +215,75 @@ func (c *policyTagManagerSerializationGRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type policyTagManagerSerializationRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing PolicyTagManagerSerializationClient + CallOptions **PolicyTagManagerSerializationCallOptions +} + +// NewPolicyTagManagerSerializationRESTClient creates a new policy tag manager serialization rest client. +// +// Policy tag manager serialization API service allows clients to manipulate +// their taxonomies and policy tags data with serialized format. +func NewPolicyTagManagerSerializationRESTClient(ctx context.Context, opts ...option.ClientOption) (*PolicyTagManagerSerializationClient, error) { + clientOpts := append(defaultPolicyTagManagerSerializationRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultPolicyTagManagerSerializationRESTCallOptions() + c := &policyTagManagerSerializationRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &PolicyTagManagerSerializationClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultPolicyTagManagerSerializationRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://datacatalog.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://datacatalog.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://datacatalog.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *policyTagManagerSerializationRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *policyTagManagerSerializationRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *policyTagManagerSerializationRESTClient) Connection() *grpc.ClientConn { + return nil +} func (c *policyTagManagerSerializationGRPCClient) ImportTaxonomies(ctx context.Context, req *datacatalogpb.ImportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ImportTaxonomiesResponse, error) { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -233,3 +317,132 @@ func (c *policyTagManagerSerializationGRPCClient) ExportTaxonomies(ctx context.C } return resp, nil } + +// ImportTaxonomies imports all taxonomies and their policy tags to a project as new +// taxonomies. +// +// This method provides a bulk taxonomy / policy tag creation using nested +// proto structure. +func (c *policyTagManagerSerializationRESTClient) ImportTaxonomies(ctx context.Context, req *datacatalogpb.ImportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ImportTaxonomiesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/taxonomies:import", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ImportTaxonomies[0:len((*c.CallOptions).ImportTaxonomies):len((*c.CallOptions).ImportTaxonomies)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.ImportTaxonomiesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ExportTaxonomies exports all taxonomies and their policy tags in a project. +// +// This method generates SerializedTaxonomy protos with nested policy tags +// that can be used as an input for future ImportTaxonomies calls. +func (c *policyTagManagerSerializationRESTClient) ExportTaxonomies(ctx context.Context, req *datacatalogpb.ExportTaxonomiesRequest, opts ...gax.CallOption) (*datacatalogpb.ExportTaxonomiesResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/taxonomies:export", req.GetParent()) + + params := url.Values{} + if req.GetSerializedTaxonomies() { + params.Add("serializedTaxonomies", fmt.Sprintf("%v", req.GetSerializedTaxonomies())) + } + if req.GetTaxonomies() != nil { + params.Add("taxonomies", fmt.Sprintf("%v", req.GetTaxonomies())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ExportTaxonomies[0:len((*c.CallOptions).ExportTaxonomies):len((*c.CallOptions).ExportTaxonomies)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datacatalogpb.ExportTaxonomiesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} diff --git a/datacatalog/apiv1beta1/policy_tag_manager_serialization_client_example_test.go b/datacatalog/apiv1beta1/policy_tag_manager_serialization_client_example_test.go index afe913969d0e..0c47c45dffc3 100644 --- a/datacatalog/apiv1beta1/policy_tag_manager_serialization_client_example_test.go +++ b/datacatalog/apiv1beta1/policy_tag_manager_serialization_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewPolicyTagManagerSerializationClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. @@ -35,8 +40,30 @@ func ExampleNewPolicyTagManagerSerializationClient() { _ = c } +func ExampleNewPolicyTagManagerSerializationRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datacatalog.NewPolicyTagManagerSerializationRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExamplePolicyTagManagerSerializationClient_ImportTaxonomies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +84,11 @@ func ExamplePolicyTagManagerSerializationClient_ImportTaxonomies() { func ExamplePolicyTagManagerSerializationClient_ExportTaxonomies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datacatalog/go.mod b/datacatalog/go.mod index 8408f5c40d71..38f668928e20 100644 --- a/datacatalog/go.mod +++ b/datacatalog/go.mod @@ -1,11 +1,25 @@ module cloud.google.com/go/datacatalog -go 1.16 +go 1.17 require ( github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/datacatalog/go.sum b/datacatalog/go.sum index a7f80a16a22d..b56eeb960121 100644 --- a/datacatalog/go.sum +++ b/datacatalog/go.sum @@ -161,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -289,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -310,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -382,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -496,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -584,8 +587,8 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -616,8 +619,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -632,8 +636,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/datacatalog/internal/version.go b/datacatalog/internal/version.go index bb0feadfd279..e93235c20322 100644 --- a/datacatalog/internal/version.go +++ b/datacatalog/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.3.0" +const Version = "1.5.0" diff --git a/dataflow/CHANGES.md b/dataflow/CHANGES.md index 532b98ecd7ff..415bf1f14e67 100644 --- a/dataflow/CHANGES.md +++ b/dataflow/CHANGES.md @@ -1,5 +1,19 @@ # Changes +## [0.6.0](https://github.com/googleapis/google-cloud-go/compare/dataflow/v0.5.1...dataflow/v0.6.0) (2022-09-19) + + +### Features + +* **dataflow:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [0.5.1](https://github.com/googleapis/google-cloud-go/compare/dataflow/v0.5.0...dataflow/v0.5.1) (2022-07-12) + + +### Documentation + +* **dataflow:** corrected the Dataflow job name regex ([1732e43](https://github.com/googleapis/google-cloud-go/commit/1732e4334c84019d93775d861be5c0008e3f5245)) + ## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/dataflow/v0.4.0...dataflow/v0.5.0) (2022-06-29) diff --git a/dataflow/apiv1beta3/dataflowpb/environment.pb.go b/dataflow/apiv1beta3/dataflowpb/environment.pb.go new file mode 100644 index 000000000000..9e05384241b7 --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/environment.pb.go @@ -0,0 +1,2174 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/environment.proto + +package dataflowpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Specifies the processing model used by a +// [google.dataflow.v1beta3.Job], which determines the way the Job is +// managed by the Cloud Dataflow service (how workers are scheduled, how +// inputs are sharded, etc). +type JobType int32 + +const ( + // The type of the job is unspecified, or unknown. + JobType_JOB_TYPE_UNKNOWN JobType = 0 + // A batch job with a well-defined end point: data is read, data is + // processed, data is written, and the job is done. + JobType_JOB_TYPE_BATCH JobType = 1 + // A continuously streaming job with no end: data is read, + // processed, and written continuously. + JobType_JOB_TYPE_STREAMING JobType = 2 +) + +// Enum value maps for JobType. +var ( + JobType_name = map[int32]string{ + 0: "JOB_TYPE_UNKNOWN", + 1: "JOB_TYPE_BATCH", + 2: "JOB_TYPE_STREAMING", + } + JobType_value = map[string]int32{ + "JOB_TYPE_UNKNOWN": 0, + "JOB_TYPE_BATCH": 1, + "JOB_TYPE_STREAMING": 2, + } +) + +func (x JobType) Enum() *JobType { + p := new(JobType) + *p = x + return p +} + +func (x JobType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobType) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[0].Descriptor() +} + +func (JobType) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[0] +} + +func (x JobType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobType.Descriptor instead. +func (JobType) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{0} +} + +// Specifies the resource to optimize for in Flexible Resource Scheduling. +type FlexResourceSchedulingGoal int32 + +const ( + // Run in the default mode. + FlexResourceSchedulingGoal_FLEXRS_UNSPECIFIED FlexResourceSchedulingGoal = 0 + // Optimize for lower execution time. + FlexResourceSchedulingGoal_FLEXRS_SPEED_OPTIMIZED FlexResourceSchedulingGoal = 1 + // Optimize for lower cost. + FlexResourceSchedulingGoal_FLEXRS_COST_OPTIMIZED FlexResourceSchedulingGoal = 2 +) + +// Enum value maps for FlexResourceSchedulingGoal. +var ( + FlexResourceSchedulingGoal_name = map[int32]string{ + 0: "FLEXRS_UNSPECIFIED", + 1: "FLEXRS_SPEED_OPTIMIZED", + 2: "FLEXRS_COST_OPTIMIZED", + } + FlexResourceSchedulingGoal_value = map[string]int32{ + "FLEXRS_UNSPECIFIED": 0, + "FLEXRS_SPEED_OPTIMIZED": 1, + "FLEXRS_COST_OPTIMIZED": 2, + } +) + +func (x FlexResourceSchedulingGoal) Enum() *FlexResourceSchedulingGoal { + p := new(FlexResourceSchedulingGoal) + *p = x + return p +} + +func (x FlexResourceSchedulingGoal) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FlexResourceSchedulingGoal) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[1].Descriptor() +} + +func (FlexResourceSchedulingGoal) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[1] +} + +func (x FlexResourceSchedulingGoal) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FlexResourceSchedulingGoal.Descriptor instead. +func (FlexResourceSchedulingGoal) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{1} +} + +// Specifies what happens to a resource when a Cloud Dataflow +// [google.dataflow.v1beta3.Job][google.dataflow.v1beta3.Job] has completed. +type TeardownPolicy int32 + +const ( + // The teardown policy isn't specified, or is unknown. + TeardownPolicy_TEARDOWN_POLICY_UNKNOWN TeardownPolicy = 0 + // Always teardown the resource. + TeardownPolicy_TEARDOWN_ALWAYS TeardownPolicy = 1 + // Teardown the resource on success. This is useful for debugging + // failures. + TeardownPolicy_TEARDOWN_ON_SUCCESS TeardownPolicy = 2 + // Never teardown the resource. This is useful for debugging and + // development. + TeardownPolicy_TEARDOWN_NEVER TeardownPolicy = 3 +) + +// Enum value maps for TeardownPolicy. +var ( + TeardownPolicy_name = map[int32]string{ + 0: "TEARDOWN_POLICY_UNKNOWN", + 1: "TEARDOWN_ALWAYS", + 2: "TEARDOWN_ON_SUCCESS", + 3: "TEARDOWN_NEVER", + } + TeardownPolicy_value = map[string]int32{ + "TEARDOWN_POLICY_UNKNOWN": 0, + "TEARDOWN_ALWAYS": 1, + "TEARDOWN_ON_SUCCESS": 2, + "TEARDOWN_NEVER": 3, + } +) + +func (x TeardownPolicy) Enum() *TeardownPolicy { + p := new(TeardownPolicy) + *p = x + return p +} + +func (x TeardownPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TeardownPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[2].Descriptor() +} + +func (TeardownPolicy) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[2] +} + +func (x TeardownPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TeardownPolicy.Descriptor instead. +func (TeardownPolicy) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{2} +} + +// The default set of packages to be staged on a pool of workers. +type DefaultPackageSet int32 + +const ( + // The default set of packages to stage is unknown, or unspecified. + DefaultPackageSet_DEFAULT_PACKAGE_SET_UNKNOWN DefaultPackageSet = 0 + // Indicates that no packages should be staged at the worker unless + // explicitly specified by the job. + DefaultPackageSet_DEFAULT_PACKAGE_SET_NONE DefaultPackageSet = 1 + // Stage packages typically useful to workers written in Java. + DefaultPackageSet_DEFAULT_PACKAGE_SET_JAVA DefaultPackageSet = 2 + // Stage packages typically useful to workers written in Python. + DefaultPackageSet_DEFAULT_PACKAGE_SET_PYTHON DefaultPackageSet = 3 +) + +// Enum value maps for DefaultPackageSet. +var ( + DefaultPackageSet_name = map[int32]string{ + 0: "DEFAULT_PACKAGE_SET_UNKNOWN", + 1: "DEFAULT_PACKAGE_SET_NONE", + 2: "DEFAULT_PACKAGE_SET_JAVA", + 3: "DEFAULT_PACKAGE_SET_PYTHON", + } + DefaultPackageSet_value = map[string]int32{ + "DEFAULT_PACKAGE_SET_UNKNOWN": 0, + "DEFAULT_PACKAGE_SET_NONE": 1, + "DEFAULT_PACKAGE_SET_JAVA": 2, + "DEFAULT_PACKAGE_SET_PYTHON": 3, + } +) + +func (x DefaultPackageSet) Enum() *DefaultPackageSet { + p := new(DefaultPackageSet) + *p = x + return p +} + +func (x DefaultPackageSet) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DefaultPackageSet) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[3].Descriptor() +} + +func (DefaultPackageSet) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[3] +} + +func (x DefaultPackageSet) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DefaultPackageSet.Descriptor instead. +func (DefaultPackageSet) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{3} +} + +// Specifies the algorithm used to determine the number of worker +// processes to run at any given point in time, based on the amount of +// data left to process, the number of workers, and how quickly +// existing workers are processing data. +type AutoscalingAlgorithm int32 + +const ( + // The algorithm is unknown, or unspecified. + AutoscalingAlgorithm_AUTOSCALING_ALGORITHM_UNKNOWN AutoscalingAlgorithm = 0 + // Disable autoscaling. + AutoscalingAlgorithm_AUTOSCALING_ALGORITHM_NONE AutoscalingAlgorithm = 1 + // Increase worker count over time to reduce job execution time. + AutoscalingAlgorithm_AUTOSCALING_ALGORITHM_BASIC AutoscalingAlgorithm = 2 +) + +// Enum value maps for AutoscalingAlgorithm. +var ( + AutoscalingAlgorithm_name = map[int32]string{ + 0: "AUTOSCALING_ALGORITHM_UNKNOWN", + 1: "AUTOSCALING_ALGORITHM_NONE", + 2: "AUTOSCALING_ALGORITHM_BASIC", + } + AutoscalingAlgorithm_value = map[string]int32{ + "AUTOSCALING_ALGORITHM_UNKNOWN": 0, + "AUTOSCALING_ALGORITHM_NONE": 1, + "AUTOSCALING_ALGORITHM_BASIC": 2, + } +) + +func (x AutoscalingAlgorithm) Enum() *AutoscalingAlgorithm { + p := new(AutoscalingAlgorithm) + *p = x + return p +} + +func (x AutoscalingAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AutoscalingAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[4].Descriptor() +} + +func (AutoscalingAlgorithm) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[4] +} + +func (x AutoscalingAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AutoscalingAlgorithm.Descriptor instead. +func (AutoscalingAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{4} +} + +// Specifies how IP addresses should be allocated to the worker machines. +type WorkerIPAddressConfiguration int32 + +const ( + // The configuration is unknown, or unspecified. + WorkerIPAddressConfiguration_WORKER_IP_UNSPECIFIED WorkerIPAddressConfiguration = 0 + // Workers should have public IP addresses. + WorkerIPAddressConfiguration_WORKER_IP_PUBLIC WorkerIPAddressConfiguration = 1 + // Workers should have private IP addresses. + WorkerIPAddressConfiguration_WORKER_IP_PRIVATE WorkerIPAddressConfiguration = 2 +) + +// Enum value maps for WorkerIPAddressConfiguration. +var ( + WorkerIPAddressConfiguration_name = map[int32]string{ + 0: "WORKER_IP_UNSPECIFIED", + 1: "WORKER_IP_PUBLIC", + 2: "WORKER_IP_PRIVATE", + } + WorkerIPAddressConfiguration_value = map[string]int32{ + "WORKER_IP_UNSPECIFIED": 0, + "WORKER_IP_PUBLIC": 1, + "WORKER_IP_PRIVATE": 2, + } +) + +func (x WorkerIPAddressConfiguration) Enum() *WorkerIPAddressConfiguration { + p := new(WorkerIPAddressConfiguration) + *p = x + return p +} + +func (x WorkerIPAddressConfiguration) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkerIPAddressConfiguration) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[5].Descriptor() +} + +func (WorkerIPAddressConfiguration) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[5] +} + +func (x WorkerIPAddressConfiguration) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkerIPAddressConfiguration.Descriptor instead. +func (WorkerIPAddressConfiguration) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{5} +} + +// Specifies the shuffle mode used by a +// [google.dataflow.v1beta3.Job], which determines the approach data is shuffled +// during processing. More details in: +// https://cloud.google.com/dataflow/docs/guides/deploying-a-pipeline#dataflow-shuffle +type ShuffleMode int32 + +const ( + // Shuffle mode information is not available. + ShuffleMode_SHUFFLE_MODE_UNSPECIFIED ShuffleMode = 0 + // Shuffle is done on the worker VMs. + ShuffleMode_VM_BASED ShuffleMode = 1 + // Shuffle is done on the service side. + ShuffleMode_SERVICE_BASED ShuffleMode = 2 +) + +// Enum value maps for ShuffleMode. +var ( + ShuffleMode_name = map[int32]string{ + 0: "SHUFFLE_MODE_UNSPECIFIED", + 1: "VM_BASED", + 2: "SERVICE_BASED", + } + ShuffleMode_value = map[string]int32{ + "SHUFFLE_MODE_UNSPECIFIED": 0, + "VM_BASED": 1, + "SERVICE_BASED": 2, + } +) + +func (x ShuffleMode) Enum() *ShuffleMode { + p := new(ShuffleMode) + *p = x + return p +} + +func (x ShuffleMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ShuffleMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_environment_proto_enumTypes[6].Descriptor() +} + +func (ShuffleMode) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_environment_proto_enumTypes[6] +} + +func (x ShuffleMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ShuffleMode.Descriptor instead. +func (ShuffleMode) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{6} +} + +// Describes the environment in which a Dataflow Job runs. +type Environment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prefix of the resources the system should use for temporary + // storage. The system will append the suffix "/temp-{JOBNAME} to + // this resource prefix, where {JOBNAME} is the value of the + // job_name field. The resulting bucket and object prefix is used + // as the prefix of the resources used to store temporary data + // needed during the job execution. NOTE: This will override the + // value in taskrunner_settings. + // The supported resource type is: + // + // Google Cloud Storage: + // + // storage.googleapis.com/{bucket}/{object} + // bucket.storage.googleapis.com/{object} + TempStoragePrefix string `protobuf:"bytes,1,opt,name=temp_storage_prefix,json=tempStoragePrefix,proto3" json:"temp_storage_prefix,omitempty"` + // The type of cluster manager API to use. If unknown or + // unspecified, the service will attempt to choose a reasonable + // default. This should be in the form of the API service name, + // e.g. "compute.googleapis.com". + ClusterManagerApiService string `protobuf:"bytes,2,opt,name=cluster_manager_api_service,json=clusterManagerApiService,proto3" json:"cluster_manager_api_service,omitempty"` + // The list of experiments to enable. This field should be used for SDK + // related experiments and not for service related experiments. The proper + // field for service related experiments is service_options. + Experiments []string `protobuf:"bytes,3,rep,name=experiments,proto3" json:"experiments,omitempty"` + // The list of service options to enable. This field should be used for + // service related experiments only. These experiments, when graduating to GA, + // should be replaced by dedicated fields or become default (i.e. always on). + ServiceOptions []string `protobuf:"bytes,16,rep,name=service_options,json=serviceOptions,proto3" json:"service_options,omitempty"` + // If set, contains the Cloud KMS key identifier used to encrypt data + // at rest, AKA a Customer Managed Encryption Key (CMEK). + // + // Format: + // + // projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY + ServiceKmsKeyName string `protobuf:"bytes,12,opt,name=service_kms_key_name,json=serviceKmsKeyName,proto3" json:"service_kms_key_name,omitempty"` + // The worker pools. At least one "harness" worker pool must be + // specified in order for the job to have workers. + WorkerPools []*WorkerPool `protobuf:"bytes,4,rep,name=worker_pools,json=workerPools,proto3" json:"worker_pools,omitempty"` + // A description of the process that generated the request. + UserAgent *structpb.Struct `protobuf:"bytes,5,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + // A structure describing which components and their versions of the service + // are required in order to run the job. + Version *structpb.Struct `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + // The dataset for the current project where various workflow + // related tables are stored. + // + // The supported resource type is: + // + // Google BigQuery: + // + // bigquery.googleapis.com/{dataset} + Dataset string `protobuf:"bytes,7,opt,name=dataset,proto3" json:"dataset,omitempty"` + // The Cloud Dataflow SDK pipeline options specified by the user. These + // options are passed through the service and are used to recreate the + // SDK pipeline options on the worker in a language agnostic and platform + // independent way. + SdkPipelineOptions *structpb.Struct `protobuf:"bytes,8,opt,name=sdk_pipeline_options,json=sdkPipelineOptions,proto3" json:"sdk_pipeline_options,omitempty"` + // Experimental settings. + InternalExperiments *anypb.Any `protobuf:"bytes,9,opt,name=internal_experiments,json=internalExperiments,proto3" json:"internal_experiments,omitempty"` + // Identity to run virtual machines as. Defaults to the default account. + ServiceAccountEmail string `protobuf:"bytes,10,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"` + // Which Flexible Resource Scheduling mode to run in. + FlexResourceSchedulingGoal FlexResourceSchedulingGoal `protobuf:"varint,11,opt,name=flex_resource_scheduling_goal,json=flexResourceSchedulingGoal,proto3,enum=google.dataflow.v1beta3.FlexResourceSchedulingGoal" json:"flex_resource_scheduling_goal,omitempty"` + // The Compute Engine region + // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in + // which worker processing should occur, e.g. "us-west1". Mutually exclusive + // with worker_zone. If neither worker_region nor worker_zone is specified, + // default to the control plane's region. + WorkerRegion string `protobuf:"bytes,13,opt,name=worker_region,json=workerRegion,proto3" json:"worker_region,omitempty"` + // The Compute Engine zone + // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in + // which worker processing should occur, e.g. "us-west1-a". Mutually exclusive + // with worker_region. If neither worker_region nor worker_zone is specified, + // a zone in the control plane's region is chosen based on available capacity. + WorkerZone string `protobuf:"bytes,14,opt,name=worker_zone,json=workerZone,proto3" json:"worker_zone,omitempty"` + // Output only. The shuffle mode used for the job. + ShuffleMode ShuffleMode `protobuf:"varint,15,opt,name=shuffle_mode,json=shuffleMode,proto3,enum=google.dataflow.v1beta3.ShuffleMode" json:"shuffle_mode,omitempty"` + // Any debugging options to be supplied to the job. + DebugOptions *DebugOptions `protobuf:"bytes,17,opt,name=debug_options,json=debugOptions,proto3" json:"debug_options,omitempty"` +} + +func (x *Environment) Reset() { + *x = Environment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment) ProtoMessage() {} + +func (x *Environment) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment.ProtoReflect.Descriptor instead. +func (*Environment) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{0} +} + +func (x *Environment) GetTempStoragePrefix() string { + if x != nil { + return x.TempStoragePrefix + } + return "" +} + +func (x *Environment) GetClusterManagerApiService() string { + if x != nil { + return x.ClusterManagerApiService + } + return "" +} + +func (x *Environment) GetExperiments() []string { + if x != nil { + return x.Experiments + } + return nil +} + +func (x *Environment) GetServiceOptions() []string { + if x != nil { + return x.ServiceOptions + } + return nil +} + +func (x *Environment) GetServiceKmsKeyName() string { + if x != nil { + return x.ServiceKmsKeyName + } + return "" +} + +func (x *Environment) GetWorkerPools() []*WorkerPool { + if x != nil { + return x.WorkerPools + } + return nil +} + +func (x *Environment) GetUserAgent() *structpb.Struct { + if x != nil { + return x.UserAgent + } + return nil +} + +func (x *Environment) GetVersion() *structpb.Struct { + if x != nil { + return x.Version + } + return nil +} + +func (x *Environment) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *Environment) GetSdkPipelineOptions() *structpb.Struct { + if x != nil { + return x.SdkPipelineOptions + } + return nil +} + +func (x *Environment) GetInternalExperiments() *anypb.Any { + if x != nil { + return x.InternalExperiments + } + return nil +} + +func (x *Environment) GetServiceAccountEmail() string { + if x != nil { + return x.ServiceAccountEmail + } + return "" +} + +func (x *Environment) GetFlexResourceSchedulingGoal() FlexResourceSchedulingGoal { + if x != nil { + return x.FlexResourceSchedulingGoal + } + return FlexResourceSchedulingGoal_FLEXRS_UNSPECIFIED +} + +func (x *Environment) GetWorkerRegion() string { + if x != nil { + return x.WorkerRegion + } + return "" +} + +func (x *Environment) GetWorkerZone() string { + if x != nil { + return x.WorkerZone + } + return "" +} + +func (x *Environment) GetShuffleMode() ShuffleMode { + if x != nil { + return x.ShuffleMode + } + return ShuffleMode_SHUFFLE_MODE_UNSPECIFIED +} + +func (x *Environment) GetDebugOptions() *DebugOptions { + if x != nil { + return x.DebugOptions + } + return nil +} + +// The packages that must be installed in order for a worker to run the +// steps of the Cloud Dataflow job that will be assigned to its worker +// pool. +// +// This is the mechanism by which the Cloud Dataflow SDK causes code to +// be loaded onto the workers. For example, the Cloud Dataflow Java SDK +// might use this to install jars containing the user's code and all of the +// various dependencies (libraries, data files, etc.) required in order +// for that code to run. +type Package struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the package. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The resource to read the package from. The supported resource type is: + // + // Google Cloud Storage: + // + // storage.googleapis.com/{bucket} + // bucket.storage.googleapis.com/ + Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *Package) Reset() { + *x = Package{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Package) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Package) ProtoMessage() {} + +func (x *Package) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Package.ProtoReflect.Descriptor instead. +func (*Package) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{1} +} + +func (x *Package) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Package) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Describes the data disk used by a workflow job. +type Disk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Size of disk in GB. If zero or unspecified, the service will + // attempt to choose a reasonable default. + SizeGb int32 `protobuf:"varint,1,opt,name=size_gb,json=sizeGb,proto3" json:"size_gb,omitempty"` + // Disk storage type, as defined by Google Compute Engine. This + // must be a disk type appropriate to the project and zone in which + // the workers will run. If unknown or unspecified, the service + // will attempt to choose a reasonable default. + // + // For example, the standard persistent disk type is a resource name + // typically ending in "pd-standard". If SSD persistent disks are + // available, the resource name typically ends with "pd-ssd". The + // actual valid values are defined the Google Compute Engine API, + // not by the Cloud Dataflow API; consult the Google Compute Engine + // documentation for more information about determining the set of + // available disk types for a particular project and zone. + // + // Google Compute Engine Disk types are local to a particular + // project in a particular zone, and so the resource name will + // typically look something like this: + // + // compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard + DiskType string `protobuf:"bytes,2,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` + // Directory in a VM where disk is mounted. + MountPoint string `protobuf:"bytes,3,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"` +} + +func (x *Disk) Reset() { + *x = Disk{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Disk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Disk) ProtoMessage() {} + +func (x *Disk) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Disk.ProtoReflect.Descriptor instead. +func (*Disk) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{2} +} + +func (x *Disk) GetSizeGb() int32 { + if x != nil { + return x.SizeGb + } + return 0 +} + +func (x *Disk) GetDiskType() string { + if x != nil { + return x.DiskType + } + return "" +} + +func (x *Disk) GetMountPoint() string { + if x != nil { + return x.MountPoint + } + return "" +} + +// Provides data to pass through to the worker harness. +type WorkerSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The base URL for accessing Google Cloud APIs. + // + // When workers access Google Cloud APIs, they logically do so via + // relative URLs. If this field is specified, it supplies the base + // URL to use for resolving these relative URLs. The normative + // algorithm used is defined by RFC 1808, "Relative Uniform Resource + // Locators". + // + // If not specified, the default value is "http://www.googleapis.com/" + BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` + // Whether to send work progress updates to the service. + ReportingEnabled bool `protobuf:"varint,2,opt,name=reporting_enabled,json=reportingEnabled,proto3" json:"reporting_enabled,omitempty"` + // The Cloud Dataflow service path relative to the root URL, for example, + // "dataflow/v1b3/projects". + ServicePath string `protobuf:"bytes,3,opt,name=service_path,json=servicePath,proto3" json:"service_path,omitempty"` + // The Shuffle service path relative to the root URL, for example, + // "shuffle/v1beta1". + ShuffleServicePath string `protobuf:"bytes,4,opt,name=shuffle_service_path,json=shuffleServicePath,proto3" json:"shuffle_service_path,omitempty"` + // The ID of the worker running this pipeline. + WorkerId string `protobuf:"bytes,5,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` + // The prefix of the resources the system should use for temporary + // storage. + // + // The supported resource type is: + // + // Google Cloud Storage: + // + // storage.googleapis.com/{bucket}/{object} + // bucket.storage.googleapis.com/{object} + TempStoragePrefix string `protobuf:"bytes,6,opt,name=temp_storage_prefix,json=tempStoragePrefix,proto3" json:"temp_storage_prefix,omitempty"` +} + +func (x *WorkerSettings) Reset() { + *x = WorkerSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkerSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerSettings) ProtoMessage() {} + +func (x *WorkerSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkerSettings.ProtoReflect.Descriptor instead. +func (*WorkerSettings) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{3} +} + +func (x *WorkerSettings) GetBaseUrl() string { + if x != nil { + return x.BaseUrl + } + return "" +} + +func (x *WorkerSettings) GetReportingEnabled() bool { + if x != nil { + return x.ReportingEnabled + } + return false +} + +func (x *WorkerSettings) GetServicePath() string { + if x != nil { + return x.ServicePath + } + return "" +} + +func (x *WorkerSettings) GetShuffleServicePath() string { + if x != nil { + return x.ShuffleServicePath + } + return "" +} + +func (x *WorkerSettings) GetWorkerId() string { + if x != nil { + return x.WorkerId + } + return "" +} + +func (x *WorkerSettings) GetTempStoragePrefix() string { + if x != nil { + return x.TempStoragePrefix + } + return "" +} + +// Taskrunner configuration settings. +type TaskRunnerSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The UNIX user ID on the worker VM to use for tasks launched by + // taskrunner; e.g. "root". + TaskUser string `protobuf:"bytes,1,opt,name=task_user,json=taskUser,proto3" json:"task_user,omitempty"` + // The UNIX group ID on the worker VM to use for tasks launched by + // taskrunner; e.g. "wheel". + TaskGroup string `protobuf:"bytes,2,opt,name=task_group,json=taskGroup,proto3" json:"task_group,omitempty"` + // The OAuth2 scopes to be requested by the taskrunner in order to + // access the Cloud Dataflow API. + OauthScopes []string `protobuf:"bytes,3,rep,name=oauth_scopes,json=oauthScopes,proto3" json:"oauth_scopes,omitempty"` + // The base URL for the taskrunner to use when accessing Google Cloud APIs. + // + // When workers access Google Cloud APIs, they logically do so via + // relative URLs. If this field is specified, it supplies the base + // URL to use for resolving these relative URLs. The normative + // algorithm used is defined by RFC 1808, "Relative Uniform Resource + // Locators". + // + // If not specified, the default value is "http://www.googleapis.com/" + BaseUrl string `protobuf:"bytes,4,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` + // The API version of endpoint, e.g. "v1b3" + DataflowApiVersion string `protobuf:"bytes,5,opt,name=dataflow_api_version,json=dataflowApiVersion,proto3" json:"dataflow_api_version,omitempty"` + // The settings to pass to the parallel worker harness. + ParallelWorkerSettings *WorkerSettings `protobuf:"bytes,6,opt,name=parallel_worker_settings,json=parallelWorkerSettings,proto3" json:"parallel_worker_settings,omitempty"` + // The location on the worker for task-specific subdirectories. + BaseTaskDir string `protobuf:"bytes,7,opt,name=base_task_dir,json=baseTaskDir,proto3" json:"base_task_dir,omitempty"` + // Whether to continue taskrunner if an exception is hit. + ContinueOnException bool `protobuf:"varint,8,opt,name=continue_on_exception,json=continueOnException,proto3" json:"continue_on_exception,omitempty"` + // Whether to send taskrunner log info to Google Compute Engine VM serial + // console. + LogToSerialconsole bool `protobuf:"varint,9,opt,name=log_to_serialconsole,json=logToSerialconsole,proto3" json:"log_to_serialconsole,omitempty"` + // Whether to also send taskrunner log info to stderr. + Alsologtostderr bool `protobuf:"varint,10,opt,name=alsologtostderr,proto3" json:"alsologtostderr,omitempty"` + // Indicates where to put logs. If this is not specified, the logs + // will not be uploaded. + // + // The supported resource type is: + // + // Google Cloud Storage: + // + // storage.googleapis.com/{bucket}/{object} + // bucket.storage.googleapis.com/{object} + LogUploadLocation string `protobuf:"bytes,11,opt,name=log_upload_location,json=logUploadLocation,proto3" json:"log_upload_location,omitempty"` + // The directory on the VM to store logs. + LogDir string `protobuf:"bytes,12,opt,name=log_dir,json=logDir,proto3" json:"log_dir,omitempty"` + // The prefix of the resources the taskrunner should use for + // temporary storage. + // + // The supported resource type is: + // + // Google Cloud Storage: + // + // storage.googleapis.com/{bucket}/{object} + // bucket.storage.googleapis.com/{object} + TempStoragePrefix string `protobuf:"bytes,13,opt,name=temp_storage_prefix,json=tempStoragePrefix,proto3" json:"temp_storage_prefix,omitempty"` + // The command to launch the worker harness. + HarnessCommand string `protobuf:"bytes,14,opt,name=harness_command,json=harnessCommand,proto3" json:"harness_command,omitempty"` + // The file to store the workflow in. + WorkflowFileName string `protobuf:"bytes,15,opt,name=workflow_file_name,json=workflowFileName,proto3" json:"workflow_file_name,omitempty"` + // The file to store preprocessing commands in. + CommandlinesFileName string `protobuf:"bytes,16,opt,name=commandlines_file_name,json=commandlinesFileName,proto3" json:"commandlines_file_name,omitempty"` + // The ID string of the VM. + VmId string `protobuf:"bytes,17,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // The suggested backend language. + LanguageHint string `protobuf:"bytes,18,opt,name=language_hint,json=languageHint,proto3" json:"language_hint,omitempty"` + // The streaming worker main class name. + StreamingWorkerMainClass string `protobuf:"bytes,19,opt,name=streaming_worker_main_class,json=streamingWorkerMainClass,proto3" json:"streaming_worker_main_class,omitempty"` +} + +func (x *TaskRunnerSettings) Reset() { + *x = TaskRunnerSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskRunnerSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskRunnerSettings) ProtoMessage() {} + +func (x *TaskRunnerSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskRunnerSettings.ProtoReflect.Descriptor instead. +func (*TaskRunnerSettings) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{4} +} + +func (x *TaskRunnerSettings) GetTaskUser() string { + if x != nil { + return x.TaskUser + } + return "" +} + +func (x *TaskRunnerSettings) GetTaskGroup() string { + if x != nil { + return x.TaskGroup + } + return "" +} + +func (x *TaskRunnerSettings) GetOauthScopes() []string { + if x != nil { + return x.OauthScopes + } + return nil +} + +func (x *TaskRunnerSettings) GetBaseUrl() string { + if x != nil { + return x.BaseUrl + } + return "" +} + +func (x *TaskRunnerSettings) GetDataflowApiVersion() string { + if x != nil { + return x.DataflowApiVersion + } + return "" +} + +func (x *TaskRunnerSettings) GetParallelWorkerSettings() *WorkerSettings { + if x != nil { + return x.ParallelWorkerSettings + } + return nil +} + +func (x *TaskRunnerSettings) GetBaseTaskDir() string { + if x != nil { + return x.BaseTaskDir + } + return "" +} + +func (x *TaskRunnerSettings) GetContinueOnException() bool { + if x != nil { + return x.ContinueOnException + } + return false +} + +func (x *TaskRunnerSettings) GetLogToSerialconsole() bool { + if x != nil { + return x.LogToSerialconsole + } + return false +} + +func (x *TaskRunnerSettings) GetAlsologtostderr() bool { + if x != nil { + return x.Alsologtostderr + } + return false +} + +func (x *TaskRunnerSettings) GetLogUploadLocation() string { + if x != nil { + return x.LogUploadLocation + } + return "" +} + +func (x *TaskRunnerSettings) GetLogDir() string { + if x != nil { + return x.LogDir + } + return "" +} + +func (x *TaskRunnerSettings) GetTempStoragePrefix() string { + if x != nil { + return x.TempStoragePrefix + } + return "" +} + +func (x *TaskRunnerSettings) GetHarnessCommand() string { + if x != nil { + return x.HarnessCommand + } + return "" +} + +func (x *TaskRunnerSettings) GetWorkflowFileName() string { + if x != nil { + return x.WorkflowFileName + } + return "" +} + +func (x *TaskRunnerSettings) GetCommandlinesFileName() string { + if x != nil { + return x.CommandlinesFileName + } + return "" +} + +func (x *TaskRunnerSettings) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *TaskRunnerSettings) GetLanguageHint() string { + if x != nil { + return x.LanguageHint + } + return "" +} + +func (x *TaskRunnerSettings) GetStreamingWorkerMainClass() string { + if x != nil { + return x.StreamingWorkerMainClass + } + return "" +} + +// Settings for WorkerPool autoscaling. +type AutoscalingSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The algorithm to use for autoscaling. + Algorithm AutoscalingAlgorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=google.dataflow.v1beta3.AutoscalingAlgorithm" json:"algorithm,omitempty"` + // The maximum number of workers to cap scaling at. + MaxNumWorkers int32 `protobuf:"varint,2,opt,name=max_num_workers,json=maxNumWorkers,proto3" json:"max_num_workers,omitempty"` +} + +func (x *AutoscalingSettings) Reset() { + *x = AutoscalingSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoscalingSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoscalingSettings) ProtoMessage() {} + +func (x *AutoscalingSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AutoscalingSettings.ProtoReflect.Descriptor instead. +func (*AutoscalingSettings) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{5} +} + +func (x *AutoscalingSettings) GetAlgorithm() AutoscalingAlgorithm { + if x != nil { + return x.Algorithm + } + return AutoscalingAlgorithm_AUTOSCALING_ALGORITHM_UNKNOWN +} + +func (x *AutoscalingSettings) GetMaxNumWorkers() int32 { + if x != nil { + return x.MaxNumWorkers + } + return 0 +} + +// Defines a SDK harness container for executing Dataflow pipelines. +type SdkHarnessContainerImage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A docker container image that resides in Google Container Registry. + ContainerImage string `protobuf:"bytes,1,opt,name=container_image,json=containerImage,proto3" json:"container_image,omitempty"` + // If true, recommends the Dataflow service to use only one core per SDK + // container instance with this image. If false (or unset) recommends using + // more than one core per SDK container instance with this image for + // efficiency. Note that Dataflow service may choose to override this property + // if needed. + UseSingleCorePerContainer bool `protobuf:"varint,2,opt,name=use_single_core_per_container,json=useSingleCorePerContainer,proto3" json:"use_single_core_per_container,omitempty"` + // Environment ID for the Beam runner API proto Environment that corresponds + // to the current SDK Harness. + EnvironmentId string `protobuf:"bytes,3,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"` + // The set of capabilities enumerated in the above Environment proto. See also + // https://github.com/apache/beam/blob/master/model/pipeline/src/main/proto/beam_runner_api.proto + Capabilities []string `protobuf:"bytes,4,rep,name=capabilities,proto3" json:"capabilities,omitempty"` +} + +func (x *SdkHarnessContainerImage) Reset() { + *x = SdkHarnessContainerImage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SdkHarnessContainerImage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SdkHarnessContainerImage) ProtoMessage() {} + +func (x *SdkHarnessContainerImage) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SdkHarnessContainerImage.ProtoReflect.Descriptor instead. +func (*SdkHarnessContainerImage) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{6} +} + +func (x *SdkHarnessContainerImage) GetContainerImage() string { + if x != nil { + return x.ContainerImage + } + return "" +} + +func (x *SdkHarnessContainerImage) GetUseSingleCorePerContainer() bool { + if x != nil { + return x.UseSingleCorePerContainer + } + return false +} + +func (x *SdkHarnessContainerImage) GetEnvironmentId() string { + if x != nil { + return x.EnvironmentId + } + return "" +} + +func (x *SdkHarnessContainerImage) GetCapabilities() []string { + if x != nil { + return x.Capabilities + } + return nil +} + +// Describes one particular pool of Cloud Dataflow workers to be +// instantiated by the Cloud Dataflow service in order to perform the +// computations required by a job. Note that a workflow job may use +// multiple pools, in order to match the various computational +// requirements of the various stages of the job. +type WorkerPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The kind of the worker pool; currently only `harness` and `shuffle` + // are supported. + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + // Number of Google Compute Engine workers in this pool needed to + // execute the job. If zero or unspecified, the service will + // attempt to choose a reasonable default. + NumWorkers int32 `protobuf:"varint,2,opt,name=num_workers,json=numWorkers,proto3" json:"num_workers,omitempty"` + // Packages to be installed on workers. + Packages []*Package `protobuf:"bytes,3,rep,name=packages,proto3" json:"packages,omitempty"` + // The default package set to install. This allows the service to + // select a default set of packages which are useful to worker + // harnesses written in a particular language. + DefaultPackageSet DefaultPackageSet `protobuf:"varint,4,opt,name=default_package_set,json=defaultPackageSet,proto3,enum=google.dataflow.v1beta3.DefaultPackageSet" json:"default_package_set,omitempty"` + // Machine type (e.g. "n1-standard-1"). If empty or unspecified, the + // service will attempt to choose a reasonable default. + MachineType string `protobuf:"bytes,5,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + // Sets the policy for determining when to turndown worker pool. + // Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and + // `TEARDOWN_NEVER`. + // `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether + // the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down + // if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn + // down. + // + // If the workers are not torn down by the service, they will + // continue to run and use Google Compute Engine VM resources in the + // user's project until they are explicitly terminated by the user. + // Because of this, Google recommends using the `TEARDOWN_ALWAYS` + // policy except for small, manually supervised test jobs. + // + // If unknown or unspecified, the service will attempt to choose a reasonable + // default. + TeardownPolicy TeardownPolicy `protobuf:"varint,6,opt,name=teardown_policy,json=teardownPolicy,proto3,enum=google.dataflow.v1beta3.TeardownPolicy" json:"teardown_policy,omitempty"` + // Size of root disk for VMs, in GB. If zero or unspecified, the service will + // attempt to choose a reasonable default. + DiskSizeGb int32 `protobuf:"varint,7,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` + // Type of root disk for VMs. If empty or unspecified, the service will + // attempt to choose a reasonable default. + DiskType string `protobuf:"bytes,16,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` + // Fully qualified source image for disks. + DiskSourceImage string `protobuf:"bytes,8,opt,name=disk_source_image,json=diskSourceImage,proto3" json:"disk_source_image,omitempty"` + // Zone to run the worker pools in. If empty or unspecified, the service + // will attempt to choose a reasonable default. + Zone string `protobuf:"bytes,9,opt,name=zone,proto3" json:"zone,omitempty"` + // Settings passed through to Google Compute Engine workers when + // using the standard Dataflow task runner. Users should ignore + // this field. + TaskrunnerSettings *TaskRunnerSettings `protobuf:"bytes,10,opt,name=taskrunner_settings,json=taskrunnerSettings,proto3" json:"taskrunner_settings,omitempty"` + // The action to take on host maintenance, as defined by the Google + // Compute Engine API. + OnHostMaintenance string `protobuf:"bytes,11,opt,name=on_host_maintenance,json=onHostMaintenance,proto3" json:"on_host_maintenance,omitempty"` + // Data disks that are used by a VM in this workflow. + DataDisks []*Disk `protobuf:"bytes,12,rep,name=data_disks,json=dataDisks,proto3" json:"data_disks,omitempty"` + // Metadata to set on the Google Compute Engine VMs. + Metadata map[string]string `protobuf:"bytes,13,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Settings for autoscaling of this WorkerPool. + AutoscalingSettings *AutoscalingSettings `protobuf:"bytes,14,opt,name=autoscaling_settings,json=autoscalingSettings,proto3" json:"autoscaling_settings,omitempty"` + // Extra arguments for this worker pool. + PoolArgs *anypb.Any `protobuf:"bytes,15,opt,name=pool_args,json=poolArgs,proto3" json:"pool_args,omitempty"` + // Network to which VMs will be assigned. If empty or unspecified, + // the service will use the network "default". + Network string `protobuf:"bytes,17,opt,name=network,proto3" json:"network,omitempty"` + // Subnetwork to which VMs will be assigned, if desired. Expected to be of + // the form "regions/REGION/subnetworks/SUBNETWORK". + Subnetwork string `protobuf:"bytes,19,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` + // Required. Docker container image that executes the Cloud Dataflow worker + // harness, residing in Google Container Registry. + // + // Deprecated for the Fn API path. Use sdk_harness_container_images instead. + WorkerHarnessContainerImage string `protobuf:"bytes,18,opt,name=worker_harness_container_image,json=workerHarnessContainerImage,proto3" json:"worker_harness_container_image,omitempty"` + // The number of threads per worker harness. If empty or unspecified, the + // service will choose a number of threads (according to the number of cores + // on the selected machine type for batch, or 1 by convention for streaming). + NumThreadsPerWorker int32 `protobuf:"varint,20,opt,name=num_threads_per_worker,json=numThreadsPerWorker,proto3" json:"num_threads_per_worker,omitempty"` + // Configuration for VM IPs. + IpConfiguration WorkerIPAddressConfiguration `protobuf:"varint,21,opt,name=ip_configuration,json=ipConfiguration,proto3,enum=google.dataflow.v1beta3.WorkerIPAddressConfiguration" json:"ip_configuration,omitempty"` + // Set of SDK harness containers needed to execute this pipeline. This will + // only be set in the Fn API path. For non-cross-language pipelines this + // should have only one entry. Cross-language pipelines will have two or more + // entries. + SdkHarnessContainerImages []*SdkHarnessContainerImage `protobuf:"bytes,22,rep,name=sdk_harness_container_images,json=sdkHarnessContainerImages,proto3" json:"sdk_harness_container_images,omitempty"` +} + +func (x *WorkerPool) Reset() { + *x = WorkerPool{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkerPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerPool) ProtoMessage() {} + +func (x *WorkerPool) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkerPool.ProtoReflect.Descriptor instead. +func (*WorkerPool) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{7} +} + +func (x *WorkerPool) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *WorkerPool) GetNumWorkers() int32 { + if x != nil { + return x.NumWorkers + } + return 0 +} + +func (x *WorkerPool) GetPackages() []*Package { + if x != nil { + return x.Packages + } + return nil +} + +func (x *WorkerPool) GetDefaultPackageSet() DefaultPackageSet { + if x != nil { + return x.DefaultPackageSet + } + return DefaultPackageSet_DEFAULT_PACKAGE_SET_UNKNOWN +} + +func (x *WorkerPool) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *WorkerPool) GetTeardownPolicy() TeardownPolicy { + if x != nil { + return x.TeardownPolicy + } + return TeardownPolicy_TEARDOWN_POLICY_UNKNOWN +} + +func (x *WorkerPool) GetDiskSizeGb() int32 { + if x != nil { + return x.DiskSizeGb + } + return 0 +} + +func (x *WorkerPool) GetDiskType() string { + if x != nil { + return x.DiskType + } + return "" +} + +func (x *WorkerPool) GetDiskSourceImage() string { + if x != nil { + return x.DiskSourceImage + } + return "" +} + +func (x *WorkerPool) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *WorkerPool) GetTaskrunnerSettings() *TaskRunnerSettings { + if x != nil { + return x.TaskrunnerSettings + } + return nil +} + +func (x *WorkerPool) GetOnHostMaintenance() string { + if x != nil { + return x.OnHostMaintenance + } + return "" +} + +func (x *WorkerPool) GetDataDisks() []*Disk { + if x != nil { + return x.DataDisks + } + return nil +} + +func (x *WorkerPool) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkerPool) GetAutoscalingSettings() *AutoscalingSettings { + if x != nil { + return x.AutoscalingSettings + } + return nil +} + +func (x *WorkerPool) GetPoolArgs() *anypb.Any { + if x != nil { + return x.PoolArgs + } + return nil +} + +func (x *WorkerPool) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *WorkerPool) GetSubnetwork() string { + if x != nil { + return x.Subnetwork + } + return "" +} + +func (x *WorkerPool) GetWorkerHarnessContainerImage() string { + if x != nil { + return x.WorkerHarnessContainerImage + } + return "" +} + +func (x *WorkerPool) GetNumThreadsPerWorker() int32 { + if x != nil { + return x.NumThreadsPerWorker + } + return 0 +} + +func (x *WorkerPool) GetIpConfiguration() WorkerIPAddressConfiguration { + if x != nil { + return x.IpConfiguration + } + return WorkerIPAddressConfiguration_WORKER_IP_UNSPECIFIED +} + +func (x *WorkerPool) GetSdkHarnessContainerImages() []*SdkHarnessContainerImage { + if x != nil { + return x.SdkHarnessContainerImages + } + return nil +} + +// Describes any options that have an effect on the debugging of pipelines. +type DebugOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // When true, enables the logging of the literal hot key to the user's Cloud + // Logging. + EnableHotKeyLogging bool `protobuf:"varint,1,opt,name=enable_hot_key_logging,json=enableHotKeyLogging,proto3" json:"enable_hot_key_logging,omitempty"` +} + +func (x *DebugOptions) Reset() { + *x = DebugOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DebugOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DebugOptions) ProtoMessage() {} + +func (x *DebugOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_environment_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DebugOptions.ProtoReflect.Descriptor instead. +func (*DebugOptions) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_environment_proto_rawDescGZIP(), []int{8} +} + +func (x *DebugOptions) GetEnableHotKeyLogging() bool { + if x != nil { + return x.EnableHotKeyLogging + } + return false +} + +var File_google_dataflow_v1beta3_environment_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_environment_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, + 0x07, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, + 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x65, 0x6d, + 0x70, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x3d, + 0x0a, 0x1b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x18, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x41, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, + 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0c, 0x77, 0x6f, 0x72, + 0x6b, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x12, 0x36, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x09, + 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x14, 0x73, 0x64, 0x6b, 0x5f, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x12, 0x73, + 0x64, 0x6b, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x47, 0x0a, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, + 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x76, + 0x0a, 0x1d, 0x66, 0x6c, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x6f, 0x61, 0x6c, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x46, 0x6c, 0x65, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x61, 0x6c, 0x52, 0x1a, 0x66, 0x6c, 0x65, 0x78, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, + 0x6e, 0x67, 0x47, 0x6f, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x4c, 0x0a, 0x0c, + 0x73, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x68, 0x75, + 0x66, 0x66, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x73, + 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x39, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x5d, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x67, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x69, 0x7a, 0x65, + 0x47, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x22, 0xfa, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2b, + 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x30, + 0x0a, 0x14, 0x73, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x68, + 0x75, 0x66, 0x66, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x1b, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2e, 0x0a, + 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xd6, 0x06, + 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x30, + 0x0a, 0x14, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x61, 0x0a, 0x18, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x77, 0x6f, 0x72, + 0x6b, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x16, 0x70, 0x61, 0x72, + 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x64, 0x69, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, + 0x54, 0x61, 0x73, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, + 0x4f, 0x6e, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x6c, + 0x6f, 0x67, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x63, 0x6f, 0x6e, 0x73, + 0x6f, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x6c, 0x6f, 0x67, 0x54, 0x6f, + 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x12, 0x28, 0x0a, + 0x0f, 0x61, 0x6c, 0x73, 0x6f, 0x6c, 0x6f, 0x67, 0x74, 0x6f, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x6c, 0x73, 0x6f, 0x6c, 0x6f, 0x67, 0x74, + 0x6f, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x6f, 0x67, 0x5f, 0x75, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6c, 0x6f, 0x67, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, 0x67, 0x5f, 0x64, + 0x69, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x67, 0x44, 0x69, 0x72, + 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, + 0x65, 0x6d, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x27, 0x0a, 0x0f, 0x68, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x68, 0x61, 0x72, 0x6e, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x46, + 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, + 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x68, + 0x69, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x1b, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x69, 0x6e, + 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4d, 0x61, 0x69, + 0x6e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x6f, 0x73, + 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4b, + 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x6f, + 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, + 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x26, 0x0a, 0x0f, 0x6d, + 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x18, 0x53, 0x64, 0x6b, 0x48, 0x61, 0x72, 0x6e, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x40, 0x0a, 0x1d, 0x75, 0x73, 0x65, + 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x19, 0x75, 0x73, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x50, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc5, 0x0a, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, + 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x6e, 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x08, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x08, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x13, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x65, + 0x74, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x53, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x74, 0x65, 0x61, 0x72, 0x64, + 0x6f, 0x77, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x65, 0x61, 0x72, 0x64, + 0x6f, 0x77, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0e, 0x74, 0x65, 0x61, 0x72, 0x64, + 0x6f, 0x77, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x64, + 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x6b, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x74, 0x61, 0x73, 0x6b, + 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x12, 0x74, 0x61, 0x73, 0x6b, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x64, + 0x69, 0x73, 0x6b, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x44, + 0x69, 0x73, 0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x6f, + 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x13, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x31, 0x0a, 0x09, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x61, 0x72, 0x67, + 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x70, + 0x6f, 0x6f, 0x6c, 0x41, 0x72, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x12, 0x43, 0x0a, 0x1e, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x72, 0x6e, + 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x48, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x68, + 0x72, 0x65, 0x61, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6e, 0x75, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x61, + 0x64, 0x73, 0x50, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x10, 0x69, + 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x69, 0x70, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, + 0x1c, 0x73, 0x64, 0x6b, 0x5f, 0x68, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x16, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x64, + 0x6b, 0x48, 0x61, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x19, 0x73, 0x64, 0x6b, 0x48, 0x61, 0x72, 0x6e, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x43, + 0x0a, 0x0c, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, + 0x0a, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x6f, 0x74, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x67, 0x67, + 0x69, 0x6e, 0x67, 0x2a, 0x4b, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x10, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x4f, 0x42, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x2a, 0x6b, 0x0a, 0x1a, 0x46, 0x6c, 0x65, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x61, 0x6c, 0x12, 0x16, + 0x0a, 0x12, 0x46, 0x4c, 0x45, 0x58, 0x52, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x4c, 0x45, 0x58, 0x52, 0x53, + 0x5f, 0x53, 0x50, 0x45, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x5a, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x4c, 0x45, 0x58, 0x52, 0x53, 0x5f, 0x43, 0x4f, 0x53, + 0x54, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x6f, 0x0a, + 0x0e, 0x54, 0x65, 0x61, 0x72, 0x64, 0x6f, 0x77, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x1b, 0x0a, 0x17, 0x54, 0x45, 0x41, 0x52, 0x44, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x4f, 0x4c, 0x49, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x54, 0x45, 0x41, 0x52, 0x44, 0x4f, 0x57, 0x4e, 0x5f, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x41, 0x52, 0x44, 0x4f, 0x57, 0x4e, 0x5f, 0x4f, 0x4e, + 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x45, + 0x41, 0x52, 0x44, 0x4f, 0x57, 0x4e, 0x5f, 0x4e, 0x45, 0x56, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x90, + 0x01, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x53, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, + 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x50, + 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10, + 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x50, 0x41, 0x43, + 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, + 0x03, 0x2a, 0x7a, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x55, 0x54, + 0x4f, 0x53, 0x43, 0x41, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, + 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, + 0x41, 0x55, 0x54, 0x4f, 0x53, 0x43, 0x41, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4c, 0x47, 0x4f, + 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, + 0x41, 0x55, 0x54, 0x4f, 0x53, 0x43, 0x41, 0x4c, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4c, 0x47, 0x4f, + 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x02, 0x2a, 0x66, 0x0a, + 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, + 0x15, 0x57, 0x4f, 0x52, 0x4b, 0x45, 0x52, 0x5f, 0x49, 0x50, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x4f, 0x52, 0x4b, + 0x45, 0x52, 0x5f, 0x49, 0x50, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, + 0x0a, 0x11, 0x57, 0x4f, 0x52, 0x4b, 0x45, 0x52, 0x5f, 0x49, 0x50, 0x5f, 0x50, 0x52, 0x49, 0x56, + 0x41, 0x54, 0x45, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0b, 0x53, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x48, 0x55, 0x46, 0x46, 0x4c, 0x45, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x56, 0x4d, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x45, + 0x44, 0x10, 0x02, 0x42, 0xd5, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x42, 0x10, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0xaa, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0xca, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0xea, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_environment_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_environment_proto_rawDescData = file_google_dataflow_v1beta3_environment_proto_rawDesc +) + +func file_google_dataflow_v1beta3_environment_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_environment_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_environment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_environment_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_environment_proto_rawDescData +} + +var file_google_dataflow_v1beta3_environment_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_google_dataflow_v1beta3_environment_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_google_dataflow_v1beta3_environment_proto_goTypes = []interface{}{ + (JobType)(0), // 0: google.dataflow.v1beta3.JobType + (FlexResourceSchedulingGoal)(0), // 1: google.dataflow.v1beta3.FlexResourceSchedulingGoal + (TeardownPolicy)(0), // 2: google.dataflow.v1beta3.TeardownPolicy + (DefaultPackageSet)(0), // 3: google.dataflow.v1beta3.DefaultPackageSet + (AutoscalingAlgorithm)(0), // 4: google.dataflow.v1beta3.AutoscalingAlgorithm + (WorkerIPAddressConfiguration)(0), // 5: google.dataflow.v1beta3.WorkerIPAddressConfiguration + (ShuffleMode)(0), // 6: google.dataflow.v1beta3.ShuffleMode + (*Environment)(nil), // 7: google.dataflow.v1beta3.Environment + (*Package)(nil), // 8: google.dataflow.v1beta3.Package + (*Disk)(nil), // 9: google.dataflow.v1beta3.Disk + (*WorkerSettings)(nil), // 10: google.dataflow.v1beta3.WorkerSettings + (*TaskRunnerSettings)(nil), // 11: google.dataflow.v1beta3.TaskRunnerSettings + (*AutoscalingSettings)(nil), // 12: google.dataflow.v1beta3.AutoscalingSettings + (*SdkHarnessContainerImage)(nil), // 13: google.dataflow.v1beta3.SdkHarnessContainerImage + (*WorkerPool)(nil), // 14: google.dataflow.v1beta3.WorkerPool + (*DebugOptions)(nil), // 15: google.dataflow.v1beta3.DebugOptions + nil, // 16: google.dataflow.v1beta3.WorkerPool.MetadataEntry + (*structpb.Struct)(nil), // 17: google.protobuf.Struct + (*anypb.Any)(nil), // 18: google.protobuf.Any +} +var file_google_dataflow_v1beta3_environment_proto_depIdxs = []int32{ + 14, // 0: google.dataflow.v1beta3.Environment.worker_pools:type_name -> google.dataflow.v1beta3.WorkerPool + 17, // 1: google.dataflow.v1beta3.Environment.user_agent:type_name -> google.protobuf.Struct + 17, // 2: google.dataflow.v1beta3.Environment.version:type_name -> google.protobuf.Struct + 17, // 3: google.dataflow.v1beta3.Environment.sdk_pipeline_options:type_name -> google.protobuf.Struct + 18, // 4: google.dataflow.v1beta3.Environment.internal_experiments:type_name -> google.protobuf.Any + 1, // 5: google.dataflow.v1beta3.Environment.flex_resource_scheduling_goal:type_name -> google.dataflow.v1beta3.FlexResourceSchedulingGoal + 6, // 6: google.dataflow.v1beta3.Environment.shuffle_mode:type_name -> google.dataflow.v1beta3.ShuffleMode + 15, // 7: google.dataflow.v1beta3.Environment.debug_options:type_name -> google.dataflow.v1beta3.DebugOptions + 10, // 8: google.dataflow.v1beta3.TaskRunnerSettings.parallel_worker_settings:type_name -> google.dataflow.v1beta3.WorkerSettings + 4, // 9: google.dataflow.v1beta3.AutoscalingSettings.algorithm:type_name -> google.dataflow.v1beta3.AutoscalingAlgorithm + 8, // 10: google.dataflow.v1beta3.WorkerPool.packages:type_name -> google.dataflow.v1beta3.Package + 3, // 11: google.dataflow.v1beta3.WorkerPool.default_package_set:type_name -> google.dataflow.v1beta3.DefaultPackageSet + 2, // 12: google.dataflow.v1beta3.WorkerPool.teardown_policy:type_name -> google.dataflow.v1beta3.TeardownPolicy + 11, // 13: google.dataflow.v1beta3.WorkerPool.taskrunner_settings:type_name -> google.dataflow.v1beta3.TaskRunnerSettings + 9, // 14: google.dataflow.v1beta3.WorkerPool.data_disks:type_name -> google.dataflow.v1beta3.Disk + 16, // 15: google.dataflow.v1beta3.WorkerPool.metadata:type_name -> google.dataflow.v1beta3.WorkerPool.MetadataEntry + 12, // 16: google.dataflow.v1beta3.WorkerPool.autoscaling_settings:type_name -> google.dataflow.v1beta3.AutoscalingSettings + 18, // 17: google.dataflow.v1beta3.WorkerPool.pool_args:type_name -> google.protobuf.Any + 5, // 18: google.dataflow.v1beta3.WorkerPool.ip_configuration:type_name -> google.dataflow.v1beta3.WorkerIPAddressConfiguration + 13, // 19: google.dataflow.v1beta3.WorkerPool.sdk_harness_container_images:type_name -> google.dataflow.v1beta3.SdkHarnessContainerImage + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_environment_proto_init() } +func file_google_dataflow_v1beta3_environment_proto_init() { + if File_google_dataflow_v1beta3_environment_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_environment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Package); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Disk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkerSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskRunnerSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AutoscalingSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SdkHarnessContainerImage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkerPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_environment_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DebugOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_environment_proto_rawDesc, + NumEnums: 7, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_dataflow_v1beta3_environment_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_environment_proto_depIdxs, + EnumInfos: file_google_dataflow_v1beta3_environment_proto_enumTypes, + MessageInfos: file_google_dataflow_v1beta3_environment_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_environment_proto = out.File + file_google_dataflow_v1beta3_environment_proto_rawDesc = nil + file_google_dataflow_v1beta3_environment_proto_goTypes = nil + file_google_dataflow_v1beta3_environment_proto_depIdxs = nil +} diff --git a/dataflow/apiv1beta3/dataflowpb/jobs.pb.go b/dataflow/apiv1beta3/dataflowpb/jobs.pb.go new file mode 100644 index 000000000000..1391d7f76d08 --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/jobs.pb.go @@ -0,0 +1,4451 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/jobs.proto + +package dataflowpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Type of transform or stage operation. +type KindType int32 + +const ( + // Unrecognized transform type. + KindType_UNKNOWN_KIND KindType = 0 + // ParDo transform. + KindType_PAR_DO_KIND KindType = 1 + // Group By Key transform. + KindType_GROUP_BY_KEY_KIND KindType = 2 + // Flatten transform. + KindType_FLATTEN_KIND KindType = 3 + // Read transform. + KindType_READ_KIND KindType = 4 + // Write transform. + KindType_WRITE_KIND KindType = 5 + // Constructs from a constant value, such as with Create.of. + KindType_CONSTANT_KIND KindType = 6 + // Creates a Singleton view of a collection. + KindType_SINGLETON_KIND KindType = 7 + // Opening or closing a shuffle session, often as part of a GroupByKey. + KindType_SHUFFLE_KIND KindType = 8 +) + +// Enum value maps for KindType. +var ( + KindType_name = map[int32]string{ + 0: "UNKNOWN_KIND", + 1: "PAR_DO_KIND", + 2: "GROUP_BY_KEY_KIND", + 3: "FLATTEN_KIND", + 4: "READ_KIND", + 5: "WRITE_KIND", + 6: "CONSTANT_KIND", + 7: "SINGLETON_KIND", + 8: "SHUFFLE_KIND", + } + KindType_value = map[string]int32{ + "UNKNOWN_KIND": 0, + "PAR_DO_KIND": 1, + "GROUP_BY_KEY_KIND": 2, + "FLATTEN_KIND": 3, + "READ_KIND": 4, + "WRITE_KIND": 5, + "CONSTANT_KIND": 6, + "SINGLETON_KIND": 7, + "SHUFFLE_KIND": 8, + } +) + +func (x KindType) Enum() *KindType { + p := new(KindType) + *p = x + return p +} + +func (x KindType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KindType) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_jobs_proto_enumTypes[0].Descriptor() +} + +func (KindType) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_jobs_proto_enumTypes[0] +} + +func (x KindType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KindType.Descriptor instead. +func (KindType) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{0} +} + +// Describes the overall state of a [google.dataflow.v1beta3.Job][google.dataflow.v1beta3.Job]. +type JobState int32 + +const ( + // The job's run state isn't specified. + JobState_JOB_STATE_UNKNOWN JobState = 0 + // `JOB_STATE_STOPPED` indicates that the job has not + // yet started to run. + JobState_JOB_STATE_STOPPED JobState = 1 + // `JOB_STATE_RUNNING` indicates that the job is currently running. + JobState_JOB_STATE_RUNNING JobState = 2 + // `JOB_STATE_DONE` indicates that the job has successfully completed. + // This is a terminal job state. This state may be set by the Cloud Dataflow + // service, as a transition from `JOB_STATE_RUNNING`. It may also be set via a + // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal + // state. + JobState_JOB_STATE_DONE JobState = 3 + // `JOB_STATE_FAILED` indicates that the job has failed. This is a + // terminal job state. This state may only be set by the Cloud Dataflow + // service, and only as a transition from `JOB_STATE_RUNNING`. + JobState_JOB_STATE_FAILED JobState = 4 + // `JOB_STATE_CANCELLED` indicates that the job has been explicitly + // cancelled. This is a terminal job state. This state may only be + // set via a Cloud Dataflow `UpdateJob` call, and only if the job has not + // yet reached another terminal state. + JobState_JOB_STATE_CANCELLED JobState = 5 + // `JOB_STATE_UPDATED` indicates that the job was successfully updated, + // meaning that this job was stopped and another job was started, inheriting + // state from this one. This is a terminal job state. This state may only be + // set by the Cloud Dataflow service, and only as a transition from + // `JOB_STATE_RUNNING`. + JobState_JOB_STATE_UPDATED JobState = 6 + // `JOB_STATE_DRAINING` indicates that the job is in the process of draining. + // A draining job has stopped pulling from its input sources and is processing + // any data that remains in-flight. This state may be set via a Cloud Dataflow + // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs + // that are draining may only transition to `JOB_STATE_DRAINED`, + // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. + JobState_JOB_STATE_DRAINING JobState = 7 + // `JOB_STATE_DRAINED` indicates that the job has been drained. + // A drained job terminated by stopping pulling from its input sources and + // processing any data that remained in-flight when draining was requested. + // This state is a terminal state, may only be set by the Cloud Dataflow + // service, and only as a transition from `JOB_STATE_DRAINING`. + JobState_JOB_STATE_DRAINED JobState = 8 + // `JOB_STATE_PENDING` indicates that the job has been created but is not yet + // running. Jobs that are pending may only transition to `JOB_STATE_RUNNING`, + // or `JOB_STATE_FAILED`. + JobState_JOB_STATE_PENDING JobState = 9 + // `JOB_STATE_CANCELLING` indicates that the job has been explicitly cancelled + // and is in the process of stopping. Jobs that are cancelling may only + // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. + JobState_JOB_STATE_CANCELLING JobState = 10 + // `JOB_STATE_QUEUED` indicates that the job has been created but is being + // delayed until launch. Jobs that are queued may only transition to + // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. + JobState_JOB_STATE_QUEUED JobState = 11 + // `JOB_STATE_RESOURCE_CLEANING_UP` indicates that the batch job's associated + // resources are currently being cleaned up after a successful run. + // Currently, this is an opt-in feature, please reach out to Cloud support + // team if you are interested. + JobState_JOB_STATE_RESOURCE_CLEANING_UP JobState = 12 +) + +// Enum value maps for JobState. +var ( + JobState_name = map[int32]string{ + 0: "JOB_STATE_UNKNOWN", + 1: "JOB_STATE_STOPPED", + 2: "JOB_STATE_RUNNING", + 3: "JOB_STATE_DONE", + 4: "JOB_STATE_FAILED", + 5: "JOB_STATE_CANCELLED", + 6: "JOB_STATE_UPDATED", + 7: "JOB_STATE_DRAINING", + 8: "JOB_STATE_DRAINED", + 9: "JOB_STATE_PENDING", + 10: "JOB_STATE_CANCELLING", + 11: "JOB_STATE_QUEUED", + 12: "JOB_STATE_RESOURCE_CLEANING_UP", + } + JobState_value = map[string]int32{ + "JOB_STATE_UNKNOWN": 0, + "JOB_STATE_STOPPED": 1, + "JOB_STATE_RUNNING": 2, + "JOB_STATE_DONE": 3, + "JOB_STATE_FAILED": 4, + "JOB_STATE_CANCELLED": 5, + "JOB_STATE_UPDATED": 6, + "JOB_STATE_DRAINING": 7, + "JOB_STATE_DRAINED": 8, + "JOB_STATE_PENDING": 9, + "JOB_STATE_CANCELLING": 10, + "JOB_STATE_QUEUED": 11, + "JOB_STATE_RESOURCE_CLEANING_UP": 12, + } +) + +func (x JobState) Enum() *JobState { + p := new(JobState) + *p = x + return p +} + +func (x JobState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobState) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_jobs_proto_enumTypes[1].Descriptor() +} + +func (JobState) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_jobs_proto_enumTypes[1] +} + +func (x JobState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobState.Descriptor instead. +func (JobState) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{1} +} + +// Selector for how much information is returned in Job responses. +type JobView int32 + +const ( + // The job view to return isn't specified, or is unknown. + // Responses will contain at least the `JOB_VIEW_SUMMARY` information, + // and may contain additional information. + JobView_JOB_VIEW_UNKNOWN JobView = 0 + // Request summary information only: + // Project ID, Job ID, job name, job type, job status, start/end time, + // and Cloud SDK version details. + JobView_JOB_VIEW_SUMMARY JobView = 1 + // Request all information available for this job. + JobView_JOB_VIEW_ALL JobView = 2 + // Request summary info and limited job description data for steps, labels and + // environment. + JobView_JOB_VIEW_DESCRIPTION JobView = 3 +) + +// Enum value maps for JobView. +var ( + JobView_name = map[int32]string{ + 0: "JOB_VIEW_UNKNOWN", + 1: "JOB_VIEW_SUMMARY", + 2: "JOB_VIEW_ALL", + 3: "JOB_VIEW_DESCRIPTION", + } + JobView_value = map[string]int32{ + "JOB_VIEW_UNKNOWN": 0, + "JOB_VIEW_SUMMARY": 1, + "JOB_VIEW_ALL": 2, + "JOB_VIEW_DESCRIPTION": 3, + } +) + +func (x JobView) Enum() *JobView { + p := new(JobView) + *p = x + return p +} + +func (x JobView) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobView) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_jobs_proto_enumTypes[2].Descriptor() +} + +func (JobView) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_jobs_proto_enumTypes[2] +} + +func (x JobView) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobView.Descriptor instead. +func (JobView) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{2} +} + +// The support status of the SDK used to run the job. +type SdkVersion_SdkSupportStatus int32 + +const ( + // Cloud Dataflow is unaware of this version. + SdkVersion_UNKNOWN SdkVersion_SdkSupportStatus = 0 + // This is a known version of an SDK, and is supported. + SdkVersion_SUPPORTED SdkVersion_SdkSupportStatus = 1 + // A newer version of the SDK family exists, and an update is recommended. + SdkVersion_STALE SdkVersion_SdkSupportStatus = 2 + // This version of the SDK is deprecated and will eventually be + // unsupported. + SdkVersion_DEPRECATED SdkVersion_SdkSupportStatus = 3 + // Support for this SDK version has ended and it should no longer be used. + SdkVersion_UNSUPPORTED SdkVersion_SdkSupportStatus = 4 +) + +// Enum value maps for SdkVersion_SdkSupportStatus. +var ( + SdkVersion_SdkSupportStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SUPPORTED", + 2: "STALE", + 3: "DEPRECATED", + 4: "UNSUPPORTED", + } + SdkVersion_SdkSupportStatus_value = map[string]int32{ + "UNKNOWN": 0, + "SUPPORTED": 1, + "STALE": 2, + "DEPRECATED": 3, + "UNSUPPORTED": 4, + } +) + +func (x SdkVersion_SdkSupportStatus) Enum() *SdkVersion_SdkSupportStatus { + p := new(SdkVersion_SdkSupportStatus) + *p = x + return p +} + +func (x SdkVersion_SdkSupportStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SdkVersion_SdkSupportStatus) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_jobs_proto_enumTypes[3].Descriptor() +} + +func (SdkVersion_SdkSupportStatus) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_jobs_proto_enumTypes[3] +} + +func (x SdkVersion_SdkSupportStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SdkVersion_SdkSupportStatus.Descriptor instead. +func (SdkVersion_SdkSupportStatus) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{7, 0} +} + +// This field filters out and returns jobs in the specified job state. The +// order of data returned is determined by the filter used, and is subject to +// change. +type ListJobsRequest_Filter int32 + +const ( + // The filter isn't specified, or is unknown. This returns all jobs ordered + // on descending `JobUuid`. + ListJobsRequest_UNKNOWN ListJobsRequest_Filter = 0 + // Returns all running jobs first ordered on creation timestamp, then + // returns all terminated jobs ordered on the termination timestamp. + ListJobsRequest_ALL ListJobsRequest_Filter = 1 + // Filters the jobs that have a terminated state, ordered on the + // termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, + // `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. + ListJobsRequest_TERMINATED ListJobsRequest_Filter = 2 + // Filters the jobs that are running ordered on the creation timestamp. + ListJobsRequest_ACTIVE ListJobsRequest_Filter = 3 +) + +// Enum value maps for ListJobsRequest_Filter. +var ( + ListJobsRequest_Filter_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ALL", + 2: "TERMINATED", + 3: "ACTIVE", + } + ListJobsRequest_Filter_value = map[string]int32{ + "UNKNOWN": 0, + "ALL": 1, + "TERMINATED": 2, + "ACTIVE": 3, + } +) + +func (x ListJobsRequest_Filter) Enum() *ListJobsRequest_Filter { + p := new(ListJobsRequest_Filter) + *p = x + return p +} + +func (x ListJobsRequest_Filter) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ListJobsRequest_Filter) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_jobs_proto_enumTypes[4].Descriptor() +} + +func (ListJobsRequest_Filter) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_jobs_proto_enumTypes[4] +} + +func (x ListJobsRequest_Filter) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ListJobsRequest_Filter.Descriptor instead. +func (ListJobsRequest_Filter) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{20, 0} +} + +// Defines a job to be run by the Cloud Dataflow service. +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID of this job. + // + // This field is set by the Cloud Dataflow service when the Job is + // created, and is immutable for the life of the job. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The user-specified Cloud Dataflow job name. + // + // Only one Job with a given name may exist in a project at any + // given time. If a caller attempts to create a Job with the same + // name as an already-existing Job, the attempt returns the + // existing Job. + // + // The name must match the regular expression + // `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The type of Cloud Dataflow job. + Type JobType `protobuf:"varint,4,opt,name=type,proto3,enum=google.dataflow.v1beta3.JobType" json:"type,omitempty"` + // The environment for the job. + Environment *Environment `protobuf:"bytes,5,opt,name=environment,proto3" json:"environment,omitempty"` + // Exactly one of step or steps_location should be specified. + // + // The top-level steps that constitute the entire job. Only retrieved with + // JOB_VIEW_ALL. + Steps []*Step `protobuf:"bytes,6,rep,name=steps,proto3" json:"steps,omitempty"` + // The Cloud Storage location where the steps are stored. + StepsLocation string `protobuf:"bytes,24,opt,name=steps_location,json=stepsLocation,proto3" json:"steps_location,omitempty"` + // The current state of the job. + // + // Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise + // specified. + // + // A job in the `JOB_STATE_RUNNING` state may asynchronously enter a + // terminal state. After a job has reached a terminal state, no + // further state updates may be made. + // + // This field may be mutated by the Cloud Dataflow service; + // callers cannot mutate it. + CurrentState JobState `protobuf:"varint,7,opt,name=current_state,json=currentState,proto3,enum=google.dataflow.v1beta3.JobState" json:"current_state,omitempty"` + // The timestamp associated with the current state. + CurrentStateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=current_state_time,json=currentStateTime,proto3" json:"current_state_time,omitempty"` + // The job's requested state. + // + // `UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and + // `JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may + // also be used to directly set a job's requested state to + // `JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the + // job if it has not already reached a terminal state. + RequestedState JobState `protobuf:"varint,9,opt,name=requested_state,json=requestedState,proto3,enum=google.dataflow.v1beta3.JobState" json:"requested_state,omitempty"` + // Deprecated. + ExecutionInfo *JobExecutionInfo `protobuf:"bytes,10,opt,name=execution_info,json=executionInfo,proto3" json:"execution_info,omitempty"` + // The timestamp when the job was initially created. Immutable and set by the + // Cloud Dataflow service. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // If this job is an update of an existing job, this field is the job ID + // of the job it replaced. + // + // When sending a `CreateJobRequest`, you can update a job by specifying it + // here. The job named here is stopped, and its intermediate state is + // transferred to this job. + ReplaceJobId string `protobuf:"bytes,12,opt,name=replace_job_id,json=replaceJobId,proto3" json:"replace_job_id,omitempty"` + // The map of transform name prefixes of the job to be replaced to the + // corresponding name prefixes of the new job. + TransformNameMapping map[string]string `protobuf:"bytes,13,rep,name=transform_name_mapping,json=transformNameMapping,proto3" json:"transform_name_mapping,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The client's unique identifier of the job, re-used across retried attempts. + // If this field is set, the service will ensure its uniqueness. + // The request to create a job will fail if the service has knowledge of a + // previously submitted job with the same client's ID and job name. + // The caller may use this field to ensure idempotence of job + // creation across retried attempts to create a job. + // By default, the field is empty and, in that case, the service ignores it. + ClientRequestId string `protobuf:"bytes,14,opt,name=client_request_id,json=clientRequestId,proto3" json:"client_request_id,omitempty"` + // If another job is an update of this job (and thus, this job is in + // `JOB_STATE_UPDATED`), this field contains the ID of that job. + ReplacedByJobId string `protobuf:"bytes,15,opt,name=replaced_by_job_id,json=replacedByJobId,proto3" json:"replaced_by_job_id,omitempty"` + // A set of files the system should be aware of that are used + // for temporary storage. These temporary files will be + // removed on job completion. + // No duplicates are allowed. + // No file patterns are supported. + // + // The supported files are: + // + // Google Cloud Storage: + // + // storage.googleapis.com/{bucket}/{object} + // bucket.storage.googleapis.com/{object} + TempFiles []string `protobuf:"bytes,16,rep,name=temp_files,json=tempFiles,proto3" json:"temp_files,omitempty"` + // User-defined labels for this job. + // + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + Labels map[string]string `protobuf:"bytes,17,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains this job. + Location string `protobuf:"bytes,18,opt,name=location,proto3" json:"location,omitempty"` + // Preliminary field: The format of this data may change at any time. + // A description of the user pipeline and stages through which it is executed. + // Created by Cloud Dataflow service. Only retrieved with + // JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. + PipelineDescription *PipelineDescription `protobuf:"bytes,19,opt,name=pipeline_description,json=pipelineDescription,proto3" json:"pipeline_description,omitempty"` + // This field may be mutated by the Cloud Dataflow service; + // callers cannot mutate it. + StageStates []*ExecutionStageState `protobuf:"bytes,20,rep,name=stage_states,json=stageStates,proto3" json:"stage_states,omitempty"` + // This field is populated by the Dataflow service to support filtering jobs + // by the metadata values provided here. Populated for ListJobs and all GetJob + // views SUMMARY and higher. + JobMetadata *JobMetadata `protobuf:"bytes,21,opt,name=job_metadata,json=jobMetadata,proto3" json:"job_metadata,omitempty"` + // The timestamp when the job was started (transitioned to JOB_STATE_PENDING). + // Flexible resource scheduling jobs are started with some delay after job + // creation, so start_time is unset before start and is updated when the + // job is started by the Cloud Dataflow service. For other jobs, start_time + // always equals to create_time and is immutable and set by the Cloud Dataflow + // service. + StartTime *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // If this is specified, the job's initial state is populated from the given + // snapshot. + CreatedFromSnapshotId string `protobuf:"bytes,23,opt,name=created_from_snapshot_id,json=createdFromSnapshotId,proto3" json:"created_from_snapshot_id,omitempty"` + // Reserved for future use. This field is set only in responses from the + // server; it is ignored if it is set in any requests. + SatisfiesPzs bool `protobuf:"varint,25,opt,name=satisfies_pzs,json=satisfiesPzs,proto3" json:"satisfies_pzs,omitempty"` +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{0} +} + +func (x *Job) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Job) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *Job) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Job) GetType() JobType { + if x != nil { + return x.Type + } + return JobType_JOB_TYPE_UNKNOWN +} + +func (x *Job) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *Job) GetSteps() []*Step { + if x != nil { + return x.Steps + } + return nil +} + +func (x *Job) GetStepsLocation() string { + if x != nil { + return x.StepsLocation + } + return "" +} + +func (x *Job) GetCurrentState() JobState { + if x != nil { + return x.CurrentState + } + return JobState_JOB_STATE_UNKNOWN +} + +func (x *Job) GetCurrentStateTime() *timestamppb.Timestamp { + if x != nil { + return x.CurrentStateTime + } + return nil +} + +func (x *Job) GetRequestedState() JobState { + if x != nil { + return x.RequestedState + } + return JobState_JOB_STATE_UNKNOWN +} + +func (x *Job) GetExecutionInfo() *JobExecutionInfo { + if x != nil { + return x.ExecutionInfo + } + return nil +} + +func (x *Job) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Job) GetReplaceJobId() string { + if x != nil { + return x.ReplaceJobId + } + return "" +} + +func (x *Job) GetTransformNameMapping() map[string]string { + if x != nil { + return x.TransformNameMapping + } + return nil +} + +func (x *Job) GetClientRequestId() string { + if x != nil { + return x.ClientRequestId + } + return "" +} + +func (x *Job) GetReplacedByJobId() string { + if x != nil { + return x.ReplacedByJobId + } + return "" +} + +func (x *Job) GetTempFiles() []string { + if x != nil { + return x.TempFiles + } + return nil +} + +func (x *Job) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Job) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *Job) GetPipelineDescription() *PipelineDescription { + if x != nil { + return x.PipelineDescription + } + return nil +} + +func (x *Job) GetStageStates() []*ExecutionStageState { + if x != nil { + return x.StageStates + } + return nil +} + +func (x *Job) GetJobMetadata() *JobMetadata { + if x != nil { + return x.JobMetadata + } + return nil +} + +func (x *Job) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *Job) GetCreatedFromSnapshotId() string { + if x != nil { + return x.CreatedFromSnapshotId + } + return "" +} + +func (x *Job) GetSatisfiesPzs() bool { + if x != nil { + return x.SatisfiesPzs + } + return false +} + +// Metadata for a Datastore connector used by the job. +type DatastoreIODetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Namespace used in the connection. + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // ProjectId accessed in the connection. + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` +} + +func (x *DatastoreIODetails) Reset() { + *x = DatastoreIODetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatastoreIODetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatastoreIODetails) ProtoMessage() {} + +func (x *DatastoreIODetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DatastoreIODetails.ProtoReflect.Descriptor instead. +func (*DatastoreIODetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{1} +} + +func (x *DatastoreIODetails) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DatastoreIODetails) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Metadata for a Pub/Sub connector used by the job. +type PubSubIODetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Topic accessed in the connection. + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + // Subscription used in the connection. + Subscription string `protobuf:"bytes,2,opt,name=subscription,proto3" json:"subscription,omitempty"` +} + +func (x *PubSubIODetails) Reset() { + *x = PubSubIODetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubSubIODetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubSubIODetails) ProtoMessage() {} + +func (x *PubSubIODetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubSubIODetails.ProtoReflect.Descriptor instead. +func (*PubSubIODetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{2} +} + +func (x *PubSubIODetails) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *PubSubIODetails) GetSubscription() string { + if x != nil { + return x.Subscription + } + return "" +} + +// Metadata for a File connector used by the job. +type FileIODetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // File Pattern used to access files by the connector. + FilePattern string `protobuf:"bytes,1,opt,name=file_pattern,json=filePattern,proto3" json:"file_pattern,omitempty"` +} + +func (x *FileIODetails) Reset() { + *x = FileIODetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileIODetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileIODetails) ProtoMessage() {} + +func (x *FileIODetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileIODetails.ProtoReflect.Descriptor instead. +func (*FileIODetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{3} +} + +func (x *FileIODetails) GetFilePattern() string { + if x != nil { + return x.FilePattern + } + return "" +} + +// Metadata for a Cloud Bigtable connector used by the job. +type BigTableIODetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ProjectId accessed in the connection. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // InstanceId accessed in the connection. + InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // TableId accessed in the connection. + TableId string `protobuf:"bytes,3,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` +} + +func (x *BigTableIODetails) Reset() { + *x = BigTableIODetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigTableIODetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigTableIODetails) ProtoMessage() {} + +func (x *BigTableIODetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigTableIODetails.ProtoReflect.Descriptor instead. +func (*BigTableIODetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{4} +} + +func (x *BigTableIODetails) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *BigTableIODetails) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *BigTableIODetails) GetTableId() string { + if x != nil { + return x.TableId + } + return "" +} + +// Metadata for a BigQuery connector used by the job. +type BigQueryIODetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Table accessed in the connection. + Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` + // Dataset accessed in the connection. + Dataset string `protobuf:"bytes,2,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Project accessed in the connection. + ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // Query used to access data in the connection. + Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *BigQueryIODetails) Reset() { + *x = BigQueryIODetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQueryIODetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQueryIODetails) ProtoMessage() {} + +func (x *BigQueryIODetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQueryIODetails.ProtoReflect.Descriptor instead. +func (*BigQueryIODetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{5} +} + +func (x *BigQueryIODetails) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +func (x *BigQueryIODetails) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *BigQueryIODetails) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *BigQueryIODetails) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +// Metadata for a Spanner connector used by the job. +type SpannerIODetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ProjectId accessed in the connection. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // InstanceId accessed in the connection. + InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // DatabaseId accessed in the connection. + DatabaseId string `protobuf:"bytes,3,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` +} + +func (x *SpannerIODetails) Reset() { + *x = SpannerIODetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpannerIODetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpannerIODetails) ProtoMessage() {} + +func (x *SpannerIODetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpannerIODetails.ProtoReflect.Descriptor instead. +func (*SpannerIODetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{6} +} + +func (x *SpannerIODetails) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *SpannerIODetails) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *SpannerIODetails) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +// The version of the SDK used to run the job. +type SdkVersion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The version of the SDK used to run the job. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // A readable string describing the version of the SDK. + VersionDisplayName string `protobuf:"bytes,2,opt,name=version_display_name,json=versionDisplayName,proto3" json:"version_display_name,omitempty"` + // The support status for this SDK version. + SdkSupportStatus SdkVersion_SdkSupportStatus `protobuf:"varint,3,opt,name=sdk_support_status,json=sdkSupportStatus,proto3,enum=google.dataflow.v1beta3.SdkVersion_SdkSupportStatus" json:"sdk_support_status,omitempty"` +} + +func (x *SdkVersion) Reset() { + *x = SdkVersion{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SdkVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SdkVersion) ProtoMessage() {} + +func (x *SdkVersion) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SdkVersion.ProtoReflect.Descriptor instead. +func (*SdkVersion) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{7} +} + +func (x *SdkVersion) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *SdkVersion) GetVersionDisplayName() string { + if x != nil { + return x.VersionDisplayName + } + return "" +} + +func (x *SdkVersion) GetSdkSupportStatus() SdkVersion_SdkSupportStatus { + if x != nil { + return x.SdkSupportStatus + } + return SdkVersion_UNKNOWN +} + +// Metadata available primarily for filtering jobs. Will be included in the +// ListJob response and Job SUMMARY view. +type JobMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The SDK version used to run the job. + SdkVersion *SdkVersion `protobuf:"bytes,1,opt,name=sdk_version,json=sdkVersion,proto3" json:"sdk_version,omitempty"` + // Identification of a Spanner source used in the Dataflow job. + SpannerDetails []*SpannerIODetails `protobuf:"bytes,2,rep,name=spanner_details,json=spannerDetails,proto3" json:"spanner_details,omitempty"` + // Identification of a BigQuery source used in the Dataflow job. + BigqueryDetails []*BigQueryIODetails `protobuf:"bytes,3,rep,name=bigquery_details,json=bigqueryDetails,proto3" json:"bigquery_details,omitempty"` + // Identification of a Cloud Bigtable source used in the Dataflow job. + BigTableDetails []*BigTableIODetails `protobuf:"bytes,4,rep,name=big_table_details,json=bigTableDetails,proto3" json:"big_table_details,omitempty"` + // Identification of a Pub/Sub source used in the Dataflow job. + PubsubDetails []*PubSubIODetails `protobuf:"bytes,5,rep,name=pubsub_details,json=pubsubDetails,proto3" json:"pubsub_details,omitempty"` + // Identification of a File source used in the Dataflow job. + FileDetails []*FileIODetails `protobuf:"bytes,6,rep,name=file_details,json=fileDetails,proto3" json:"file_details,omitempty"` + // Identification of a Datastore source used in the Dataflow job. + DatastoreDetails []*DatastoreIODetails `protobuf:"bytes,7,rep,name=datastore_details,json=datastoreDetails,proto3" json:"datastore_details,omitempty"` +} + +func (x *JobMetadata) Reset() { + *x = JobMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobMetadata) ProtoMessage() {} + +func (x *JobMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobMetadata.ProtoReflect.Descriptor instead. +func (*JobMetadata) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{8} +} + +func (x *JobMetadata) GetSdkVersion() *SdkVersion { + if x != nil { + return x.SdkVersion + } + return nil +} + +func (x *JobMetadata) GetSpannerDetails() []*SpannerIODetails { + if x != nil { + return x.SpannerDetails + } + return nil +} + +func (x *JobMetadata) GetBigqueryDetails() []*BigQueryIODetails { + if x != nil { + return x.BigqueryDetails + } + return nil +} + +func (x *JobMetadata) GetBigTableDetails() []*BigTableIODetails { + if x != nil { + return x.BigTableDetails + } + return nil +} + +func (x *JobMetadata) GetPubsubDetails() []*PubSubIODetails { + if x != nil { + return x.PubsubDetails + } + return nil +} + +func (x *JobMetadata) GetFileDetails() []*FileIODetails { + if x != nil { + return x.FileDetails + } + return nil +} + +func (x *JobMetadata) GetDatastoreDetails() []*DatastoreIODetails { + if x != nil { + return x.DatastoreDetails + } + return nil +} + +// A message describing the state of a particular execution stage. +type ExecutionStageState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the execution stage. + ExecutionStageName string `protobuf:"bytes,1,opt,name=execution_stage_name,json=executionStageName,proto3" json:"execution_stage_name,omitempty"` + // Executions stage states allow the same set of values as JobState. + ExecutionStageState JobState `protobuf:"varint,2,opt,name=execution_stage_state,json=executionStageState,proto3,enum=google.dataflow.v1beta3.JobState" json:"execution_stage_state,omitempty"` + // The time at which the stage transitioned to this state. + CurrentStateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=current_state_time,json=currentStateTime,proto3" json:"current_state_time,omitempty"` +} + +func (x *ExecutionStageState) Reset() { + *x = ExecutionStageState{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStageState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStageState) ProtoMessage() {} + +func (x *ExecutionStageState) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStageState.ProtoReflect.Descriptor instead. +func (*ExecutionStageState) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{9} +} + +func (x *ExecutionStageState) GetExecutionStageName() string { + if x != nil { + return x.ExecutionStageName + } + return "" +} + +func (x *ExecutionStageState) GetExecutionStageState() JobState { + if x != nil { + return x.ExecutionStageState + } + return JobState_JOB_STATE_UNKNOWN +} + +func (x *ExecutionStageState) GetCurrentStateTime() *timestamppb.Timestamp { + if x != nil { + return x.CurrentStateTime + } + return nil +} + +// A descriptive representation of submitted pipeline as well as the executed +// form. This data is provided by the Dataflow service for ease of visualizing +// the pipeline and interpreting Dataflow provided metrics. +type PipelineDescription struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Description of each transform in the pipeline and collections between them. + OriginalPipelineTransform []*TransformSummary `protobuf:"bytes,1,rep,name=original_pipeline_transform,json=originalPipelineTransform,proto3" json:"original_pipeline_transform,omitempty"` + // Description of each stage of execution of the pipeline. + ExecutionPipelineStage []*ExecutionStageSummary `protobuf:"bytes,2,rep,name=execution_pipeline_stage,json=executionPipelineStage,proto3" json:"execution_pipeline_stage,omitempty"` + // Pipeline level display data. + DisplayData []*DisplayData `protobuf:"bytes,3,rep,name=display_data,json=displayData,proto3" json:"display_data,omitempty"` +} + +func (x *PipelineDescription) Reset() { + *x = PipelineDescription{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineDescription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineDescription) ProtoMessage() {} + +func (x *PipelineDescription) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PipelineDescription.ProtoReflect.Descriptor instead. +func (*PipelineDescription) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{10} +} + +func (x *PipelineDescription) GetOriginalPipelineTransform() []*TransformSummary { + if x != nil { + return x.OriginalPipelineTransform + } + return nil +} + +func (x *PipelineDescription) GetExecutionPipelineStage() []*ExecutionStageSummary { + if x != nil { + return x.ExecutionPipelineStage + } + return nil +} + +func (x *PipelineDescription) GetDisplayData() []*DisplayData { + if x != nil { + return x.DisplayData + } + return nil +} + +// Description of the type, names/ids, and input/outputs for a transform. +type TransformSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of transform. + Kind KindType `protobuf:"varint,1,opt,name=kind,proto3,enum=google.dataflow.v1beta3.KindType" json:"kind,omitempty"` + // SDK generated id of this transform instance. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // User provided name for this transform instance. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // Transform-specific display data. + DisplayData []*DisplayData `protobuf:"bytes,4,rep,name=display_data,json=displayData,proto3" json:"display_data,omitempty"` + // User names for all collection outputs to this transform. + OutputCollectionName []string `protobuf:"bytes,5,rep,name=output_collection_name,json=outputCollectionName,proto3" json:"output_collection_name,omitempty"` + // User names for all collection inputs to this transform. + InputCollectionName []string `protobuf:"bytes,6,rep,name=input_collection_name,json=inputCollectionName,proto3" json:"input_collection_name,omitempty"` +} + +func (x *TransformSummary) Reset() { + *x = TransformSummary{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransformSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransformSummary) ProtoMessage() {} + +func (x *TransformSummary) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransformSummary.ProtoReflect.Descriptor instead. +func (*TransformSummary) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{11} +} + +func (x *TransformSummary) GetKind() KindType { + if x != nil { + return x.Kind + } + return KindType_UNKNOWN_KIND +} + +func (x *TransformSummary) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *TransformSummary) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TransformSummary) GetDisplayData() []*DisplayData { + if x != nil { + return x.DisplayData + } + return nil +} + +func (x *TransformSummary) GetOutputCollectionName() []string { + if x != nil { + return x.OutputCollectionName + } + return nil +} + +func (x *TransformSummary) GetInputCollectionName() []string { + if x != nil { + return x.InputCollectionName + } + return nil +} + +// Description of the composing transforms, names/ids, and input/outputs of a +// stage of execution. Some composing transforms and sources may have been +// generated by the Dataflow service during execution planning. +type ExecutionStageSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Dataflow service generated name for this stage. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Dataflow service generated id for this stage. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // Type of transform this stage is executing. + Kind KindType `protobuf:"varint,3,opt,name=kind,proto3,enum=google.dataflow.v1beta3.KindType" json:"kind,omitempty"` + // Input sources for this stage. + InputSource []*ExecutionStageSummary_StageSource `protobuf:"bytes,4,rep,name=input_source,json=inputSource,proto3" json:"input_source,omitempty"` + // Output sources for this stage. + OutputSource []*ExecutionStageSummary_StageSource `protobuf:"bytes,5,rep,name=output_source,json=outputSource,proto3" json:"output_source,omitempty"` + // Other stages that must complete before this stage can run. + PrerequisiteStage []string `protobuf:"bytes,8,rep,name=prerequisite_stage,json=prerequisiteStage,proto3" json:"prerequisite_stage,omitempty"` + // Transforms that comprise this execution stage. + ComponentTransform []*ExecutionStageSummary_ComponentTransform `protobuf:"bytes,6,rep,name=component_transform,json=componentTransform,proto3" json:"component_transform,omitempty"` + // Collections produced and consumed by component transforms of this stage. + ComponentSource []*ExecutionStageSummary_ComponentSource `protobuf:"bytes,7,rep,name=component_source,json=componentSource,proto3" json:"component_source,omitempty"` +} + +func (x *ExecutionStageSummary) Reset() { + *x = ExecutionStageSummary{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStageSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStageSummary) ProtoMessage() {} + +func (x *ExecutionStageSummary) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStageSummary.ProtoReflect.Descriptor instead. +func (*ExecutionStageSummary) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{12} +} + +func (x *ExecutionStageSummary) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecutionStageSummary) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ExecutionStageSummary) GetKind() KindType { + if x != nil { + return x.Kind + } + return KindType_UNKNOWN_KIND +} + +func (x *ExecutionStageSummary) GetInputSource() []*ExecutionStageSummary_StageSource { + if x != nil { + return x.InputSource + } + return nil +} + +func (x *ExecutionStageSummary) GetOutputSource() []*ExecutionStageSummary_StageSource { + if x != nil { + return x.OutputSource + } + return nil +} + +func (x *ExecutionStageSummary) GetPrerequisiteStage() []string { + if x != nil { + return x.PrerequisiteStage + } + return nil +} + +func (x *ExecutionStageSummary) GetComponentTransform() []*ExecutionStageSummary_ComponentTransform { + if x != nil { + return x.ComponentTransform + } + return nil +} + +func (x *ExecutionStageSummary) GetComponentSource() []*ExecutionStageSummary_ComponentSource { + if x != nil { + return x.ComponentSource + } + return nil +} + +// Data provided with a pipeline or transform to provide descriptive info. +type DisplayData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The key identifying the display data. + // This is intended to be used as a label for the display data + // when viewed in a dax monitoring system. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // The namespace for the key. This is usually a class name or programming + // language namespace (i.e. python module) which defines the display data. + // This allows a dax monitoring system to specially handle the data + // and perform custom rendering. + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + // Various value types which can be used for display data. Only one will be + // set. + // + // Types that are assignable to Value: + // + // *DisplayData_StrValue + // *DisplayData_Int64Value + // *DisplayData_FloatValue + // *DisplayData_JavaClassValue + // *DisplayData_TimestampValue + // *DisplayData_DurationValue + // *DisplayData_BoolValue + Value isDisplayData_Value `protobuf_oneof:"Value"` + // A possible additional shorter value to display. + // For example a java_class_name_value of com.mypackage.MyDoFn + // will be stored with MyDoFn as the short_str_value and + // com.mypackage.MyDoFn as the java_class_name value. + // short_str_value can be displayed and java_class_name_value + // will be displayed as a tooltip. + ShortStrValue string `protobuf:"bytes,11,opt,name=short_str_value,json=shortStrValue,proto3" json:"short_str_value,omitempty"` + // An optional full URL. + Url string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"` + // An optional label to display in a dax UI for the element. + Label string `protobuf:"bytes,13,opt,name=label,proto3" json:"label,omitempty"` +} + +func (x *DisplayData) Reset() { + *x = DisplayData{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisplayData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisplayData) ProtoMessage() {} + +func (x *DisplayData) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisplayData.ProtoReflect.Descriptor instead. +func (*DisplayData) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{13} +} + +func (x *DisplayData) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *DisplayData) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (m *DisplayData) GetValue() isDisplayData_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *DisplayData) GetStrValue() string { + if x, ok := x.GetValue().(*DisplayData_StrValue); ok { + return x.StrValue + } + return "" +} + +func (x *DisplayData) GetInt64Value() int64 { + if x, ok := x.GetValue().(*DisplayData_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (x *DisplayData) GetFloatValue() float32 { + if x, ok := x.GetValue().(*DisplayData_FloatValue); ok { + return x.FloatValue + } + return 0 +} + +func (x *DisplayData) GetJavaClassValue() string { + if x, ok := x.GetValue().(*DisplayData_JavaClassValue); ok { + return x.JavaClassValue + } + return "" +} + +func (x *DisplayData) GetTimestampValue() *timestamppb.Timestamp { + if x, ok := x.GetValue().(*DisplayData_TimestampValue); ok { + return x.TimestampValue + } + return nil +} + +func (x *DisplayData) GetDurationValue() *durationpb.Duration { + if x, ok := x.GetValue().(*DisplayData_DurationValue); ok { + return x.DurationValue + } + return nil +} + +func (x *DisplayData) GetBoolValue() bool { + if x, ok := x.GetValue().(*DisplayData_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (x *DisplayData) GetShortStrValue() string { + if x != nil { + return x.ShortStrValue + } + return "" +} + +func (x *DisplayData) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *DisplayData) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +type isDisplayData_Value interface { + isDisplayData_Value() +} + +type DisplayData_StrValue struct { + // Contains value if the data is of string type. + StrValue string `protobuf:"bytes,4,opt,name=str_value,json=strValue,proto3,oneof"` +} + +type DisplayData_Int64Value struct { + // Contains value if the data is of int64 type. + Int64Value int64 `protobuf:"varint,5,opt,name=int64_value,json=int64Value,proto3,oneof"` +} + +type DisplayData_FloatValue struct { + // Contains value if the data is of float type. + FloatValue float32 `protobuf:"fixed32,6,opt,name=float_value,json=floatValue,proto3,oneof"` +} + +type DisplayData_JavaClassValue struct { + // Contains value if the data is of java class type. + JavaClassValue string `protobuf:"bytes,7,opt,name=java_class_value,json=javaClassValue,proto3,oneof"` +} + +type DisplayData_TimestampValue struct { + // Contains value if the data is of timestamp type. + TimestampValue *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=timestamp_value,json=timestampValue,proto3,oneof"` +} + +type DisplayData_DurationValue struct { + // Contains value if the data is of duration type. + DurationValue *durationpb.Duration `protobuf:"bytes,9,opt,name=duration_value,json=durationValue,proto3,oneof"` +} + +type DisplayData_BoolValue struct { + // Contains value if the data is of a boolean type. + BoolValue bool `protobuf:"varint,10,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +func (*DisplayData_StrValue) isDisplayData_Value() {} + +func (*DisplayData_Int64Value) isDisplayData_Value() {} + +func (*DisplayData_FloatValue) isDisplayData_Value() {} + +func (*DisplayData_JavaClassValue) isDisplayData_Value() {} + +func (*DisplayData_TimestampValue) isDisplayData_Value() {} + +func (*DisplayData_DurationValue) isDisplayData_Value() {} + +func (*DisplayData_BoolValue) isDisplayData_Value() {} + +// Defines a particular step within a Cloud Dataflow job. +// +// A job consists of multiple steps, each of which performs some +// specific operation as part of the overall job. Data is typically +// passed from one step to another as part of the job. +// +// Here's an example of a sequence of steps which together implement a +// Map-Reduce job: +// +// - Read a collection of data from some source, parsing the +// collection's elements. +// +// - Validate the elements. +// +// - Apply a user-defined function to map each element to some value +// and extract an element-specific key value. +// +// - Group elements with the same key into a single element with +// that key, transforming a multiply-keyed collection into a +// uniquely-keyed collection. +// +// - Write the elements out to some data sink. +// +// Note that the Cloud Dataflow service may be used to run many different +// types of jobs, not just Map-Reduce. +type Step struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The kind of step in the Cloud Dataflow job. + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + // The name that identifies the step. This must be unique for each + // step with respect to all other steps in the Cloud Dataflow job. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Named properties associated with the step. Each kind of + // predefined step has its own required set of properties. + // Must be provided on Create. Only retrieved with JOB_VIEW_ALL. + Properties *structpb.Struct `protobuf:"bytes,3,opt,name=properties,proto3" json:"properties,omitempty"` +} + +func (x *Step) Reset() { + *x = Step{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Step) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Step) ProtoMessage() {} + +func (x *Step) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Step.ProtoReflect.Descriptor instead. +func (*Step) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{14} +} + +func (x *Step) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Step) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Step) GetProperties() *structpb.Struct { + if x != nil { + return x.Properties + } + return nil +} + +// Additional information about how a Cloud Dataflow job will be executed that +// isn't contained in the submitted job. +type JobExecutionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A mapping from each stage to the information about that stage. + Stages map[string]*JobExecutionStageInfo `protobuf:"bytes,1,rep,name=stages,proto3" json:"stages,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *JobExecutionInfo) Reset() { + *x = JobExecutionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobExecutionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobExecutionInfo) ProtoMessage() {} + +func (x *JobExecutionInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobExecutionInfo.ProtoReflect.Descriptor instead. +func (*JobExecutionInfo) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{15} +} + +func (x *JobExecutionInfo) GetStages() map[string]*JobExecutionStageInfo { + if x != nil { + return x.Stages + } + return nil +} + +// Contains information about how a particular +// [google.dataflow.v1beta3.Step][google.dataflow.v1beta3.Step] will be executed. +type JobExecutionStageInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The steps associated with the execution stage. + // Note that stages may have several steps, and that a given step + // might be run by more than one stage. + StepName []string `protobuf:"bytes,1,rep,name=step_name,json=stepName,proto3" json:"step_name,omitempty"` +} + +func (x *JobExecutionStageInfo) Reset() { + *x = JobExecutionStageInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobExecutionStageInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobExecutionStageInfo) ProtoMessage() {} + +func (x *JobExecutionStageInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobExecutionStageInfo.ProtoReflect.Descriptor instead. +func (*JobExecutionStageInfo) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{16} +} + +func (x *JobExecutionStageInfo) GetStepName() []string { + if x != nil { + return x.StepName + } + return nil +} + +// Request to create a Cloud Dataflow job. +type CreateJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job to create. + Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` + // The level of information requested in response. + View JobView `protobuf:"varint,3,opt,name=view,proto3,enum=google.dataflow.v1beta3.JobView" json:"view,omitempty"` + // Deprecated. This field is now in the Job message. + ReplaceJobId string `protobuf:"bytes,4,opt,name=replace_job_id,json=replaceJobId,proto3" json:"replace_job_id,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains this job. + Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *CreateJobRequest) Reset() { + *x = CreateJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateJobRequest) ProtoMessage() {} + +func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateJobRequest.ProtoReflect.Descriptor instead. +func (*CreateJobRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateJobRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateJobRequest) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +func (x *CreateJobRequest) GetView() JobView { + if x != nil { + return x.View + } + return JobView_JOB_VIEW_UNKNOWN +} + +func (x *CreateJobRequest) GetReplaceJobId() string { + if x != nil { + return x.ReplaceJobId + } + return "" +} + +func (x *CreateJobRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Request to get the state of a Cloud Dataflow job. +type GetJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job ID. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // The level of information requested in response. + View JobView `protobuf:"varint,3,opt,name=view,proto3,enum=google.dataflow.v1beta3.JobView" json:"view,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains this job. + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *GetJobRequest) Reset() { + *x = GetJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRequest) ProtoMessage() {} + +func (x *GetJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead. +func (*GetJobRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{18} +} + +func (x *GetJobRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetJobRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *GetJobRequest) GetView() JobView { + if x != nil { + return x.View + } + return JobView_JOB_VIEW_UNKNOWN +} + +func (x *GetJobRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Request to update a Cloud Dataflow job. +type UpdateJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job ID. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // The updated job. + // Only the job state is updatable; other fields will be ignored. + Job *Job `protobuf:"bytes,3,opt,name=job,proto3" json:"job,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains this job. + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *UpdateJobRequest) Reset() { + *x = UpdateJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateJobRequest) ProtoMessage() {} + +func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateJobRequest.ProtoReflect.Descriptor instead. +func (*UpdateJobRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{19} +} + +func (x *UpdateJobRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateJobRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *UpdateJobRequest) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +func (x *UpdateJobRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Request to list Cloud Dataflow jobs. +type ListJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The kind of filter to use. + Filter ListJobsRequest_Filter `protobuf:"varint,5,opt,name=filter,proto3,enum=google.dataflow.v1beta3.ListJobsRequest_Filter" json:"filter,omitempty"` + // The project which owns the jobs. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // Deprecated. ListJobs always returns summaries now. + // Use GetJob for other JobViews. + // + // Deprecated: Do not use. + View JobView `protobuf:"varint,2,opt,name=view,proto3,enum=google.dataflow.v1beta3.JobView" json:"view,omitempty"` + // If there are many jobs, limit response to at most this many. + // The actual number of jobs returned will be the lesser of max_responses + // and an unspecified server-defined limit. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Set this to the 'next_page_token' field of a previous response + // to request additional results in a long list. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains this job. + Location string `protobuf:"bytes,17,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *ListJobsRequest) Reset() { + *x = ListJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsRequest) ProtoMessage() {} + +func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead. +func (*ListJobsRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{20} +} + +func (x *ListJobsRequest) GetFilter() ListJobsRequest_Filter { + if x != nil { + return x.Filter + } + return ListJobsRequest_UNKNOWN +} + +func (x *ListJobsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Deprecated: Do not use. +func (x *ListJobsRequest) GetView() JobView { + if x != nil { + return x.View + } + return JobView_JOB_VIEW_UNKNOWN +} + +func (x *ListJobsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListJobsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListJobsRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Indicates which [regional endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) failed +// to respond to a request for data. +type FailedLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // failed to respond. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *FailedLocation) Reset() { + *x = FailedLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FailedLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailedLocation) ProtoMessage() {} + +func (x *FailedLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailedLocation.ProtoReflect.Descriptor instead. +func (*FailedLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{21} +} + +func (x *FailedLocation) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Response to a request to list Cloud Dataflow jobs in a project. This might +// be a partial response, depending on the page size in the ListJobsRequest. +// However, if the project does not have any jobs, an instance of +// ListJobsResponse is not returned and the requests's response +// body is empty {}. +type ListJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A subset of the requested job information. + Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` + // Set if there may be more results than fit in this response. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Zero or more messages describing the [regional endpoints] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // failed to respond. + FailedLocation []*FailedLocation `protobuf:"bytes,3,rep,name=failed_location,json=failedLocation,proto3" json:"failed_location,omitempty"` +} + +func (x *ListJobsResponse) Reset() { + *x = ListJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobsResponse) ProtoMessage() {} + +func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead. +func (*ListJobsResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{22} +} + +func (x *ListJobsResponse) GetJobs() []*Job { + if x != nil { + return x.Jobs + } + return nil +} + +func (x *ListJobsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListJobsResponse) GetFailedLocation() []*FailedLocation { + if x != nil { + return x.FailedLocation + } + return nil +} + +// Request to create a snapshot of a job. +type SnapshotJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The project which owns the job to be snapshotted. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job to be snapshotted. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // TTL for the snapshot. + Ttl *durationpb.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` + // The location that contains this job. + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` + // If true, perform snapshots for sources which support this. + SnapshotSources bool `protobuf:"varint,5,opt,name=snapshot_sources,json=snapshotSources,proto3" json:"snapshot_sources,omitempty"` + // User specified description of the snapshot. Maybe empty. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *SnapshotJobRequest) Reset() { + *x = SnapshotJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SnapshotJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotJobRequest) ProtoMessage() {} + +func (x *SnapshotJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotJobRequest.ProtoReflect.Descriptor instead. +func (*SnapshotJobRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{23} +} + +func (x *SnapshotJobRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *SnapshotJobRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *SnapshotJobRequest) GetTtl() *durationpb.Duration { + if x != nil { + return x.Ttl + } + return nil +} + +func (x *SnapshotJobRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *SnapshotJobRequest) GetSnapshotSources() bool { + if x != nil { + return x.SnapshotSources + } + return false +} + +func (x *SnapshotJobRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// Request to check is active jobs exists for a project +type CheckActiveJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The project which owns the jobs. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` +} + +func (x *CheckActiveJobsRequest) Reset() { + *x = CheckActiveJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckActiveJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckActiveJobsRequest) ProtoMessage() {} + +func (x *CheckActiveJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckActiveJobsRequest.ProtoReflect.Descriptor instead. +func (*CheckActiveJobsRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{24} +} + +func (x *CheckActiveJobsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +// Response for CheckActiveJobsRequest. +type CheckActiveJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If True, active jobs exists for project. False otherwise. + ActiveJobsExist bool `protobuf:"varint,1,opt,name=active_jobs_exist,json=activeJobsExist,proto3" json:"active_jobs_exist,omitempty"` +} + +func (x *CheckActiveJobsResponse) Reset() { + *x = CheckActiveJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckActiveJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckActiveJobsResponse) ProtoMessage() {} + +func (x *CheckActiveJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckActiveJobsResponse.ProtoReflect.Descriptor instead. +func (*CheckActiveJobsResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{25} +} + +func (x *CheckActiveJobsResponse) GetActiveJobsExist() bool { + if x != nil { + return x.ActiveJobsExist + } + return false +} + +// Description of an input or output of an execution stage. +type ExecutionStageSummary_StageSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Human-readable name for this source; may be user or system generated. + UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + // Dataflow service generated name for this source. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // User name for the original user transform or collection with which this + // source is most closely associated. + OriginalTransformOrCollection string `protobuf:"bytes,3,opt,name=original_transform_or_collection,json=originalTransformOrCollection,proto3" json:"original_transform_or_collection,omitempty"` + // Size of the source, if measurable. + SizeBytes int64 `protobuf:"varint,4,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` +} + +func (x *ExecutionStageSummary_StageSource) Reset() { + *x = ExecutionStageSummary_StageSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStageSummary_StageSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStageSummary_StageSource) ProtoMessage() {} + +func (x *ExecutionStageSummary_StageSource) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStageSummary_StageSource.ProtoReflect.Descriptor instead. +func (*ExecutionStageSummary_StageSource) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *ExecutionStageSummary_StageSource) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *ExecutionStageSummary_StageSource) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecutionStageSummary_StageSource) GetOriginalTransformOrCollection() string { + if x != nil { + return x.OriginalTransformOrCollection + } + return "" +} + +func (x *ExecutionStageSummary_StageSource) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +// Description of a transform executed as part of an execution stage. +type ExecutionStageSummary_ComponentTransform struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Human-readable name for this transform; may be user or system generated. + UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + // Dataflow service generated name for this source. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // User name for the original user transform with which this transform is + // most closely associated. + OriginalTransform string `protobuf:"bytes,3,opt,name=original_transform,json=originalTransform,proto3" json:"original_transform,omitempty"` +} + +func (x *ExecutionStageSummary_ComponentTransform) Reset() { + *x = ExecutionStageSummary_ComponentTransform{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStageSummary_ComponentTransform) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStageSummary_ComponentTransform) ProtoMessage() {} + +func (x *ExecutionStageSummary_ComponentTransform) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStageSummary_ComponentTransform.ProtoReflect.Descriptor instead. +func (*ExecutionStageSummary_ComponentTransform) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{12, 1} +} + +func (x *ExecutionStageSummary_ComponentTransform) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *ExecutionStageSummary_ComponentTransform) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecutionStageSummary_ComponentTransform) GetOriginalTransform() string { + if x != nil { + return x.OriginalTransform + } + return "" +} + +// Description of an interstitial value between transforms in an execution +// stage. +type ExecutionStageSummary_ComponentSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Human-readable name for this transform; may be user or system generated. + UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` + // Dataflow service generated name for this source. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // User name for the original user transform or collection with which this + // source is most closely associated. + OriginalTransformOrCollection string `protobuf:"bytes,3,opt,name=original_transform_or_collection,json=originalTransformOrCollection,proto3" json:"original_transform_or_collection,omitempty"` +} + +func (x *ExecutionStageSummary_ComponentSource) Reset() { + *x = ExecutionStageSummary_ComponentSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionStageSummary_ComponentSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionStageSummary_ComponentSource) ProtoMessage() {} + +func (x *ExecutionStageSummary_ComponentSource) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_jobs_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionStageSummary_ComponentSource.ProtoReflect.Descriptor instead. +func (*ExecutionStageSummary_ComponentSource) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP(), []int{12, 2} +} + +func (x *ExecutionStageSummary_ComponentSource) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *ExecutionStageSummary_ComponentSource) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecutionStageSummary_ComponentSource) GetOriginalTransformOrCollection() string { + if x != nil { + return x.OriginalTransformOrCollection + } + return "" +} + +var File_google_dataflow_v1beta3_jobs_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_jobs_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x0c, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, + 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x65, 0x70, 0x73, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, + 0x74, 0x65, 0x70, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0d, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, + 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0e, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4a, 0x6f, 0x62, 0x49, 0x64, 0x12, + 0x6c, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, + 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, + 0x11, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x12, 0x72, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x42, + 0x79, 0x4a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x14, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x0b, 0x6a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x73, 0x5f, + 0x70, 0x7a, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x61, 0x74, 0x69, 0x73, + 0x66, 0x69, 0x65, 0x73, 0x50, 0x7a, 0x73, 0x1a, 0x47, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x51, 0x0a, 0x12, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x4b, + 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x0d, 0x46, + 0x69, 0x6c, 0x65, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, + 0x6e, 0x0a, 0x11, 0x42, 0x69, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x4f, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, + 0x78, 0x0a, 0x11, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x4f, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x73, 0x0a, 0x10, 0x53, 0x70, 0x61, + 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x22, 0x98, + 0x02, 0x0a, 0x0a, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x62, 0x0a, 0x12, 0x73, 0x64, 0x6b, + 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x64, 0x6b, 0x53, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x10, 0x73, 0x64, 0x6b, + 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5a, 0x0a, + 0x10, 0x53, 0x64, 0x6b, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, + 0x05, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x50, 0x52, + 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x04, 0x22, 0xcc, 0x04, 0x0a, 0x0b, 0x4a, 0x6f, + 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x0b, 0x73, 0x64, 0x6b, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x52, 0x0a, 0x0f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x0e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x55, 0x0a, 0x10, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0f, 0x62, 0x69, 0x67, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x56, 0x0a, 0x11, 0x62, 0x69, + 0x67, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x42, 0x69, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x0f, 0x62, 0x69, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x49, 0x4f, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x49, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x4f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x58, + 0x0a, 0x11, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x4f, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x13, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x30, 0x0a, 0x14, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x15, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x13, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x1b, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x19, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x68, 0x0a, 0x18, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, + 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x16, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x47, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0xa0, 0x02, 0x0a, 0x10, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x35, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xed, 0x07, 0x0a, + 0x15, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x5d, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x5f, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x70, + 0x72, 0x65, 0x72, 0x65, 0x71, 0x75, 0x69, 0x73, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x72, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x69, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, + 0xa6, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x47, 0x0a, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x72, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, + 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x74, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1b, + 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2d, 0x0a, 0x12, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x1a, 0x8b, + 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x4f, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd3, 0x03, 0x0a, + 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x09, + 0x73, 0x74, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x08, 0x73, 0x74, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x6a, + 0x61, 0x76, 0x61, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, + 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, + 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x72, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x67, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x10, + 0x4a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x4d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x67, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x1a, + 0x69, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x34, 0x0a, 0x15, 0x4a, 0x6f, + 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0xd9, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x52, + 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x34, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, + 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4a, 0x6f, 0x62, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, + 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, + 0x6f, 0x62, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, + 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, + 0x64, 0x12, 0x2e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, + 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc7, 0x02, + 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x47, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x04, 0x76, 0x69, 0x65, + 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x56, 0x69, 0x65, 0x77, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x76, + 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x06, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, + 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x22, 0x24, 0x0a, 0x0e, 0x46, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, + 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x50, 0x0a, 0x0f, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe0, + 0x01, 0x0a, 0x12, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x03, 0x74, + 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x37, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x17, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x6a, 0x6f, 0x62, 0x73, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x2a, 0xae, 0x01, 0x0a, 0x08, 0x4b, 0x69, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, + 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x52, 0x5f, 0x44, 0x4f, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, + 0x01, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x42, 0x59, 0x5f, 0x4b, 0x45, + 0x59, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x41, 0x54, + 0x54, 0x45, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, + 0x41, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x52, 0x49, + 0x54, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4f, 0x4e, + 0x53, 0x54, 0x41, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, + 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x54, 0x4f, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x07, + 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x48, 0x55, 0x46, 0x46, 0x4c, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, + 0x10, 0x08, 0x2a, 0xc3, 0x02, 0x0a, 0x08, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, + 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4a, 0x4f, 0x42, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x17, + 0x0a, 0x13, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, + 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x16, + 0x0a, 0x12, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x52, 0x41, 0x49, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x08, 0x12, 0x15, 0x0a, + 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x0a, 0x12, 0x14, + 0x0a, 0x10, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x51, 0x55, 0x45, 0x55, + 0x45, 0x44, 0x10, 0x0b, 0x12, 0x22, 0x0a, 0x1e, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x4e, + 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, 0x10, 0x0c, 0x2a, 0x61, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x56, + 0x69, 0x65, 0x77, 0x12, 0x14, 0x0a, 0x10, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4a, 0x4f, 0x42, + 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, + 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x41, 0x4c, 0x4c, 0x10, + 0x02, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x44, 0x45, + 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x32, 0x91, 0x0c, 0x0a, 0x0b, + 0x4a, 0x6f, 0x62, 0x73, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0x12, 0xc1, 0x01, 0x0a, 0x09, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, + 0x6f, 0x62, 0x22, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x65, 0x22, 0x35, 0x2f, 0x76, 0x31, 0x62, + 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, + 0x73, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x5a, 0x27, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x12, + 0xc3, 0x01, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, + 0x22, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6d, 0x12, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, + 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x5a, 0x2b, 0x12, 0x29, 0x2f, 0x76, 0x31, 0x62, + 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xd3, 0x01, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x12, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x22, 0x7d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x77, 0x1a, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x5a, 0x30, 0x1a, 0x29, 0x2f, 0x76, 0x31, + 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, + 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0xc2, 0x01, 0x0a, 0x08, + 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x5b, 0x12, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x5a, 0x22, 0x12, 0x20, + 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, + 0x12, 0x9e, 0x01, 0x0a, 0x12, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x3a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x76, 0x0a, 0x0f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4a, 0x6f, 0x62, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xec, 0x01, 0x0a, 0x0b, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x8c, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x85, 0x01, 0x22, 0x47, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, + 0x69, 0x64, 0x7d, 0x3a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x3a, 0x01, 0x2a, 0x5a, + 0x37, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, + 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x3a, 0x01, 0x2a, 0x1a, 0xd4, 0x01, 0xca, 0x41, 0x17, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xb6, 0x01, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2c, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, + 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, + 0xce, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, + 0x09, 0x4a, 0x6f, 0x62, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0xaa, 0x02, 0x1d, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0xca, 0x02, 0x1d, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0xea, 0x02, 0x20, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_jobs_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_jobs_proto_rawDescData = file_google_dataflow_v1beta3_jobs_proto_rawDesc +) + +func file_google_dataflow_v1beta3_jobs_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_jobs_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_jobs_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_jobs_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_jobs_proto_rawDescData +} + +var file_google_dataflow_v1beta3_jobs_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_google_dataflow_v1beta3_jobs_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_google_dataflow_v1beta3_jobs_proto_goTypes = []interface{}{ + (KindType)(0), // 0: google.dataflow.v1beta3.KindType + (JobState)(0), // 1: google.dataflow.v1beta3.JobState + (JobView)(0), // 2: google.dataflow.v1beta3.JobView + (SdkVersion_SdkSupportStatus)(0), // 3: google.dataflow.v1beta3.SdkVersion.SdkSupportStatus + (ListJobsRequest_Filter)(0), // 4: google.dataflow.v1beta3.ListJobsRequest.Filter + (*Job)(nil), // 5: google.dataflow.v1beta3.Job + (*DatastoreIODetails)(nil), // 6: google.dataflow.v1beta3.DatastoreIODetails + (*PubSubIODetails)(nil), // 7: google.dataflow.v1beta3.PubSubIODetails + (*FileIODetails)(nil), // 8: google.dataflow.v1beta3.FileIODetails + (*BigTableIODetails)(nil), // 9: google.dataflow.v1beta3.BigTableIODetails + (*BigQueryIODetails)(nil), // 10: google.dataflow.v1beta3.BigQueryIODetails + (*SpannerIODetails)(nil), // 11: google.dataflow.v1beta3.SpannerIODetails + (*SdkVersion)(nil), // 12: google.dataflow.v1beta3.SdkVersion + (*JobMetadata)(nil), // 13: google.dataflow.v1beta3.JobMetadata + (*ExecutionStageState)(nil), // 14: google.dataflow.v1beta3.ExecutionStageState + (*PipelineDescription)(nil), // 15: google.dataflow.v1beta3.PipelineDescription + (*TransformSummary)(nil), // 16: google.dataflow.v1beta3.TransformSummary + (*ExecutionStageSummary)(nil), // 17: google.dataflow.v1beta3.ExecutionStageSummary + (*DisplayData)(nil), // 18: google.dataflow.v1beta3.DisplayData + (*Step)(nil), // 19: google.dataflow.v1beta3.Step + (*JobExecutionInfo)(nil), // 20: google.dataflow.v1beta3.JobExecutionInfo + (*JobExecutionStageInfo)(nil), // 21: google.dataflow.v1beta3.JobExecutionStageInfo + (*CreateJobRequest)(nil), // 22: google.dataflow.v1beta3.CreateJobRequest + (*GetJobRequest)(nil), // 23: google.dataflow.v1beta3.GetJobRequest + (*UpdateJobRequest)(nil), // 24: google.dataflow.v1beta3.UpdateJobRequest + (*ListJobsRequest)(nil), // 25: google.dataflow.v1beta3.ListJobsRequest + (*FailedLocation)(nil), // 26: google.dataflow.v1beta3.FailedLocation + (*ListJobsResponse)(nil), // 27: google.dataflow.v1beta3.ListJobsResponse + (*SnapshotJobRequest)(nil), // 28: google.dataflow.v1beta3.SnapshotJobRequest + (*CheckActiveJobsRequest)(nil), // 29: google.dataflow.v1beta3.CheckActiveJobsRequest + (*CheckActiveJobsResponse)(nil), // 30: google.dataflow.v1beta3.CheckActiveJobsResponse + nil, // 31: google.dataflow.v1beta3.Job.TransformNameMappingEntry + nil, // 32: google.dataflow.v1beta3.Job.LabelsEntry + (*ExecutionStageSummary_StageSource)(nil), // 33: google.dataflow.v1beta3.ExecutionStageSummary.StageSource + (*ExecutionStageSummary_ComponentTransform)(nil), // 34: google.dataflow.v1beta3.ExecutionStageSummary.ComponentTransform + (*ExecutionStageSummary_ComponentSource)(nil), // 35: google.dataflow.v1beta3.ExecutionStageSummary.ComponentSource + nil, // 36: google.dataflow.v1beta3.JobExecutionInfo.StagesEntry + (JobType)(0), // 37: google.dataflow.v1beta3.JobType + (*Environment)(nil), // 38: google.dataflow.v1beta3.Environment + (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 40: google.protobuf.Duration + (*structpb.Struct)(nil), // 41: google.protobuf.Struct + (*Snapshot)(nil), // 42: google.dataflow.v1beta3.Snapshot +} +var file_google_dataflow_v1beta3_jobs_proto_depIdxs = []int32{ + 37, // 0: google.dataflow.v1beta3.Job.type:type_name -> google.dataflow.v1beta3.JobType + 38, // 1: google.dataflow.v1beta3.Job.environment:type_name -> google.dataflow.v1beta3.Environment + 19, // 2: google.dataflow.v1beta3.Job.steps:type_name -> google.dataflow.v1beta3.Step + 1, // 3: google.dataflow.v1beta3.Job.current_state:type_name -> google.dataflow.v1beta3.JobState + 39, // 4: google.dataflow.v1beta3.Job.current_state_time:type_name -> google.protobuf.Timestamp + 1, // 5: google.dataflow.v1beta3.Job.requested_state:type_name -> google.dataflow.v1beta3.JobState + 20, // 6: google.dataflow.v1beta3.Job.execution_info:type_name -> google.dataflow.v1beta3.JobExecutionInfo + 39, // 7: google.dataflow.v1beta3.Job.create_time:type_name -> google.protobuf.Timestamp + 31, // 8: google.dataflow.v1beta3.Job.transform_name_mapping:type_name -> google.dataflow.v1beta3.Job.TransformNameMappingEntry + 32, // 9: google.dataflow.v1beta3.Job.labels:type_name -> google.dataflow.v1beta3.Job.LabelsEntry + 15, // 10: google.dataflow.v1beta3.Job.pipeline_description:type_name -> google.dataflow.v1beta3.PipelineDescription + 14, // 11: google.dataflow.v1beta3.Job.stage_states:type_name -> google.dataflow.v1beta3.ExecutionStageState + 13, // 12: google.dataflow.v1beta3.Job.job_metadata:type_name -> google.dataflow.v1beta3.JobMetadata + 39, // 13: google.dataflow.v1beta3.Job.start_time:type_name -> google.protobuf.Timestamp + 3, // 14: google.dataflow.v1beta3.SdkVersion.sdk_support_status:type_name -> google.dataflow.v1beta3.SdkVersion.SdkSupportStatus + 12, // 15: google.dataflow.v1beta3.JobMetadata.sdk_version:type_name -> google.dataflow.v1beta3.SdkVersion + 11, // 16: google.dataflow.v1beta3.JobMetadata.spanner_details:type_name -> google.dataflow.v1beta3.SpannerIODetails + 10, // 17: google.dataflow.v1beta3.JobMetadata.bigquery_details:type_name -> google.dataflow.v1beta3.BigQueryIODetails + 9, // 18: google.dataflow.v1beta3.JobMetadata.big_table_details:type_name -> google.dataflow.v1beta3.BigTableIODetails + 7, // 19: google.dataflow.v1beta3.JobMetadata.pubsub_details:type_name -> google.dataflow.v1beta3.PubSubIODetails + 8, // 20: google.dataflow.v1beta3.JobMetadata.file_details:type_name -> google.dataflow.v1beta3.FileIODetails + 6, // 21: google.dataflow.v1beta3.JobMetadata.datastore_details:type_name -> google.dataflow.v1beta3.DatastoreIODetails + 1, // 22: google.dataflow.v1beta3.ExecutionStageState.execution_stage_state:type_name -> google.dataflow.v1beta3.JobState + 39, // 23: google.dataflow.v1beta3.ExecutionStageState.current_state_time:type_name -> google.protobuf.Timestamp + 16, // 24: google.dataflow.v1beta3.PipelineDescription.original_pipeline_transform:type_name -> google.dataflow.v1beta3.TransformSummary + 17, // 25: google.dataflow.v1beta3.PipelineDescription.execution_pipeline_stage:type_name -> google.dataflow.v1beta3.ExecutionStageSummary + 18, // 26: google.dataflow.v1beta3.PipelineDescription.display_data:type_name -> google.dataflow.v1beta3.DisplayData + 0, // 27: google.dataflow.v1beta3.TransformSummary.kind:type_name -> google.dataflow.v1beta3.KindType + 18, // 28: google.dataflow.v1beta3.TransformSummary.display_data:type_name -> google.dataflow.v1beta3.DisplayData + 0, // 29: google.dataflow.v1beta3.ExecutionStageSummary.kind:type_name -> google.dataflow.v1beta3.KindType + 33, // 30: google.dataflow.v1beta3.ExecutionStageSummary.input_source:type_name -> google.dataflow.v1beta3.ExecutionStageSummary.StageSource + 33, // 31: google.dataflow.v1beta3.ExecutionStageSummary.output_source:type_name -> google.dataflow.v1beta3.ExecutionStageSummary.StageSource + 34, // 32: google.dataflow.v1beta3.ExecutionStageSummary.component_transform:type_name -> google.dataflow.v1beta3.ExecutionStageSummary.ComponentTransform + 35, // 33: google.dataflow.v1beta3.ExecutionStageSummary.component_source:type_name -> google.dataflow.v1beta3.ExecutionStageSummary.ComponentSource + 39, // 34: google.dataflow.v1beta3.DisplayData.timestamp_value:type_name -> google.protobuf.Timestamp + 40, // 35: google.dataflow.v1beta3.DisplayData.duration_value:type_name -> google.protobuf.Duration + 41, // 36: google.dataflow.v1beta3.Step.properties:type_name -> google.protobuf.Struct + 36, // 37: google.dataflow.v1beta3.JobExecutionInfo.stages:type_name -> google.dataflow.v1beta3.JobExecutionInfo.StagesEntry + 5, // 38: google.dataflow.v1beta3.CreateJobRequest.job:type_name -> google.dataflow.v1beta3.Job + 2, // 39: google.dataflow.v1beta3.CreateJobRequest.view:type_name -> google.dataflow.v1beta3.JobView + 2, // 40: google.dataflow.v1beta3.GetJobRequest.view:type_name -> google.dataflow.v1beta3.JobView + 5, // 41: google.dataflow.v1beta3.UpdateJobRequest.job:type_name -> google.dataflow.v1beta3.Job + 4, // 42: google.dataflow.v1beta3.ListJobsRequest.filter:type_name -> google.dataflow.v1beta3.ListJobsRequest.Filter + 2, // 43: google.dataflow.v1beta3.ListJobsRequest.view:type_name -> google.dataflow.v1beta3.JobView + 5, // 44: google.dataflow.v1beta3.ListJobsResponse.jobs:type_name -> google.dataflow.v1beta3.Job + 26, // 45: google.dataflow.v1beta3.ListJobsResponse.failed_location:type_name -> google.dataflow.v1beta3.FailedLocation + 40, // 46: google.dataflow.v1beta3.SnapshotJobRequest.ttl:type_name -> google.protobuf.Duration + 21, // 47: google.dataflow.v1beta3.JobExecutionInfo.StagesEntry.value:type_name -> google.dataflow.v1beta3.JobExecutionStageInfo + 22, // 48: google.dataflow.v1beta3.JobsV1Beta3.CreateJob:input_type -> google.dataflow.v1beta3.CreateJobRequest + 23, // 49: google.dataflow.v1beta3.JobsV1Beta3.GetJob:input_type -> google.dataflow.v1beta3.GetJobRequest + 24, // 50: google.dataflow.v1beta3.JobsV1Beta3.UpdateJob:input_type -> google.dataflow.v1beta3.UpdateJobRequest + 25, // 51: google.dataflow.v1beta3.JobsV1Beta3.ListJobs:input_type -> google.dataflow.v1beta3.ListJobsRequest + 25, // 52: google.dataflow.v1beta3.JobsV1Beta3.AggregatedListJobs:input_type -> google.dataflow.v1beta3.ListJobsRequest + 29, // 53: google.dataflow.v1beta3.JobsV1Beta3.CheckActiveJobs:input_type -> google.dataflow.v1beta3.CheckActiveJobsRequest + 28, // 54: google.dataflow.v1beta3.JobsV1Beta3.SnapshotJob:input_type -> google.dataflow.v1beta3.SnapshotJobRequest + 5, // 55: google.dataflow.v1beta3.JobsV1Beta3.CreateJob:output_type -> google.dataflow.v1beta3.Job + 5, // 56: google.dataflow.v1beta3.JobsV1Beta3.GetJob:output_type -> google.dataflow.v1beta3.Job + 5, // 57: google.dataflow.v1beta3.JobsV1Beta3.UpdateJob:output_type -> google.dataflow.v1beta3.Job + 27, // 58: google.dataflow.v1beta3.JobsV1Beta3.ListJobs:output_type -> google.dataflow.v1beta3.ListJobsResponse + 27, // 59: google.dataflow.v1beta3.JobsV1Beta3.AggregatedListJobs:output_type -> google.dataflow.v1beta3.ListJobsResponse + 30, // 60: google.dataflow.v1beta3.JobsV1Beta3.CheckActiveJobs:output_type -> google.dataflow.v1beta3.CheckActiveJobsResponse + 42, // 61: google.dataflow.v1beta3.JobsV1Beta3.SnapshotJob:output_type -> google.dataflow.v1beta3.Snapshot + 55, // [55:62] is the sub-list for method output_type + 48, // [48:55] is the sub-list for method input_type + 48, // [48:48] is the sub-list for extension type_name + 48, // [48:48] is the sub-list for extension extendee + 0, // [0:48] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_jobs_proto_init() } +func file_google_dataflow_v1beta3_jobs_proto_init() { + if File_google_dataflow_v1beta3_jobs_proto != nil { + return + } + file_google_dataflow_v1beta3_environment_proto_init() + file_google_dataflow_v1beta3_snapshots_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_jobs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatastoreIODetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubSubIODetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileIODetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigTableIODetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQueryIODetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpannerIODetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SdkVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStageState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineDescription); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransformSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStageSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisplayData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Step); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobExecutionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobExecutionStageInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailedLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckActiveJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckActiveJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStageSummary_StageSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStageSummary_ComponentTransform); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionStageSummary_ComponentSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_dataflow_v1beta3_jobs_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*DisplayData_StrValue)(nil), + (*DisplayData_Int64Value)(nil), + (*DisplayData_FloatValue)(nil), + (*DisplayData_JavaClassValue)(nil), + (*DisplayData_TimestampValue)(nil), + (*DisplayData_DurationValue)(nil), + (*DisplayData_BoolValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_jobs_proto_rawDesc, + NumEnums: 5, + NumMessages: 32, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_dataflow_v1beta3_jobs_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_jobs_proto_depIdxs, + EnumInfos: file_google_dataflow_v1beta3_jobs_proto_enumTypes, + MessageInfos: file_google_dataflow_v1beta3_jobs_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_jobs_proto = out.File + file_google_dataflow_v1beta3_jobs_proto_rawDesc = nil + file_google_dataflow_v1beta3_jobs_proto_goTypes = nil + file_google_dataflow_v1beta3_jobs_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// JobsV1Beta3Client is the client API for JobsV1Beta3 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type JobsV1Beta3Client interface { + // Creates a Cloud Dataflow job. + // + // To create a job, we recommend using `projects.locations.jobs.create` with a + // [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.create` is not recommended, as your job will always start + // in `us-central1`. + CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) + // Gets the state of the specified Cloud Dataflow job. + // + // To get the state of a job, we recommend using `projects.locations.jobs.get` + // with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.get` is not recommended, as you can only get the state of + // jobs that are running in `us-central1`. + GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) + // Updates the state of an existing Cloud Dataflow job. + // + // To update the state of an existing job, we recommend using + // `projects.locations.jobs.update` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.update` is not recommended, as you can only update the state + // of jobs that are running in `us-central1`. + UpdateJob(ctx context.Context, in *UpdateJobRequest, opts ...grpc.CallOption) (*Job, error) + // List the jobs of a project. + // + // To list the jobs of a project in a region, we recommend using + // `projects.locations.jobs.list` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To + // list the all jobs across all regions, use `projects.jobs.aggregated`. Using + // `projects.jobs.list` is not recommended, as you can only get the list of + // jobs that are running in `us-central1`. + ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) + // List the jobs of a project across all regions. + AggregatedListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) + // Check for existence of active jobs in the given project across all regions. + CheckActiveJobs(ctx context.Context, in *CheckActiveJobsRequest, opts ...grpc.CallOption) (*CheckActiveJobsResponse, error) + // Snapshot the state of a streaming job. + SnapshotJob(ctx context.Context, in *SnapshotJobRequest, opts ...grpc.CallOption) (*Snapshot, error) +} + +type jobsV1Beta3Client struct { + cc grpc.ClientConnInterface +} + +func NewJobsV1Beta3Client(cc grpc.ClientConnInterface) JobsV1Beta3Client { + return &jobsV1Beta3Client{cc} +} + +func (c *jobsV1Beta3Client) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/CreateJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobsV1Beta3Client) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/GetJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobsV1Beta3Client) UpdateJob(ctx context.Context, in *UpdateJobRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/UpdateJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobsV1Beta3Client) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { + out := new(ListJobsResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/ListJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobsV1Beta3Client) AggregatedListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { + out := new(ListJobsResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/AggregatedListJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobsV1Beta3Client) CheckActiveJobs(ctx context.Context, in *CheckActiveJobsRequest, opts ...grpc.CallOption) (*CheckActiveJobsResponse, error) { + out := new(CheckActiveJobsResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/CheckActiveJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobsV1Beta3Client) SnapshotJob(ctx context.Context, in *SnapshotJobRequest, opts ...grpc.CallOption) (*Snapshot, error) { + out := new(Snapshot) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.JobsV1Beta3/SnapshotJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// JobsV1Beta3Server is the server API for JobsV1Beta3 service. +type JobsV1Beta3Server interface { + // Creates a Cloud Dataflow job. + // + // To create a job, we recommend using `projects.locations.jobs.create` with a + // [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.create` is not recommended, as your job will always start + // in `us-central1`. + CreateJob(context.Context, *CreateJobRequest) (*Job, error) + // Gets the state of the specified Cloud Dataflow job. + // + // To get the state of a job, we recommend using `projects.locations.jobs.get` + // with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.get` is not recommended, as you can only get the state of + // jobs that are running in `us-central1`. + GetJob(context.Context, *GetJobRequest) (*Job, error) + // Updates the state of an existing Cloud Dataflow job. + // + // To update the state of an existing job, we recommend using + // `projects.locations.jobs.update` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.update` is not recommended, as you can only update the state + // of jobs that are running in `us-central1`. + UpdateJob(context.Context, *UpdateJobRequest) (*Job, error) + // List the jobs of a project. + // + // To list the jobs of a project in a region, we recommend using + // `projects.locations.jobs.list` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To + // list the all jobs across all regions, use `projects.jobs.aggregated`. Using + // `projects.jobs.list` is not recommended, as you can only get the list of + // jobs that are running in `us-central1`. + ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) + // List the jobs of a project across all regions. + AggregatedListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) + // Check for existence of active jobs in the given project across all regions. + CheckActiveJobs(context.Context, *CheckActiveJobsRequest) (*CheckActiveJobsResponse, error) + // Snapshot the state of a streaming job. + SnapshotJob(context.Context, *SnapshotJobRequest) (*Snapshot, error) +} + +// UnimplementedJobsV1Beta3Server can be embedded to have forward compatible implementations. +type UnimplementedJobsV1Beta3Server struct { +} + +func (*UnimplementedJobsV1Beta3Server) CreateJob(context.Context, *CreateJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented") +} +func (*UnimplementedJobsV1Beta3Server) GetJob(context.Context, *GetJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") +} +func (*UnimplementedJobsV1Beta3Server) UpdateJob(context.Context, *UpdateJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateJob not implemented") +} +func (*UnimplementedJobsV1Beta3Server) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") +} +func (*UnimplementedJobsV1Beta3Server) AggregatedListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregatedListJobs not implemented") +} +func (*UnimplementedJobsV1Beta3Server) CheckActiveJobs(context.Context, *CheckActiveJobsRequest) (*CheckActiveJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckActiveJobs not implemented") +} +func (*UnimplementedJobsV1Beta3Server) SnapshotJob(context.Context, *SnapshotJobRequest) (*Snapshot, error) { + return nil, status.Errorf(codes.Unimplemented, "method SnapshotJob not implemented") +} + +func RegisterJobsV1Beta3Server(s *grpc.Server, srv JobsV1Beta3Server) { + s.RegisterService(&_JobsV1Beta3_serviceDesc, srv) +} + +func _JobsV1Beta3_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).CreateJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/CreateJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).CreateJob(ctx, req.(*CreateJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobsV1Beta3_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).GetJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/GetJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).GetJob(ctx, req.(*GetJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobsV1Beta3_UpdateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).UpdateJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/UpdateJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).UpdateJob(ctx, req.(*UpdateJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobsV1Beta3_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).ListJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/ListJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).ListJobs(ctx, req.(*ListJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobsV1Beta3_AggregatedListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).AggregatedListJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/AggregatedListJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).AggregatedListJobs(ctx, req.(*ListJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobsV1Beta3_CheckActiveJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckActiveJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).CheckActiveJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/CheckActiveJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).CheckActiveJobs(ctx, req.(*CheckActiveJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobsV1Beta3_SnapshotJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SnapshotJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobsV1Beta3Server).SnapshotJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.JobsV1Beta3/SnapshotJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobsV1Beta3Server).SnapshotJob(ctx, req.(*SnapshotJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _JobsV1Beta3_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.dataflow.v1beta3.JobsV1Beta3", + HandlerType: (*JobsV1Beta3Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateJob", + Handler: _JobsV1Beta3_CreateJob_Handler, + }, + { + MethodName: "GetJob", + Handler: _JobsV1Beta3_GetJob_Handler, + }, + { + MethodName: "UpdateJob", + Handler: _JobsV1Beta3_UpdateJob_Handler, + }, + { + MethodName: "ListJobs", + Handler: _JobsV1Beta3_ListJobs_Handler, + }, + { + MethodName: "AggregatedListJobs", + Handler: _JobsV1Beta3_AggregatedListJobs_Handler, + }, + { + MethodName: "CheckActiveJobs", + Handler: _JobsV1Beta3_CheckActiveJobs_Handler, + }, + { + MethodName: "SnapshotJob", + Handler: _JobsV1Beta3_SnapshotJob_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/dataflow/v1beta3/jobs.proto", +} diff --git a/dataflow/apiv1beta3/dataflowpb/messages.pb.go b/dataflow/apiv1beta3/dataflowpb/messages.pb.go new file mode 100644 index 000000000000..efab50ea09e5 --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/messages.pb.go @@ -0,0 +1,1103 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/messages.proto + +package dataflowpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Indicates the importance of the message. +type JobMessageImportance int32 + +const ( + // The message importance isn't specified, or is unknown. + JobMessageImportance_JOB_MESSAGE_IMPORTANCE_UNKNOWN JobMessageImportance = 0 + // The message is at the 'debug' level: typically only useful for + // software engineers working on the code the job is running. + // Typically, Dataflow pipeline runners do not display log messages + // at this level by default. + JobMessageImportance_JOB_MESSAGE_DEBUG JobMessageImportance = 1 + // The message is at the 'detailed' level: somewhat verbose, but + // potentially useful to users. Typically, Dataflow pipeline + // runners do not display log messages at this level by default. + // These messages are displayed by default in the Dataflow + // monitoring UI. + JobMessageImportance_JOB_MESSAGE_DETAILED JobMessageImportance = 2 + // The message is at the 'basic' level: useful for keeping + // track of the execution of a Dataflow pipeline. Typically, + // Dataflow pipeline runners display log messages at this level by + // default, and these messages are displayed by default in the + // Dataflow monitoring UI. + JobMessageImportance_JOB_MESSAGE_BASIC JobMessageImportance = 5 + // The message is at the 'warning' level: indicating a condition + // pertaining to a job which may require human intervention. + // Typically, Dataflow pipeline runners display log messages at this + // level by default, and these messages are displayed by default in + // the Dataflow monitoring UI. + JobMessageImportance_JOB_MESSAGE_WARNING JobMessageImportance = 3 + // The message is at the 'error' level: indicating a condition + // preventing a job from succeeding. Typically, Dataflow pipeline + // runners display log messages at this level by default, and these + // messages are displayed by default in the Dataflow monitoring UI. + JobMessageImportance_JOB_MESSAGE_ERROR JobMessageImportance = 4 +) + +// Enum value maps for JobMessageImportance. +var ( + JobMessageImportance_name = map[int32]string{ + 0: "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + 1: "JOB_MESSAGE_DEBUG", + 2: "JOB_MESSAGE_DETAILED", + 5: "JOB_MESSAGE_BASIC", + 3: "JOB_MESSAGE_WARNING", + 4: "JOB_MESSAGE_ERROR", + } + JobMessageImportance_value = map[string]int32{ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN": 0, + "JOB_MESSAGE_DEBUG": 1, + "JOB_MESSAGE_DETAILED": 2, + "JOB_MESSAGE_BASIC": 5, + "JOB_MESSAGE_WARNING": 3, + "JOB_MESSAGE_ERROR": 4, + } +) + +func (x JobMessageImportance) Enum() *JobMessageImportance { + p := new(JobMessageImportance) + *p = x + return p +} + +func (x JobMessageImportance) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobMessageImportance) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_messages_proto_enumTypes[0].Descriptor() +} + +func (JobMessageImportance) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_messages_proto_enumTypes[0] +} + +func (x JobMessageImportance) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobMessageImportance.Descriptor instead. +func (JobMessageImportance) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{0} +} + +// Indicates the type of autoscaling event. +type AutoscalingEvent_AutoscalingEventType int32 + +const ( + // Default type for the enum. Value should never be returned. + AutoscalingEvent_TYPE_UNKNOWN AutoscalingEvent_AutoscalingEventType = 0 + // The TARGET_NUM_WORKERS_CHANGED type should be used when the target + // worker pool size has changed at the start of an actuation. An event + // should always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects + // a change in the target_num_workers. + AutoscalingEvent_TARGET_NUM_WORKERS_CHANGED AutoscalingEvent_AutoscalingEventType = 1 + // The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker + // pool size has been changed, but the target_num_workers has not changed. + AutoscalingEvent_CURRENT_NUM_WORKERS_CHANGED AutoscalingEvent_AutoscalingEventType = 2 + // The ACTUATION_FAILURE type should be used when we want to report + // an error to the user indicating why the current number of workers + // in the pool could not be changed. + // Displayed in the current status and history widgets. + AutoscalingEvent_ACTUATION_FAILURE AutoscalingEvent_AutoscalingEventType = 3 + // Used when we want to report to the user a reason why we are + // not currently adjusting the number of workers. + // Should specify both target_num_workers, current_num_workers and a + // decision_message. + AutoscalingEvent_NO_CHANGE AutoscalingEvent_AutoscalingEventType = 4 +) + +// Enum value maps for AutoscalingEvent_AutoscalingEventType. +var ( + AutoscalingEvent_AutoscalingEventType_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 1: "TARGET_NUM_WORKERS_CHANGED", + 2: "CURRENT_NUM_WORKERS_CHANGED", + 3: "ACTUATION_FAILURE", + 4: "NO_CHANGE", + } + AutoscalingEvent_AutoscalingEventType_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "TARGET_NUM_WORKERS_CHANGED": 1, + "CURRENT_NUM_WORKERS_CHANGED": 2, + "ACTUATION_FAILURE": 3, + "NO_CHANGE": 4, + } +) + +func (x AutoscalingEvent_AutoscalingEventType) Enum() *AutoscalingEvent_AutoscalingEventType { + p := new(AutoscalingEvent_AutoscalingEventType) + *p = x + return p +} + +func (x AutoscalingEvent_AutoscalingEventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AutoscalingEvent_AutoscalingEventType) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_messages_proto_enumTypes[1].Descriptor() +} + +func (AutoscalingEvent_AutoscalingEventType) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_messages_proto_enumTypes[1] +} + +func (x AutoscalingEvent_AutoscalingEventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AutoscalingEvent_AutoscalingEventType.Descriptor instead. +func (AutoscalingEvent_AutoscalingEventType) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{2, 0} +} + +// A particular message pertaining to a Dataflow job. +type JobMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The timestamp of the message. + Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` + // The text of the message. + MessageText string `protobuf:"bytes,3,opt,name=message_text,json=messageText,proto3" json:"message_text,omitempty"` + // Importance level of the message. + MessageImportance JobMessageImportance `protobuf:"varint,4,opt,name=message_importance,json=messageImportance,proto3,enum=google.dataflow.v1beta3.JobMessageImportance" json:"message_importance,omitempty"` +} + +func (x *JobMessage) Reset() { + *x = JobMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobMessage) ProtoMessage() {} + +func (x *JobMessage) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobMessage.ProtoReflect.Descriptor instead. +func (*JobMessage) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *JobMessage) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *JobMessage) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *JobMessage) GetMessageText() string { + if x != nil { + return x.MessageText + } + return "" +} + +func (x *JobMessage) GetMessageImportance() JobMessageImportance { + if x != nil { + return x.MessageImportance + } + return JobMessageImportance_JOB_MESSAGE_IMPORTANCE_UNKNOWN +} + +// A rich message format, including a human readable string, a key for +// identifying the message, and structured data associated with the message for +// programmatic consumption. +type StructuredMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Human-readable version of message. + MessageText string `protobuf:"bytes,1,opt,name=message_text,json=messageText,proto3" json:"message_text,omitempty"` + // Identifier for this message type. Used by external systems to + // internationalize or personalize message. + MessageKey string `protobuf:"bytes,2,opt,name=message_key,json=messageKey,proto3" json:"message_key,omitempty"` + // The structured data associated with this message. + Parameters []*StructuredMessage_Parameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *StructuredMessage) Reset() { + *x = StructuredMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructuredMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructuredMessage) ProtoMessage() {} + +func (x *StructuredMessage) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructuredMessage.ProtoReflect.Descriptor instead. +func (*StructuredMessage) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{1} +} + +func (x *StructuredMessage) GetMessageText() string { + if x != nil { + return x.MessageText + } + return "" +} + +func (x *StructuredMessage) GetMessageKey() string { + if x != nil { + return x.MessageKey + } + return "" +} + +func (x *StructuredMessage) GetParameters() []*StructuredMessage_Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +// A structured message reporting an autoscaling decision made by the Dataflow +// service. +type AutoscalingEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The current number of workers the job has. + CurrentNumWorkers int64 `protobuf:"varint,1,opt,name=current_num_workers,json=currentNumWorkers,proto3" json:"current_num_workers,omitempty"` + // The target number of workers the worker pool wants to resize to use. + TargetNumWorkers int64 `protobuf:"varint,2,opt,name=target_num_workers,json=targetNumWorkers,proto3" json:"target_num_workers,omitempty"` + // The type of autoscaling event to report. + EventType AutoscalingEvent_AutoscalingEventType `protobuf:"varint,3,opt,name=event_type,json=eventType,proto3,enum=google.dataflow.v1beta3.AutoscalingEvent_AutoscalingEventType" json:"event_type,omitempty"` + // A message describing why the system decided to adjust the current + // number of workers, why it failed, or why the system decided to + // not make any changes to the number of workers. + Description *StructuredMessage `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // The time this event was emitted to indicate a new target or current + // num_workers value. + Time *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"` + // A short and friendly name for the worker pool this event refers to. + WorkerPool string `protobuf:"bytes,7,opt,name=worker_pool,json=workerPool,proto3" json:"worker_pool,omitempty"` +} + +func (x *AutoscalingEvent) Reset() { + *x = AutoscalingEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoscalingEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoscalingEvent) ProtoMessage() {} + +func (x *AutoscalingEvent) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AutoscalingEvent.ProtoReflect.Descriptor instead. +func (*AutoscalingEvent) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{2} +} + +func (x *AutoscalingEvent) GetCurrentNumWorkers() int64 { + if x != nil { + return x.CurrentNumWorkers + } + return 0 +} + +func (x *AutoscalingEvent) GetTargetNumWorkers() int64 { + if x != nil { + return x.TargetNumWorkers + } + return 0 +} + +func (x *AutoscalingEvent) GetEventType() AutoscalingEvent_AutoscalingEventType { + if x != nil { + return x.EventType + } + return AutoscalingEvent_TYPE_UNKNOWN +} + +func (x *AutoscalingEvent) GetDescription() *StructuredMessage { + if x != nil { + return x.Description + } + return nil +} + +func (x *AutoscalingEvent) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *AutoscalingEvent) GetWorkerPool() string { + if x != nil { + return x.WorkerPool + } + return "" +} + +// Request to list job messages. +// Up to max_results messages will be returned in the time range specified +// starting with the oldest messages first. If no time range is specified +// the results with start with the oldest message. +type ListJobMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A project id. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job to get messages about. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // Filter to only get messages with importance >= level + MinimumImportance JobMessageImportance `protobuf:"varint,3,opt,name=minimum_importance,json=minimumImportance,proto3,enum=google.dataflow.v1beta3.JobMessageImportance" json:"minimum_importance,omitempty"` + // If specified, determines the maximum number of messages to + // return. If unspecified, the service may choose an appropriate + // default, or may return an arbitrarily large number of results. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // If supplied, this should be the value of next_page_token returned + // by an earlier call. This will cause the next page of results to + // be returned. + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // If specified, return only messages with timestamps >= start_time. + // The default is the job creation time (i.e. beginning of messages). + StartTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // Return only messages with timestamps < end_time. The default is now + // (i.e. return up to the latest messages available). + EndTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains the job specified by job_id. + Location string `protobuf:"bytes,8,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *ListJobMessagesRequest) Reset() { + *x = ListJobMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobMessagesRequest) ProtoMessage() {} + +func (x *ListJobMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobMessagesRequest.ProtoReflect.Descriptor instead. +func (*ListJobMessagesRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{3} +} + +func (x *ListJobMessagesRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListJobMessagesRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *ListJobMessagesRequest) GetMinimumImportance() JobMessageImportance { + if x != nil { + return x.MinimumImportance + } + return JobMessageImportance_JOB_MESSAGE_IMPORTANCE_UNKNOWN +} + +func (x *ListJobMessagesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListJobMessagesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListJobMessagesRequest) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *ListJobMessagesRequest) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *ListJobMessagesRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Response to a request to list job messages. +type ListJobMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Messages in ascending timestamp order. + JobMessages []*JobMessage `protobuf:"bytes,1,rep,name=job_messages,json=jobMessages,proto3" json:"job_messages,omitempty"` + // The token to obtain the next page of results if there are more. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Autoscaling events in ascending timestamp order. + AutoscalingEvents []*AutoscalingEvent `protobuf:"bytes,3,rep,name=autoscaling_events,json=autoscalingEvents,proto3" json:"autoscaling_events,omitempty"` +} + +func (x *ListJobMessagesResponse) Reset() { + *x = ListJobMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobMessagesResponse) ProtoMessage() {} + +func (x *ListJobMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListJobMessagesResponse.ProtoReflect.Descriptor instead. +func (*ListJobMessagesResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{4} +} + +func (x *ListJobMessagesResponse) GetJobMessages() []*JobMessage { + if x != nil { + return x.JobMessages + } + return nil +} + +func (x *ListJobMessagesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListJobMessagesResponse) GetAutoscalingEvents() []*AutoscalingEvent { + if x != nil { + return x.AutoscalingEvents + } + return nil +} + +// Structured data associated with this message. +type StructuredMessage_Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Key or name for this parameter. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Value for this parameter. + Value *structpb.Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *StructuredMessage_Parameter) Reset() { + *x = StructuredMessage_Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructuredMessage_Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructuredMessage_Parameter) ProtoMessage() {} + +func (x *StructuredMessage_Parameter) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_messages_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructuredMessage_Parameter.ProtoReflect.Descriptor instead. +func (*StructuredMessage_Parameter) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_messages_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *StructuredMessage_Parameter) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *StructuredMessage_Parameter) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +var File_google_dataflow_v1beta3_messages_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_messages_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x65, 0x78, 0x74, 0x12, 0x5c, 0x0a, 0x12, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x65, 0x78, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x54, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x80, 0x04, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4e, + 0x75, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x75, 0x6d, + 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, + 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, + 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x70, + 0x6f, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x8f, 0x01, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, + 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x55, 0x4d, 0x5f, 0x57, + 0x4f, 0x52, 0x4b, 0x45, 0x52, 0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x55, 0x4d, 0x5f, + 0x57, 0x4f, 0x52, 0x4b, 0x45, 0x52, 0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, + 0x02, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x43, 0x54, 0x55, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f, 0x43, + 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x5c, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x69, + 0x6d, 0x75, 0x6d, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, + 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, + 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xe3, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0c, + 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x58, 0x0a, 0x12, + 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0xb2, 0x01, 0x0a, 0x14, 0x4a, 0x6f, 0x62, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, + 0x22, 0x0a, 0x1e, 0x4a, 0x4f, 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, + 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, + 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, + 0x41, 0x47, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x4a, + 0x4f, 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4a, 0x4f, 0x42, 0x5f, 0x4d, 0x45, 0x53, 0x53, + 0x41, 0x47, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x32, 0xe7, 0x03, 0x0a, 0x0f, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0x12, + 0xfc, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7f, 0x12, + 0x47, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5a, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x62, + 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0xd4, + 0x01, 0xca, 0x41, 0x17, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xb6, 0x01, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x72, 0x65, + 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0xd2, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0xaa, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0xca, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0xea, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_messages_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_messages_proto_rawDescData = file_google_dataflow_v1beta3_messages_proto_rawDesc +) + +func file_google_dataflow_v1beta3_messages_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_messages_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_messages_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_messages_proto_rawDescData +} + +var file_google_dataflow_v1beta3_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_dataflow_v1beta3_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_dataflow_v1beta3_messages_proto_goTypes = []interface{}{ + (JobMessageImportance)(0), // 0: google.dataflow.v1beta3.JobMessageImportance + (AutoscalingEvent_AutoscalingEventType)(0), // 1: google.dataflow.v1beta3.AutoscalingEvent.AutoscalingEventType + (*JobMessage)(nil), // 2: google.dataflow.v1beta3.JobMessage + (*StructuredMessage)(nil), // 3: google.dataflow.v1beta3.StructuredMessage + (*AutoscalingEvent)(nil), // 4: google.dataflow.v1beta3.AutoscalingEvent + (*ListJobMessagesRequest)(nil), // 5: google.dataflow.v1beta3.ListJobMessagesRequest + (*ListJobMessagesResponse)(nil), // 6: google.dataflow.v1beta3.ListJobMessagesResponse + (*StructuredMessage_Parameter)(nil), // 7: google.dataflow.v1beta3.StructuredMessage.Parameter + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*structpb.Value)(nil), // 9: google.protobuf.Value +} +var file_google_dataflow_v1beta3_messages_proto_depIdxs = []int32{ + 8, // 0: google.dataflow.v1beta3.JobMessage.time:type_name -> google.protobuf.Timestamp + 0, // 1: google.dataflow.v1beta3.JobMessage.message_importance:type_name -> google.dataflow.v1beta3.JobMessageImportance + 7, // 2: google.dataflow.v1beta3.StructuredMessage.parameters:type_name -> google.dataflow.v1beta3.StructuredMessage.Parameter + 1, // 3: google.dataflow.v1beta3.AutoscalingEvent.event_type:type_name -> google.dataflow.v1beta3.AutoscalingEvent.AutoscalingEventType + 3, // 4: google.dataflow.v1beta3.AutoscalingEvent.description:type_name -> google.dataflow.v1beta3.StructuredMessage + 8, // 5: google.dataflow.v1beta3.AutoscalingEvent.time:type_name -> google.protobuf.Timestamp + 0, // 6: google.dataflow.v1beta3.ListJobMessagesRequest.minimum_importance:type_name -> google.dataflow.v1beta3.JobMessageImportance + 8, // 7: google.dataflow.v1beta3.ListJobMessagesRequest.start_time:type_name -> google.protobuf.Timestamp + 8, // 8: google.dataflow.v1beta3.ListJobMessagesRequest.end_time:type_name -> google.protobuf.Timestamp + 2, // 9: google.dataflow.v1beta3.ListJobMessagesResponse.job_messages:type_name -> google.dataflow.v1beta3.JobMessage + 4, // 10: google.dataflow.v1beta3.ListJobMessagesResponse.autoscaling_events:type_name -> google.dataflow.v1beta3.AutoscalingEvent + 9, // 11: google.dataflow.v1beta3.StructuredMessage.Parameter.value:type_name -> google.protobuf.Value + 5, // 12: google.dataflow.v1beta3.MessagesV1Beta3.ListJobMessages:input_type -> google.dataflow.v1beta3.ListJobMessagesRequest + 6, // 13: google.dataflow.v1beta3.MessagesV1Beta3.ListJobMessages:output_type -> google.dataflow.v1beta3.ListJobMessagesResponse + 13, // [13:14] is the sub-list for method output_type + 12, // [12:13] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_messages_proto_init() } +func file_google_dataflow_v1beta3_messages_proto_init() { + if File_google_dataflow_v1beta3_messages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructuredMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AutoscalingEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructuredMessage_Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_messages_proto_rawDesc, + NumEnums: 2, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_dataflow_v1beta3_messages_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_messages_proto_depIdxs, + EnumInfos: file_google_dataflow_v1beta3_messages_proto_enumTypes, + MessageInfos: file_google_dataflow_v1beta3_messages_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_messages_proto = out.File + file_google_dataflow_v1beta3_messages_proto_rawDesc = nil + file_google_dataflow_v1beta3_messages_proto_goTypes = nil + file_google_dataflow_v1beta3_messages_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// MessagesV1Beta3Client is the client API for MessagesV1Beta3 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MessagesV1Beta3Client interface { + // Request the job status. + // + // To request the status of a job, we recommend using + // `projects.locations.jobs.messages.list` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.messages.list` is not recommended, as you can only request + // the status of jobs that are running in `us-central1`. + ListJobMessages(ctx context.Context, in *ListJobMessagesRequest, opts ...grpc.CallOption) (*ListJobMessagesResponse, error) +} + +type messagesV1Beta3Client struct { + cc grpc.ClientConnInterface +} + +func NewMessagesV1Beta3Client(cc grpc.ClientConnInterface) MessagesV1Beta3Client { + return &messagesV1Beta3Client{cc} +} + +func (c *messagesV1Beta3Client) ListJobMessages(ctx context.Context, in *ListJobMessagesRequest, opts ...grpc.CallOption) (*ListJobMessagesResponse, error) { + out := new(ListJobMessagesResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.MessagesV1Beta3/ListJobMessages", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MessagesV1Beta3Server is the server API for MessagesV1Beta3 service. +type MessagesV1Beta3Server interface { + // Request the job status. + // + // To request the status of a job, we recommend using + // `projects.locations.jobs.messages.list` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.messages.list` is not recommended, as you can only request + // the status of jobs that are running in `us-central1`. + ListJobMessages(context.Context, *ListJobMessagesRequest) (*ListJobMessagesResponse, error) +} + +// UnimplementedMessagesV1Beta3Server can be embedded to have forward compatible implementations. +type UnimplementedMessagesV1Beta3Server struct { +} + +func (*UnimplementedMessagesV1Beta3Server) ListJobMessages(context.Context, *ListJobMessagesRequest) (*ListJobMessagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJobMessages not implemented") +} + +func RegisterMessagesV1Beta3Server(s *grpc.Server, srv MessagesV1Beta3Server) { + s.RegisterService(&_MessagesV1Beta3_serviceDesc, srv) +} + +func _MessagesV1Beta3_ListJobMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessagesV1Beta3Server).ListJobMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.MessagesV1Beta3/ListJobMessages", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessagesV1Beta3Server).ListJobMessages(ctx, req.(*ListJobMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MessagesV1Beta3_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.dataflow.v1beta3.MessagesV1Beta3", + HandlerType: (*MessagesV1Beta3Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListJobMessages", + Handler: _MessagesV1Beta3_ListJobMessages_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/dataflow/v1beta3/messages.proto", +} diff --git a/dataflow/apiv1beta3/dataflowpb/metrics.pb.go b/dataflow/apiv1beta3/dataflowpb/metrics.pb.go new file mode 100644 index 000000000000..5fad797f244c --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/metrics.pb.go @@ -0,0 +1,1922 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/metrics.proto + +package dataflowpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The state of some component of job execution. +type ExecutionState int32 + +const ( + // The component state is unknown or unspecified. + ExecutionState_EXECUTION_STATE_UNKNOWN ExecutionState = 0 + // The component is not yet running. + ExecutionState_EXECUTION_STATE_NOT_STARTED ExecutionState = 1 + // The component is currently running. + ExecutionState_EXECUTION_STATE_RUNNING ExecutionState = 2 + // The component succeeded. + ExecutionState_EXECUTION_STATE_SUCCEEDED ExecutionState = 3 + // The component failed. + ExecutionState_EXECUTION_STATE_FAILED ExecutionState = 4 + // Execution of the component was cancelled. + ExecutionState_EXECUTION_STATE_CANCELLED ExecutionState = 5 +) + +// Enum value maps for ExecutionState. +var ( + ExecutionState_name = map[int32]string{ + 0: "EXECUTION_STATE_UNKNOWN", + 1: "EXECUTION_STATE_NOT_STARTED", + 2: "EXECUTION_STATE_RUNNING", + 3: "EXECUTION_STATE_SUCCEEDED", + 4: "EXECUTION_STATE_FAILED", + 5: "EXECUTION_STATE_CANCELLED", + } + ExecutionState_value = map[string]int32{ + "EXECUTION_STATE_UNKNOWN": 0, + "EXECUTION_STATE_NOT_STARTED": 1, + "EXECUTION_STATE_RUNNING": 2, + "EXECUTION_STATE_SUCCEEDED": 3, + "EXECUTION_STATE_FAILED": 4, + "EXECUTION_STATE_CANCELLED": 5, + } +) + +func (x ExecutionState) Enum() *ExecutionState { + p := new(ExecutionState) + *p = x + return p +} + +func (x ExecutionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExecutionState) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_metrics_proto_enumTypes[0].Descriptor() +} + +func (ExecutionState) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_metrics_proto_enumTypes[0] +} + +func (x ExecutionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExecutionState.Descriptor instead. +func (ExecutionState) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{0} +} + +// Identifies a metric, by describing the source which generated the +// metric. +type MetricStructuredName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Origin (namespace) of metric name. May be blank for user-define metrics; + // will be "dataflow" for metrics defined by the Dataflow service or SDK. + Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` + // Worker-defined metric name. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Zero or more labeled fields which identify the part of the job this + // metric is associated with, such as the name of a step or collection. + // + // For example, built-in counters associated with steps will have + // context['step'] = . Counters associated with PCollections + // in the SDK will have context['pcollection'] = . + Context map[string]string `protobuf:"bytes,3,rep,name=context,proto3" json:"context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *MetricStructuredName) Reset() { + *x = MetricStructuredName{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetricStructuredName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricStructuredName) ProtoMessage() {} + +func (x *MetricStructuredName) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricStructuredName.ProtoReflect.Descriptor instead. +func (*MetricStructuredName) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{0} +} + +func (x *MetricStructuredName) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *MetricStructuredName) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MetricStructuredName) GetContext() map[string]string { + if x != nil { + return x.Context + } + return nil +} + +// Describes the state of a metric. +type MetricUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the metric. + Name *MetricStructuredName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Metric aggregation kind. The possible metric aggregation kinds are + // "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution". + // The specified aggregation kind is case-insensitive. + // + // If omitted, this is not an aggregated value but instead + // a single metric sample value. + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + // True if this metric is reported as the total cumulative aggregate + // value accumulated since the worker started working on this WorkItem. + // By default this is false, indicating that this metric is reported + // as a delta that is not associated with any WorkItem. + Cumulative bool `protobuf:"varint,3,opt,name=cumulative,proto3" json:"cumulative,omitempty"` + // Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", + // "And", and "Or". The possible value types are Long, Double, and Boolean. + Scalar *structpb.Value `protobuf:"bytes,4,opt,name=scalar,proto3" json:"scalar,omitempty"` + // Worker-computed aggregate value for the "Mean" aggregation kind. + // This holds the sum of the aggregated values and is used in combination + // with mean_count below to obtain the actual mean aggregate value. + // The only possible value types are Long and Double. + MeanSum *structpb.Value `protobuf:"bytes,5,opt,name=mean_sum,json=meanSum,proto3" json:"mean_sum,omitempty"` + // Worker-computed aggregate value for the "Mean" aggregation kind. + // This holds the count of the aggregated values and is used in combination + // with mean_sum above to obtain the actual mean aggregate value. + // The only possible value type is Long. + MeanCount *structpb.Value `protobuf:"bytes,6,opt,name=mean_count,json=meanCount,proto3" json:"mean_count,omitempty"` + // Worker-computed aggregate value for the "Set" aggregation kind. The only + // possible value type is a list of Values whose type can be Long, Double, + // or String, according to the metric's type. All Values in the list must + // be of the same type. + Set *structpb.Value `protobuf:"bytes,7,opt,name=set,proto3" json:"set,omitempty"` + // A struct value describing properties of a distribution of numeric values. + Distribution *structpb.Value `protobuf:"bytes,11,opt,name=distribution,proto3" json:"distribution,omitempty"` + // A struct value describing properties of a Gauge. + // Metrics of gauge type show the value of a metric across time, and is + // aggregated based on the newest value. + Gauge *structpb.Value `protobuf:"bytes,12,opt,name=gauge,proto3" json:"gauge,omitempty"` + // Worker-computed aggregate value for internal use by the Dataflow + // service. + Internal *structpb.Value `protobuf:"bytes,8,opt,name=internal,proto3" json:"internal,omitempty"` + // Timestamp associated with the metric value. Optional when workers are + // reporting work progress; it will be filled in responses from the + // metrics API. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *MetricUpdate) Reset() { + *x = MetricUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetricUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricUpdate) ProtoMessage() {} + +func (x *MetricUpdate) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricUpdate.ProtoReflect.Descriptor instead. +func (*MetricUpdate) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{1} +} + +func (x *MetricUpdate) GetName() *MetricStructuredName { + if x != nil { + return x.Name + } + return nil +} + +func (x *MetricUpdate) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *MetricUpdate) GetCumulative() bool { + if x != nil { + return x.Cumulative + } + return false +} + +func (x *MetricUpdate) GetScalar() *structpb.Value { + if x != nil { + return x.Scalar + } + return nil +} + +func (x *MetricUpdate) GetMeanSum() *structpb.Value { + if x != nil { + return x.MeanSum + } + return nil +} + +func (x *MetricUpdate) GetMeanCount() *structpb.Value { + if x != nil { + return x.MeanCount + } + return nil +} + +func (x *MetricUpdate) GetSet() *structpb.Value { + if x != nil { + return x.Set + } + return nil +} + +func (x *MetricUpdate) GetDistribution() *structpb.Value { + if x != nil { + return x.Distribution + } + return nil +} + +func (x *MetricUpdate) GetGauge() *structpb.Value { + if x != nil { + return x.Gauge + } + return nil +} + +func (x *MetricUpdate) GetInternal() *structpb.Value { + if x != nil { + return x.Internal + } + return nil +} + +func (x *MetricUpdate) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// Request to get job metrics. +type GetJobMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A project id. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job to get metrics for. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // Return only metric data that has changed since this time. + // Default is to return all information about all metrics for the job. + StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains the job specified by job_id. + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *GetJobMetricsRequest) Reset() { + *x = GetJobMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobMetricsRequest) ProtoMessage() {} + +func (x *GetJobMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobMetricsRequest.ProtoReflect.Descriptor instead. +func (*GetJobMetricsRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{2} +} + +func (x *GetJobMetricsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetJobMetricsRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *GetJobMetricsRequest) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *GetJobMetricsRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// JobMetrics contains a collection of metrics describing the detailed progress +// of a Dataflow job. Metrics correspond to user-defined and system-defined +// metrics in the job. +// +// This resource captures only the most recent values of each metric; +// time-series data can be queried for them (under the same metric names) +// from Cloud Monitoring. +type JobMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Timestamp as of which metric values are current. + MetricTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=metric_time,json=metricTime,proto3" json:"metric_time,omitempty"` + // All metrics for this job. + Metrics []*MetricUpdate `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *JobMetrics) Reset() { + *x = JobMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobMetrics) ProtoMessage() {} + +func (x *JobMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobMetrics.ProtoReflect.Descriptor instead. +func (*JobMetrics) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{3} +} + +func (x *JobMetrics) GetMetricTime() *timestamppb.Timestamp { + if x != nil { + return x.MetricTime + } + return nil +} + +func (x *JobMetrics) GetMetrics() []*MetricUpdate { + if x != nil { + return x.Metrics + } + return nil +} + +// Request to get job execution details. +type GetJobExecutionDetailsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A project id. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job to get execution details for. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains the job specified by job_id. + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + // If specified, determines the maximum number of stages to + // return. If unspecified, the service may choose an appropriate + // default, or may return an arbitrarily large number of results. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // If supplied, this should be the value of next_page_token returned + // by an earlier call. This will cause the next page of results to + // be returned. + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *GetJobExecutionDetailsRequest) Reset() { + *x = GetJobExecutionDetailsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobExecutionDetailsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobExecutionDetailsRequest) ProtoMessage() {} + +func (x *GetJobExecutionDetailsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobExecutionDetailsRequest.ProtoReflect.Descriptor instead. +func (*GetJobExecutionDetailsRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{4} +} + +func (x *GetJobExecutionDetailsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetJobExecutionDetailsRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *GetJobExecutionDetailsRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *GetJobExecutionDetailsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *GetJobExecutionDetailsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Information about the progress of some component of job execution. +type ProgressTimeseries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The current progress of the component, in the range [0,1]. + CurrentProgress float64 `protobuf:"fixed64,1,opt,name=current_progress,json=currentProgress,proto3" json:"current_progress,omitempty"` + // History of progress for the component. + // + // Points are sorted by time. + DataPoints []*ProgressTimeseries_Point `protobuf:"bytes,2,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` +} + +func (x *ProgressTimeseries) Reset() { + *x = ProgressTimeseries{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProgressTimeseries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProgressTimeseries) ProtoMessage() {} + +func (x *ProgressTimeseries) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProgressTimeseries.ProtoReflect.Descriptor instead. +func (*ProgressTimeseries) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{5} +} + +func (x *ProgressTimeseries) GetCurrentProgress() float64 { + if x != nil { + return x.CurrentProgress + } + return 0 +} + +func (x *ProgressTimeseries) GetDataPoints() []*ProgressTimeseries_Point { + if x != nil { + return x.DataPoints + } + return nil +} + +// Information about a particular execution stage of a job. +type StageSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of this stage + StageId string `protobuf:"bytes,1,opt,name=stage_id,json=stageId,proto3" json:"stage_id,omitempty"` + // State of this stage. + State ExecutionState `protobuf:"varint,2,opt,name=state,proto3,enum=google.dataflow.v1beta3.ExecutionState" json:"state,omitempty"` + // Start time of this stage. + StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // End time of this stage. + // + // If the work item is completed, this is the actual end time of the stage. + // Otherwise, it is the predicted end time. + EndTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Progress for this stage. + // Only applicable to Batch jobs. + Progress *ProgressTimeseries `protobuf:"bytes,5,opt,name=progress,proto3" json:"progress,omitempty"` + // Metrics for this stage. + Metrics []*MetricUpdate `protobuf:"bytes,6,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *StageSummary) Reset() { + *x = StageSummary{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StageSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StageSummary) ProtoMessage() {} + +func (x *StageSummary) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StageSummary.ProtoReflect.Descriptor instead. +func (*StageSummary) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{6} +} + +func (x *StageSummary) GetStageId() string { + if x != nil { + return x.StageId + } + return "" +} + +func (x *StageSummary) GetState() ExecutionState { + if x != nil { + return x.State + } + return ExecutionState_EXECUTION_STATE_UNKNOWN +} + +func (x *StageSummary) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *StageSummary) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *StageSummary) GetProgress() *ProgressTimeseries { + if x != nil { + return x.Progress + } + return nil +} + +func (x *StageSummary) GetMetrics() []*MetricUpdate { + if x != nil { + return x.Metrics + } + return nil +} + +// Information about the execution of a job. +type JobExecutionDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The stages of the job execution. + Stages []*StageSummary `protobuf:"bytes,1,rep,name=stages,proto3" json:"stages,omitempty"` + // If present, this response does not contain all requested tasks. To obtain + // the next page of results, repeat the request with page_token set to this + // value. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *JobExecutionDetails) Reset() { + *x = JobExecutionDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JobExecutionDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JobExecutionDetails) ProtoMessage() {} + +func (x *JobExecutionDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JobExecutionDetails.ProtoReflect.Descriptor instead. +func (*JobExecutionDetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{7} +} + +func (x *JobExecutionDetails) GetStages() []*StageSummary { + if x != nil { + return x.Stages + } + return nil +} + +func (x *JobExecutionDetails) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request to get information about a particular execution stage of a job. +// Currently only tracked for Batch jobs. +type GetStageExecutionDetailsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A project id. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job to get execution details for. + JobId string `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that + // contains the job specified by job_id. + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + // The stage for which to fetch information. + StageId string `protobuf:"bytes,4,opt,name=stage_id,json=stageId,proto3" json:"stage_id,omitempty"` + // If specified, determines the maximum number of work items to + // return. If unspecified, the service may choose an appropriate + // default, or may return an arbitrarily large number of results. + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // If supplied, this should be the value of next_page_token returned + // by an earlier call. This will cause the next page of results to + // be returned. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Lower time bound of work items to include, by start time. + StartTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // Upper time bound of work items to include, by start time. + EndTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` +} + +func (x *GetStageExecutionDetailsRequest) Reset() { + *x = GetStageExecutionDetailsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStageExecutionDetailsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStageExecutionDetailsRequest) ProtoMessage() {} + +func (x *GetStageExecutionDetailsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStageExecutionDetailsRequest.ProtoReflect.Descriptor instead. +func (*GetStageExecutionDetailsRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{8} +} + +func (x *GetStageExecutionDetailsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetStageExecutionDetailsRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *GetStageExecutionDetailsRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *GetStageExecutionDetailsRequest) GetStageId() string { + if x != nil { + return x.StageId + } + return "" +} + +func (x *GetStageExecutionDetailsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *GetStageExecutionDetailsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *GetStageExecutionDetailsRequest) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *GetStageExecutionDetailsRequest) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +// Information about an individual work item execution. +type WorkItemDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of this work item. + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Attempt ID of this work item + AttemptId string `protobuf:"bytes,2,opt,name=attempt_id,json=attemptId,proto3" json:"attempt_id,omitempty"` + // Start time of this work item attempt. + StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // End time of this work item attempt. + // + // If the work item is completed, this is the actual end time of the work + // item. Otherwise, it is the predicted end time. + EndTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // State of this work item. + State ExecutionState `protobuf:"varint,5,opt,name=state,proto3,enum=google.dataflow.v1beta3.ExecutionState" json:"state,omitempty"` + // Progress of this work item. + Progress *ProgressTimeseries `protobuf:"bytes,6,opt,name=progress,proto3" json:"progress,omitempty"` + // Metrics for this work item. + Metrics []*MetricUpdate `protobuf:"bytes,7,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *WorkItemDetails) Reset() { + *x = WorkItemDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkItemDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkItemDetails) ProtoMessage() {} + +func (x *WorkItemDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkItemDetails.ProtoReflect.Descriptor instead. +func (*WorkItemDetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{9} +} + +func (x *WorkItemDetails) GetTaskId() string { + if x != nil { + return x.TaskId + } + return "" +} + +func (x *WorkItemDetails) GetAttemptId() string { + if x != nil { + return x.AttemptId + } + return "" +} + +func (x *WorkItemDetails) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *WorkItemDetails) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *WorkItemDetails) GetState() ExecutionState { + if x != nil { + return x.State + } + return ExecutionState_EXECUTION_STATE_UNKNOWN +} + +func (x *WorkItemDetails) GetProgress() *ProgressTimeseries { + if x != nil { + return x.Progress + } + return nil +} + +func (x *WorkItemDetails) GetMetrics() []*MetricUpdate { + if x != nil { + return x.Metrics + } + return nil +} + +// Information about a worker +type WorkerDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of this worker + WorkerName string `protobuf:"bytes,1,opt,name=worker_name,json=workerName,proto3" json:"worker_name,omitempty"` + // Work items processed by this worker, sorted by time. + WorkItems []*WorkItemDetails `protobuf:"bytes,2,rep,name=work_items,json=workItems,proto3" json:"work_items,omitempty"` +} + +func (x *WorkerDetails) Reset() { + *x = WorkerDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkerDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerDetails) ProtoMessage() {} + +func (x *WorkerDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkerDetails.ProtoReflect.Descriptor instead. +func (*WorkerDetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{10} +} + +func (x *WorkerDetails) GetWorkerName() string { + if x != nil { + return x.WorkerName + } + return "" +} + +func (x *WorkerDetails) GetWorkItems() []*WorkItemDetails { + if x != nil { + return x.WorkItems + } + return nil +} + +// Information about the workers and work items within a stage. +type StageExecutionDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Workers that have done work on the stage. + Workers []*WorkerDetails `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` + // If present, this response does not contain all requested tasks. To obtain + // the next page of results, repeat the request with page_token set to this + // value. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *StageExecutionDetails) Reset() { + *x = StageExecutionDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StageExecutionDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StageExecutionDetails) ProtoMessage() {} + +func (x *StageExecutionDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StageExecutionDetails.ProtoReflect.Descriptor instead. +func (*StageExecutionDetails) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{11} +} + +func (x *StageExecutionDetails) GetWorkers() []*WorkerDetails { + if x != nil { + return x.Workers + } + return nil +} + +func (x *StageExecutionDetails) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// A point in the timeseries. +type ProgressTimeseries_Point struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The timestamp of the point. + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + // The value of the point. + Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ProgressTimeseries_Point) Reset() { + *x = ProgressTimeseries_Point{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProgressTimeseries_Point) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProgressTimeseries_Point) ProtoMessage() {} + +func (x *ProgressTimeseries_Point) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_metrics_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProgressTimeseries_Point.ProtoReflect.Descriptor instead. +func (*ProgressTimeseries_Point) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *ProgressTimeseries_Point) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *ProgressTimeseries_Point) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +var File_google_dataflow_v1beta3_metrics_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_metrics_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa4, 0x04, + 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x41, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x73, 0x75, + 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x07, 0x6d, 0x65, 0x61, 0x6e, 0x53, 0x75, 0x6d, 0x12, 0x35, 0x0a, 0x0a, 0x6d, 0x65, 0x61, 0x6e, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6d, 0x65, 0x61, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x28, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x67, 0x61, + 0x75, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, + 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x0a, 0x4a, + 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe2, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x4d, 0x0a, + 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe4, 0x02, 0x0a, + 0x0c, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x19, 0x0a, + 0x08, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x22, 0x7c, 0x0a, 0x13, 0x4a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0xbc, 0x02, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x84, 0x03, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x79, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x77, 0x6f, 0x72, + 0x6b, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, 0x6d, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x40, 0x0a, 0x07, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0xc5, 0x01, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x58, 0x45, + 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, + 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, 0x55, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, + 0x1d, 0x0a, 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x32, 0x9f, + 0x07, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x33, 0x12, 0xe9, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x12, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x83, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7d, + 0x12, 0x46, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5a, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x62, + 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0xd7, 0x01, + 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x57, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, + 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0xef, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x69, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x63, 0x12, 0x61, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x6a, + 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x73, + 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0xd4, 0x01, 0xca, 0x41, 0x17, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xb6, 0x01, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, + 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x42, 0xd1, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x42, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0xaa, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x33, 0xca, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0xea, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_metrics_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_metrics_proto_rawDescData = file_google_dataflow_v1beta3_metrics_proto_rawDesc +) + +func file_google_dataflow_v1beta3_metrics_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_metrics_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_metrics_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_metrics_proto_rawDescData +} + +var file_google_dataflow_v1beta3_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_dataflow_v1beta3_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_dataflow_v1beta3_metrics_proto_goTypes = []interface{}{ + (ExecutionState)(0), // 0: google.dataflow.v1beta3.ExecutionState + (*MetricStructuredName)(nil), // 1: google.dataflow.v1beta3.MetricStructuredName + (*MetricUpdate)(nil), // 2: google.dataflow.v1beta3.MetricUpdate + (*GetJobMetricsRequest)(nil), // 3: google.dataflow.v1beta3.GetJobMetricsRequest + (*JobMetrics)(nil), // 4: google.dataflow.v1beta3.JobMetrics + (*GetJobExecutionDetailsRequest)(nil), // 5: google.dataflow.v1beta3.GetJobExecutionDetailsRequest + (*ProgressTimeseries)(nil), // 6: google.dataflow.v1beta3.ProgressTimeseries + (*StageSummary)(nil), // 7: google.dataflow.v1beta3.StageSummary + (*JobExecutionDetails)(nil), // 8: google.dataflow.v1beta3.JobExecutionDetails + (*GetStageExecutionDetailsRequest)(nil), // 9: google.dataflow.v1beta3.GetStageExecutionDetailsRequest + (*WorkItemDetails)(nil), // 10: google.dataflow.v1beta3.WorkItemDetails + (*WorkerDetails)(nil), // 11: google.dataflow.v1beta3.WorkerDetails + (*StageExecutionDetails)(nil), // 12: google.dataflow.v1beta3.StageExecutionDetails + nil, // 13: google.dataflow.v1beta3.MetricStructuredName.ContextEntry + (*ProgressTimeseries_Point)(nil), // 14: google.dataflow.v1beta3.ProgressTimeseries.Point + (*structpb.Value)(nil), // 15: google.protobuf.Value + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp +} +var file_google_dataflow_v1beta3_metrics_proto_depIdxs = []int32{ + 13, // 0: google.dataflow.v1beta3.MetricStructuredName.context:type_name -> google.dataflow.v1beta3.MetricStructuredName.ContextEntry + 1, // 1: google.dataflow.v1beta3.MetricUpdate.name:type_name -> google.dataflow.v1beta3.MetricStructuredName + 15, // 2: google.dataflow.v1beta3.MetricUpdate.scalar:type_name -> google.protobuf.Value + 15, // 3: google.dataflow.v1beta3.MetricUpdate.mean_sum:type_name -> google.protobuf.Value + 15, // 4: google.dataflow.v1beta3.MetricUpdate.mean_count:type_name -> google.protobuf.Value + 15, // 5: google.dataflow.v1beta3.MetricUpdate.set:type_name -> google.protobuf.Value + 15, // 6: google.dataflow.v1beta3.MetricUpdate.distribution:type_name -> google.protobuf.Value + 15, // 7: google.dataflow.v1beta3.MetricUpdate.gauge:type_name -> google.protobuf.Value + 15, // 8: google.dataflow.v1beta3.MetricUpdate.internal:type_name -> google.protobuf.Value + 16, // 9: google.dataflow.v1beta3.MetricUpdate.update_time:type_name -> google.protobuf.Timestamp + 16, // 10: google.dataflow.v1beta3.GetJobMetricsRequest.start_time:type_name -> google.protobuf.Timestamp + 16, // 11: google.dataflow.v1beta3.JobMetrics.metric_time:type_name -> google.protobuf.Timestamp + 2, // 12: google.dataflow.v1beta3.JobMetrics.metrics:type_name -> google.dataflow.v1beta3.MetricUpdate + 14, // 13: google.dataflow.v1beta3.ProgressTimeseries.data_points:type_name -> google.dataflow.v1beta3.ProgressTimeseries.Point + 0, // 14: google.dataflow.v1beta3.StageSummary.state:type_name -> google.dataflow.v1beta3.ExecutionState + 16, // 15: google.dataflow.v1beta3.StageSummary.start_time:type_name -> google.protobuf.Timestamp + 16, // 16: google.dataflow.v1beta3.StageSummary.end_time:type_name -> google.protobuf.Timestamp + 6, // 17: google.dataflow.v1beta3.StageSummary.progress:type_name -> google.dataflow.v1beta3.ProgressTimeseries + 2, // 18: google.dataflow.v1beta3.StageSummary.metrics:type_name -> google.dataflow.v1beta3.MetricUpdate + 7, // 19: google.dataflow.v1beta3.JobExecutionDetails.stages:type_name -> google.dataflow.v1beta3.StageSummary + 16, // 20: google.dataflow.v1beta3.GetStageExecutionDetailsRequest.start_time:type_name -> google.protobuf.Timestamp + 16, // 21: google.dataflow.v1beta3.GetStageExecutionDetailsRequest.end_time:type_name -> google.protobuf.Timestamp + 16, // 22: google.dataflow.v1beta3.WorkItemDetails.start_time:type_name -> google.protobuf.Timestamp + 16, // 23: google.dataflow.v1beta3.WorkItemDetails.end_time:type_name -> google.protobuf.Timestamp + 0, // 24: google.dataflow.v1beta3.WorkItemDetails.state:type_name -> google.dataflow.v1beta3.ExecutionState + 6, // 25: google.dataflow.v1beta3.WorkItemDetails.progress:type_name -> google.dataflow.v1beta3.ProgressTimeseries + 2, // 26: google.dataflow.v1beta3.WorkItemDetails.metrics:type_name -> google.dataflow.v1beta3.MetricUpdate + 10, // 27: google.dataflow.v1beta3.WorkerDetails.work_items:type_name -> google.dataflow.v1beta3.WorkItemDetails + 11, // 28: google.dataflow.v1beta3.StageExecutionDetails.workers:type_name -> google.dataflow.v1beta3.WorkerDetails + 16, // 29: google.dataflow.v1beta3.ProgressTimeseries.Point.time:type_name -> google.protobuf.Timestamp + 3, // 30: google.dataflow.v1beta3.MetricsV1Beta3.GetJobMetrics:input_type -> google.dataflow.v1beta3.GetJobMetricsRequest + 5, // 31: google.dataflow.v1beta3.MetricsV1Beta3.GetJobExecutionDetails:input_type -> google.dataflow.v1beta3.GetJobExecutionDetailsRequest + 9, // 32: google.dataflow.v1beta3.MetricsV1Beta3.GetStageExecutionDetails:input_type -> google.dataflow.v1beta3.GetStageExecutionDetailsRequest + 4, // 33: google.dataflow.v1beta3.MetricsV1Beta3.GetJobMetrics:output_type -> google.dataflow.v1beta3.JobMetrics + 8, // 34: google.dataflow.v1beta3.MetricsV1Beta3.GetJobExecutionDetails:output_type -> google.dataflow.v1beta3.JobExecutionDetails + 12, // 35: google.dataflow.v1beta3.MetricsV1Beta3.GetStageExecutionDetails:output_type -> google.dataflow.v1beta3.StageExecutionDetails + 33, // [33:36] is the sub-list for method output_type + 30, // [30:33] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_metrics_proto_init() } +func file_google_dataflow_v1beta3_metrics_proto_init() { + if File_google_dataflow_v1beta3_metrics_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricStructuredName); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJobMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetJobExecutionDetailsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProgressTimeseries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StageSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobExecutionDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStageExecutionDetailsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkItemDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkerDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StageExecutionDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_metrics_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProgressTimeseries_Point); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_metrics_proto_rawDesc, + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_dataflow_v1beta3_metrics_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_metrics_proto_depIdxs, + EnumInfos: file_google_dataflow_v1beta3_metrics_proto_enumTypes, + MessageInfos: file_google_dataflow_v1beta3_metrics_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_metrics_proto = out.File + file_google_dataflow_v1beta3_metrics_proto_rawDesc = nil + file_google_dataflow_v1beta3_metrics_proto_goTypes = nil + file_google_dataflow_v1beta3_metrics_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// MetricsV1Beta3Client is the client API for MetricsV1Beta3 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsV1Beta3Client interface { + // Request the job status. + // + // To request the status of a job, we recommend using + // `projects.locations.jobs.getMetrics` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.getMetrics` is not recommended, as you can only request the + // status of jobs that are running in `us-central1`. + GetJobMetrics(ctx context.Context, in *GetJobMetricsRequest, opts ...grpc.CallOption) (*JobMetrics, error) + // Request detailed information about the execution status of the job. + // + // EXPERIMENTAL. This API is subject to change or removal without notice. + GetJobExecutionDetails(ctx context.Context, in *GetJobExecutionDetailsRequest, opts ...grpc.CallOption) (*JobExecutionDetails, error) + // Request detailed information about the execution status of a stage of the + // job. + // + // EXPERIMENTAL. This API is subject to change or removal without notice. + GetStageExecutionDetails(ctx context.Context, in *GetStageExecutionDetailsRequest, opts ...grpc.CallOption) (*StageExecutionDetails, error) +} + +type metricsV1Beta3Client struct { + cc grpc.ClientConnInterface +} + +func NewMetricsV1Beta3Client(cc grpc.ClientConnInterface) MetricsV1Beta3Client { + return &metricsV1Beta3Client{cc} +} + +func (c *metricsV1Beta3Client) GetJobMetrics(ctx context.Context, in *GetJobMetricsRequest, opts ...grpc.CallOption) (*JobMetrics, error) { + out := new(JobMetrics) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.MetricsV1Beta3/GetJobMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsV1Beta3Client) GetJobExecutionDetails(ctx context.Context, in *GetJobExecutionDetailsRequest, opts ...grpc.CallOption) (*JobExecutionDetails, error) { + out := new(JobExecutionDetails) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.MetricsV1Beta3/GetJobExecutionDetails", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *metricsV1Beta3Client) GetStageExecutionDetails(ctx context.Context, in *GetStageExecutionDetailsRequest, opts ...grpc.CallOption) (*StageExecutionDetails, error) { + out := new(StageExecutionDetails) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.MetricsV1Beta3/GetStageExecutionDetails", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MetricsV1Beta3Server is the server API for MetricsV1Beta3 service. +type MetricsV1Beta3Server interface { + // Request the job status. + // + // To request the status of a job, we recommend using + // `projects.locations.jobs.getMetrics` with a [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using + // `projects.jobs.getMetrics` is not recommended, as you can only request the + // status of jobs that are running in `us-central1`. + GetJobMetrics(context.Context, *GetJobMetricsRequest) (*JobMetrics, error) + // Request detailed information about the execution status of the job. + // + // EXPERIMENTAL. This API is subject to change or removal without notice. + GetJobExecutionDetails(context.Context, *GetJobExecutionDetailsRequest) (*JobExecutionDetails, error) + // Request detailed information about the execution status of a stage of the + // job. + // + // EXPERIMENTAL. This API is subject to change or removal without notice. + GetStageExecutionDetails(context.Context, *GetStageExecutionDetailsRequest) (*StageExecutionDetails, error) +} + +// UnimplementedMetricsV1Beta3Server can be embedded to have forward compatible implementations. +type UnimplementedMetricsV1Beta3Server struct { +} + +func (*UnimplementedMetricsV1Beta3Server) GetJobMetrics(context.Context, *GetJobMetricsRequest) (*JobMetrics, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJobMetrics not implemented") +} +func (*UnimplementedMetricsV1Beta3Server) GetJobExecutionDetails(context.Context, *GetJobExecutionDetailsRequest) (*JobExecutionDetails, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJobExecutionDetails not implemented") +} +func (*UnimplementedMetricsV1Beta3Server) GetStageExecutionDetails(context.Context, *GetStageExecutionDetailsRequest) (*StageExecutionDetails, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStageExecutionDetails not implemented") +} + +func RegisterMetricsV1Beta3Server(s *grpc.Server, srv MetricsV1Beta3Server) { + s.RegisterService(&_MetricsV1Beta3_serviceDesc, srv) +} + +func _MetricsV1Beta3_GetJobMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsV1Beta3Server).GetJobMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.MetricsV1Beta3/GetJobMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsV1Beta3Server).GetJobMetrics(ctx, req.(*GetJobMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricsV1Beta3_GetJobExecutionDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobExecutionDetailsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsV1Beta3Server).GetJobExecutionDetails(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.MetricsV1Beta3/GetJobExecutionDetails", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsV1Beta3Server).GetJobExecutionDetails(ctx, req.(*GetJobExecutionDetailsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MetricsV1Beta3_GetStageExecutionDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStageExecutionDetailsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MetricsV1Beta3Server).GetStageExecutionDetails(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.MetricsV1Beta3/GetStageExecutionDetails", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MetricsV1Beta3Server).GetStageExecutionDetails(ctx, req.(*GetStageExecutionDetailsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MetricsV1Beta3_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.dataflow.v1beta3.MetricsV1Beta3", + HandlerType: (*MetricsV1Beta3Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetJobMetrics", + Handler: _MetricsV1Beta3_GetJobMetrics_Handler, + }, + { + MethodName: "GetJobExecutionDetails", + Handler: _MetricsV1Beta3_GetJobExecutionDetails_Handler, + }, + { + MethodName: "GetStageExecutionDetails", + Handler: _MetricsV1Beta3_GetStageExecutionDetails_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/dataflow/v1beta3/metrics.proto", +} diff --git a/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go b/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go new file mode 100644 index 000000000000..1f070df1cbd2 --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/snapshots.pb.go @@ -0,0 +1,1079 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/snapshots.proto + +package dataflowpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Snapshot state. +type SnapshotState int32 + +const ( + // Unknown state. + SnapshotState_UNKNOWN_SNAPSHOT_STATE SnapshotState = 0 + // Snapshot intent to create has been persisted, snapshotting of state has not + // yet started. + SnapshotState_PENDING SnapshotState = 1 + // Snapshotting is being performed. + SnapshotState_RUNNING SnapshotState = 2 + // Snapshot has been created and is ready to be used. + SnapshotState_READY SnapshotState = 3 + // Snapshot failed to be created. + SnapshotState_FAILED SnapshotState = 4 + // Snapshot has been deleted. + SnapshotState_DELETED SnapshotState = 5 +) + +// Enum value maps for SnapshotState. +var ( + SnapshotState_name = map[int32]string{ + 0: "UNKNOWN_SNAPSHOT_STATE", + 1: "PENDING", + 2: "RUNNING", + 3: "READY", + 4: "FAILED", + 5: "DELETED", + } + SnapshotState_value = map[string]int32{ + "UNKNOWN_SNAPSHOT_STATE": 0, + "PENDING": 1, + "RUNNING": 2, + "READY": 3, + "FAILED": 4, + "DELETED": 5, + } +) + +func (x SnapshotState) Enum() *SnapshotState { + p := new(SnapshotState) + *p = x + return p +} + +func (x SnapshotState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SnapshotState) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_snapshots_proto_enumTypes[0].Descriptor() +} + +func (SnapshotState) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_snapshots_proto_enumTypes[0] +} + +func (x SnapshotState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SnapshotState.Descriptor instead. +func (SnapshotState) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{0} +} + +// Represents a Pubsub snapshot. +type PubsubSnapshotMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the Pubsub topic. + TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` + // The name of the Pubsub snapshot. + SnapshotName string `protobuf:"bytes,2,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` + // The expire time of the Pubsub snapshot. + ExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` +} + +func (x *PubsubSnapshotMetadata) Reset() { + *x = PubsubSnapshotMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubsubSnapshotMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubsubSnapshotMetadata) ProtoMessage() {} + +func (x *PubsubSnapshotMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubsubSnapshotMetadata.ProtoReflect.Descriptor instead. +func (*PubsubSnapshotMetadata) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{0} +} + +func (x *PubsubSnapshotMetadata) GetTopicName() string { + if x != nil { + return x.TopicName + } + return "" +} + +func (x *PubsubSnapshotMetadata) GetSnapshotName() string { + if x != nil { + return x.SnapshotName + } + return "" +} + +func (x *PubsubSnapshotMetadata) GetExpireTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpireTime + } + return nil +} + +// Represents a snapshot of a job. +type Snapshot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID of this snapshot. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The project this snapshot belongs to. + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The job this snapshot was created from. + SourceJobId string `protobuf:"bytes,3,opt,name=source_job_id,json=sourceJobId,proto3" json:"source_job_id,omitempty"` + // The time this snapshot was created. + CreationTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + // The time after which this snapshot will be automatically deleted. + Ttl *durationpb.Duration `protobuf:"bytes,5,opt,name=ttl,proto3" json:"ttl,omitempty"` + // State of the snapshot. + State SnapshotState `protobuf:"varint,6,opt,name=state,proto3,enum=google.dataflow.v1beta3.SnapshotState" json:"state,omitempty"` + // Pub/Sub snapshot metadata. + PubsubMetadata []*PubsubSnapshotMetadata `protobuf:"bytes,7,rep,name=pubsub_metadata,json=pubsubMetadata,proto3" json:"pubsub_metadata,omitempty"` + // User specified description of the snapshot. Maybe empty. + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + // The disk byte size of the snapshot. Only available for snapshots in READY + // state. + DiskSizeBytes int64 `protobuf:"varint,9,opt,name=disk_size_bytes,json=diskSizeBytes,proto3" json:"disk_size_bytes,omitempty"` + // Cloud region where this snapshot lives in, e.g., "us-central1". + Region string `protobuf:"bytes,10,opt,name=region,proto3" json:"region,omitempty"` +} + +func (x *Snapshot) Reset() { + *x = Snapshot{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Snapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Snapshot) ProtoMessage() {} + +func (x *Snapshot) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Snapshot.ProtoReflect.Descriptor instead. +func (*Snapshot) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{1} +} + +func (x *Snapshot) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Snapshot) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *Snapshot) GetSourceJobId() string { + if x != nil { + return x.SourceJobId + } + return "" +} + +func (x *Snapshot) GetCreationTime() *timestamppb.Timestamp { + if x != nil { + return x.CreationTime + } + return nil +} + +func (x *Snapshot) GetTtl() *durationpb.Duration { + if x != nil { + return x.Ttl + } + return nil +} + +func (x *Snapshot) GetState() SnapshotState { + if x != nil { + return x.State + } + return SnapshotState_UNKNOWN_SNAPSHOT_STATE +} + +func (x *Snapshot) GetPubsubMetadata() []*PubsubSnapshotMetadata { + if x != nil { + return x.PubsubMetadata + } + return nil +} + +func (x *Snapshot) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Snapshot) GetDiskSizeBytes() int64 { + if x != nil { + return x.DiskSizeBytes + } + return 0 +} + +func (x *Snapshot) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +// Request to get information about a snapshot +type GetSnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the Cloud Platform project that the snapshot belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The ID of the snapshot. + SnapshotId string `protobuf:"bytes,2,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + // The location that contains this snapshot. + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *GetSnapshotRequest) Reset() { + *x = GetSnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSnapshotRequest) ProtoMessage() {} + +func (x *GetSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSnapshotRequest.ProtoReflect.Descriptor instead. +func (*GetSnapshotRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{2} +} + +func (x *GetSnapshotRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetSnapshotRequest) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *GetSnapshotRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Request to delete a snapshot. +type DeleteSnapshotRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the Cloud Platform project that the snapshot belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The ID of the snapshot. + SnapshotId string `protobuf:"bytes,2,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + // The location that contains this snapshot. + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *DeleteSnapshotRequest) Reset() { + *x = DeleteSnapshotRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSnapshotRequest) ProtoMessage() {} + +func (x *DeleteSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSnapshotRequest.ProtoReflect.Descriptor instead. +func (*DeleteSnapshotRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteSnapshotRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DeleteSnapshotRequest) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *DeleteSnapshotRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// Response from deleting a snapshot. +type DeleteSnapshotResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteSnapshotResponse) Reset() { + *x = DeleteSnapshotResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSnapshotResponse) ProtoMessage() {} + +func (x *DeleteSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSnapshotResponse.ProtoReflect.Descriptor instead. +func (*DeleteSnapshotResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{4} +} + +// Request to list snapshots. +type ListSnapshotsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The project ID to list snapshots for. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // If specified, list snapshots created from this job. + JobId string `protobuf:"bytes,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // The location to list snapshots in. + Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *ListSnapshotsRequest) Reset() { + *x = ListSnapshotsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSnapshotsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSnapshotsRequest) ProtoMessage() {} + +func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSnapshotsRequest.ProtoReflect.Descriptor instead. +func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSnapshotsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListSnapshotsRequest) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *ListSnapshotsRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// List of snapshots. +type ListSnapshotsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returned snapshots. + Snapshots []*Snapshot `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` +} + +func (x *ListSnapshotsResponse) Reset() { + *x = ListSnapshotsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSnapshotsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSnapshotsResponse) ProtoMessage() {} + +func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSnapshotsResponse.ProtoReflect.Descriptor instead. +func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP(), []int{6} +} + +func (x *ListSnapshotsResponse) GetSnapshots() []*Snapshot { + if x != nil { + return x.Snapshots + } + return nil +} + +var File_google_dataflow_v1beta3_snapshots_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_snapshots_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x16, 0x50, + 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc5, 0x03, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x03, 0x74, 0x74, 0x6c, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0e, 0x70, 0x75, + 0x62, 0x73, 0x75, 0x62, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, + 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, + 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x22, 0x70, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x73, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x68, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x15, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x73, 0x2a, 0x69, 0x0a, 0x0d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, + 0x53, 0x4e, 0x41, 0x50, 0x53, 0x48, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, + 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, + 0x41, 0x44, 0x59, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, + 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x05, 0x32, 0xef, + 0x07, 0x0a, 0x10, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x56, 0x31, 0x42, 0x65, + 0x74, 0x61, 0x33, 0x12, 0xe8, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x22, 0x88, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x81, 0x01, 0x12, 0x48, 0x2f, + 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x5a, 0x35, 0x12, 0x33, 0x2f, 0x76, 0x31, 0x62, 0x33, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, + 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xec, + 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x73, 0x2a, 0x48, 0x2f, 0x76, 0x31, 0x62, + 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x5f, 0x69, 0x64, 0x7d, 0x5a, 0x27, 0x2a, 0x25, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0xa9, 0x02, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb8, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb1, 0x01, 0x12, 0x48, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, + 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x73, 0x5a, 0x3c, 0x12, 0x3a, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, + 0x5a, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x1a, 0xd4, 0x01, 0xca, 0x41, 0x17, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xb6, 0x01, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, + 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x42, 0xd3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x42, 0x0e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0xaa, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x56, 0x31, 0x42, 0x65, + 0x74, 0x61, 0x33, 0xca, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0xea, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_snapshots_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_snapshots_proto_rawDescData = file_google_dataflow_v1beta3_snapshots_proto_rawDesc +) + +func file_google_dataflow_v1beta3_snapshots_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_snapshots_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_snapshots_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_snapshots_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_snapshots_proto_rawDescData +} + +var file_google_dataflow_v1beta3_snapshots_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_dataflow_v1beta3_snapshots_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_google_dataflow_v1beta3_snapshots_proto_goTypes = []interface{}{ + (SnapshotState)(0), // 0: google.dataflow.v1beta3.SnapshotState + (*PubsubSnapshotMetadata)(nil), // 1: google.dataflow.v1beta3.PubsubSnapshotMetadata + (*Snapshot)(nil), // 2: google.dataflow.v1beta3.Snapshot + (*GetSnapshotRequest)(nil), // 3: google.dataflow.v1beta3.GetSnapshotRequest + (*DeleteSnapshotRequest)(nil), // 4: google.dataflow.v1beta3.DeleteSnapshotRequest + (*DeleteSnapshotResponse)(nil), // 5: google.dataflow.v1beta3.DeleteSnapshotResponse + (*ListSnapshotsRequest)(nil), // 6: google.dataflow.v1beta3.ListSnapshotsRequest + (*ListSnapshotsResponse)(nil), // 7: google.dataflow.v1beta3.ListSnapshotsResponse + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration +} +var file_google_dataflow_v1beta3_snapshots_proto_depIdxs = []int32{ + 8, // 0: google.dataflow.v1beta3.PubsubSnapshotMetadata.expire_time:type_name -> google.protobuf.Timestamp + 8, // 1: google.dataflow.v1beta3.Snapshot.creation_time:type_name -> google.protobuf.Timestamp + 9, // 2: google.dataflow.v1beta3.Snapshot.ttl:type_name -> google.protobuf.Duration + 0, // 3: google.dataflow.v1beta3.Snapshot.state:type_name -> google.dataflow.v1beta3.SnapshotState + 1, // 4: google.dataflow.v1beta3.Snapshot.pubsub_metadata:type_name -> google.dataflow.v1beta3.PubsubSnapshotMetadata + 2, // 5: google.dataflow.v1beta3.ListSnapshotsResponse.snapshots:type_name -> google.dataflow.v1beta3.Snapshot + 3, // 6: google.dataflow.v1beta3.SnapshotsV1Beta3.GetSnapshot:input_type -> google.dataflow.v1beta3.GetSnapshotRequest + 4, // 7: google.dataflow.v1beta3.SnapshotsV1Beta3.DeleteSnapshot:input_type -> google.dataflow.v1beta3.DeleteSnapshotRequest + 6, // 8: google.dataflow.v1beta3.SnapshotsV1Beta3.ListSnapshots:input_type -> google.dataflow.v1beta3.ListSnapshotsRequest + 2, // 9: google.dataflow.v1beta3.SnapshotsV1Beta3.GetSnapshot:output_type -> google.dataflow.v1beta3.Snapshot + 5, // 10: google.dataflow.v1beta3.SnapshotsV1Beta3.DeleteSnapshot:output_type -> google.dataflow.v1beta3.DeleteSnapshotResponse + 7, // 11: google.dataflow.v1beta3.SnapshotsV1Beta3.ListSnapshots:output_type -> google.dataflow.v1beta3.ListSnapshotsResponse + 9, // [9:12] is the sub-list for method output_type + 6, // [6:9] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_snapshots_proto_init() } +func file_google_dataflow_v1beta3_snapshots_proto_init() { + if File_google_dataflow_v1beta3_snapshots_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubsubSnapshotMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Snapshot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSnapshotsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_snapshots_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSnapshotsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_snapshots_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_dataflow_v1beta3_snapshots_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_snapshots_proto_depIdxs, + EnumInfos: file_google_dataflow_v1beta3_snapshots_proto_enumTypes, + MessageInfos: file_google_dataflow_v1beta3_snapshots_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_snapshots_proto = out.File + file_google_dataflow_v1beta3_snapshots_proto_rawDesc = nil + file_google_dataflow_v1beta3_snapshots_proto_goTypes = nil + file_google_dataflow_v1beta3_snapshots_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// SnapshotsV1Beta3Client is the client API for SnapshotsV1Beta3 service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type SnapshotsV1Beta3Client interface { + // Gets information about a snapshot. + GetSnapshot(ctx context.Context, in *GetSnapshotRequest, opts ...grpc.CallOption) (*Snapshot, error) + // Deletes a snapshot. + DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*DeleteSnapshotResponse, error) + // Lists snapshots. + ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error) +} + +type snapshotsV1Beta3Client struct { + cc grpc.ClientConnInterface +} + +func NewSnapshotsV1Beta3Client(cc grpc.ClientConnInterface) SnapshotsV1Beta3Client { + return &snapshotsV1Beta3Client{cc} +} + +func (c *snapshotsV1Beta3Client) GetSnapshot(ctx context.Context, in *GetSnapshotRequest, opts ...grpc.CallOption) (*Snapshot, error) { + out := new(Snapshot) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.SnapshotsV1Beta3/GetSnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *snapshotsV1Beta3Client) DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*DeleteSnapshotResponse, error) { + out := new(DeleteSnapshotResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.SnapshotsV1Beta3/DeleteSnapshot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *snapshotsV1Beta3Client) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ListSnapshotsResponse, error) { + out := new(ListSnapshotsResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.SnapshotsV1Beta3/ListSnapshots", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SnapshotsV1Beta3Server is the server API for SnapshotsV1Beta3 service. +type SnapshotsV1Beta3Server interface { + // Gets information about a snapshot. + GetSnapshot(context.Context, *GetSnapshotRequest) (*Snapshot, error) + // Deletes a snapshot. + DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error) + // Lists snapshots. + ListSnapshots(context.Context, *ListSnapshotsRequest) (*ListSnapshotsResponse, error) +} + +// UnimplementedSnapshotsV1Beta3Server can be embedded to have forward compatible implementations. +type UnimplementedSnapshotsV1Beta3Server struct { +} + +func (*UnimplementedSnapshotsV1Beta3Server) GetSnapshot(context.Context, *GetSnapshotRequest) (*Snapshot, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSnapshot not implemented") +} +func (*UnimplementedSnapshotsV1Beta3Server) DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*DeleteSnapshotResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSnapshot not implemented") +} +func (*UnimplementedSnapshotsV1Beta3Server) ListSnapshots(context.Context, *ListSnapshotsRequest) (*ListSnapshotsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented") +} + +func RegisterSnapshotsV1Beta3Server(s *grpc.Server, srv SnapshotsV1Beta3Server) { + s.RegisterService(&_SnapshotsV1Beta3_serviceDesc, srv) +} + +func _SnapshotsV1Beta3_GetSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnapshotsV1Beta3Server).GetSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.SnapshotsV1Beta3/GetSnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnapshotsV1Beta3Server).GetSnapshot(ctx, req.(*GetSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SnapshotsV1Beta3_DeleteSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnapshotsV1Beta3Server).DeleteSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.SnapshotsV1Beta3/DeleteSnapshot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnapshotsV1Beta3Server).DeleteSnapshot(ctx, req.(*DeleteSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SnapshotsV1Beta3_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSnapshotsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SnapshotsV1Beta3Server).ListSnapshots(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.SnapshotsV1Beta3/ListSnapshots", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SnapshotsV1Beta3Server).ListSnapshots(ctx, req.(*ListSnapshotsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _SnapshotsV1Beta3_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.dataflow.v1beta3.SnapshotsV1Beta3", + HandlerType: (*SnapshotsV1Beta3Server)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSnapshot", + Handler: _SnapshotsV1Beta3_GetSnapshot_Handler, + }, + { + MethodName: "DeleteSnapshot", + Handler: _SnapshotsV1Beta3_DeleteSnapshot_Handler, + }, + { + MethodName: "ListSnapshots", + Handler: _SnapshotsV1Beta3_ListSnapshots_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/dataflow/v1beta3/snapshots.proto", +} diff --git a/dataflow/apiv1beta3/dataflowpb/streaming.pb.go b/dataflow/apiv1beta3/dataflowpb/streaming.pb.go new file mode 100644 index 000000000000..04324c9174cf --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/streaming.pb.go @@ -0,0 +1,1498 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/streaming.proto + +package dataflowpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Global topology of the streaming Dataflow job, including all +// computations and their sharded locations. +type TopologyConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The computations associated with a streaming Dataflow job. + Computations []*ComputationTopology `protobuf:"bytes,1,rep,name=computations,proto3" json:"computations,omitempty"` + // The disks assigned to a streaming Dataflow job. + DataDiskAssignments []*DataDiskAssignment `protobuf:"bytes,2,rep,name=data_disk_assignments,json=dataDiskAssignments,proto3" json:"data_disk_assignments,omitempty"` + // Maps user stage names to stable computation names. + UserStageToComputationNameMap map[string]string `protobuf:"bytes,3,rep,name=user_stage_to_computation_name_map,json=userStageToComputationNameMap,proto3" json:"user_stage_to_computation_name_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The size (in bits) of keys that will be assigned to source messages. + ForwardingKeyBits int32 `protobuf:"varint,4,opt,name=forwarding_key_bits,json=forwardingKeyBits,proto3" json:"forwarding_key_bits,omitempty"` + // Version number for persistent state. + PersistentStateVersion int32 `protobuf:"varint,5,opt,name=persistent_state_version,json=persistentStateVersion,proto3" json:"persistent_state_version,omitempty"` +} + +func (x *TopologyConfig) Reset() { + *x = TopologyConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopologyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopologyConfig) ProtoMessage() {} + +func (x *TopologyConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TopologyConfig.ProtoReflect.Descriptor instead. +func (*TopologyConfig) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{0} +} + +func (x *TopologyConfig) GetComputations() []*ComputationTopology { + if x != nil { + return x.Computations + } + return nil +} + +func (x *TopologyConfig) GetDataDiskAssignments() []*DataDiskAssignment { + if x != nil { + return x.DataDiskAssignments + } + return nil +} + +func (x *TopologyConfig) GetUserStageToComputationNameMap() map[string]string { + if x != nil { + return x.UserStageToComputationNameMap + } + return nil +} + +func (x *TopologyConfig) GetForwardingKeyBits() int32 { + if x != nil { + return x.ForwardingKeyBits + } + return 0 +} + +func (x *TopologyConfig) GetPersistentStateVersion() int32 { + if x != nil { + return x.PersistentStateVersion + } + return 0 +} + +// Identifies a pubsub location to use for transferring data into or +// out of a streaming Dataflow job. +type PubsubLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A pubsub topic, in the form of + // "pubsub.googleapis.com/topics//" + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + // A pubsub subscription, in the form of + // "pubsub.googleapis.com/subscriptions//" + Subscription string `protobuf:"bytes,2,opt,name=subscription,proto3" json:"subscription,omitempty"` + // If set, contains a pubsub label from which to extract record timestamps. + // If left empty, record timestamps will be generated upon arrival. + TimestampLabel string `protobuf:"bytes,3,opt,name=timestamp_label,json=timestampLabel,proto3" json:"timestamp_label,omitempty"` + // If set, contains a pubsub label from which to extract record ids. + // If left empty, record deduplication will be strictly best effort. + IdLabel string `protobuf:"bytes,4,opt,name=id_label,json=idLabel,proto3" json:"id_label,omitempty"` + // Indicates whether the pipeline allows late-arriving data. + DropLateData bool `protobuf:"varint,5,opt,name=drop_late_data,json=dropLateData,proto3" json:"drop_late_data,omitempty"` + // If set, specifies the pubsub subscription that will be used for tracking + // custom time timestamps for watermark estimation. + TrackingSubscription string `protobuf:"bytes,6,opt,name=tracking_subscription,json=trackingSubscription,proto3" json:"tracking_subscription,omitempty"` + // If true, then the client has requested to get pubsub attributes. + WithAttributes bool `protobuf:"varint,7,opt,name=with_attributes,json=withAttributes,proto3" json:"with_attributes,omitempty"` +} + +func (x *PubsubLocation) Reset() { + *x = PubsubLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubsubLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubsubLocation) ProtoMessage() {} + +func (x *PubsubLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubsubLocation.ProtoReflect.Descriptor instead. +func (*PubsubLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{1} +} + +func (x *PubsubLocation) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *PubsubLocation) GetSubscription() string { + if x != nil { + return x.Subscription + } + return "" +} + +func (x *PubsubLocation) GetTimestampLabel() string { + if x != nil { + return x.TimestampLabel + } + return "" +} + +func (x *PubsubLocation) GetIdLabel() string { + if x != nil { + return x.IdLabel + } + return "" +} + +func (x *PubsubLocation) GetDropLateData() bool { + if x != nil { + return x.DropLateData + } + return false +} + +func (x *PubsubLocation) GetTrackingSubscription() string { + if x != nil { + return x.TrackingSubscription + } + return "" +} + +func (x *PubsubLocation) GetWithAttributes() bool { + if x != nil { + return x.WithAttributes + } + return false +} + +// Identifies the location of a streaming computation stage, for +// stage-to-stage communication. +type StreamingStageLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifies the particular stream within the streaming Dataflow + // job. + StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` +} + +func (x *StreamingStageLocation) Reset() { + *x = StreamingStageLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingStageLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingStageLocation) ProtoMessage() {} + +func (x *StreamingStageLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamingStageLocation.ProtoReflect.Descriptor instead. +func (*StreamingStageLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{2} +} + +func (x *StreamingStageLocation) GetStreamId() string { + if x != nil { + return x.StreamId + } + return "" +} + +// Identifies the location of a streaming side input. +type StreamingSideInputLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifies the particular side input within the streaming Dataflow job. + Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + // Identifies the state family where this side input is stored. + StateFamily string `protobuf:"bytes,2,opt,name=state_family,json=stateFamily,proto3" json:"state_family,omitempty"` +} + +func (x *StreamingSideInputLocation) Reset() { + *x = StreamingSideInputLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingSideInputLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingSideInputLocation) ProtoMessage() {} + +func (x *StreamingSideInputLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamingSideInputLocation.ProtoReflect.Descriptor instead. +func (*StreamingSideInputLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{3} +} + +func (x *StreamingSideInputLocation) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +func (x *StreamingSideInputLocation) GetStateFamily() string { + if x != nil { + return x.StateFamily + } + return "" +} + +// Identifies the location of a custom souce. +type CustomSourceLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether this source is stateful. + Stateful bool `protobuf:"varint,1,opt,name=stateful,proto3" json:"stateful,omitempty"` +} + +func (x *CustomSourceLocation) Reset() { + *x = CustomSourceLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomSourceLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomSourceLocation) ProtoMessage() {} + +func (x *CustomSourceLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomSourceLocation.ProtoReflect.Descriptor instead. +func (*CustomSourceLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{4} +} + +func (x *CustomSourceLocation) GetStateful() bool { + if x != nil { + return x.Stateful + } + return false +} + +// Describes a stream of data, either as input to be processed or as +// output of a streaming Dataflow job. +type StreamLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A specification of a stream's location. + // + // Types that are assignable to Location: + // + // *StreamLocation_StreamingStageLocation + // *StreamLocation_PubsubLocation + // *StreamLocation_SideInputLocation + // *StreamLocation_CustomSourceLocation + Location isStreamLocation_Location `protobuf_oneof:"location"` +} + +func (x *StreamLocation) Reset() { + *x = StreamLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamLocation) ProtoMessage() {} + +func (x *StreamLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamLocation.ProtoReflect.Descriptor instead. +func (*StreamLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{5} +} + +func (m *StreamLocation) GetLocation() isStreamLocation_Location { + if m != nil { + return m.Location + } + return nil +} + +func (x *StreamLocation) GetStreamingStageLocation() *StreamingStageLocation { + if x, ok := x.GetLocation().(*StreamLocation_StreamingStageLocation); ok { + return x.StreamingStageLocation + } + return nil +} + +func (x *StreamLocation) GetPubsubLocation() *PubsubLocation { + if x, ok := x.GetLocation().(*StreamLocation_PubsubLocation); ok { + return x.PubsubLocation + } + return nil +} + +func (x *StreamLocation) GetSideInputLocation() *StreamingSideInputLocation { + if x, ok := x.GetLocation().(*StreamLocation_SideInputLocation); ok { + return x.SideInputLocation + } + return nil +} + +func (x *StreamLocation) GetCustomSourceLocation() *CustomSourceLocation { + if x, ok := x.GetLocation().(*StreamLocation_CustomSourceLocation); ok { + return x.CustomSourceLocation + } + return nil +} + +type isStreamLocation_Location interface { + isStreamLocation_Location() +} + +type StreamLocation_StreamingStageLocation struct { + // The stream is part of another computation within the current + // streaming Dataflow job. + StreamingStageLocation *StreamingStageLocation `protobuf:"bytes,1,opt,name=streaming_stage_location,json=streamingStageLocation,proto3,oneof"` +} + +type StreamLocation_PubsubLocation struct { + // The stream is a pubsub stream. + PubsubLocation *PubsubLocation `protobuf:"bytes,2,opt,name=pubsub_location,json=pubsubLocation,proto3,oneof"` +} + +type StreamLocation_SideInputLocation struct { + // The stream is a streaming side input. + SideInputLocation *StreamingSideInputLocation `protobuf:"bytes,3,opt,name=side_input_location,json=sideInputLocation,proto3,oneof"` +} + +type StreamLocation_CustomSourceLocation struct { + // The stream is a custom source. + CustomSourceLocation *CustomSourceLocation `protobuf:"bytes,4,opt,name=custom_source_location,json=customSourceLocation,proto3,oneof"` +} + +func (*StreamLocation_StreamingStageLocation) isStreamLocation_Location() {} + +func (*StreamLocation_PubsubLocation) isStreamLocation_Location() {} + +func (*StreamLocation_SideInputLocation) isStreamLocation_Location() {} + +func (*StreamLocation_CustomSourceLocation) isStreamLocation_Location() {} + +// State family configuration. +type StateFamilyConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The state family value. + StateFamily string `protobuf:"bytes,1,opt,name=state_family,json=stateFamily,proto3" json:"state_family,omitempty"` + // If true, this family corresponds to a read operation. + IsRead bool `protobuf:"varint,2,opt,name=is_read,json=isRead,proto3" json:"is_read,omitempty"` +} + +func (x *StateFamilyConfig) Reset() { + *x = StateFamilyConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StateFamilyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateFamilyConfig) ProtoMessage() {} + +func (x *StateFamilyConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateFamilyConfig.ProtoReflect.Descriptor instead. +func (*StateFamilyConfig) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{6} +} + +func (x *StateFamilyConfig) GetStateFamily() string { + if x != nil { + return x.StateFamily + } + return "" +} + +func (x *StateFamilyConfig) GetIsRead() bool { + if x != nil { + return x.IsRead + } + return false +} + +// All configuration data for a particular Computation. +type ComputationTopology struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The system stage name. + SystemStageName string `protobuf:"bytes,1,opt,name=system_stage_name,json=systemStageName,proto3" json:"system_stage_name,omitempty"` + // The ID of the computation. + ComputationId string `protobuf:"bytes,5,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"` + // The key ranges processed by the computation. + KeyRanges []*KeyRangeLocation `protobuf:"bytes,2,rep,name=key_ranges,json=keyRanges,proto3" json:"key_ranges,omitempty"` + // The inputs to the computation. + Inputs []*StreamLocation `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // The outputs from the computation. + Outputs []*StreamLocation `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // The state family values. + StateFamilies []*StateFamilyConfig `protobuf:"bytes,7,rep,name=state_families,json=stateFamilies,proto3" json:"state_families,omitempty"` +} + +func (x *ComputationTopology) Reset() { + *x = ComputationTopology{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComputationTopology) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputationTopology) ProtoMessage() {} + +func (x *ComputationTopology) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComputationTopology.ProtoReflect.Descriptor instead. +func (*ComputationTopology) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{7} +} + +func (x *ComputationTopology) GetSystemStageName() string { + if x != nil { + return x.SystemStageName + } + return "" +} + +func (x *ComputationTopology) GetComputationId() string { + if x != nil { + return x.ComputationId + } + return "" +} + +func (x *ComputationTopology) GetKeyRanges() []*KeyRangeLocation { + if x != nil { + return x.KeyRanges + } + return nil +} + +func (x *ComputationTopology) GetInputs() []*StreamLocation { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *ComputationTopology) GetOutputs() []*StreamLocation { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *ComputationTopology) GetStateFamilies() []*StateFamilyConfig { + if x != nil { + return x.StateFamilies + } + return nil +} + +// Location information for a specific key-range of a sharded computation. +// Currently we only support UTF-8 character splits to simplify encoding into +// JSON. +type KeyRangeLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The start (inclusive) of the key range. + Start string `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` + // The end (exclusive) of the key range. + End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` + // The physical location of this range assignment to be used for + // streaming computation cross-worker message delivery. + DeliveryEndpoint string `protobuf:"bytes,3,opt,name=delivery_endpoint,json=deliveryEndpoint,proto3" json:"delivery_endpoint,omitempty"` + // The name of the data disk where data for this range is stored. + // This name is local to the Google Cloud Platform project and uniquely + // identifies the disk within that project, for example + // "myproject-1014-104817-4c2-harness-0-disk-1". + DataDisk string `protobuf:"bytes,5,opt,name=data_disk,json=dataDisk,proto3" json:"data_disk,omitempty"` + // DEPRECATED. The location of the persistent state for this range, as a + // persistent directory in the worker local filesystem. + // + // Deprecated: Do not use. + DeprecatedPersistentDirectory string `protobuf:"bytes,4,opt,name=deprecated_persistent_directory,json=deprecatedPersistentDirectory,proto3" json:"deprecated_persistent_directory,omitempty"` +} + +func (x *KeyRangeLocation) Reset() { + *x = KeyRangeLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyRangeLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyRangeLocation) ProtoMessage() {} + +func (x *KeyRangeLocation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyRangeLocation.ProtoReflect.Descriptor instead. +func (*KeyRangeLocation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{8} +} + +func (x *KeyRangeLocation) GetStart() string { + if x != nil { + return x.Start + } + return "" +} + +func (x *KeyRangeLocation) GetEnd() string { + if x != nil { + return x.End + } + return "" +} + +func (x *KeyRangeLocation) GetDeliveryEndpoint() string { + if x != nil { + return x.DeliveryEndpoint + } + return "" +} + +func (x *KeyRangeLocation) GetDataDisk() string { + if x != nil { + return x.DataDisk + } + return "" +} + +// Deprecated: Do not use. +func (x *KeyRangeLocation) GetDeprecatedPersistentDirectory() string { + if x != nil { + return x.DeprecatedPersistentDirectory + } + return "" +} + +// Describes mounted data disk. +type MountedDataDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the data disk. + // This name is local to the Google Cloud Platform project and uniquely + // identifies the disk within that project, for example + // "myproject-1014-104817-4c2-harness-0-disk-1". + DataDisk string `protobuf:"bytes,1,opt,name=data_disk,json=dataDisk,proto3" json:"data_disk,omitempty"` +} + +func (x *MountedDataDisk) Reset() { + *x = MountedDataDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MountedDataDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MountedDataDisk) ProtoMessage() {} + +func (x *MountedDataDisk) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MountedDataDisk.ProtoReflect.Descriptor instead. +func (*MountedDataDisk) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{9} +} + +func (x *MountedDataDisk) GetDataDisk() string { + if x != nil { + return x.DataDisk + } + return "" +} + +// Data disk assignment for a given VM instance. +type DataDiskAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // VM instance name the data disks mounted to, for example + // "myproject-1014-104817-4c2-harness-0". + VmInstance string `protobuf:"bytes,1,opt,name=vm_instance,json=vmInstance,proto3" json:"vm_instance,omitempty"` + // Mounted data disks. The order is important a data disk's 0-based index in + // this list defines which persistent directory the disk is mounted to, for + // example the list of { "myproject-1014-104817-4c2-harness-0-disk-0" }, + // { "myproject-1014-104817-4c2-harness-0-disk-1" }. + DataDisks []string `protobuf:"bytes,2,rep,name=data_disks,json=dataDisks,proto3" json:"data_disks,omitempty"` +} + +func (x *DataDiskAssignment) Reset() { + *x = DataDiskAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataDiskAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataDiskAssignment) ProtoMessage() {} + +func (x *DataDiskAssignment) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataDiskAssignment.ProtoReflect.Descriptor instead. +func (*DataDiskAssignment) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{10} +} + +func (x *DataDiskAssignment) GetVmInstance() string { + if x != nil { + return x.VmInstance + } + return "" +} + +func (x *DataDiskAssignment) GetDataDisks() []string { + if x != nil { + return x.DataDisks + } + return nil +} + +// Data disk assignment information for a specific key-range of a sharded +// computation. +// Currently we only support UTF-8 character splits to simplify encoding into +// JSON. +type KeyRangeDataDiskAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The start (inclusive) of the key range. + Start string `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` + // The end (exclusive) of the key range. + End string `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` + // The name of the data disk where data for this range is stored. + // This name is local to the Google Cloud Platform project and uniquely + // identifies the disk within that project, for example + // "myproject-1014-104817-4c2-harness-0-disk-1". + DataDisk string `protobuf:"bytes,3,opt,name=data_disk,json=dataDisk,proto3" json:"data_disk,omitempty"` +} + +func (x *KeyRangeDataDiskAssignment) Reset() { + *x = KeyRangeDataDiskAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyRangeDataDiskAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyRangeDataDiskAssignment) ProtoMessage() {} + +func (x *KeyRangeDataDiskAssignment) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyRangeDataDiskAssignment.ProtoReflect.Descriptor instead. +func (*KeyRangeDataDiskAssignment) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{11} +} + +func (x *KeyRangeDataDiskAssignment) GetStart() string { + if x != nil { + return x.Start + } + return "" +} + +func (x *KeyRangeDataDiskAssignment) GetEnd() string { + if x != nil { + return x.End + } + return "" +} + +func (x *KeyRangeDataDiskAssignment) GetDataDisk() string { + if x != nil { + return x.DataDisk + } + return "" +} + +// Describes full or partial data disk assignment information of the computation +// ranges. +type StreamingComputationRanges struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the computation. + ComputationId string `protobuf:"bytes,1,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"` + // Data disk assignments for ranges from this computation. + RangeAssignments []*KeyRangeDataDiskAssignment `protobuf:"bytes,2,rep,name=range_assignments,json=rangeAssignments,proto3" json:"range_assignments,omitempty"` +} + +func (x *StreamingComputationRanges) Reset() { + *x = StreamingComputationRanges{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingComputationRanges) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingComputationRanges) ProtoMessage() {} + +func (x *StreamingComputationRanges) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamingComputationRanges.ProtoReflect.Descriptor instead. +func (*StreamingComputationRanges) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{12} +} + +func (x *StreamingComputationRanges) GetComputationId() string { + if x != nil { + return x.ComputationId + } + return "" +} + +func (x *StreamingComputationRanges) GetRangeAssignments() []*KeyRangeDataDiskAssignment { + if x != nil { + return x.RangeAssignments + } + return nil +} + +// Streaming appliance snapshot configuration. +type StreamingApplianceSnapshotConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set, indicates the snapshot id for the snapshot being performed. + SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + // Indicates which endpoint is used to import appliance state. + ImportStateEndpoint string `protobuf:"bytes,2,opt,name=import_state_endpoint,json=importStateEndpoint,proto3" json:"import_state_endpoint,omitempty"` +} + +func (x *StreamingApplianceSnapshotConfig) Reset() { + *x = StreamingApplianceSnapshotConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingApplianceSnapshotConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingApplianceSnapshotConfig) ProtoMessage() {} + +func (x *StreamingApplianceSnapshotConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_streaming_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamingApplianceSnapshotConfig.ProtoReflect.Descriptor instead. +func (*StreamingApplianceSnapshotConfig) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP(), []int{13} +} + +func (x *StreamingApplianceSnapshotConfig) GetSnapshotId() string { + if x != nil { + return x.SnapshotId + } + return "" +} + +func (x *StreamingApplianceSnapshotConfig) GetImportStateEndpoint() string { + if x != nil { + return x.ImportStateEndpoint + } + return "" +} + +var File_google_dataflow_v1beta3_streaming_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_streaming_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x22, 0x97, 0x04, 0x0a, 0x0e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5f, 0x0a, 0x15, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x13, 0x64, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x41, 0x73, 0x73, + 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x22, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x1d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x43, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, + 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x42, 0x69, 0x74, 0x73, + 0x12, 0x38, 0x0a, 0x18, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x16, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x50, 0x0a, 0x22, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x92, 0x02, 0x0a, + 0x0e, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x64, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x24, 0x0a, + 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x4c, 0x61, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x14, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x69, 0x74, 0x68, + 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x77, 0x69, 0x74, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x22, 0x35, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x51, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x64, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0x32, 0x0a, 0x14, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x22, + 0xab, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x6b, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x53, 0x74, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x52, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x50, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x73, 0x75, 0x62, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x13, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x64, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x64, 0x65, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x16, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, + 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, + 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x22, 0x89, + 0x03, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0a, 0x6b, 0x65, 0x79, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x51, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x46, + 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x10, 0x4b, + 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x69, 0x76, + 0x65, 0x72, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x73, + 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, + 0x6b, 0x12, 0x4a, 0x0a, 0x1f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x1d, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x2e, 0x0a, + 0x0f, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, + 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x22, 0x54, 0x0a, + 0x12, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x6d, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x73, + 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x44, 0x69, + 0x73, 0x6b, 0x73, 0x22, 0x61, 0x0a, 0x1a, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, + 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x22, 0xa5, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x60, 0x0a, 0x11, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, + 0x73, 0x6b, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x77, + 0x0a, 0x20, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x69, + 0x61, 0x6e, 0x63, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0xd3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0xaa, 0x02, 0x1d, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0xca, 0x02, 0x1d, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0xea, 0x02, 0x20, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_streaming_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_streaming_proto_rawDescData = file_google_dataflow_v1beta3_streaming_proto_rawDesc +) + +func file_google_dataflow_v1beta3_streaming_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_streaming_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_streaming_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_streaming_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_streaming_proto_rawDescData +} + +var file_google_dataflow_v1beta3_streaming_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_google_dataflow_v1beta3_streaming_proto_goTypes = []interface{}{ + (*TopologyConfig)(nil), // 0: google.dataflow.v1beta3.TopologyConfig + (*PubsubLocation)(nil), // 1: google.dataflow.v1beta3.PubsubLocation + (*StreamingStageLocation)(nil), // 2: google.dataflow.v1beta3.StreamingStageLocation + (*StreamingSideInputLocation)(nil), // 3: google.dataflow.v1beta3.StreamingSideInputLocation + (*CustomSourceLocation)(nil), // 4: google.dataflow.v1beta3.CustomSourceLocation + (*StreamLocation)(nil), // 5: google.dataflow.v1beta3.StreamLocation + (*StateFamilyConfig)(nil), // 6: google.dataflow.v1beta3.StateFamilyConfig + (*ComputationTopology)(nil), // 7: google.dataflow.v1beta3.ComputationTopology + (*KeyRangeLocation)(nil), // 8: google.dataflow.v1beta3.KeyRangeLocation + (*MountedDataDisk)(nil), // 9: google.dataflow.v1beta3.MountedDataDisk + (*DataDiskAssignment)(nil), // 10: google.dataflow.v1beta3.DataDiskAssignment + (*KeyRangeDataDiskAssignment)(nil), // 11: google.dataflow.v1beta3.KeyRangeDataDiskAssignment + (*StreamingComputationRanges)(nil), // 12: google.dataflow.v1beta3.StreamingComputationRanges + (*StreamingApplianceSnapshotConfig)(nil), // 13: google.dataflow.v1beta3.StreamingApplianceSnapshotConfig + nil, // 14: google.dataflow.v1beta3.TopologyConfig.UserStageToComputationNameMapEntry +} +var file_google_dataflow_v1beta3_streaming_proto_depIdxs = []int32{ + 7, // 0: google.dataflow.v1beta3.TopologyConfig.computations:type_name -> google.dataflow.v1beta3.ComputationTopology + 10, // 1: google.dataflow.v1beta3.TopologyConfig.data_disk_assignments:type_name -> google.dataflow.v1beta3.DataDiskAssignment + 14, // 2: google.dataflow.v1beta3.TopologyConfig.user_stage_to_computation_name_map:type_name -> google.dataflow.v1beta3.TopologyConfig.UserStageToComputationNameMapEntry + 2, // 3: google.dataflow.v1beta3.StreamLocation.streaming_stage_location:type_name -> google.dataflow.v1beta3.StreamingStageLocation + 1, // 4: google.dataflow.v1beta3.StreamLocation.pubsub_location:type_name -> google.dataflow.v1beta3.PubsubLocation + 3, // 5: google.dataflow.v1beta3.StreamLocation.side_input_location:type_name -> google.dataflow.v1beta3.StreamingSideInputLocation + 4, // 6: google.dataflow.v1beta3.StreamLocation.custom_source_location:type_name -> google.dataflow.v1beta3.CustomSourceLocation + 8, // 7: google.dataflow.v1beta3.ComputationTopology.key_ranges:type_name -> google.dataflow.v1beta3.KeyRangeLocation + 5, // 8: google.dataflow.v1beta3.ComputationTopology.inputs:type_name -> google.dataflow.v1beta3.StreamLocation + 5, // 9: google.dataflow.v1beta3.ComputationTopology.outputs:type_name -> google.dataflow.v1beta3.StreamLocation + 6, // 10: google.dataflow.v1beta3.ComputationTopology.state_families:type_name -> google.dataflow.v1beta3.StateFamilyConfig + 11, // 11: google.dataflow.v1beta3.StreamingComputationRanges.range_assignments:type_name -> google.dataflow.v1beta3.KeyRangeDataDiskAssignment + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_streaming_proto_init() } +func file_google_dataflow_v1beta3_streaming_proto_init() { + if File_google_dataflow_v1beta3_streaming_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_streaming_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TopologyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubsubLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingStageLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingSideInputLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomSourceLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StateFamilyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComputationTopology); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyRangeLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MountedDataDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataDiskAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyRangeDataDiskAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingComputationRanges); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingApplianceSnapshotConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_dataflow_v1beta3_streaming_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*StreamLocation_StreamingStageLocation)(nil), + (*StreamLocation_PubsubLocation)(nil), + (*StreamLocation_SideInputLocation)(nil), + (*StreamLocation_CustomSourceLocation)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_streaming_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_dataflow_v1beta3_streaming_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_streaming_proto_depIdxs, + MessageInfos: file_google_dataflow_v1beta3_streaming_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_streaming_proto = out.File + file_google_dataflow_v1beta3_streaming_proto_rawDesc = nil + file_google_dataflow_v1beta3_streaming_proto_goTypes = nil + file_google_dataflow_v1beta3_streaming_proto_depIdxs = nil +} diff --git a/dataflow/apiv1beta3/dataflowpb/templates.pb.go b/dataflow/apiv1beta3/dataflowpb/templates.pb.go new file mode 100644 index 000000000000..4a333110e816 --- /dev/null +++ b/dataflow/apiv1beta3/dataflowpb/templates.pb.go @@ -0,0 +1,3315 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/dataflow/v1beta3/templates.proto + +package dataflowpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status1 "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ParameterType specifies what kind of input we need for this parameter. +type ParameterType int32 + +const ( + // Default input type. + ParameterType_DEFAULT ParameterType = 0 + // The parameter specifies generic text input. + ParameterType_TEXT ParameterType = 1 + // The parameter specifies a Cloud Storage Bucket to read from. + ParameterType_GCS_READ_BUCKET ParameterType = 2 + // The parameter specifies a Cloud Storage Bucket to write to. + ParameterType_GCS_WRITE_BUCKET ParameterType = 3 + // The parameter specifies a Cloud Storage file path to read from. + ParameterType_GCS_READ_FILE ParameterType = 4 + // The parameter specifies a Cloud Storage file path to write to. + ParameterType_GCS_WRITE_FILE ParameterType = 5 + // The parameter specifies a Cloud Storage folder path to read from. + ParameterType_GCS_READ_FOLDER ParameterType = 6 + // The parameter specifies a Cloud Storage folder to write to. + ParameterType_GCS_WRITE_FOLDER ParameterType = 7 + // The parameter specifies a Pub/Sub Topic. + ParameterType_PUBSUB_TOPIC ParameterType = 8 + // The parameter specifies a Pub/Sub Subscription. + ParameterType_PUBSUB_SUBSCRIPTION ParameterType = 9 +) + +// Enum value maps for ParameterType. +var ( + ParameterType_name = map[int32]string{ + 0: "DEFAULT", + 1: "TEXT", + 2: "GCS_READ_BUCKET", + 3: "GCS_WRITE_BUCKET", + 4: "GCS_READ_FILE", + 5: "GCS_WRITE_FILE", + 6: "GCS_READ_FOLDER", + 7: "GCS_WRITE_FOLDER", + 8: "PUBSUB_TOPIC", + 9: "PUBSUB_SUBSCRIPTION", + } + ParameterType_value = map[string]int32{ + "DEFAULT": 0, + "TEXT": 1, + "GCS_READ_BUCKET": 2, + "GCS_WRITE_BUCKET": 3, + "GCS_READ_FILE": 4, + "GCS_WRITE_FILE": 5, + "GCS_READ_FOLDER": 6, + "GCS_WRITE_FOLDER": 7, + "PUBSUB_TOPIC": 8, + "PUBSUB_SUBSCRIPTION": 9, + } +) + +func (x ParameterType) Enum() *ParameterType { + p := new(ParameterType) + *p = x + return p +} + +func (x ParameterType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ParameterType) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_templates_proto_enumTypes[0].Descriptor() +} + +func (ParameterType) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_templates_proto_enumTypes[0] +} + +func (x ParameterType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ParameterType.Descriptor instead. +func (ParameterType) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{0} +} + +// SDK Language. +type SDKInfo_Language int32 + +const ( + // UNKNOWN Language. + SDKInfo_UNKNOWN SDKInfo_Language = 0 + // Java. + SDKInfo_JAVA SDKInfo_Language = 1 + // Python. + SDKInfo_PYTHON SDKInfo_Language = 2 +) + +// Enum value maps for SDKInfo_Language. +var ( + SDKInfo_Language_name = map[int32]string{ + 0: "UNKNOWN", + 1: "JAVA", + 2: "PYTHON", + } + SDKInfo_Language_value = map[string]int32{ + "UNKNOWN": 0, + "JAVA": 1, + "PYTHON": 2, + } +) + +func (x SDKInfo_Language) Enum() *SDKInfo_Language { + p := new(SDKInfo_Language) + *p = x + return p +} + +func (x SDKInfo_Language) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SDKInfo_Language) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_templates_proto_enumTypes[1].Descriptor() +} + +func (SDKInfo_Language) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_templates_proto_enumTypes[1] +} + +func (x SDKInfo_Language) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SDKInfo_Language.Descriptor instead. +func (SDKInfo_Language) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{8, 0} +} + +// The various views of a template that may be retrieved. +type GetTemplateRequest_TemplateView int32 + +const ( + // Template view that retrieves only the metadata associated with the + // template. + GetTemplateRequest_METADATA_ONLY GetTemplateRequest_TemplateView = 0 +) + +// Enum value maps for GetTemplateRequest_TemplateView. +var ( + GetTemplateRequest_TemplateView_name = map[int32]string{ + 0: "METADATA_ONLY", + } + GetTemplateRequest_TemplateView_value = map[string]int32{ + "METADATA_ONLY": 0, + } +) + +func (x GetTemplateRequest_TemplateView) Enum() *GetTemplateRequest_TemplateView { + p := new(GetTemplateRequest_TemplateView) + *p = x + return p +} + +func (x GetTemplateRequest_TemplateView) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GetTemplateRequest_TemplateView) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_templates_proto_enumTypes[2].Descriptor() +} + +func (GetTemplateRequest_TemplateView) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_templates_proto_enumTypes[2] +} + +func (x GetTemplateRequest_TemplateView) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GetTemplateRequest_TemplateView.Descriptor instead. +func (GetTemplateRequest_TemplateView) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{11, 0} +} + +// Template Type. +type GetTemplateResponse_TemplateType int32 + +const ( + // Unknown Template Type. + GetTemplateResponse_UNKNOWN GetTemplateResponse_TemplateType = 0 + // Legacy Template. + GetTemplateResponse_LEGACY GetTemplateResponse_TemplateType = 1 + // Flex Template. + GetTemplateResponse_FLEX GetTemplateResponse_TemplateType = 2 +) + +// Enum value maps for GetTemplateResponse_TemplateType. +var ( + GetTemplateResponse_TemplateType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "LEGACY", + 2: "FLEX", + } + GetTemplateResponse_TemplateType_value = map[string]int32{ + "UNKNOWN": 0, + "LEGACY": 1, + "FLEX": 2, + } +) + +func (x GetTemplateResponse_TemplateType) Enum() *GetTemplateResponse_TemplateType { + p := new(GetTemplateResponse_TemplateType) + *p = x + return p +} + +func (x GetTemplateResponse_TemplateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GetTemplateResponse_TemplateType) Descriptor() protoreflect.EnumDescriptor { + return file_google_dataflow_v1beta3_templates_proto_enumTypes[3].Descriptor() +} + +func (GetTemplateResponse_TemplateType) Type() protoreflect.EnumType { + return &file_google_dataflow_v1beta3_templates_proto_enumTypes[3] +} + +func (x GetTemplateResponse_TemplateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GetTemplateResponse_TemplateType.Descriptor instead. +func (GetTemplateResponse_TemplateType) EnumDescriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{12, 0} +} + +// Response to the request to launch a job from Flex Template. +type LaunchFlexTemplateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The job that was launched, if the request was not a dry run and + // the job was successfully launched. + Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` +} + +func (x *LaunchFlexTemplateResponse) Reset() { + *x = LaunchFlexTemplateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchFlexTemplateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchFlexTemplateResponse) ProtoMessage() {} + +func (x *LaunchFlexTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LaunchFlexTemplateResponse.ProtoReflect.Descriptor instead. +func (*LaunchFlexTemplateResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{0} +} + +func (x *LaunchFlexTemplateResponse) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +// Container Spec. +type ContainerSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the docker container image. E.g., gcr.io/project/some-image + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` + // Metadata describing a template including description and validation rules. + Metadata *TemplateMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Required. SDK info of the Flex Template. + SdkInfo *SDKInfo `protobuf:"bytes,3,opt,name=sdk_info,json=sdkInfo,proto3" json:"sdk_info,omitempty"` + // Default runtime environment for the job. + DefaultEnvironment *FlexTemplateRuntimeEnvironment `protobuf:"bytes,4,opt,name=default_environment,json=defaultEnvironment,proto3" json:"default_environment,omitempty"` +} + +func (x *ContainerSpec) Reset() { + *x = ContainerSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerSpec) ProtoMessage() {} + +func (x *ContainerSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerSpec.ProtoReflect.Descriptor instead. +func (*ContainerSpec) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{1} +} + +func (x *ContainerSpec) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *ContainerSpec) GetMetadata() *TemplateMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ContainerSpec) GetSdkInfo() *SDKInfo { + if x != nil { + return x.SdkInfo + } + return nil +} + +func (x *ContainerSpec) GetDefaultEnvironment() *FlexTemplateRuntimeEnvironment { + if x != nil { + return x.DefaultEnvironment + } + return nil +} + +// Launch FlexTemplate Parameter. +type LaunchFlexTemplateParameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The job name to use for the created job. For update job request, + // job name should be same as the existing running job. + JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` + // Launch Mechanism. + // + // Types that are assignable to Template: + // + // *LaunchFlexTemplateParameter_ContainerSpec + // *LaunchFlexTemplateParameter_ContainerSpecGcsPath + Template isLaunchFlexTemplateParameter_Template `protobuf_oneof:"template"` + // The parameters for FlexTemplate. + // Ex. {"num_workers":"5"} + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Launch options for this flex template job. This is a common set of options + // across languages and templates. This should not be used to pass job + // parameters. + LaunchOptions map[string]string `protobuf:"bytes,6,rep,name=launch_options,json=launchOptions,proto3" json:"launch_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The runtime environment for the FlexTemplate job + Environment *FlexTemplateRuntimeEnvironment `protobuf:"bytes,7,opt,name=environment,proto3" json:"environment,omitempty"` + // Set this to true if you are sending a request to update a running + // streaming job. When set, the job name should be the same as the + // running job. + Update bool `protobuf:"varint,8,opt,name=update,proto3" json:"update,omitempty"` + // Use this to pass transform_name_mappings for streaming update jobs. + // Ex:{"oldTransformName":"newTransformName",...}' + TransformNameMappings map[string]string `protobuf:"bytes,9,rep,name=transform_name_mappings,json=transformNameMappings,proto3" json:"transform_name_mappings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *LaunchFlexTemplateParameter) Reset() { + *x = LaunchFlexTemplateParameter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchFlexTemplateParameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchFlexTemplateParameter) ProtoMessage() {} + +func (x *LaunchFlexTemplateParameter) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LaunchFlexTemplateParameter.ProtoReflect.Descriptor instead. +func (*LaunchFlexTemplateParameter) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{2} +} + +func (x *LaunchFlexTemplateParameter) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (m *LaunchFlexTemplateParameter) GetTemplate() isLaunchFlexTemplateParameter_Template { + if m != nil { + return m.Template + } + return nil +} + +func (x *LaunchFlexTemplateParameter) GetContainerSpec() *ContainerSpec { + if x, ok := x.GetTemplate().(*LaunchFlexTemplateParameter_ContainerSpec); ok { + return x.ContainerSpec + } + return nil +} + +func (x *LaunchFlexTemplateParameter) GetContainerSpecGcsPath() string { + if x, ok := x.GetTemplate().(*LaunchFlexTemplateParameter_ContainerSpecGcsPath); ok { + return x.ContainerSpecGcsPath + } + return "" +} + +func (x *LaunchFlexTemplateParameter) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *LaunchFlexTemplateParameter) GetLaunchOptions() map[string]string { + if x != nil { + return x.LaunchOptions + } + return nil +} + +func (x *LaunchFlexTemplateParameter) GetEnvironment() *FlexTemplateRuntimeEnvironment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *LaunchFlexTemplateParameter) GetUpdate() bool { + if x != nil { + return x.Update + } + return false +} + +func (x *LaunchFlexTemplateParameter) GetTransformNameMappings() map[string]string { + if x != nil { + return x.TransformNameMappings + } + return nil +} + +type isLaunchFlexTemplateParameter_Template interface { + isLaunchFlexTemplateParameter_Template() +} + +type LaunchFlexTemplateParameter_ContainerSpec struct { + // Spec about the container image to launch. + ContainerSpec *ContainerSpec `protobuf:"bytes,4,opt,name=container_spec,json=containerSpec,proto3,oneof"` +} + +type LaunchFlexTemplateParameter_ContainerSpecGcsPath struct { + // Cloud Storage path to a file with json serialized ContainerSpec as + // content. + ContainerSpecGcsPath string `protobuf:"bytes,5,opt,name=container_spec_gcs_path,json=containerSpecGcsPath,proto3,oneof"` +} + +func (*LaunchFlexTemplateParameter_ContainerSpec) isLaunchFlexTemplateParameter_Template() {} + +func (*LaunchFlexTemplateParameter_ContainerSpecGcsPath) isLaunchFlexTemplateParameter_Template() {} + +// The environment values to be set at runtime for flex template. +type FlexTemplateRuntimeEnvironment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The initial number of Google Compute Engine instances for the job. + NumWorkers int32 `protobuf:"varint,1,opt,name=num_workers,json=numWorkers,proto3" json:"num_workers,omitempty"` + // The maximum number of Google Compute Engine instances to be made + // available to your pipeline during execution, from 1 to 1000. + MaxWorkers int32 `protobuf:"varint,2,opt,name=max_workers,json=maxWorkers,proto3" json:"max_workers,omitempty"` + // The Compute Engine [availability + // zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) + // for launching worker instances to run your pipeline. + // In the future, worker_zone will take precedence. + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"` + // The email address of the service account to run the job as. + ServiceAccountEmail string `protobuf:"bytes,4,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"` + // The Cloud Storage path to use for temporary files. + // Must be a valid Cloud Storage URL, beginning with `gs://`. + TempLocation string `protobuf:"bytes,5,opt,name=temp_location,json=tempLocation,proto3" json:"temp_location,omitempty"` + // The machine type to use for the job. Defaults to the value from the + // template if not specified. + MachineType string `protobuf:"bytes,6,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + // Additional experiment flags for the job. + AdditionalExperiments []string `protobuf:"bytes,7,rep,name=additional_experiments,json=additionalExperiments,proto3" json:"additional_experiments,omitempty"` + // Network to which VMs will be assigned. If empty or unspecified, + // the service will use the network "default". + Network string `protobuf:"bytes,8,opt,name=network,proto3" json:"network,omitempty"` + // Subnetwork to which VMs will be assigned, if desired. You can specify a + // subnetwork using either a complete URL or an abbreviated path. Expected to + // be of the form + // "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" + // or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in + // a Shared VPC network, you must use the complete URL. + Subnetwork string `protobuf:"bytes,9,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` + // Additional user labels to be specified for the job. + // Keys and values must follow the restrictions specified in the [labeling + // restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + // page. + // An object containing a list of "key": value pairs. + // Example: { "name": "wrench", "mass": "1kg", "count": "3" }. + AdditionalUserLabels map[string]string `protobuf:"bytes,10,rep,name=additional_user_labels,json=additionalUserLabels,proto3" json:"additional_user_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Name for the Cloud KMS key for the job. + // Key format is: + // projects//locations//keyRings//cryptoKeys/ + KmsKeyName string `protobuf:"bytes,11,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"` + // Configuration for VM IPs. + IpConfiguration WorkerIPAddressConfiguration `protobuf:"varint,12,opt,name=ip_configuration,json=ipConfiguration,proto3,enum=google.dataflow.v1beta3.WorkerIPAddressConfiguration" json:"ip_configuration,omitempty"` + // The Compute Engine region + // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in + // which worker processing should occur, e.g. "us-west1". Mutually exclusive + // with worker_zone. If neither worker_region nor worker_zone is specified, + // default to the control plane's region. + WorkerRegion string `protobuf:"bytes,13,opt,name=worker_region,json=workerRegion,proto3" json:"worker_region,omitempty"` + // The Compute Engine zone + // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in + // which worker processing should occur, e.g. "us-west1-a". Mutually exclusive + // with worker_region. If neither worker_region nor worker_zone is specified, + // a zone in the control plane's region is chosen based on available capacity. + // If both `worker_zone` and `zone` are set, `worker_zone` takes precedence. + WorkerZone string `protobuf:"bytes,14,opt,name=worker_zone,json=workerZone,proto3" json:"worker_zone,omitempty"` + // Whether to enable Streaming Engine for the job. + EnableStreamingEngine bool `protobuf:"varint,15,opt,name=enable_streaming_engine,json=enableStreamingEngine,proto3" json:"enable_streaming_engine,omitempty"` + // Set FlexRS goal for the job. + // https://cloud.google.com/dataflow/docs/guides/flexrs + FlexrsGoal FlexResourceSchedulingGoal `protobuf:"varint,16,opt,name=flexrs_goal,json=flexrsGoal,proto3,enum=google.dataflow.v1beta3.FlexResourceSchedulingGoal" json:"flexrs_goal,omitempty"` + // The Cloud Storage path for staging local files. + // Must be a valid Cloud Storage URL, beginning with `gs://`. + StagingLocation string `protobuf:"bytes,17,opt,name=staging_location,json=stagingLocation,proto3" json:"staging_location,omitempty"` + // Docker registry location of container image to use for the 'worker harness. + // Default is the container for the version of the SDK. Note this field is + // only valid for portable pipelines. + SdkContainerImage string `protobuf:"bytes,18,opt,name=sdk_container_image,json=sdkContainerImage,proto3" json:"sdk_container_image,omitempty"` + // Worker disk size, in gigabytes. + DiskSizeGb int32 `protobuf:"varint,20,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` + // The algorithm to use for autoscaling + AutoscalingAlgorithm AutoscalingAlgorithm `protobuf:"varint,21,opt,name=autoscaling_algorithm,json=autoscalingAlgorithm,proto3,enum=google.dataflow.v1beta3.AutoscalingAlgorithm" json:"autoscaling_algorithm,omitempty"` + // If true, save a heap dump before killing a thread or process which is GC + // thrashing or out of memory. The location of the heap file will either be + // echoed back to the user, or the user will be given the opportunity to + // download the heap file. + DumpHeapOnOom bool `protobuf:"varint,22,opt,name=dump_heap_on_oom,json=dumpHeapOnOom,proto3" json:"dump_heap_on_oom,omitempty"` + // Cloud Storage bucket (directory) to upload heap dumps to the given + // location. Enabling this implies that heap dumps should be generated on OOM + // (dump_heap_on_oom is set to true). + SaveHeapDumpsToGcsPath string `protobuf:"bytes,23,opt,name=save_heap_dumps_to_gcs_path,json=saveHeapDumpsToGcsPath,proto3" json:"save_heap_dumps_to_gcs_path,omitempty"` + // The machine type to use for launching the job. The default is + // n1-standard-1. + LauncherMachineType string `protobuf:"bytes,24,opt,name=launcher_machine_type,json=launcherMachineType,proto3" json:"launcher_machine_type,omitempty"` +} + +func (x *FlexTemplateRuntimeEnvironment) Reset() { + *x = FlexTemplateRuntimeEnvironment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlexTemplateRuntimeEnvironment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlexTemplateRuntimeEnvironment) ProtoMessage() {} + +func (x *FlexTemplateRuntimeEnvironment) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlexTemplateRuntimeEnvironment.ProtoReflect.Descriptor instead. +func (*FlexTemplateRuntimeEnvironment) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{3} +} + +func (x *FlexTemplateRuntimeEnvironment) GetNumWorkers() int32 { + if x != nil { + return x.NumWorkers + } + return 0 +} + +func (x *FlexTemplateRuntimeEnvironment) GetMaxWorkers() int32 { + if x != nil { + return x.MaxWorkers + } + return 0 +} + +func (x *FlexTemplateRuntimeEnvironment) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetServiceAccountEmail() string { + if x != nil { + return x.ServiceAccountEmail + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetTempLocation() string { + if x != nil { + return x.TempLocation + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetAdditionalExperiments() []string { + if x != nil { + return x.AdditionalExperiments + } + return nil +} + +func (x *FlexTemplateRuntimeEnvironment) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetSubnetwork() string { + if x != nil { + return x.Subnetwork + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetAdditionalUserLabels() map[string]string { + if x != nil { + return x.AdditionalUserLabels + } + return nil +} + +func (x *FlexTemplateRuntimeEnvironment) GetKmsKeyName() string { + if x != nil { + return x.KmsKeyName + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetIpConfiguration() WorkerIPAddressConfiguration { + if x != nil { + return x.IpConfiguration + } + return WorkerIPAddressConfiguration_WORKER_IP_UNSPECIFIED +} + +func (x *FlexTemplateRuntimeEnvironment) GetWorkerRegion() string { + if x != nil { + return x.WorkerRegion + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetWorkerZone() string { + if x != nil { + return x.WorkerZone + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetEnableStreamingEngine() bool { + if x != nil { + return x.EnableStreamingEngine + } + return false +} + +func (x *FlexTemplateRuntimeEnvironment) GetFlexrsGoal() FlexResourceSchedulingGoal { + if x != nil { + return x.FlexrsGoal + } + return FlexResourceSchedulingGoal_FLEXRS_UNSPECIFIED +} + +func (x *FlexTemplateRuntimeEnvironment) GetStagingLocation() string { + if x != nil { + return x.StagingLocation + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetSdkContainerImage() string { + if x != nil { + return x.SdkContainerImage + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetDiskSizeGb() int32 { + if x != nil { + return x.DiskSizeGb + } + return 0 +} + +func (x *FlexTemplateRuntimeEnvironment) GetAutoscalingAlgorithm() AutoscalingAlgorithm { + if x != nil { + return x.AutoscalingAlgorithm + } + return AutoscalingAlgorithm_AUTOSCALING_ALGORITHM_UNKNOWN +} + +func (x *FlexTemplateRuntimeEnvironment) GetDumpHeapOnOom() bool { + if x != nil { + return x.DumpHeapOnOom + } + return false +} + +func (x *FlexTemplateRuntimeEnvironment) GetSaveHeapDumpsToGcsPath() string { + if x != nil { + return x.SaveHeapDumpsToGcsPath + } + return "" +} + +func (x *FlexTemplateRuntimeEnvironment) GetLauncherMachineType() string { + if x != nil { + return x.LauncherMachineType + } + return "" +} + +// A request to launch a Cloud Dataflow job from a FlexTemplate. +type LaunchFlexTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // Required. Parameter to launch a job form Flex Template. + LaunchParameter *LaunchFlexTemplateParameter `protobuf:"bytes,2,opt,name=launch_parameter,json=launchParameter,proto3" json:"launch_parameter,omitempty"` + // Required. The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to + // which to direct the request. E.g., us-central1, us-west1. + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + // If true, the request is validated but not actually executed. + // Defaults to false. + ValidateOnly bool `protobuf:"varint,4,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` +} + +func (x *LaunchFlexTemplateRequest) Reset() { + *x = LaunchFlexTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchFlexTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchFlexTemplateRequest) ProtoMessage() {} + +func (x *LaunchFlexTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LaunchFlexTemplateRequest.ProtoReflect.Descriptor instead. +func (*LaunchFlexTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{4} +} + +func (x *LaunchFlexTemplateRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *LaunchFlexTemplateRequest) GetLaunchParameter() *LaunchFlexTemplateParameter { + if x != nil { + return x.LaunchParameter + } + return nil +} + +func (x *LaunchFlexTemplateRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *LaunchFlexTemplateRequest) GetValidateOnly() bool { + if x != nil { + return x.ValidateOnly + } + return false +} + +// The environment values to set at runtime. +type RuntimeEnvironment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The initial number of Google Compute Engine instnaces for the job. + NumWorkers int32 `protobuf:"varint,11,opt,name=num_workers,json=numWorkers,proto3" json:"num_workers,omitempty"` + // The maximum number of Google Compute Engine instances to be made + // available to your pipeline during execution, from 1 to 1000. + MaxWorkers int32 `protobuf:"varint,1,opt,name=max_workers,json=maxWorkers,proto3" json:"max_workers,omitempty"` + // The Compute Engine [availability + // zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) + // for launching worker instances to run your pipeline. + // In the future, worker_zone will take precedence. + Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` + // The email address of the service account to run the job as. + ServiceAccountEmail string `protobuf:"bytes,3,opt,name=service_account_email,json=serviceAccountEmail,proto3" json:"service_account_email,omitempty"` + // The Cloud Storage path to use for temporary files. + // Must be a valid Cloud Storage URL, beginning with `gs://`. + TempLocation string `protobuf:"bytes,4,opt,name=temp_location,json=tempLocation,proto3" json:"temp_location,omitempty"` + // Whether to bypass the safety checks for the job's temporary directory. + // Use with caution. + BypassTempDirValidation bool `protobuf:"varint,5,opt,name=bypass_temp_dir_validation,json=bypassTempDirValidation,proto3" json:"bypass_temp_dir_validation,omitempty"` + // The machine type to use for the job. Defaults to the value from the + // template if not specified. + MachineType string `protobuf:"bytes,6,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + // Additional experiment flags for the job, specified with the + // `--experiments` option. + AdditionalExperiments []string `protobuf:"bytes,7,rep,name=additional_experiments,json=additionalExperiments,proto3" json:"additional_experiments,omitempty"` + // Network to which VMs will be assigned. If empty or unspecified, + // the service will use the network "default". + Network string `protobuf:"bytes,8,opt,name=network,proto3" json:"network,omitempty"` + // Subnetwork to which VMs will be assigned, if desired. You can specify a + // subnetwork using either a complete URL or an abbreviated path. Expected to + // be of the form + // "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK" + // or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in + // a Shared VPC network, you must use the complete URL. + Subnetwork string `protobuf:"bytes,9,opt,name=subnetwork,proto3" json:"subnetwork,omitempty"` + // Additional user labels to be specified for the job. + // Keys and values should follow the restrictions specified in the [labeling + // restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) + // page. + // An object containing a list of "key": value pairs. + // Example: { "name": "wrench", "mass": "1kg", "count": "3" }. + AdditionalUserLabels map[string]string `protobuf:"bytes,10,rep,name=additional_user_labels,json=additionalUserLabels,proto3" json:"additional_user_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Name for the Cloud KMS key for the job. + // Key format is: + // projects//locations//keyRings//cryptoKeys/ + KmsKeyName string `protobuf:"bytes,12,opt,name=kms_key_name,json=kmsKeyName,proto3" json:"kms_key_name,omitempty"` + // Configuration for VM IPs. + IpConfiguration WorkerIPAddressConfiguration `protobuf:"varint,14,opt,name=ip_configuration,json=ipConfiguration,proto3,enum=google.dataflow.v1beta3.WorkerIPAddressConfiguration" json:"ip_configuration,omitempty"` + // The Compute Engine region + // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in + // which worker processing should occur, e.g. "us-west1". Mutually exclusive + // with worker_zone. If neither worker_region nor worker_zone is specified, + // default to the control plane's region. + WorkerRegion string `protobuf:"bytes,15,opt,name=worker_region,json=workerRegion,proto3" json:"worker_region,omitempty"` + // The Compute Engine zone + // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in + // which worker processing should occur, e.g. "us-west1-a". Mutually exclusive + // with worker_region. If neither worker_region nor worker_zone is specified, + // a zone in the control plane's region is chosen based on available capacity. + // If both `worker_zone` and `zone` are set, `worker_zone` takes precedence. + WorkerZone string `protobuf:"bytes,16,opt,name=worker_zone,json=workerZone,proto3" json:"worker_zone,omitempty"` + // Whether to enable Streaming Engine for the job. + EnableStreamingEngine bool `protobuf:"varint,17,opt,name=enable_streaming_engine,json=enableStreamingEngine,proto3" json:"enable_streaming_engine,omitempty"` +} + +func (x *RuntimeEnvironment) Reset() { + *x = RuntimeEnvironment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RuntimeEnvironment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuntimeEnvironment) ProtoMessage() {} + +func (x *RuntimeEnvironment) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuntimeEnvironment.ProtoReflect.Descriptor instead. +func (*RuntimeEnvironment) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{5} +} + +func (x *RuntimeEnvironment) GetNumWorkers() int32 { + if x != nil { + return x.NumWorkers + } + return 0 +} + +func (x *RuntimeEnvironment) GetMaxWorkers() int32 { + if x != nil { + return x.MaxWorkers + } + return 0 +} + +func (x *RuntimeEnvironment) GetZone() string { + if x != nil { + return x.Zone + } + return "" +} + +func (x *RuntimeEnvironment) GetServiceAccountEmail() string { + if x != nil { + return x.ServiceAccountEmail + } + return "" +} + +func (x *RuntimeEnvironment) GetTempLocation() string { + if x != nil { + return x.TempLocation + } + return "" +} + +func (x *RuntimeEnvironment) GetBypassTempDirValidation() bool { + if x != nil { + return x.BypassTempDirValidation + } + return false +} + +func (x *RuntimeEnvironment) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *RuntimeEnvironment) GetAdditionalExperiments() []string { + if x != nil { + return x.AdditionalExperiments + } + return nil +} + +func (x *RuntimeEnvironment) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *RuntimeEnvironment) GetSubnetwork() string { + if x != nil { + return x.Subnetwork + } + return "" +} + +func (x *RuntimeEnvironment) GetAdditionalUserLabels() map[string]string { + if x != nil { + return x.AdditionalUserLabels + } + return nil +} + +func (x *RuntimeEnvironment) GetKmsKeyName() string { + if x != nil { + return x.KmsKeyName + } + return "" +} + +func (x *RuntimeEnvironment) GetIpConfiguration() WorkerIPAddressConfiguration { + if x != nil { + return x.IpConfiguration + } + return WorkerIPAddressConfiguration_WORKER_IP_UNSPECIFIED +} + +func (x *RuntimeEnvironment) GetWorkerRegion() string { + if x != nil { + return x.WorkerRegion + } + return "" +} + +func (x *RuntimeEnvironment) GetWorkerZone() string { + if x != nil { + return x.WorkerZone + } + return "" +} + +func (x *RuntimeEnvironment) GetEnableStreamingEngine() bool { + if x != nil { + return x.EnableStreamingEngine + } + return false +} + +// Metadata for a specific parameter. +type ParameterMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the parameter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The label to display for the parameter. + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + // Required. The help text to display for the parameter. + HelpText string `protobuf:"bytes,3,opt,name=help_text,json=helpText,proto3" json:"help_text,omitempty"` + // Optional. Whether the parameter is optional. Defaults to false. + IsOptional bool `protobuf:"varint,4,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` + // Optional. Regexes that the parameter must match. + Regexes []string `protobuf:"bytes,5,rep,name=regexes,proto3" json:"regexes,omitempty"` + // Optional. The type of the parameter. + // Used for selecting input picker. + ParamType ParameterType `protobuf:"varint,6,opt,name=param_type,json=paramType,proto3,enum=google.dataflow.v1beta3.ParameterType" json:"param_type,omitempty"` + // Optional. Additional metadata for describing this parameter. + CustomMetadata map[string]string `protobuf:"bytes,7,rep,name=custom_metadata,json=customMetadata,proto3" json:"custom_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ParameterMetadata) Reset() { + *x = ParameterMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParameterMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParameterMetadata) ProtoMessage() {} + +func (x *ParameterMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParameterMetadata.ProtoReflect.Descriptor instead. +func (*ParameterMetadata) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{6} +} + +func (x *ParameterMetadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ParameterMetadata) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ParameterMetadata) GetHelpText() string { + if x != nil { + return x.HelpText + } + return "" +} + +func (x *ParameterMetadata) GetIsOptional() bool { + if x != nil { + return x.IsOptional + } + return false +} + +func (x *ParameterMetadata) GetRegexes() []string { + if x != nil { + return x.Regexes + } + return nil +} + +func (x *ParameterMetadata) GetParamType() ParameterType { + if x != nil { + return x.ParamType + } + return ParameterType_DEFAULT +} + +func (x *ParameterMetadata) GetCustomMetadata() map[string]string { + if x != nil { + return x.CustomMetadata + } + return nil +} + +// Metadata describing a template. +type TemplateMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the template. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A description of the template. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The parameters for the template. + Parameters []*ParameterMetadata `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *TemplateMetadata) Reset() { + *x = TemplateMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemplateMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemplateMetadata) ProtoMessage() {} + +func (x *TemplateMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemplateMetadata.ProtoReflect.Descriptor instead. +func (*TemplateMetadata) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{7} +} + +func (x *TemplateMetadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TemplateMetadata) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *TemplateMetadata) GetParameters() []*ParameterMetadata { + if x != nil { + return x.Parameters + } + return nil +} + +// SDK Information. +type SDKInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The SDK Language. + Language SDKInfo_Language `protobuf:"varint,1,opt,name=language,proto3,enum=google.dataflow.v1beta3.SDKInfo_Language" json:"language,omitempty"` + // Optional. The SDK version. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *SDKInfo) Reset() { + *x = SDKInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SDKInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SDKInfo) ProtoMessage() {} + +func (x *SDKInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SDKInfo.ProtoReflect.Descriptor instead. +func (*SDKInfo) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{8} +} + +func (x *SDKInfo) GetLanguage() SDKInfo_Language { + if x != nil { + return x.Language + } + return SDKInfo_UNKNOWN +} + +func (x *SDKInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// RuntimeMetadata describing a runtime environment. +type RuntimeMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SDK Info for the template. + SdkInfo *SDKInfo `protobuf:"bytes,1,opt,name=sdk_info,json=sdkInfo,proto3" json:"sdk_info,omitempty"` + // The parameters for the template. + Parameters []*ParameterMetadata `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *RuntimeMetadata) Reset() { + *x = RuntimeMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RuntimeMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RuntimeMetadata) ProtoMessage() {} + +func (x *RuntimeMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RuntimeMetadata.ProtoReflect.Descriptor instead. +func (*RuntimeMetadata) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{9} +} + +func (x *RuntimeMetadata) GetSdkInfo() *SDKInfo { + if x != nil { + return x.SdkInfo + } + return nil +} + +func (x *RuntimeMetadata) GetParameters() []*ParameterMetadata { + if x != nil { + return x.Parameters + } + return nil +} + +// A request to create a Cloud Dataflow job from a template. +type CreateJobFromTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // Required. The job name to use for the created job. + JobName string `protobuf:"bytes,4,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` + // The template from which to create the job. + // + // Types that are assignable to Template: + // + // *CreateJobFromTemplateRequest_GcsPath + Template isCreateJobFromTemplateRequest_Template `protobuf_oneof:"template"` + // The runtime parameters to pass to the job. + Parameters map[string]string `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The runtime environment for the job. + Environment *RuntimeEnvironment `protobuf:"bytes,5,opt,name=environment,proto3" json:"environment,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to + // which to direct the request. + Location string `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *CreateJobFromTemplateRequest) Reset() { + *x = CreateJobFromTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateJobFromTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateJobFromTemplateRequest) ProtoMessage() {} + +func (x *CreateJobFromTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateJobFromTemplateRequest.ProtoReflect.Descriptor instead. +func (*CreateJobFromTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateJobFromTemplateRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateJobFromTemplateRequest) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (m *CreateJobFromTemplateRequest) GetTemplate() isCreateJobFromTemplateRequest_Template { + if m != nil { + return m.Template + } + return nil +} + +func (x *CreateJobFromTemplateRequest) GetGcsPath() string { + if x, ok := x.GetTemplate().(*CreateJobFromTemplateRequest_GcsPath); ok { + return x.GcsPath + } + return "" +} + +func (x *CreateJobFromTemplateRequest) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *CreateJobFromTemplateRequest) GetEnvironment() *RuntimeEnvironment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *CreateJobFromTemplateRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +type isCreateJobFromTemplateRequest_Template interface { + isCreateJobFromTemplateRequest_Template() +} + +type CreateJobFromTemplateRequest_GcsPath struct { + // Required. A Cloud Storage path to the template from which to + // create the job. + // Must be a valid Cloud Storage URL, beginning with `gs://`. + GcsPath string `protobuf:"bytes,2,opt,name=gcs_path,json=gcsPath,proto3,oneof"` +} + +func (*CreateJobFromTemplateRequest_GcsPath) isCreateJobFromTemplateRequest_Template() {} + +// A request to retrieve a Cloud Dataflow job template. +type GetTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The template from which to create the job. + // + // Types that are assignable to Template: + // + // *GetTemplateRequest_GcsPath + Template isGetTemplateRequest_Template `protobuf_oneof:"template"` + // The view to retrieve. Defaults to METADATA_ONLY. + View GetTemplateRequest_TemplateView `protobuf:"varint,3,opt,name=view,proto3,enum=google.dataflow.v1beta3.GetTemplateRequest_TemplateView" json:"view,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to + // which to direct the request. + Location string `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *GetTemplateRequest) Reset() { + *x = GetTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTemplateRequest) ProtoMessage() {} + +func (x *GetTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTemplateRequest.ProtoReflect.Descriptor instead. +func (*GetTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{11} +} + +func (x *GetTemplateRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (m *GetTemplateRequest) GetTemplate() isGetTemplateRequest_Template { + if m != nil { + return m.Template + } + return nil +} + +func (x *GetTemplateRequest) GetGcsPath() string { + if x, ok := x.GetTemplate().(*GetTemplateRequest_GcsPath); ok { + return x.GcsPath + } + return "" +} + +func (x *GetTemplateRequest) GetView() GetTemplateRequest_TemplateView { + if x != nil { + return x.View + } + return GetTemplateRequest_METADATA_ONLY +} + +func (x *GetTemplateRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +type isGetTemplateRequest_Template interface { + isGetTemplateRequest_Template() +} + +type GetTemplateRequest_GcsPath struct { + // Required. A Cloud Storage path to the template from which to + // create the job. + // Must be valid Cloud Storage URL, beginning with 'gs://'. + GcsPath string `protobuf:"bytes,2,opt,name=gcs_path,json=gcsPath,proto3,oneof"` +} + +func (*GetTemplateRequest_GcsPath) isGetTemplateRequest_Template() {} + +// The response to a GetTemplate request. +type GetTemplateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The status of the get template request. Any problems with the + // request will be indicated in the error_details. + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // The template metadata describing the template name, available + // parameters, etc. + Metadata *TemplateMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Template Type. + TemplateType GetTemplateResponse_TemplateType `protobuf:"varint,3,opt,name=template_type,json=templateType,proto3,enum=google.dataflow.v1beta3.GetTemplateResponse_TemplateType" json:"template_type,omitempty"` + // Describes the runtime metadata with SDKInfo and available parameters. + RuntimeMetadata *RuntimeMetadata `protobuf:"bytes,4,opt,name=runtime_metadata,json=runtimeMetadata,proto3" json:"runtime_metadata,omitempty"` +} + +func (x *GetTemplateResponse) Reset() { + *x = GetTemplateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTemplateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTemplateResponse) ProtoMessage() {} + +func (x *GetTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTemplateResponse.ProtoReflect.Descriptor instead. +func (*GetTemplateResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{12} +} + +func (x *GetTemplateResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *GetTemplateResponse) GetMetadata() *TemplateMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GetTemplateResponse) GetTemplateType() GetTemplateResponse_TemplateType { + if x != nil { + return x.TemplateType + } + return GetTemplateResponse_UNKNOWN +} + +func (x *GetTemplateResponse) GetRuntimeMetadata() *RuntimeMetadata { + if x != nil { + return x.RuntimeMetadata + } + return nil +} + +// Parameters to provide to the template being launched. +type LaunchTemplateParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The job name to use for the created job. + JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` + // The runtime parameters to pass to the job. + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The runtime environment for the job. + Environment *RuntimeEnvironment `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"` + // If set, replace the existing pipeline with the name specified by jobName + // with this pipeline, preserving state. + Update bool `protobuf:"varint,4,opt,name=update,proto3" json:"update,omitempty"` + // Only applicable when updating a pipeline. Map of transform name prefixes of + // the job to be replaced to the corresponding name prefixes of the new job. + TransformNameMapping map[string]string `protobuf:"bytes,5,rep,name=transform_name_mapping,json=transformNameMapping,proto3" json:"transform_name_mapping,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *LaunchTemplateParameters) Reset() { + *x = LaunchTemplateParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchTemplateParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchTemplateParameters) ProtoMessage() {} + +func (x *LaunchTemplateParameters) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LaunchTemplateParameters.ProtoReflect.Descriptor instead. +func (*LaunchTemplateParameters) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{13} +} + +func (x *LaunchTemplateParameters) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (x *LaunchTemplateParameters) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *LaunchTemplateParameters) GetEnvironment() *RuntimeEnvironment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *LaunchTemplateParameters) GetUpdate() bool { + if x != nil { + return x.Update + } + return false +} + +func (x *LaunchTemplateParameters) GetTransformNameMapping() map[string]string { + if x != nil { + return x.TransformNameMapping + } + return nil +} + +// A request to launch a template. +type LaunchTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The ID of the Cloud Platform project that the job belongs to. + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // If true, the request is validated but not actually executed. + // Defaults to false. + ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` + // The template from which to create the job. + // + // Types that are assignable to Template: + // + // *LaunchTemplateRequest_GcsPath + // *LaunchTemplateRequest_DynamicTemplate + Template isLaunchTemplateRequest_Template `protobuf_oneof:"template"` + // The parameters of the template to launch. This should be part of the + // body of the POST request. + LaunchParameters *LaunchTemplateParameters `protobuf:"bytes,4,opt,name=launch_parameters,json=launchParameters,proto3" json:"launch_parameters,omitempty"` + // The [regional endpoint] + // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to + // which to direct the request. + Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *LaunchTemplateRequest) Reset() { + *x = LaunchTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchTemplateRequest) ProtoMessage() {} + +func (x *LaunchTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LaunchTemplateRequest.ProtoReflect.Descriptor instead. +func (*LaunchTemplateRequest) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{14} +} + +func (x *LaunchTemplateRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *LaunchTemplateRequest) GetValidateOnly() bool { + if x != nil { + return x.ValidateOnly + } + return false +} + +func (m *LaunchTemplateRequest) GetTemplate() isLaunchTemplateRequest_Template { + if m != nil { + return m.Template + } + return nil +} + +func (x *LaunchTemplateRequest) GetGcsPath() string { + if x, ok := x.GetTemplate().(*LaunchTemplateRequest_GcsPath); ok { + return x.GcsPath + } + return "" +} + +func (x *LaunchTemplateRequest) GetDynamicTemplate() *DynamicTemplateLaunchParams { + if x, ok := x.GetTemplate().(*LaunchTemplateRequest_DynamicTemplate); ok { + return x.DynamicTemplate + } + return nil +} + +func (x *LaunchTemplateRequest) GetLaunchParameters() *LaunchTemplateParameters { + if x != nil { + return x.LaunchParameters + } + return nil +} + +func (x *LaunchTemplateRequest) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +type isLaunchTemplateRequest_Template interface { + isLaunchTemplateRequest_Template() +} + +type LaunchTemplateRequest_GcsPath struct { + // A Cloud Storage path to the template from which to create + // the job. + // Must be valid Cloud Storage URL, beginning with 'gs://'. + GcsPath string `protobuf:"bytes,3,opt,name=gcs_path,json=gcsPath,proto3,oneof"` +} + +type LaunchTemplateRequest_DynamicTemplate struct { + // Params for launching a dynamic template. + DynamicTemplate *DynamicTemplateLaunchParams `protobuf:"bytes,6,opt,name=dynamic_template,json=dynamicTemplate,proto3,oneof"` +} + +func (*LaunchTemplateRequest_GcsPath) isLaunchTemplateRequest_Template() {} + +func (*LaunchTemplateRequest_DynamicTemplate) isLaunchTemplateRequest_Template() {} + +// Response to the request to launch a template. +type LaunchTemplateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The job that was launched, if the request was not a dry run and + // the job was successfully launched. + Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` +} + +func (x *LaunchTemplateResponse) Reset() { + *x = LaunchTemplateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LaunchTemplateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LaunchTemplateResponse) ProtoMessage() {} + +func (x *LaunchTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LaunchTemplateResponse.ProtoReflect.Descriptor instead. +func (*LaunchTemplateResponse) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{15} +} + +func (x *LaunchTemplateResponse) GetJob() *Job { + if x != nil { + return x.Job + } + return nil +} + +// Used in the error_details field of a google.rpc.Status message, this +// indicates problems with the template parameter. +type InvalidTemplateParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Describes all parameter violations in a template request. + ParameterViolations []*InvalidTemplateParameters_ParameterViolation `protobuf:"bytes,1,rep,name=parameter_violations,json=parameterViolations,proto3" json:"parameter_violations,omitempty"` +} + +func (x *InvalidTemplateParameters) Reset() { + *x = InvalidTemplateParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvalidTemplateParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvalidTemplateParameters) ProtoMessage() {} + +func (x *InvalidTemplateParameters) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvalidTemplateParameters.ProtoReflect.Descriptor instead. +func (*InvalidTemplateParameters) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{16} +} + +func (x *InvalidTemplateParameters) GetParameterViolations() []*InvalidTemplateParameters_ParameterViolation { + if x != nil { + return x.ParameterViolations + } + return nil +} + +// Params which should be passed when launching a dynamic template. +type DynamicTemplateLaunchParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path to dynamic template spec file on Cloud Storage. + // The file must be a Json serialized DynamicTemplateFieSpec object. + GcsPath string `protobuf:"bytes,1,opt,name=gcs_path,json=gcsPath,proto3" json:"gcs_path,omitempty"` + // Cloud Storage path for staging dependencies. + // Must be a valid Cloud Storage URL, beginning with `gs://`. + StagingLocation string `protobuf:"bytes,2,opt,name=staging_location,json=stagingLocation,proto3" json:"staging_location,omitempty"` +} + +func (x *DynamicTemplateLaunchParams) Reset() { + *x = DynamicTemplateLaunchParams{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DynamicTemplateLaunchParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DynamicTemplateLaunchParams) ProtoMessage() {} + +func (x *DynamicTemplateLaunchParams) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DynamicTemplateLaunchParams.ProtoReflect.Descriptor instead. +func (*DynamicTemplateLaunchParams) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{17} +} + +func (x *DynamicTemplateLaunchParams) GetGcsPath() string { + if x != nil { + return x.GcsPath + } + return "" +} + +func (x *DynamicTemplateLaunchParams) GetStagingLocation() string { + if x != nil { + return x.StagingLocation + } + return "" +} + +// A specific template-parameter violation. +type InvalidTemplateParameters_ParameterViolation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The parameter that failed to validate. + Parameter string `protobuf:"bytes,1,opt,name=parameter,proto3" json:"parameter,omitempty"` + // A description of why the parameter failed to validate. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *InvalidTemplateParameters_ParameterViolation) Reset() { + *x = InvalidTemplateParameters_ParameterViolation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvalidTemplateParameters_ParameterViolation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvalidTemplateParameters_ParameterViolation) ProtoMessage() {} + +func (x *InvalidTemplateParameters_ParameterViolation) ProtoReflect() protoreflect.Message { + mi := &file_google_dataflow_v1beta3_templates_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvalidTemplateParameters_ParameterViolation.ProtoReflect.Descriptor instead. +func (*InvalidTemplateParameters_ParameterViolation) Descriptor() ([]byte, []int) { + return file_google_dataflow_v1beta3_templates_proto_rawDescGZIP(), []int{16, 0} +} + +func (x *InvalidTemplateParameters_ParameterViolation) GetParameter() string { + if x != nil { + return x.Parameter + } + return "" +} + +func (x *InvalidTemplateParameters_ParameterViolation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +var File_google_dataflow_v1beta3_templates_proto protoreflect.FileDescriptor + +var file_google_dataflow_v1beta3_templates_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2f, 0x6a, 0x6f, + 0x62, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x4c, 0x0a, 0x1a, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2e, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, + 0x93, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, + 0x0a, 0x08, 0x73, 0x64, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x44, 0x4b, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x07, 0x73, 0x64, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x68, 0x0a, 0x13, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xec, 0x06, 0x0a, 0x1b, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, + 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x4f, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x37, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x5f, 0x67, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, + 0x70, 0x65, 0x63, 0x47, 0x63, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x64, 0x0a, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, + 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x6e, 0x0a, 0x0e, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x4c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0d, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x59, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x17, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, + 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x3d, 0x0a, + 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, + 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x48, + 0x0a, 0x1a, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x22, 0x89, 0x0a, 0x0a, 0x1e, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, + 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, + 0x61, 0x78, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x32, 0x0a, + 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6d, 0x61, 0x69, + 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x61, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, + 0x62, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x87, 0x01, 0x0a, 0x16, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, + 0x73, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x6d, 0x73, 0x4b, + 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x60, 0x0a, 0x10, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, + 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, + 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x36, + 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x6c, 0x65, 0x78, 0x72, 0x73, + 0x5f, 0x67, 0x6f, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x46, 0x6c, 0x65, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x47, 0x6f, 0x61, 0x6c, + 0x52, 0x0a, 0x66, 0x6c, 0x65, 0x78, 0x72, 0x73, 0x47, 0x6f, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, + 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x64, 0x6b, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x64, 0x6b, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x6b, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x62, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, + 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x62, 0x0a, 0x15, 0x61, 0x75, 0x74, + 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x73, 0x63, 0x61, + 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x27, 0x0a, + 0x10, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x6f, 0x6e, 0x5f, 0x6f, 0x6f, + 0x6d, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x64, 0x75, 0x6d, 0x70, 0x48, 0x65, 0x61, + 0x70, 0x4f, 0x6e, 0x4f, 0x6f, 0x6d, 0x12, 0x3b, 0x0a, 0x1b, 0x73, 0x61, 0x76, 0x65, 0x5f, 0x68, + 0x65, 0x61, 0x70, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x63, 0x73, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x73, 0x61, 0x76, + 0x65, 0x48, 0x65, 0x61, 0x70, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x54, 0x6f, 0x47, 0x63, 0x73, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x5f, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x47, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xdc, 0x01, 0x0a, 0x19, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x5f, 0x0a, + 0x10, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, + 0xdc, 0x06, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x77, 0x6f, + 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x75, 0x6d, + 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x77, + 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, + 0x78, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x7a, 0x6f, 0x6e, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x32, 0x0a, 0x15, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x1a, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x5f, + 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x64, 0x69, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x62, 0x79, 0x70, 0x61, 0x73, + 0x73, 0x54, 0x65, 0x6d, 0x70, 0x44, 0x69, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x7b, 0x0a, 0x16, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x73, + 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, 0x6d, 0x73, 0x4b, 0x65, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x60, 0x0a, 0x10, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, + 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x36, 0x0a, + 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x1a, 0x47, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x88, + 0x03, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1b, + 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x54, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, + 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x67, 0x65, 0x78, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, + 0x65, 0x67, 0x65, 0x78, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x67, 0x0a, + 0x0f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x41, 0x0a, 0x13, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x01, 0x0a, 0x10, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x22, 0x99, 0x01, 0x0a, 0x07, 0x53, 0x44, 0x4b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x45, 0x0a, 0x08, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x44, 0x4b, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2d, 0x0a, + 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0x9a, 0x01, 0x0a, + 0x0f, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x64, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x53, 0x44, 0x4b, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x73, 0x64, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x1c, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x67, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, 0x63, 0x73, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x65, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xe9, + 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x08, 0x67, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, 0x63, 0x73, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x4c, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x21, 0x0a, 0x0c, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x69, 0x65, 0x77, 0x12, 0x11, 0x0a, 0x0d, 0x4d, + 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x00, 0x42, 0x0a, + 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xf0, 0x02, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x45, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5e, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x31, 0x0a, 0x0c, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, + 0x59, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x4c, 0x45, 0x58, 0x10, 0x02, 0x22, 0x8b, 0x04, + 0x0a, 0x18, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, + 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, + 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x61, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x81, 0x01, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x4b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, + 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, + 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x1a, 0x3d, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e, + 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe3, 0x02, 0x0a, 0x15, + 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x08, 0x67, 0x63, 0x73, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x67, + 0x63, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x61, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x6c, 0x61, 0x75, + 0x6e, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x10, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x22, 0x48, 0x0a, 0x16, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x03, 0x6a, + 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0xeb, 0x01, 0x0a, 0x19, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x78, 0x0a, 0x14, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x33, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x54, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x1b, 0x44, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x75, 0x6e, + 0x63, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x63, 0x73, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x63, 0x73, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, + 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0xce, + 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x43, 0x53, 0x5f, 0x52, + 0x45, 0x41, 0x44, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, + 0x47, 0x43, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, + 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x43, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x46, + 0x49, 0x4c, 0x45, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x43, 0x53, 0x5f, 0x57, 0x52, 0x49, + 0x54, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x43, 0x53, + 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x46, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x10, 0x06, 0x12, 0x14, + 0x0a, 0x10, 0x47, 0x43, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x46, 0x4f, 0x4c, 0x44, + 0x45, 0x52, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x55, 0x42, 0x53, 0x55, 0x42, 0x5f, 0x54, + 0x4f, 0x50, 0x49, 0x43, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x55, 0x42, 0x53, 0x55, 0x42, + 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x32, + 0xc2, 0x07, 0x0a, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0xdf, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x6f, 0x62, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, + 0x4a, 0x6f, 0x62, 0x22, 0x71, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6b, 0x22, 0x3a, 0x2f, 0x76, 0x31, + 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x5a, 0x2a, 0x22, 0x25, 0x2f, 0x76, + 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x94, 0x02, 0x0a, 0x0e, 0x4c, 0x61, 0x75, 0x6e, 0x63, + 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x99, 0x01, 0x22, 0x41, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x3a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x3a, 0x11, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5a, 0x41, 0x22, 0x2c, 0x2f, 0x76, + 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x3a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x3a, 0x11, 0x6c, 0x61, 0x75, 0x6e, + 0x63, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0xdd, 0x01, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6d, + 0x12, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x67, 0x65, 0x74, + 0x5a, 0x2b, 0x12, 0x29, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x67, 0x65, 0x74, 0x1a, 0xd4, 0x01, + 0xca, 0x41, 0x17, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xb6, 0x01, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x32, 0xbf, 0x03, 0x0a, 0x14, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xcf, 0x01, + 0x0a, 0x12, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x2e, 0x4c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x33, 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x46, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x22, 0x45, 0x2f, 0x76, 0x31, 0x62, 0x33, 0x2f, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x66, 0x6c, 0x65, 0x78, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x3a, 0x01, 0x2a, 0x1a, + 0xd4, 0x01, 0xca, 0x41, 0x17, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0xb6, 0x01, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x2e, 0x72, + 0x65, 0x61, 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, + 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0xd3, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x42, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, + 0x3b, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0xaa, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x33, 0xca, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6c, 0x6f, + 0x77, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0xea, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x66, + 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x33, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_dataflow_v1beta3_templates_proto_rawDescOnce sync.Once + file_google_dataflow_v1beta3_templates_proto_rawDescData = file_google_dataflow_v1beta3_templates_proto_rawDesc +) + +func file_google_dataflow_v1beta3_templates_proto_rawDescGZIP() []byte { + file_google_dataflow_v1beta3_templates_proto_rawDescOnce.Do(func() { + file_google_dataflow_v1beta3_templates_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_dataflow_v1beta3_templates_proto_rawDescData) + }) + return file_google_dataflow_v1beta3_templates_proto_rawDescData +} + +var file_google_dataflow_v1beta3_templates_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_google_dataflow_v1beta3_templates_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_google_dataflow_v1beta3_templates_proto_goTypes = []interface{}{ + (ParameterType)(0), // 0: google.dataflow.v1beta3.ParameterType + (SDKInfo_Language)(0), // 1: google.dataflow.v1beta3.SDKInfo.Language + (GetTemplateRequest_TemplateView)(0), // 2: google.dataflow.v1beta3.GetTemplateRequest.TemplateView + (GetTemplateResponse_TemplateType)(0), // 3: google.dataflow.v1beta3.GetTemplateResponse.TemplateType + (*LaunchFlexTemplateResponse)(nil), // 4: google.dataflow.v1beta3.LaunchFlexTemplateResponse + (*ContainerSpec)(nil), // 5: google.dataflow.v1beta3.ContainerSpec + (*LaunchFlexTemplateParameter)(nil), // 6: google.dataflow.v1beta3.LaunchFlexTemplateParameter + (*FlexTemplateRuntimeEnvironment)(nil), // 7: google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment + (*LaunchFlexTemplateRequest)(nil), // 8: google.dataflow.v1beta3.LaunchFlexTemplateRequest + (*RuntimeEnvironment)(nil), // 9: google.dataflow.v1beta3.RuntimeEnvironment + (*ParameterMetadata)(nil), // 10: google.dataflow.v1beta3.ParameterMetadata + (*TemplateMetadata)(nil), // 11: google.dataflow.v1beta3.TemplateMetadata + (*SDKInfo)(nil), // 12: google.dataflow.v1beta3.SDKInfo + (*RuntimeMetadata)(nil), // 13: google.dataflow.v1beta3.RuntimeMetadata + (*CreateJobFromTemplateRequest)(nil), // 14: google.dataflow.v1beta3.CreateJobFromTemplateRequest + (*GetTemplateRequest)(nil), // 15: google.dataflow.v1beta3.GetTemplateRequest + (*GetTemplateResponse)(nil), // 16: google.dataflow.v1beta3.GetTemplateResponse + (*LaunchTemplateParameters)(nil), // 17: google.dataflow.v1beta3.LaunchTemplateParameters + (*LaunchTemplateRequest)(nil), // 18: google.dataflow.v1beta3.LaunchTemplateRequest + (*LaunchTemplateResponse)(nil), // 19: google.dataflow.v1beta3.LaunchTemplateResponse + (*InvalidTemplateParameters)(nil), // 20: google.dataflow.v1beta3.InvalidTemplateParameters + (*DynamicTemplateLaunchParams)(nil), // 21: google.dataflow.v1beta3.DynamicTemplateLaunchParams + nil, // 22: google.dataflow.v1beta3.LaunchFlexTemplateParameter.ParametersEntry + nil, // 23: google.dataflow.v1beta3.LaunchFlexTemplateParameter.LaunchOptionsEntry + nil, // 24: google.dataflow.v1beta3.LaunchFlexTemplateParameter.TransformNameMappingsEntry + nil, // 25: google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.AdditionalUserLabelsEntry + nil, // 26: google.dataflow.v1beta3.RuntimeEnvironment.AdditionalUserLabelsEntry + nil, // 27: google.dataflow.v1beta3.ParameterMetadata.CustomMetadataEntry + nil, // 28: google.dataflow.v1beta3.CreateJobFromTemplateRequest.ParametersEntry + nil, // 29: google.dataflow.v1beta3.LaunchTemplateParameters.ParametersEntry + nil, // 30: google.dataflow.v1beta3.LaunchTemplateParameters.TransformNameMappingEntry + (*InvalidTemplateParameters_ParameterViolation)(nil), // 31: google.dataflow.v1beta3.InvalidTemplateParameters.ParameterViolation + (*Job)(nil), // 32: google.dataflow.v1beta3.Job + (WorkerIPAddressConfiguration)(0), // 33: google.dataflow.v1beta3.WorkerIPAddressConfiguration + (FlexResourceSchedulingGoal)(0), // 34: google.dataflow.v1beta3.FlexResourceSchedulingGoal + (AutoscalingAlgorithm)(0), // 35: google.dataflow.v1beta3.AutoscalingAlgorithm + (*status.Status)(nil), // 36: google.rpc.Status +} +var file_google_dataflow_v1beta3_templates_proto_depIdxs = []int32{ + 32, // 0: google.dataflow.v1beta3.LaunchFlexTemplateResponse.job:type_name -> google.dataflow.v1beta3.Job + 11, // 1: google.dataflow.v1beta3.ContainerSpec.metadata:type_name -> google.dataflow.v1beta3.TemplateMetadata + 12, // 2: google.dataflow.v1beta3.ContainerSpec.sdk_info:type_name -> google.dataflow.v1beta3.SDKInfo + 7, // 3: google.dataflow.v1beta3.ContainerSpec.default_environment:type_name -> google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment + 5, // 4: google.dataflow.v1beta3.LaunchFlexTemplateParameter.container_spec:type_name -> google.dataflow.v1beta3.ContainerSpec + 22, // 5: google.dataflow.v1beta3.LaunchFlexTemplateParameter.parameters:type_name -> google.dataflow.v1beta3.LaunchFlexTemplateParameter.ParametersEntry + 23, // 6: google.dataflow.v1beta3.LaunchFlexTemplateParameter.launch_options:type_name -> google.dataflow.v1beta3.LaunchFlexTemplateParameter.LaunchOptionsEntry + 7, // 7: google.dataflow.v1beta3.LaunchFlexTemplateParameter.environment:type_name -> google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment + 24, // 8: google.dataflow.v1beta3.LaunchFlexTemplateParameter.transform_name_mappings:type_name -> google.dataflow.v1beta3.LaunchFlexTemplateParameter.TransformNameMappingsEntry + 25, // 9: google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.additional_user_labels:type_name -> google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.AdditionalUserLabelsEntry + 33, // 10: google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.ip_configuration:type_name -> google.dataflow.v1beta3.WorkerIPAddressConfiguration + 34, // 11: google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.flexrs_goal:type_name -> google.dataflow.v1beta3.FlexResourceSchedulingGoal + 35, // 12: google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.autoscaling_algorithm:type_name -> google.dataflow.v1beta3.AutoscalingAlgorithm + 6, // 13: google.dataflow.v1beta3.LaunchFlexTemplateRequest.launch_parameter:type_name -> google.dataflow.v1beta3.LaunchFlexTemplateParameter + 26, // 14: google.dataflow.v1beta3.RuntimeEnvironment.additional_user_labels:type_name -> google.dataflow.v1beta3.RuntimeEnvironment.AdditionalUserLabelsEntry + 33, // 15: google.dataflow.v1beta3.RuntimeEnvironment.ip_configuration:type_name -> google.dataflow.v1beta3.WorkerIPAddressConfiguration + 0, // 16: google.dataflow.v1beta3.ParameterMetadata.param_type:type_name -> google.dataflow.v1beta3.ParameterType + 27, // 17: google.dataflow.v1beta3.ParameterMetadata.custom_metadata:type_name -> google.dataflow.v1beta3.ParameterMetadata.CustomMetadataEntry + 10, // 18: google.dataflow.v1beta3.TemplateMetadata.parameters:type_name -> google.dataflow.v1beta3.ParameterMetadata + 1, // 19: google.dataflow.v1beta3.SDKInfo.language:type_name -> google.dataflow.v1beta3.SDKInfo.Language + 12, // 20: google.dataflow.v1beta3.RuntimeMetadata.sdk_info:type_name -> google.dataflow.v1beta3.SDKInfo + 10, // 21: google.dataflow.v1beta3.RuntimeMetadata.parameters:type_name -> google.dataflow.v1beta3.ParameterMetadata + 28, // 22: google.dataflow.v1beta3.CreateJobFromTemplateRequest.parameters:type_name -> google.dataflow.v1beta3.CreateJobFromTemplateRequest.ParametersEntry + 9, // 23: google.dataflow.v1beta3.CreateJobFromTemplateRequest.environment:type_name -> google.dataflow.v1beta3.RuntimeEnvironment + 2, // 24: google.dataflow.v1beta3.GetTemplateRequest.view:type_name -> google.dataflow.v1beta3.GetTemplateRequest.TemplateView + 36, // 25: google.dataflow.v1beta3.GetTemplateResponse.status:type_name -> google.rpc.Status + 11, // 26: google.dataflow.v1beta3.GetTemplateResponse.metadata:type_name -> google.dataflow.v1beta3.TemplateMetadata + 3, // 27: google.dataflow.v1beta3.GetTemplateResponse.template_type:type_name -> google.dataflow.v1beta3.GetTemplateResponse.TemplateType + 13, // 28: google.dataflow.v1beta3.GetTemplateResponse.runtime_metadata:type_name -> google.dataflow.v1beta3.RuntimeMetadata + 29, // 29: google.dataflow.v1beta3.LaunchTemplateParameters.parameters:type_name -> google.dataflow.v1beta3.LaunchTemplateParameters.ParametersEntry + 9, // 30: google.dataflow.v1beta3.LaunchTemplateParameters.environment:type_name -> google.dataflow.v1beta3.RuntimeEnvironment + 30, // 31: google.dataflow.v1beta3.LaunchTemplateParameters.transform_name_mapping:type_name -> google.dataflow.v1beta3.LaunchTemplateParameters.TransformNameMappingEntry + 21, // 32: google.dataflow.v1beta3.LaunchTemplateRequest.dynamic_template:type_name -> google.dataflow.v1beta3.DynamicTemplateLaunchParams + 17, // 33: google.dataflow.v1beta3.LaunchTemplateRequest.launch_parameters:type_name -> google.dataflow.v1beta3.LaunchTemplateParameters + 32, // 34: google.dataflow.v1beta3.LaunchTemplateResponse.job:type_name -> google.dataflow.v1beta3.Job + 31, // 35: google.dataflow.v1beta3.InvalidTemplateParameters.parameter_violations:type_name -> google.dataflow.v1beta3.InvalidTemplateParameters.ParameterViolation + 14, // 36: google.dataflow.v1beta3.TemplatesService.CreateJobFromTemplate:input_type -> google.dataflow.v1beta3.CreateJobFromTemplateRequest + 18, // 37: google.dataflow.v1beta3.TemplatesService.LaunchTemplate:input_type -> google.dataflow.v1beta3.LaunchTemplateRequest + 15, // 38: google.dataflow.v1beta3.TemplatesService.GetTemplate:input_type -> google.dataflow.v1beta3.GetTemplateRequest + 8, // 39: google.dataflow.v1beta3.FlexTemplatesService.LaunchFlexTemplate:input_type -> google.dataflow.v1beta3.LaunchFlexTemplateRequest + 32, // 40: google.dataflow.v1beta3.TemplatesService.CreateJobFromTemplate:output_type -> google.dataflow.v1beta3.Job + 19, // 41: google.dataflow.v1beta3.TemplatesService.LaunchTemplate:output_type -> google.dataflow.v1beta3.LaunchTemplateResponse + 16, // 42: google.dataflow.v1beta3.TemplatesService.GetTemplate:output_type -> google.dataflow.v1beta3.GetTemplateResponse + 4, // 43: google.dataflow.v1beta3.FlexTemplatesService.LaunchFlexTemplate:output_type -> google.dataflow.v1beta3.LaunchFlexTemplateResponse + 40, // [40:44] is the sub-list for method output_type + 36, // [36:40] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name +} + +func init() { file_google_dataflow_v1beta3_templates_proto_init() } +func file_google_dataflow_v1beta3_templates_proto_init() { + if File_google_dataflow_v1beta3_templates_proto != nil { + return + } + file_google_dataflow_v1beta3_environment_proto_init() + file_google_dataflow_v1beta3_jobs_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_dataflow_v1beta3_templates_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchFlexTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchFlexTemplateParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlexTemplateRuntimeEnvironment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchFlexTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuntimeEnvironment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParameterMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TemplateMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SDKInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RuntimeMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateJobFromTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchTemplateParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LaunchTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvalidTemplateParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DynamicTemplateLaunchParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvalidTemplateParameters_ParameterViolation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*LaunchFlexTemplateParameter_ContainerSpec)(nil), + (*LaunchFlexTemplateParameter_ContainerSpecGcsPath)(nil), + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*CreateJobFromTemplateRequest_GcsPath)(nil), + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*GetTemplateRequest_GcsPath)(nil), + } + file_google_dataflow_v1beta3_templates_proto_msgTypes[14].OneofWrappers = []interface{}{ + (*LaunchTemplateRequest_GcsPath)(nil), + (*LaunchTemplateRequest_DynamicTemplate)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_dataflow_v1beta3_templates_proto_rawDesc, + NumEnums: 4, + NumMessages: 28, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_google_dataflow_v1beta3_templates_proto_goTypes, + DependencyIndexes: file_google_dataflow_v1beta3_templates_proto_depIdxs, + EnumInfos: file_google_dataflow_v1beta3_templates_proto_enumTypes, + MessageInfos: file_google_dataflow_v1beta3_templates_proto_msgTypes, + }.Build() + File_google_dataflow_v1beta3_templates_proto = out.File + file_google_dataflow_v1beta3_templates_proto_rawDesc = nil + file_google_dataflow_v1beta3_templates_proto_goTypes = nil + file_google_dataflow_v1beta3_templates_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// TemplatesServiceClient is the client API for TemplatesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TemplatesServiceClient interface { + // Creates a Cloud Dataflow job from a template. + CreateJobFromTemplate(ctx context.Context, in *CreateJobFromTemplateRequest, opts ...grpc.CallOption) (*Job, error) + // Launch a template. + LaunchTemplate(ctx context.Context, in *LaunchTemplateRequest, opts ...grpc.CallOption) (*LaunchTemplateResponse, error) + // Get the template associated with a template. + GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) +} + +type templatesServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTemplatesServiceClient(cc grpc.ClientConnInterface) TemplatesServiceClient { + return &templatesServiceClient{cc} +} + +func (c *templatesServiceClient) CreateJobFromTemplate(ctx context.Context, in *CreateJobFromTemplateRequest, opts ...grpc.CallOption) (*Job, error) { + out := new(Job) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.TemplatesService/CreateJobFromTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *templatesServiceClient) LaunchTemplate(ctx context.Context, in *LaunchTemplateRequest, opts ...grpc.CallOption) (*LaunchTemplateResponse, error) { + out := new(LaunchTemplateResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.TemplatesService/LaunchTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *templatesServiceClient) GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) { + out := new(GetTemplateResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.TemplatesService/GetTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TemplatesServiceServer is the server API for TemplatesService service. +type TemplatesServiceServer interface { + // Creates a Cloud Dataflow job from a template. + CreateJobFromTemplate(context.Context, *CreateJobFromTemplateRequest) (*Job, error) + // Launch a template. + LaunchTemplate(context.Context, *LaunchTemplateRequest) (*LaunchTemplateResponse, error) + // Get the template associated with a template. + GetTemplate(context.Context, *GetTemplateRequest) (*GetTemplateResponse, error) +} + +// UnimplementedTemplatesServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTemplatesServiceServer struct { +} + +func (*UnimplementedTemplatesServiceServer) CreateJobFromTemplate(context.Context, *CreateJobFromTemplateRequest) (*Job, error) { + return nil, status1.Errorf(codes.Unimplemented, "method CreateJobFromTemplate not implemented") +} +func (*UnimplementedTemplatesServiceServer) LaunchTemplate(context.Context, *LaunchTemplateRequest) (*LaunchTemplateResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method LaunchTemplate not implemented") +} +func (*UnimplementedTemplatesServiceServer) GetTemplate(context.Context, *GetTemplateRequest) (*GetTemplateResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method GetTemplate not implemented") +} + +func RegisterTemplatesServiceServer(s *grpc.Server, srv TemplatesServiceServer) { + s.RegisterService(&_TemplatesService_serviceDesc, srv) +} + +func _TemplatesService_CreateJobFromTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateJobFromTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TemplatesServiceServer).CreateJobFromTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.TemplatesService/CreateJobFromTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TemplatesServiceServer).CreateJobFromTemplate(ctx, req.(*CreateJobFromTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TemplatesService_LaunchTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LaunchTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TemplatesServiceServer).LaunchTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.TemplatesService/LaunchTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TemplatesServiceServer).LaunchTemplate(ctx, req.(*LaunchTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TemplatesService_GetTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TemplatesServiceServer).GetTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.TemplatesService/GetTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TemplatesServiceServer).GetTemplate(ctx, req.(*GetTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _TemplatesService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.dataflow.v1beta3.TemplatesService", + HandlerType: (*TemplatesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateJobFromTemplate", + Handler: _TemplatesService_CreateJobFromTemplate_Handler, + }, + { + MethodName: "LaunchTemplate", + Handler: _TemplatesService_LaunchTemplate_Handler, + }, + { + MethodName: "GetTemplate", + Handler: _TemplatesService_GetTemplate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/dataflow/v1beta3/templates.proto", +} + +// FlexTemplatesServiceClient is the client API for FlexTemplatesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FlexTemplatesServiceClient interface { + // Launch a job with a FlexTemplate. + LaunchFlexTemplate(ctx context.Context, in *LaunchFlexTemplateRequest, opts ...grpc.CallOption) (*LaunchFlexTemplateResponse, error) +} + +type flexTemplatesServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFlexTemplatesServiceClient(cc grpc.ClientConnInterface) FlexTemplatesServiceClient { + return &flexTemplatesServiceClient{cc} +} + +func (c *flexTemplatesServiceClient) LaunchFlexTemplate(ctx context.Context, in *LaunchFlexTemplateRequest, opts ...grpc.CallOption) (*LaunchFlexTemplateResponse, error) { + out := new(LaunchFlexTemplateResponse) + err := c.cc.Invoke(ctx, "/google.dataflow.v1beta3.FlexTemplatesService/LaunchFlexTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FlexTemplatesServiceServer is the server API for FlexTemplatesService service. +type FlexTemplatesServiceServer interface { + // Launch a job with a FlexTemplate. + LaunchFlexTemplate(context.Context, *LaunchFlexTemplateRequest) (*LaunchFlexTemplateResponse, error) +} + +// UnimplementedFlexTemplatesServiceServer can be embedded to have forward compatible implementations. +type UnimplementedFlexTemplatesServiceServer struct { +} + +func (*UnimplementedFlexTemplatesServiceServer) LaunchFlexTemplate(context.Context, *LaunchFlexTemplateRequest) (*LaunchFlexTemplateResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method LaunchFlexTemplate not implemented") +} + +func RegisterFlexTemplatesServiceServer(s *grpc.Server, srv FlexTemplatesServiceServer) { + s.RegisterService(&_FlexTemplatesService_serviceDesc, srv) +} + +func _FlexTemplatesService_LaunchFlexTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LaunchFlexTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlexTemplatesServiceServer).LaunchFlexTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.dataflow.v1beta3.FlexTemplatesService/LaunchFlexTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlexTemplatesServiceServer).LaunchFlexTemplate(ctx, req.(*LaunchFlexTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _FlexTemplatesService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.dataflow.v1beta3.FlexTemplatesService", + HandlerType: (*FlexTemplatesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "LaunchFlexTemplate", + Handler: _FlexTemplatesService_LaunchFlexTemplate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/dataflow/v1beta3/templates.proto", +} diff --git a/dataflow/apiv1beta3/doc.go b/dataflow/apiv1beta3/doc.go index 3895a70c8bc8..306f256b17a4 100644 --- a/dataflow/apiv1beta3/doc.go +++ b/dataflow/apiv1beta3/doc.go @@ -19,47 +19,58 @@ // // Manages Google Cloud Dataflow projects on Google Cloud Platform. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &dataflowpb.GetSnapshotRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/dataflow/v1beta3#GetSnapshotRequest. -// } -// resp, err := c.GetSnapshot(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dataflowpb.GetSnapshotRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/dataflow/v1beta3#GetSnapshotRequest. +// } +// resp, err := c.GetSnapshot(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewSnapshotsV1Beta3Client is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/dataflow/apiv1beta3/flex_templates_client.go b/dataflow/apiv1beta3/flex_templates_client.go index 3758cbecf3cf..989aca945ead 100644 --- a/dataflow/apiv1beta3/flex_templates_client.go +++ b/dataflow/apiv1beta3/flex_templates_client.go @@ -105,7 +105,8 @@ func (c *FlexTemplatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FlexTemplatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -175,7 +176,8 @@ func NewFlexTemplatesClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *flexTemplatesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -259,7 +261,7 @@ func (c *flexTemplatesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *flexTemplatesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/dataflow/apiv1beta3/flex_templates_client_example_test.go b/dataflow/apiv1beta3/flex_templates_client_example_test.go index 436d5940a7b2..fb1f19a7100b 100644 --- a/dataflow/apiv1beta3/flex_templates_client_example_test.go +++ b/dataflow/apiv1beta3/flex_templates_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewFlexTemplatesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewFlexTemplatesClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewFlexTemplatesClient() { func ExampleNewFlexTemplatesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewFlexTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewFlexTemplatesRESTClient() { func ExampleFlexTemplatesClient_LaunchFlexTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewFlexTemplatesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataflow/apiv1beta3/jobs_v1_beta3_client.go b/dataflow/apiv1beta3/jobs_v1_beta3_client.go index f5e99e8f7dfb..2231f61f5da4 100644 --- a/dataflow/apiv1beta3/jobs_v1_beta3_client.go +++ b/dataflow/apiv1beta3/jobs_v1_beta3_client.go @@ -133,7 +133,8 @@ func (c *JobsV1Beta3Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *JobsV1Beta3Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -259,7 +260,8 @@ func NewJobsV1Beta3Client(ctx context.Context, opts ...option.ClientOption) (*Jo // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *jobsV1Beta3GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -344,7 +346,7 @@ func (c *jobsV1Beta3RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *jobsV1Beta3RESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/dataflow/apiv1beta3/jobs_v1_beta3_client_example_test.go b/dataflow/apiv1beta3/jobs_v1_beta3_client_example_test.go index 8ff7c00f8cef..b451749e3dfe 100644 --- a/dataflow/apiv1beta3/jobs_v1_beta3_client_example_test.go +++ b/dataflow/apiv1beta3/jobs_v1_beta3_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewJobsV1Beta3Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewJobsV1Beta3Client() { func ExampleNewJobsV1Beta3RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewJobsV1Beta3RESTClient() { func ExampleJobsV1Beta3Client_CreateJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleJobsV1Beta3Client_CreateJob() { func ExampleJobsV1Beta3Client_GetJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -90,6 +110,11 @@ func ExampleJobsV1Beta3Client_GetJob() { func ExampleJobsV1Beta3Client_UpdateJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +135,11 @@ func ExampleJobsV1Beta3Client_UpdateJob() { func ExampleJobsV1Beta3Client_ListJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -136,6 +166,11 @@ func ExampleJobsV1Beta3Client_ListJobs() { func ExampleJobsV1Beta3Client_AggregatedListJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +197,11 @@ func ExampleJobsV1Beta3Client_AggregatedListJobs() { func ExampleJobsV1Beta3Client_CheckActiveJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -182,6 +222,11 @@ func ExampleJobsV1Beta3Client_CheckActiveJobs() { func ExampleJobsV1Beta3Client_SnapshotJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewJobsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. diff --git a/dataflow/apiv1beta3/messages_v1_beta3_client.go b/dataflow/apiv1beta3/messages_v1_beta3_client.go index 4c144a458ba2..4f20837b0f44 100644 --- a/dataflow/apiv1beta3/messages_v1_beta3_client.go +++ b/dataflow/apiv1beta3/messages_v1_beta3_client.go @@ -107,7 +107,8 @@ func (c *MessagesV1Beta3Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MessagesV1Beta3Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -184,7 +185,8 @@ func NewMessagesV1Beta3Client(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *messagesV1Beta3GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -269,7 +271,7 @@ func (c *messagesV1Beta3RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *messagesV1Beta3RESTClient) Connection() *grpc.ClientConn { return nil } @@ -346,11 +348,12 @@ func (c *messagesV1Beta3RESTClient) ListJobMessages(ctx context.Context, req *da baseUrl.Path += fmt.Sprintf("/v1b3/projects/%v/locations/%v/jobs/%v/messages", req.GetProjectId(), req.GetLocation(), req.GetJobId()) params := url.Values{} - if req.GetEndTime().GetNanos() != 0 { - params.Add("endTime.nanos", fmt.Sprintf("%v", req.GetEndTime().GetNanos())) - } - if req.GetEndTime().GetSeconds() != 0 { - params.Add("endTime.seconds", fmt.Sprintf("%v", req.GetEndTime().GetSeconds())) + if req.GetEndTime() != nil { + endTime, err := protojson.Marshal(req.GetEndTime()) + if err != nil { + return nil, "", err + } + params.Add("endTime", string(endTime)) } if req.GetMinimumImportance() != 0 { params.Add("minimumImportance", fmt.Sprintf("%v", req.GetMinimumImportance())) @@ -361,11 +364,12 @@ func (c *messagesV1Beta3RESTClient) ListJobMessages(ctx context.Context, req *da if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } - if req.GetStartTime().GetNanos() != 0 { - params.Add("startTime.nanos", fmt.Sprintf("%v", req.GetStartTime().GetNanos())) - } - if req.GetStartTime().GetSeconds() != 0 { - params.Add("startTime.seconds", fmt.Sprintf("%v", req.GetStartTime().GetSeconds())) + if req.GetStartTime() != nil { + startTime, err := protojson.Marshal(req.GetStartTime()) + if err != nil { + return nil, "", err + } + params.Add("startTime", string(startTime)) } baseUrl.RawQuery = params.Encode() diff --git a/dataflow/apiv1beta3/messages_v1_beta3_client_example_test.go b/dataflow/apiv1beta3/messages_v1_beta3_client_example_test.go index 3a5a3b2d803e..bdbd2f141694 100644 --- a/dataflow/apiv1beta3/messages_v1_beta3_client_example_test.go +++ b/dataflow/apiv1beta3/messages_v1_beta3_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewMessagesV1Beta3Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMessagesV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewMessagesV1Beta3Client() { func ExampleNewMessagesV1Beta3RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMessagesV1Beta3RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewMessagesV1Beta3RESTClient() { func ExampleMessagesV1Beta3Client_ListJobMessages() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMessagesV1Beta3Client(ctx) if err != nil { // TODO: Handle error. diff --git a/dataflow/apiv1beta3/metrics_v1_beta3_client.go b/dataflow/apiv1beta3/metrics_v1_beta3_client.go index b3a1ac3ca697..b8dc9d5b8379 100644 --- a/dataflow/apiv1beta3/metrics_v1_beta3_client.go +++ b/dataflow/apiv1beta3/metrics_v1_beta3_client.go @@ -116,7 +116,8 @@ func (c *MetricsV1Beta3Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MetricsV1Beta3Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -208,7 +209,8 @@ func NewMetricsV1Beta3Client(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *metricsV1Beta3GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -293,7 +295,7 @@ func (c *metricsV1Beta3RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *metricsV1Beta3RESTClient) Connection() *grpc.ClientConn { return nil } @@ -424,11 +426,12 @@ func (c *metricsV1Beta3RESTClient) GetJobMetrics(ctx context.Context, req *dataf baseUrl.Path += fmt.Sprintf("/v1b3/projects/%v/locations/%v/jobs/%v/metrics", req.GetProjectId(), req.GetLocation(), req.GetJobId()) params := url.Values{} - if req.GetStartTime().GetNanos() != 0 { - params.Add("startTime.nanos", fmt.Sprintf("%v", req.GetStartTime().GetNanos())) - } - if req.GetStartTime().GetSeconds() != 0 { - params.Add("startTime.seconds", fmt.Sprintf("%v", req.GetStartTime().GetSeconds())) + if req.GetStartTime() != nil { + startTime, err := protojson.Marshal(req.GetStartTime()) + if err != nil { + return nil, err + } + params.Add("startTime", string(startTime)) } baseUrl.RawQuery = params.Encode() @@ -592,11 +595,12 @@ func (c *metricsV1Beta3RESTClient) GetStageExecutionDetails(ctx context.Context, baseUrl.Path += fmt.Sprintf("/v1b3/projects/%v/locations/%v/jobs/%v/stages/%v/executionDetails", req.GetProjectId(), req.GetLocation(), req.GetJobId(), req.GetStageId()) params := url.Values{} - if req.GetEndTime().GetNanos() != 0 { - params.Add("endTime.nanos", fmt.Sprintf("%v", req.GetEndTime().GetNanos())) - } - if req.GetEndTime().GetSeconds() != 0 { - params.Add("endTime.seconds", fmt.Sprintf("%v", req.GetEndTime().GetSeconds())) + if req.GetEndTime() != nil { + endTime, err := protojson.Marshal(req.GetEndTime()) + if err != nil { + return nil, "", err + } + params.Add("endTime", string(endTime)) } if req.GetPageSize() != 0 { params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) @@ -604,11 +608,12 @@ func (c *metricsV1Beta3RESTClient) GetStageExecutionDetails(ctx context.Context, if req.GetPageToken() != "" { params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) } - if req.GetStartTime().GetNanos() != 0 { - params.Add("startTime.nanos", fmt.Sprintf("%v", req.GetStartTime().GetNanos())) - } - if req.GetStartTime().GetSeconds() != 0 { - params.Add("startTime.seconds", fmt.Sprintf("%v", req.GetStartTime().GetSeconds())) + if req.GetStartTime() != nil { + startTime, err := protojson.Marshal(req.GetStartTime()) + if err != nil { + return nil, "", err + } + params.Add("startTime", string(startTime)) } baseUrl.RawQuery = params.Encode() diff --git a/dataflow/apiv1beta3/metrics_v1_beta3_client_example_test.go b/dataflow/apiv1beta3/metrics_v1_beta3_client_example_test.go index e4f8e5eeae0b..99d6813005de 100644 --- a/dataflow/apiv1beta3/metrics_v1_beta3_client_example_test.go +++ b/dataflow/apiv1beta3/metrics_v1_beta3_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewMetricsV1Beta3Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMetricsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewMetricsV1Beta3Client() { func ExampleNewMetricsV1Beta3RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMetricsV1Beta3RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewMetricsV1Beta3RESTClient() { func ExampleMetricsV1Beta3Client_GetJobMetrics() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMetricsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -70,6 +85,11 @@ func ExampleMetricsV1Beta3Client_GetJobMetrics() { func ExampleMetricsV1Beta3Client_GetJobExecutionDetails() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMetricsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +116,11 @@ func ExampleMetricsV1Beta3Client_GetJobExecutionDetails() { func ExampleMetricsV1Beta3Client_GetStageExecutionDetails() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewMetricsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. diff --git a/dataflow/apiv1beta3/snapshots_v1_beta3_client.go b/dataflow/apiv1beta3/snapshots_v1_beta3_client.go index 9081bd5b14d8..90e959d98aa2 100644 --- a/dataflow/apiv1beta3/snapshots_v1_beta3_client.go +++ b/dataflow/apiv1beta3/snapshots_v1_beta3_client.go @@ -113,7 +113,8 @@ func (c *SnapshotsV1Beta3Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SnapshotsV1Beta3Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -193,7 +194,8 @@ func NewSnapshotsV1Beta3Client(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *snapshotsV1Beta3GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -277,7 +279,7 @@ func (c *snapshotsV1Beta3RESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *snapshotsV1Beta3RESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/dataflow/apiv1beta3/snapshots_v1_beta3_client_example_test.go b/dataflow/apiv1beta3/snapshots_v1_beta3_client_example_test.go index e39114790df9..4a4343a85567 100644 --- a/dataflow/apiv1beta3/snapshots_v1_beta3_client_example_test.go +++ b/dataflow/apiv1beta3/snapshots_v1_beta3_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewSnapshotsV1Beta3Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewSnapshotsV1Beta3Client() { func ExampleNewSnapshotsV1Beta3RESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewSnapshotsV1Beta3RESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewSnapshotsV1Beta3RESTClient() { func ExampleSnapshotsV1Beta3Client_GetSnapshot() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -69,6 +84,11 @@ func ExampleSnapshotsV1Beta3Client_GetSnapshot() { func ExampleSnapshotsV1Beta3Client_DeleteSnapshot() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. @@ -89,6 +109,11 @@ func ExampleSnapshotsV1Beta3Client_DeleteSnapshot() { func ExampleSnapshotsV1Beta3Client_ListSnapshots() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewSnapshotsV1Beta3Client(ctx) if err != nil { // TODO: Handle error. diff --git a/dataflow/apiv1beta3/templates_client.go b/dataflow/apiv1beta3/templates_client.go index 19781ed33534..2c6b3b9c06a6 100644 --- a/dataflow/apiv1beta3/templates_client.go +++ b/dataflow/apiv1beta3/templates_client.go @@ -114,7 +114,8 @@ func (c *TemplatesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TemplatesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -194,7 +195,8 @@ func NewTemplatesClient(ctx context.Context, opts ...option.ClientOption) (*Temp // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *templatesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -278,7 +280,7 @@ func (c *templatesRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *templatesRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/dataflow/apiv1beta3/templates_client_example_test.go b/dataflow/apiv1beta3/templates_client_example_test.go index eb13dd038d2e..6e21af5d7c4a 100644 --- a/dataflow/apiv1beta3/templates_client_example_test.go +++ b/dataflow/apiv1beta3/templates_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewTemplatesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewTemplatesClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewTemplatesClient() { func ExampleNewTemplatesRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewTemplatesRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewTemplatesRESTClient() { func ExampleTemplatesClient_CreateJobFromTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewTemplatesClient(ctx) if err != nil { // TODO: Handle error. @@ -69,6 +84,11 @@ func ExampleTemplatesClient_CreateJobFromTemplate() { func ExampleTemplatesClient_LaunchTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewTemplatesClient(ctx) if err != nil { // TODO: Handle error. @@ -89,6 +109,11 @@ func ExampleTemplatesClient_LaunchTemplate() { func ExampleTemplatesClient_GetTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataflow.NewTemplatesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataflow/go.mod b/dataflow/go.mod index 9b850ac880dd..c156be7af09c 100644 --- a/dataflow/go.mod +++ b/dataflow/go.mod @@ -1,12 +1,25 @@ module cloud.google.com/go/dataflow -go 1.16 +go 1.17 require ( - cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/dataflow/go.sum b/dataflow/go.sum index f00d995cec43..e75fb777b024 100644 --- a/dataflow/go.sum +++ b/dataflow/go.sum @@ -27,9 +27,8 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0 h1:DAq3r8y4mDgyB/ZPJ9v/5VJNqjgJAxTn6ZYLlUywOu8= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -162,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +587,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +620,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +637,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/dataflow/go_mod_tidy_hack.go b/dataflow/go_mod_tidy_hack.go deleted file mode 100644 index 272b5a663685..000000000000 --- a/dataflow/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package dataflow - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/dataflow/internal/version.go b/dataflow/internal/version.go index d0d3f79115b7..75ae2d0e75aa 100644 --- a/dataflow/internal/version.go +++ b/dataflow/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.5.0" +const Version = "0.6.0" diff --git a/dataform/CHANGES.md b/dataform/CHANGES.md new file mode 100644 index 000000000000..07200ce7dbb4 --- /dev/null +++ b/dataform/CHANGES.md @@ -0,0 +1,23 @@ +# Changelog + +## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/dataform/v0.2.0...dataform/v0.3.0) (2022-09-19) + + +### Features + +* **dataform:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/dataform/v0.1.0...dataform/v0.2.0) (2022-08-02) + + +### Features + +* **dataform:** Release API version v1beta1 (no changes to v1alpha2) ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) + +## 0.1.0 (2022-07-12) + + +### Features + +* **dataform:** remove unused filter field from alpha2 version of API before release ([8a1ad06](https://github.com/googleapis/google-cloud-go/commit/8a1ad06572a65afa91a0a77a85b849e766876671)) +* **dataform:** start generating apiv1alpha2 ([#6299](https://github.com/googleapis/google-cloud-go/issues/6299)) ([1c434c6](https://github.com/googleapis/google-cloud-go/commit/1c434c6657b9bd8529760681c95aef9373c66120)) diff --git a/dataform/README.md b/dataform/README.md new file mode 100644 index 000000000000..df1fb8c77bb3 --- /dev/null +++ b/dataform/README.md @@ -0,0 +1,44 @@ +# Dataform API + +[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/dataform.svg)](https://pkg.go.dev/cloud.google.com/go/dataform) + +Go Client Library for Dataform API. + +## Install + +```bash +go get cloud.google.com/go/dataform +``` + +## Stability + +The stability of this module is indicated by SemVer. + +However, a `v1+` module may have breaking changes in two scenarios: + +* Packages with `alpha` or `beta` in the import path +* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). + +## Go Version Support + +See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) +section in the root directory's README. + +## Authorization + +See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) +section in the root directory's README. + +## Contributing + +Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) +document for details. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. See +[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. diff --git a/dataform/apiv1alpha2/dataform_client.go b/dataform/apiv1alpha2/dataform_client.go new file mode 100644 index 000000000000..4d058c4de845 --- /dev/null +++ b/dataform/apiv1alpha2/dataform_client.go @@ -0,0 +1,4377 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dataform + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dataformpb "google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListRepositories []gax.CallOption + GetRepository []gax.CallOption + CreateRepository []gax.CallOption + UpdateRepository []gax.CallOption + DeleteRepository []gax.CallOption + FetchRemoteBranches []gax.CallOption + ListWorkspaces []gax.CallOption + GetWorkspace []gax.CallOption + CreateWorkspace []gax.CallOption + DeleteWorkspace []gax.CallOption + InstallNpmPackages []gax.CallOption + PullGitCommits []gax.CallOption + PushGitCommits []gax.CallOption + FetchFileGitStatuses []gax.CallOption + FetchGitAheadBehind []gax.CallOption + CommitWorkspaceChanges []gax.CallOption + ResetWorkspaceChanges []gax.CallOption + FetchFileDiff []gax.CallOption + QueryDirectoryContents []gax.CallOption + MakeDirectory []gax.CallOption + RemoveDirectory []gax.CallOption + MoveDirectory []gax.CallOption + ReadFile []gax.CallOption + RemoveFile []gax.CallOption + MoveFile []gax.CallOption + WriteFile []gax.CallOption + ListCompilationResults []gax.CallOption + GetCompilationResult []gax.CallOption + CreateCompilationResult []gax.CallOption + QueryCompilationResultActions []gax.CallOption + ListWorkflowInvocations []gax.CallOption + GetWorkflowInvocation []gax.CallOption + CreateWorkflowInvocation []gax.CallOption + DeleteWorkflowInvocation []gax.CallOption + CancelWorkflowInvocation []gax.CallOption + QueryWorkflowInvocationActions []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dataform.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dataform.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dataform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListRepositories: []gax.CallOption{}, + GetRepository: []gax.CallOption{}, + CreateRepository: []gax.CallOption{}, + UpdateRepository: []gax.CallOption{}, + DeleteRepository: []gax.CallOption{}, + FetchRemoteBranches: []gax.CallOption{}, + ListWorkspaces: []gax.CallOption{}, + GetWorkspace: []gax.CallOption{}, + CreateWorkspace: []gax.CallOption{}, + DeleteWorkspace: []gax.CallOption{}, + InstallNpmPackages: []gax.CallOption{}, + PullGitCommits: []gax.CallOption{}, + PushGitCommits: []gax.CallOption{}, + FetchFileGitStatuses: []gax.CallOption{}, + FetchGitAheadBehind: []gax.CallOption{}, + CommitWorkspaceChanges: []gax.CallOption{}, + ResetWorkspaceChanges: []gax.CallOption{}, + FetchFileDiff: []gax.CallOption{}, + QueryDirectoryContents: []gax.CallOption{}, + MakeDirectory: []gax.CallOption{}, + RemoveDirectory: []gax.CallOption{}, + MoveDirectory: []gax.CallOption{}, + ReadFile: []gax.CallOption{}, + RemoveFile: []gax.CallOption{}, + MoveFile: []gax.CallOption{}, + WriteFile: []gax.CallOption{}, + ListCompilationResults: []gax.CallOption{}, + GetCompilationResult: []gax.CallOption{}, + CreateCompilationResult: []gax.CallOption{}, + QueryCompilationResultActions: []gax.CallOption{}, + ListWorkflowInvocations: []gax.CallOption{}, + GetWorkflowInvocation: []gax.CallOption{}, + CreateWorkflowInvocation: []gax.CallOption{}, + DeleteWorkflowInvocation: []gax.CallOption{}, + CancelWorkflowInvocation: []gax.CallOption{}, + QueryWorkflowInvocationActions: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + } +} + +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + ListRepositories: []gax.CallOption{}, + GetRepository: []gax.CallOption{}, + CreateRepository: []gax.CallOption{}, + UpdateRepository: []gax.CallOption{}, + DeleteRepository: []gax.CallOption{}, + FetchRemoteBranches: []gax.CallOption{}, + ListWorkspaces: []gax.CallOption{}, + GetWorkspace: []gax.CallOption{}, + CreateWorkspace: []gax.CallOption{}, + DeleteWorkspace: []gax.CallOption{}, + InstallNpmPackages: []gax.CallOption{}, + PullGitCommits: []gax.CallOption{}, + PushGitCommits: []gax.CallOption{}, + FetchFileGitStatuses: []gax.CallOption{}, + FetchGitAheadBehind: []gax.CallOption{}, + CommitWorkspaceChanges: []gax.CallOption{}, + ResetWorkspaceChanges: []gax.CallOption{}, + FetchFileDiff: []gax.CallOption{}, + QueryDirectoryContents: []gax.CallOption{}, + MakeDirectory: []gax.CallOption{}, + RemoveDirectory: []gax.CallOption{}, + MoveDirectory: []gax.CallOption{}, + ReadFile: []gax.CallOption{}, + RemoveFile: []gax.CallOption{}, + MoveFile: []gax.CallOption{}, + WriteFile: []gax.CallOption{}, + ListCompilationResults: []gax.CallOption{}, + GetCompilationResult: []gax.CallOption{}, + CreateCompilationResult: []gax.CallOption{}, + QueryCompilationResultActions: []gax.CallOption{}, + ListWorkflowInvocations: []gax.CallOption{}, + GetWorkflowInvocation: []gax.CallOption{}, + CreateWorkflowInvocation: []gax.CallOption{}, + DeleteWorkflowInvocation: []gax.CallOption{}, + CancelWorkflowInvocation: []gax.CallOption{}, + QueryWorkflowInvocationActions: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from Dataform API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListRepositories(context.Context, *dataformpb.ListRepositoriesRequest, ...gax.CallOption) *RepositoryIterator + GetRepository(context.Context, *dataformpb.GetRepositoryRequest, ...gax.CallOption) (*dataformpb.Repository, error) + CreateRepository(context.Context, *dataformpb.CreateRepositoryRequest, ...gax.CallOption) (*dataformpb.Repository, error) + UpdateRepository(context.Context, *dataformpb.UpdateRepositoryRequest, ...gax.CallOption) (*dataformpb.Repository, error) + DeleteRepository(context.Context, *dataformpb.DeleteRepositoryRequest, ...gax.CallOption) error + FetchRemoteBranches(context.Context, *dataformpb.FetchRemoteBranchesRequest, ...gax.CallOption) (*dataformpb.FetchRemoteBranchesResponse, error) + ListWorkspaces(context.Context, *dataformpb.ListWorkspacesRequest, ...gax.CallOption) *WorkspaceIterator + GetWorkspace(context.Context, *dataformpb.GetWorkspaceRequest, ...gax.CallOption) (*dataformpb.Workspace, error) + CreateWorkspace(context.Context, *dataformpb.CreateWorkspaceRequest, ...gax.CallOption) (*dataformpb.Workspace, error) + DeleteWorkspace(context.Context, *dataformpb.DeleteWorkspaceRequest, ...gax.CallOption) error + InstallNpmPackages(context.Context, *dataformpb.InstallNpmPackagesRequest, ...gax.CallOption) (*dataformpb.InstallNpmPackagesResponse, error) + PullGitCommits(context.Context, *dataformpb.PullGitCommitsRequest, ...gax.CallOption) error + PushGitCommits(context.Context, *dataformpb.PushGitCommitsRequest, ...gax.CallOption) error + FetchFileGitStatuses(context.Context, *dataformpb.FetchFileGitStatusesRequest, ...gax.CallOption) (*dataformpb.FetchFileGitStatusesResponse, error) + FetchGitAheadBehind(context.Context, *dataformpb.FetchGitAheadBehindRequest, ...gax.CallOption) (*dataformpb.FetchGitAheadBehindResponse, error) + CommitWorkspaceChanges(context.Context, *dataformpb.CommitWorkspaceChangesRequest, ...gax.CallOption) error + ResetWorkspaceChanges(context.Context, *dataformpb.ResetWorkspaceChangesRequest, ...gax.CallOption) error + FetchFileDiff(context.Context, *dataformpb.FetchFileDiffRequest, ...gax.CallOption) (*dataformpb.FetchFileDiffResponse, error) + QueryDirectoryContents(context.Context, *dataformpb.QueryDirectoryContentsRequest, ...gax.CallOption) *QueryDirectoryContentsResponse_DirectoryEntryIterator + MakeDirectory(context.Context, *dataformpb.MakeDirectoryRequest, ...gax.CallOption) (*dataformpb.MakeDirectoryResponse, error) + RemoveDirectory(context.Context, *dataformpb.RemoveDirectoryRequest, ...gax.CallOption) error + MoveDirectory(context.Context, *dataformpb.MoveDirectoryRequest, ...gax.CallOption) (*dataformpb.MoveDirectoryResponse, error) + ReadFile(context.Context, *dataformpb.ReadFileRequest, ...gax.CallOption) (*dataformpb.ReadFileResponse, error) + RemoveFile(context.Context, *dataformpb.RemoveFileRequest, ...gax.CallOption) error + MoveFile(context.Context, *dataformpb.MoveFileRequest, ...gax.CallOption) (*dataformpb.MoveFileResponse, error) + WriteFile(context.Context, *dataformpb.WriteFileRequest, ...gax.CallOption) (*dataformpb.WriteFileResponse, error) + ListCompilationResults(context.Context, *dataformpb.ListCompilationResultsRequest, ...gax.CallOption) *CompilationResultIterator + GetCompilationResult(context.Context, *dataformpb.GetCompilationResultRequest, ...gax.CallOption) (*dataformpb.CompilationResult, error) + CreateCompilationResult(context.Context, *dataformpb.CreateCompilationResultRequest, ...gax.CallOption) (*dataformpb.CompilationResult, error) + QueryCompilationResultActions(context.Context, *dataformpb.QueryCompilationResultActionsRequest, ...gax.CallOption) *CompilationResultActionIterator + ListWorkflowInvocations(context.Context, *dataformpb.ListWorkflowInvocationsRequest, ...gax.CallOption) *WorkflowInvocationIterator + GetWorkflowInvocation(context.Context, *dataformpb.GetWorkflowInvocationRequest, ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) + CreateWorkflowInvocation(context.Context, *dataformpb.CreateWorkflowInvocationRequest, ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) + DeleteWorkflowInvocation(context.Context, *dataformpb.DeleteWorkflowInvocationRequest, ...gax.CallOption) error + CancelWorkflowInvocation(context.Context, *dataformpb.CancelWorkflowInvocationRequest, ...gax.CallOption) error + QueryWorkflowInvocationActions(context.Context, *dataformpb.QueryWorkflowInvocationActionsRequest, ...gax.CallOption) *WorkflowInvocationActionIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) +} + +// Client is a client for interacting with Dataform API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListRepositories lists Repositories in a given project and location. +func (c *Client) ListRepositories(ctx context.Context, req *dataformpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { + return c.internalClient.ListRepositories(ctx, req, opts...) +} + +// GetRepository fetches a single Repository. +func (c *Client) GetRepository(ctx context.Context, req *dataformpb.GetRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + return c.internalClient.GetRepository(ctx, req, opts...) +} + +// CreateRepository creates a new Repository in a given project and location. +func (c *Client) CreateRepository(ctx context.Context, req *dataformpb.CreateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + return c.internalClient.CreateRepository(ctx, req, opts...) +} + +// UpdateRepository updates a single Repository. +func (c *Client) UpdateRepository(ctx context.Context, req *dataformpb.UpdateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + return c.internalClient.UpdateRepository(ctx, req, opts...) +} + +// DeleteRepository deletes a single Repository. +func (c *Client) DeleteRepository(ctx context.Context, req *dataformpb.DeleteRepositoryRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteRepository(ctx, req, opts...) +} + +// FetchRemoteBranches fetches a Repository’s remote branches. +func (c *Client) FetchRemoteBranches(ctx context.Context, req *dataformpb.FetchRemoteBranchesRequest, opts ...gax.CallOption) (*dataformpb.FetchRemoteBranchesResponse, error) { + return c.internalClient.FetchRemoteBranches(ctx, req, opts...) +} + +// ListWorkspaces lists Workspaces in a given Repository. +func (c *Client) ListWorkspaces(ctx context.Context, req *dataformpb.ListWorkspacesRequest, opts ...gax.CallOption) *WorkspaceIterator { + return c.internalClient.ListWorkspaces(ctx, req, opts...) +} + +// GetWorkspace fetches a single Workspace. +func (c *Client) GetWorkspace(ctx context.Context, req *dataformpb.GetWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error) { + return c.internalClient.GetWorkspace(ctx, req, opts...) +} + +// CreateWorkspace creates a new Workspace in a given Repository. +func (c *Client) CreateWorkspace(ctx context.Context, req *dataformpb.CreateWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error) { + return c.internalClient.CreateWorkspace(ctx, req, opts...) +} + +// DeleteWorkspace deletes a single Workspace. +func (c *Client) DeleteWorkspace(ctx context.Context, req *dataformpb.DeleteWorkspaceRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteWorkspace(ctx, req, opts...) +} + +// InstallNpmPackages installs dependency NPM packages (inside a Workspace). +func (c *Client) InstallNpmPackages(ctx context.Context, req *dataformpb.InstallNpmPackagesRequest, opts ...gax.CallOption) (*dataformpb.InstallNpmPackagesResponse, error) { + return c.internalClient.InstallNpmPackages(ctx, req, opts...) +} + +// PullGitCommits pulls Git commits from the Repository’s remote into a Workspace. +func (c *Client) PullGitCommits(ctx context.Context, req *dataformpb.PullGitCommitsRequest, opts ...gax.CallOption) error { + return c.internalClient.PullGitCommits(ctx, req, opts...) +} + +// PushGitCommits pushes Git commits from a Workspace to the Repository’s remote. +func (c *Client) PushGitCommits(ctx context.Context, req *dataformpb.PushGitCommitsRequest, opts ...gax.CallOption) error { + return c.internalClient.PushGitCommits(ctx, req, opts...) +} + +// FetchFileGitStatuses fetches Git statuses for the files in a Workspace. +func (c *Client) FetchFileGitStatuses(ctx context.Context, req *dataformpb.FetchFileGitStatusesRequest, opts ...gax.CallOption) (*dataformpb.FetchFileGitStatusesResponse, error) { + return c.internalClient.FetchFileGitStatuses(ctx, req, opts...) +} + +// FetchGitAheadBehind fetches Git ahead/behind against a remote branch. +func (c *Client) FetchGitAheadBehind(ctx context.Context, req *dataformpb.FetchGitAheadBehindRequest, opts ...gax.CallOption) (*dataformpb.FetchGitAheadBehindResponse, error) { + return c.internalClient.FetchGitAheadBehind(ctx, req, opts...) +} + +// CommitWorkspaceChanges applies a Git commit for uncommitted files in a Workspace. +func (c *Client) CommitWorkspaceChanges(ctx context.Context, req *dataformpb.CommitWorkspaceChangesRequest, opts ...gax.CallOption) error { + return c.internalClient.CommitWorkspaceChanges(ctx, req, opts...) +} + +// ResetWorkspaceChanges performs a Git reset for uncommitted files in a Workspace. +func (c *Client) ResetWorkspaceChanges(ctx context.Context, req *dataformpb.ResetWorkspaceChangesRequest, opts ...gax.CallOption) error { + return c.internalClient.ResetWorkspaceChanges(ctx, req, opts...) +} + +// FetchFileDiff fetches Git diff for an uncommitted file in a Workspace. +func (c *Client) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFileDiffRequest, opts ...gax.CallOption) (*dataformpb.FetchFileDiffResponse, error) { + return c.internalClient.FetchFileDiff(ctx, req, opts...) +} + +// QueryDirectoryContents returns the contents of a given Workspace directory. +func (c *Client) QueryDirectoryContents(ctx context.Context, req *dataformpb.QueryDirectoryContentsRequest, opts ...gax.CallOption) *QueryDirectoryContentsResponse_DirectoryEntryIterator { + return c.internalClient.QueryDirectoryContents(ctx, req, opts...) +} + +// MakeDirectory creates a directory inside a Workspace. +func (c *Client) MakeDirectory(ctx context.Context, req *dataformpb.MakeDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MakeDirectoryResponse, error) { + return c.internalClient.MakeDirectory(ctx, req, opts...) +} + +// RemoveDirectory deletes a directory (inside a Workspace) and all of its contents. +func (c *Client) RemoveDirectory(ctx context.Context, req *dataformpb.RemoveDirectoryRequest, opts ...gax.CallOption) error { + return c.internalClient.RemoveDirectory(ctx, req, opts...) +} + +// MoveDirectory moves a directory (inside a Workspace), and all of its contents, to a new +// location. +func (c *Client) MoveDirectory(ctx context.Context, req *dataformpb.MoveDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MoveDirectoryResponse, error) { + return c.internalClient.MoveDirectory(ctx, req, opts...) +} + +// ReadFile returns the contents of a file (inside a Workspace). +func (c *Client) ReadFile(ctx context.Context, req *dataformpb.ReadFileRequest, opts ...gax.CallOption) (*dataformpb.ReadFileResponse, error) { + return c.internalClient.ReadFile(ctx, req, opts...) +} + +// RemoveFile deletes a file (inside a Workspace). +func (c *Client) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileRequest, opts ...gax.CallOption) error { + return c.internalClient.RemoveFile(ctx, req, opts...) +} + +// MoveFile moves a file (inside a Workspace) to a new location. +func (c *Client) MoveFile(ctx context.Context, req *dataformpb.MoveFileRequest, opts ...gax.CallOption) (*dataformpb.MoveFileResponse, error) { + return c.internalClient.MoveFile(ctx, req, opts...) +} + +// WriteFile writes to a file (inside a Workspace). +func (c *Client) WriteFile(ctx context.Context, req *dataformpb.WriteFileRequest, opts ...gax.CallOption) (*dataformpb.WriteFileResponse, error) { + return c.internalClient.WriteFile(ctx, req, opts...) +} + +// ListCompilationResults lists CompilationResults in a given Repository. +func (c *Client) ListCompilationResults(ctx context.Context, req *dataformpb.ListCompilationResultsRequest, opts ...gax.CallOption) *CompilationResultIterator { + return c.internalClient.ListCompilationResults(ctx, req, opts...) +} + +// GetCompilationResult fetches a single CompilationResult. +func (c *Client) GetCompilationResult(ctx context.Context, req *dataformpb.GetCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error) { + return c.internalClient.GetCompilationResult(ctx, req, opts...) +} + +// CreateCompilationResult creates a new CompilationResult in a given project and location. +func (c *Client) CreateCompilationResult(ctx context.Context, req *dataformpb.CreateCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error) { + return c.internalClient.CreateCompilationResult(ctx, req, opts...) +} + +// QueryCompilationResultActions returns CompilationResultActions in a given CompilationResult. +func (c *Client) QueryCompilationResultActions(ctx context.Context, req *dataformpb.QueryCompilationResultActionsRequest, opts ...gax.CallOption) *CompilationResultActionIterator { + return c.internalClient.QueryCompilationResultActions(ctx, req, opts...) +} + +// ListWorkflowInvocations lists WorkflowInvocations in a given Repository. +func (c *Client) ListWorkflowInvocations(ctx context.Context, req *dataformpb.ListWorkflowInvocationsRequest, opts ...gax.CallOption) *WorkflowInvocationIterator { + return c.internalClient.ListWorkflowInvocations(ctx, req, opts...) +} + +// GetWorkflowInvocation fetches a single WorkflowInvocation. +func (c *Client) GetWorkflowInvocation(ctx context.Context, req *dataformpb.GetWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) { + return c.internalClient.GetWorkflowInvocation(ctx, req, opts...) +} + +// CreateWorkflowInvocation creates a new WorkflowInvocation in a given Repository. +func (c *Client) CreateWorkflowInvocation(ctx context.Context, req *dataformpb.CreateWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) { + return c.internalClient.CreateWorkflowInvocation(ctx, req, opts...) +} + +// DeleteWorkflowInvocation deletes a single WorkflowInvocation. +func (c *Client) DeleteWorkflowInvocation(ctx context.Context, req *dataformpb.DeleteWorkflowInvocationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteWorkflowInvocation(ctx, req, opts...) +} + +// CancelWorkflowInvocation requests cancellation of a running WorkflowInvocation. +func (c *Client) CancelWorkflowInvocation(ctx context.Context, req *dataformpb.CancelWorkflowInvocationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelWorkflowInvocation(ctx, req, opts...) +} + +// QueryWorkflowInvocationActions returns WorkflowInvocationActions in a given WorkflowInvocation. +func (c *Client) QueryWorkflowInvocationActions(ctx context.Context, req *dataformpb.QueryWorkflowInvocationActionsRequest, opts ...gax.CallOption) *WorkflowInvocationActionIterator { + return c.internalClient.QueryWorkflowInvocationActions(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with Dataform API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client dataformpb.DataformClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewClient creates a new dataform client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + client: dataformpb.NewDataformClient(connPool), + CallOptions: &client.CallOptions, + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions +} + +// NewRESTClient creates a new dataform rest client. +// +// Dataform is a service to develop, create, document, test, and update curated +// tables in BigQuery. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dataform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dataform.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dataform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} +func (c *gRPCClient) ListRepositories(ctx context.Context, req *dataformpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListRepositories[0:len((*c.CallOptions).ListRepositories):len((*c.CallOptions).ListRepositories)], opts...) + it := &RepositoryIterator{} + req = proto.Clone(req).(*dataformpb.ListRepositoriesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.Repository, string, error) { + resp := &dataformpb.ListRepositoriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListRepositories(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetRepositories(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetRepository(ctx context.Context, req *dataformpb.GetRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetRepository[0:len((*c.CallOptions).GetRepository):len((*c.CallOptions).GetRepository)], opts...) + var resp *dataformpb.Repository + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateRepository(ctx context.Context, req *dataformpb.CreateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateRepository[0:len((*c.CallOptions).CreateRepository):len((*c.CallOptions).CreateRepository)], opts...) + var resp *dataformpb.Repository + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateRepository(ctx context.Context, req *dataformpb.UpdateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "repository.name", url.QueryEscape(req.GetRepository().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateRepository[0:len((*c.CallOptions).UpdateRepository):len((*c.CallOptions).UpdateRepository)], opts...) + var resp *dataformpb.Repository + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteRepository(ctx context.Context, req *dataformpb.DeleteRepositoryRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteRepository[0:len((*c.CallOptions).DeleteRepository):len((*c.CallOptions).DeleteRepository)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.DeleteRepository(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) FetchRemoteBranches(ctx context.Context, req *dataformpb.FetchRemoteBranchesRequest, opts ...gax.CallOption) (*dataformpb.FetchRemoteBranchesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).FetchRemoteBranches[0:len((*c.CallOptions).FetchRemoteBranches):len((*c.CallOptions).FetchRemoteBranches)], opts...) + var resp *dataformpb.FetchRemoteBranchesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.FetchRemoteBranches(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListWorkspaces(ctx context.Context, req *dataformpb.ListWorkspacesRequest, opts ...gax.CallOption) *WorkspaceIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListWorkspaces[0:len((*c.CallOptions).ListWorkspaces):len((*c.CallOptions).ListWorkspaces)], opts...) + it := &WorkspaceIterator{} + req = proto.Clone(req).(*dataformpb.ListWorkspacesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.Workspace, string, error) { + resp := &dataformpb.ListWorkspacesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListWorkspaces(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetWorkspaces(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetWorkspace(ctx context.Context, req *dataformpb.GetWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetWorkspace[0:len((*c.CallOptions).GetWorkspace):len((*c.CallOptions).GetWorkspace)], opts...) + var resp *dataformpb.Workspace + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetWorkspace(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateWorkspace(ctx context.Context, req *dataformpb.CreateWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateWorkspace[0:len((*c.CallOptions).CreateWorkspace):len((*c.CallOptions).CreateWorkspace)], opts...) + var resp *dataformpb.Workspace + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateWorkspace(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteWorkspace(ctx context.Context, req *dataformpb.DeleteWorkspaceRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteWorkspace[0:len((*c.CallOptions).DeleteWorkspace):len((*c.CallOptions).DeleteWorkspace)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.DeleteWorkspace(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) InstallNpmPackages(ctx context.Context, req *dataformpb.InstallNpmPackagesRequest, opts ...gax.CallOption) (*dataformpb.InstallNpmPackagesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).InstallNpmPackages[0:len((*c.CallOptions).InstallNpmPackages):len((*c.CallOptions).InstallNpmPackages)], opts...) + var resp *dataformpb.InstallNpmPackagesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.InstallNpmPackages(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) PullGitCommits(ctx context.Context, req *dataformpb.PullGitCommitsRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).PullGitCommits[0:len((*c.CallOptions).PullGitCommits):len((*c.CallOptions).PullGitCommits)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.PullGitCommits(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) PushGitCommits(ctx context.Context, req *dataformpb.PushGitCommitsRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).PushGitCommits[0:len((*c.CallOptions).PushGitCommits):len((*c.CallOptions).PushGitCommits)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.PushGitCommits(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) FetchFileGitStatuses(ctx context.Context, req *dataformpb.FetchFileGitStatusesRequest, opts ...gax.CallOption) (*dataformpb.FetchFileGitStatusesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).FetchFileGitStatuses[0:len((*c.CallOptions).FetchFileGitStatuses):len((*c.CallOptions).FetchFileGitStatuses)], opts...) + var resp *dataformpb.FetchFileGitStatusesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.FetchFileGitStatuses(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) FetchGitAheadBehind(ctx context.Context, req *dataformpb.FetchGitAheadBehindRequest, opts ...gax.CallOption) (*dataformpb.FetchGitAheadBehindResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).FetchGitAheadBehind[0:len((*c.CallOptions).FetchGitAheadBehind):len((*c.CallOptions).FetchGitAheadBehind)], opts...) + var resp *dataformpb.FetchGitAheadBehindResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.FetchGitAheadBehind(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CommitWorkspaceChanges(ctx context.Context, req *dataformpb.CommitWorkspaceChangesRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CommitWorkspaceChanges[0:len((*c.CallOptions).CommitWorkspaceChanges):len((*c.CallOptions).CommitWorkspaceChanges)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.CommitWorkspaceChanges(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) ResetWorkspaceChanges(ctx context.Context, req *dataformpb.ResetWorkspaceChangesRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ResetWorkspaceChanges[0:len((*c.CallOptions).ResetWorkspaceChanges):len((*c.CallOptions).ResetWorkspaceChanges)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.ResetWorkspaceChanges(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFileDiffRequest, opts ...gax.CallOption) (*dataformpb.FetchFileDiffResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).FetchFileDiff[0:len((*c.CallOptions).FetchFileDiff):len((*c.CallOptions).FetchFileDiff)], opts...) + var resp *dataformpb.FetchFileDiffResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.FetchFileDiff(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) QueryDirectoryContents(ctx context.Context, req *dataformpb.QueryDirectoryContentsRequest, opts ...gax.CallOption) *QueryDirectoryContentsResponse_DirectoryEntryIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).QueryDirectoryContents[0:len((*c.CallOptions).QueryDirectoryContents):len((*c.CallOptions).QueryDirectoryContents)], opts...) + it := &QueryDirectoryContentsResponse_DirectoryEntryIterator{} + req = proto.Clone(req).(*dataformpb.QueryDirectoryContentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, string, error) { + resp := &dataformpb.QueryDirectoryContentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.QueryDirectoryContents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetDirectoryEntries(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) MakeDirectory(ctx context.Context, req *dataformpb.MakeDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MakeDirectoryResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).MakeDirectory[0:len((*c.CallOptions).MakeDirectory):len((*c.CallOptions).MakeDirectory)], opts...) + var resp *dataformpb.MakeDirectoryResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.MakeDirectory(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) RemoveDirectory(ctx context.Context, req *dataformpb.RemoveDirectoryRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RemoveDirectory[0:len((*c.CallOptions).RemoveDirectory):len((*c.CallOptions).RemoveDirectory)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.RemoveDirectory(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) MoveDirectory(ctx context.Context, req *dataformpb.MoveDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MoveDirectoryResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).MoveDirectory[0:len((*c.CallOptions).MoveDirectory):len((*c.CallOptions).MoveDirectory)], opts...) + var resp *dataformpb.MoveDirectoryResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.MoveDirectory(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ReadFile(ctx context.Context, req *dataformpb.ReadFileRequest, opts ...gax.CallOption) (*dataformpb.ReadFileResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ReadFile[0:len((*c.CallOptions).ReadFile):len((*c.CallOptions).ReadFile)], opts...) + var resp *dataformpb.ReadFileResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ReadFile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RemoveFile[0:len((*c.CallOptions).RemoveFile):len((*c.CallOptions).RemoveFile)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.RemoveFile(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) MoveFile(ctx context.Context, req *dataformpb.MoveFileRequest, opts ...gax.CallOption) (*dataformpb.MoveFileResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).MoveFile[0:len((*c.CallOptions).MoveFile):len((*c.CallOptions).MoveFile)], opts...) + var resp *dataformpb.MoveFileResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.MoveFile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) WriteFile(ctx context.Context, req *dataformpb.WriteFileRequest, opts ...gax.CallOption) (*dataformpb.WriteFileResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).WriteFile[0:len((*c.CallOptions).WriteFile):len((*c.CallOptions).WriteFile)], opts...) + var resp *dataformpb.WriteFileResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.WriteFile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListCompilationResults(ctx context.Context, req *dataformpb.ListCompilationResultsRequest, opts ...gax.CallOption) *CompilationResultIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListCompilationResults[0:len((*c.CallOptions).ListCompilationResults):len((*c.CallOptions).ListCompilationResults)], opts...) + it := &CompilationResultIterator{} + req = proto.Clone(req).(*dataformpb.ListCompilationResultsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.CompilationResult, string, error) { + resp := &dataformpb.ListCompilationResultsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListCompilationResults(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetCompilationResults(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetCompilationResult(ctx context.Context, req *dataformpb.GetCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetCompilationResult[0:len((*c.CallOptions).GetCompilationResult):len((*c.CallOptions).GetCompilationResult)], opts...) + var resp *dataformpb.CompilationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetCompilationResult(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateCompilationResult(ctx context.Context, req *dataformpb.CreateCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateCompilationResult[0:len((*c.CallOptions).CreateCompilationResult):len((*c.CallOptions).CreateCompilationResult)], opts...) + var resp *dataformpb.CompilationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateCompilationResult(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) QueryCompilationResultActions(ctx context.Context, req *dataformpb.QueryCompilationResultActionsRequest, opts ...gax.CallOption) *CompilationResultActionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).QueryCompilationResultActions[0:len((*c.CallOptions).QueryCompilationResultActions):len((*c.CallOptions).QueryCompilationResultActions)], opts...) + it := &CompilationResultActionIterator{} + req = proto.Clone(req).(*dataformpb.QueryCompilationResultActionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.CompilationResultAction, string, error) { + resp := &dataformpb.QueryCompilationResultActionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.QueryCompilationResultActions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetCompilationResultActions(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) ListWorkflowInvocations(ctx context.Context, req *dataformpb.ListWorkflowInvocationsRequest, opts ...gax.CallOption) *WorkflowInvocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListWorkflowInvocations[0:len((*c.CallOptions).ListWorkflowInvocations):len((*c.CallOptions).ListWorkflowInvocations)], opts...) + it := &WorkflowInvocationIterator{} + req = proto.Clone(req).(*dataformpb.ListWorkflowInvocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.WorkflowInvocation, string, error) { + resp := &dataformpb.ListWorkflowInvocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ListWorkflowInvocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetWorkflowInvocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetWorkflowInvocation(ctx context.Context, req *dataformpb.GetWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetWorkflowInvocation[0:len((*c.CallOptions).GetWorkflowInvocation):len((*c.CallOptions).GetWorkflowInvocation)], opts...) + var resp *dataformpb.WorkflowInvocation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetWorkflowInvocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateWorkflowInvocation(ctx context.Context, req *dataformpb.CreateWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateWorkflowInvocation[0:len((*c.CallOptions).CreateWorkflowInvocation):len((*c.CallOptions).CreateWorkflowInvocation)], opts...) + var resp *dataformpb.WorkflowInvocation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.CreateWorkflowInvocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) DeleteWorkflowInvocation(ctx context.Context, req *dataformpb.DeleteWorkflowInvocationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteWorkflowInvocation[0:len((*c.CallOptions).DeleteWorkflowInvocation):len((*c.CallOptions).DeleteWorkflowInvocation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.DeleteWorkflowInvocation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) CancelWorkflowInvocation(ctx context.Context, req *dataformpb.CancelWorkflowInvocationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelWorkflowInvocation[0:len((*c.CallOptions).CancelWorkflowInvocation):len((*c.CallOptions).CancelWorkflowInvocation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.CancelWorkflowInvocation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) QueryWorkflowInvocationActions(ctx context.Context, req *dataformpb.QueryWorkflowInvocationActionsRequest, opts ...gax.CallOption) *WorkflowInvocationActionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).QueryWorkflowInvocationActions[0:len((*c.CallOptions).QueryWorkflowInvocationActions):len((*c.CallOptions).QueryWorkflowInvocationActions)], opts...) + it := &WorkflowInvocationActionIterator{} + req = proto.Clone(req).(*dataformpb.QueryWorkflowInvocationActionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.WorkflowInvocationAction, string, error) { + resp := &dataformpb.QueryWorkflowInvocationActionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.QueryWorkflowInvocationActions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetWorkflowInvocationActions(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ListRepositories lists Repositories in a given project and location. +func (c *restClient) ListRepositories(ctx context.Context, req *dataformpb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { + it := &RepositoryIterator{} + req = proto.Clone(req).(*dataformpb.ListRepositoriesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.Repository, string, error) { + resp := &dataformpb.ListRepositoriesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/repositories", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetRepositories(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetRepository fetches a single Repository. +func (c *restClient) GetRepository(ctx context.Context, req *dataformpb.GetRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetRepository[0:len((*c.CallOptions).GetRepository):len((*c.CallOptions).GetRepository)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.Repository{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateRepository creates a new Repository in a given project and location. +func (c *restClient) CreateRepository(ctx context.Context, req *dataformpb.CreateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetRepository() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/repositories", req.GetParent()) + + params := url.Values{} + params.Add("repositoryId", fmt.Sprintf("%v", req.GetRepositoryId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateRepository[0:len((*c.CallOptions).CreateRepository):len((*c.CallOptions).CreateRepository)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.Repository{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateRepository updates a single Repository. +func (c *restClient) UpdateRepository(ctx context.Context, req *dataformpb.UpdateRepositoryRequest, opts ...gax.CallOption) (*dataformpb.Repository, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetRepository() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetRepository().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "repository.name", url.QueryEscape(req.GetRepository().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateRepository[0:len((*c.CallOptions).UpdateRepository):len((*c.CallOptions).UpdateRepository)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.Repository{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteRepository deletes a single Repository. +func (c *restClient) DeleteRepository(ctx context.Context, req *dataformpb.DeleteRepositoryRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// FetchRemoteBranches fetches a Repository’s remote branches. +func (c *restClient) FetchRemoteBranches(ctx context.Context, req *dataformpb.FetchRemoteBranchesRequest, opts ...gax.CallOption) (*dataformpb.FetchRemoteBranchesResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:fetchRemoteBranches", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).FetchRemoteBranches[0:len((*c.CallOptions).FetchRemoteBranches):len((*c.CallOptions).FetchRemoteBranches)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.FetchRemoteBranchesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListWorkspaces lists Workspaces in a given Repository. +func (c *restClient) ListWorkspaces(ctx context.Context, req *dataformpb.ListWorkspacesRequest, opts ...gax.CallOption) *WorkspaceIterator { + it := &WorkspaceIterator{} + req = proto.Clone(req).(*dataformpb.ListWorkspacesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.Workspace, string, error) { + resp := &dataformpb.ListWorkspacesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/workspaces", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetWorkspaces(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetWorkspace fetches a single Workspace. +func (c *restClient) GetWorkspace(ctx context.Context, req *dataformpb.GetWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetWorkspace[0:len((*c.CallOptions).GetWorkspace):len((*c.CallOptions).GetWorkspace)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.Workspace{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateWorkspace creates a new Workspace in a given Repository. +func (c *restClient) CreateWorkspace(ctx context.Context, req *dataformpb.CreateWorkspaceRequest, opts ...gax.CallOption) (*dataformpb.Workspace, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetWorkspace() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/workspaces", req.GetParent()) + + params := url.Values{} + params.Add("workspaceId", fmt.Sprintf("%v", req.GetWorkspaceId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateWorkspace[0:len((*c.CallOptions).CreateWorkspace):len((*c.CallOptions).CreateWorkspace)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.Workspace{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteWorkspace deletes a single Workspace. +func (c *restClient) DeleteWorkspace(ctx context.Context, req *dataformpb.DeleteWorkspaceRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// InstallNpmPackages installs dependency NPM packages (inside a Workspace). +func (c *restClient) InstallNpmPackages(ctx context.Context, req *dataformpb.InstallNpmPackagesRequest, opts ...gax.CallOption) (*dataformpb.InstallNpmPackagesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:installNpmPackages", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).InstallNpmPackages[0:len((*c.CallOptions).InstallNpmPackages):len((*c.CallOptions).InstallNpmPackages)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.InstallNpmPackagesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// PullGitCommits pulls Git commits from the Repository’s remote into a Workspace. +func (c *restClient) PullGitCommits(ctx context.Context, req *dataformpb.PullGitCommitsRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:pull", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// PushGitCommits pushes Git commits from a Workspace to the Repository’s remote. +func (c *restClient) PushGitCommits(ctx context.Context, req *dataformpb.PushGitCommitsRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:push", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// FetchFileGitStatuses fetches Git statuses for the files in a Workspace. +func (c *restClient) FetchFileGitStatuses(ctx context.Context, req *dataformpb.FetchFileGitStatusesRequest, opts ...gax.CallOption) (*dataformpb.FetchFileGitStatusesResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:fetchFileGitStatuses", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).FetchFileGitStatuses[0:len((*c.CallOptions).FetchFileGitStatuses):len((*c.CallOptions).FetchFileGitStatuses)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.FetchFileGitStatusesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// FetchGitAheadBehind fetches Git ahead/behind against a remote branch. +func (c *restClient) FetchGitAheadBehind(ctx context.Context, req *dataformpb.FetchGitAheadBehindRequest, opts ...gax.CallOption) (*dataformpb.FetchGitAheadBehindResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:fetchGitAheadBehind", req.GetName()) + + params := url.Values{} + if req.GetRemoteBranch() != "" { + params.Add("remoteBranch", fmt.Sprintf("%v", req.GetRemoteBranch())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).FetchGitAheadBehind[0:len((*c.CallOptions).FetchGitAheadBehind):len((*c.CallOptions).FetchGitAheadBehind)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.FetchGitAheadBehindResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CommitWorkspaceChanges applies a Git commit for uncommitted files in a Workspace. +func (c *restClient) CommitWorkspaceChanges(ctx context.Context, req *dataformpb.CommitWorkspaceChangesRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:commit", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ResetWorkspaceChanges performs a Git reset for uncommitted files in a Workspace. +func (c *restClient) ResetWorkspaceChanges(ctx context.Context, req *dataformpb.ResetWorkspaceChangesRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:reset", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// FetchFileDiff fetches Git diff for an uncommitted file in a Workspace. +func (c *restClient) FetchFileDiff(ctx context.Context, req *dataformpb.FetchFileDiffRequest, opts ...gax.CallOption) (*dataformpb.FetchFileDiffResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:fetchFileDiff", req.GetWorkspace()) + + params := url.Values{} + params.Add("path", fmt.Sprintf("%v", req.GetPath())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).FetchFileDiff[0:len((*c.CallOptions).FetchFileDiff):len((*c.CallOptions).FetchFileDiff)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.FetchFileDiffResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// QueryDirectoryContents returns the contents of a given Workspace directory. +func (c *restClient) QueryDirectoryContents(ctx context.Context, req *dataformpb.QueryDirectoryContentsRequest, opts ...gax.CallOption) *QueryDirectoryContentsResponse_DirectoryEntryIterator { + it := &QueryDirectoryContentsResponse_DirectoryEntryIterator{} + req = proto.Clone(req).(*dataformpb.QueryDirectoryContentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, string, error) { + resp := &dataformpb.QueryDirectoryContentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:queryDirectoryContents", req.GetWorkspace()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetPath() != "" { + params.Add("path", fmt.Sprintf("%v", req.GetPath())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDirectoryEntries(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// MakeDirectory creates a directory inside a Workspace. +func (c *restClient) MakeDirectory(ctx context.Context, req *dataformpb.MakeDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MakeDirectoryResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:makeDirectory", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).MakeDirectory[0:len((*c.CallOptions).MakeDirectory):len((*c.CallOptions).MakeDirectory)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.MakeDirectoryResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RemoveDirectory deletes a directory (inside a Workspace) and all of its contents. +func (c *restClient) RemoveDirectory(ctx context.Context, req *dataformpb.RemoveDirectoryRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:removeDirectory", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// MoveDirectory moves a directory (inside a Workspace), and all of its contents, to a new +// location. +func (c *restClient) MoveDirectory(ctx context.Context, req *dataformpb.MoveDirectoryRequest, opts ...gax.CallOption) (*dataformpb.MoveDirectoryResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:moveDirectory", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).MoveDirectory[0:len((*c.CallOptions).MoveDirectory):len((*c.CallOptions).MoveDirectory)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.MoveDirectoryResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ReadFile returns the contents of a file (inside a Workspace). +func (c *restClient) ReadFile(ctx context.Context, req *dataformpb.ReadFileRequest, opts ...gax.CallOption) (*dataformpb.ReadFileResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:readFile", req.GetWorkspace()) + + params := url.Values{} + params.Add("path", fmt.Sprintf("%v", req.GetPath())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).ReadFile[0:len((*c.CallOptions).ReadFile):len((*c.CallOptions).ReadFile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.ReadFileResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// RemoveFile deletes a file (inside a Workspace). +func (c *restClient) RemoveFile(ctx context.Context, req *dataformpb.RemoveFileRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:removeFile", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// MoveFile moves a file (inside a Workspace) to a new location. +func (c *restClient) MoveFile(ctx context.Context, req *dataformpb.MoveFileRequest, opts ...gax.CallOption) (*dataformpb.MoveFileResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:moveFile", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).MoveFile[0:len((*c.CallOptions).MoveFile):len((*c.CallOptions).MoveFile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.MoveFileResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// WriteFile writes to a file (inside a Workspace). +func (c *restClient) WriteFile(ctx context.Context, req *dataformpb.WriteFileRequest, opts ...gax.CallOption) (*dataformpb.WriteFileResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:writeFile", req.GetWorkspace()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "workspace", url.QueryEscape(req.GetWorkspace()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).WriteFile[0:len((*c.CallOptions).WriteFile):len((*c.CallOptions).WriteFile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.WriteFileResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListCompilationResults lists CompilationResults in a given Repository. +func (c *restClient) ListCompilationResults(ctx context.Context, req *dataformpb.ListCompilationResultsRequest, opts ...gax.CallOption) *CompilationResultIterator { + it := &CompilationResultIterator{} + req = proto.Clone(req).(*dataformpb.ListCompilationResultsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.CompilationResult, string, error) { + resp := &dataformpb.ListCompilationResultsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/compilationResults", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetCompilationResults(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetCompilationResult fetches a single CompilationResult. +func (c *restClient) GetCompilationResult(ctx context.Context, req *dataformpb.GetCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetCompilationResult[0:len((*c.CallOptions).GetCompilationResult):len((*c.CallOptions).GetCompilationResult)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.CompilationResult{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateCompilationResult creates a new CompilationResult in a given project and location. +func (c *restClient) CreateCompilationResult(ctx context.Context, req *dataformpb.CreateCompilationResultRequest, opts ...gax.CallOption) (*dataformpb.CompilationResult, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetCompilationResult() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/compilationResults", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateCompilationResult[0:len((*c.CallOptions).CreateCompilationResult):len((*c.CallOptions).CreateCompilationResult)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.CompilationResult{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// QueryCompilationResultActions returns CompilationResultActions in a given CompilationResult. +func (c *restClient) QueryCompilationResultActions(ctx context.Context, req *dataformpb.QueryCompilationResultActionsRequest, opts ...gax.CallOption) *CompilationResultActionIterator { + it := &CompilationResultActionIterator{} + req = proto.Clone(req).(*dataformpb.QueryCompilationResultActionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.CompilationResultAction, string, error) { + resp := &dataformpb.QueryCompilationResultActionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:query", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetCompilationResultActions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListWorkflowInvocations lists WorkflowInvocations in a given Repository. +func (c *restClient) ListWorkflowInvocations(ctx context.Context, req *dataformpb.ListWorkflowInvocationsRequest, opts ...gax.CallOption) *WorkflowInvocationIterator { + it := &WorkflowInvocationIterator{} + req = proto.Clone(req).(*dataformpb.ListWorkflowInvocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.WorkflowInvocation, string, error) { + resp := &dataformpb.ListWorkflowInvocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/workflowInvocations", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetWorkflowInvocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetWorkflowInvocation fetches a single WorkflowInvocation. +func (c *restClient) GetWorkflowInvocation(ctx context.Context, req *dataformpb.GetWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetWorkflowInvocation[0:len((*c.CallOptions).GetWorkflowInvocation):len((*c.CallOptions).GetWorkflowInvocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.WorkflowInvocation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateWorkflowInvocation creates a new WorkflowInvocation in a given Repository. +func (c *restClient) CreateWorkflowInvocation(ctx context.Context, req *dataformpb.CreateWorkflowInvocationRequest, opts ...gax.CallOption) (*dataformpb.WorkflowInvocation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetWorkflowInvocation() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/workflowInvocations", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateWorkflowInvocation[0:len((*c.CallOptions).CreateWorkflowInvocation):len((*c.CallOptions).CreateWorkflowInvocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dataformpb.WorkflowInvocation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteWorkflowInvocation deletes a single WorkflowInvocation. +func (c *restClient) DeleteWorkflowInvocation(ctx context.Context, req *dataformpb.DeleteWorkflowInvocationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CancelWorkflowInvocation requests cancellation of a running WorkflowInvocation. +func (c *restClient) CancelWorkflowInvocation(ctx context.Context, req *dataformpb.CancelWorkflowInvocationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// QueryWorkflowInvocationActions returns WorkflowInvocationActions in a given WorkflowInvocation. +func (c *restClient) QueryWorkflowInvocationActions(ctx context.Context, req *dataformpb.QueryWorkflowInvocationActionsRequest, opts ...gax.CallOption) *WorkflowInvocationActionIterator { + it := &WorkflowInvocationActionIterator{} + req = proto.Clone(req).(*dataformpb.QueryWorkflowInvocationActionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dataformpb.WorkflowInvocationAction, string, error) { + resp := &dataformpb.QueryWorkflowInvocationActionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:query", req.GetName()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetWorkflowInvocationActions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *restClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:getIamPolicy", req.GetResource()) + + params := url.Values{} + if req.GetOptions().GetRequestedPolicyVersion() != 0 { + params.Add("options.requestedPolicyVersion", fmt.Sprintf("%v", req.GetOptions().GetRequestedPolicyVersion())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *restClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *restClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1alpha2/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CompilationResultActionIterator manages a stream of *dataformpb.CompilationResultAction. +type CompilationResultActionIterator struct { + items []*dataformpb.CompilationResultAction + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.CompilationResultAction, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *CompilationResultActionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *CompilationResultActionIterator) Next() (*dataformpb.CompilationResultAction, error) { + var item *dataformpb.CompilationResultAction + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *CompilationResultActionIterator) bufLen() int { + return len(it.items) +} + +func (it *CompilationResultActionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// CompilationResultIterator manages a stream of *dataformpb.CompilationResult. +type CompilationResultIterator struct { + items []*dataformpb.CompilationResult + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.CompilationResult, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *CompilationResultIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *CompilationResultIterator) Next() (*dataformpb.CompilationResult, error) { + var item *dataformpb.CompilationResult + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *CompilationResultIterator) bufLen() int { + return len(it.items) +} + +func (it *CompilationResultIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// QueryDirectoryContentsResponse_DirectoryEntryIterator manages a stream of *dataformpb.QueryDirectoryContentsResponse_DirectoryEntry. +type QueryDirectoryContentsResponse_DirectoryEntryIterator struct { + items []*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) Next() (*dataformpb.QueryDirectoryContentsResponse_DirectoryEntry, error) { + var item *dataformpb.QueryDirectoryContentsResponse_DirectoryEntry + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) bufLen() int { + return len(it.items) +} + +func (it *QueryDirectoryContentsResponse_DirectoryEntryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// RepositoryIterator manages a stream of *dataformpb.Repository. +type RepositoryIterator struct { + items []*dataformpb.Repository + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.Repository, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *RepositoryIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *RepositoryIterator) Next() (*dataformpb.Repository, error) { + var item *dataformpb.Repository + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *RepositoryIterator) bufLen() int { + return len(it.items) +} + +func (it *RepositoryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// WorkflowInvocationActionIterator manages a stream of *dataformpb.WorkflowInvocationAction. +type WorkflowInvocationActionIterator struct { + items []*dataformpb.WorkflowInvocationAction + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.WorkflowInvocationAction, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *WorkflowInvocationActionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *WorkflowInvocationActionIterator) Next() (*dataformpb.WorkflowInvocationAction, error) { + var item *dataformpb.WorkflowInvocationAction + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *WorkflowInvocationActionIterator) bufLen() int { + return len(it.items) +} + +func (it *WorkflowInvocationActionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// WorkflowInvocationIterator manages a stream of *dataformpb.WorkflowInvocation. +type WorkflowInvocationIterator struct { + items []*dataformpb.WorkflowInvocation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.WorkflowInvocation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *WorkflowInvocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *WorkflowInvocationIterator) Next() (*dataformpb.WorkflowInvocation, error) { + var item *dataformpb.WorkflowInvocation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *WorkflowInvocationIterator) bufLen() int { + return len(it.items) +} + +func (it *WorkflowInvocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// WorkspaceIterator manages a stream of *dataformpb.Workspace. +type WorkspaceIterator struct { + items []*dataformpb.Workspace + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dataformpb.Workspace, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *WorkspaceIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *WorkspaceIterator) Next() (*dataformpb.Workspace, error) { + var item *dataformpb.Workspace + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *WorkspaceIterator) bufLen() int { + return len(it.items) +} + +func (it *WorkspaceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dataform/apiv1alpha2/dataform_client_example_test.go b/dataform/apiv1alpha2/dataform_client_example_test.go new file mode 100644 index 000000000000..d0c7782eacef --- /dev/null +++ b/dataform/apiv1alpha2/dataform_client_example_test.go @@ -0,0 +1,1114 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dataform_test + +import ( + "context" + + dataform "cloud.google.com/go/dataform/apiv1alpha2" + "google.golang.org/api/iterator" + dataformpb "google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_ListRepositories() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.ListRepositoriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ListRepositoriesRequest. + } + it := c.ListRepositories(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.GetRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#GetRepositoryRequest. + } + resp, err := c.GetRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.CreateRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#CreateRepositoryRequest. + } + resp, err := c.CreateRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.UpdateRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#UpdateRepositoryRequest. + } + resp, err := c.UpdateRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteRepository() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.DeleteRepositoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#DeleteRepositoryRequest. + } + err = c.DeleteRepository(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_FetchRemoteBranches() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.FetchRemoteBranchesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#FetchRemoteBranchesRequest. + } + resp, err := c.FetchRemoteBranches(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListWorkspaces() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.ListWorkspacesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ListWorkspacesRequest. + } + it := c.ListWorkspaces(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetWorkspace() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.GetWorkspaceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#GetWorkspaceRequest. + } + resp, err := c.GetWorkspace(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateWorkspace() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.CreateWorkspaceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#CreateWorkspaceRequest. + } + resp, err := c.CreateWorkspace(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteWorkspace() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.DeleteWorkspaceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#DeleteWorkspaceRequest. + } + err = c.DeleteWorkspace(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_InstallNpmPackages() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.InstallNpmPackagesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#InstallNpmPackagesRequest. + } + resp, err := c.InstallNpmPackages(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_PullGitCommits() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.PullGitCommitsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#PullGitCommitsRequest. + } + err = c.PullGitCommits(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_PushGitCommits() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.PushGitCommitsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#PushGitCommitsRequest. + } + err = c.PushGitCommits(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_FetchFileGitStatuses() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.FetchFileGitStatusesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#FetchFileGitStatusesRequest. + } + resp, err := c.FetchFileGitStatuses(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_FetchGitAheadBehind() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.FetchGitAheadBehindRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#FetchGitAheadBehindRequest. + } + resp, err := c.FetchGitAheadBehind(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CommitWorkspaceChanges() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.CommitWorkspaceChangesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#CommitWorkspaceChangesRequest. + } + err = c.CommitWorkspaceChanges(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_ResetWorkspaceChanges() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.ResetWorkspaceChangesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ResetWorkspaceChangesRequest. + } + err = c.ResetWorkspaceChanges(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_FetchFileDiff() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.FetchFileDiffRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#FetchFileDiffRequest. + } + resp, err := c.FetchFileDiff(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_QueryDirectoryContents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.QueryDirectoryContentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#QueryDirectoryContentsRequest. + } + it := c.QueryDirectoryContents(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_MakeDirectory() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.MakeDirectoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#MakeDirectoryRequest. + } + resp, err := c.MakeDirectory(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_RemoveDirectory() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.RemoveDirectoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#RemoveDirectoryRequest. + } + err = c.RemoveDirectory(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_MoveDirectory() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.MoveDirectoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#MoveDirectoryRequest. + } + resp, err := c.MoveDirectory(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ReadFile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.ReadFileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ReadFileRequest. + } + resp, err := c.ReadFile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_RemoveFile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.RemoveFileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#RemoveFileRequest. + } + err = c.RemoveFile(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_MoveFile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.MoveFileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#MoveFileRequest. + } + resp, err := c.MoveFile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_WriteFile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.WriteFileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#WriteFileRequest. + } + resp, err := c.WriteFile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListCompilationResults() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.ListCompilationResultsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ListCompilationResultsRequest. + } + it := c.ListCompilationResults(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetCompilationResult() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.GetCompilationResultRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#GetCompilationResultRequest. + } + resp, err := c.GetCompilationResult(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateCompilationResult() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.CreateCompilationResultRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#CreateCompilationResultRequest. + } + resp, err := c.CreateCompilationResult(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_QueryCompilationResultActions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.QueryCompilationResultActionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#QueryCompilationResultActionsRequest. + } + it := c.QueryCompilationResultActions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_ListWorkflowInvocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.ListWorkflowInvocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ListWorkflowInvocationsRequest. + } + it := c.ListWorkflowInvocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetWorkflowInvocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.GetWorkflowInvocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#GetWorkflowInvocationRequest. + } + resp, err := c.GetWorkflowInvocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateWorkflowInvocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.CreateWorkflowInvocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#CreateWorkflowInvocationRequest. + } + resp, err := c.CreateWorkflowInvocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteWorkflowInvocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.DeleteWorkflowInvocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#DeleteWorkflowInvocationRequest. + } + err = c.DeleteWorkflowInvocation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_CancelWorkflowInvocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.CancelWorkflowInvocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#CancelWorkflowInvocationRequest. + } + err = c.CancelWorkflowInvocation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_QueryWorkflowInvocationActions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dataformpb.QueryWorkflowInvocationActionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#QueryWorkflowInvocationActionsRequest. + } + it := c.QueryWorkflowInvocationActions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataform.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/dataform/apiv1alpha2/dataformpb/dataform.pb.go b/dataform/apiv1alpha2/dataformpb/dataform.pb.go new file mode 100644 index 000000000000..5bd02a4a6536 --- /dev/null +++ b/dataform/apiv1alpha2/dataformpb/dataform.pb.go @@ -0,0 +1,9517 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dataform/v1alpha2/dataform.proto + +package dataformpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + interval "google.golang.org/genproto/googleapis/type/interval" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Indicates the status of a Git authentication token. +type Repository_GitRemoteSettings_TokenStatus int32 + +const ( + // Default value. This value is unused. + Repository_GitRemoteSettings_TOKEN_STATUS_UNSPECIFIED Repository_GitRemoteSettings_TokenStatus = 0 + // The token could not be found in Secret Manager (or the Dataform + // Service Account did not have permission to access it). + Repository_GitRemoteSettings_NOT_FOUND Repository_GitRemoteSettings_TokenStatus = 1 + // The token could not be used to authenticate against the Git remote. + Repository_GitRemoteSettings_INVALID Repository_GitRemoteSettings_TokenStatus = 2 + // The token was used successfully to authenticate against the Git remote. + Repository_GitRemoteSettings_VALID Repository_GitRemoteSettings_TokenStatus = 3 +) + +// Enum value maps for Repository_GitRemoteSettings_TokenStatus. +var ( + Repository_GitRemoteSettings_TokenStatus_name = map[int32]string{ + 0: "TOKEN_STATUS_UNSPECIFIED", + 1: "NOT_FOUND", + 2: "INVALID", + 3: "VALID", + } + Repository_GitRemoteSettings_TokenStatus_value = map[string]int32{ + "TOKEN_STATUS_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "INVALID": 2, + "VALID": 3, + } +) + +func (x Repository_GitRemoteSettings_TokenStatus) Enum() *Repository_GitRemoteSettings_TokenStatus { + p := new(Repository_GitRemoteSettings_TokenStatus) + *p = x + return p +} + +func (x Repository_GitRemoteSettings_TokenStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Repository_GitRemoteSettings_TokenStatus) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[0].Descriptor() +} + +func (Repository_GitRemoteSettings_TokenStatus) Type() protoreflect.EnumType { + return &file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[0] +} + +func (x Repository_GitRemoteSettings_TokenStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Repository_GitRemoteSettings_TokenStatus.Descriptor instead. +func (Repository_GitRemoteSettings_TokenStatus) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// Indicates the status of an uncommitted file change. +type FetchFileGitStatusesResponse_UncommittedFileChange_State int32 + +const ( + // Default value. This value is unused. + FetchFileGitStatusesResponse_UncommittedFileChange_STATE_UNSPECIFIED FetchFileGitStatusesResponse_UncommittedFileChange_State = 0 + // The file has been newly added. + FetchFileGitStatusesResponse_UncommittedFileChange_ADDED FetchFileGitStatusesResponse_UncommittedFileChange_State = 1 + // The file has been deleted. + FetchFileGitStatusesResponse_UncommittedFileChange_DELETED FetchFileGitStatusesResponse_UncommittedFileChange_State = 2 + // The file has been modified. + FetchFileGitStatusesResponse_UncommittedFileChange_MODIFIED FetchFileGitStatusesResponse_UncommittedFileChange_State = 3 + // The file contains merge conflicts. + FetchFileGitStatusesResponse_UncommittedFileChange_HAS_CONFLICTS FetchFileGitStatusesResponse_UncommittedFileChange_State = 4 +) + +// Enum value maps for FetchFileGitStatusesResponse_UncommittedFileChange_State. +var ( + FetchFileGitStatusesResponse_UncommittedFileChange_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ADDED", + 2: "DELETED", + 3: "MODIFIED", + 4: "HAS_CONFLICTS", + } + FetchFileGitStatusesResponse_UncommittedFileChange_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ADDED": 1, + "DELETED": 2, + "MODIFIED": 3, + "HAS_CONFLICTS": 4, + } +) + +func (x FetchFileGitStatusesResponse_UncommittedFileChange_State) Enum() *FetchFileGitStatusesResponse_UncommittedFileChange_State { + p := new(FetchFileGitStatusesResponse_UncommittedFileChange_State) + *p = x + return p +} + +func (x FetchFileGitStatusesResponse_UncommittedFileChange_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FetchFileGitStatusesResponse_UncommittedFileChange_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[1].Descriptor() +} + +func (FetchFileGitStatusesResponse_UncommittedFileChange_State) Type() protoreflect.EnumType { + return &file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[1] +} + +func (x FetchFileGitStatusesResponse_UncommittedFileChange_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FetchFileGitStatusesResponse_UncommittedFileChange_State.Descriptor instead. +func (FetchFileGitStatusesResponse_UncommittedFileChange_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{19, 0, 0} +} + +// Indicates the type of this relation. +type CompilationResultAction_Relation_RelationType int32 + +const ( + // Default value. This value is unused. + CompilationResultAction_Relation_RELATION_TYPE_UNSPECIFIED CompilationResultAction_Relation_RelationType = 0 + // The relation is a table. + CompilationResultAction_Relation_TABLE CompilationResultAction_Relation_RelationType = 1 + // The relation is a view. + CompilationResultAction_Relation_VIEW CompilationResultAction_Relation_RelationType = 2 + // The relation is an incrementalized table. + CompilationResultAction_Relation_INCREMENTAL_TABLE CompilationResultAction_Relation_RelationType = 3 + // The relation is a materialized view. + CompilationResultAction_Relation_MATERIALIZED_VIEW CompilationResultAction_Relation_RelationType = 4 +) + +// Enum value maps for CompilationResultAction_Relation_RelationType. +var ( + CompilationResultAction_Relation_RelationType_name = map[int32]string{ + 0: "RELATION_TYPE_UNSPECIFIED", + 1: "TABLE", + 2: "VIEW", + 3: "INCREMENTAL_TABLE", + 4: "MATERIALIZED_VIEW", + } + CompilationResultAction_Relation_RelationType_value = map[string]int32{ + "RELATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "VIEW": 2, + "INCREMENTAL_TABLE": 3, + "MATERIALIZED_VIEW": 4, + } +) + +func (x CompilationResultAction_Relation_RelationType) Enum() *CompilationResultAction_Relation_RelationType { + p := new(CompilationResultAction_Relation_RelationType) + *p = x + return p +} + +func (x CompilationResultAction_Relation_RelationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CompilationResultAction_Relation_RelationType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[2].Descriptor() +} + +func (CompilationResultAction_Relation_RelationType) Type() protoreflect.EnumType { + return &file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[2] +} + +func (x CompilationResultAction_Relation_RelationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CompilationResultAction_Relation_RelationType.Descriptor instead. +func (CompilationResultAction_Relation_RelationType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49, 0, 0} +} + +// Represents the current state of a workflow invocation. +type WorkflowInvocation_State int32 + +const ( + // Default value. This value is unused. + WorkflowInvocation_STATE_UNSPECIFIED WorkflowInvocation_State = 0 + // The workflow invocation is currently running. + WorkflowInvocation_RUNNING WorkflowInvocation_State = 1 + // The workflow invocation succeeded. A terminal state. + WorkflowInvocation_SUCCEEDED WorkflowInvocation_State = 2 + // The workflow invocation was cancelled. A terminal state. + WorkflowInvocation_CANCELLED WorkflowInvocation_State = 3 + // The workflow invocation failed. A terminal state. + WorkflowInvocation_FAILED WorkflowInvocation_State = 4 + // The workflow invocation is being cancelled, but some actions are still + // running. + WorkflowInvocation_CANCELING WorkflowInvocation_State = 5 +) + +// Enum value maps for WorkflowInvocation_State. +var ( + WorkflowInvocation_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "RUNNING", + 2: "SUCCEEDED", + 3: "CANCELLED", + 4: "FAILED", + 5: "CANCELING", + } + WorkflowInvocation_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "CANCELLED": 3, + "FAILED": 4, + "CANCELING": 5, + } +) + +func (x WorkflowInvocation_State) Enum() *WorkflowInvocation_State { + p := new(WorkflowInvocation_State) + *p = x + return p +} + +func (x WorkflowInvocation_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkflowInvocation_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[3].Descriptor() +} + +func (WorkflowInvocation_State) Type() protoreflect.EnumType { + return &file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[3] +} + +func (x WorkflowInvocation_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkflowInvocation_State.Descriptor instead. +func (WorkflowInvocation_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{52, 0} +} + +// Represents the current state of an workflow invocation action. +type WorkflowInvocationAction_State int32 + +const ( + // The action has not yet been considered for invocation. + WorkflowInvocationAction_PENDING WorkflowInvocationAction_State = 0 + // The action is currently running. + WorkflowInvocationAction_RUNNING WorkflowInvocationAction_State = 1 + // Execution of the action was skipped because upstream dependencies did not + // all complete successfully. A terminal state. + WorkflowInvocationAction_SKIPPED WorkflowInvocationAction_State = 2 + // Execution of the action was disabled as per the configuration of the + // corresponding compilation result action. A terminal state. + WorkflowInvocationAction_DISABLED WorkflowInvocationAction_State = 3 + // The action succeeded. A terminal state. + WorkflowInvocationAction_SUCCEEDED WorkflowInvocationAction_State = 4 + // The action was cancelled. A terminal state. + WorkflowInvocationAction_CANCELLED WorkflowInvocationAction_State = 5 + // The action failed. A terminal state. + WorkflowInvocationAction_FAILED WorkflowInvocationAction_State = 6 +) + +// Enum value maps for WorkflowInvocationAction_State. +var ( + WorkflowInvocationAction_State_name = map[int32]string{ + 0: "PENDING", + 1: "RUNNING", + 2: "SKIPPED", + 3: "DISABLED", + 4: "SUCCEEDED", + 5: "CANCELLED", + 6: "FAILED", + } + WorkflowInvocationAction_State_value = map[string]int32{ + "PENDING": 0, + "RUNNING": 1, + "SKIPPED": 2, + "DISABLED": 3, + "SUCCEEDED": 4, + "CANCELLED": 5, + "FAILED": 6, + } +) + +func (x WorkflowInvocationAction_State) Enum() *WorkflowInvocationAction_State { + p := new(WorkflowInvocationAction_State) + *p = x + return p +} + +func (x WorkflowInvocationAction_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkflowInvocationAction_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[4].Descriptor() +} + +func (WorkflowInvocationAction_State) Type() protoreflect.EnumType { + return &file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes[4] +} + +func (x WorkflowInvocationAction_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkflowInvocationAction_State.Descriptor instead. +func (WorkflowInvocationAction_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{59, 0} +} + +// Represents a Dataform Git repository. +type Repository struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The repository's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. If set, configures this repository to be linked to a Git remote. + GitRemoteSettings *Repository_GitRemoteSettings `protobuf:"bytes,2,opt,name=git_remote_settings,json=gitRemoteSettings,proto3" json:"git_remote_settings,omitempty"` +} + +func (x *Repository) Reset() { + *x = Repository{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Repository) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repository) ProtoMessage() {} + +func (x *Repository) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Repository.ProtoReflect.Descriptor instead. +func (*Repository) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{0} +} + +func (x *Repository) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Repository) GetGitRemoteSettings() *Repository_GitRemoteSettings { + if x != nil { + return x.GitRemoteSettings + } + return nil +} + +// `ListRepositories` request message. +type ListRepositoriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location in which to list repositories. Must be in the format + // `projects/*/locations/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Maximum number of repositories to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `ListRepositories` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRepositories` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + // Optional. Filter for the returned list. + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListRepositoriesRequest) Reset() { + *x = ListRepositoriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRepositoriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRepositoriesRequest) ProtoMessage() {} + +func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRepositoriesRequest.ProtoReflect.Descriptor instead. +func (*ListRepositoriesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{1} +} + +func (x *ListRepositoriesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListRepositoriesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRepositoriesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRepositoriesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListRepositoriesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// `ListRepositories` response message. +type ListRepositoriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of repositories. + Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"` + // A token which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations which could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListRepositoriesResponse) Reset() { + *x = ListRepositoriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRepositoriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRepositoriesResponse) ProtoMessage() {} + +func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRepositoriesResponse.ProtoReflect.Descriptor instead. +func (*ListRepositoriesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{2} +} + +func (x *ListRepositoriesResponse) GetRepositories() []*Repository { + if x != nil { + return x.Repositories + } + return nil +} + +func (x *ListRepositoriesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListRepositoriesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// `GetRepository` request message. +type GetRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetRepositoryRequest) Reset() { + *x = GetRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRepositoryRequest) ProtoMessage() {} + +func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRepositoryRequest.ProtoReflect.Descriptor instead. +func (*GetRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{3} +} + +func (x *GetRepositoryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `CreateRepository` request message. +type CreateRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location in which to create the repository. Must be in the format + // `projects/*/locations/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The repository to create. + Repository *Repository `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` + // Required. The ID to use for the repository, which will become the final component of + // the repository's resource name. + RepositoryId string `protobuf:"bytes,3,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` +} + +func (x *CreateRepositoryRequest) Reset() { + *x = CreateRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRepositoryRequest) ProtoMessage() {} + +func (x *CreateRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRepositoryRequest.ProtoReflect.Descriptor instead. +func (*CreateRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateRepositoryRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateRepositoryRequest) GetRepository() *Repository { + if x != nil { + return x.Repository + } + return nil +} + +func (x *CreateRepositoryRequest) GetRepositoryId() string { + if x != nil { + return x.RepositoryId + } + return "" +} + +// `UpdateRepository` request message. +type UpdateRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Specifies the fields to be updated in the repository. If left unset, + // all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Required. The repository to update. + Repository *Repository `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` +} + +func (x *UpdateRepositoryRequest) Reset() { + *x = UpdateRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateRepositoryRequest) ProtoMessage() {} + +func (x *UpdateRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateRepositoryRequest.ProtoReflect.Descriptor instead. +func (*UpdateRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateRepositoryRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateRepositoryRequest) GetRepository() *Repository { + if x != nil { + return x.Repository + } + return nil +} + +// `DeleteRepository` request message. +type DeleteRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If set to true, any child resources of this repository will also be + // deleted. (Otherwise, the request will only succeed if the repository has no + // child resources.) + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteRepositoryRequest) Reset() { + *x = DeleteRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRepositoryRequest) ProtoMessage() {} + +func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRepositoryRequest.ProtoReflect.Descriptor instead. +func (*DeleteRepositoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteRepositoryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteRepositoryRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// `FetchRemoteBranches` request message. +type FetchRemoteBranchesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *FetchRemoteBranchesRequest) Reset() { + *x = FetchRemoteBranchesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchRemoteBranchesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchRemoteBranchesRequest) ProtoMessage() {} + +func (x *FetchRemoteBranchesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchRemoteBranchesRequest.ProtoReflect.Descriptor instead. +func (*FetchRemoteBranchesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{7} +} + +func (x *FetchRemoteBranchesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `FetchRemoteBranches` response message. +type FetchRemoteBranchesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The remote repository's branch names. + Branches []string `protobuf:"bytes,1,rep,name=branches,proto3" json:"branches,omitempty"` +} + +func (x *FetchRemoteBranchesResponse) Reset() { + *x = FetchRemoteBranchesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchRemoteBranchesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchRemoteBranchesResponse) ProtoMessage() {} + +func (x *FetchRemoteBranchesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchRemoteBranchesResponse.ProtoReflect.Descriptor instead. +func (*FetchRemoteBranchesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{8} +} + +func (x *FetchRemoteBranchesResponse) GetBranches() []string { + if x != nil { + return x.Branches + } + return nil +} + +// Represents a Dataform Git workspace. +type Workspace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Workspace) Reset() { + *x = Workspace{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workspace) ProtoMessage() {} + +func (x *Workspace) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workspace.ProtoReflect.Descriptor instead. +func (*Workspace) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{9} +} + +func (x *Workspace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `ListWorkspaces` request message. +type ListWorkspacesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository in which to list workspaces. Must be in the + // format `projects/*/locations/*/repositories/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Maximum number of workspaces to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `ListWorkspaces` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkspaces` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. This field only supports ordering by `name`. If unspecified, the server + // will choose the ordering. If specified, the default order is ascending for + // the `name` field. + OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + // Optional. Filter for the returned list. + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListWorkspacesRequest) Reset() { + *x = ListWorkspacesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesRequest) ProtoMessage() {} + +func (x *ListWorkspacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspacesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{10} +} + +func (x *ListWorkspacesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListWorkspacesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkspacesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListWorkspacesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListWorkspacesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// `ListWorkspaces` response message. +type ListWorkspacesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of workspaces. + Workspaces []*Workspace `protobuf:"bytes,1,rep,name=workspaces,proto3" json:"workspaces,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations which could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListWorkspacesResponse) Reset() { + *x = ListWorkspacesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspacesResponse) ProtoMessage() {} + +func (x *ListWorkspacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkspacesResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspacesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{11} +} + +func (x *ListWorkspacesResponse) GetWorkspaces() []*Workspace { + if x != nil { + return x.Workspaces + } + return nil +} + +func (x *ListWorkspacesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListWorkspacesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// `GetWorkspace` request message. +type GetWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetWorkspaceRequest) Reset() { + *x = GetWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceRequest) ProtoMessage() {} + +func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{12} +} + +func (x *GetWorkspaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `CreateWorkspace` request message. +type CreateWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository in which to create the workspace. Must be in the format + // `projects/*/locations/*/repositories/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The workspace to create. + Workspace *Workspace `protobuf:"bytes,2,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The ID to use for the workspace, which will become the final component of + // the workspace's resource name. + WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` +} + +func (x *CreateWorkspaceRequest) Reset() { + *x = CreateWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkspaceRequest) ProtoMessage() {} + +func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{13} +} + +func (x *CreateWorkspaceRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateWorkspaceRequest) GetWorkspace() *Workspace { + if x != nil { + return x.Workspace + } + return nil +} + +func (x *CreateWorkspaceRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +// `DeleteWorkspace` request message. +type DeleteWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteWorkspaceRequest) Reset() { + *x = DeleteWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWorkspaceRequest) ProtoMessage() {} + +func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*DeleteWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteWorkspaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Represents the author of a Git commit. +type CommitAuthor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The commit author's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The commit author's email address. + EmailAddress string `protobuf:"bytes,2,opt,name=email_address,json=emailAddress,proto3" json:"email_address,omitempty"` +} + +func (x *CommitAuthor) Reset() { + *x = CommitAuthor{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitAuthor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitAuthor) ProtoMessage() {} + +func (x *CommitAuthor) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitAuthor.ProtoReflect.Descriptor instead. +func (*CommitAuthor) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{15} +} + +func (x *CommitAuthor) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CommitAuthor) GetEmailAddress() string { + if x != nil { + return x.EmailAddress + } + return "" +} + +// `PullGitCommits` request message. +type PullGitCommitsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The name of the branch in the Git remote from which to pull commits. + // If left unset, the repository's default branch name will be used. + RemoteBranch string `protobuf:"bytes,2,opt,name=remote_branch,json=remoteBranch,proto3" json:"remote_branch,omitempty"` + // Required. The author of any merge commit which may be created as a result of merging + // fetched Git commits into this workspace. + Author *CommitAuthor `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` +} + +func (x *PullGitCommitsRequest) Reset() { + *x = PullGitCommitsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PullGitCommitsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PullGitCommitsRequest) ProtoMessage() {} + +func (x *PullGitCommitsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PullGitCommitsRequest.ProtoReflect.Descriptor instead. +func (*PullGitCommitsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{16} +} + +func (x *PullGitCommitsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PullGitCommitsRequest) GetRemoteBranch() string { + if x != nil { + return x.RemoteBranch + } + return "" +} + +func (x *PullGitCommitsRequest) GetAuthor() *CommitAuthor { + if x != nil { + return x.Author + } + return nil +} + +// `PushGitCommits` request message. +type PushGitCommitsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The name of the branch in the Git remote to which commits should be pushed. + // If left unset, the repository's default branch name will be used. + RemoteBranch string `protobuf:"bytes,2,opt,name=remote_branch,json=remoteBranch,proto3" json:"remote_branch,omitempty"` +} + +func (x *PushGitCommitsRequest) Reset() { + *x = PushGitCommitsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushGitCommitsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushGitCommitsRequest) ProtoMessage() {} + +func (x *PushGitCommitsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushGitCommitsRequest.ProtoReflect.Descriptor instead. +func (*PushGitCommitsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{17} +} + +func (x *PushGitCommitsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PushGitCommitsRequest) GetRemoteBranch() string { + if x != nil { + return x.RemoteBranch + } + return "" +} + +// `FetchFileGitStatuses` request message. +type FetchFileGitStatusesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *FetchFileGitStatusesRequest) Reset() { + *x = FetchFileGitStatusesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchFileGitStatusesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchFileGitStatusesRequest) ProtoMessage() {} + +func (x *FetchFileGitStatusesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchFileGitStatusesRequest.ProtoReflect.Descriptor instead. +func (*FetchFileGitStatusesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{18} +} + +func (x *FetchFileGitStatusesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `FetchFileGitStatuses` response message. +type FetchFileGitStatusesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of all files which have uncommitted Git changes. There will only be + // a single entry for any given file. + UncommittedFileChanges []*FetchFileGitStatusesResponse_UncommittedFileChange `protobuf:"bytes,1,rep,name=uncommitted_file_changes,json=uncommittedFileChanges,proto3" json:"uncommitted_file_changes,omitempty"` +} + +func (x *FetchFileGitStatusesResponse) Reset() { + *x = FetchFileGitStatusesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchFileGitStatusesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchFileGitStatusesResponse) ProtoMessage() {} + +func (x *FetchFileGitStatusesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchFileGitStatusesResponse.ProtoReflect.Descriptor instead. +func (*FetchFileGitStatusesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{19} +} + +func (x *FetchFileGitStatusesResponse) GetUncommittedFileChanges() []*FetchFileGitStatusesResponse_UncommittedFileChange { + if x != nil { + return x.UncommittedFileChanges + } + return nil +} + +// `FetchGitAheadBehind` request message. +type FetchGitAheadBehindRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The name of the branch in the Git remote against which this workspace + // should be compared. If left unset, the repository's default branch name + // will be used. + RemoteBranch string `protobuf:"bytes,2,opt,name=remote_branch,json=remoteBranch,proto3" json:"remote_branch,omitempty"` +} + +func (x *FetchGitAheadBehindRequest) Reset() { + *x = FetchGitAheadBehindRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchGitAheadBehindRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchGitAheadBehindRequest) ProtoMessage() {} + +func (x *FetchGitAheadBehindRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchGitAheadBehindRequest.ProtoReflect.Descriptor instead. +func (*FetchGitAheadBehindRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{20} +} + +func (x *FetchGitAheadBehindRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FetchGitAheadBehindRequest) GetRemoteBranch() string { + if x != nil { + return x.RemoteBranch + } + return "" +} + +// `FetchGitAheadBehind` response message. +type FetchGitAheadBehindResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of commits in the remote branch that are not in the workspace. + CommitsAhead int32 `protobuf:"varint,1,opt,name=commits_ahead,json=commitsAhead,proto3" json:"commits_ahead,omitempty"` + // The number of commits in the workspace that are not in the remote branch. + CommitsBehind int32 `protobuf:"varint,2,opt,name=commits_behind,json=commitsBehind,proto3" json:"commits_behind,omitempty"` +} + +func (x *FetchGitAheadBehindResponse) Reset() { + *x = FetchGitAheadBehindResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchGitAheadBehindResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchGitAheadBehindResponse) ProtoMessage() {} + +func (x *FetchGitAheadBehindResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchGitAheadBehindResponse.ProtoReflect.Descriptor instead. +func (*FetchGitAheadBehindResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{21} +} + +func (x *FetchGitAheadBehindResponse) GetCommitsAhead() int32 { + if x != nil { + return x.CommitsAhead + } + return 0 +} + +func (x *FetchGitAheadBehindResponse) GetCommitsBehind() int32 { + if x != nil { + return x.CommitsBehind + } + return 0 +} + +// `CommitWorkspaceChanges` request message. +type CommitWorkspaceChangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The commit's author. + Author *CommitAuthor `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"` + // Optional. The commit's message. + CommitMessage string `protobuf:"bytes,2,opt,name=commit_message,json=commitMessage,proto3" json:"commit_message,omitempty"` + // Optional. Full file paths to commit including filename, rooted at workspace root. If + // left empty, all files will be committed. + Paths []string `protobuf:"bytes,3,rep,name=paths,proto3" json:"paths,omitempty"` +} + +func (x *CommitWorkspaceChangesRequest) Reset() { + *x = CommitWorkspaceChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommitWorkspaceChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommitWorkspaceChangesRequest) ProtoMessage() {} + +func (x *CommitWorkspaceChangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommitWorkspaceChangesRequest.ProtoReflect.Descriptor instead. +func (*CommitWorkspaceChangesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{22} +} + +func (x *CommitWorkspaceChangesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CommitWorkspaceChangesRequest) GetAuthor() *CommitAuthor { + if x != nil { + return x.Author + } + return nil +} + +func (x *CommitWorkspaceChangesRequest) GetCommitMessage() string { + if x != nil { + return x.CommitMessage + } + return "" +} + +func (x *CommitWorkspaceChangesRequest) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + +// `ResetWorkspaceChanges` request message. +type ResetWorkspaceChangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Full file paths to reset back to their committed state including filename, + // rooted at workspace root. If left empty, all files will be reset. + Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` + // Optional. If set to true, untracked files will be deleted. + Clean bool `protobuf:"varint,3,opt,name=clean,proto3" json:"clean,omitempty"` +} + +func (x *ResetWorkspaceChangesRequest) Reset() { + *x = ResetWorkspaceChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResetWorkspaceChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetWorkspaceChangesRequest) ProtoMessage() {} + +func (x *ResetWorkspaceChangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetWorkspaceChangesRequest.ProtoReflect.Descriptor instead. +func (*ResetWorkspaceChangesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{23} +} + +func (x *ResetWorkspaceChangesRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ResetWorkspaceChangesRequest) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + +func (x *ResetWorkspaceChangesRequest) GetClean() bool { + if x != nil { + return x.Clean + } + return false +} + +// `FetchFileDiff` request message. +type FetchFileDiffRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The file's full path including filename, relative to the workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *FetchFileDiffRequest) Reset() { + *x = FetchFileDiffRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchFileDiffRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchFileDiffRequest) ProtoMessage() {} + +func (x *FetchFileDiffRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchFileDiffRequest.ProtoReflect.Descriptor instead. +func (*FetchFileDiffRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{24} +} + +func (x *FetchFileDiffRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *FetchFileDiffRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// `FetchFileDiff` response message. +type FetchFileDiffResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The raw formatted Git diff for the file. + FormattedDiff string `protobuf:"bytes,1,opt,name=formatted_diff,json=formattedDiff,proto3" json:"formatted_diff,omitempty"` +} + +func (x *FetchFileDiffResponse) Reset() { + *x = FetchFileDiffResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchFileDiffResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchFileDiffResponse) ProtoMessage() {} + +func (x *FetchFileDiffResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchFileDiffResponse.ProtoReflect.Descriptor instead. +func (*FetchFileDiffResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{25} +} + +func (x *FetchFileDiffResponse) GetFormattedDiff() string { + if x != nil { + return x.FormattedDiff + } + return "" +} + +// `QueryDirectoryContents` request message. +type QueryDirectoryContentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Optional. The directory's full path including directory name, relative to the + // workspace root. If left unset, the workspace root is used. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Optional. Maximum number of paths to return. The server may return fewer + // items than requested. If unspecified, the server will pick an appropriate + // default. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `QueryDirectoryContents` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDirectoryContents` must match the call that provided the page + // token. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *QueryDirectoryContentsRequest) Reset() { + *x = QueryDirectoryContentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDirectoryContentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDirectoryContentsRequest) ProtoMessage() {} + +func (x *QueryDirectoryContentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryDirectoryContentsRequest.ProtoReflect.Descriptor instead. +func (*QueryDirectoryContentsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{26} +} + +func (x *QueryDirectoryContentsRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *QueryDirectoryContentsRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *QueryDirectoryContentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *QueryDirectoryContentsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// `QueryDirectoryContents` response message. +type QueryDirectoryContentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of entries in the directory. + DirectoryEntries []*QueryDirectoryContentsResponse_DirectoryEntry `protobuf:"bytes,1,rep,name=directory_entries,json=directoryEntries,proto3" json:"directory_entries,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *QueryDirectoryContentsResponse) Reset() { + *x = QueryDirectoryContentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDirectoryContentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDirectoryContentsResponse) ProtoMessage() {} + +func (x *QueryDirectoryContentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryDirectoryContentsResponse.ProtoReflect.Descriptor instead. +func (*QueryDirectoryContentsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{27} +} + +func (x *QueryDirectoryContentsResponse) GetDirectoryEntries() []*QueryDirectoryContentsResponse_DirectoryEntry { + if x != nil { + return x.DirectoryEntries + } + return nil +} + +func (x *QueryDirectoryContentsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// `MakeDirectory` request message. +type MakeDirectoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The directory's full path including directory name, relative to the + // workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *MakeDirectoryRequest) Reset() { + *x = MakeDirectoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MakeDirectoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MakeDirectoryRequest) ProtoMessage() {} + +func (x *MakeDirectoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MakeDirectoryRequest.ProtoReflect.Descriptor instead. +func (*MakeDirectoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{28} +} + +func (x *MakeDirectoryRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *MakeDirectoryRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// `MakeDirectory` response message. +type MakeDirectoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MakeDirectoryResponse) Reset() { + *x = MakeDirectoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MakeDirectoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MakeDirectoryResponse) ProtoMessage() {} + +func (x *MakeDirectoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MakeDirectoryResponse.ProtoReflect.Descriptor instead. +func (*MakeDirectoryResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{29} +} + +// `RemoveDirectory` request message. +type RemoveDirectoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The directory's full path including directory name, relative to the + // workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *RemoveDirectoryRequest) Reset() { + *x = RemoveDirectoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveDirectoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveDirectoryRequest) ProtoMessage() {} + +func (x *RemoveDirectoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveDirectoryRequest.ProtoReflect.Descriptor instead. +func (*RemoveDirectoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{30} +} + +func (x *RemoveDirectoryRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *RemoveDirectoryRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// `MoveDirectory` request message. +type MoveDirectoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The directory's full path including directory name, relative to the + // workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Required. The new path for the directory including directory name, rooted at + // workspace root. + NewPath string `protobuf:"bytes,3,opt,name=new_path,json=newPath,proto3" json:"new_path,omitempty"` +} + +func (x *MoveDirectoryRequest) Reset() { + *x = MoveDirectoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveDirectoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveDirectoryRequest) ProtoMessage() {} + +func (x *MoveDirectoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveDirectoryRequest.ProtoReflect.Descriptor instead. +func (*MoveDirectoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{31} +} + +func (x *MoveDirectoryRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *MoveDirectoryRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *MoveDirectoryRequest) GetNewPath() string { + if x != nil { + return x.NewPath + } + return "" +} + +// `MoveDirectory` response message. +type MoveDirectoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveDirectoryResponse) Reset() { + *x = MoveDirectoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveDirectoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveDirectoryResponse) ProtoMessage() {} + +func (x *MoveDirectoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveDirectoryResponse.ProtoReflect.Descriptor instead. +func (*MoveDirectoryResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{32} +} + +// `ReadFile` request message. +type ReadFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The file's full path including filename, relative to the workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *ReadFileRequest) Reset() { + *x = ReadFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadFileRequest) ProtoMessage() {} + +func (x *ReadFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadFileRequest.ProtoReflect.Descriptor instead. +func (*ReadFileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{33} +} + +func (x *ReadFileRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *ReadFileRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// `ReadFile` response message. +type ReadFileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The file's contents. + FileContents []byte `protobuf:"bytes,1,opt,name=file_contents,json=fileContents,proto3" json:"file_contents,omitempty"` +} + +func (x *ReadFileResponse) Reset() { + *x = ReadFileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadFileResponse) ProtoMessage() {} + +func (x *ReadFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadFileResponse.ProtoReflect.Descriptor instead. +func (*ReadFileResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{34} +} + +func (x *ReadFileResponse) GetFileContents() []byte { + if x != nil { + return x.FileContents + } + return nil +} + +// `RemoveFile` request message. +type RemoveFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The file's full path including filename, relative to the workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *RemoveFileRequest) Reset() { + *x = RemoveFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveFileRequest) ProtoMessage() {} + +func (x *RemoveFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveFileRequest.ProtoReflect.Descriptor instead. +func (*RemoveFileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{35} +} + +func (x *RemoveFileRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *RemoveFileRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// `MoveFile` request message. +type MoveFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The file's full path including filename, relative to the workspace root. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Required. The file's new path including filename, relative to the workspace root. + NewPath string `protobuf:"bytes,3,opt,name=new_path,json=newPath,proto3" json:"new_path,omitempty"` +} + +func (x *MoveFileRequest) Reset() { + *x = MoveFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveFileRequest) ProtoMessage() {} + +func (x *MoveFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveFileRequest.ProtoReflect.Descriptor instead. +func (*MoveFileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{36} +} + +func (x *MoveFileRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *MoveFileRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *MoveFileRequest) GetNewPath() string { + if x != nil { + return x.NewPath + } + return "" +} + +// `MoveFile` response message. +type MoveFileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MoveFileResponse) Reset() { + *x = MoveFileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MoveFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MoveFileResponse) ProtoMessage() {} + +func (x *MoveFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MoveFileResponse.ProtoReflect.Descriptor instead. +func (*MoveFileResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{37} +} + +// `WriteFile` request message. +type WriteFileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` + // Required. The file. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Required. The file's contents. + Contents []byte `protobuf:"bytes,3,opt,name=contents,proto3" json:"contents,omitempty"` +} + +func (x *WriteFileRequest) Reset() { + *x = WriteFileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteFileRequest) ProtoMessage() {} + +func (x *WriteFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteFileRequest.ProtoReflect.Descriptor instead. +func (*WriteFileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{38} +} + +func (x *WriteFileRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +func (x *WriteFileRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *WriteFileRequest) GetContents() []byte { + if x != nil { + return x.Contents + } + return nil +} + +// `WriteFile` response message. +type WriteFileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteFileResponse) Reset() { + *x = WriteFileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteFileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteFileResponse) ProtoMessage() {} + +func (x *WriteFileResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteFileResponse.ProtoReflect.Descriptor instead. +func (*WriteFileResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{39} +} + +// `InstallNpmPackages` request message. +type InstallNpmPackagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workspace's name. + Workspace string `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` +} + +func (x *InstallNpmPackagesRequest) Reset() { + *x = InstallNpmPackagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstallNpmPackagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallNpmPackagesRequest) ProtoMessage() {} + +func (x *InstallNpmPackagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallNpmPackagesRequest.ProtoReflect.Descriptor instead. +func (*InstallNpmPackagesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{40} +} + +func (x *InstallNpmPackagesRequest) GetWorkspace() string { + if x != nil { + return x.Workspace + } + return "" +} + +// `InstallNpmPackages` response message. +type InstallNpmPackagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InstallNpmPackagesResponse) Reset() { + *x = InstallNpmPackagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstallNpmPackagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallNpmPackagesResponse) ProtoMessage() {} + +func (x *InstallNpmPackagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InstallNpmPackagesResponse.ProtoReflect.Descriptor instead. +func (*InstallNpmPackagesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{41} +} + +// Represents the result of compiling a Dataform project. +type CompilationResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The compilation result's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are assignable to Source: + // + // *CompilationResult_GitCommitish + // *CompilationResult_Workspace + Source isCompilationResult_Source `protobuf_oneof:"source"` + // Immutable. If set, fields of `code_compilation_overrides` override the default + // compilation settings that are specified in dataform.json. + CodeCompilationConfig *CompilationResult_CodeCompilationConfig `protobuf:"bytes,4,opt,name=code_compilation_config,json=codeCompilationConfig,proto3" json:"code_compilation_config,omitempty"` + // Output only. The version of `@dataform/core` that was used for compilation. + DataformCoreVersion string `protobuf:"bytes,5,opt,name=dataform_core_version,json=dataformCoreVersion,proto3" json:"dataform_core_version,omitempty"` + // Output only. Errors encountered during project compilation. + CompilationErrors []*CompilationResult_CompilationError `protobuf:"bytes,6,rep,name=compilation_errors,json=compilationErrors,proto3" json:"compilation_errors,omitempty"` +} + +func (x *CompilationResult) Reset() { + *x = CompilationResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResult) ProtoMessage() {} + +func (x *CompilationResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResult.ProtoReflect.Descriptor instead. +func (*CompilationResult) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{42} +} + +func (x *CompilationResult) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *CompilationResult) GetSource() isCompilationResult_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *CompilationResult) GetGitCommitish() string { + if x, ok := x.GetSource().(*CompilationResult_GitCommitish); ok { + return x.GitCommitish + } + return "" +} + +func (x *CompilationResult) GetWorkspace() string { + if x, ok := x.GetSource().(*CompilationResult_Workspace); ok { + return x.Workspace + } + return "" +} + +func (x *CompilationResult) GetCodeCompilationConfig() *CompilationResult_CodeCompilationConfig { + if x != nil { + return x.CodeCompilationConfig + } + return nil +} + +func (x *CompilationResult) GetDataformCoreVersion() string { + if x != nil { + return x.DataformCoreVersion + } + return "" +} + +func (x *CompilationResult) GetCompilationErrors() []*CompilationResult_CompilationError { + if x != nil { + return x.CompilationErrors + } + return nil +} + +type isCompilationResult_Source interface { + isCompilationResult_Source() +} + +type CompilationResult_GitCommitish struct { + // Immutable. Git commit/tag/branch name at which the repository should be compiled. + // Must exist in the remote repository. + // Examples: + // - a commit SHA: `12ade345` + // - a tag: `tag1` + // - a branch name: `branch1` + GitCommitish string `protobuf:"bytes,2,opt,name=git_commitish,json=gitCommitish,proto3,oneof"` +} + +type CompilationResult_Workspace struct { + // Immutable. The name of the workspace to compile. Must be in the format + // `projects/*/locations/*/repositories/*/workspaces/*`. + Workspace string `protobuf:"bytes,3,opt,name=workspace,proto3,oneof"` +} + +func (*CompilationResult_GitCommitish) isCompilationResult_Source() {} + +func (*CompilationResult_Workspace) isCompilationResult_Source() {} + +// `ListCompilationResults` request message. +type ListCompilationResultsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository in which to list compilation results. Must be in the + // format `projects/*/locations/*/repositories/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `ListCompilationResults` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCompilationResults` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListCompilationResultsRequest) Reset() { + *x = ListCompilationResultsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCompilationResultsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCompilationResultsRequest) ProtoMessage() {} + +func (x *ListCompilationResultsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCompilationResultsRequest.ProtoReflect.Descriptor instead. +func (*ListCompilationResultsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{43} +} + +func (x *ListCompilationResultsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListCompilationResultsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListCompilationResultsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// `ListCompilationResults` response message. +type ListCompilationResultsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of compilation results. + CompilationResults []*CompilationResult `protobuf:"bytes,1,rep,name=compilation_results,json=compilationResults,proto3" json:"compilation_results,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations which could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListCompilationResultsResponse) Reset() { + *x = ListCompilationResultsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCompilationResultsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCompilationResultsResponse) ProtoMessage() {} + +func (x *ListCompilationResultsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCompilationResultsResponse.ProtoReflect.Descriptor instead. +func (*ListCompilationResultsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{44} +} + +func (x *ListCompilationResultsResponse) GetCompilationResults() []*CompilationResult { + if x != nil { + return x.CompilationResults + } + return nil +} + +func (x *ListCompilationResultsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListCompilationResultsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// `GetCompilationResult` request message. +type GetCompilationResultRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The compilation result's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetCompilationResultRequest) Reset() { + *x = GetCompilationResultRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCompilationResultRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCompilationResultRequest) ProtoMessage() {} + +func (x *GetCompilationResultRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCompilationResultRequest.ProtoReflect.Descriptor instead. +func (*GetCompilationResultRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{45} +} + +func (x *GetCompilationResultRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `CreateCompilationResult` request message. +type CreateCompilationResultRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The repository in which to create the compilation result. Must be in the + // format `projects/*/locations/*/repositories/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The compilation result to create. + CompilationResult *CompilationResult `protobuf:"bytes,2,opt,name=compilation_result,json=compilationResult,proto3" json:"compilation_result,omitempty"` +} + +func (x *CreateCompilationResultRequest) Reset() { + *x = CreateCompilationResultRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateCompilationResultRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateCompilationResultRequest) ProtoMessage() {} + +func (x *CreateCompilationResultRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateCompilationResultRequest.ProtoReflect.Descriptor instead. +func (*CreateCompilationResultRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{46} +} + +func (x *CreateCompilationResultRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateCompilationResultRequest) GetCompilationResult() *CompilationResult { + if x != nil { + return x.CompilationResult + } + return nil +} + +// Represents an action identifier. If the action writes output, the output +// will be written to the referenced database object. +type Target struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The action's database (Google Cloud project ID) . + Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` + // The action's schema (BigQuery dataset ID), within `database`. + Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // The action's name, within `database` and `schema`. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Target) Reset() { + *x = Target{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Target) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Target) ProtoMessage() {} + +func (x *Target) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Target.ProtoReflect.Descriptor instead. +func (*Target) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{47} +} + +func (x *Target) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *Target) GetSchema() string { + if x != nil { + return x.Schema + } + return "" +} + +func (x *Target) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Describes a relation and its columns. +type RelationDescriptor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A text description of the relation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // A list of descriptions of columns within the relation. + Columns []*RelationDescriptor_ColumnDescriptor `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` + // A set of BigQuery labels that should be applied to the relation. + BigqueryLabels map[string]string `protobuf:"bytes,3,rep,name=bigquery_labels,json=bigqueryLabels,proto3" json:"bigquery_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *RelationDescriptor) Reset() { + *x = RelationDescriptor{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelationDescriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationDescriptor) ProtoMessage() {} + +func (x *RelationDescriptor) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelationDescriptor.ProtoReflect.Descriptor instead. +func (*RelationDescriptor) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{48} +} + +func (x *RelationDescriptor) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *RelationDescriptor) GetColumns() []*RelationDescriptor_ColumnDescriptor { + if x != nil { + return x.Columns + } + return nil +} + +func (x *RelationDescriptor) GetBigqueryLabels() map[string]string { + if x != nil { + return x.BigqueryLabels + } + return nil +} + +// Represents a single Dataform action in a compilation result. +type CompilationResultAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This action's identifier. Unique within the compilation result. + Target *Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + // The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + CanonicalTarget *Target `protobuf:"bytes,2,opt,name=canonical_target,json=canonicalTarget,proto3" json:"canonical_target,omitempty"` + // The full path including filename in which this action is located, relative + // to the workspace root. + FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + // Types that are assignable to CompiledObject: + // + // *CompilationResultAction_Relation_ + // *CompilationResultAction_Operations_ + // *CompilationResultAction_Assertion_ + // *CompilationResultAction_Declaration_ + CompiledObject isCompilationResultAction_CompiledObject `protobuf_oneof:"compiled_object"` +} + +func (x *CompilationResultAction) Reset() { + *x = CompilationResultAction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResultAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResultAction) ProtoMessage() {} + +func (x *CompilationResultAction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResultAction.ProtoReflect.Descriptor instead. +func (*CompilationResultAction) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49} +} + +func (x *CompilationResultAction) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *CompilationResultAction) GetCanonicalTarget() *Target { + if x != nil { + return x.CanonicalTarget + } + return nil +} + +func (x *CompilationResultAction) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (m *CompilationResultAction) GetCompiledObject() isCompilationResultAction_CompiledObject { + if m != nil { + return m.CompiledObject + } + return nil +} + +func (x *CompilationResultAction) GetRelation() *CompilationResultAction_Relation { + if x, ok := x.GetCompiledObject().(*CompilationResultAction_Relation_); ok { + return x.Relation + } + return nil +} + +func (x *CompilationResultAction) GetOperations() *CompilationResultAction_Operations { + if x, ok := x.GetCompiledObject().(*CompilationResultAction_Operations_); ok { + return x.Operations + } + return nil +} + +func (x *CompilationResultAction) GetAssertion() *CompilationResultAction_Assertion { + if x, ok := x.GetCompiledObject().(*CompilationResultAction_Assertion_); ok { + return x.Assertion + } + return nil +} + +func (x *CompilationResultAction) GetDeclaration() *CompilationResultAction_Declaration { + if x, ok := x.GetCompiledObject().(*CompilationResultAction_Declaration_); ok { + return x.Declaration + } + return nil +} + +type isCompilationResultAction_CompiledObject interface { + isCompilationResultAction_CompiledObject() +} + +type CompilationResultAction_Relation_ struct { + // The database relation created/updated by this action. + Relation *CompilationResultAction_Relation `protobuf:"bytes,4,opt,name=relation,proto3,oneof"` +} + +type CompilationResultAction_Operations_ struct { + // The database operations executed by this action. + Operations *CompilationResultAction_Operations `protobuf:"bytes,5,opt,name=operations,proto3,oneof"` +} + +type CompilationResultAction_Assertion_ struct { + // The assertion executed by this action. + Assertion *CompilationResultAction_Assertion `protobuf:"bytes,6,opt,name=assertion,proto3,oneof"` +} + +type CompilationResultAction_Declaration_ struct { + // The declaration declared by this action. + Declaration *CompilationResultAction_Declaration `protobuf:"bytes,7,opt,name=declaration,proto3,oneof"` +} + +func (*CompilationResultAction_Relation_) isCompilationResultAction_CompiledObject() {} + +func (*CompilationResultAction_Operations_) isCompilationResultAction_CompiledObject() {} + +func (*CompilationResultAction_Assertion_) isCompilationResultAction_CompiledObject() {} + +func (*CompilationResultAction_Declaration_) isCompilationResultAction_CompiledObject() {} + +// `QueryCompilationResultActions` request message. +type QueryCompilationResultActionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The compilation result's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Maximum number of compilation results to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `QueryCompilationResultActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryCompilationResultActions` must match the call that provided the page + // token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Optional filter for the returned list. Filtering is only currently + // supported on the `file_path` field. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *QueryCompilationResultActionsRequest) Reset() { + *x = QueryCompilationResultActionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCompilationResultActionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCompilationResultActionsRequest) ProtoMessage() {} + +func (x *QueryCompilationResultActionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryCompilationResultActionsRequest.ProtoReflect.Descriptor instead. +func (*QueryCompilationResultActionsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{50} +} + +func (x *QueryCompilationResultActionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *QueryCompilationResultActionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *QueryCompilationResultActionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *QueryCompilationResultActionsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// `QueryCompilationResultActions` response message. +type QueryCompilationResultActionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of compilation result actions. + CompilationResultActions []*CompilationResultAction `protobuf:"bytes,1,rep,name=compilation_result_actions,json=compilationResultActions,proto3" json:"compilation_result_actions,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *QueryCompilationResultActionsResponse) Reset() { + *x = QueryCompilationResultActionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCompilationResultActionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCompilationResultActionsResponse) ProtoMessage() {} + +func (x *QueryCompilationResultActionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryCompilationResultActionsResponse.ProtoReflect.Descriptor instead. +func (*QueryCompilationResultActionsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{51} +} + +func (x *QueryCompilationResultActionsResponse) GetCompilationResultActions() []*CompilationResultAction { + if x != nil { + return x.CompilationResultActions + } + return nil +} + +func (x *QueryCompilationResultActionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Represents a single invocation of a compilation result. +type WorkflowInvocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The workflow invocation's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Immutable. The name of the compilation result to compile. Must be in the format + // `projects/*/locations/*/repositories/*/compilationResults/*`. + CompilationResult string `protobuf:"bytes,2,opt,name=compilation_result,json=compilationResult,proto3" json:"compilation_result,omitempty"` + // Immutable. If left unset, a default InvocationConfig will be used. + InvocationConfig *WorkflowInvocation_InvocationConfig `protobuf:"bytes,3,opt,name=invocation_config,json=invocationConfig,proto3" json:"invocation_config,omitempty"` + // Output only. This workflow invocation's current state. + State WorkflowInvocation_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.dataform.v1alpha2.WorkflowInvocation_State" json:"state,omitempty"` + // Output only. This workflow invocation's timing details. + InvocationTiming *interval.Interval `protobuf:"bytes,5,opt,name=invocation_timing,json=invocationTiming,proto3" json:"invocation_timing,omitempty"` +} + +func (x *WorkflowInvocation) Reset() { + *x = WorkflowInvocation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowInvocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowInvocation) ProtoMessage() {} + +func (x *WorkflowInvocation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowInvocation.ProtoReflect.Descriptor instead. +func (*WorkflowInvocation) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{52} +} + +func (x *WorkflowInvocation) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkflowInvocation) GetCompilationResult() string { + if x != nil { + return x.CompilationResult + } + return "" +} + +func (x *WorkflowInvocation) GetInvocationConfig() *WorkflowInvocation_InvocationConfig { + if x != nil { + return x.InvocationConfig + } + return nil +} + +func (x *WorkflowInvocation) GetState() WorkflowInvocation_State { + if x != nil { + return x.State + } + return WorkflowInvocation_STATE_UNSPECIFIED +} + +func (x *WorkflowInvocation) GetInvocationTiming() *interval.Interval { + if x != nil { + return x.InvocationTiming + } + return nil +} + +// `ListWorkflowInvocations` request message. +type ListWorkflowInvocationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent resource of the WorkflowInvocation type. Must be in the + // format `projects/*/locations/*/repositories/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `ListWorkflowInvocations` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListWorkflowInvocations` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListWorkflowInvocationsRequest) Reset() { + *x = ListWorkflowInvocationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowInvocationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowInvocationsRequest) ProtoMessage() {} + +func (x *ListWorkflowInvocationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkflowInvocationsRequest.ProtoReflect.Descriptor instead. +func (*ListWorkflowInvocationsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{53} +} + +func (x *ListWorkflowInvocationsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListWorkflowInvocationsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkflowInvocationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// `ListWorkflowInvocations` response message. +type ListWorkflowInvocationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of workflow invocations. + WorkflowInvocations []*WorkflowInvocation `protobuf:"bytes,1,rep,name=workflow_invocations,json=workflowInvocations,proto3" json:"workflow_invocations,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations which could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListWorkflowInvocationsResponse) Reset() { + *x = ListWorkflowInvocationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowInvocationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowInvocationsResponse) ProtoMessage() {} + +func (x *ListWorkflowInvocationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkflowInvocationsResponse.ProtoReflect.Descriptor instead. +func (*ListWorkflowInvocationsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{54} +} + +func (x *ListWorkflowInvocationsResponse) GetWorkflowInvocations() []*WorkflowInvocation { + if x != nil { + return x.WorkflowInvocations + } + return nil +} + +func (x *ListWorkflowInvocationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListWorkflowInvocationsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// `GetWorkflowInvocation` request message. +type GetWorkflowInvocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workflow invocation resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetWorkflowInvocationRequest) Reset() { + *x = GetWorkflowInvocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowInvocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowInvocationRequest) ProtoMessage() {} + +func (x *GetWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkflowInvocationRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowInvocationRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{55} +} + +func (x *GetWorkflowInvocationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `CreateWorkflowInvocation` request message. +type CreateWorkflowInvocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent resource of the WorkflowInvocation type. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The workflow invocation resource to create. + WorkflowInvocation *WorkflowInvocation `protobuf:"bytes,2,opt,name=workflow_invocation,json=workflowInvocation,proto3" json:"workflow_invocation,omitempty"` +} + +func (x *CreateWorkflowInvocationRequest) Reset() { + *x = CreateWorkflowInvocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkflowInvocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkflowInvocationRequest) ProtoMessage() {} + +func (x *CreateWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkflowInvocationRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkflowInvocationRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{56} +} + +func (x *CreateWorkflowInvocationRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateWorkflowInvocationRequest) GetWorkflowInvocation() *WorkflowInvocation { + if x != nil { + return x.WorkflowInvocation + } + return nil +} + +// `DeleteWorkflowInvocation` request message. +type DeleteWorkflowInvocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workflow invocation resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteWorkflowInvocationRequest) Reset() { + *x = DeleteWorkflowInvocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteWorkflowInvocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWorkflowInvocationRequest) ProtoMessage() {} + +func (x *DeleteWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteWorkflowInvocationRequest.ProtoReflect.Descriptor instead. +func (*DeleteWorkflowInvocationRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{57} +} + +func (x *DeleteWorkflowInvocationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// `CancelWorkflowInvocation` request message. +type CancelWorkflowInvocationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workflow invocation resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *CancelWorkflowInvocationRequest) Reset() { + *x = CancelWorkflowInvocationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelWorkflowInvocationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelWorkflowInvocationRequest) ProtoMessage() {} + +func (x *CancelWorkflowInvocationRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelWorkflowInvocationRequest.ProtoReflect.Descriptor instead. +func (*CancelWorkflowInvocationRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{58} +} + +func (x *CancelWorkflowInvocationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Represents a single action in a workflow invocation. +type WorkflowInvocationAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. This action's identifier. Unique within the workflow invocation. + Target *Target `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + // Output only. The action's identifier if the project had been compiled without any + // overrides configured. Unique within the compilation result. + CanonicalTarget *Target `protobuf:"bytes,2,opt,name=canonical_target,json=canonicalTarget,proto3" json:"canonical_target,omitempty"` + // Output only. This action's current state. + State WorkflowInvocationAction_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.dataform.v1alpha2.WorkflowInvocationAction_State" json:"state,omitempty"` + // Output only. If and only if action's state is FAILED a failure reason is set. + FailureReason string `protobuf:"bytes,7,opt,name=failure_reason,json=failureReason,proto3" json:"failure_reason,omitempty"` + // Output only. This action's timing details. + // `start_time` will be set if the action is in [RUNNING, SUCCEEDED, + // CANCELLED, FAILED] state. + // `end_time` will be set if the action is in [SUCCEEDED, CANCELLED, FAILED] + // state. + InvocationTiming *interval.Interval `protobuf:"bytes,5,opt,name=invocation_timing,json=invocationTiming,proto3" json:"invocation_timing,omitempty"` + // Output only. The workflow action's bigquery action details. + BigqueryAction *WorkflowInvocationAction_BigQueryAction `protobuf:"bytes,6,opt,name=bigquery_action,json=bigqueryAction,proto3" json:"bigquery_action,omitempty"` +} + +func (x *WorkflowInvocationAction) Reset() { + *x = WorkflowInvocationAction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowInvocationAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowInvocationAction) ProtoMessage() {} + +func (x *WorkflowInvocationAction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowInvocationAction.ProtoReflect.Descriptor instead. +func (*WorkflowInvocationAction) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{59} +} + +func (x *WorkflowInvocationAction) GetTarget() *Target { + if x != nil { + return x.Target + } + return nil +} + +func (x *WorkflowInvocationAction) GetCanonicalTarget() *Target { + if x != nil { + return x.CanonicalTarget + } + return nil +} + +func (x *WorkflowInvocationAction) GetState() WorkflowInvocationAction_State { + if x != nil { + return x.State + } + return WorkflowInvocationAction_PENDING +} + +func (x *WorkflowInvocationAction) GetFailureReason() string { + if x != nil { + return x.FailureReason + } + return "" +} + +func (x *WorkflowInvocationAction) GetInvocationTiming() *interval.Interval { + if x != nil { + return x.InvocationTiming + } + return nil +} + +func (x *WorkflowInvocationAction) GetBigqueryAction() *WorkflowInvocationAction_BigQueryAction { + if x != nil { + return x.BigqueryAction + } + return nil +} + +// `QueryWorkflowInvocationActions` request message. +type QueryWorkflowInvocationActionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The workflow invocation's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Maximum number of workflow invocations to return. The server may return + // fewer items than requested. If unspecified, the server will pick an + // appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Page token received from a previous `QueryWorkflowInvocationActions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryWorkflowInvocationActions` must match the call that provided the page + // token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *QueryWorkflowInvocationActionsRequest) Reset() { + *x = QueryWorkflowInvocationActionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryWorkflowInvocationActionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryWorkflowInvocationActionsRequest) ProtoMessage() {} + +func (x *QueryWorkflowInvocationActionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryWorkflowInvocationActionsRequest.ProtoReflect.Descriptor instead. +func (*QueryWorkflowInvocationActionsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{60} +} + +func (x *QueryWorkflowInvocationActionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *QueryWorkflowInvocationActionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *QueryWorkflowInvocationActionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// `QueryWorkflowInvocationActions` response message. +type QueryWorkflowInvocationActionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of workflow invocation actions. + WorkflowInvocationActions []*WorkflowInvocationAction `protobuf:"bytes,1,rep,name=workflow_invocation_actions,json=workflowInvocationActions,proto3" json:"workflow_invocation_actions,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *QueryWorkflowInvocationActionsResponse) Reset() { + *x = QueryWorkflowInvocationActionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryWorkflowInvocationActionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryWorkflowInvocationActionsResponse) ProtoMessage() {} + +func (x *QueryWorkflowInvocationActionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryWorkflowInvocationActionsResponse.ProtoReflect.Descriptor instead. +func (*QueryWorkflowInvocationActionsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{61} +} + +func (x *QueryWorkflowInvocationActionsResponse) GetWorkflowInvocationActions() []*WorkflowInvocationAction { + if x != nil { + return x.WorkflowInvocationActions + } + return nil +} + +func (x *QueryWorkflowInvocationActionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Controls Git remote configuration for a repository. +type Repository_GitRemoteSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The Git remote's URL. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // Required. The Git remote's default branch name. + DefaultBranch string `protobuf:"bytes,2,opt,name=default_branch,json=defaultBranch,proto3" json:"default_branch,omitempty"` + // Required. The name of the Secret Manager secret version to use as an + // authentication token for Git operations. Must be in the format + // `projects/*/secrets/*/versions/*`. + AuthenticationTokenSecretVersion string `protobuf:"bytes,3,opt,name=authentication_token_secret_version,json=authenticationTokenSecretVersion,proto3" json:"authentication_token_secret_version,omitempty"` + // Output only. Indicates the status of the Git access token. + TokenStatus Repository_GitRemoteSettings_TokenStatus `protobuf:"varint,4,opt,name=token_status,json=tokenStatus,proto3,enum=google.cloud.dataform.v1alpha2.Repository_GitRemoteSettings_TokenStatus" json:"token_status,omitempty"` +} + +func (x *Repository_GitRemoteSettings) Reset() { + *x = Repository_GitRemoteSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Repository_GitRemoteSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repository_GitRemoteSettings) ProtoMessage() {} + +func (x *Repository_GitRemoteSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Repository_GitRemoteSettings.ProtoReflect.Descriptor instead. +func (*Repository_GitRemoteSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Repository_GitRemoteSettings) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Repository_GitRemoteSettings) GetDefaultBranch() string { + if x != nil { + return x.DefaultBranch + } + return "" +} + +func (x *Repository_GitRemoteSettings) GetAuthenticationTokenSecretVersion() string { + if x != nil { + return x.AuthenticationTokenSecretVersion + } + return "" +} + +func (x *Repository_GitRemoteSettings) GetTokenStatus() Repository_GitRemoteSettings_TokenStatus { + if x != nil { + return x.TokenStatus + } + return Repository_GitRemoteSettings_TOKEN_STATUS_UNSPECIFIED +} + +// Represents the Git state of a file with uncommitted changes. +type FetchFileGitStatusesResponse_UncommittedFileChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The file's full path including filename, relative to the workspace root. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Indicates the status of the file. + State FetchFileGitStatusesResponse_UncommittedFileChange_State `protobuf:"varint,2,opt,name=state,proto3,enum=google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse_UncommittedFileChange_State" json:"state,omitempty"` +} + +func (x *FetchFileGitStatusesResponse_UncommittedFileChange) Reset() { + *x = FetchFileGitStatusesResponse_UncommittedFileChange{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchFileGitStatusesResponse_UncommittedFileChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchFileGitStatusesResponse_UncommittedFileChange) ProtoMessage() {} + +func (x *FetchFileGitStatusesResponse_UncommittedFileChange) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchFileGitStatusesResponse_UncommittedFileChange.ProtoReflect.Descriptor instead. +func (*FetchFileGitStatusesResponse_UncommittedFileChange) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *FetchFileGitStatusesResponse_UncommittedFileChange) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *FetchFileGitStatusesResponse_UncommittedFileChange) GetState() FetchFileGitStatusesResponse_UncommittedFileChange_State { + if x != nil { + return x.State + } + return FetchFileGitStatusesResponse_UncommittedFileChange_STATE_UNSPECIFIED +} + +// Represents a single entry in a workspace directory. +type QueryDirectoryContentsResponse_DirectoryEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Entry: + // + // *QueryDirectoryContentsResponse_DirectoryEntry_File + // *QueryDirectoryContentsResponse_DirectoryEntry_Directory + Entry isQueryDirectoryContentsResponse_DirectoryEntry_Entry `protobuf_oneof:"entry"` +} + +func (x *QueryDirectoryContentsResponse_DirectoryEntry) Reset() { + *x = QueryDirectoryContentsResponse_DirectoryEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryDirectoryContentsResponse_DirectoryEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDirectoryContentsResponse_DirectoryEntry) ProtoMessage() {} + +func (x *QueryDirectoryContentsResponse_DirectoryEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryDirectoryContentsResponse_DirectoryEntry.ProtoReflect.Descriptor instead. +func (*QueryDirectoryContentsResponse_DirectoryEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{27, 0} +} + +func (m *QueryDirectoryContentsResponse_DirectoryEntry) GetEntry() isQueryDirectoryContentsResponse_DirectoryEntry_Entry { + if m != nil { + return m.Entry + } + return nil +} + +func (x *QueryDirectoryContentsResponse_DirectoryEntry) GetFile() string { + if x, ok := x.GetEntry().(*QueryDirectoryContentsResponse_DirectoryEntry_File); ok { + return x.File + } + return "" +} + +func (x *QueryDirectoryContentsResponse_DirectoryEntry) GetDirectory() string { + if x, ok := x.GetEntry().(*QueryDirectoryContentsResponse_DirectoryEntry_Directory); ok { + return x.Directory + } + return "" +} + +type isQueryDirectoryContentsResponse_DirectoryEntry_Entry interface { + isQueryDirectoryContentsResponse_DirectoryEntry_Entry() +} + +type QueryDirectoryContentsResponse_DirectoryEntry_File struct { + // A file in the directory. + File string `protobuf:"bytes,1,opt,name=file,proto3,oneof"` +} + +type QueryDirectoryContentsResponse_DirectoryEntry_Directory struct { + // A child directory in the directory. + Directory string `protobuf:"bytes,2,opt,name=directory,proto3,oneof"` +} + +func (*QueryDirectoryContentsResponse_DirectoryEntry_File) isQueryDirectoryContentsResponse_DirectoryEntry_Entry() { +} + +func (*QueryDirectoryContentsResponse_DirectoryEntry_Directory) isQueryDirectoryContentsResponse_DirectoryEntry_Entry() { +} + +// Configures various aspects of Dataform code compilation. +type CompilationResult_CodeCompilationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The default database (Google Cloud project ID). + DefaultDatabase string `protobuf:"bytes,1,opt,name=default_database,json=defaultDatabase,proto3" json:"default_database,omitempty"` + // Optional. The default schema (BigQuery dataset ID). + DefaultSchema string `protobuf:"bytes,2,opt,name=default_schema,json=defaultSchema,proto3" json:"default_schema,omitempty"` + // Optional. The default BigQuery location to use. Defaults to "US". + // See the BigQuery docs for a full list of locations: + // https://cloud.google.com/bigquery/docs/locations. + DefaultLocation string `protobuf:"bytes,8,opt,name=default_location,json=defaultLocation,proto3" json:"default_location,omitempty"` + // Optional. The default schema (BigQuery dataset ID) for assertions. + AssertionSchema string `protobuf:"bytes,3,opt,name=assertion_schema,json=assertionSchema,proto3" json:"assertion_schema,omitempty"` + // Optional. User-defined variables that are made available to project code during + // compilation. + Vars map[string]string `protobuf:"bytes,4,rep,name=vars,proto3" json:"vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. The suffix that should be appended to all database (Google Cloud project + // ID) names. + DatabaseSuffix string `protobuf:"bytes,5,opt,name=database_suffix,json=databaseSuffix,proto3" json:"database_suffix,omitempty"` + // Optional. The suffix that should be appended to all schema (BigQuery dataset ID) + // names. + SchemaSuffix string `protobuf:"bytes,6,opt,name=schema_suffix,json=schemaSuffix,proto3" json:"schema_suffix,omitempty"` + // Optional. The prefix that should be prepended to all table names. + TablePrefix string `protobuf:"bytes,7,opt,name=table_prefix,json=tablePrefix,proto3" json:"table_prefix,omitempty"` +} + +func (x *CompilationResult_CodeCompilationConfig) Reset() { + *x = CompilationResult_CodeCompilationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResult_CodeCompilationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResult_CodeCompilationConfig) ProtoMessage() {} + +func (x *CompilationResult_CodeCompilationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResult_CodeCompilationConfig.ProtoReflect.Descriptor instead. +func (*CompilationResult_CodeCompilationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{42, 0} +} + +func (x *CompilationResult_CodeCompilationConfig) GetDefaultDatabase() string { + if x != nil { + return x.DefaultDatabase + } + return "" +} + +func (x *CompilationResult_CodeCompilationConfig) GetDefaultSchema() string { + if x != nil { + return x.DefaultSchema + } + return "" +} + +func (x *CompilationResult_CodeCompilationConfig) GetDefaultLocation() string { + if x != nil { + return x.DefaultLocation + } + return "" +} + +func (x *CompilationResult_CodeCompilationConfig) GetAssertionSchema() string { + if x != nil { + return x.AssertionSchema + } + return "" +} + +func (x *CompilationResult_CodeCompilationConfig) GetVars() map[string]string { + if x != nil { + return x.Vars + } + return nil +} + +func (x *CompilationResult_CodeCompilationConfig) GetDatabaseSuffix() string { + if x != nil { + return x.DatabaseSuffix + } + return "" +} + +func (x *CompilationResult_CodeCompilationConfig) GetSchemaSuffix() string { + if x != nil { + return x.SchemaSuffix + } + return "" +} + +func (x *CompilationResult_CodeCompilationConfig) GetTablePrefix() string { + if x != nil { + return x.TablePrefix + } + return "" +} + +// An error encountered when attempting to compile a Dataform project. +type CompilationResult_CompilationError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The error's top level message. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Output only. The error's full stack trace. + Stack string `protobuf:"bytes,2,opt,name=stack,proto3" json:"stack,omitempty"` + // Output only. The path of the file where this error occurred, if available, relative to + // the project root. + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + // Output only. The identifier of the action where this error occurred, if available. + ActionTarget *Target `protobuf:"bytes,4,opt,name=action_target,json=actionTarget,proto3" json:"action_target,omitempty"` +} + +func (x *CompilationResult_CompilationError) Reset() { + *x = CompilationResult_CompilationError{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResult_CompilationError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResult_CompilationError) ProtoMessage() {} + +func (x *CompilationResult_CompilationError) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResult_CompilationError.ProtoReflect.Descriptor instead. +func (*CompilationResult_CompilationError) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{42, 1} +} + +func (x *CompilationResult_CompilationError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *CompilationResult_CompilationError) GetStack() string { + if x != nil { + return x.Stack + } + return "" +} + +func (x *CompilationResult_CompilationError) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CompilationResult_CompilationError) GetActionTarget() *Target { + if x != nil { + return x.ActionTarget + } + return nil +} + +// Describes a column. +type RelationDescriptor_ColumnDescriptor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The identifier for the column. Each entry in `path` represents one level + // of nesting. + Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"` + // A textual description of the column. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // A list of BigQuery policy tags that will be applied to the column. + BigqueryPolicyTags []string `protobuf:"bytes,3,rep,name=bigquery_policy_tags,json=bigqueryPolicyTags,proto3" json:"bigquery_policy_tags,omitempty"` +} + +func (x *RelationDescriptor_ColumnDescriptor) Reset() { + *x = RelationDescriptor_ColumnDescriptor{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelationDescriptor_ColumnDescriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationDescriptor_ColumnDescriptor) ProtoMessage() {} + +func (x *RelationDescriptor_ColumnDescriptor) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelationDescriptor_ColumnDescriptor.ProtoReflect.Descriptor instead. +func (*RelationDescriptor_ColumnDescriptor) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{48, 0} +} + +func (x *RelationDescriptor_ColumnDescriptor) GetPath() []string { + if x != nil { + return x.Path + } + return nil +} + +func (x *RelationDescriptor_ColumnDescriptor) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *RelationDescriptor_ColumnDescriptor) GetBigqueryPolicyTags() []string { + if x != nil { + return x.BigqueryPolicyTags + } + return nil +} + +// Represents a database relation. +type CompilationResultAction_Relation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of actions that this action depends on. + DependencyTargets []*Target `protobuf:"bytes,1,rep,name=dependency_targets,json=dependencyTargets,proto3" json:"dependency_targets,omitempty"` + // Whether this action is disabled (i.e. should not be run). + Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"` + // Arbitrary, user-defined tags on this action. + Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` + // Descriptor for the relation and its columns. + RelationDescriptor *RelationDescriptor `protobuf:"bytes,4,opt,name=relation_descriptor,json=relationDescriptor,proto3" json:"relation_descriptor,omitempty"` + // The type of this relation. + RelationType CompilationResultAction_Relation_RelationType `protobuf:"varint,5,opt,name=relation_type,json=relationType,proto3,enum=google.cloud.dataform.v1alpha2.CompilationResultAction_Relation_RelationType" json:"relation_type,omitempty"` + // The SELECT query which returns rows which this relation should contain. + SelectQuery string `protobuf:"bytes,6,opt,name=select_query,json=selectQuery,proto3" json:"select_query,omitempty"` + // SQL statements to be executed before creating the relation. + PreOperations []string `protobuf:"bytes,7,rep,name=pre_operations,json=preOperations,proto3" json:"pre_operations,omitempty"` + // SQL statements to be executed after creating the relation. + PostOperations []string `protobuf:"bytes,8,rep,name=post_operations,json=postOperations,proto3" json:"post_operations,omitempty"` + // Configures `INCREMENTAL_TABLE` settings for this relation. Only set if + // `relation_type` is `INCREMENTAL_TABLE`. + IncrementalTableConfig *CompilationResultAction_Relation_IncrementalTableConfig `protobuf:"bytes,9,opt,name=incremental_table_config,json=incrementalTableConfig,proto3" json:"incremental_table_config,omitempty"` + // The SQL expression used to partition the relation. + PartitionExpression string `protobuf:"bytes,10,opt,name=partition_expression,json=partitionExpression,proto3" json:"partition_expression,omitempty"` + // A list of columns or SQL expressions used to cluster the table. + ClusterExpressions []string `protobuf:"bytes,11,rep,name=cluster_expressions,json=clusterExpressions,proto3" json:"cluster_expressions,omitempty"` + // Sets the partition expiration in days. + PartitionExpirationDays int32 `protobuf:"varint,12,opt,name=partition_expiration_days,json=partitionExpirationDays,proto3" json:"partition_expiration_days,omitempty"` + // Specifies whether queries on this table must include a predicate filter + // that filters on the partitioning column. + RequirePartitionFilter bool `protobuf:"varint,13,opt,name=require_partition_filter,json=requirePartitionFilter,proto3" json:"require_partition_filter,omitempty"` + // Additional options that will be provided as key/value pairs into the + // options clause of a create table/view statement. See + // https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language + // for more information on which options are supported. + AdditionalOptions map[string]string `protobuf:"bytes,14,rep,name=additional_options,json=additionalOptions,proto3" json:"additional_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CompilationResultAction_Relation) Reset() { + *x = CompilationResultAction_Relation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResultAction_Relation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResultAction_Relation) ProtoMessage() {} + +func (x *CompilationResultAction_Relation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResultAction_Relation.ProtoReflect.Descriptor instead. +func (*CompilationResultAction_Relation) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49, 0} +} + +func (x *CompilationResultAction_Relation) GetDependencyTargets() []*Target { + if x != nil { + return x.DependencyTargets + } + return nil +} + +func (x *CompilationResultAction_Relation) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *CompilationResultAction_Relation) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *CompilationResultAction_Relation) GetRelationDescriptor() *RelationDescriptor { + if x != nil { + return x.RelationDescriptor + } + return nil +} + +func (x *CompilationResultAction_Relation) GetRelationType() CompilationResultAction_Relation_RelationType { + if x != nil { + return x.RelationType + } + return CompilationResultAction_Relation_RELATION_TYPE_UNSPECIFIED +} + +func (x *CompilationResultAction_Relation) GetSelectQuery() string { + if x != nil { + return x.SelectQuery + } + return "" +} + +func (x *CompilationResultAction_Relation) GetPreOperations() []string { + if x != nil { + return x.PreOperations + } + return nil +} + +func (x *CompilationResultAction_Relation) GetPostOperations() []string { + if x != nil { + return x.PostOperations + } + return nil +} + +func (x *CompilationResultAction_Relation) GetIncrementalTableConfig() *CompilationResultAction_Relation_IncrementalTableConfig { + if x != nil { + return x.IncrementalTableConfig + } + return nil +} + +func (x *CompilationResultAction_Relation) GetPartitionExpression() string { + if x != nil { + return x.PartitionExpression + } + return "" +} + +func (x *CompilationResultAction_Relation) GetClusterExpressions() []string { + if x != nil { + return x.ClusterExpressions + } + return nil +} + +func (x *CompilationResultAction_Relation) GetPartitionExpirationDays() int32 { + if x != nil { + return x.PartitionExpirationDays + } + return 0 +} + +func (x *CompilationResultAction_Relation) GetRequirePartitionFilter() bool { + if x != nil { + return x.RequirePartitionFilter + } + return false +} + +func (x *CompilationResultAction_Relation) GetAdditionalOptions() map[string]string { + if x != nil { + return x.AdditionalOptions + } + return nil +} + +// Represents a list of arbitrary database operations. +type CompilationResultAction_Operations struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of actions that this action depends on. + DependencyTargets []*Target `protobuf:"bytes,1,rep,name=dependency_targets,json=dependencyTargets,proto3" json:"dependency_targets,omitempty"` + // Whether this action is disabled (i.e. should not be run). + Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"` + // Arbitrary, user-defined tags on this action. + Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` + // Descriptor for any output relation and its columns. Only set if + // `has_output` is true. + RelationDescriptor *RelationDescriptor `protobuf:"bytes,6,opt,name=relation_descriptor,json=relationDescriptor,proto3" json:"relation_descriptor,omitempty"` + // A list of arbitrary SQL statements that will be executed without + // alteration. + Queries []string `protobuf:"bytes,4,rep,name=queries,proto3" json:"queries,omitempty"` + // Whether these operations produce an output relation. + HasOutput bool `protobuf:"varint,5,opt,name=has_output,json=hasOutput,proto3" json:"has_output,omitempty"` +} + +func (x *CompilationResultAction_Operations) Reset() { + *x = CompilationResultAction_Operations{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResultAction_Operations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResultAction_Operations) ProtoMessage() {} + +func (x *CompilationResultAction_Operations) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResultAction_Operations.ProtoReflect.Descriptor instead. +func (*CompilationResultAction_Operations) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49, 1} +} + +func (x *CompilationResultAction_Operations) GetDependencyTargets() []*Target { + if x != nil { + return x.DependencyTargets + } + return nil +} + +func (x *CompilationResultAction_Operations) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *CompilationResultAction_Operations) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *CompilationResultAction_Operations) GetRelationDescriptor() *RelationDescriptor { + if x != nil { + return x.RelationDescriptor + } + return nil +} + +func (x *CompilationResultAction_Operations) GetQueries() []string { + if x != nil { + return x.Queries + } + return nil +} + +func (x *CompilationResultAction_Operations) GetHasOutput() bool { + if x != nil { + return x.HasOutput + } + return false +} + +// Represents an assertion upon a SQL query which is required return zero +// rows. +type CompilationResultAction_Assertion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of actions that this action depends on. + DependencyTargets []*Target `protobuf:"bytes,1,rep,name=dependency_targets,json=dependencyTargets,proto3" json:"dependency_targets,omitempty"` + // The parent action of this assertion. Only set if this assertion was + // automatically generated. + ParentAction *Target `protobuf:"bytes,5,opt,name=parent_action,json=parentAction,proto3" json:"parent_action,omitempty"` + // Whether this action is disabled (i.e. should not be run). + Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"` + // Arbitrary, user-defined tags on this action. + Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` + // The SELECT query which must return zero rows in order for this assertion + // to succeed. + SelectQuery string `protobuf:"bytes,4,opt,name=select_query,json=selectQuery,proto3" json:"select_query,omitempty"` + // Descriptor for the assertion's automatically-generated view and its + // columns. + RelationDescriptor *RelationDescriptor `protobuf:"bytes,6,opt,name=relation_descriptor,json=relationDescriptor,proto3" json:"relation_descriptor,omitempty"` +} + +func (x *CompilationResultAction_Assertion) Reset() { + *x = CompilationResultAction_Assertion{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResultAction_Assertion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResultAction_Assertion) ProtoMessage() {} + +func (x *CompilationResultAction_Assertion) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResultAction_Assertion.ProtoReflect.Descriptor instead. +func (*CompilationResultAction_Assertion) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49, 2} +} + +func (x *CompilationResultAction_Assertion) GetDependencyTargets() []*Target { + if x != nil { + return x.DependencyTargets + } + return nil +} + +func (x *CompilationResultAction_Assertion) GetParentAction() *Target { + if x != nil { + return x.ParentAction + } + return nil +} + +func (x *CompilationResultAction_Assertion) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *CompilationResultAction_Assertion) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *CompilationResultAction_Assertion) GetSelectQuery() string { + if x != nil { + return x.SelectQuery + } + return "" +} + +func (x *CompilationResultAction_Assertion) GetRelationDescriptor() *RelationDescriptor { + if x != nil { + return x.RelationDescriptor + } + return nil +} + +// Represents a relation which is not managed by Dataform but which may be +// referenced by Dataform actions. +type CompilationResultAction_Declaration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Descriptor for the relation and its columns. Used as documentation only, + // i.e. values here will result in no changes to the relation's metadata. + RelationDescriptor *RelationDescriptor `protobuf:"bytes,1,opt,name=relation_descriptor,json=relationDescriptor,proto3" json:"relation_descriptor,omitempty"` +} + +func (x *CompilationResultAction_Declaration) Reset() { + *x = CompilationResultAction_Declaration{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResultAction_Declaration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResultAction_Declaration) ProtoMessage() {} + +func (x *CompilationResultAction_Declaration) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResultAction_Declaration.ProtoReflect.Descriptor instead. +func (*CompilationResultAction_Declaration) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49, 3} +} + +func (x *CompilationResultAction_Declaration) GetRelationDescriptor() *RelationDescriptor { + if x != nil { + return x.RelationDescriptor + } + return nil +} + +// Contains settings for relations of type `INCREMENTAL_TABLE`. +type CompilationResultAction_Relation_IncrementalTableConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The SELECT query which returns rows which should be inserted into the + // relation if it already exists and is not being refreshed. + IncrementalSelectQuery string `protobuf:"bytes,1,opt,name=incremental_select_query,json=incrementalSelectQuery,proto3" json:"incremental_select_query,omitempty"` + // Whether this table should be protected from being refreshed. + RefreshDisabled bool `protobuf:"varint,2,opt,name=refresh_disabled,json=refreshDisabled,proto3" json:"refresh_disabled,omitempty"` + // A set of columns or SQL expressions used to define row uniqueness. + // If any duplicates are discovered (as defined by `unique_key_parts`), + // only the newly selected rows (as defined by `incremental_select_query`) + // will be included in the relation. + UniqueKeyParts []string `protobuf:"bytes,3,rep,name=unique_key_parts,json=uniqueKeyParts,proto3" json:"unique_key_parts,omitempty"` + // A SQL expression conditional used to limit the set of existing rows + // considered for a merge operation (see `unique_key_parts` for more + // information). + UpdatePartitionFilter string `protobuf:"bytes,4,opt,name=update_partition_filter,json=updatePartitionFilter,proto3" json:"update_partition_filter,omitempty"` + // SQL statements to be executed before inserting new rows into the + // relation. + IncrementalPreOperations []string `protobuf:"bytes,5,rep,name=incremental_pre_operations,json=incrementalPreOperations,proto3" json:"incremental_pre_operations,omitempty"` + // SQL statements to be executed after inserting new rows into the + // relation. + IncrementalPostOperations []string `protobuf:"bytes,6,rep,name=incremental_post_operations,json=incrementalPostOperations,proto3" json:"incremental_post_operations,omitempty"` +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) Reset() { + *x = CompilationResultAction_Relation_IncrementalTableConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompilationResultAction_Relation_IncrementalTableConfig) ProtoMessage() {} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompilationResultAction_Relation_IncrementalTableConfig.ProtoReflect.Descriptor instead. +func (*CompilationResultAction_Relation_IncrementalTableConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{49, 0, 0} +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) GetIncrementalSelectQuery() string { + if x != nil { + return x.IncrementalSelectQuery + } + return "" +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) GetRefreshDisabled() bool { + if x != nil { + return x.RefreshDisabled + } + return false +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) GetUniqueKeyParts() []string { + if x != nil { + return x.UniqueKeyParts + } + return nil +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) GetUpdatePartitionFilter() string { + if x != nil { + return x.UpdatePartitionFilter + } + return "" +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) GetIncrementalPreOperations() []string { + if x != nil { + return x.IncrementalPreOperations + } + return nil +} + +func (x *CompilationResultAction_Relation_IncrementalTableConfig) GetIncrementalPostOperations() []string { + if x != nil { + return x.IncrementalPostOperations + } + return nil +} + +// Includes various configuration options for this workflow invocation. +// If both `included_targets` and `included_tags` are unset, all actions +// will be included. +type WorkflowInvocation_InvocationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Immutable. The set of action identifiers to include. + IncludedTargets []*Target `protobuf:"bytes,1,rep,name=included_targets,json=includedTargets,proto3" json:"included_targets,omitempty"` + // Immutable. The set of tags to include. + IncludedTags []string `protobuf:"bytes,2,rep,name=included_tags,json=includedTags,proto3" json:"included_tags,omitempty"` + // Immutable. When set to true, transitive dependencies of included actions will be + // executed. + TransitiveDependenciesIncluded bool `protobuf:"varint,3,opt,name=transitive_dependencies_included,json=transitiveDependenciesIncluded,proto3" json:"transitive_dependencies_included,omitempty"` + // Immutable. When set to true, transitive dependents of included actions will be + // executed. + TransitiveDependentsIncluded bool `protobuf:"varint,4,opt,name=transitive_dependents_included,json=transitiveDependentsIncluded,proto3" json:"transitive_dependents_included,omitempty"` + // Immutable. When set to true, any incremental tables will be fully refreshed. + FullyRefreshIncrementalTablesEnabled bool `protobuf:"varint,5,opt,name=fully_refresh_incremental_tables_enabled,json=fullyRefreshIncrementalTablesEnabled,proto3" json:"fully_refresh_incremental_tables_enabled,omitempty"` +} + +func (x *WorkflowInvocation_InvocationConfig) Reset() { + *x = WorkflowInvocation_InvocationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowInvocation_InvocationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowInvocation_InvocationConfig) ProtoMessage() {} + +func (x *WorkflowInvocation_InvocationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowInvocation_InvocationConfig.ProtoReflect.Descriptor instead. +func (*WorkflowInvocation_InvocationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{52, 0} +} + +func (x *WorkflowInvocation_InvocationConfig) GetIncludedTargets() []*Target { + if x != nil { + return x.IncludedTargets + } + return nil +} + +func (x *WorkflowInvocation_InvocationConfig) GetIncludedTags() []string { + if x != nil { + return x.IncludedTags + } + return nil +} + +func (x *WorkflowInvocation_InvocationConfig) GetTransitiveDependenciesIncluded() bool { + if x != nil { + return x.TransitiveDependenciesIncluded + } + return false +} + +func (x *WorkflowInvocation_InvocationConfig) GetTransitiveDependentsIncluded() bool { + if x != nil { + return x.TransitiveDependentsIncluded + } + return false +} + +func (x *WorkflowInvocation_InvocationConfig) GetFullyRefreshIncrementalTablesEnabled() bool { + if x != nil { + return x.FullyRefreshIncrementalTablesEnabled + } + return false +} + +// Represents a workflow action that will run against BigQuery. +type WorkflowInvocationAction_BigQueryAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The generated BigQuery SQL script that will be executed. + SqlScript string `protobuf:"bytes,1,opt,name=sql_script,json=sqlScript,proto3" json:"sql_script,omitempty"` +} + +func (x *WorkflowInvocationAction_BigQueryAction) Reset() { + *x = WorkflowInvocationAction_BigQueryAction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowInvocationAction_BigQueryAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowInvocationAction_BigQueryAction) ProtoMessage() {} + +func (x *WorkflowInvocationAction_BigQueryAction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowInvocationAction_BigQueryAction.ProtoReflect.Descriptor instead. +func (*WorkflowInvocationAction_BigQueryAction) Descriptor() ([]byte, []int) { + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP(), []int{59, 0} +} + +func (x *WorkflowInvocationAction_BigQueryAction) GetSqlScript() string { + if x != nil { + return x.SqlScript + } + return "" +} + +var File_google_cloud_dataform_v1alpha2_dataform_proto protoreflect.FileDescriptor + +var file_google_cloud_dataform_v1alpha2_dataform_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x05, + 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x71, 0x0a, 0x13, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, + 0x69, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x67, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0xa0, 0x03, 0x0a, 0x11, 0x47, 0x69, 0x74, + 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x15, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x2a, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x12, 0x81, 0x01, 0x0a, 0x23, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, + 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x02, + 0x12, 0x09, 0x0a, 0x05, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x03, 0x3a, 0x6a, 0xea, 0x41, 0x67, + 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x12, 0x41, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x22, 0xdf, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xb4, 0x01, 0x0a, 0x18, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, + 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x56, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x49, 0x64, 0x22, 0xac, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, + 0x12, 0x4f, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x22, 0x6f, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x22, 0x5c, 0x0a, 0x1a, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x39, 0x0a, 0x1b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x09, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x3a, 0x80, 0x01, 0xea, 0x41, 0x7d, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x58, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x22, 0xde, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xad, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, + 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x54, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd2, 0x01, 0x0a, + 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, + 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x22, 0x57, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x0c, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0c, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xcb, 0x01, + 0x0a, 0x15, 0x50, 0x75, 0x6c, 0x6c, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x12, 0x49, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x22, 0x80, 0x01, 0x0a, 0x15, + 0x50, 0x75, 0x73, 0x68, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x5c, + 0x0a, 0x1b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa4, 0x03, 0x0a, + 0x1c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8c, 0x01, + 0x0a, 0x18, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x52, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, + 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x16, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0xf4, 0x01, 0x0a, + 0x15, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x6e, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x58, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x57, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, + 0x44, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x03, + 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x41, 0x53, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x4c, 0x49, 0x43, 0x54, + 0x53, 0x10, 0x04, 0x22, 0x85, 0x01, 0x0a, 0x1a, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x69, 0x74, + 0x41, 0x68, 0x65, 0x61, 0x64, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x69, 0x0a, 0x1b, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x47, 0x69, 0x74, 0x41, 0x68, 0x65, 0x61, 0x64, 0x42, 0x65, 0x68, 0x69, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x68, 0x65, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x41, 0x68, 0x65, 0x61, 0x64, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x62, 0x65, 0x68, 0x69, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, + 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x1d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, + 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x1c, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, + 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x61, 0x74, + 0x68, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x70, + 0x61, 0x74, 0x68, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x22, + 0x78, 0x0a, 0x14, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x66, 0x66, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x3e, 0x0a, 0x15, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x74, 0x65, 0x64, 0x44, 0x69, 0x66, 0x66, 0x22, 0xc7, 0x01, 0x0a, 0x1d, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x95, 0x02, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x11, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x4f, 0x0a, 0x0e, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x04, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, + 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x78, 0x0a, 0x14, 0x4d, + 0x61, 0x6b, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x61, 0x6b, 0x65, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, + 0x0a, 0x16, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x98, 0x01, 0x0a, 0x14, 0x4d, + 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x6e, 0x65, + 0x77, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, + 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x37, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, + 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x75, 0x0a, 0x11, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x93, 0x01, 0x0a, 0x0f, 0x4d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x08, 0x6e, 0x65, 0x77, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x07, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x74, 0x68, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x6f, 0x76, + 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, + 0x0a, 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x19, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x70, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0x1c, 0x0a, 0x1a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x70, 0x6d, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, + 0x0a, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, + 0x0d, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x69, 0x73, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x48, 0x00, 0x52, 0x0c, 0x67, 0x69, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x69, 0x73, 0x68, 0x12, 0x49, 0x0a, 0x09, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, + 0x05, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x05, 0x52, 0x15, 0x63, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x15, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x13, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x1a, 0xf8, 0x03, 0x0a, + 0x15, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x6a, 0x0a, 0x04, 0x76, 0x61, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x51, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x76, 0x61, 0x72, 0x73, 0x12, 0x2c, + 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x0d, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x26, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x37, + 0x0a, 0x09, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xb7, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x17, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x50, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x3a, 0x9a, 0x01, 0xea, 0x41, 0x96, 0x01, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x69, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x7d, 0x42, 0x08, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xce, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, + 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x64, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x1e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x50, 0x0a, 0x06, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc5, 0x03, 0x0a, 0x12, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x12, 0x6f, 0x0a, 0x0f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x2e, 0x42, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x7a, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, + 0x0a, 0x14, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x62, 0x69, + 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x61, 0x67, 0x73, + 0x1a, 0x41, 0x0a, 0x13, 0x42, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xef, 0x16, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3e, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, + 0x51, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x5e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x64, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x61, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x61, + 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0xec, 0x0b, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, + 0x0a, 0x12, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x72, 0x0a, 0x0d, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, + 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x91, 0x01, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x61, 0x79, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x86, 0x01, 0x0a, 0x12, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xdd, 0x02, 0x0a, 0x16, 0x49, 0x6e, 0x63, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x29, 0x0a, + 0x10, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x72, + 0x74, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x1a, 0x69, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, + 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x50, 0x72, 0x65, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x69, + 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x73, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x44, 0x0a, 0x16, 0x41, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x70, + 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, + 0x0a, 0x19, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x56, 0x49, 0x45, 0x57, + 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x43, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x41, + 0x4c, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x41, 0x54, + 0x45, 0x52, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, + 0x1a, 0xb1, 0x02, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x68, 0x61, 0x73, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x1a, 0xe7, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x12, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, + 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x11, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0d, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x63, 0x0a, 0x13, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x1a, 0x72, + 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, + 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x12, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x75, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x18, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0xb8, 0x08, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, + 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x60, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, + 0x41, 0x05, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x75, 0x0a, 0x11, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x10, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x47, 0x0a, 0x11, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x1a, 0x8b, 0x03, 0x0a, 0x10, 0x49, 0x6e, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, + 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, + 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, 0x12, + 0x4d, 0x0a, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x1e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x12, 0x49, + 0x0a, 0x1e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x1c, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, + 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x28, 0x66, 0x75, 0x6c, + 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x05, + 0x52, 0x24, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, + 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, + 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, + 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x3a, 0x9d, 0x01, 0xea, + 0x41, 0x99, 0x01, 0x0a, 0x2a, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x6b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0xaa, 0x01, 0x0a, + 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x42, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2a, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x1f, 0x4c, 0x69, + 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, + 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x66, + 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x24, 0x0a, 0x22, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x68, + 0x0a, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, + 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x69, 0x0a, 0x1f, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2c, 0x0a, 0x2a, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x69, 0x0a, 0x1f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, + 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9c, + 0x05, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x12, 0x56, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, + 0x61, 0x6c, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x47, 0x0a, 0x11, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x75, 0x0a, 0x0f, 0x62, 0x69, 0x67, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x69, 0x67, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x34, 0x0a, 0x0e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x73, 0x71, 0x6c, 0x53, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x66, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, + 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, + 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, + 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x22, 0xb5, 0x01, + 0x0a, 0x25, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2c, 0x0a, 0x2a, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x78, 0x0a, 0x1b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x76, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x19, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x32, 0xad, 0x3f, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x12, + 0xce, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, + 0x36, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0xb8, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe5, 0x01, 0x0a, 0x10, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x22, 0x36, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0xda, 0x41, 0x1f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x12, 0xe7, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x6e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x32, 0x41, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0xda, 0x41, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xaa, 0x01, + 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x2a, 0x36, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe2, 0x01, 0x0a, 0x13, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x65, 0x73, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, + 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x66, 0x65, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, + 0xd5, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0xda, 0x41, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xc2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, + 0x12, 0x43, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xec, 0x01, 0x0a, + 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x76, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x22, 0x43, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x3a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0xda, 0x41, 0x1d, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x12, 0xb5, 0x01, 0x0a, 0x0f, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x2a, 0x43, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xf3, 0x01, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, + 0x70, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x4e, 0x70, 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x70, + 0x6d, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x22, 0x5b, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x70, 0x6d, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, 0x0e, 0x50, 0x75, + 0x6c, 0x6c, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x50, 0x75, + 0x6c, 0x6c, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x53, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4d, 0x22, 0x48, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x75, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, + 0x12, 0xb4, 0x01, 0x0a, 0x0e, 0x50, 0x75, 0x73, 0x68, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x53, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x22, 0x48, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x70, 0x75, 0x73, 0x68, 0x3a, 0x01, 0x2a, 0x12, 0xf3, 0x01, 0x0a, 0x14, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, + 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x5a, 0x12, 0x58, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, + 0x6c, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0xef, 0x01, + 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x69, 0x74, 0x41, 0x68, 0x65, 0x61, 0x64, 0x42, + 0x65, 0x68, 0x69, 0x6e, 0x64, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x69, 0x74, 0x41, + 0x68, 0x65, 0x61, 0x64, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x69, 0x74, 0x41, 0x68, 0x65, 0x61, 0x64, + 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x12, 0x57, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x66, 0x65, 0x74, 0x63, + 0x68, 0x47, 0x69, 0x74, 0x41, 0x68, 0x65, 0x61, 0x64, 0x42, 0x65, 0x68, 0x69, 0x6e, 0x64, 0x12, + 0xc6, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x55, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x22, 0x4a, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc3, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, + 0x22, 0x49, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xdc, + 0x01, 0x0a, 0x0d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x66, 0x66, + 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, + 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x58, 0x12, 0x56, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x66, 0x65, 0x74, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x80, 0x02, + 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x61, 0x12, + 0x5f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0xdf, 0x01, 0x0a, 0x0d, 0x4d, 0x61, 0x6b, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5b, 0x22, 0x56, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x6d, 0x61, 0x6b, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x3a, + 0x01, 0x2a, 0x12, 0xc6, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x22, 0x58, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0xdf, 0x01, 0x0a, 0x0d, + 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4d, + 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x5b, 0x22, 0x56, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x6f, 0x76, + 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x01, 0x2a, 0x12, 0xc8, 0x01, + 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, + 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x72, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x5e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x58, 0x22, 0x53, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x3a, + 0x01, 0x2a, 0x12, 0xcb, 0x01, 0x0a, 0x08, 0x4d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, + 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x4d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x56, 0x22, 0x51, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x3a, 0x01, 0x2a, + 0x12, 0xcf, 0x01, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x30, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x52, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x77, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x3a, + 0x01, 0x2a, 0x12, 0xf5, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x3d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xe2, 0x01, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x92, 0x02, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x83, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x61, 0x22, 0x4b, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xda, 0x41, 0x19, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x2c, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x87, 0x02, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0xf9, + 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xe6, 0x01, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, + 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x98, 0x02, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x86, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x63, 0x22, 0x4c, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x13, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0xda, 0x41, 0x1a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xd0, + 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x2a, 0x4c, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0xd3, 0x01, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, + 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x58, 0x22, + 0x53, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x02, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x54, 0x12, 0x52, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x4b, 0xca, 0x41, 0x17, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x42, 0xca, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x66, + 0x6f, 0x72, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, + 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x66, 0x6f, + 0x72, 0x6d, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0xca, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0xea, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x3a, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xea, 0x41, 0x64, 0x0a, 0x2a, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x7d, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescOnce sync.Once + file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescData = file_google_cloud_dataform_v1alpha2_dataform_proto_rawDesc +) + +func file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescGZIP() []byte { + file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescOnce.Do(func() { + file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescData) + }) + return file_google_cloud_dataform_v1alpha2_dataform_proto_rawDescData +} + +var file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes = make([]protoimpl.MessageInfo, 78) +var file_google_cloud_dataform_v1alpha2_dataform_proto_goTypes = []interface{}{ + (Repository_GitRemoteSettings_TokenStatus)(0), // 0: google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus + (FetchFileGitStatusesResponse_UncommittedFileChange_State)(0), // 1: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State + (CompilationResultAction_Relation_RelationType)(0), // 2: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType + (WorkflowInvocation_State)(0), // 3: google.cloud.dataform.v1alpha2.WorkflowInvocation.State + (WorkflowInvocationAction_State)(0), // 4: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State + (*Repository)(nil), // 5: google.cloud.dataform.v1alpha2.Repository + (*ListRepositoriesRequest)(nil), // 6: google.cloud.dataform.v1alpha2.ListRepositoriesRequest + (*ListRepositoriesResponse)(nil), // 7: google.cloud.dataform.v1alpha2.ListRepositoriesResponse + (*GetRepositoryRequest)(nil), // 8: google.cloud.dataform.v1alpha2.GetRepositoryRequest + (*CreateRepositoryRequest)(nil), // 9: google.cloud.dataform.v1alpha2.CreateRepositoryRequest + (*UpdateRepositoryRequest)(nil), // 10: google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + (*DeleteRepositoryRequest)(nil), // 11: google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + (*FetchRemoteBranchesRequest)(nil), // 12: google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + (*FetchRemoteBranchesResponse)(nil), // 13: google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + (*Workspace)(nil), // 14: google.cloud.dataform.v1alpha2.Workspace + (*ListWorkspacesRequest)(nil), // 15: google.cloud.dataform.v1alpha2.ListWorkspacesRequest + (*ListWorkspacesResponse)(nil), // 16: google.cloud.dataform.v1alpha2.ListWorkspacesResponse + (*GetWorkspaceRequest)(nil), // 17: google.cloud.dataform.v1alpha2.GetWorkspaceRequest + (*CreateWorkspaceRequest)(nil), // 18: google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + (*DeleteWorkspaceRequest)(nil), // 19: google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + (*CommitAuthor)(nil), // 20: google.cloud.dataform.v1alpha2.CommitAuthor + (*PullGitCommitsRequest)(nil), // 21: google.cloud.dataform.v1alpha2.PullGitCommitsRequest + (*PushGitCommitsRequest)(nil), // 22: google.cloud.dataform.v1alpha2.PushGitCommitsRequest + (*FetchFileGitStatusesRequest)(nil), // 23: google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + (*FetchFileGitStatusesResponse)(nil), // 24: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + (*FetchGitAheadBehindRequest)(nil), // 25: google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + (*FetchGitAheadBehindResponse)(nil), // 26: google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + (*CommitWorkspaceChangesRequest)(nil), // 27: google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + (*ResetWorkspaceChangesRequest)(nil), // 28: google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + (*FetchFileDiffRequest)(nil), // 29: google.cloud.dataform.v1alpha2.FetchFileDiffRequest + (*FetchFileDiffResponse)(nil), // 30: google.cloud.dataform.v1alpha2.FetchFileDiffResponse + (*QueryDirectoryContentsRequest)(nil), // 31: google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + (*QueryDirectoryContentsResponse)(nil), // 32: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + (*MakeDirectoryRequest)(nil), // 33: google.cloud.dataform.v1alpha2.MakeDirectoryRequest + (*MakeDirectoryResponse)(nil), // 34: google.cloud.dataform.v1alpha2.MakeDirectoryResponse + (*RemoveDirectoryRequest)(nil), // 35: google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + (*MoveDirectoryRequest)(nil), // 36: google.cloud.dataform.v1alpha2.MoveDirectoryRequest + (*MoveDirectoryResponse)(nil), // 37: google.cloud.dataform.v1alpha2.MoveDirectoryResponse + (*ReadFileRequest)(nil), // 38: google.cloud.dataform.v1alpha2.ReadFileRequest + (*ReadFileResponse)(nil), // 39: google.cloud.dataform.v1alpha2.ReadFileResponse + (*RemoveFileRequest)(nil), // 40: google.cloud.dataform.v1alpha2.RemoveFileRequest + (*MoveFileRequest)(nil), // 41: google.cloud.dataform.v1alpha2.MoveFileRequest + (*MoveFileResponse)(nil), // 42: google.cloud.dataform.v1alpha2.MoveFileResponse + (*WriteFileRequest)(nil), // 43: google.cloud.dataform.v1alpha2.WriteFileRequest + (*WriteFileResponse)(nil), // 44: google.cloud.dataform.v1alpha2.WriteFileResponse + (*InstallNpmPackagesRequest)(nil), // 45: google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + (*InstallNpmPackagesResponse)(nil), // 46: google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + (*CompilationResult)(nil), // 47: google.cloud.dataform.v1alpha2.CompilationResult + (*ListCompilationResultsRequest)(nil), // 48: google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + (*ListCompilationResultsResponse)(nil), // 49: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + (*GetCompilationResultRequest)(nil), // 50: google.cloud.dataform.v1alpha2.GetCompilationResultRequest + (*CreateCompilationResultRequest)(nil), // 51: google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + (*Target)(nil), // 52: google.cloud.dataform.v1alpha2.Target + (*RelationDescriptor)(nil), // 53: google.cloud.dataform.v1alpha2.RelationDescriptor + (*CompilationResultAction)(nil), // 54: google.cloud.dataform.v1alpha2.CompilationResultAction + (*QueryCompilationResultActionsRequest)(nil), // 55: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + (*QueryCompilationResultActionsResponse)(nil), // 56: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + (*WorkflowInvocation)(nil), // 57: google.cloud.dataform.v1alpha2.WorkflowInvocation + (*ListWorkflowInvocationsRequest)(nil), // 58: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + (*ListWorkflowInvocationsResponse)(nil), // 59: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + (*GetWorkflowInvocationRequest)(nil), // 60: google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + (*CreateWorkflowInvocationRequest)(nil), // 61: google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + (*DeleteWorkflowInvocationRequest)(nil), // 62: google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + (*CancelWorkflowInvocationRequest)(nil), // 63: google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + (*WorkflowInvocationAction)(nil), // 64: google.cloud.dataform.v1alpha2.WorkflowInvocationAction + (*QueryWorkflowInvocationActionsRequest)(nil), // 65: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + (*QueryWorkflowInvocationActionsResponse)(nil), // 66: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + (*Repository_GitRemoteSettings)(nil), // 67: google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + (*FetchFileGitStatusesResponse_UncommittedFileChange)(nil), // 68: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + (*QueryDirectoryContentsResponse_DirectoryEntry)(nil), // 69: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + (*CompilationResult_CodeCompilationConfig)(nil), // 70: google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + (*CompilationResult_CompilationError)(nil), // 71: google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + nil, // 72: google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.VarsEntry + (*RelationDescriptor_ColumnDescriptor)(nil), // 73: google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + nil, // 74: google.cloud.dataform.v1alpha2.RelationDescriptor.BigqueryLabelsEntry + (*CompilationResultAction_Relation)(nil), // 75: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + (*CompilationResultAction_Operations)(nil), // 76: google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + (*CompilationResultAction_Assertion)(nil), // 77: google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + (*CompilationResultAction_Declaration)(nil), // 78: google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + (*CompilationResultAction_Relation_IncrementalTableConfig)(nil), // 79: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + nil, // 80: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.AdditionalOptionsEntry + (*WorkflowInvocation_InvocationConfig)(nil), // 81: google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + (*WorkflowInvocationAction_BigQueryAction)(nil), // 82: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + (*fieldmaskpb.FieldMask)(nil), // 83: google.protobuf.FieldMask + (*interval.Interval)(nil), // 84: google.type.Interval + (*emptypb.Empty)(nil), // 85: google.protobuf.Empty +} +var file_google_cloud_dataform_v1alpha2_dataform_proto_depIdxs = []int32{ + 67, // 0: google.cloud.dataform.v1alpha2.Repository.git_remote_settings:type_name -> google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings + 5, // 1: google.cloud.dataform.v1alpha2.ListRepositoriesResponse.repositories:type_name -> google.cloud.dataform.v1alpha2.Repository + 5, // 2: google.cloud.dataform.v1alpha2.CreateRepositoryRequest.repository:type_name -> google.cloud.dataform.v1alpha2.Repository + 83, // 3: google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.update_mask:type_name -> google.protobuf.FieldMask + 5, // 4: google.cloud.dataform.v1alpha2.UpdateRepositoryRequest.repository:type_name -> google.cloud.dataform.v1alpha2.Repository + 14, // 5: google.cloud.dataform.v1alpha2.ListWorkspacesResponse.workspaces:type_name -> google.cloud.dataform.v1alpha2.Workspace + 14, // 6: google.cloud.dataform.v1alpha2.CreateWorkspaceRequest.workspace:type_name -> google.cloud.dataform.v1alpha2.Workspace + 20, // 7: google.cloud.dataform.v1alpha2.PullGitCommitsRequest.author:type_name -> google.cloud.dataform.v1alpha2.CommitAuthor + 68, // 8: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.uncommitted_file_changes:type_name -> google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange + 20, // 9: google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest.author:type_name -> google.cloud.dataform.v1alpha2.CommitAuthor + 69, // 10: google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.directory_entries:type_name -> google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse.DirectoryEntry + 70, // 11: google.cloud.dataform.v1alpha2.CompilationResult.code_compilation_config:type_name -> google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig + 71, // 12: google.cloud.dataform.v1alpha2.CompilationResult.compilation_errors:type_name -> google.cloud.dataform.v1alpha2.CompilationResult.CompilationError + 47, // 13: google.cloud.dataform.v1alpha2.ListCompilationResultsResponse.compilation_results:type_name -> google.cloud.dataform.v1alpha2.CompilationResult + 47, // 14: google.cloud.dataform.v1alpha2.CreateCompilationResultRequest.compilation_result:type_name -> google.cloud.dataform.v1alpha2.CompilationResult + 73, // 15: google.cloud.dataform.v1alpha2.RelationDescriptor.columns:type_name -> google.cloud.dataform.v1alpha2.RelationDescriptor.ColumnDescriptor + 74, // 16: google.cloud.dataform.v1alpha2.RelationDescriptor.bigquery_labels:type_name -> google.cloud.dataform.v1alpha2.RelationDescriptor.BigqueryLabelsEntry + 52, // 17: google.cloud.dataform.v1alpha2.CompilationResultAction.target:type_name -> google.cloud.dataform.v1alpha2.Target + 52, // 18: google.cloud.dataform.v1alpha2.CompilationResultAction.canonical_target:type_name -> google.cloud.dataform.v1alpha2.Target + 75, // 19: google.cloud.dataform.v1alpha2.CompilationResultAction.relation:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Relation + 76, // 20: google.cloud.dataform.v1alpha2.CompilationResultAction.operations:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Operations + 77, // 21: google.cloud.dataform.v1alpha2.CompilationResultAction.assertion:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion + 78, // 22: google.cloud.dataform.v1alpha2.CompilationResultAction.declaration:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration + 54, // 23: google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse.compilation_result_actions:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction + 81, // 24: google.cloud.dataform.v1alpha2.WorkflowInvocation.invocation_config:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig + 3, // 25: google.cloud.dataform.v1alpha2.WorkflowInvocation.state:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocation.State + 84, // 26: google.cloud.dataform.v1alpha2.WorkflowInvocation.invocation_timing:type_name -> google.type.Interval + 57, // 27: google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse.workflow_invocations:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocation + 57, // 28: google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest.workflow_invocation:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocation + 52, // 29: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.target:type_name -> google.cloud.dataform.v1alpha2.Target + 52, // 30: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.canonical_target:type_name -> google.cloud.dataform.v1alpha2.Target + 4, // 31: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.state:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocationAction.State + 84, // 32: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.invocation_timing:type_name -> google.type.Interval + 82, // 33: google.cloud.dataform.v1alpha2.WorkflowInvocationAction.bigquery_action:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocationAction.BigQueryAction + 64, // 34: google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse.workflow_invocation_actions:type_name -> google.cloud.dataform.v1alpha2.WorkflowInvocationAction + 0, // 35: google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.token_status:type_name -> google.cloud.dataform.v1alpha2.Repository.GitRemoteSettings.TokenStatus + 1, // 36: google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.state:type_name -> google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse.UncommittedFileChange.State + 72, // 37: google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.vars:type_name -> google.cloud.dataform.v1alpha2.CompilationResult.CodeCompilationConfig.VarsEntry + 52, // 38: google.cloud.dataform.v1alpha2.CompilationResult.CompilationError.action_target:type_name -> google.cloud.dataform.v1alpha2.Target + 52, // 39: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.dependency_targets:type_name -> google.cloud.dataform.v1alpha2.Target + 53, // 40: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.relation_descriptor:type_name -> google.cloud.dataform.v1alpha2.RelationDescriptor + 2, // 41: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.relation_type:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.RelationType + 79, // 42: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.incremental_table_config:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.IncrementalTableConfig + 80, // 43: google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.additional_options:type_name -> google.cloud.dataform.v1alpha2.CompilationResultAction.Relation.AdditionalOptionsEntry + 52, // 44: google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.dependency_targets:type_name -> google.cloud.dataform.v1alpha2.Target + 53, // 45: google.cloud.dataform.v1alpha2.CompilationResultAction.Operations.relation_descriptor:type_name -> google.cloud.dataform.v1alpha2.RelationDescriptor + 52, // 46: google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.dependency_targets:type_name -> google.cloud.dataform.v1alpha2.Target + 52, // 47: google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.parent_action:type_name -> google.cloud.dataform.v1alpha2.Target + 53, // 48: google.cloud.dataform.v1alpha2.CompilationResultAction.Assertion.relation_descriptor:type_name -> google.cloud.dataform.v1alpha2.RelationDescriptor + 53, // 49: google.cloud.dataform.v1alpha2.CompilationResultAction.Declaration.relation_descriptor:type_name -> google.cloud.dataform.v1alpha2.RelationDescriptor + 52, // 50: google.cloud.dataform.v1alpha2.WorkflowInvocation.InvocationConfig.included_targets:type_name -> google.cloud.dataform.v1alpha2.Target + 6, // 51: google.cloud.dataform.v1alpha2.Dataform.ListRepositories:input_type -> google.cloud.dataform.v1alpha2.ListRepositoriesRequest + 8, // 52: google.cloud.dataform.v1alpha2.Dataform.GetRepository:input_type -> google.cloud.dataform.v1alpha2.GetRepositoryRequest + 9, // 53: google.cloud.dataform.v1alpha2.Dataform.CreateRepository:input_type -> google.cloud.dataform.v1alpha2.CreateRepositoryRequest + 10, // 54: google.cloud.dataform.v1alpha2.Dataform.UpdateRepository:input_type -> google.cloud.dataform.v1alpha2.UpdateRepositoryRequest + 11, // 55: google.cloud.dataform.v1alpha2.Dataform.DeleteRepository:input_type -> google.cloud.dataform.v1alpha2.DeleteRepositoryRequest + 12, // 56: google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranches:input_type -> google.cloud.dataform.v1alpha2.FetchRemoteBranchesRequest + 15, // 57: google.cloud.dataform.v1alpha2.Dataform.ListWorkspaces:input_type -> google.cloud.dataform.v1alpha2.ListWorkspacesRequest + 17, // 58: google.cloud.dataform.v1alpha2.Dataform.GetWorkspace:input_type -> google.cloud.dataform.v1alpha2.GetWorkspaceRequest + 18, // 59: google.cloud.dataform.v1alpha2.Dataform.CreateWorkspace:input_type -> google.cloud.dataform.v1alpha2.CreateWorkspaceRequest + 19, // 60: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspace:input_type -> google.cloud.dataform.v1alpha2.DeleteWorkspaceRequest + 45, // 61: google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackages:input_type -> google.cloud.dataform.v1alpha2.InstallNpmPackagesRequest + 21, // 62: google.cloud.dataform.v1alpha2.Dataform.PullGitCommits:input_type -> google.cloud.dataform.v1alpha2.PullGitCommitsRequest + 22, // 63: google.cloud.dataform.v1alpha2.Dataform.PushGitCommits:input_type -> google.cloud.dataform.v1alpha2.PushGitCommitsRequest + 23, // 64: google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatuses:input_type -> google.cloud.dataform.v1alpha2.FetchFileGitStatusesRequest + 25, // 65: google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehind:input_type -> google.cloud.dataform.v1alpha2.FetchGitAheadBehindRequest + 27, // 66: google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChanges:input_type -> google.cloud.dataform.v1alpha2.CommitWorkspaceChangesRequest + 28, // 67: google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChanges:input_type -> google.cloud.dataform.v1alpha2.ResetWorkspaceChangesRequest + 29, // 68: google.cloud.dataform.v1alpha2.Dataform.FetchFileDiff:input_type -> google.cloud.dataform.v1alpha2.FetchFileDiffRequest + 31, // 69: google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContents:input_type -> google.cloud.dataform.v1alpha2.QueryDirectoryContentsRequest + 33, // 70: google.cloud.dataform.v1alpha2.Dataform.MakeDirectory:input_type -> google.cloud.dataform.v1alpha2.MakeDirectoryRequest + 35, // 71: google.cloud.dataform.v1alpha2.Dataform.RemoveDirectory:input_type -> google.cloud.dataform.v1alpha2.RemoveDirectoryRequest + 36, // 72: google.cloud.dataform.v1alpha2.Dataform.MoveDirectory:input_type -> google.cloud.dataform.v1alpha2.MoveDirectoryRequest + 38, // 73: google.cloud.dataform.v1alpha2.Dataform.ReadFile:input_type -> google.cloud.dataform.v1alpha2.ReadFileRequest + 40, // 74: google.cloud.dataform.v1alpha2.Dataform.RemoveFile:input_type -> google.cloud.dataform.v1alpha2.RemoveFileRequest + 41, // 75: google.cloud.dataform.v1alpha2.Dataform.MoveFile:input_type -> google.cloud.dataform.v1alpha2.MoveFileRequest + 43, // 76: google.cloud.dataform.v1alpha2.Dataform.WriteFile:input_type -> google.cloud.dataform.v1alpha2.WriteFileRequest + 48, // 77: google.cloud.dataform.v1alpha2.Dataform.ListCompilationResults:input_type -> google.cloud.dataform.v1alpha2.ListCompilationResultsRequest + 50, // 78: google.cloud.dataform.v1alpha2.Dataform.GetCompilationResult:input_type -> google.cloud.dataform.v1alpha2.GetCompilationResultRequest + 51, // 79: google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResult:input_type -> google.cloud.dataform.v1alpha2.CreateCompilationResultRequest + 55, // 80: google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActions:input_type -> google.cloud.dataform.v1alpha2.QueryCompilationResultActionsRequest + 58, // 81: google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocations:input_type -> google.cloud.dataform.v1alpha2.ListWorkflowInvocationsRequest + 60, // 82: google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocation:input_type -> google.cloud.dataform.v1alpha2.GetWorkflowInvocationRequest + 61, // 83: google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocation:input_type -> google.cloud.dataform.v1alpha2.CreateWorkflowInvocationRequest + 62, // 84: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocation:input_type -> google.cloud.dataform.v1alpha2.DeleteWorkflowInvocationRequest + 63, // 85: google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocation:input_type -> google.cloud.dataform.v1alpha2.CancelWorkflowInvocationRequest + 65, // 86: google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActions:input_type -> google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsRequest + 7, // 87: google.cloud.dataform.v1alpha2.Dataform.ListRepositories:output_type -> google.cloud.dataform.v1alpha2.ListRepositoriesResponse + 5, // 88: google.cloud.dataform.v1alpha2.Dataform.GetRepository:output_type -> google.cloud.dataform.v1alpha2.Repository + 5, // 89: google.cloud.dataform.v1alpha2.Dataform.CreateRepository:output_type -> google.cloud.dataform.v1alpha2.Repository + 5, // 90: google.cloud.dataform.v1alpha2.Dataform.UpdateRepository:output_type -> google.cloud.dataform.v1alpha2.Repository + 85, // 91: google.cloud.dataform.v1alpha2.Dataform.DeleteRepository:output_type -> google.protobuf.Empty + 13, // 92: google.cloud.dataform.v1alpha2.Dataform.FetchRemoteBranches:output_type -> google.cloud.dataform.v1alpha2.FetchRemoteBranchesResponse + 16, // 93: google.cloud.dataform.v1alpha2.Dataform.ListWorkspaces:output_type -> google.cloud.dataform.v1alpha2.ListWorkspacesResponse + 14, // 94: google.cloud.dataform.v1alpha2.Dataform.GetWorkspace:output_type -> google.cloud.dataform.v1alpha2.Workspace + 14, // 95: google.cloud.dataform.v1alpha2.Dataform.CreateWorkspace:output_type -> google.cloud.dataform.v1alpha2.Workspace + 85, // 96: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkspace:output_type -> google.protobuf.Empty + 46, // 97: google.cloud.dataform.v1alpha2.Dataform.InstallNpmPackages:output_type -> google.cloud.dataform.v1alpha2.InstallNpmPackagesResponse + 85, // 98: google.cloud.dataform.v1alpha2.Dataform.PullGitCommits:output_type -> google.protobuf.Empty + 85, // 99: google.cloud.dataform.v1alpha2.Dataform.PushGitCommits:output_type -> google.protobuf.Empty + 24, // 100: google.cloud.dataform.v1alpha2.Dataform.FetchFileGitStatuses:output_type -> google.cloud.dataform.v1alpha2.FetchFileGitStatusesResponse + 26, // 101: google.cloud.dataform.v1alpha2.Dataform.FetchGitAheadBehind:output_type -> google.cloud.dataform.v1alpha2.FetchGitAheadBehindResponse + 85, // 102: google.cloud.dataform.v1alpha2.Dataform.CommitWorkspaceChanges:output_type -> google.protobuf.Empty + 85, // 103: google.cloud.dataform.v1alpha2.Dataform.ResetWorkspaceChanges:output_type -> google.protobuf.Empty + 30, // 104: google.cloud.dataform.v1alpha2.Dataform.FetchFileDiff:output_type -> google.cloud.dataform.v1alpha2.FetchFileDiffResponse + 32, // 105: google.cloud.dataform.v1alpha2.Dataform.QueryDirectoryContents:output_type -> google.cloud.dataform.v1alpha2.QueryDirectoryContentsResponse + 34, // 106: google.cloud.dataform.v1alpha2.Dataform.MakeDirectory:output_type -> google.cloud.dataform.v1alpha2.MakeDirectoryResponse + 85, // 107: google.cloud.dataform.v1alpha2.Dataform.RemoveDirectory:output_type -> google.protobuf.Empty + 37, // 108: google.cloud.dataform.v1alpha2.Dataform.MoveDirectory:output_type -> google.cloud.dataform.v1alpha2.MoveDirectoryResponse + 39, // 109: google.cloud.dataform.v1alpha2.Dataform.ReadFile:output_type -> google.cloud.dataform.v1alpha2.ReadFileResponse + 85, // 110: google.cloud.dataform.v1alpha2.Dataform.RemoveFile:output_type -> google.protobuf.Empty + 42, // 111: google.cloud.dataform.v1alpha2.Dataform.MoveFile:output_type -> google.cloud.dataform.v1alpha2.MoveFileResponse + 44, // 112: google.cloud.dataform.v1alpha2.Dataform.WriteFile:output_type -> google.cloud.dataform.v1alpha2.WriteFileResponse + 49, // 113: google.cloud.dataform.v1alpha2.Dataform.ListCompilationResults:output_type -> google.cloud.dataform.v1alpha2.ListCompilationResultsResponse + 47, // 114: google.cloud.dataform.v1alpha2.Dataform.GetCompilationResult:output_type -> google.cloud.dataform.v1alpha2.CompilationResult + 47, // 115: google.cloud.dataform.v1alpha2.Dataform.CreateCompilationResult:output_type -> google.cloud.dataform.v1alpha2.CompilationResult + 56, // 116: google.cloud.dataform.v1alpha2.Dataform.QueryCompilationResultActions:output_type -> google.cloud.dataform.v1alpha2.QueryCompilationResultActionsResponse + 59, // 117: google.cloud.dataform.v1alpha2.Dataform.ListWorkflowInvocations:output_type -> google.cloud.dataform.v1alpha2.ListWorkflowInvocationsResponse + 57, // 118: google.cloud.dataform.v1alpha2.Dataform.GetWorkflowInvocation:output_type -> google.cloud.dataform.v1alpha2.WorkflowInvocation + 57, // 119: google.cloud.dataform.v1alpha2.Dataform.CreateWorkflowInvocation:output_type -> google.cloud.dataform.v1alpha2.WorkflowInvocation + 85, // 120: google.cloud.dataform.v1alpha2.Dataform.DeleteWorkflowInvocation:output_type -> google.protobuf.Empty + 85, // 121: google.cloud.dataform.v1alpha2.Dataform.CancelWorkflowInvocation:output_type -> google.protobuf.Empty + 66, // 122: google.cloud.dataform.v1alpha2.Dataform.QueryWorkflowInvocationActions:output_type -> google.cloud.dataform.v1alpha2.QueryWorkflowInvocationActionsResponse + 87, // [87:123] is the sub-list for method output_type + 51, // [51:87] is the sub-list for method input_type + 51, // [51:51] is the sub-list for extension type_name + 51, // [51:51] is the sub-list for extension extendee + 0, // [0:51] is the sub-list for field type_name +} + +func init() { file_google_cloud_dataform_v1alpha2_dataform_proto_init() } +func file_google_cloud_dataform_v1alpha2_dataform_proto_init() { + if File_google_cloud_dataform_v1alpha2_dataform_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Repository); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRepositoriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRepositoriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRepositoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchRemoteBranchesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchRemoteBranchesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workspace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspacesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspacesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitAuthor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PullGitCommitsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushGitCommitsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchFileGitStatusesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchFileGitStatusesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchGitAheadBehindRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchGitAheadBehindResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommitWorkspaceChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResetWorkspaceChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchFileDiffRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchFileDiffResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDirectoryContentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDirectoryContentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MakeDirectoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MakeDirectoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveDirectoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveDirectoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveDirectoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadFileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MoveFileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteFileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteFileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstallNpmPackagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstallNpmPackagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCompilationResultsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCompilationResultsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCompilationResultRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateCompilationResultRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Target); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationDescriptor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResultAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCompilationResultActionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCompilationResultActionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowInvocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowInvocationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowInvocationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowInvocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkflowInvocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteWorkflowInvocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelWorkflowInvocationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowInvocationAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryWorkflowInvocationActionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryWorkflowInvocationActionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Repository_GitRemoteSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchFileGitStatusesResponse_UncommittedFileChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryDirectoryContentsResponse_DirectoryEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResult_CodeCompilationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResult_CompilationError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationDescriptor_ColumnDescriptor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResultAction_Relation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResultAction_Operations); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResultAction_Assertion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResultAction_Declaration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompilationResultAction_Relation_IncrementalTableConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[76].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowInvocation_InvocationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowInvocationAction_BigQueryAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[42].OneofWrappers = []interface{}{ + (*CompilationResult_GitCommitish)(nil), + (*CompilationResult_Workspace)(nil), + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[49].OneofWrappers = []interface{}{ + (*CompilationResultAction_Relation_)(nil), + (*CompilationResultAction_Operations_)(nil), + (*CompilationResultAction_Assertion_)(nil), + (*CompilationResultAction_Declaration_)(nil), + } + file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes[64].OneofWrappers = []interface{}{ + (*QueryDirectoryContentsResponse_DirectoryEntry_File)(nil), + (*QueryDirectoryContentsResponse_DirectoryEntry_Directory)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dataform_v1alpha2_dataform_proto_rawDesc, + NumEnums: 5, + NumMessages: 78, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dataform_v1alpha2_dataform_proto_goTypes, + DependencyIndexes: file_google_cloud_dataform_v1alpha2_dataform_proto_depIdxs, + EnumInfos: file_google_cloud_dataform_v1alpha2_dataform_proto_enumTypes, + MessageInfos: file_google_cloud_dataform_v1alpha2_dataform_proto_msgTypes, + }.Build() + File_google_cloud_dataform_v1alpha2_dataform_proto = out.File + file_google_cloud_dataform_v1alpha2_dataform_proto_rawDesc = nil + file_google_cloud_dataform_v1alpha2_dataform_proto_goTypes = nil + file_google_cloud_dataform_v1alpha2_dataform_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DataformClient is the client API for Dataform service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DataformClient interface { + // Lists Repositories in a given project and location. + ListRepositories(ctx context.Context, in *ListRepositoriesRequest, opts ...grpc.CallOption) (*ListRepositoriesResponse, error) + // Fetches a single Repository. + GetRepository(ctx context.Context, in *GetRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) + // Creates a new Repository in a given project and location. + CreateRepository(ctx context.Context, in *CreateRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) + // Updates a single Repository. + UpdateRepository(ctx context.Context, in *UpdateRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) + // Deletes a single Repository. + DeleteRepository(ctx context.Context, in *DeleteRepositoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Fetches a Repository's remote branches. + FetchRemoteBranches(ctx context.Context, in *FetchRemoteBranchesRequest, opts ...grpc.CallOption) (*FetchRemoteBranchesResponse, error) + // Lists Workspaces in a given Repository. + ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) + // Fetches a single Workspace. + GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) + // Creates a new Workspace in a given Repository. + CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) + // Deletes a single Workspace. + DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Installs dependency NPM packages (inside a Workspace). + InstallNpmPackages(ctx context.Context, in *InstallNpmPackagesRequest, opts ...grpc.CallOption) (*InstallNpmPackagesResponse, error) + // Pulls Git commits from the Repository's remote into a Workspace. + PullGitCommits(ctx context.Context, in *PullGitCommitsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes Git commits from a Workspace to the Repository's remote. + PushGitCommits(ctx context.Context, in *PushGitCommitsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Fetches Git statuses for the files in a Workspace. + FetchFileGitStatuses(ctx context.Context, in *FetchFileGitStatusesRequest, opts ...grpc.CallOption) (*FetchFileGitStatusesResponse, error) + // Fetches Git ahead/behind against a remote branch. + FetchGitAheadBehind(ctx context.Context, in *FetchGitAheadBehindRequest, opts ...grpc.CallOption) (*FetchGitAheadBehindResponse, error) + // Applies a Git commit for uncommitted files in a Workspace. + CommitWorkspaceChanges(ctx context.Context, in *CommitWorkspaceChangesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Performs a Git reset for uncommitted files in a Workspace. + ResetWorkspaceChanges(ctx context.Context, in *ResetWorkspaceChangesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Fetches Git diff for an uncommitted file in a Workspace. + FetchFileDiff(ctx context.Context, in *FetchFileDiffRequest, opts ...grpc.CallOption) (*FetchFileDiffResponse, error) + // Returns the contents of a given Workspace directory. + QueryDirectoryContents(ctx context.Context, in *QueryDirectoryContentsRequest, opts ...grpc.CallOption) (*QueryDirectoryContentsResponse, error) + // Creates a directory inside a Workspace. + MakeDirectory(ctx context.Context, in *MakeDirectoryRequest, opts ...grpc.CallOption) (*MakeDirectoryResponse, error) + // Deletes a directory (inside a Workspace) and all of its contents. + RemoveDirectory(ctx context.Context, in *RemoveDirectoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + MoveDirectory(ctx context.Context, in *MoveDirectoryRequest, opts ...grpc.CallOption) (*MoveDirectoryResponse, error) + // Returns the contents of a file (inside a Workspace). + ReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error) + // Deletes a file (inside a Workspace). + RemoveFile(ctx context.Context, in *RemoveFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Moves a file (inside a Workspace) to a new location. + MoveFile(ctx context.Context, in *MoveFileRequest, opts ...grpc.CallOption) (*MoveFileResponse, error) + // Writes to a file (inside a Workspace). + WriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*WriteFileResponse, error) + // Lists CompilationResults in a given Repository. + ListCompilationResults(ctx context.Context, in *ListCompilationResultsRequest, opts ...grpc.CallOption) (*ListCompilationResultsResponse, error) + // Fetches a single CompilationResult. + GetCompilationResult(ctx context.Context, in *GetCompilationResultRequest, opts ...grpc.CallOption) (*CompilationResult, error) + // Creates a new CompilationResult in a given project and location. + CreateCompilationResult(ctx context.Context, in *CreateCompilationResultRequest, opts ...grpc.CallOption) (*CompilationResult, error) + // Returns CompilationResultActions in a given CompilationResult. + QueryCompilationResultActions(ctx context.Context, in *QueryCompilationResultActionsRequest, opts ...grpc.CallOption) (*QueryCompilationResultActionsResponse, error) + // Lists WorkflowInvocations in a given Repository. + ListWorkflowInvocations(ctx context.Context, in *ListWorkflowInvocationsRequest, opts ...grpc.CallOption) (*ListWorkflowInvocationsResponse, error) + // Fetches a single WorkflowInvocation. + GetWorkflowInvocation(ctx context.Context, in *GetWorkflowInvocationRequest, opts ...grpc.CallOption) (*WorkflowInvocation, error) + // Creates a new WorkflowInvocation in a given Repository. + CreateWorkflowInvocation(ctx context.Context, in *CreateWorkflowInvocationRequest, opts ...grpc.CallOption) (*WorkflowInvocation, error) + // Deletes a single WorkflowInvocation. + DeleteWorkflowInvocation(ctx context.Context, in *DeleteWorkflowInvocationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Requests cancellation of a running WorkflowInvocation. + CancelWorkflowInvocation(ctx context.Context, in *CancelWorkflowInvocationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + QueryWorkflowInvocationActions(ctx context.Context, in *QueryWorkflowInvocationActionsRequest, opts ...grpc.CallOption) (*QueryWorkflowInvocationActionsResponse, error) +} + +type dataformClient struct { + cc grpc.ClientConnInterface +} + +func NewDataformClient(cc grpc.ClientConnInterface) DataformClient { + return &dataformClient{cc} +} + +func (c *dataformClient) ListRepositories(ctx context.Context, in *ListRepositoriesRequest, opts ...grpc.CallOption) (*ListRepositoriesResponse, error) { + out := new(ListRepositoriesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/ListRepositories", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) GetRepository(ctx context.Context, in *GetRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) { + out := new(Repository) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/GetRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) CreateRepository(ctx context.Context, in *CreateRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) { + out := new(Repository) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/CreateRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) UpdateRepository(ctx context.Context, in *UpdateRepositoryRequest, opts ...grpc.CallOption) (*Repository, error) { + out := new(Repository) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/UpdateRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) DeleteRepository(ctx context.Context, in *DeleteRepositoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/DeleteRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) FetchRemoteBranches(ctx context.Context, in *FetchRemoteBranchesRequest, opts ...grpc.CallOption) (*FetchRemoteBranchesResponse, error) { + out := new(FetchRemoteBranchesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/FetchRemoteBranches", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) ListWorkspaces(ctx context.Context, in *ListWorkspacesRequest, opts ...grpc.CallOption) (*ListWorkspacesResponse, error) { + out := new(ListWorkspacesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/ListWorkspaces", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { + out := new(Workspace) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/GetWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { + out := new(Workspace) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/CreateWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/DeleteWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) InstallNpmPackages(ctx context.Context, in *InstallNpmPackagesRequest, opts ...grpc.CallOption) (*InstallNpmPackagesResponse, error) { + out := new(InstallNpmPackagesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/InstallNpmPackages", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) PullGitCommits(ctx context.Context, in *PullGitCommitsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/PullGitCommits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) PushGitCommits(ctx context.Context, in *PushGitCommitsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/PushGitCommits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) FetchFileGitStatuses(ctx context.Context, in *FetchFileGitStatusesRequest, opts ...grpc.CallOption) (*FetchFileGitStatusesResponse, error) { + out := new(FetchFileGitStatusesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/FetchFileGitStatuses", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) FetchGitAheadBehind(ctx context.Context, in *FetchGitAheadBehindRequest, opts ...grpc.CallOption) (*FetchGitAheadBehindResponse, error) { + out := new(FetchGitAheadBehindResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/FetchGitAheadBehind", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) CommitWorkspaceChanges(ctx context.Context, in *CommitWorkspaceChangesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/CommitWorkspaceChanges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) ResetWorkspaceChanges(ctx context.Context, in *ResetWorkspaceChangesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/ResetWorkspaceChanges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) FetchFileDiff(ctx context.Context, in *FetchFileDiffRequest, opts ...grpc.CallOption) (*FetchFileDiffResponse, error) { + out := new(FetchFileDiffResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/FetchFileDiff", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) QueryDirectoryContents(ctx context.Context, in *QueryDirectoryContentsRequest, opts ...grpc.CallOption) (*QueryDirectoryContentsResponse, error) { + out := new(QueryDirectoryContentsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/QueryDirectoryContents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) MakeDirectory(ctx context.Context, in *MakeDirectoryRequest, opts ...grpc.CallOption) (*MakeDirectoryResponse, error) { + out := new(MakeDirectoryResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/MakeDirectory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) RemoveDirectory(ctx context.Context, in *RemoveDirectoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/RemoveDirectory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) MoveDirectory(ctx context.Context, in *MoveDirectoryRequest, opts ...grpc.CallOption) (*MoveDirectoryResponse, error) { + out := new(MoveDirectoryResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/MoveDirectory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) ReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error) { + out := new(ReadFileResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/ReadFile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) RemoveFile(ctx context.Context, in *RemoveFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/RemoveFile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) MoveFile(ctx context.Context, in *MoveFileRequest, opts ...grpc.CallOption) (*MoveFileResponse, error) { + out := new(MoveFileResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/MoveFile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) WriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*WriteFileResponse, error) { + out := new(WriteFileResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/WriteFile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) ListCompilationResults(ctx context.Context, in *ListCompilationResultsRequest, opts ...grpc.CallOption) (*ListCompilationResultsResponse, error) { + out := new(ListCompilationResultsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/ListCompilationResults", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) GetCompilationResult(ctx context.Context, in *GetCompilationResultRequest, opts ...grpc.CallOption) (*CompilationResult, error) { + out := new(CompilationResult) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/GetCompilationResult", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) CreateCompilationResult(ctx context.Context, in *CreateCompilationResultRequest, opts ...grpc.CallOption) (*CompilationResult, error) { + out := new(CompilationResult) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/CreateCompilationResult", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) QueryCompilationResultActions(ctx context.Context, in *QueryCompilationResultActionsRequest, opts ...grpc.CallOption) (*QueryCompilationResultActionsResponse, error) { + out := new(QueryCompilationResultActionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/QueryCompilationResultActions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) ListWorkflowInvocations(ctx context.Context, in *ListWorkflowInvocationsRequest, opts ...grpc.CallOption) (*ListWorkflowInvocationsResponse, error) { + out := new(ListWorkflowInvocationsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/ListWorkflowInvocations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) GetWorkflowInvocation(ctx context.Context, in *GetWorkflowInvocationRequest, opts ...grpc.CallOption) (*WorkflowInvocation, error) { + out := new(WorkflowInvocation) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/GetWorkflowInvocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) CreateWorkflowInvocation(ctx context.Context, in *CreateWorkflowInvocationRequest, opts ...grpc.CallOption) (*WorkflowInvocation, error) { + out := new(WorkflowInvocation) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/CreateWorkflowInvocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) DeleteWorkflowInvocation(ctx context.Context, in *DeleteWorkflowInvocationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/DeleteWorkflowInvocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) CancelWorkflowInvocation(ctx context.Context, in *CancelWorkflowInvocationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/CancelWorkflowInvocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataformClient) QueryWorkflowInvocationActions(ctx context.Context, in *QueryWorkflowInvocationActionsRequest, opts ...grpc.CallOption) (*QueryWorkflowInvocationActionsResponse, error) { + out := new(QueryWorkflowInvocationActionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataform.v1alpha2.Dataform/QueryWorkflowInvocationActions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataformServer is the server API for Dataform service. +type DataformServer interface { + // Lists Repositories in a given project and location. + ListRepositories(context.Context, *ListRepositoriesRequest) (*ListRepositoriesResponse, error) + // Fetches a single Repository. + GetRepository(context.Context, *GetRepositoryRequest) (*Repository, error) + // Creates a new Repository in a given project and location. + CreateRepository(context.Context, *CreateRepositoryRequest) (*Repository, error) + // Updates a single Repository. + UpdateRepository(context.Context, *UpdateRepositoryRequest) (*Repository, error) + // Deletes a single Repository. + DeleteRepository(context.Context, *DeleteRepositoryRequest) (*emptypb.Empty, error) + // Fetches a Repository's remote branches. + FetchRemoteBranches(context.Context, *FetchRemoteBranchesRequest) (*FetchRemoteBranchesResponse, error) + // Lists Workspaces in a given Repository. + ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) + // Fetches a single Workspace. + GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) + // Creates a new Workspace in a given Repository. + CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) + // Deletes a single Workspace. + DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error) + // Installs dependency NPM packages (inside a Workspace). + InstallNpmPackages(context.Context, *InstallNpmPackagesRequest) (*InstallNpmPackagesResponse, error) + // Pulls Git commits from the Repository's remote into a Workspace. + PullGitCommits(context.Context, *PullGitCommitsRequest) (*emptypb.Empty, error) + // Pushes Git commits from a Workspace to the Repository's remote. + PushGitCommits(context.Context, *PushGitCommitsRequest) (*emptypb.Empty, error) + // Fetches Git statuses for the files in a Workspace. + FetchFileGitStatuses(context.Context, *FetchFileGitStatusesRequest) (*FetchFileGitStatusesResponse, error) + // Fetches Git ahead/behind against a remote branch. + FetchGitAheadBehind(context.Context, *FetchGitAheadBehindRequest) (*FetchGitAheadBehindResponse, error) + // Applies a Git commit for uncommitted files in a Workspace. + CommitWorkspaceChanges(context.Context, *CommitWorkspaceChangesRequest) (*emptypb.Empty, error) + // Performs a Git reset for uncommitted files in a Workspace. + ResetWorkspaceChanges(context.Context, *ResetWorkspaceChangesRequest) (*emptypb.Empty, error) + // Fetches Git diff for an uncommitted file in a Workspace. + FetchFileDiff(context.Context, *FetchFileDiffRequest) (*FetchFileDiffResponse, error) + // Returns the contents of a given Workspace directory. + QueryDirectoryContents(context.Context, *QueryDirectoryContentsRequest) (*QueryDirectoryContentsResponse, error) + // Creates a directory inside a Workspace. + MakeDirectory(context.Context, *MakeDirectoryRequest) (*MakeDirectoryResponse, error) + // Deletes a directory (inside a Workspace) and all of its contents. + RemoveDirectory(context.Context, *RemoveDirectoryRequest) (*emptypb.Empty, error) + // Moves a directory (inside a Workspace), and all of its contents, to a new + // location. + MoveDirectory(context.Context, *MoveDirectoryRequest) (*MoveDirectoryResponse, error) + // Returns the contents of a file (inside a Workspace). + ReadFile(context.Context, *ReadFileRequest) (*ReadFileResponse, error) + // Deletes a file (inside a Workspace). + RemoveFile(context.Context, *RemoveFileRequest) (*emptypb.Empty, error) + // Moves a file (inside a Workspace) to a new location. + MoveFile(context.Context, *MoveFileRequest) (*MoveFileResponse, error) + // Writes to a file (inside a Workspace). + WriteFile(context.Context, *WriteFileRequest) (*WriteFileResponse, error) + // Lists CompilationResults in a given Repository. + ListCompilationResults(context.Context, *ListCompilationResultsRequest) (*ListCompilationResultsResponse, error) + // Fetches a single CompilationResult. + GetCompilationResult(context.Context, *GetCompilationResultRequest) (*CompilationResult, error) + // Creates a new CompilationResult in a given project and location. + CreateCompilationResult(context.Context, *CreateCompilationResultRequest) (*CompilationResult, error) + // Returns CompilationResultActions in a given CompilationResult. + QueryCompilationResultActions(context.Context, *QueryCompilationResultActionsRequest) (*QueryCompilationResultActionsResponse, error) + // Lists WorkflowInvocations in a given Repository. + ListWorkflowInvocations(context.Context, *ListWorkflowInvocationsRequest) (*ListWorkflowInvocationsResponse, error) + // Fetches a single WorkflowInvocation. + GetWorkflowInvocation(context.Context, *GetWorkflowInvocationRequest) (*WorkflowInvocation, error) + // Creates a new WorkflowInvocation in a given Repository. + CreateWorkflowInvocation(context.Context, *CreateWorkflowInvocationRequest) (*WorkflowInvocation, error) + // Deletes a single WorkflowInvocation. + DeleteWorkflowInvocation(context.Context, *DeleteWorkflowInvocationRequest) (*emptypb.Empty, error) + // Requests cancellation of a running WorkflowInvocation. + CancelWorkflowInvocation(context.Context, *CancelWorkflowInvocationRequest) (*emptypb.Empty, error) + // Returns WorkflowInvocationActions in a given WorkflowInvocation. + QueryWorkflowInvocationActions(context.Context, *QueryWorkflowInvocationActionsRequest) (*QueryWorkflowInvocationActionsResponse, error) +} + +// UnimplementedDataformServer can be embedded to have forward compatible implementations. +type UnimplementedDataformServer struct { +} + +func (*UnimplementedDataformServer) ListRepositories(context.Context, *ListRepositoriesRequest) (*ListRepositoriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRepositories not implemented") +} +func (*UnimplementedDataformServer) GetRepository(context.Context, *GetRepositoryRequest) (*Repository, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRepository not implemented") +} +func (*UnimplementedDataformServer) CreateRepository(context.Context, *CreateRepositoryRequest) (*Repository, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRepository not implemented") +} +func (*UnimplementedDataformServer) UpdateRepository(context.Context, *UpdateRepositoryRequest) (*Repository, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateRepository not implemented") +} +func (*UnimplementedDataformServer) DeleteRepository(context.Context, *DeleteRepositoryRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRepository not implemented") +} +func (*UnimplementedDataformServer) FetchRemoteBranches(context.Context, *FetchRemoteBranchesRequest) (*FetchRemoteBranchesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchRemoteBranches not implemented") +} +func (*UnimplementedDataformServer) ListWorkspaces(context.Context, *ListWorkspacesRequest) (*ListWorkspacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaces not implemented") +} +func (*UnimplementedDataformServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented") +} +func (*UnimplementedDataformServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspace not implemented") +} +func (*UnimplementedDataformServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented") +} +func (*UnimplementedDataformServer) InstallNpmPackages(context.Context, *InstallNpmPackagesRequest) (*InstallNpmPackagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InstallNpmPackages not implemented") +} +func (*UnimplementedDataformServer) PullGitCommits(context.Context, *PullGitCommitsRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PullGitCommits not implemented") +} +func (*UnimplementedDataformServer) PushGitCommits(context.Context, *PushGitCommitsRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushGitCommits not implemented") +} +func (*UnimplementedDataformServer) FetchFileGitStatuses(context.Context, *FetchFileGitStatusesRequest) (*FetchFileGitStatusesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchFileGitStatuses not implemented") +} +func (*UnimplementedDataformServer) FetchGitAheadBehind(context.Context, *FetchGitAheadBehindRequest) (*FetchGitAheadBehindResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchGitAheadBehind not implemented") +} +func (*UnimplementedDataformServer) CommitWorkspaceChanges(context.Context, *CommitWorkspaceChangesRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CommitWorkspaceChanges not implemented") +} +func (*UnimplementedDataformServer) ResetWorkspaceChanges(context.Context, *ResetWorkspaceChangesRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetWorkspaceChanges not implemented") +} +func (*UnimplementedDataformServer) FetchFileDiff(context.Context, *FetchFileDiffRequest) (*FetchFileDiffResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchFileDiff not implemented") +} +func (*UnimplementedDataformServer) QueryDirectoryContents(context.Context, *QueryDirectoryContentsRequest) (*QueryDirectoryContentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryDirectoryContents not implemented") +} +func (*UnimplementedDataformServer) MakeDirectory(context.Context, *MakeDirectoryRequest) (*MakeDirectoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MakeDirectory not implemented") +} +func (*UnimplementedDataformServer) RemoveDirectory(context.Context, *RemoveDirectoryRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveDirectory not implemented") +} +func (*UnimplementedDataformServer) MoveDirectory(context.Context, *MoveDirectoryRequest) (*MoveDirectoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveDirectory not implemented") +} +func (*UnimplementedDataformServer) ReadFile(context.Context, *ReadFileRequest) (*ReadFileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadFile not implemented") +} +func (*UnimplementedDataformServer) RemoveFile(context.Context, *RemoveFileRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveFile not implemented") +} +func (*UnimplementedDataformServer) MoveFile(context.Context, *MoveFileRequest) (*MoveFileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveFile not implemented") +} +func (*UnimplementedDataformServer) WriteFile(context.Context, *WriteFileRequest) (*WriteFileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteFile not implemented") +} +func (*UnimplementedDataformServer) ListCompilationResults(context.Context, *ListCompilationResultsRequest) (*ListCompilationResultsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCompilationResults not implemented") +} +func (*UnimplementedDataformServer) GetCompilationResult(context.Context, *GetCompilationResultRequest) (*CompilationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCompilationResult not implemented") +} +func (*UnimplementedDataformServer) CreateCompilationResult(context.Context, *CreateCompilationResultRequest) (*CompilationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCompilationResult not implemented") +} +func (*UnimplementedDataformServer) QueryCompilationResultActions(context.Context, *QueryCompilationResultActionsRequest) (*QueryCompilationResultActionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryCompilationResultActions not implemented") +} +func (*UnimplementedDataformServer) ListWorkflowInvocations(context.Context, *ListWorkflowInvocationsRequest) (*ListWorkflowInvocationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowInvocations not implemented") +} +func (*UnimplementedDataformServer) GetWorkflowInvocation(context.Context, *GetWorkflowInvocationRequest) (*WorkflowInvocation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowInvocation not implemented") +} +func (*UnimplementedDataformServer) CreateWorkflowInvocation(context.Context, *CreateWorkflowInvocationRequest) (*WorkflowInvocation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowInvocation not implemented") +} +func (*UnimplementedDataformServer) DeleteWorkflowInvocation(context.Context, *DeleteWorkflowInvocationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkflowInvocation not implemented") +} +func (*UnimplementedDataformServer) CancelWorkflowInvocation(context.Context, *CancelWorkflowInvocationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelWorkflowInvocation not implemented") +} +func (*UnimplementedDataformServer) QueryWorkflowInvocationActions(context.Context, *QueryWorkflowInvocationActionsRequest) (*QueryWorkflowInvocationActionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryWorkflowInvocationActions not implemented") +} + +func RegisterDataformServer(s *grpc.Server, srv DataformServer) { + s.RegisterService(&_Dataform_serviceDesc, srv) +} + +func _Dataform_ListRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRepositoriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).ListRepositories(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/ListRepositories", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).ListRepositories(ctx, req.(*ListRepositoriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_GetRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).GetRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/GetRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).GetRepository(ctx, req.(*GetRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_CreateRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).CreateRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/CreateRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).CreateRepository(ctx, req.(*CreateRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_UpdateRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).UpdateRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/UpdateRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).UpdateRepository(ctx, req.(*UpdateRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_DeleteRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).DeleteRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/DeleteRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).DeleteRepository(ctx, req.(*DeleteRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_FetchRemoteBranches_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchRemoteBranchesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).FetchRemoteBranches(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/FetchRemoteBranches", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).FetchRemoteBranches(ctx, req.(*FetchRemoteBranchesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkspacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).ListWorkspaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/ListWorkspaces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).ListWorkspaces(ctx, req.(*ListWorkspacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).GetWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/GetWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_CreateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).CreateWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/CreateWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).CreateWorkspace(ctx, req.(*CreateWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_DeleteWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).DeleteWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/DeleteWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).DeleteWorkspace(ctx, req.(*DeleteWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_InstallNpmPackages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InstallNpmPackagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).InstallNpmPackages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/InstallNpmPackages", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).InstallNpmPackages(ctx, req.(*InstallNpmPackagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_PullGitCommits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PullGitCommitsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).PullGitCommits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/PullGitCommits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).PullGitCommits(ctx, req.(*PullGitCommitsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_PushGitCommits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushGitCommitsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).PushGitCommits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/PushGitCommits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).PushGitCommits(ctx, req.(*PushGitCommitsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_FetchFileGitStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchFileGitStatusesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).FetchFileGitStatuses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/FetchFileGitStatuses", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).FetchFileGitStatuses(ctx, req.(*FetchFileGitStatusesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_FetchGitAheadBehind_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchGitAheadBehindRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).FetchGitAheadBehind(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/FetchGitAheadBehind", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).FetchGitAheadBehind(ctx, req.(*FetchGitAheadBehindRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_CommitWorkspaceChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CommitWorkspaceChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).CommitWorkspaceChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/CommitWorkspaceChanges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).CommitWorkspaceChanges(ctx, req.(*CommitWorkspaceChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_ResetWorkspaceChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResetWorkspaceChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).ResetWorkspaceChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/ResetWorkspaceChanges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).ResetWorkspaceChanges(ctx, req.(*ResetWorkspaceChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_FetchFileDiff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchFileDiffRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).FetchFileDiff(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/FetchFileDiff", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).FetchFileDiff(ctx, req.(*FetchFileDiffRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_QueryDirectoryContents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDirectoryContentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).QueryDirectoryContents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/QueryDirectoryContents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).QueryDirectoryContents(ctx, req.(*QueryDirectoryContentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_MakeDirectory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MakeDirectoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).MakeDirectory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/MakeDirectory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).MakeDirectory(ctx, req.(*MakeDirectoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_RemoveDirectory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveDirectoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).RemoveDirectory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/RemoveDirectory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).RemoveDirectory(ctx, req.(*RemoveDirectoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_MoveDirectory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveDirectoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).MoveDirectory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/MoveDirectory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).MoveDirectory(ctx, req.(*MoveDirectoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_ReadFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).ReadFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/ReadFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).ReadFile(ctx, req.(*ReadFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_RemoveFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).RemoveFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/RemoveFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).RemoveFile(ctx, req.(*RemoveFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_MoveFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).MoveFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/MoveFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).MoveFile(ctx, req.(*MoveFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_WriteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).WriteFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/WriteFile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).WriteFile(ctx, req.(*WriteFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_ListCompilationResults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCompilationResultsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).ListCompilationResults(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/ListCompilationResults", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).ListCompilationResults(ctx, req.(*ListCompilationResultsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_GetCompilationResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCompilationResultRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).GetCompilationResult(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/GetCompilationResult", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).GetCompilationResult(ctx, req.(*GetCompilationResultRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_CreateCompilationResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCompilationResultRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).CreateCompilationResult(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/CreateCompilationResult", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).CreateCompilationResult(ctx, req.(*CreateCompilationResultRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_QueryCompilationResultActions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCompilationResultActionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).QueryCompilationResultActions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/QueryCompilationResultActions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).QueryCompilationResultActions(ctx, req.(*QueryCompilationResultActionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_ListWorkflowInvocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkflowInvocationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).ListWorkflowInvocations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/ListWorkflowInvocations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).ListWorkflowInvocations(ctx, req.(*ListWorkflowInvocationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_GetWorkflowInvocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkflowInvocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).GetWorkflowInvocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/GetWorkflowInvocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).GetWorkflowInvocation(ctx, req.(*GetWorkflowInvocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_CreateWorkflowInvocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkflowInvocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).CreateWorkflowInvocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/CreateWorkflowInvocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).CreateWorkflowInvocation(ctx, req.(*CreateWorkflowInvocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_DeleteWorkflowInvocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteWorkflowInvocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).DeleteWorkflowInvocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/DeleteWorkflowInvocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).DeleteWorkflowInvocation(ctx, req.(*DeleteWorkflowInvocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_CancelWorkflowInvocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelWorkflowInvocationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).CancelWorkflowInvocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/CancelWorkflowInvocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).CancelWorkflowInvocation(ctx, req.(*CancelWorkflowInvocationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Dataform_QueryWorkflowInvocationActions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWorkflowInvocationActionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataformServer).QueryWorkflowInvocationActions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataform.v1alpha2.Dataform/QueryWorkflowInvocationActions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataformServer).QueryWorkflowInvocationActions(ctx, req.(*QueryWorkflowInvocationActionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Dataform_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dataform.v1alpha2.Dataform", + HandlerType: (*DataformServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListRepositories", + Handler: _Dataform_ListRepositories_Handler, + }, + { + MethodName: "GetRepository", + Handler: _Dataform_GetRepository_Handler, + }, + { + MethodName: "CreateRepository", + Handler: _Dataform_CreateRepository_Handler, + }, + { + MethodName: "UpdateRepository", + Handler: _Dataform_UpdateRepository_Handler, + }, + { + MethodName: "DeleteRepository", + Handler: _Dataform_DeleteRepository_Handler, + }, + { + MethodName: "FetchRemoteBranches", + Handler: _Dataform_FetchRemoteBranches_Handler, + }, + { + MethodName: "ListWorkspaces", + Handler: _Dataform_ListWorkspaces_Handler, + }, + { + MethodName: "GetWorkspace", + Handler: _Dataform_GetWorkspace_Handler, + }, + { + MethodName: "CreateWorkspace", + Handler: _Dataform_CreateWorkspace_Handler, + }, + { + MethodName: "DeleteWorkspace", + Handler: _Dataform_DeleteWorkspace_Handler, + }, + { + MethodName: "InstallNpmPackages", + Handler: _Dataform_InstallNpmPackages_Handler, + }, + { + MethodName: "PullGitCommits", + Handler: _Dataform_PullGitCommits_Handler, + }, + { + MethodName: "PushGitCommits", + Handler: _Dataform_PushGitCommits_Handler, + }, + { + MethodName: "FetchFileGitStatuses", + Handler: _Dataform_FetchFileGitStatuses_Handler, + }, + { + MethodName: "FetchGitAheadBehind", + Handler: _Dataform_FetchGitAheadBehind_Handler, + }, + { + MethodName: "CommitWorkspaceChanges", + Handler: _Dataform_CommitWorkspaceChanges_Handler, + }, + { + MethodName: "ResetWorkspaceChanges", + Handler: _Dataform_ResetWorkspaceChanges_Handler, + }, + { + MethodName: "FetchFileDiff", + Handler: _Dataform_FetchFileDiff_Handler, + }, + { + MethodName: "QueryDirectoryContents", + Handler: _Dataform_QueryDirectoryContents_Handler, + }, + { + MethodName: "MakeDirectory", + Handler: _Dataform_MakeDirectory_Handler, + }, + { + MethodName: "RemoveDirectory", + Handler: _Dataform_RemoveDirectory_Handler, + }, + { + MethodName: "MoveDirectory", + Handler: _Dataform_MoveDirectory_Handler, + }, + { + MethodName: "ReadFile", + Handler: _Dataform_ReadFile_Handler, + }, + { + MethodName: "RemoveFile", + Handler: _Dataform_RemoveFile_Handler, + }, + { + MethodName: "MoveFile", + Handler: _Dataform_MoveFile_Handler, + }, + { + MethodName: "WriteFile", + Handler: _Dataform_WriteFile_Handler, + }, + { + MethodName: "ListCompilationResults", + Handler: _Dataform_ListCompilationResults_Handler, + }, + { + MethodName: "GetCompilationResult", + Handler: _Dataform_GetCompilationResult_Handler, + }, + { + MethodName: "CreateCompilationResult", + Handler: _Dataform_CreateCompilationResult_Handler, + }, + { + MethodName: "QueryCompilationResultActions", + Handler: _Dataform_QueryCompilationResultActions_Handler, + }, + { + MethodName: "ListWorkflowInvocations", + Handler: _Dataform_ListWorkflowInvocations_Handler, + }, + { + MethodName: "GetWorkflowInvocation", + Handler: _Dataform_GetWorkflowInvocation_Handler, + }, + { + MethodName: "CreateWorkflowInvocation", + Handler: _Dataform_CreateWorkflowInvocation_Handler, + }, + { + MethodName: "DeleteWorkflowInvocation", + Handler: _Dataform_DeleteWorkflowInvocation_Handler, + }, + { + MethodName: "CancelWorkflowInvocation", + Handler: _Dataform_CancelWorkflowInvocation_Handler, + }, + { + MethodName: "QueryWorkflowInvocationActions", + Handler: _Dataform_QueryWorkflowInvocationActions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dataform/v1alpha2/dataform.proto", +} diff --git a/dataform/apiv1alpha2/doc.go b/dataform/apiv1alpha2/doc.go new file mode 100644 index 000000000000..b2244825697b --- /dev/null +++ b/dataform/apiv1alpha2/doc.go @@ -0,0 +1,197 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package dataform is an auto-generated package for the +// Dataform API. +// +// NOTE: This package is in alpha. It is not stable, and is likely to change. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataform.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataform.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dataformpb.ListRepositoriesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataform/v1alpha2#ListRepositoriesRequest. +// } +// it := c.ListRepositories(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package dataform // import "cloud.google.com/go/dataform/apiv1alpha2" + +import ( + "context" + "fmt" + "net/http" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/dataform/apiv1alpha2/gapic_metadata.json b/dataform/apiv1alpha2/gapic_metadata.json new file mode 100644 index 000000000000..bace17cd6d09 --- /dev/null +++ b/dataform/apiv1alpha2/gapic_metadata.json @@ -0,0 +1,433 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.dataform.v1alpha2", + "libraryPackage": "cloud.google.com/go/dataform/apiv1alpha2", + "services": { + "Dataform": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelWorkflowInvocation": { + "methods": [ + "CancelWorkflowInvocation" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "CommitWorkspaceChanges" + ] + }, + "CreateCompilationResult": { + "methods": [ + "CreateCompilationResult" + ] + }, + "CreateRepository": { + "methods": [ + "CreateRepository" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "CreateWorkflowInvocation" + ] + }, + "CreateWorkspace": { + "methods": [ + "CreateWorkspace" + ] + }, + "DeleteRepository": { + "methods": [ + "DeleteRepository" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "DeleteWorkflowInvocation" + ] + }, + "DeleteWorkspace": { + "methods": [ + "DeleteWorkspace" + ] + }, + "FetchFileDiff": { + "methods": [ + "FetchFileDiff" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "FetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "FetchGitAheadBehind" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "FetchRemoteBranches" + ] + }, + "GetCompilationResult": { + "methods": [ + "GetCompilationResult" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetRepository": { + "methods": [ + "GetRepository" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "GetWorkflowInvocation" + ] + }, + "GetWorkspace": { + "methods": [ + "GetWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "InstallNpmPackages" + ] + }, + "ListCompilationResults": { + "methods": [ + "ListCompilationResults" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListRepositories": { + "methods": [ + "ListRepositories" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "ListWorkflowInvocations" + ] + }, + "ListWorkspaces": { + "methods": [ + "ListWorkspaces" + ] + }, + "MakeDirectory": { + "methods": [ + "MakeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "MoveDirectory" + ] + }, + "MoveFile": { + "methods": [ + "MoveFile" + ] + }, + "PullGitCommits": { + "methods": [ + "PullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "PushGitCommits" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "QueryCompilationResultActions" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "QueryDirectoryContents" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "QueryWorkflowInvocationActions" + ] + }, + "ReadFile": { + "methods": [ + "ReadFile" + ] + }, + "RemoveDirectory": { + "methods": [ + "RemoveDirectory" + ] + }, + "RemoveFile": { + "methods": [ + "RemoveFile" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "ResetWorkspaceChanges" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateRepository": { + "methods": [ + "UpdateRepository" + ] + }, + "WriteFile": { + "methods": [ + "WriteFile" + ] + } + } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CancelWorkflowInvocation": { + "methods": [ + "CancelWorkflowInvocation" + ] + }, + "CommitWorkspaceChanges": { + "methods": [ + "CommitWorkspaceChanges" + ] + }, + "CreateCompilationResult": { + "methods": [ + "CreateCompilationResult" + ] + }, + "CreateRepository": { + "methods": [ + "CreateRepository" + ] + }, + "CreateWorkflowInvocation": { + "methods": [ + "CreateWorkflowInvocation" + ] + }, + "CreateWorkspace": { + "methods": [ + "CreateWorkspace" + ] + }, + "DeleteRepository": { + "methods": [ + "DeleteRepository" + ] + }, + "DeleteWorkflowInvocation": { + "methods": [ + "DeleteWorkflowInvocation" + ] + }, + "DeleteWorkspace": { + "methods": [ + "DeleteWorkspace" + ] + }, + "FetchFileDiff": { + "methods": [ + "FetchFileDiff" + ] + }, + "FetchFileGitStatuses": { + "methods": [ + "FetchFileGitStatuses" + ] + }, + "FetchGitAheadBehind": { + "methods": [ + "FetchGitAheadBehind" + ] + }, + "FetchRemoteBranches": { + "methods": [ + "FetchRemoteBranches" + ] + }, + "GetCompilationResult": { + "methods": [ + "GetCompilationResult" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetRepository": { + "methods": [ + "GetRepository" + ] + }, + "GetWorkflowInvocation": { + "methods": [ + "GetWorkflowInvocation" + ] + }, + "GetWorkspace": { + "methods": [ + "GetWorkspace" + ] + }, + "InstallNpmPackages": { + "methods": [ + "InstallNpmPackages" + ] + }, + "ListCompilationResults": { + "methods": [ + "ListCompilationResults" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListRepositories": { + "methods": [ + "ListRepositories" + ] + }, + "ListWorkflowInvocations": { + "methods": [ + "ListWorkflowInvocations" + ] + }, + "ListWorkspaces": { + "methods": [ + "ListWorkspaces" + ] + }, + "MakeDirectory": { + "methods": [ + "MakeDirectory" + ] + }, + "MoveDirectory": { + "methods": [ + "MoveDirectory" + ] + }, + "MoveFile": { + "methods": [ + "MoveFile" + ] + }, + "PullGitCommits": { + "methods": [ + "PullGitCommits" + ] + }, + "PushGitCommits": { + "methods": [ + "PushGitCommits" + ] + }, + "QueryCompilationResultActions": { + "methods": [ + "QueryCompilationResultActions" + ] + }, + "QueryDirectoryContents": { + "methods": [ + "QueryDirectoryContents" + ] + }, + "QueryWorkflowInvocationActions": { + "methods": [ + "QueryWorkflowInvocationActions" + ] + }, + "ReadFile": { + "methods": [ + "ReadFile" + ] + }, + "RemoveDirectory": { + "methods": [ + "RemoveDirectory" + ] + }, + "RemoveFile": { + "methods": [ + "RemoveFile" + ] + }, + "ResetWorkspaceChanges": { + "methods": [ + "ResetWorkspaceChanges" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateRepository": { + "methods": [ + "UpdateRepository" + ] + }, + "WriteFile": { + "methods": [ + "WriteFile" + ] + } + } + } + } + } + } +} diff --git a/dataform/apiv1alpha2/version.go b/dataform/apiv1alpha2/version.go new file mode 100644 index 000000000000..fdb1178f54d8 --- /dev/null +++ b/dataform/apiv1alpha2/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package dataform + +import "cloud.google.com/go/dataform/internal" + +func init() { + versionClient = internal.Version +} diff --git a/dataform/go.mod b/dataform/go.mod new file mode 100644 index 000000000000..ac501208ad7d --- /dev/null +++ b/dataform/go.mod @@ -0,0 +1,25 @@ +module cloud.google.com/go/dataform + +go 1.18 + +require ( + github.com/googleapis/gax-go/v2 v2.4.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect +) diff --git a/dataform/go.sum b/dataform/go.sum new file mode 100644 index 000000000000..930aae1a0fb0 --- /dev/null +++ b/dataform/go.sum @@ -0,0 +1,657 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +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= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +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/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +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= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/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= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/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= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +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-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f h1:XVHpVMvPs4MtH3h6cThzKs2snNexcfd35vQx2T3IuIY= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/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-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/dataform/internal/version.go b/dataform/internal/version.go new file mode 100644 index 000000000000..f0adc49b20c9 --- /dev/null +++ b/dataform/internal/version.go @@ -0,0 +1,20 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package internal + +// Version is the current tagged release of the library. +const Version = "0.3.0" diff --git a/datafusion/apiv1/data_fusion_client.go b/datafusion/apiv1/data_fusion_client.go index 2a6e5986a16e..6a11959f2f28 100644 --- a/datafusion/apiv1/data_fusion_client.go +++ b/datafusion/apiv1/data_fusion_client.go @@ -128,7 +128,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -272,7 +273,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/datafusion/apiv1/data_fusion_client_example_test.go b/datafusion/apiv1/data_fusion_client_example_test.go index b03531eb8f0b..4a84fa9ee2cd 100644 --- a/datafusion/apiv1/data_fusion_client_example_test.go +++ b/datafusion/apiv1/data_fusion_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleClient_ListAvailableVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleClient_ListAvailableVersions() { func ExampleClient_ListInstances() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -90,6 +105,11 @@ func ExampleClient_ListInstances() { func ExampleClient_GetInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +130,11 @@ func ExampleClient_GetInstance() { func ExampleClient_CreateInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +160,11 @@ func ExampleClient_CreateInstance() { func ExampleClient_DeleteInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +188,11 @@ func ExampleClient_DeleteInstance() { func ExampleClient_UpdateInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +218,11 @@ func ExampleClient_UpdateInstance() { func ExampleClient_RestartInstance() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datafusion.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datafusion/apiv1/doc.go b/datafusion/apiv1/doc.go index ccf67f769d1d..8984acdb61df 100644 --- a/datafusion/apiv1/doc.go +++ b/datafusion/apiv1/doc.go @@ -25,49 +25,60 @@ // prepare, blend, transfer and transform data without having to wrestle with // infrastructure. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datafusion.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datafusion.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datafusion.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &datafusionpb.ListAvailableVersionsRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datafusion/v1#ListAvailableVersionsRequest. -// } -// it := c.ListAvailableVersions(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datafusion.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &datafusionpb.ListAvailableVersionsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datafusion/v1#ListAvailableVersionsRequest. +// } +// it := c.ListAvailableVersions(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/datafusion/go.mod b/datafusion/go.mod index 2f634cef9d85..c07fbd59245f 100644 --- a/datafusion/go.mod +++ b/datafusion/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/datafusion -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/datafusion/go.sum b/datafusion/go.sum index f00d995cec43..fe8755ea9d8f 100644 --- a/datafusion/go.sum +++ b/datafusion/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +621,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +638,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/datalabeling/CHANGES.md b/datalabeling/CHANGES.md index 55f27804478d..b56e32dcab5e 100644 --- a/datalabeling/CHANGES.md +++ b/datalabeling/CHANGES.md @@ -1,5 +1,19 @@ # Changes +## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/datalabeling/v0.4.0...datalabeling/v0.5.0) (2022-09-19) + + +### Features + +* **datalabeling:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/datalabeling/v0.3.0...datalabeling/v0.4.0) (2022-09-15) + + +### Features + +* **datalabeling/apiv1beta1:** add REST transport ([f7b0822](https://github.com/googleapis/google-cloud-go/commit/f7b082212b1e46ff2f4126b52d49618785c2e8ca)) + ## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/datalabeling/v0.2.0...datalabeling/v0.3.0) (2022-02-23) diff --git a/datalabeling/apiv1beta1/data_labeling_client.go b/datalabeling/apiv1beta1/data_labeling_client.go index 40992c9fdda1..dce7800e8f39 100644 --- a/datalabeling/apiv1beta1/data_labeling_client.go +++ b/datalabeling/apiv1beta1/data_labeling_client.go @@ -17,24 +17,30 @@ package datalabeling import ( + "bytes" "context" "fmt" + "io/ioutil" "math" + "net/http" "net/url" "time" "cloud.google.com/go/longrunning" lroauto "cloud.google.com/go/longrunning/autogen" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" datalabelingpb "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -360,6 +366,255 @@ func defaultCallOptions() *CallOptions { } } +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + CreateDataset: []gax.CallOption{}, + GetDataset: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListDatasets: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteDataset: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ImportData: []gax.CallOption{}, + ExportData: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetDataItem: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListDataItems: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetAnnotatedDataset: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListAnnotatedDatasets: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteAnnotatedDataset: []gax.CallOption{}, + LabelImage: []gax.CallOption{}, + LabelVideo: []gax.CallOption{}, + LabelText: []gax.CallOption{}, + GetExample: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListExamples: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + CreateAnnotationSpecSet: []gax.CallOption{}, + GetAnnotationSpecSet: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListAnnotationSpecSets: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteAnnotationSpecSet: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + CreateInstruction: []gax.CallOption{}, + GetInstruction: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListInstructions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + DeleteInstruction: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + GetEvaluation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + SearchEvaluations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + SearchExampleComparisons: []gax.CallOption{}, + CreateEvaluationJob: []gax.CallOption{}, + UpdateEvaluationJob: []gax.CallOption{}, + GetEvaluationJob: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + PauseEvaluationJob: []gax.CallOption{}, + ResumeEvaluationJob: []gax.CallOption{}, + DeleteEvaluationJob: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + ListEvaluationJobs: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 30000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusGatewayTimeout, + http.StatusServiceUnavailable) + }), + }, + } +} + // internalClient is an interface that defines the methods available from Data Labeling API. type internalClient interface { Close() error @@ -441,7 +696,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -748,7 +1004,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -768,6 +1025,89 @@ func (c *gRPCClient) Close() error { return c.connPool.Close() } +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions +} + +// NewRESTClient creates a new data labeling service rest client. +// +// Service for the AI Platform Data Labeling API. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://datalabeling.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://datalabeling.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://datalabeling.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} func (c *gRPCClient) CreateDataset(ctx context.Context, req *datalabelingpb.CreateDatasetRequest, opts ...gax.CallOption) (*datalabelingpb.Dataset, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 30000*time.Millisecond) @@ -1702,51 +2042,2201 @@ func (c *gRPCClient) ListEvaluationJobs(ctx context.Context, req *datalabelingpb return it } -// CreateInstructionOperation manages a long-running operation from CreateInstruction. -type CreateInstructionOperation struct { - lro *longrunning.Operation -} - -// CreateInstructionOperation returns a new CreateInstructionOperation from a given name. -// The name must be that of a previously created CreateInstructionOperation, possibly from a different process. -func (c *gRPCClient) CreateInstructionOperation(name string) *CreateInstructionOperation { - return &CreateInstructionOperation{ - lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), - } -} - -// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. -// -// See documentation of Poll for error-handling information. -func (op *CreateInstructionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.Instruction, error) { - var resp datalabelingpb.Instruction - if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { +// CreateDataset creates dataset. If success return a Dataset resource. +func (c *restClient) CreateDataset(ctx context.Context, req *datalabelingpb.CreateDatasetRequest, opts ...gax.CallOption) (*datalabelingpb.Dataset, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { return nil, err } - return &resp, nil -} -// Poll fetches the latest state of the long-running operation. -// -// Poll also fetches the latest metadata, which can be retrieved by Metadata. -// -// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and -// the operation has completed with failure, the error is returned and op.Done will return true. -// If Poll succeeds and the operation has completed successfully, -// op.Done will return true, and the response of the operation is returned. -// If Poll succeeds and the operation has not completed, the returned response and error are both nil. -func (op *CreateInstructionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.Instruction, error) { - var resp datalabelingpb.Instruction - if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { return nil, err } - if !op.Done() { - return nil, nil - } - return &resp, nil -} + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/datasets", req.GetParent()) -// Metadata returns metadata associated with the long-running operation. + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateDataset[0:len((*c.CallOptions).CreateDataset):len((*c.CallOptions).CreateDataset)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.Dataset{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetDataset gets dataset by resource name. +func (c *restClient) GetDataset(ctx context.Context, req *datalabelingpb.GetDatasetRequest, opts ...gax.CallOption) (*datalabelingpb.Dataset, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetDataset[0:len((*c.CallOptions).GetDataset):len((*c.CallOptions).GetDataset)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.Dataset{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListDatasets lists datasets under a project. Pagination is supported. +func (c *restClient) ListDatasets(ctx context.Context, req *datalabelingpb.ListDatasetsRequest, opts ...gax.CallOption) *DatasetIterator { + it := &DatasetIterator{} + req = proto.Clone(req).(*datalabelingpb.ListDatasetsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.Dataset, string, error) { + resp := &datalabelingpb.ListDatasetsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/datasets", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDatasets(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteDataset deletes a dataset by resource name. +func (c *restClient) DeleteDataset(ctx context.Context, req *datalabelingpb.DeleteDatasetRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ImportData imports data into dataset based on source locations defined in request. +// It can be called multiple times for the same dataset. Each dataset can +// only have one long running operation running on it. For example, no +// labeling task (also long running operation) can be started while +// importing is still ongoing. Vice versa. +func (c *restClient) ImportData(ctx context.Context, req *datalabelingpb.ImportDataRequest, opts ...gax.CallOption) (*ImportDataOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:importData", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta1/%s", resp.GetName()) + return &ImportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ExportData exports data and annotations from dataset. +func (c *restClient) ExportData(ctx context.Context, req *datalabelingpb.ExportDataRequest, opts ...gax.CallOption) (*ExportDataOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:exportData", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta1/%s", resp.GetName()) + return &ExportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetDataItem gets a data item in a dataset by resource name. This API can be +// called after data are imported into dataset. +func (c *restClient) GetDataItem(ctx context.Context, req *datalabelingpb.GetDataItemRequest, opts ...gax.CallOption) (*datalabelingpb.DataItem, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetDataItem[0:len((*c.CallOptions).GetDataItem):len((*c.CallOptions).GetDataItem)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.DataItem{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListDataItems lists data items in a dataset. This API can be called after data +// are imported into dataset. Pagination is supported. +func (c *restClient) ListDataItems(ctx context.Context, req *datalabelingpb.ListDataItemsRequest, opts ...gax.CallOption) *DataItemIterator { + it := &DataItemIterator{} + req = proto.Clone(req).(*datalabelingpb.ListDataItemsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.DataItem, string, error) { + resp := &datalabelingpb.ListDataItemsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/dataItems", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDataItems(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetAnnotatedDataset gets an annotated dataset by resource name. +func (c *restClient) GetAnnotatedDataset(ctx context.Context, req *datalabelingpb.GetAnnotatedDatasetRequest, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAnnotatedDataset[0:len((*c.CallOptions).GetAnnotatedDataset):len((*c.CallOptions).GetAnnotatedDataset)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.AnnotatedDataset{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAnnotatedDatasets lists annotated datasets for a dataset. Pagination is supported. +func (c *restClient) ListAnnotatedDatasets(ctx context.Context, req *datalabelingpb.ListAnnotatedDatasetsRequest, opts ...gax.CallOption) *AnnotatedDatasetIterator { + it := &AnnotatedDatasetIterator{} + req = proto.Clone(req).(*datalabelingpb.ListAnnotatedDatasetsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.AnnotatedDataset, string, error) { + resp := &datalabelingpb.ListAnnotatedDatasetsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/annotatedDatasets", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAnnotatedDatasets(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteAnnotatedDataset deletes an annotated dataset by resource name. +func (c *restClient) DeleteAnnotatedDataset(ctx context.Context, req *datalabelingpb.DeleteAnnotatedDatasetRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// LabelImage starts a labeling task for image. The type of image labeling task is +// configured by feature in the request. +func (c *restClient) LabelImage(ctx context.Context, req *datalabelingpb.LabelImageRequest, opts ...gax.CallOption) (*LabelImageOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/image:label", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta1/%s", resp.GetName()) + return &LabelImageOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// LabelVideo starts a labeling task for video. The type of video labeling task is +// configured by feature in the request. +func (c *restClient) LabelVideo(ctx context.Context, req *datalabelingpb.LabelVideoRequest, opts ...gax.CallOption) (*LabelVideoOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/video:label", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta1/%s", resp.GetName()) + return &LabelVideoOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// LabelText starts a labeling task for text. The type of text labeling task is +// configured by feature in the request. +func (c *restClient) LabelText(ctx context.Context, req *datalabelingpb.LabelTextRequest, opts ...gax.CallOption) (*LabelTextOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/text:label", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta1/%s", resp.GetName()) + return &LabelTextOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetExample gets an example by resource name, including both data and annotation. +func (c *restClient) GetExample(ctx context.Context, req *datalabelingpb.GetExampleRequest, opts ...gax.CallOption) (*datalabelingpb.Example, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetExample[0:len((*c.CallOptions).GetExample):len((*c.CallOptions).GetExample)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.Example{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListExamples lists examples in an annotated dataset. Pagination is supported. +func (c *restClient) ListExamples(ctx context.Context, req *datalabelingpb.ListExamplesRequest, opts ...gax.CallOption) *ExampleIterator { + it := &ExampleIterator{} + req = proto.Clone(req).(*datalabelingpb.ListExamplesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.Example, string, error) { + resp := &datalabelingpb.ListExamplesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/examples", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetExamples(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateAnnotationSpecSet creates an annotation spec set by providing a set of labels. +func (c *restClient) CreateAnnotationSpecSet(ctx context.Context, req *datalabelingpb.CreateAnnotationSpecSetRequest, opts ...gax.CallOption) (*datalabelingpb.AnnotationSpecSet, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/annotationSpecSets", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateAnnotationSpecSet[0:len((*c.CallOptions).CreateAnnotationSpecSet):len((*c.CallOptions).CreateAnnotationSpecSet)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.AnnotationSpecSet{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetAnnotationSpecSet gets an annotation spec set by resource name. +func (c *restClient) GetAnnotationSpecSet(ctx context.Context, req *datalabelingpb.GetAnnotationSpecSetRequest, opts ...gax.CallOption) (*datalabelingpb.AnnotationSpecSet, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAnnotationSpecSet[0:len((*c.CallOptions).GetAnnotationSpecSet):len((*c.CallOptions).GetAnnotationSpecSet)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.AnnotationSpecSet{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAnnotationSpecSets lists annotation spec sets for a project. Pagination is supported. +func (c *restClient) ListAnnotationSpecSets(ctx context.Context, req *datalabelingpb.ListAnnotationSpecSetsRequest, opts ...gax.CallOption) *AnnotationSpecSetIterator { + it := &AnnotationSpecSetIterator{} + req = proto.Clone(req).(*datalabelingpb.ListAnnotationSpecSetsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.AnnotationSpecSet, string, error) { + resp := &datalabelingpb.ListAnnotationSpecSetsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/annotationSpecSets", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAnnotationSpecSets(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteAnnotationSpecSet deletes an annotation spec set by resource name. +func (c *restClient) DeleteAnnotationSpecSet(ctx context.Context, req *datalabelingpb.DeleteAnnotationSpecSetRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// CreateInstruction creates an instruction for how data should be labeled. +func (c *restClient) CreateInstruction(ctx context.Context, req *datalabelingpb.CreateInstructionRequest, opts ...gax.CallOption) (*CreateInstructionOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/instructions", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta1/%s", resp.GetName()) + return &CreateInstructionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetInstruction gets an instruction by resource name. +func (c *restClient) GetInstruction(ctx context.Context, req *datalabelingpb.GetInstructionRequest, opts ...gax.CallOption) (*datalabelingpb.Instruction, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetInstruction[0:len((*c.CallOptions).GetInstruction):len((*c.CallOptions).GetInstruction)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.Instruction{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListInstructions lists instructions for a project. Pagination is supported. +func (c *restClient) ListInstructions(ctx context.Context, req *datalabelingpb.ListInstructionsRequest, opts ...gax.CallOption) *InstructionIterator { + it := &InstructionIterator{} + req = proto.Clone(req).(*datalabelingpb.ListInstructionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.Instruction, string, error) { + resp := &datalabelingpb.ListInstructionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/instructions", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetInstructions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DeleteInstruction deletes an instruction object by resource name. +func (c *restClient) DeleteInstruction(ctx context.Context, req *datalabelingpb.DeleteInstructionRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetEvaluation gets an evaluation by resource name (to search, use +// projects.evaluations.search). +func (c *restClient) GetEvaluation(ctx context.Context, req *datalabelingpb.GetEvaluationRequest, opts ...gax.CallOption) (*datalabelingpb.Evaluation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEvaluation[0:len((*c.CallOptions).GetEvaluation):len((*c.CallOptions).GetEvaluation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.Evaluation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SearchEvaluations searches evaluations within a project. +func (c *restClient) SearchEvaluations(ctx context.Context, req *datalabelingpb.SearchEvaluationsRequest, opts ...gax.CallOption) *EvaluationIterator { + it := &EvaluationIterator{} + req = proto.Clone(req).(*datalabelingpb.SearchEvaluationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.Evaluation, string, error) { + resp := &datalabelingpb.SearchEvaluationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/evaluations:search", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEvaluations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// SearchExampleComparisons searches example comparisons from an evaluation. The return format is a +// list of example comparisons that show ground truth and prediction(s) for +// a single input. Search by providing an evaluation ID. +func (c *restClient) SearchExampleComparisons(ctx context.Context, req *datalabelingpb.SearchExampleComparisonsRequest, opts ...gax.CallOption) *SearchExampleComparisonsResponse_ExampleComparisonIterator { + it := &SearchExampleComparisonsResponse_ExampleComparisonIterator{} + req = proto.Clone(req).(*datalabelingpb.SearchExampleComparisonsRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.SearchExampleComparisonsResponse_ExampleComparison, string, error) { + resp := &datalabelingpb.SearchExampleComparisonsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/exampleComparisons:search", req.GetParent()) + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetExampleComparisons(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateEvaluationJob creates an evaluation job. +func (c *restClient) CreateEvaluationJob(ctx context.Context, req *datalabelingpb.CreateEvaluationJobRequest, opts ...gax.CallOption) (*datalabelingpb.EvaluationJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/evaluationJobs", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateEvaluationJob[0:len((*c.CallOptions).CreateEvaluationJob):len((*c.CallOptions).CreateEvaluationJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.EvaluationJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateEvaluationJob updates an evaluation job. You can only update certain fields of the job’s +// EvaluationJobConfig: humanAnnotationConfig.instruction, +// exampleCount, and exampleSamplePercentage. +// +// If you want to change any other aspect of the evaluation job, you must +// delete the job and create a new one. +func (c *restClient) UpdateEvaluationJob(ctx context.Context, req *datalabelingpb.UpdateEvaluationJobRequest, opts ...gax.CallOption) (*datalabelingpb.EvaluationJob, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEvaluationJob() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetEvaluationJob().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "evaluation_job.name", url.QueryEscape(req.GetEvaluationJob().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEvaluationJob[0:len((*c.CallOptions).UpdateEvaluationJob):len((*c.CallOptions).UpdateEvaluationJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.EvaluationJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetEvaluationJob gets an evaluation job by resource name. +func (c *restClient) GetEvaluationJob(ctx context.Context, req *datalabelingpb.GetEvaluationJobRequest, opts ...gax.CallOption) (*datalabelingpb.EvaluationJob, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEvaluationJob[0:len((*c.CallOptions).GetEvaluationJob):len((*c.CallOptions).GetEvaluationJob)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &datalabelingpb.EvaluationJob{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// PauseEvaluationJob pauses an evaluation job. Pausing an evaluation job that is already in a +// PAUSED state is a no-op. +func (c *restClient) PauseEvaluationJob(ctx context.Context, req *datalabelingpb.PauseEvaluationJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:pause", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ResumeEvaluationJob resumes a paused evaluation job. A deleted evaluation job can’t be resumed. +// Resuming a running or scheduled evaluation job is a no-op. +func (c *restClient) ResumeEvaluationJob(ctx context.Context, req *datalabelingpb.ResumeEvaluationJobRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:resume", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteEvaluationJob stops and deletes an evaluation job. +func (c *restClient) DeleteEvaluationJob(ctx context.Context, req *datalabelingpb.DeleteEvaluationJobRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// ListEvaluationJobs lists all evaluation jobs within a project with possible filters. +// Pagination is supported. +func (c *restClient) ListEvaluationJobs(ctx context.Context, req *datalabelingpb.ListEvaluationJobsRequest, opts ...gax.CallOption) *EvaluationJobIterator { + it := &EvaluationJobIterator{} + req = proto.Clone(req).(*datalabelingpb.ListEvaluationJobsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*datalabelingpb.EvaluationJob, string, error) { + resp := &datalabelingpb.ListEvaluationJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/evaluationJobs", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEvaluationJobs(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateInstructionOperation manages a long-running operation from CreateInstruction. +type CreateInstructionOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateInstructionOperation returns a new CreateInstructionOperation from a given name. +// The name must be that of a previously created CreateInstructionOperation, possibly from a different process. +func (c *gRPCClient) CreateInstructionOperation(name string) *CreateInstructionOperation { + return &CreateInstructionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateInstructionOperation returns a new CreateInstructionOperation from a given name. +// The name must be that of a previously created CreateInstructionOperation, possibly from a different process. +func (c *restClient) CreateInstructionOperation(name string) *CreateInstructionOperation { + override := fmt.Sprintf("/v1beta1/%s", name) + return &CreateInstructionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateInstructionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.Instruction, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp datalabelingpb.Instruction + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateInstructionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.Instruction, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp datalabelingpb.Instruction + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. // Metadata itself does not contact the server, but Poll does. // To get the latest metadata, call this method after a successful call to Poll. // If the metadata is not available, the returned metadata and error are both nil. @@ -1773,7 +4263,8 @@ func (op *CreateInstructionOperation) Name() string { // ExportDataOperation manages a long-running operation from ExportData. type ExportDataOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ExportDataOperation returns a new ExportDataOperation from a given name. @@ -1784,10 +4275,21 @@ func (c *gRPCClient) ExportDataOperation(name string) *ExportDataOperation { } } +// ExportDataOperation returns a new ExportDataOperation from a given name. +// The name must be that of a previously created ExportDataOperation, possibly from a different process. +func (c *restClient) ExportDataOperation(name string) *ExportDataOperation { + override := fmt.Sprintf("/v1beta1/%s", name) + return &ExportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.ExportDataOperationResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.ExportDataOperationResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1805,6 +4307,7 @@ func (op *ExportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ExportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.ExportDataOperationResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.ExportDataOperationResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1842,7 +4345,8 @@ func (op *ExportDataOperation) Name() string { // ImportDataOperation manages a long-running operation from ImportData. type ImportDataOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // ImportDataOperation returns a new ImportDataOperation from a given name. @@ -1853,10 +4357,21 @@ func (c *gRPCClient) ImportDataOperation(name string) *ImportDataOperation { } } +// ImportDataOperation returns a new ImportDataOperation from a given name. +// The name must be that of a previously created ImportDataOperation, possibly from a different process. +func (c *restClient) ImportDataOperation(name string) *ImportDataOperation { + override := fmt.Sprintf("/v1beta1/%s", name) + return &ImportDataOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.ImportDataOperationResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.ImportDataOperationResponse if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1874,6 +4389,7 @@ func (op *ImportDataOperation) Wait(ctx context.Context, opts ...gax.CallOption) // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *ImportDataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.ImportDataOperationResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.ImportDataOperationResponse if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1911,7 +4427,8 @@ func (op *ImportDataOperation) Name() string { // LabelImageOperation manages a long-running operation from LabelImage. type LabelImageOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // LabelImageOperation returns a new LabelImageOperation from a given name. @@ -1922,10 +4439,21 @@ func (c *gRPCClient) LabelImageOperation(name string) *LabelImageOperation { } } +// LabelImageOperation returns a new LabelImageOperation from a given name. +// The name must be that of a previously created LabelImageOperation, possibly from a different process. +func (c *restClient) LabelImageOperation(name string) *LabelImageOperation { + override := fmt.Sprintf("/v1beta1/%s", name) + return &LabelImageOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *LabelImageOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.AnnotatedDataset if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -1943,6 +4471,7 @@ func (op *LabelImageOperation) Wait(ctx context.Context, opts ...gax.CallOption) // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *LabelImageOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.AnnotatedDataset if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -1980,7 +4509,8 @@ func (op *LabelImageOperation) Name() string { // LabelTextOperation manages a long-running operation from LabelText. type LabelTextOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // LabelTextOperation returns a new LabelTextOperation from a given name. @@ -1991,10 +4521,21 @@ func (c *gRPCClient) LabelTextOperation(name string) *LabelTextOperation { } } +// LabelTextOperation returns a new LabelTextOperation from a given name. +// The name must be that of a previously created LabelTextOperation, possibly from a different process. +func (c *restClient) LabelTextOperation(name string) *LabelTextOperation { + override := fmt.Sprintf("/v1beta1/%s", name) + return &LabelTextOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *LabelTextOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.AnnotatedDataset if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -2012,6 +4553,7 @@ func (op *LabelTextOperation) Wait(ctx context.Context, opts ...gax.CallOption) // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *LabelTextOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.AnnotatedDataset if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err @@ -2049,7 +4591,8 @@ func (op *LabelTextOperation) Name() string { // LabelVideoOperation manages a long-running operation from LabelVideo. type LabelVideoOperation struct { - lro *longrunning.Operation + lro *longrunning.Operation + pollPath string } // LabelVideoOperation returns a new LabelVideoOperation from a given name. @@ -2060,10 +4603,21 @@ func (c *gRPCClient) LabelVideoOperation(name string) *LabelVideoOperation { } } +// LabelVideoOperation returns a new LabelVideoOperation from a given name. +// The name must be that of a previously created LabelVideoOperation, possibly from a different process. +func (c *restClient) LabelVideoOperation(name string) *LabelVideoOperation { + override := fmt.Sprintf("/v1beta1/%s", name) + return &LabelVideoOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + // Wait blocks until the long-running operation is completed, returning the response and any errors encountered. // // See documentation of Poll for error-handling information. func (op *LabelVideoOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.AnnotatedDataset if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { return nil, err @@ -2081,6 +4635,7 @@ func (op *LabelVideoOperation) Wait(ctx context.Context, opts ...gax.CallOption) // op.Done will return true, and the response of the operation is returned. // If Poll succeeds and the operation has not completed, the returned response and error are both nil. func (op *LabelVideoOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*datalabelingpb.AnnotatedDataset, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) var resp datalabelingpb.AnnotatedDataset if err := op.lro.Poll(ctx, &resp, opts...); err != nil { return nil, err diff --git a/datalabeling/apiv1beta1/data_labeling_client_example_test.go b/datalabeling/apiv1beta1/data_labeling_client_example_test.go index c6eebe55282b..9a9deea52efa 100644 --- a/datalabeling/apiv1beta1/data_labeling_client_example_test.go +++ b/datalabeling/apiv1beta1/data_labeling_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -36,8 +41,30 @@ func ExampleNewClient() { _ = c } +func ExampleNewRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datalabeling.NewRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + func ExampleClient_CreateDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +85,11 @@ func ExampleClient_CreateDataset() { func ExampleClient_GetDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +110,11 @@ func ExampleClient_GetDataset() { func ExampleClient_ListDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +141,11 @@ func ExampleClient_ListDatasets() { func ExampleClient_DeleteDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +164,11 @@ func ExampleClient_DeleteDataset() { func ExampleClient_ImportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -147,6 +194,11 @@ func ExampleClient_ImportData() { func ExampleClient_ExportData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -172,6 +224,11 @@ func ExampleClient_ExportData() { func ExampleClient_GetDataItem() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -192,6 +249,11 @@ func ExampleClient_GetDataItem() { func ExampleClient_ListDataItems() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -218,6 +280,11 @@ func ExampleClient_ListDataItems() { func ExampleClient_GetAnnotatedDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -238,6 +305,11 @@ func ExampleClient_GetAnnotatedDataset() { func ExampleClient_ListAnnotatedDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -264,6 +336,11 @@ func ExampleClient_ListAnnotatedDatasets() { func ExampleClient_DeleteAnnotatedDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -282,6 +359,11 @@ func ExampleClient_DeleteAnnotatedDataset() { func ExampleClient_LabelImage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -307,6 +389,11 @@ func ExampleClient_LabelImage() { func ExampleClient_LabelVideo() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -332,6 +419,11 @@ func ExampleClient_LabelVideo() { func ExampleClient_LabelText() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -357,6 +449,11 @@ func ExampleClient_LabelText() { func ExampleClient_GetExample() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -377,6 +474,11 @@ func ExampleClient_GetExample() { func ExampleClient_ListExamples() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -403,6 +505,11 @@ func ExampleClient_ListExamples() { func ExampleClient_CreateAnnotationSpecSet() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -423,6 +530,11 @@ func ExampleClient_CreateAnnotationSpecSet() { func ExampleClient_GetAnnotationSpecSet() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -443,6 +555,11 @@ func ExampleClient_GetAnnotationSpecSet() { func ExampleClient_ListAnnotationSpecSets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -469,6 +586,11 @@ func ExampleClient_ListAnnotationSpecSets() { func ExampleClient_DeleteAnnotationSpecSet() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -487,6 +609,11 @@ func ExampleClient_DeleteAnnotationSpecSet() { func ExampleClient_CreateInstruction() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -512,6 +639,11 @@ func ExampleClient_CreateInstruction() { func ExampleClient_GetInstruction() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -532,6 +664,11 @@ func ExampleClient_GetInstruction() { func ExampleClient_ListInstructions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -558,6 +695,11 @@ func ExampleClient_ListInstructions() { func ExampleClient_DeleteInstruction() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -576,6 +718,11 @@ func ExampleClient_DeleteInstruction() { func ExampleClient_GetEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -596,6 +743,11 @@ func ExampleClient_GetEvaluation() { func ExampleClient_SearchEvaluations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -622,6 +774,11 @@ func ExampleClient_SearchEvaluations() { func ExampleClient_SearchExampleComparisons() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -648,6 +805,11 @@ func ExampleClient_SearchExampleComparisons() { func ExampleClient_CreateEvaluationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -668,6 +830,11 @@ func ExampleClient_CreateEvaluationJob() { func ExampleClient_UpdateEvaluationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -688,6 +855,11 @@ func ExampleClient_UpdateEvaluationJob() { func ExampleClient_GetEvaluationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -708,6 +880,11 @@ func ExampleClient_GetEvaluationJob() { func ExampleClient_PauseEvaluationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -726,6 +903,11 @@ func ExampleClient_PauseEvaluationJob() { func ExampleClient_ResumeEvaluationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -744,6 +926,11 @@ func ExampleClient_ResumeEvaluationJob() { func ExampleClient_DeleteEvaluationJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -762,6 +949,11 @@ func ExampleClient_DeleteEvaluationJob() { func ExampleClient_ListEvaluationJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datalabeling.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go b/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go new file mode 100644 index 000000000000..b615d511f3a1 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/annotation.pb.go @@ -0,0 +1,2576 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Specifies where the annotation comes from (whether it was provided by a +// human labeler or a different source). +type AnnotationSource int32 + +const ( + AnnotationSource_ANNOTATION_SOURCE_UNSPECIFIED AnnotationSource = 0 + // Answer is provided by a human contributor. + AnnotationSource_OPERATOR AnnotationSource = 3 +) + +// Enum value maps for AnnotationSource. +var ( + AnnotationSource_name = map[int32]string{ + 0: "ANNOTATION_SOURCE_UNSPECIFIED", + 3: "OPERATOR", + } + AnnotationSource_value = map[string]int32{ + "ANNOTATION_SOURCE_UNSPECIFIED": 0, + "OPERATOR": 3, + } +) + +func (x AnnotationSource) Enum() *AnnotationSource { + p := new(AnnotationSource) + *p = x + return p +} + +func (x AnnotationSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AnnotationSource) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes[0].Descriptor() +} + +func (AnnotationSource) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes[0] +} + +func (x AnnotationSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AnnotationSource.Descriptor instead. +func (AnnotationSource) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{0} +} + +type AnnotationSentiment int32 + +const ( + AnnotationSentiment_ANNOTATION_SENTIMENT_UNSPECIFIED AnnotationSentiment = 0 + // This annotation describes negatively about the data. + AnnotationSentiment_NEGATIVE AnnotationSentiment = 1 + // This label describes positively about the data. + AnnotationSentiment_POSITIVE AnnotationSentiment = 2 +) + +// Enum value maps for AnnotationSentiment. +var ( + AnnotationSentiment_name = map[int32]string{ + 0: "ANNOTATION_SENTIMENT_UNSPECIFIED", + 1: "NEGATIVE", + 2: "POSITIVE", + } + AnnotationSentiment_value = map[string]int32{ + "ANNOTATION_SENTIMENT_UNSPECIFIED": 0, + "NEGATIVE": 1, + "POSITIVE": 2, + } +) + +func (x AnnotationSentiment) Enum() *AnnotationSentiment { + p := new(AnnotationSentiment) + *p = x + return p +} + +func (x AnnotationSentiment) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AnnotationSentiment) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes[1].Descriptor() +} + +func (AnnotationSentiment) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes[1] +} + +func (x AnnotationSentiment) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AnnotationSentiment.Descriptor instead. +func (AnnotationSentiment) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{1} +} + +type AnnotationType int32 + +const ( + AnnotationType_ANNOTATION_TYPE_UNSPECIFIED AnnotationType = 0 + // Classification annotations in an image. Allowed for continuous evaluation. + AnnotationType_IMAGE_CLASSIFICATION_ANNOTATION AnnotationType = 1 + // Bounding box annotations in an image. A form of image object detection. + // Allowed for continuous evaluation. + AnnotationType_IMAGE_BOUNDING_BOX_ANNOTATION AnnotationType = 2 + // Oriented bounding box. The box does not have to be parallel to horizontal + // line. + AnnotationType_IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION AnnotationType = 13 + // Bounding poly annotations in an image. + AnnotationType_IMAGE_BOUNDING_POLY_ANNOTATION AnnotationType = 10 + // Polyline annotations in an image. + AnnotationType_IMAGE_POLYLINE_ANNOTATION AnnotationType = 11 + // Segmentation annotations in an image. + AnnotationType_IMAGE_SEGMENTATION_ANNOTATION AnnotationType = 12 + // Classification annotations in video shots. + AnnotationType_VIDEO_SHOTS_CLASSIFICATION_ANNOTATION AnnotationType = 3 + // Video object tracking annotation. + AnnotationType_VIDEO_OBJECT_TRACKING_ANNOTATION AnnotationType = 4 + // Video object detection annotation. + AnnotationType_VIDEO_OBJECT_DETECTION_ANNOTATION AnnotationType = 5 + // Video event annotation. + AnnotationType_VIDEO_EVENT_ANNOTATION AnnotationType = 6 + // Classification for text. Allowed for continuous evaluation. + AnnotationType_TEXT_CLASSIFICATION_ANNOTATION AnnotationType = 8 + // Entity extraction for text. + AnnotationType_TEXT_ENTITY_EXTRACTION_ANNOTATION AnnotationType = 9 + // General classification. Allowed for continuous evaluation. + AnnotationType_GENERAL_CLASSIFICATION_ANNOTATION AnnotationType = 14 +) + +// Enum value maps for AnnotationType. +var ( + AnnotationType_name = map[int32]string{ + 0: "ANNOTATION_TYPE_UNSPECIFIED", + 1: "IMAGE_CLASSIFICATION_ANNOTATION", + 2: "IMAGE_BOUNDING_BOX_ANNOTATION", + 13: "IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION", + 10: "IMAGE_BOUNDING_POLY_ANNOTATION", + 11: "IMAGE_POLYLINE_ANNOTATION", + 12: "IMAGE_SEGMENTATION_ANNOTATION", + 3: "VIDEO_SHOTS_CLASSIFICATION_ANNOTATION", + 4: "VIDEO_OBJECT_TRACKING_ANNOTATION", + 5: "VIDEO_OBJECT_DETECTION_ANNOTATION", + 6: "VIDEO_EVENT_ANNOTATION", + 8: "TEXT_CLASSIFICATION_ANNOTATION", + 9: "TEXT_ENTITY_EXTRACTION_ANNOTATION", + 14: "GENERAL_CLASSIFICATION_ANNOTATION", + } + AnnotationType_value = map[string]int32{ + "ANNOTATION_TYPE_UNSPECIFIED": 0, + "IMAGE_CLASSIFICATION_ANNOTATION": 1, + "IMAGE_BOUNDING_BOX_ANNOTATION": 2, + "IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION": 13, + "IMAGE_BOUNDING_POLY_ANNOTATION": 10, + "IMAGE_POLYLINE_ANNOTATION": 11, + "IMAGE_SEGMENTATION_ANNOTATION": 12, + "VIDEO_SHOTS_CLASSIFICATION_ANNOTATION": 3, + "VIDEO_OBJECT_TRACKING_ANNOTATION": 4, + "VIDEO_OBJECT_DETECTION_ANNOTATION": 5, + "VIDEO_EVENT_ANNOTATION": 6, + "TEXT_CLASSIFICATION_ANNOTATION": 8, + "TEXT_ENTITY_EXTRACTION_ANNOTATION": 9, + "GENERAL_CLASSIFICATION_ANNOTATION": 14, + } +) + +func (x AnnotationType) Enum() *AnnotationType { + p := new(AnnotationType) + *p = x + return p +} + +func (x AnnotationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AnnotationType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes[2].Descriptor() +} + +func (AnnotationType) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes[2] +} + +func (x AnnotationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AnnotationType.Descriptor instead. +func (AnnotationType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{2} +} + +// Annotation for Example. Each example may have one or more annotations. For +// example in image classification problem, each image might have one or more +// labels. We call labels binded with this image an Annotation. +type Annotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Unique name of this annotation, format is: + // + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The source of the annotation. + AnnotationSource AnnotationSource `protobuf:"varint,2,opt,name=annotation_source,json=annotationSource,proto3,enum=google.cloud.datalabeling.v1beta1.AnnotationSource" json:"annotation_source,omitempty"` + // Output only. This is the actual annotation value, e.g classification, + // bounding box values are stored here. + AnnotationValue *AnnotationValue `protobuf:"bytes,3,opt,name=annotation_value,json=annotationValue,proto3" json:"annotation_value,omitempty"` + // Output only. Annotation metadata, including information like votes + // for labels. + AnnotationMetadata *AnnotationMetadata `protobuf:"bytes,4,opt,name=annotation_metadata,json=annotationMetadata,proto3" json:"annotation_metadata,omitempty"` + // Output only. Sentiment for this annotation. + AnnotationSentiment AnnotationSentiment `protobuf:"varint,6,opt,name=annotation_sentiment,json=annotationSentiment,proto3,enum=google.cloud.datalabeling.v1beta1.AnnotationSentiment" json:"annotation_sentiment,omitempty"` +} + +func (x *Annotation) Reset() { + *x = Annotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Annotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Annotation) ProtoMessage() {} + +func (x *Annotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Annotation.ProtoReflect.Descriptor instead. +func (*Annotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{0} +} + +func (x *Annotation) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Annotation) GetAnnotationSource() AnnotationSource { + if x != nil { + return x.AnnotationSource + } + return AnnotationSource_ANNOTATION_SOURCE_UNSPECIFIED +} + +func (x *Annotation) GetAnnotationValue() *AnnotationValue { + if x != nil { + return x.AnnotationValue + } + return nil +} + +func (x *Annotation) GetAnnotationMetadata() *AnnotationMetadata { + if x != nil { + return x.AnnotationMetadata + } + return nil +} + +func (x *Annotation) GetAnnotationSentiment() AnnotationSentiment { + if x != nil { + return x.AnnotationSentiment + } + return AnnotationSentiment_ANNOTATION_SENTIMENT_UNSPECIFIED +} + +// Annotation value for an example. +type AnnotationValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ValueType: + // + // *AnnotationValue_ImageClassificationAnnotation + // *AnnotationValue_ImageBoundingPolyAnnotation + // *AnnotationValue_ImagePolylineAnnotation + // *AnnotationValue_ImageSegmentationAnnotation + // *AnnotationValue_TextClassificationAnnotation + // *AnnotationValue_TextEntityExtractionAnnotation + // *AnnotationValue_VideoClassificationAnnotation + // *AnnotationValue_VideoObjectTrackingAnnotation + // *AnnotationValue_VideoEventAnnotation + ValueType isAnnotationValue_ValueType `protobuf_oneof:"value_type"` +} + +func (x *AnnotationValue) Reset() { + *x = AnnotationValue{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotationValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotationValue) ProtoMessage() {} + +func (x *AnnotationValue) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotationValue.ProtoReflect.Descriptor instead. +func (*AnnotationValue) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{1} +} + +func (m *AnnotationValue) GetValueType() isAnnotationValue_ValueType { + if m != nil { + return m.ValueType + } + return nil +} + +func (x *AnnotationValue) GetImageClassificationAnnotation() *ImageClassificationAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_ImageClassificationAnnotation); ok { + return x.ImageClassificationAnnotation + } + return nil +} + +func (x *AnnotationValue) GetImageBoundingPolyAnnotation() *ImageBoundingPolyAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_ImageBoundingPolyAnnotation); ok { + return x.ImageBoundingPolyAnnotation + } + return nil +} + +func (x *AnnotationValue) GetImagePolylineAnnotation() *ImagePolylineAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_ImagePolylineAnnotation); ok { + return x.ImagePolylineAnnotation + } + return nil +} + +func (x *AnnotationValue) GetImageSegmentationAnnotation() *ImageSegmentationAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_ImageSegmentationAnnotation); ok { + return x.ImageSegmentationAnnotation + } + return nil +} + +func (x *AnnotationValue) GetTextClassificationAnnotation() *TextClassificationAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_TextClassificationAnnotation); ok { + return x.TextClassificationAnnotation + } + return nil +} + +func (x *AnnotationValue) GetTextEntityExtractionAnnotation() *TextEntityExtractionAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_TextEntityExtractionAnnotation); ok { + return x.TextEntityExtractionAnnotation + } + return nil +} + +func (x *AnnotationValue) GetVideoClassificationAnnotation() *VideoClassificationAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_VideoClassificationAnnotation); ok { + return x.VideoClassificationAnnotation + } + return nil +} + +func (x *AnnotationValue) GetVideoObjectTrackingAnnotation() *VideoObjectTrackingAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_VideoObjectTrackingAnnotation); ok { + return x.VideoObjectTrackingAnnotation + } + return nil +} + +func (x *AnnotationValue) GetVideoEventAnnotation() *VideoEventAnnotation { + if x, ok := x.GetValueType().(*AnnotationValue_VideoEventAnnotation); ok { + return x.VideoEventAnnotation + } + return nil +} + +type isAnnotationValue_ValueType interface { + isAnnotationValue_ValueType() +} + +type AnnotationValue_ImageClassificationAnnotation struct { + // Annotation value for image classification case. + ImageClassificationAnnotation *ImageClassificationAnnotation `protobuf:"bytes,1,opt,name=image_classification_annotation,json=imageClassificationAnnotation,proto3,oneof"` +} + +type AnnotationValue_ImageBoundingPolyAnnotation struct { + // Annotation value for image bounding box, oriented bounding box + // and polygon cases. + ImageBoundingPolyAnnotation *ImageBoundingPolyAnnotation `protobuf:"bytes,2,opt,name=image_bounding_poly_annotation,json=imageBoundingPolyAnnotation,proto3,oneof"` +} + +type AnnotationValue_ImagePolylineAnnotation struct { + // Annotation value for image polyline cases. + // Polyline here is different from BoundingPoly. It is formed by + // line segments connected to each other but not closed form(Bounding Poly). + // The line segments can cross each other. + ImagePolylineAnnotation *ImagePolylineAnnotation `protobuf:"bytes,8,opt,name=image_polyline_annotation,json=imagePolylineAnnotation,proto3,oneof"` +} + +type AnnotationValue_ImageSegmentationAnnotation struct { + // Annotation value for image segmentation. + ImageSegmentationAnnotation *ImageSegmentationAnnotation `protobuf:"bytes,9,opt,name=image_segmentation_annotation,json=imageSegmentationAnnotation,proto3,oneof"` +} + +type AnnotationValue_TextClassificationAnnotation struct { + // Annotation value for text classification case. + TextClassificationAnnotation *TextClassificationAnnotation `protobuf:"bytes,3,opt,name=text_classification_annotation,json=textClassificationAnnotation,proto3,oneof"` +} + +type AnnotationValue_TextEntityExtractionAnnotation struct { + // Annotation value for text entity extraction case. + TextEntityExtractionAnnotation *TextEntityExtractionAnnotation `protobuf:"bytes,10,opt,name=text_entity_extraction_annotation,json=textEntityExtractionAnnotation,proto3,oneof"` +} + +type AnnotationValue_VideoClassificationAnnotation struct { + // Annotation value for video classification case. + VideoClassificationAnnotation *VideoClassificationAnnotation `protobuf:"bytes,4,opt,name=video_classification_annotation,json=videoClassificationAnnotation,proto3,oneof"` +} + +type AnnotationValue_VideoObjectTrackingAnnotation struct { + // Annotation value for video object detection and tracking case. + VideoObjectTrackingAnnotation *VideoObjectTrackingAnnotation `protobuf:"bytes,5,opt,name=video_object_tracking_annotation,json=videoObjectTrackingAnnotation,proto3,oneof"` +} + +type AnnotationValue_VideoEventAnnotation struct { + // Annotation value for video event case. + VideoEventAnnotation *VideoEventAnnotation `protobuf:"bytes,6,opt,name=video_event_annotation,json=videoEventAnnotation,proto3,oneof"` +} + +func (*AnnotationValue_ImageClassificationAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_ImageBoundingPolyAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_ImagePolylineAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_ImageSegmentationAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_TextClassificationAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_TextEntityExtractionAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_VideoClassificationAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_VideoObjectTrackingAnnotation) isAnnotationValue_ValueType() {} + +func (*AnnotationValue_VideoEventAnnotation) isAnnotationValue_ValueType() {} + +// Image classification annotation definition. +type ImageClassificationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Label of image. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` +} + +func (x *ImageClassificationAnnotation) Reset() { + *x = ImageClassificationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageClassificationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageClassificationAnnotation) ProtoMessage() {} + +func (x *ImageClassificationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageClassificationAnnotation.ProtoReflect.Descriptor instead. +func (*ImageClassificationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{2} +} + +func (x *ImageClassificationAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +type Vertex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // X coordinate. + X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + // Y coordinate. + Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` +} + +func (x *Vertex) Reset() { + *x = Vertex{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Vertex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Vertex) ProtoMessage() {} + +func (x *Vertex) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Vertex.ProtoReflect.Descriptor instead. +func (*Vertex) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{3} +} + +func (x *Vertex) GetX() int32 { + if x != nil { + return x.X + } + return 0 +} + +func (x *Vertex) GetY() int32 { + if x != nil { + return x.Y + } + return 0 +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +type NormalizedVertex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // X coordinate. + X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"` + // Y coordinate. + Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"` +} + +func (x *NormalizedVertex) Reset() { + *x = NormalizedVertex{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizedVertex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizedVertex) ProtoMessage() {} + +func (x *NormalizedVertex) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizedVertex.ProtoReflect.Descriptor instead. +func (*NormalizedVertex) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{4} +} + +func (x *NormalizedVertex) GetX() float32 { + if x != nil { + return x.X + } + return 0 +} + +func (x *NormalizedVertex) GetY() float32 { + if x != nil { + return x.Y + } + return 0 +} + +// A bounding polygon in the image. +type BoundingPoly struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The bounding polygon vertices. + Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"` +} + +func (x *BoundingPoly) Reset() { + *x = BoundingPoly{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundingPoly) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundingPoly) ProtoMessage() {} + +func (x *BoundingPoly) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundingPoly.ProtoReflect.Descriptor instead. +func (*BoundingPoly) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{5} +} + +func (x *BoundingPoly) GetVertices() []*Vertex { + if x != nil { + return x.Vertices + } + return nil +} + +// Normalized bounding polygon. +type NormalizedBoundingPoly struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The bounding polygon normalized vertices. + NormalizedVertices []*NormalizedVertex `protobuf:"bytes,1,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"` +} + +func (x *NormalizedBoundingPoly) Reset() { + *x = NormalizedBoundingPoly{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizedBoundingPoly) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizedBoundingPoly) ProtoMessage() {} + +func (x *NormalizedBoundingPoly) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizedBoundingPoly.ProtoReflect.Descriptor instead. +func (*NormalizedBoundingPoly) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{6} +} + +func (x *NormalizedBoundingPoly) GetNormalizedVertices() []*NormalizedVertex { + if x != nil { + return x.NormalizedVertices + } + return nil +} + +// Image bounding poly annotation. It represents a polygon including +// bounding box in the image. +type ImageBoundingPolyAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The region of the polygon. If it is a bounding box, it is guaranteed to be + // four points. + // + // Types that are assignable to BoundedArea: + // + // *ImageBoundingPolyAnnotation_BoundingPoly + // *ImageBoundingPolyAnnotation_NormalizedBoundingPoly + BoundedArea isImageBoundingPolyAnnotation_BoundedArea `protobuf_oneof:"bounded_area"` + // Label of object in this bounding polygon. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` +} + +func (x *ImageBoundingPolyAnnotation) Reset() { + *x = ImageBoundingPolyAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageBoundingPolyAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageBoundingPolyAnnotation) ProtoMessage() {} + +func (x *ImageBoundingPolyAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageBoundingPolyAnnotation.ProtoReflect.Descriptor instead. +func (*ImageBoundingPolyAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{7} +} + +func (m *ImageBoundingPolyAnnotation) GetBoundedArea() isImageBoundingPolyAnnotation_BoundedArea { + if m != nil { + return m.BoundedArea + } + return nil +} + +func (x *ImageBoundingPolyAnnotation) GetBoundingPoly() *BoundingPoly { + if x, ok := x.GetBoundedArea().(*ImageBoundingPolyAnnotation_BoundingPoly); ok { + return x.BoundingPoly + } + return nil +} + +func (x *ImageBoundingPolyAnnotation) GetNormalizedBoundingPoly() *NormalizedBoundingPoly { + if x, ok := x.GetBoundedArea().(*ImageBoundingPolyAnnotation_NormalizedBoundingPoly); ok { + return x.NormalizedBoundingPoly + } + return nil +} + +func (x *ImageBoundingPolyAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +type isImageBoundingPolyAnnotation_BoundedArea interface { + isImageBoundingPolyAnnotation_BoundedArea() +} + +type ImageBoundingPolyAnnotation_BoundingPoly struct { + BoundingPoly *BoundingPoly `protobuf:"bytes,2,opt,name=bounding_poly,json=boundingPoly,proto3,oneof"` +} + +type ImageBoundingPolyAnnotation_NormalizedBoundingPoly struct { + NormalizedBoundingPoly *NormalizedBoundingPoly `protobuf:"bytes,3,opt,name=normalized_bounding_poly,json=normalizedBoundingPoly,proto3,oneof"` +} + +func (*ImageBoundingPolyAnnotation_BoundingPoly) isImageBoundingPolyAnnotation_BoundedArea() {} + +func (*ImageBoundingPolyAnnotation_NormalizedBoundingPoly) isImageBoundingPolyAnnotation_BoundedArea() { +} + +// A line with multiple line segments. +type Polyline struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The polyline vertices. + Vertices []*Vertex `protobuf:"bytes,1,rep,name=vertices,proto3" json:"vertices,omitempty"` +} + +func (x *Polyline) Reset() { + *x = Polyline{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Polyline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Polyline) ProtoMessage() {} + +func (x *Polyline) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Polyline.ProtoReflect.Descriptor instead. +func (*Polyline) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{8} +} + +func (x *Polyline) GetVertices() []*Vertex { + if x != nil { + return x.Vertices + } + return nil +} + +// Normalized polyline. +type NormalizedPolyline struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The normalized polyline vertices. + NormalizedVertices []*NormalizedVertex `protobuf:"bytes,1,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"` +} + +func (x *NormalizedPolyline) Reset() { + *x = NormalizedPolyline{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizedPolyline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizedPolyline) ProtoMessage() {} + +func (x *NormalizedPolyline) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizedPolyline.ProtoReflect.Descriptor instead. +func (*NormalizedPolyline) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{9} +} + +func (x *NormalizedPolyline) GetNormalizedVertices() []*NormalizedVertex { + if x != nil { + return x.NormalizedVertices + } + return nil +} + +// A polyline for the image annotation. +type ImagePolylineAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Poly: + // + // *ImagePolylineAnnotation_Polyline + // *ImagePolylineAnnotation_NormalizedPolyline + Poly isImagePolylineAnnotation_Poly `protobuf_oneof:"poly"` + // Label of this polyline. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` +} + +func (x *ImagePolylineAnnotation) Reset() { + *x = ImagePolylineAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImagePolylineAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImagePolylineAnnotation) ProtoMessage() {} + +func (x *ImagePolylineAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImagePolylineAnnotation.ProtoReflect.Descriptor instead. +func (*ImagePolylineAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{10} +} + +func (m *ImagePolylineAnnotation) GetPoly() isImagePolylineAnnotation_Poly { + if m != nil { + return m.Poly + } + return nil +} + +func (x *ImagePolylineAnnotation) GetPolyline() *Polyline { + if x, ok := x.GetPoly().(*ImagePolylineAnnotation_Polyline); ok { + return x.Polyline + } + return nil +} + +func (x *ImagePolylineAnnotation) GetNormalizedPolyline() *NormalizedPolyline { + if x, ok := x.GetPoly().(*ImagePolylineAnnotation_NormalizedPolyline); ok { + return x.NormalizedPolyline + } + return nil +} + +func (x *ImagePolylineAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +type isImagePolylineAnnotation_Poly interface { + isImagePolylineAnnotation_Poly() +} + +type ImagePolylineAnnotation_Polyline struct { + Polyline *Polyline `protobuf:"bytes,2,opt,name=polyline,proto3,oneof"` +} + +type ImagePolylineAnnotation_NormalizedPolyline struct { + NormalizedPolyline *NormalizedPolyline `protobuf:"bytes,3,opt,name=normalized_polyline,json=normalizedPolyline,proto3,oneof"` +} + +func (*ImagePolylineAnnotation_Polyline) isImagePolylineAnnotation_Poly() {} + +func (*ImagePolylineAnnotation_NormalizedPolyline) isImagePolylineAnnotation_Poly() {} + +// Image segmentation annotation. +type ImageSegmentationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The mapping between rgb color and annotation spec. The key is the rgb + // color represented in format of rgb(0, 0, 0). The value is the + // AnnotationSpec. + AnnotationColors map[string]*AnnotationSpec `protobuf:"bytes,1,rep,name=annotation_colors,json=annotationColors,proto3" json:"annotation_colors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Image format. + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // A byte string of a full image's color map. + ImageBytes []byte `protobuf:"bytes,3,opt,name=image_bytes,json=imageBytes,proto3" json:"image_bytes,omitempty"` +} + +func (x *ImageSegmentationAnnotation) Reset() { + *x = ImageSegmentationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageSegmentationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageSegmentationAnnotation) ProtoMessage() {} + +func (x *ImageSegmentationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageSegmentationAnnotation.ProtoReflect.Descriptor instead. +func (*ImageSegmentationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{11} +} + +func (x *ImageSegmentationAnnotation) GetAnnotationColors() map[string]*AnnotationSpec { + if x != nil { + return x.AnnotationColors + } + return nil +} + +func (x *ImageSegmentationAnnotation) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *ImageSegmentationAnnotation) GetImageBytes() []byte { + if x != nil { + return x.ImageBytes + } + return nil +} + +// Text classification annotation. +type TextClassificationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Label of the text. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` +} + +func (x *TextClassificationAnnotation) Reset() { + *x = TextClassificationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextClassificationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextClassificationAnnotation) ProtoMessage() {} + +func (x *TextClassificationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextClassificationAnnotation.ProtoReflect.Descriptor instead. +func (*TextClassificationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{12} +} + +func (x *TextClassificationAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +// Text entity extraction annotation. +type TextEntityExtractionAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Label of the text entities. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` + // Position of the entity. + SequentialSegment *SequentialSegment `protobuf:"bytes,2,opt,name=sequential_segment,json=sequentialSegment,proto3" json:"sequential_segment,omitempty"` +} + +func (x *TextEntityExtractionAnnotation) Reset() { + *x = TextEntityExtractionAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextEntityExtractionAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextEntityExtractionAnnotation) ProtoMessage() {} + +func (x *TextEntityExtractionAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextEntityExtractionAnnotation.ProtoReflect.Descriptor instead. +func (*TextEntityExtractionAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{13} +} + +func (x *TextEntityExtractionAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +func (x *TextEntityExtractionAnnotation) GetSequentialSegment() *SequentialSegment { + if x != nil { + return x.SequentialSegment + } + return nil +} + +// Start and end position in a sequence (e.g. text segment). +type SequentialSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start position (inclusive). + Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // End position (exclusive). + End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *SequentialSegment) Reset() { + *x = SequentialSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SequentialSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SequentialSegment) ProtoMessage() {} + +func (x *SequentialSegment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SequentialSegment.ProtoReflect.Descriptor instead. +func (*SequentialSegment) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{14} +} + +func (x *SequentialSegment) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *SequentialSegment) GetEnd() int32 { + if x != nil { + return x.End + } + return 0 +} + +// A time period inside of an example that has a time dimension (e.g. video). +type TimeSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start of the time segment (inclusive), represented as the duration since + // the example start. + StartTimeOffset *durationpb.Duration `protobuf:"bytes,1,opt,name=start_time_offset,json=startTimeOffset,proto3" json:"start_time_offset,omitempty"` + // End of the time segment (exclusive), represented as the duration since the + // example start. + EndTimeOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=end_time_offset,json=endTimeOffset,proto3" json:"end_time_offset,omitempty"` +} + +func (x *TimeSegment) Reset() { + *x = TimeSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeSegment) ProtoMessage() {} + +func (x *TimeSegment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeSegment.ProtoReflect.Descriptor instead. +func (*TimeSegment) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{15} +} + +func (x *TimeSegment) GetStartTimeOffset() *durationpb.Duration { + if x != nil { + return x.StartTimeOffset + } + return nil +} + +func (x *TimeSegment) GetEndTimeOffset() *durationpb.Duration { + if x != nil { + return x.EndTimeOffset + } + return nil +} + +// Video classification annotation. +type VideoClassificationAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time segment of the video to which the annotation applies. + TimeSegment *TimeSegment `protobuf:"bytes,1,opt,name=time_segment,json=timeSegment,proto3" json:"time_segment,omitempty"` + // Label of the segment specified by time_segment. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,2,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` +} + +func (x *VideoClassificationAnnotation) Reset() { + *x = VideoClassificationAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoClassificationAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoClassificationAnnotation) ProtoMessage() {} + +func (x *VideoClassificationAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoClassificationAnnotation.ProtoReflect.Descriptor instead. +func (*VideoClassificationAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{16} +} + +func (x *VideoClassificationAnnotation) GetTimeSegment() *TimeSegment { + if x != nil { + return x.TimeSegment + } + return nil +} + +func (x *VideoClassificationAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +// Video frame level annotation for object detection and tracking. +type ObjectTrackingFrame struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The bounding box location of this object track for the frame. + // + // Types that are assignable to BoundedArea: + // + // *ObjectTrackingFrame_BoundingPoly + // *ObjectTrackingFrame_NormalizedBoundingPoly + BoundedArea isObjectTrackingFrame_BoundedArea `protobuf_oneof:"bounded_area"` + // The time offset of this frame relative to the beginning of the video. + TimeOffset *durationpb.Duration `protobuf:"bytes,3,opt,name=time_offset,json=timeOffset,proto3" json:"time_offset,omitempty"` +} + +func (x *ObjectTrackingFrame) Reset() { + *x = ObjectTrackingFrame{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObjectTrackingFrame) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectTrackingFrame) ProtoMessage() {} + +func (x *ObjectTrackingFrame) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObjectTrackingFrame.ProtoReflect.Descriptor instead. +func (*ObjectTrackingFrame) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{17} +} + +func (m *ObjectTrackingFrame) GetBoundedArea() isObjectTrackingFrame_BoundedArea { + if m != nil { + return m.BoundedArea + } + return nil +} + +func (x *ObjectTrackingFrame) GetBoundingPoly() *BoundingPoly { + if x, ok := x.GetBoundedArea().(*ObjectTrackingFrame_BoundingPoly); ok { + return x.BoundingPoly + } + return nil +} + +func (x *ObjectTrackingFrame) GetNormalizedBoundingPoly() *NormalizedBoundingPoly { + if x, ok := x.GetBoundedArea().(*ObjectTrackingFrame_NormalizedBoundingPoly); ok { + return x.NormalizedBoundingPoly + } + return nil +} + +func (x *ObjectTrackingFrame) GetTimeOffset() *durationpb.Duration { + if x != nil { + return x.TimeOffset + } + return nil +} + +type isObjectTrackingFrame_BoundedArea interface { + isObjectTrackingFrame_BoundedArea() +} + +type ObjectTrackingFrame_BoundingPoly struct { + BoundingPoly *BoundingPoly `protobuf:"bytes,1,opt,name=bounding_poly,json=boundingPoly,proto3,oneof"` +} + +type ObjectTrackingFrame_NormalizedBoundingPoly struct { + NormalizedBoundingPoly *NormalizedBoundingPoly `protobuf:"bytes,2,opt,name=normalized_bounding_poly,json=normalizedBoundingPoly,proto3,oneof"` +} + +func (*ObjectTrackingFrame_BoundingPoly) isObjectTrackingFrame_BoundedArea() {} + +func (*ObjectTrackingFrame_NormalizedBoundingPoly) isObjectTrackingFrame_BoundedArea() {} + +// Video object tracking annotation. +type VideoObjectTrackingAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Label of the object tracked in this annotation. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` + // The time segment of the video to which object tracking applies. + TimeSegment *TimeSegment `protobuf:"bytes,2,opt,name=time_segment,json=timeSegment,proto3" json:"time_segment,omitempty"` + // The list of frames where this object track appears. + ObjectTrackingFrames []*ObjectTrackingFrame `protobuf:"bytes,3,rep,name=object_tracking_frames,json=objectTrackingFrames,proto3" json:"object_tracking_frames,omitempty"` +} + +func (x *VideoObjectTrackingAnnotation) Reset() { + *x = VideoObjectTrackingAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoObjectTrackingAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoObjectTrackingAnnotation) ProtoMessage() {} + +func (x *VideoObjectTrackingAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoObjectTrackingAnnotation.ProtoReflect.Descriptor instead. +func (*VideoObjectTrackingAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{18} +} + +func (x *VideoObjectTrackingAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +func (x *VideoObjectTrackingAnnotation) GetTimeSegment() *TimeSegment { + if x != nil { + return x.TimeSegment + } + return nil +} + +func (x *VideoObjectTrackingAnnotation) GetObjectTrackingFrames() []*ObjectTrackingFrame { + if x != nil { + return x.ObjectTrackingFrames + } + return nil +} + +// Video event annotation. +type VideoEventAnnotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Label of the event in this annotation. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` + // The time segment of the video to which the annotation applies. + TimeSegment *TimeSegment `protobuf:"bytes,2,opt,name=time_segment,json=timeSegment,proto3" json:"time_segment,omitempty"` +} + +func (x *VideoEventAnnotation) Reset() { + *x = VideoEventAnnotation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoEventAnnotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoEventAnnotation) ProtoMessage() {} + +func (x *VideoEventAnnotation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoEventAnnotation.ProtoReflect.Descriptor instead. +func (*VideoEventAnnotation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{19} +} + +func (x *VideoEventAnnotation) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +func (x *VideoEventAnnotation) GetTimeSegment() *TimeSegment { + if x != nil { + return x.TimeSegment + } + return nil +} + +// Additional information associated with the annotation. +type AnnotationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata related to human labeling. + OperatorMetadata *OperatorMetadata `protobuf:"bytes,2,opt,name=operator_metadata,json=operatorMetadata,proto3" json:"operator_metadata,omitempty"` +} + +func (x *AnnotationMetadata) Reset() { + *x = AnnotationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotationMetadata) ProtoMessage() {} + +func (x *AnnotationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotationMetadata.ProtoReflect.Descriptor instead. +func (*AnnotationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{20} +} + +func (x *AnnotationMetadata) GetOperatorMetadata() *OperatorMetadata { + if x != nil { + return x.OperatorMetadata + } + return nil +} + +// General information useful for labels coming from contributors. +type OperatorMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Confidence score corresponding to a label. For examle, if 3 contributors + // have answered the question and 2 of them agree on the final label, the + // confidence score will be 0.67 (2/3). + Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"` + // The total number of contributors that answer this question. + TotalVotes int32 `protobuf:"varint,2,opt,name=total_votes,json=totalVotes,proto3" json:"total_votes,omitempty"` + // The total number of contributors that choose this label. + LabelVotes int32 `protobuf:"varint,3,opt,name=label_votes,json=labelVotes,proto3" json:"label_votes,omitempty"` + // Comments from contributors. + Comments []string `protobuf:"bytes,4,rep,name=comments,proto3" json:"comments,omitempty"` +} + +func (x *OperatorMetadata) Reset() { + *x = OperatorMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperatorMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperatorMetadata) ProtoMessage() {} + +func (x *OperatorMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperatorMetadata.ProtoReflect.Descriptor instead. +func (*OperatorMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP(), []int{21} +} + +func (x *OperatorMetadata) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *OperatorMetadata) GetTotalVotes() int32 { + if x != nil { + return x.TotalVotes + } + return 0 +} + +func (x *OperatorMetadata) GetLabelVotes() int32 { + if x != nil { + return x.LabelVotes + } + return 0 +} + +func (x *OperatorMetadata) GetComments() []string { + if x != nil { + return x.Comments + } + return nil +} + +var File_google_cloud_datalabeling_v1beta1_annotation_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x03, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x60, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x12, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x69, 0x0a, 0x14, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xdc, 0x09, 0x0a, 0x0f, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x8a, 0x01, 0x0a, 0x1f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1d, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x85, 0x01, 0x0a, + 0x1e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x6f, 0x6c, 0x79, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, 0x0a, 0x19, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, + 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x79, + 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x84, + 0x01, 0x0a, 0x1d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x87, 0x01, 0x0a, 0x1e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x1c, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x8e, 0x01, 0x0a, 0x21, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x1e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x8a, 0x01, 0x0a, 0x1f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, + 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1d, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x8b, 0x01, + 0x0a, 0x20, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1d, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6f, 0x0a, 0x16, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7b, 0x0a, 0x1d, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x0f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0x24, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, + 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x79, 0x22, 0x2e, 0x0a, + 0x10, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, + 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x22, 0x55, 0x0a, + 0x0c, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x45, 0x0a, + 0x08, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x08, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x63, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x16, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x64, + 0x0a, 0x13, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, + 0x74, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, + 0x52, 0x12, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, + 0x69, 0x63, 0x65, 0x73, 0x22, 0xd8, 0x02, 0x0a, 0x1b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x0d, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x0c, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x75, 0x0a, 0x18, + 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x6f, 0x75, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x79, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, + 0x0e, 0x0a, 0x0c, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x22, + 0x51, 0x0a, 0x08, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x08, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, + 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x12, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x64, 0x0a, 0x13, 0x6e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x12, 0x6e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x22, 0xb2, + 0x02, 0x0a, 0x17, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x08, 0x70, 0x6f, + 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x08, 0x70, 0x6f, 0x6c, + 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x68, 0x0a, 0x13, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x12, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x12, + 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0x0a, 0x04, 0x70, + 0x6f, 0x6c, 0x79, 0x22, 0xd7, 0x02, 0x0a, 0x1b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x54, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x76, 0x0a, 0x15, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7a, 0x0a, + 0x1c, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, + 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0xe1, 0x01, 0x0a, 0x1e, 0x54, 0x65, + 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x0f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x63, 0x0a, 0x12, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x11, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3b, 0x0a, + 0x11, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x54, + 0x69, 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x22, 0xce, 0x01, 0x0a, 0x1d, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x74, 0x69, + 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0xb0, 0x02, 0x0a, 0x13, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, + 0x0d, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x75, 0x0a, 0x18, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x79, 0x48, 0x00, 0x52, 0x16, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x12, 0x3a, 0x0a, 0x0b, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, 0x69, + 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x65, 0x64, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x22, 0xbc, 0x02, 0x0a, 0x1d, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x51, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x74, 0x69, + 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6c, 0x0a, 0x16, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x72, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x52, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x14, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x51, 0x0a, 0x0c, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, + 0x76, 0x0a, 0x12, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x60, 0x0a, 0x11, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, + 0x72, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x6f, + 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x6f, 0x74, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x56, + 0x6f, 0x74, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2a, 0x43, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x57, 0x0a, 0x13, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x20, + 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x49, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x45, 0x47, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x2a, 0x91, + 0x04, 0x0a, 0x0e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x53, + 0x53, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4d, 0x41, 0x47, 0x45, + 0x5f, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x4f, 0x58, 0x5f, 0x41, 0x4e, + 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x2a, 0x0a, 0x26, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x5f, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x5f, 0x42, 0x4f, 0x55, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x4f, 0x58, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0d, 0x12, 0x22, 0x0a, 0x1e, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, + 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x5f, 0x41, 0x4e, + 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x41, 0x4e, 0x4e, + 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0b, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4d, 0x41, + 0x47, 0x45, 0x5f, 0x53, 0x45, 0x47, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0c, 0x12, 0x29, 0x0a, 0x25, + 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x53, 0x48, 0x4f, 0x54, 0x53, 0x5f, 0x43, 0x4c, 0x41, 0x53, + 0x53, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x24, 0x0a, 0x20, 0x56, 0x49, 0x44, 0x45, 0x4f, + 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x49, 0x4e, 0x47, + 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x25, 0x0a, + 0x21, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x45, + 0x54, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x44, 0x45, 0x4f, 0x5f, 0x45, 0x56, + 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, + 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x49, 0x46, + 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x08, 0x12, 0x25, 0x0a, 0x21, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x45, 0x4e, 0x54, + 0x49, 0x54, 0x59, 0x5f, 0x45, 0x58, 0x54, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x25, 0x0a, 0x21, 0x47, + 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x49, 0x46, 0x49, 0x43, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x0e, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4d, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, 0x02, 0x21, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_google_cloud_datalabeling_v1beta1_annotation_proto_goTypes = []interface{}{ + (AnnotationSource)(0), // 0: google.cloud.datalabeling.v1beta1.AnnotationSource + (AnnotationSentiment)(0), // 1: google.cloud.datalabeling.v1beta1.AnnotationSentiment + (AnnotationType)(0), // 2: google.cloud.datalabeling.v1beta1.AnnotationType + (*Annotation)(nil), // 3: google.cloud.datalabeling.v1beta1.Annotation + (*AnnotationValue)(nil), // 4: google.cloud.datalabeling.v1beta1.AnnotationValue + (*ImageClassificationAnnotation)(nil), // 5: google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + (*Vertex)(nil), // 6: google.cloud.datalabeling.v1beta1.Vertex + (*NormalizedVertex)(nil), // 7: google.cloud.datalabeling.v1beta1.NormalizedVertex + (*BoundingPoly)(nil), // 8: google.cloud.datalabeling.v1beta1.BoundingPoly + (*NormalizedBoundingPoly)(nil), // 9: google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + (*ImageBoundingPolyAnnotation)(nil), // 10: google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + (*Polyline)(nil), // 11: google.cloud.datalabeling.v1beta1.Polyline + (*NormalizedPolyline)(nil), // 12: google.cloud.datalabeling.v1beta1.NormalizedPolyline + (*ImagePolylineAnnotation)(nil), // 13: google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + (*ImageSegmentationAnnotation)(nil), // 14: google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + (*TextClassificationAnnotation)(nil), // 15: google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + (*TextEntityExtractionAnnotation)(nil), // 16: google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + (*SequentialSegment)(nil), // 17: google.cloud.datalabeling.v1beta1.SequentialSegment + (*TimeSegment)(nil), // 18: google.cloud.datalabeling.v1beta1.TimeSegment + (*VideoClassificationAnnotation)(nil), // 19: google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + (*ObjectTrackingFrame)(nil), // 20: google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + (*VideoObjectTrackingAnnotation)(nil), // 21: google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + (*VideoEventAnnotation)(nil), // 22: google.cloud.datalabeling.v1beta1.VideoEventAnnotation + (*AnnotationMetadata)(nil), // 23: google.cloud.datalabeling.v1beta1.AnnotationMetadata + (*OperatorMetadata)(nil), // 24: google.cloud.datalabeling.v1beta1.OperatorMetadata + nil, // 25: google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.AnnotationColorsEntry + (*AnnotationSpec)(nil), // 26: google.cloud.datalabeling.v1beta1.AnnotationSpec + (*durationpb.Duration)(nil), // 27: google.protobuf.Duration +} +var file_google_cloud_datalabeling_v1beta1_annotation_proto_depIdxs = []int32{ + 0, // 0: google.cloud.datalabeling.v1beta1.Annotation.annotation_source:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSource + 4, // 1: google.cloud.datalabeling.v1beta1.Annotation.annotation_value:type_name -> google.cloud.datalabeling.v1beta1.AnnotationValue + 23, // 2: google.cloud.datalabeling.v1beta1.Annotation.annotation_metadata:type_name -> google.cloud.datalabeling.v1beta1.AnnotationMetadata + 1, // 3: google.cloud.datalabeling.v1beta1.Annotation.annotation_sentiment:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSentiment + 5, // 4: google.cloud.datalabeling.v1beta1.AnnotationValue.image_classification_annotation:type_name -> google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + 10, // 5: google.cloud.datalabeling.v1beta1.AnnotationValue.image_bounding_poly_annotation:type_name -> google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + 13, // 6: google.cloud.datalabeling.v1beta1.AnnotationValue.image_polyline_annotation:type_name -> google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + 14, // 7: google.cloud.datalabeling.v1beta1.AnnotationValue.image_segmentation_annotation:type_name -> google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + 15, // 8: google.cloud.datalabeling.v1beta1.AnnotationValue.text_classification_annotation:type_name -> google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + 16, // 9: google.cloud.datalabeling.v1beta1.AnnotationValue.text_entity_extraction_annotation:type_name -> google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + 19, // 10: google.cloud.datalabeling.v1beta1.AnnotationValue.video_classification_annotation:type_name -> google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + 21, // 11: google.cloud.datalabeling.v1beta1.AnnotationValue.video_object_tracking_annotation:type_name -> google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + 22, // 12: google.cloud.datalabeling.v1beta1.AnnotationValue.video_event_annotation:type_name -> google.cloud.datalabeling.v1beta1.VideoEventAnnotation + 26, // 13: google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 6, // 14: google.cloud.datalabeling.v1beta1.BoundingPoly.vertices:type_name -> google.cloud.datalabeling.v1beta1.Vertex + 7, // 15: google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.normalized_vertices:type_name -> google.cloud.datalabeling.v1beta1.NormalizedVertex + 8, // 16: google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.bounding_poly:type_name -> google.cloud.datalabeling.v1beta1.BoundingPoly + 9, // 17: google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.normalized_bounding_poly:type_name -> google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + 26, // 18: google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 6, // 19: google.cloud.datalabeling.v1beta1.Polyline.vertices:type_name -> google.cloud.datalabeling.v1beta1.Vertex + 7, // 20: google.cloud.datalabeling.v1beta1.NormalizedPolyline.normalized_vertices:type_name -> google.cloud.datalabeling.v1beta1.NormalizedVertex + 11, // 21: google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.polyline:type_name -> google.cloud.datalabeling.v1beta1.Polyline + 12, // 22: google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.normalized_polyline:type_name -> google.cloud.datalabeling.v1beta1.NormalizedPolyline + 26, // 23: google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 25, // 24: google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.annotation_colors:type_name -> google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.AnnotationColorsEntry + 26, // 25: google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 26, // 26: google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 17, // 27: google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.sequential_segment:type_name -> google.cloud.datalabeling.v1beta1.SequentialSegment + 27, // 28: google.cloud.datalabeling.v1beta1.TimeSegment.start_time_offset:type_name -> google.protobuf.Duration + 27, // 29: google.cloud.datalabeling.v1beta1.TimeSegment.end_time_offset:type_name -> google.protobuf.Duration + 18, // 30: google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.time_segment:type_name -> google.cloud.datalabeling.v1beta1.TimeSegment + 26, // 31: google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 8, // 32: google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.bounding_poly:type_name -> google.cloud.datalabeling.v1beta1.BoundingPoly + 9, // 33: google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.normalized_bounding_poly:type_name -> google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + 27, // 34: google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.time_offset:type_name -> google.protobuf.Duration + 26, // 35: google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 18, // 36: google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.time_segment:type_name -> google.cloud.datalabeling.v1beta1.TimeSegment + 20, // 37: google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.object_tracking_frames:type_name -> google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + 26, // 38: google.cloud.datalabeling.v1beta1.VideoEventAnnotation.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 18, // 39: google.cloud.datalabeling.v1beta1.VideoEventAnnotation.time_segment:type_name -> google.cloud.datalabeling.v1beta1.TimeSegment + 24, // 40: google.cloud.datalabeling.v1beta1.AnnotationMetadata.operator_metadata:type_name -> google.cloud.datalabeling.v1beta1.OperatorMetadata + 26, // 41: google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.AnnotationColorsEntry.value:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 42, // [42:42] is the sub-list for method output_type + 42, // [42:42] is the sub-list for method input_type + 42, // [42:42] is the sub-list for extension type_name + 42, // [42:42] is the sub-list for extension extendee + 0, // [0:42] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_annotation_proto_init() } +func file_google_cloud_datalabeling_v1beta1_annotation_proto_init() { + if File_google_cloud_datalabeling_v1beta1_annotation_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Annotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotationValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageClassificationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Vertex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NormalizedVertex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundingPoly); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NormalizedBoundingPoly); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageBoundingPolyAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Polyline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NormalizedPolyline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImagePolylineAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageSegmentationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextClassificationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextEntityExtractionAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SequentialSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoClassificationAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectTrackingFrame); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoObjectTrackingAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoEventAnnotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperatorMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*AnnotationValue_ImageClassificationAnnotation)(nil), + (*AnnotationValue_ImageBoundingPolyAnnotation)(nil), + (*AnnotationValue_ImagePolylineAnnotation)(nil), + (*AnnotationValue_ImageSegmentationAnnotation)(nil), + (*AnnotationValue_TextClassificationAnnotation)(nil), + (*AnnotationValue_TextEntityExtractionAnnotation)(nil), + (*AnnotationValue_VideoClassificationAnnotation)(nil), + (*AnnotationValue_VideoObjectTrackingAnnotation)(nil), + (*AnnotationValue_VideoEventAnnotation)(nil), + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*ImageBoundingPolyAnnotation_BoundingPoly)(nil), + (*ImageBoundingPolyAnnotation_NormalizedBoundingPoly)(nil), + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*ImagePolylineAnnotation_Polyline)(nil), + (*ImagePolylineAnnotation_NormalizedPolyline)(nil), + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes[17].OneofWrappers = []interface{}{ + (*ObjectTrackingFrame_BoundingPoly)(nil), + (*ObjectTrackingFrame_NormalizedBoundingPoly)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDesc, + NumEnums: 3, + NumMessages: 23, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_annotation_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_annotation_proto_depIdxs, + EnumInfos: file_google_cloud_datalabeling_v1beta1_annotation_proto_enumTypes, + MessageInfos: file_google_cloud_datalabeling_v1beta1_annotation_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_annotation_proto = out.File + file_google_cloud_datalabeling_v1beta1_annotation_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_annotation_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_annotation_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go b/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go new file mode 100644 index 000000000000..0b22ad8b3780 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/annotation_spec_set.pb.go @@ -0,0 +1,327 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// An AnnotationSpecSet is a collection of label definitions. For example, in +// image classification tasks, you define a set of possible labels for images as +// an AnnotationSpecSet. An AnnotationSpecSet is immutable upon creation. +type AnnotationSpecSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The AnnotationSpecSet resource name in the following format: + // + // "projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The display name for AnnotationSpecSet that you define when you + // create it. Maximum of 64 characters. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. User-provided description of the annotation specification set. + // The description can be up to 10,000 characters long. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Required. The array of AnnotationSpecs that you define when you create the + // AnnotationSpecSet. These are the possible labels for the labeling task. + AnnotationSpecs []*AnnotationSpec `protobuf:"bytes,4,rep,name=annotation_specs,json=annotationSpecs,proto3" json:"annotation_specs,omitempty"` + // Output only. The names of any related resources that are blocking changes + // to the annotation spec set. + BlockingResources []string `protobuf:"bytes,5,rep,name=blocking_resources,json=blockingResources,proto3" json:"blocking_resources,omitempty"` +} + +func (x *AnnotationSpecSet) Reset() { + *x = AnnotationSpecSet{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotationSpecSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotationSpecSet) ProtoMessage() {} + +func (x *AnnotationSpecSet) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotationSpecSet.ProtoReflect.Descriptor instead. +func (*AnnotationSpecSet) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescGZIP(), []int{0} +} + +func (x *AnnotationSpecSet) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AnnotationSpecSet) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *AnnotationSpecSet) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AnnotationSpecSet) GetAnnotationSpecs() []*AnnotationSpec { + if x != nil { + return x.AnnotationSpecs + } + return nil +} + +func (x *AnnotationSpecSet) GetBlockingResources() []string { + if x != nil { + return x.BlockingResources + } + return nil +} + +// Container of information related to one possible annotation that can be used +// in a labeling task. For example, an image classification task where images +// are labeled as `dog` or `cat` must reference an AnnotationSpec for `dog` and +// an AnnotationSpec for `cat`. +type AnnotationSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The display name of the AnnotationSpec. Maximum of 64 characters. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. User-provided description of the annotation specification. + // The description can be up to 10,000 characters long. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *AnnotationSpec) Reset() { + *x = AnnotationSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotationSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotationSpec) ProtoMessage() {} + +func (x *AnnotationSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotationSpec.ProtoReflect.Descriptor instead. +func (*AnnotationSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescGZIP(), []int{1} +} + +func (x *AnnotationSpec) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *AnnotationSpec) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +var File_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x02, 0x0a, 0x11, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x10, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x6f, 0xea, 0x41, 0x6c, 0x0a, 0x2d, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, + 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x7d, 0x22, 0x55, 0x0a, 0x0e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, + 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, 0x02, 0x21, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, + 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, + 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_goTypes = []interface{}{ + (*AnnotationSpecSet)(nil), // 0: google.cloud.datalabeling.v1beta1.AnnotationSpecSet + (*AnnotationSpec)(nil), // 1: google.cloud.datalabeling.v1beta1.AnnotationSpec +} +var file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_depIdxs = []int32{ + 1, // 0: google.cloud.datalabeling.v1beta1.AnnotationSpecSet.annotation_specs:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() } +func file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() { + if File_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotationSpecSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotationSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_depIdxs, + MessageInfos: file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto = out.File + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go b/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go new file mode 100644 index 000000000000..713dd08e9bae --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/data_labeling_service.pb.go @@ -0,0 +1,6460 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package datalabelingpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Image labeling task feature. +type LabelImageRequest_Feature int32 + +const ( + LabelImageRequest_FEATURE_UNSPECIFIED LabelImageRequest_Feature = 0 + // Label whole image with one or more of labels. + LabelImageRequest_CLASSIFICATION LabelImageRequest_Feature = 1 + // Label image with bounding boxes for labels. + LabelImageRequest_BOUNDING_BOX LabelImageRequest_Feature = 2 + // Label oriented bounding box. The box does not have to be parallel to + // horizontal line. + LabelImageRequest_ORIENTED_BOUNDING_BOX LabelImageRequest_Feature = 6 + // Label images with bounding poly. A bounding poly is a plane figure that + // is bounded by a finite chain of straight line segments closing in a loop. + LabelImageRequest_BOUNDING_POLY LabelImageRequest_Feature = 3 + // Label images with polyline. Polyline is formed by connected line segments + // which are not in closed form. + LabelImageRequest_POLYLINE LabelImageRequest_Feature = 4 + // Label images with segmentation. Segmentation is different from bounding + // poly since it is more fine-grained, pixel level annotation. + LabelImageRequest_SEGMENTATION LabelImageRequest_Feature = 5 +) + +// Enum value maps for LabelImageRequest_Feature. +var ( + LabelImageRequest_Feature_name = map[int32]string{ + 0: "FEATURE_UNSPECIFIED", + 1: "CLASSIFICATION", + 2: "BOUNDING_BOX", + 6: "ORIENTED_BOUNDING_BOX", + 3: "BOUNDING_POLY", + 4: "POLYLINE", + 5: "SEGMENTATION", + } + LabelImageRequest_Feature_value = map[string]int32{ + "FEATURE_UNSPECIFIED": 0, + "CLASSIFICATION": 1, + "BOUNDING_BOX": 2, + "ORIENTED_BOUNDING_BOX": 6, + "BOUNDING_POLY": 3, + "POLYLINE": 4, + "SEGMENTATION": 5, + } +) + +func (x LabelImageRequest_Feature) Enum() *LabelImageRequest_Feature { + p := new(LabelImageRequest_Feature) + *p = x + return p +} + +func (x LabelImageRequest_Feature) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LabelImageRequest_Feature) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes[0].Descriptor() +} + +func (LabelImageRequest_Feature) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes[0] +} + +func (x LabelImageRequest_Feature) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LabelImageRequest_Feature.Descriptor instead. +func (LabelImageRequest_Feature) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{14, 0} +} + +// Video labeling task feature. +type LabelVideoRequest_Feature int32 + +const ( + LabelVideoRequest_FEATURE_UNSPECIFIED LabelVideoRequest_Feature = 0 + // Label whole video or video segment with one or more labels. + LabelVideoRequest_CLASSIFICATION LabelVideoRequest_Feature = 1 + // Label objects with bounding box on image frames extracted from the video. + LabelVideoRequest_OBJECT_DETECTION LabelVideoRequest_Feature = 2 + // Label and track objects in video. + LabelVideoRequest_OBJECT_TRACKING LabelVideoRequest_Feature = 3 + // Label the range of video for the specified events. + LabelVideoRequest_EVENT LabelVideoRequest_Feature = 4 +) + +// Enum value maps for LabelVideoRequest_Feature. +var ( + LabelVideoRequest_Feature_name = map[int32]string{ + 0: "FEATURE_UNSPECIFIED", + 1: "CLASSIFICATION", + 2: "OBJECT_DETECTION", + 3: "OBJECT_TRACKING", + 4: "EVENT", + } + LabelVideoRequest_Feature_value = map[string]int32{ + "FEATURE_UNSPECIFIED": 0, + "CLASSIFICATION": 1, + "OBJECT_DETECTION": 2, + "OBJECT_TRACKING": 3, + "EVENT": 4, + } +) + +func (x LabelVideoRequest_Feature) Enum() *LabelVideoRequest_Feature { + p := new(LabelVideoRequest_Feature) + *p = x + return p +} + +func (x LabelVideoRequest_Feature) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LabelVideoRequest_Feature) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes[1].Descriptor() +} + +func (LabelVideoRequest_Feature) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes[1] +} + +func (x LabelVideoRequest_Feature) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LabelVideoRequest_Feature.Descriptor instead. +func (LabelVideoRequest_Feature) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{15, 0} +} + +// Text labeling task feature. +type LabelTextRequest_Feature int32 + +const ( + LabelTextRequest_FEATURE_UNSPECIFIED LabelTextRequest_Feature = 0 + // Label text content to one of more labels. + LabelTextRequest_TEXT_CLASSIFICATION LabelTextRequest_Feature = 1 + // Label entities and their span in text. + LabelTextRequest_TEXT_ENTITY_EXTRACTION LabelTextRequest_Feature = 2 +) + +// Enum value maps for LabelTextRequest_Feature. +var ( + LabelTextRequest_Feature_name = map[int32]string{ + 0: "FEATURE_UNSPECIFIED", + 1: "TEXT_CLASSIFICATION", + 2: "TEXT_ENTITY_EXTRACTION", + } + LabelTextRequest_Feature_value = map[string]int32{ + "FEATURE_UNSPECIFIED": 0, + "TEXT_CLASSIFICATION": 1, + "TEXT_ENTITY_EXTRACTION": 2, + } +) + +func (x LabelTextRequest_Feature) Enum() *LabelTextRequest_Feature { + p := new(LabelTextRequest_Feature) + *p = x + return p +} + +func (x LabelTextRequest_Feature) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LabelTextRequest_Feature) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes[2].Descriptor() +} + +func (LabelTextRequest_Feature) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes[2] +} + +func (x LabelTextRequest_Feature) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LabelTextRequest_Feature.Descriptor instead. +func (LabelTextRequest_Feature) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{16, 0} +} + +// Request message for CreateDataset. +type CreateDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset resource parent, format: + // projects/{project_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The dataset to be created. + Dataset *Dataset `protobuf:"bytes,2,opt,name=dataset,proto3" json:"dataset,omitempty"` +} + +func (x *CreateDatasetRequest) Reset() { + *x = CreateDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatasetRequest) ProtoMessage() {} + +func (x *CreateDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatasetRequest.ProtoReflect.Descriptor instead. +func (*CreateDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateDatasetRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDatasetRequest) GetDataset() *Dataset { + if x != nil { + return x.Dataset + } + return nil +} + +// Request message for GetDataSet. +type GetDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDatasetRequest) Reset() { + *x = GetDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatasetRequest) ProtoMessage() {} + +func (x *GetDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatasetRequest.ProtoReflect.Descriptor instead. +func (*GetDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetDatasetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListDataset. +type ListDatasetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset resource parent, format: + // projects/{project_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Filter on dataset is not supported at this moment. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous + // [DataLabelingService.ListDatasets] call. + // Returns the first page if empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDatasetsRequest) Reset() { + *x = ListDatasetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDatasetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatasetsRequest) ProtoMessage() {} + +func (x *ListDatasetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatasetsRequest.ProtoReflect.Descriptor instead. +func (*ListDatasetsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListDatasetsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDatasetsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListDatasetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDatasetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of listing datasets within a project. +type ListDatasetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of datasets to return. + Datasets []*Dataset `protobuf:"bytes,1,rep,name=datasets,proto3" json:"datasets,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDatasetsResponse) Reset() { + *x = ListDatasetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDatasetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatasetsResponse) ProtoMessage() {} + +func (x *ListDatasetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatasetsResponse.ProtoReflect.Descriptor instead. +func (*ListDatasetsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListDatasetsResponse) GetDatasets() []*Dataset { + if x != nil { + return x.Datasets + } + return nil +} + +func (x *ListDatasetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for DeleteDataset. +type DeleteDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteDatasetRequest) Reset() { + *x = DeleteDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDatasetRequest) ProtoMessage() {} + +func (x *DeleteDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDatasetRequest.ProtoReflect.Descriptor instead. +func (*DeleteDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteDatasetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ImportData API. +type ImportDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Specify the input source of the data. + InputConfig *InputConfig `protobuf:"bytes,2,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` + // Email of the user who started the import task and should be notified by + // email. If empty no notification will be sent. + UserEmailAddress string `protobuf:"bytes,3,opt,name=user_email_address,json=userEmailAddress,proto3" json:"user_email_address,omitempty"` +} + +func (x *ImportDataRequest) Reset() { + *x = ImportDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataRequest) ProtoMessage() {} + +func (x *ImportDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataRequest.ProtoReflect.Descriptor instead. +func (*ImportDataRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ImportDataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ImportDataRequest) GetInputConfig() *InputConfig { + if x != nil { + return x.InputConfig + } + return nil +} + +func (x *ImportDataRequest) GetUserEmailAddress() string { + if x != nil { + return x.UserEmailAddress + } + return "" +} + +// Request message for ExportData API. +type ExportDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Annotated dataset resource name. DataItem in + // Dataset and their annotations in specified annotated dataset will be + // exported. It's in format of + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + AnnotatedDataset string `protobuf:"bytes,2,opt,name=annotated_dataset,json=annotatedDataset,proto3" json:"annotated_dataset,omitempty"` + // Optional. Filter is not supported at this moment. + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // Required. Specify the output destination. + OutputConfig *OutputConfig `protobuf:"bytes,4,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` + // Email of the user who started the export task and should be notified by + // email. If empty no notification will be sent. + UserEmailAddress string `protobuf:"bytes,5,opt,name=user_email_address,json=userEmailAddress,proto3" json:"user_email_address,omitempty"` +} + +func (x *ExportDataRequest) Reset() { + *x = ExportDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataRequest) ProtoMessage() {} + +func (x *ExportDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataRequest.ProtoReflect.Descriptor instead. +func (*ExportDataRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ExportDataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportDataRequest) GetAnnotatedDataset() string { + if x != nil { + return x.AnnotatedDataset + } + return "" +} + +func (x *ExportDataRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ExportDataRequest) GetOutputConfig() *OutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +func (x *ExportDataRequest) GetUserEmailAddress() string { + if x != nil { + return x.UserEmailAddress + } + return "" +} + +// Request message for GetDataItem. +type GetDataItemRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the data item to get, format: + // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDataItemRequest) Reset() { + *x = GetDataItemRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDataItemRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataItemRequest) ProtoMessage() {} + +func (x *GetDataItemRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataItemRequest.ProtoReflect.Descriptor instead. +func (*GetDataItemRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GetDataItemRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListDataItems. +type ListDataItemsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the dataset to list data items, format: + // projects/{project_id}/datasets/{dataset_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Filter is not supported at this moment. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous + // [DataLabelingService.ListDataItems] call. + // Return first page if empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDataItemsRequest) Reset() { + *x = ListDataItemsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDataItemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDataItemsRequest) ProtoMessage() {} + +func (x *ListDataItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDataItemsRequest.ProtoReflect.Descriptor instead. +func (*ListDataItemsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ListDataItemsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDataItemsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListDataItemsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDataItemsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of listing data items in a dataset. +type ListDataItemsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of data items to return. + DataItems []*DataItem `protobuf:"bytes,1,rep,name=data_items,json=dataItems,proto3" json:"data_items,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDataItemsResponse) Reset() { + *x = ListDataItemsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDataItemsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDataItemsResponse) ProtoMessage() {} + +func (x *ListDataItemsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDataItemsResponse.ProtoReflect.Descriptor instead. +func (*ListDataItemsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{9} +} + +func (x *ListDataItemsResponse) GetDataItems() []*DataItem { + if x != nil { + return x.DataItems + } + return nil +} + +func (x *ListDataItemsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetAnnotatedDataset. +type GetAnnotatedDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the annotated dataset to get, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAnnotatedDatasetRequest) Reset() { + *x = GetAnnotatedDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAnnotatedDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAnnotatedDatasetRequest) ProtoMessage() {} + +func (x *GetAnnotatedDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAnnotatedDatasetRequest.ProtoReflect.Descriptor instead. +func (*GetAnnotatedDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{10} +} + +func (x *GetAnnotatedDatasetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListAnnotatedDatasets. +type ListAnnotatedDatasetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the dataset to list annotated datasets, format: + // projects/{project_id}/datasets/{dataset_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Filter is not supported at this moment. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous + // [DataLabelingService.ListAnnotatedDatasets] call. + // Return first page if empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAnnotatedDatasetsRequest) Reset() { + *x = ListAnnotatedDatasetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAnnotatedDatasetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAnnotatedDatasetsRequest) ProtoMessage() {} + +func (x *ListAnnotatedDatasetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAnnotatedDatasetsRequest.ProtoReflect.Descriptor instead. +func (*ListAnnotatedDatasetsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{11} +} + +func (x *ListAnnotatedDatasetsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListAnnotatedDatasetsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListAnnotatedDatasetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAnnotatedDatasetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of listing annotated datasets for a dataset. +type ListAnnotatedDatasetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of annotated datasets to return. + AnnotatedDatasets []*AnnotatedDataset `protobuf:"bytes,1,rep,name=annotated_datasets,json=annotatedDatasets,proto3" json:"annotated_datasets,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAnnotatedDatasetsResponse) Reset() { + *x = ListAnnotatedDatasetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAnnotatedDatasetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAnnotatedDatasetsResponse) ProtoMessage() {} + +func (x *ListAnnotatedDatasetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAnnotatedDatasetsResponse.ProtoReflect.Descriptor instead. +func (*ListAnnotatedDatasetsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{12} +} + +func (x *ListAnnotatedDatasetsResponse) GetAnnotatedDatasets() []*AnnotatedDataset { + if x != nil { + return x.AnnotatedDatasets + } + return nil +} + +func (x *ListAnnotatedDatasetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for DeleteAnnotatedDataset. +type DeleteAnnotatedDatasetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the annotated dataset to delete, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteAnnotatedDatasetRequest) Reset() { + *x = DeleteAnnotatedDatasetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAnnotatedDatasetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAnnotatedDatasetRequest) ProtoMessage() {} + +func (x *DeleteAnnotatedDatasetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAnnotatedDatasetRequest.ProtoReflect.Descriptor instead. +func (*DeleteAnnotatedDatasetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteAnnotatedDatasetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for starting an image labeling task. +type LabelImageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + // + // Types that are assignable to RequestConfig: + // + // *LabelImageRequest_ImageClassificationConfig + // *LabelImageRequest_BoundingPolyConfig + // *LabelImageRequest_PolylineConfig + // *LabelImageRequest_SegmentationConfig + RequestConfig isLabelImageRequest_RequestConfig `protobuf_oneof:"request_config"` + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Basic human annotation config. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,2,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` + // Required. The type of image labeling task. + Feature LabelImageRequest_Feature `protobuf:"varint,3,opt,name=feature,proto3,enum=google.cloud.datalabeling.v1beta1.LabelImageRequest_Feature" json:"feature,omitempty"` +} + +func (x *LabelImageRequest) Reset() { + *x = LabelImageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImageRequest) ProtoMessage() {} + +func (x *LabelImageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImageRequest.ProtoReflect.Descriptor instead. +func (*LabelImageRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{14} +} + +func (m *LabelImageRequest) GetRequestConfig() isLabelImageRequest_RequestConfig { + if m != nil { + return m.RequestConfig + } + return nil +} + +func (x *LabelImageRequest) GetImageClassificationConfig() *ImageClassificationConfig { + if x, ok := x.GetRequestConfig().(*LabelImageRequest_ImageClassificationConfig); ok { + return x.ImageClassificationConfig + } + return nil +} + +func (x *LabelImageRequest) GetBoundingPolyConfig() *BoundingPolyConfig { + if x, ok := x.GetRequestConfig().(*LabelImageRequest_BoundingPolyConfig); ok { + return x.BoundingPolyConfig + } + return nil +} + +func (x *LabelImageRequest) GetPolylineConfig() *PolylineConfig { + if x, ok := x.GetRequestConfig().(*LabelImageRequest_PolylineConfig); ok { + return x.PolylineConfig + } + return nil +} + +func (x *LabelImageRequest) GetSegmentationConfig() *SegmentationConfig { + if x, ok := x.GetRequestConfig().(*LabelImageRequest_SegmentationConfig); ok { + return x.SegmentationConfig + } + return nil +} + +func (x *LabelImageRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *LabelImageRequest) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +func (x *LabelImageRequest) GetFeature() LabelImageRequest_Feature { + if x != nil { + return x.Feature + } + return LabelImageRequest_FEATURE_UNSPECIFIED +} + +type isLabelImageRequest_RequestConfig interface { + isLabelImageRequest_RequestConfig() +} + +type LabelImageRequest_ImageClassificationConfig struct { + // Configuration for image classification task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + ImageClassificationConfig *ImageClassificationConfig `protobuf:"bytes,4,opt,name=image_classification_config,json=imageClassificationConfig,proto3,oneof"` +} + +type LabelImageRequest_BoundingPolyConfig struct { + // Configuration for bounding box and bounding poly task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + BoundingPolyConfig *BoundingPolyConfig `protobuf:"bytes,5,opt,name=bounding_poly_config,json=boundingPolyConfig,proto3,oneof"` +} + +type LabelImageRequest_PolylineConfig struct { + // Configuration for polyline task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + PolylineConfig *PolylineConfig `protobuf:"bytes,6,opt,name=polyline_config,json=polylineConfig,proto3,oneof"` +} + +type LabelImageRequest_SegmentationConfig struct { + // Configuration for segmentation task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config are required. + SegmentationConfig *SegmentationConfig `protobuf:"bytes,7,opt,name=segmentation_config,json=segmentationConfig,proto3,oneof"` +} + +func (*LabelImageRequest_ImageClassificationConfig) isLabelImageRequest_RequestConfig() {} + +func (*LabelImageRequest_BoundingPolyConfig) isLabelImageRequest_RequestConfig() {} + +func (*LabelImageRequest_PolylineConfig) isLabelImageRequest_RequestConfig() {} + +func (*LabelImageRequest_SegmentationConfig) isLabelImageRequest_RequestConfig() {} + +// Request message for LabelVideo. +type LabelVideoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + // + // Types that are assignable to RequestConfig: + // + // *LabelVideoRequest_VideoClassificationConfig + // *LabelVideoRequest_ObjectDetectionConfig + // *LabelVideoRequest_ObjectTrackingConfig + // *LabelVideoRequest_EventConfig + RequestConfig isLabelVideoRequest_RequestConfig `protobuf_oneof:"request_config"` + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Basic human annotation config. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,2,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` + // Required. The type of video labeling task. + Feature LabelVideoRequest_Feature `protobuf:"varint,3,opt,name=feature,proto3,enum=google.cloud.datalabeling.v1beta1.LabelVideoRequest_Feature" json:"feature,omitempty"` +} + +func (x *LabelVideoRequest) Reset() { + *x = LabelVideoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelVideoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelVideoRequest) ProtoMessage() {} + +func (x *LabelVideoRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelVideoRequest.ProtoReflect.Descriptor instead. +func (*LabelVideoRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{15} +} + +func (m *LabelVideoRequest) GetRequestConfig() isLabelVideoRequest_RequestConfig { + if m != nil { + return m.RequestConfig + } + return nil +} + +func (x *LabelVideoRequest) GetVideoClassificationConfig() *VideoClassificationConfig { + if x, ok := x.GetRequestConfig().(*LabelVideoRequest_VideoClassificationConfig); ok { + return x.VideoClassificationConfig + } + return nil +} + +func (x *LabelVideoRequest) GetObjectDetectionConfig() *ObjectDetectionConfig { + if x, ok := x.GetRequestConfig().(*LabelVideoRequest_ObjectDetectionConfig); ok { + return x.ObjectDetectionConfig + } + return nil +} + +func (x *LabelVideoRequest) GetObjectTrackingConfig() *ObjectTrackingConfig { + if x, ok := x.GetRequestConfig().(*LabelVideoRequest_ObjectTrackingConfig); ok { + return x.ObjectTrackingConfig + } + return nil +} + +func (x *LabelVideoRequest) GetEventConfig() *EventConfig { + if x, ok := x.GetRequestConfig().(*LabelVideoRequest_EventConfig); ok { + return x.EventConfig + } + return nil +} + +func (x *LabelVideoRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *LabelVideoRequest) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +func (x *LabelVideoRequest) GetFeature() LabelVideoRequest_Feature { + if x != nil { + return x.Feature + } + return LabelVideoRequest_FEATURE_UNSPECIFIED +} + +type isLabelVideoRequest_RequestConfig interface { + isLabelVideoRequest_RequestConfig() +} + +type LabelVideoRequest_VideoClassificationConfig struct { + // Configuration for video classification task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + VideoClassificationConfig *VideoClassificationConfig `protobuf:"bytes,4,opt,name=video_classification_config,json=videoClassificationConfig,proto3,oneof"` +} + +type LabelVideoRequest_ObjectDetectionConfig struct { + // Configuration for video object detection task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + ObjectDetectionConfig *ObjectDetectionConfig `protobuf:"bytes,5,opt,name=object_detection_config,json=objectDetectionConfig,proto3,oneof"` +} + +type LabelVideoRequest_ObjectTrackingConfig struct { + // Configuration for video object tracking task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + ObjectTrackingConfig *ObjectTrackingConfig `protobuf:"bytes,6,opt,name=object_tracking_config,json=objectTrackingConfig,proto3,oneof"` +} + +type LabelVideoRequest_EventConfig struct { + // Configuration for video event task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + EventConfig *EventConfig `protobuf:"bytes,7,opt,name=event_config,json=eventConfig,proto3,oneof"` +} + +func (*LabelVideoRequest_VideoClassificationConfig) isLabelVideoRequest_RequestConfig() {} + +func (*LabelVideoRequest_ObjectDetectionConfig) isLabelVideoRequest_RequestConfig() {} + +func (*LabelVideoRequest_ObjectTrackingConfig) isLabelVideoRequest_RequestConfig() {} + +func (*LabelVideoRequest_EventConfig) isLabelVideoRequest_RequestConfig() {} + +// Request message for LabelText. +type LabelTextRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + // + // Types that are assignable to RequestConfig: + // + // *LabelTextRequest_TextClassificationConfig + // *LabelTextRequest_TextEntityExtractionConfig + RequestConfig isLabelTextRequest_RequestConfig `protobuf_oneof:"request_config"` + // Required. Name of the data set to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Basic human annotation config. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,2,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` + // Required. The type of text labeling task. + Feature LabelTextRequest_Feature `protobuf:"varint,6,opt,name=feature,proto3,enum=google.cloud.datalabeling.v1beta1.LabelTextRequest_Feature" json:"feature,omitempty"` +} + +func (x *LabelTextRequest) Reset() { + *x = LabelTextRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelTextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelTextRequest) ProtoMessage() {} + +func (x *LabelTextRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelTextRequest.ProtoReflect.Descriptor instead. +func (*LabelTextRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{16} +} + +func (m *LabelTextRequest) GetRequestConfig() isLabelTextRequest_RequestConfig { + if m != nil { + return m.RequestConfig + } + return nil +} + +func (x *LabelTextRequest) GetTextClassificationConfig() *TextClassificationConfig { + if x, ok := x.GetRequestConfig().(*LabelTextRequest_TextClassificationConfig); ok { + return x.TextClassificationConfig + } + return nil +} + +func (x *LabelTextRequest) GetTextEntityExtractionConfig() *TextEntityExtractionConfig { + if x, ok := x.GetRequestConfig().(*LabelTextRequest_TextEntityExtractionConfig); ok { + return x.TextEntityExtractionConfig + } + return nil +} + +func (x *LabelTextRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *LabelTextRequest) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +func (x *LabelTextRequest) GetFeature() LabelTextRequest_Feature { + if x != nil { + return x.Feature + } + return LabelTextRequest_FEATURE_UNSPECIFIED +} + +type isLabelTextRequest_RequestConfig interface { + isLabelTextRequest_RequestConfig() +} + +type LabelTextRequest_TextClassificationConfig struct { + // Configuration for text classification task. + // One of text_classification_config and text_entity_extraction_config + // is required. + TextClassificationConfig *TextClassificationConfig `protobuf:"bytes,4,opt,name=text_classification_config,json=textClassificationConfig,proto3,oneof"` +} + +type LabelTextRequest_TextEntityExtractionConfig struct { + // Configuration for entity extraction task. + // One of text_classification_config and text_entity_extraction_config + // is required. + TextEntityExtractionConfig *TextEntityExtractionConfig `protobuf:"bytes,5,opt,name=text_entity_extraction_config,json=textEntityExtractionConfig,proto3,oneof"` +} + +func (*LabelTextRequest_TextClassificationConfig) isLabelTextRequest_RequestConfig() {} + +func (*LabelTextRequest_TextEntityExtractionConfig) isLabelTextRequest_RequestConfig() {} + +// Request message for GetExample +type GetExampleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of example, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id}/examples/{example_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. An expression for filtering Examples. Filter by + // annotation_spec.display_name is supported. Format + // "annotation_spec.display_name = {display_name}" + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *GetExampleRequest) Reset() { + *x = GetExampleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetExampleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExampleRequest) ProtoMessage() {} + +func (x *GetExampleRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExampleRequest.ProtoReflect.Descriptor instead. +func (*GetExampleRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{17} +} + +func (x *GetExampleRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetExampleRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Request message for ListExamples. +type ListExamplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Example resource parent. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. An expression for filtering Examples. For annotated datasets that + // have annotation spec set, filter by + // annotation_spec.display_name is supported. Format + // "annotation_spec.display_name = {display_name}" + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous + // [DataLabelingService.ListExamples] call. + // Return first page if empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListExamplesRequest) Reset() { + *x = ListExamplesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListExamplesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExamplesRequest) ProtoMessage() {} + +func (x *ListExamplesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListExamplesRequest.ProtoReflect.Descriptor instead. +func (*ListExamplesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{18} +} + +func (x *ListExamplesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListExamplesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListExamplesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListExamplesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of listing Examples in and annotated dataset. +type ListExamplesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of examples to return. + Examples []*Example `protobuf:"bytes,1,rep,name=examples,proto3" json:"examples,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListExamplesResponse) Reset() { + *x = ListExamplesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListExamplesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExamplesResponse) ProtoMessage() {} + +func (x *ListExamplesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListExamplesResponse.ProtoReflect.Descriptor instead. +func (*ListExamplesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{19} +} + +func (x *ListExamplesResponse) GetExamples() []*Example { + if x != nil { + return x.Examples + } + return nil +} + +func (x *ListExamplesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for CreateAnnotationSpecSet. +type CreateAnnotationSpecSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. AnnotationSpecSet resource parent, format: + // projects/{project_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Annotation spec set to create. Annotation specs must be included. + // Only one annotation spec will be accepted for annotation specs with same + // display_name. + AnnotationSpecSet *AnnotationSpecSet `protobuf:"bytes,2,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` +} + +func (x *CreateAnnotationSpecSetRequest) Reset() { + *x = CreateAnnotationSpecSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAnnotationSpecSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAnnotationSpecSetRequest) ProtoMessage() {} + +func (x *CreateAnnotationSpecSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAnnotationSpecSetRequest.ProtoReflect.Descriptor instead. +func (*CreateAnnotationSpecSetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{20} +} + +func (x *CreateAnnotationSpecSetRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateAnnotationSpecSetRequest) GetAnnotationSpecSet() *AnnotationSpecSet { + if x != nil { + return x.AnnotationSpecSet + } + return nil +} + +// Request message for GetAnnotationSpecSet. +type GetAnnotationSpecSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. AnnotationSpecSet resource name, format: + // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAnnotationSpecSetRequest) Reset() { + *x = GetAnnotationSpecSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAnnotationSpecSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAnnotationSpecSetRequest) ProtoMessage() {} + +func (x *GetAnnotationSpecSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAnnotationSpecSetRequest.ProtoReflect.Descriptor instead. +func (*GetAnnotationSpecSetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{21} +} + +func (x *GetAnnotationSpecSetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListAnnotationSpecSets. +type ListAnnotationSpecSetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Parent of AnnotationSpecSet resource, format: + // projects/{project_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Filter is not supported at this moment. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous + // [DataLabelingService.ListAnnotationSpecSets] call. + // Return first page if empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAnnotationSpecSetsRequest) Reset() { + *x = ListAnnotationSpecSetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAnnotationSpecSetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAnnotationSpecSetsRequest) ProtoMessage() {} + +func (x *ListAnnotationSpecSetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAnnotationSpecSetsRequest.ProtoReflect.Descriptor instead. +func (*ListAnnotationSpecSetsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{22} +} + +func (x *ListAnnotationSpecSetsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListAnnotationSpecSetsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListAnnotationSpecSetsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAnnotationSpecSetsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of listing annotation spec set under a project. +type ListAnnotationSpecSetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of annotation spec sets. + AnnotationSpecSets []*AnnotationSpecSet `protobuf:"bytes,1,rep,name=annotation_spec_sets,json=annotationSpecSets,proto3" json:"annotation_spec_sets,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAnnotationSpecSetsResponse) Reset() { + *x = ListAnnotationSpecSetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAnnotationSpecSetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAnnotationSpecSetsResponse) ProtoMessage() {} + +func (x *ListAnnotationSpecSetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAnnotationSpecSetsResponse.ProtoReflect.Descriptor instead. +func (*ListAnnotationSpecSetsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{23} +} + +func (x *ListAnnotationSpecSetsResponse) GetAnnotationSpecSets() []*AnnotationSpecSet { + if x != nil { + return x.AnnotationSpecSets + } + return nil +} + +func (x *ListAnnotationSpecSetsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for DeleteAnnotationSpecSet. +type DeleteAnnotationSpecSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. AnnotationSpec resource name, format: + // `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteAnnotationSpecSetRequest) Reset() { + *x = DeleteAnnotationSpecSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAnnotationSpecSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAnnotationSpecSetRequest) ProtoMessage() {} + +func (x *DeleteAnnotationSpecSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAnnotationSpecSetRequest.ProtoReflect.Descriptor instead. +func (*DeleteAnnotationSpecSetRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{24} +} + +func (x *DeleteAnnotationSpecSetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for CreateInstruction. +type CreateInstructionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Instruction resource parent, format: + // projects/{project_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Instruction of how to perform the labeling task. + Instruction *Instruction `protobuf:"bytes,2,opt,name=instruction,proto3" json:"instruction,omitempty"` +} + +func (x *CreateInstructionRequest) Reset() { + *x = CreateInstructionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInstructionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInstructionRequest) ProtoMessage() {} + +func (x *CreateInstructionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInstructionRequest.ProtoReflect.Descriptor instead. +func (*CreateInstructionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{25} +} + +func (x *CreateInstructionRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateInstructionRequest) GetInstruction() *Instruction { + if x != nil { + return x.Instruction + } + return nil +} + +// Request message for GetInstruction. +type GetInstructionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetInstructionRequest) Reset() { + *x = GetInstructionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInstructionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstructionRequest) ProtoMessage() {} + +func (x *GetInstructionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstructionRequest.ProtoReflect.Descriptor instead. +func (*GetInstructionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{26} +} + +func (x *GetInstructionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for DeleteInstruction. +type DeleteInstructionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteInstructionRequest) Reset() { + *x = DeleteInstructionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteInstructionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInstructionRequest) ProtoMessage() {} + +func (x *DeleteInstructionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInstructionRequest.ProtoReflect.Descriptor instead. +func (*DeleteInstructionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{27} +} + +func (x *DeleteInstructionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListInstructions. +type ListInstructionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Instruction resource parent, format: + // projects/{project_id} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Filter is not supported at this moment. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous + // [DataLabelingService.ListInstructions] call. + // Return first page if empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListInstructionsRequest) Reset() { + *x = ListInstructionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstructionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstructionsRequest) ProtoMessage() {} + +func (x *ListInstructionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstructionsRequest.ProtoReflect.Descriptor instead. +func (*ListInstructionsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{28} +} + +func (x *ListInstructionsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListInstructionsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListInstructionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListInstructionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of listing instructions under a project. +type ListInstructionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of Instructions to return. + Instructions []*Instruction `protobuf:"bytes,1,rep,name=instructions,proto3" json:"instructions,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListInstructionsResponse) Reset() { + *x = ListInstructionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstructionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstructionsResponse) ProtoMessage() {} + +func (x *ListInstructionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstructionsResponse.ProtoReflect.Descriptor instead. +func (*ListInstructionsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{29} +} + +func (x *ListInstructionsResponse) GetInstructions() []*Instruction { + if x != nil { + return x.Instructions + } + return nil +} + +func (x *ListInstructionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for GetEvaluation. +type GetEvaluationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the evaluation. Format: + // + // "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetEvaluationRequest) Reset() { + *x = GetEvaluationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEvaluationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEvaluationRequest) ProtoMessage() {} + +func (x *GetEvaluationRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEvaluationRequest.ProtoReflect.Descriptor instead. +func (*GetEvaluationRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{30} +} + +func (x *GetEvaluationRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for SearchEvaluation. +type SearchEvaluationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Evaluation search parent (project ID). Format: + // "projects/{project_id}" + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. To search evaluations, you can filter by the following: + // + // - evaluation_job.evaluation_job_id (the last part of + // [EvaluationJob.name][google.cloud.datalabeling.v1beta1.EvaluationJob.name]) + // - evaluation_job.model_id (the {model_name} portion + // of [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) + // - evaluation_job.evaluation_job_run_time_start (Minimum + // threshold for the + // [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created + // the evaluation) + // - evaluation_job.evaluation_job_run_time_end (Maximum + // threshold for the + // [evaluationJobRunTime][google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time] that created + // the evaluation) + // - evaluation_job.job_state ([EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state]) + // - annotation_spec.display_name (the Evaluation contains a + // metric for the annotation spec with this + // [displayName][google.cloud.datalabeling.v1beta1.AnnotationSpec.display_name]) + // + // To filter by multiple critiera, use the `AND` operator or the `OR` + // operator. The following examples shows a string that filters by several + // critiera: + // + // "evaluation_job.evaluation_job_id = + // {evaluation_job_id} AND evaluation_job.model_id = + // {model_name} AND + // evaluation_job.evaluation_job_run_time_start = + // {timestamp_1} AND + // evaluation_job.evaluation_job_run_time_end = + // {timestamp_2} AND annotation_spec.display_name = + // {display_name}" + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by the + // [nextPageToken][google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse.next_page_token] of the response + // to a previous search request. + // + // If you don't specify this field, the API call requests the first page of + // the search. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *SearchEvaluationsRequest) Reset() { + *x = SearchEvaluationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchEvaluationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchEvaluationsRequest) ProtoMessage() {} + +func (x *SearchEvaluationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchEvaluationsRequest.ProtoReflect.Descriptor instead. +func (*SearchEvaluationsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{31} +} + +func (x *SearchEvaluationsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *SearchEvaluationsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *SearchEvaluationsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchEvaluationsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of searching evaluations. +type SearchEvaluationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of evaluations matching the search. + Evaluations []*Evaluation `protobuf:"bytes,1,rep,name=evaluations,proto3" json:"evaluations,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *SearchEvaluationsResponse) Reset() { + *x = SearchEvaluationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchEvaluationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchEvaluationsResponse) ProtoMessage() {} + +func (x *SearchEvaluationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchEvaluationsResponse.ProtoReflect.Descriptor instead. +func (*SearchEvaluationsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{32} +} + +func (x *SearchEvaluationsResponse) GetEvaluations() []*Evaluation { + if x != nil { + return x.Evaluations + } + return nil +} + +func (x *SearchEvaluationsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message of SearchExampleComparisons. +type SearchExampleComparisonsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] resource to search for example + // comparisons from. Format: + // + // "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}" + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by the + // [nextPageToken][SearchExampleComparisons.next_page_token] of the response + // to a previous search rquest. + // + // If you don't specify this field, the API call requests the first page of + // the search. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *SearchExampleComparisonsRequest) Reset() { + *x = SearchExampleComparisonsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchExampleComparisonsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchExampleComparisonsRequest) ProtoMessage() {} + +func (x *SearchExampleComparisonsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchExampleComparisonsRequest.ProtoReflect.Descriptor instead. +func (*SearchExampleComparisonsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{33} +} + +func (x *SearchExampleComparisonsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *SearchExampleComparisonsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchExampleComparisonsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results of searching example comparisons. +type SearchExampleComparisonsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of example comparisons matching the search criteria. + ExampleComparisons []*SearchExampleComparisonsResponse_ExampleComparison `protobuf:"bytes,1,rep,name=example_comparisons,json=exampleComparisons,proto3" json:"example_comparisons,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *SearchExampleComparisonsResponse) Reset() { + *x = SearchExampleComparisonsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchExampleComparisonsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchExampleComparisonsResponse) ProtoMessage() {} + +func (x *SearchExampleComparisonsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchExampleComparisonsResponse.ProtoReflect.Descriptor instead. +func (*SearchExampleComparisonsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{34} +} + +func (x *SearchExampleComparisonsResponse) GetExampleComparisons() []*SearchExampleComparisonsResponse_ExampleComparison { + if x != nil { + return x.ExampleComparisons + } + return nil +} + +func (x *SearchExampleComparisonsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for CreateEvaluationJob. +type CreateEvaluationJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Evaluation job resource parent. Format: + // "projects/{project_id}" + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The evaluation job to create. + Job *EvaluationJob `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` +} + +func (x *CreateEvaluationJobRequest) Reset() { + *x = CreateEvaluationJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEvaluationJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEvaluationJobRequest) ProtoMessage() {} + +func (x *CreateEvaluationJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEvaluationJobRequest.ProtoReflect.Descriptor instead. +func (*CreateEvaluationJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{35} +} + +func (x *CreateEvaluationJobRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateEvaluationJobRequest) GetJob() *EvaluationJob { + if x != nil { + return x.Job + } + return nil +} + +// Request message for UpdateEvaluationJob. +type UpdateEvaluationJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Evaluation job that is going to be updated. + EvaluationJob *EvaluationJob `protobuf:"bytes,1,opt,name=evaluation_job,json=evaluationJob,proto3" json:"evaluation_job,omitempty"` + // Optional. Mask for which fields to update. You can only provide the + // following fields: + // + // * `evaluationJobConfig.humanAnnotationConfig.instruction` + // * `evaluationJobConfig.exampleCount` + // * `evaluationJobConfig.exampleSamplePercentage` + // + // You can provide more than one of these fields by separating them with + // commas. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateEvaluationJobRequest) Reset() { + *x = UpdateEvaluationJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEvaluationJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEvaluationJobRequest) ProtoMessage() {} + +func (x *UpdateEvaluationJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEvaluationJobRequest.ProtoReflect.Descriptor instead. +func (*UpdateEvaluationJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{36} +} + +func (x *UpdateEvaluationJobRequest) GetEvaluationJob() *EvaluationJob { + if x != nil { + return x.EvaluationJob + } + return nil +} + +func (x *UpdateEvaluationJobRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for GetEvaluationJob. +type GetEvaluationJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the evaluation job. Format: + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetEvaluationJobRequest) Reset() { + *x = GetEvaluationJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEvaluationJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEvaluationJobRequest) ProtoMessage() {} + +func (x *GetEvaluationJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEvaluationJobRequest.ProtoReflect.Descriptor instead. +func (*GetEvaluationJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{37} +} + +func (x *GetEvaluationJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for PauseEvaluationJob. +type PauseEvaluationJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the evaluation job that is going to be paused. Format: + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *PauseEvaluationJobRequest) Reset() { + *x = PauseEvaluationJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PauseEvaluationJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseEvaluationJobRequest) ProtoMessage() {} + +func (x *PauseEvaluationJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PauseEvaluationJobRequest.ProtoReflect.Descriptor instead. +func (*PauseEvaluationJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{38} +} + +func (x *PauseEvaluationJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message ResumeEvaluationJob. +type ResumeEvaluationJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the evaluation job that is going to be resumed. Format: + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ResumeEvaluationJobRequest) Reset() { + *x = ResumeEvaluationJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResumeEvaluationJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeEvaluationJobRequest) ProtoMessage() {} + +func (x *ResumeEvaluationJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResumeEvaluationJobRequest.ProtoReflect.Descriptor instead. +func (*ResumeEvaluationJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{39} +} + +func (x *ResumeEvaluationJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message DeleteEvaluationJob. +type DeleteEvaluationJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the evaluation job that is going to be deleted. Format: + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteEvaluationJobRequest) Reset() { + *x = DeleteEvaluationJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEvaluationJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEvaluationJobRequest) ProtoMessage() {} + +func (x *DeleteEvaluationJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEvaluationJobRequest.ProtoReflect.Descriptor instead. +func (*DeleteEvaluationJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{40} +} + +func (x *DeleteEvaluationJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for ListEvaluationJobs. +type ListEvaluationJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Evaluation job resource parent. Format: + // "projects/{project_id}" + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. You can filter the jobs to list by model_id (also known as + // model_name, as described in + // [EvaluationJob.modelVersion][google.cloud.datalabeling.v1beta1.EvaluationJob.model_version]) or by + // evaluation job state (as described in [EvaluationJob.state][google.cloud.datalabeling.v1beta1.EvaluationJob.state]). To filter + // by both criteria, use the `AND` operator or the `OR` operator. For example, + // you can use the following string for your filter: + // "evaluation_job.model_id = {model_name} AND + // evaluation_job.state = {evaluation_job_state}" + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by the + // [nextPageToken][google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse.next_page_token] in the response + // to the previous request. The request returns the first page if this is + // empty. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListEvaluationJobsRequest) Reset() { + *x = ListEvaluationJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEvaluationJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEvaluationJobsRequest) ProtoMessage() {} + +func (x *ListEvaluationJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEvaluationJobsRequest.ProtoReflect.Descriptor instead. +func (*ListEvaluationJobsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{41} +} + +func (x *ListEvaluationJobsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListEvaluationJobsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListEvaluationJobsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListEvaluationJobsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Results for listing evaluation jobs. +type ListEvaluationJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of evaluation jobs to return. + EvaluationJobs []*EvaluationJob `protobuf:"bytes,1,rep,name=evaluation_jobs,json=evaluationJobs,proto3" json:"evaluation_jobs,omitempty"` + // A token to retrieve next page of results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListEvaluationJobsResponse) Reset() { + *x = ListEvaluationJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEvaluationJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEvaluationJobsResponse) ProtoMessage() {} + +func (x *ListEvaluationJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEvaluationJobsResponse.ProtoReflect.Descriptor instead. +func (*ListEvaluationJobsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{42} +} + +func (x *ListEvaluationJobsResponse) GetEvaluationJobs() []*EvaluationJob { + if x != nil { + return x.EvaluationJobs + } + return nil +} + +func (x *ListEvaluationJobsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Example comparisons comparing ground truth output and predictions for a +// specific input. +type SearchExampleComparisonsResponse_ExampleComparison struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ground truth output for the input. + GroundTruthExample *Example `protobuf:"bytes,1,opt,name=ground_truth_example,json=groundTruthExample,proto3" json:"ground_truth_example,omitempty"` + // Predictions by the model for the input. + ModelCreatedExamples []*Example `protobuf:"bytes,2,rep,name=model_created_examples,json=modelCreatedExamples,proto3" json:"model_created_examples,omitempty"` +} + +func (x *SearchExampleComparisonsResponse_ExampleComparison) Reset() { + *x = SearchExampleComparisonsResponse_ExampleComparison{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchExampleComparisonsResponse_ExampleComparison) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchExampleComparisonsResponse_ExampleComparison) ProtoMessage() {} + +func (x *SearchExampleComparisonsResponse_ExampleComparison) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchExampleComparisonsResponse_ExampleComparison.ProtoReflect.Descriptor instead. +func (*SearchExampleComparisonsResponse_ExampleComparison) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP(), []int{34, 0} +} + +func (x *SearchExampleComparisonsResponse_ExampleComparison) GetGroundTruthExample() *Example { + if x != nil { + return x.GroundTruthExample + } + return nil +} + +func (x *SearchExampleComparisonsResponse_ExampleComparison) GetModelCreatedExamples() []*Example { + if x != nil { + return x.ModelCreatedExamples + } + return nil +} + +var File_google_cloud_datalabeling_v1beta1_data_labeling_service_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDesc = []byte{ + 0x0a, 0x3d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x14, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x49, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x54, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xc5, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, + 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x86, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x46, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x57, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, + 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x11, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xdd, 0x02, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x61, + 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2e, 0x0a, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, + 0x10, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x59, + 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xbe, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, + 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x64, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x66, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x2e, 0x0a, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, + 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0xab, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x62, 0x0a, 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x69, 0x0a, + 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2e, 0x0a, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xf5, 0x06, 0x0a, 0x11, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7e, + 0x0a, 0x1b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x19, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, + 0x0a, 0x14, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, + 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x62, 0x61, 0x73, + 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x07, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, + 0x41, 0x53, 0x53, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x4f, 0x58, 0x10, 0x02, + 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x52, 0x49, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x5f, 0x42, 0x4f, 0x55, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x42, 0x4f, 0x58, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x42, + 0x4f, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0c, + 0x0a, 0x08, 0x50, 0x4f, 0x4c, 0x59, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, + 0x53, 0x45, 0x47, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x42, 0x10, + 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0xd1, 0x06, 0x0a, 0x11, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7e, 0x0a, 0x1b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x19, 0x76, 0x69, 0x64, + 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x17, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x15, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, 0x16, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, + 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x22, 0x6c, 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x17, 0x0a, 0x13, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x41, 0x53, + 0x53, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, + 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x52, 0x41, + 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x56, 0x45, 0x4e, 0x54, + 0x10, 0x04, 0x42, 0x10, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x82, 0x05, 0x0a, 0x10, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, + 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7b, 0x0a, 0x1a, 0x74, 0x65, 0x78, + 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x18, 0x74, 0x65, + 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x1d, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x1a, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x43, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x60, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, 0x78, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x57, + 0x0a, 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x45, 0x41, + 0x54, 0x55, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, + 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, + 0x45, 0x58, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x58, 0x54, 0x52, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x10, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x71, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xc6, 0x01, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2e, 0x0a, 0x2c, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x86, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, + 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x08, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd8, + 0x01, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x69, + 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x22, 0x68, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, 0x0a, 0x2d, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb0, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x14, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x52, 0x12, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6b, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2f, + 0x0a, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x55, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x43, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x29, 0x0a, 0x27, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5f, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x29, 0x0a, 0x27, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, + 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5a, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x94, + 0x01, 0x0a, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0b, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0b, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x1f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x28, 0x0a, 0x26, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa9, 0x03, 0x0a, 0x20, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, + 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, + 0x13, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, + 0x73, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x55, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, + 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, + 0x6e, 0x52, 0x12, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, + 0x69, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0xd3, 0x01, + 0x0a, 0x11, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, + 0x73, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x14, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x72, + 0x75, 0x74, 0x68, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x12, 0x67, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x72, 0x75, 0x74, 0x68, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x12, 0x60, 0x0a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x14, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x47, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0xbc, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, + 0x62, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x60, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x19, 0x50, 0x61, 0x75, + 0x73, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x63, 0x0a, + 0x1a, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2b, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, + 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9f, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, + 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa6, 0x38, 0x0a, 0x13, 0x44, 0x61, 0x74, 0x61, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xb7, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x22, 0x25, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0xa4, 0x01, 0x0a, 0x0a, 0x47, 0x65, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xbe, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x96, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x2a, 0x25, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xf0, 0x01, 0x0a, 0x0a, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8c, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x30, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x69, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x11, 0x6e, + 0x61, 0x6d, 0x65, 0x2c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0xca, 0x41, 0x3a, 0x0a, 0x1b, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1b, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x8a, 0x02, + 0x0a, 0x0a, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xa6, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x30, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x01, 0x2a, 0xda, + 0x41, 0x2b, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2c, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x41, 0x3a, + 0x0a, 0x1b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xb3, 0x01, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x40, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0xcd, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0xd3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x48, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xed, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, + 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x51, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0xb5, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3b, 0x2a, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xed, + 0x01, 0x0a, 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x33, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x3a, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x61, 0x73, + 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x16, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xed, + 0x01, 0x0a, 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x33, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x3a, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x61, 0x73, + 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x16, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xea, + 0x01, 0x0a, 0x09, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x12, 0x33, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x88, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x3a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x3a, 0x01, 0x2a, + 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0xca, 0x41, + 0x2a, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x12, 0x16, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xca, 0x01, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x22, 0x5a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x46, 0x12, 0x44, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x0b, 0x6e, 0x61, 0x6d, + 0x65, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0xdd, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x46, 0x12, 0x44, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0xeb, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x53, 0x65, 0x74, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x22, 0x57, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x1a, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x2c, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x12, 0xcc, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, + 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x53, 0x65, 0x74, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe6, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, + 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0xda, 0x41, + 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0xb4, + 0x01, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x41, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe5, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x22, + 0x29, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x12, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0xca, 0x41, 0x28, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xb4, 0x01, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xce, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0xa2, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x2a, 0x29, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xbb, 0x01, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd7, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x88, 0x02, 0x0a, 0x18, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x73, 0x12, + 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, + 0x22, 0x4f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xcb, 0x01, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2b, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, + 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x6a, 0x6f, 0x62, 0x12, 0xf7, 0x01, 0x0a, 0x13, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x6f, 0x62, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4a, 0x6f, 0x62, 0x22, 0x6f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x32, 0x3a, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0xda, 0x41, 0x1a, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xbc, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x61, + 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x12, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xaf, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x3c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x75, 0x73, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, + 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x70, 0x61, 0x75, 0x73, 0x65, 0x3a, 0x01, 0x2a, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb2, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x3d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x32, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x13, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x6f, 0x62, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2d, 0x2a, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd6, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x3c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, + 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0xda, + 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x1a, + 0x4f, 0xca, 0x41, 0x1b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, + 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, 0x02, 0x21, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, + 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, + 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_goTypes = []interface{}{ + (LabelImageRequest_Feature)(0), // 0: google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature + (LabelVideoRequest_Feature)(0), // 1: google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature + (LabelTextRequest_Feature)(0), // 2: google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature + (*CreateDatasetRequest)(nil), // 3: google.cloud.datalabeling.v1beta1.CreateDatasetRequest + (*GetDatasetRequest)(nil), // 4: google.cloud.datalabeling.v1beta1.GetDatasetRequest + (*ListDatasetsRequest)(nil), // 5: google.cloud.datalabeling.v1beta1.ListDatasetsRequest + (*ListDatasetsResponse)(nil), // 6: google.cloud.datalabeling.v1beta1.ListDatasetsResponse + (*DeleteDatasetRequest)(nil), // 7: google.cloud.datalabeling.v1beta1.DeleteDatasetRequest + (*ImportDataRequest)(nil), // 8: google.cloud.datalabeling.v1beta1.ImportDataRequest + (*ExportDataRequest)(nil), // 9: google.cloud.datalabeling.v1beta1.ExportDataRequest + (*GetDataItemRequest)(nil), // 10: google.cloud.datalabeling.v1beta1.GetDataItemRequest + (*ListDataItemsRequest)(nil), // 11: google.cloud.datalabeling.v1beta1.ListDataItemsRequest + (*ListDataItemsResponse)(nil), // 12: google.cloud.datalabeling.v1beta1.ListDataItemsResponse + (*GetAnnotatedDatasetRequest)(nil), // 13: google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + (*ListAnnotatedDatasetsRequest)(nil), // 14: google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + (*ListAnnotatedDatasetsResponse)(nil), // 15: google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + (*DeleteAnnotatedDatasetRequest)(nil), // 16: google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + (*LabelImageRequest)(nil), // 17: google.cloud.datalabeling.v1beta1.LabelImageRequest + (*LabelVideoRequest)(nil), // 18: google.cloud.datalabeling.v1beta1.LabelVideoRequest + (*LabelTextRequest)(nil), // 19: google.cloud.datalabeling.v1beta1.LabelTextRequest + (*GetExampleRequest)(nil), // 20: google.cloud.datalabeling.v1beta1.GetExampleRequest + (*ListExamplesRequest)(nil), // 21: google.cloud.datalabeling.v1beta1.ListExamplesRequest + (*ListExamplesResponse)(nil), // 22: google.cloud.datalabeling.v1beta1.ListExamplesResponse + (*CreateAnnotationSpecSetRequest)(nil), // 23: google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + (*GetAnnotationSpecSetRequest)(nil), // 24: google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + (*ListAnnotationSpecSetsRequest)(nil), // 25: google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + (*ListAnnotationSpecSetsResponse)(nil), // 26: google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + (*DeleteAnnotationSpecSetRequest)(nil), // 27: google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + (*CreateInstructionRequest)(nil), // 28: google.cloud.datalabeling.v1beta1.CreateInstructionRequest + (*GetInstructionRequest)(nil), // 29: google.cloud.datalabeling.v1beta1.GetInstructionRequest + (*DeleteInstructionRequest)(nil), // 30: google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + (*ListInstructionsRequest)(nil), // 31: google.cloud.datalabeling.v1beta1.ListInstructionsRequest + (*ListInstructionsResponse)(nil), // 32: google.cloud.datalabeling.v1beta1.ListInstructionsResponse + (*GetEvaluationRequest)(nil), // 33: google.cloud.datalabeling.v1beta1.GetEvaluationRequest + (*SearchEvaluationsRequest)(nil), // 34: google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest + (*SearchEvaluationsResponse)(nil), // 35: google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse + (*SearchExampleComparisonsRequest)(nil), // 36: google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest + (*SearchExampleComparisonsResponse)(nil), // 37: google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse + (*CreateEvaluationJobRequest)(nil), // 38: google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest + (*UpdateEvaluationJobRequest)(nil), // 39: google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest + (*GetEvaluationJobRequest)(nil), // 40: google.cloud.datalabeling.v1beta1.GetEvaluationJobRequest + (*PauseEvaluationJobRequest)(nil), // 41: google.cloud.datalabeling.v1beta1.PauseEvaluationJobRequest + (*ResumeEvaluationJobRequest)(nil), // 42: google.cloud.datalabeling.v1beta1.ResumeEvaluationJobRequest + (*DeleteEvaluationJobRequest)(nil), // 43: google.cloud.datalabeling.v1beta1.DeleteEvaluationJobRequest + (*ListEvaluationJobsRequest)(nil), // 44: google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest + (*ListEvaluationJobsResponse)(nil), // 45: google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse + (*SearchExampleComparisonsResponse_ExampleComparison)(nil), // 46: google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse.ExampleComparison + (*Dataset)(nil), // 47: google.cloud.datalabeling.v1beta1.Dataset + (*InputConfig)(nil), // 48: google.cloud.datalabeling.v1beta1.InputConfig + (*OutputConfig)(nil), // 49: google.cloud.datalabeling.v1beta1.OutputConfig + (*DataItem)(nil), // 50: google.cloud.datalabeling.v1beta1.DataItem + (*AnnotatedDataset)(nil), // 51: google.cloud.datalabeling.v1beta1.AnnotatedDataset + (*ImageClassificationConfig)(nil), // 52: google.cloud.datalabeling.v1beta1.ImageClassificationConfig + (*BoundingPolyConfig)(nil), // 53: google.cloud.datalabeling.v1beta1.BoundingPolyConfig + (*PolylineConfig)(nil), // 54: google.cloud.datalabeling.v1beta1.PolylineConfig + (*SegmentationConfig)(nil), // 55: google.cloud.datalabeling.v1beta1.SegmentationConfig + (*HumanAnnotationConfig)(nil), // 56: google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + (*VideoClassificationConfig)(nil), // 57: google.cloud.datalabeling.v1beta1.VideoClassificationConfig + (*ObjectDetectionConfig)(nil), // 58: google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + (*ObjectTrackingConfig)(nil), // 59: google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + (*EventConfig)(nil), // 60: google.cloud.datalabeling.v1beta1.EventConfig + (*TextClassificationConfig)(nil), // 61: google.cloud.datalabeling.v1beta1.TextClassificationConfig + (*TextEntityExtractionConfig)(nil), // 62: google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + (*Example)(nil), // 63: google.cloud.datalabeling.v1beta1.Example + (*AnnotationSpecSet)(nil), // 64: google.cloud.datalabeling.v1beta1.AnnotationSpecSet + (*Instruction)(nil), // 65: google.cloud.datalabeling.v1beta1.Instruction + (*Evaluation)(nil), // 66: google.cloud.datalabeling.v1beta1.Evaluation + (*EvaluationJob)(nil), // 67: google.cloud.datalabeling.v1beta1.EvaluationJob + (*fieldmaskpb.FieldMask)(nil), // 68: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 69: google.protobuf.Empty + (*longrunning.Operation)(nil), // 70: google.longrunning.Operation +} +var file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_depIdxs = []int32{ + 47, // 0: google.cloud.datalabeling.v1beta1.CreateDatasetRequest.dataset:type_name -> google.cloud.datalabeling.v1beta1.Dataset + 47, // 1: google.cloud.datalabeling.v1beta1.ListDatasetsResponse.datasets:type_name -> google.cloud.datalabeling.v1beta1.Dataset + 48, // 2: google.cloud.datalabeling.v1beta1.ImportDataRequest.input_config:type_name -> google.cloud.datalabeling.v1beta1.InputConfig + 49, // 3: google.cloud.datalabeling.v1beta1.ExportDataRequest.output_config:type_name -> google.cloud.datalabeling.v1beta1.OutputConfig + 50, // 4: google.cloud.datalabeling.v1beta1.ListDataItemsResponse.data_items:type_name -> google.cloud.datalabeling.v1beta1.DataItem + 51, // 5: google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.annotated_datasets:type_name -> google.cloud.datalabeling.v1beta1.AnnotatedDataset + 52, // 6: google.cloud.datalabeling.v1beta1.LabelImageRequest.image_classification_config:type_name -> google.cloud.datalabeling.v1beta1.ImageClassificationConfig + 53, // 7: google.cloud.datalabeling.v1beta1.LabelImageRequest.bounding_poly_config:type_name -> google.cloud.datalabeling.v1beta1.BoundingPolyConfig + 54, // 8: google.cloud.datalabeling.v1beta1.LabelImageRequest.polyline_config:type_name -> google.cloud.datalabeling.v1beta1.PolylineConfig + 55, // 9: google.cloud.datalabeling.v1beta1.LabelImageRequest.segmentation_config:type_name -> google.cloud.datalabeling.v1beta1.SegmentationConfig + 56, // 10: google.cloud.datalabeling.v1beta1.LabelImageRequest.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 0, // 11: google.cloud.datalabeling.v1beta1.LabelImageRequest.feature:type_name -> google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature + 57, // 12: google.cloud.datalabeling.v1beta1.LabelVideoRequest.video_classification_config:type_name -> google.cloud.datalabeling.v1beta1.VideoClassificationConfig + 58, // 13: google.cloud.datalabeling.v1beta1.LabelVideoRequest.object_detection_config:type_name -> google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + 59, // 14: google.cloud.datalabeling.v1beta1.LabelVideoRequest.object_tracking_config:type_name -> google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + 60, // 15: google.cloud.datalabeling.v1beta1.LabelVideoRequest.event_config:type_name -> google.cloud.datalabeling.v1beta1.EventConfig + 56, // 16: google.cloud.datalabeling.v1beta1.LabelVideoRequest.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 1, // 17: google.cloud.datalabeling.v1beta1.LabelVideoRequest.feature:type_name -> google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature + 61, // 18: google.cloud.datalabeling.v1beta1.LabelTextRequest.text_classification_config:type_name -> google.cloud.datalabeling.v1beta1.TextClassificationConfig + 62, // 19: google.cloud.datalabeling.v1beta1.LabelTextRequest.text_entity_extraction_config:type_name -> google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + 56, // 20: google.cloud.datalabeling.v1beta1.LabelTextRequest.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 2, // 21: google.cloud.datalabeling.v1beta1.LabelTextRequest.feature:type_name -> google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature + 63, // 22: google.cloud.datalabeling.v1beta1.ListExamplesResponse.examples:type_name -> google.cloud.datalabeling.v1beta1.Example + 64, // 23: google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest.annotation_spec_set:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpecSet + 64, // 24: google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.annotation_spec_sets:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpecSet + 65, // 25: google.cloud.datalabeling.v1beta1.CreateInstructionRequest.instruction:type_name -> google.cloud.datalabeling.v1beta1.Instruction + 65, // 26: google.cloud.datalabeling.v1beta1.ListInstructionsResponse.instructions:type_name -> google.cloud.datalabeling.v1beta1.Instruction + 66, // 27: google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse.evaluations:type_name -> google.cloud.datalabeling.v1beta1.Evaluation + 46, // 28: google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse.example_comparisons:type_name -> google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse.ExampleComparison + 67, // 29: google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest.job:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJob + 67, // 30: google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest.evaluation_job:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJob + 68, // 31: google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest.update_mask:type_name -> google.protobuf.FieldMask + 67, // 32: google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse.evaluation_jobs:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJob + 63, // 33: google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse.ExampleComparison.ground_truth_example:type_name -> google.cloud.datalabeling.v1beta1.Example + 63, // 34: google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse.ExampleComparison.model_created_examples:type_name -> google.cloud.datalabeling.v1beta1.Example + 3, // 35: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateDataset:input_type -> google.cloud.datalabeling.v1beta1.CreateDatasetRequest + 4, // 36: google.cloud.datalabeling.v1beta1.DataLabelingService.GetDataset:input_type -> google.cloud.datalabeling.v1beta1.GetDatasetRequest + 5, // 37: google.cloud.datalabeling.v1beta1.DataLabelingService.ListDatasets:input_type -> google.cloud.datalabeling.v1beta1.ListDatasetsRequest + 7, // 38: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteDataset:input_type -> google.cloud.datalabeling.v1beta1.DeleteDatasetRequest + 8, // 39: google.cloud.datalabeling.v1beta1.DataLabelingService.ImportData:input_type -> google.cloud.datalabeling.v1beta1.ImportDataRequest + 9, // 40: google.cloud.datalabeling.v1beta1.DataLabelingService.ExportData:input_type -> google.cloud.datalabeling.v1beta1.ExportDataRequest + 10, // 41: google.cloud.datalabeling.v1beta1.DataLabelingService.GetDataItem:input_type -> google.cloud.datalabeling.v1beta1.GetDataItemRequest + 11, // 42: google.cloud.datalabeling.v1beta1.DataLabelingService.ListDataItems:input_type -> google.cloud.datalabeling.v1beta1.ListDataItemsRequest + 13, // 43: google.cloud.datalabeling.v1beta1.DataLabelingService.GetAnnotatedDataset:input_type -> google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + 14, // 44: google.cloud.datalabeling.v1beta1.DataLabelingService.ListAnnotatedDatasets:input_type -> google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + 16, // 45: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteAnnotatedDataset:input_type -> google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + 17, // 46: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelImage:input_type -> google.cloud.datalabeling.v1beta1.LabelImageRequest + 18, // 47: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelVideo:input_type -> google.cloud.datalabeling.v1beta1.LabelVideoRequest + 19, // 48: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelText:input_type -> google.cloud.datalabeling.v1beta1.LabelTextRequest + 20, // 49: google.cloud.datalabeling.v1beta1.DataLabelingService.GetExample:input_type -> google.cloud.datalabeling.v1beta1.GetExampleRequest + 21, // 50: google.cloud.datalabeling.v1beta1.DataLabelingService.ListExamples:input_type -> google.cloud.datalabeling.v1beta1.ListExamplesRequest + 23, // 51: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateAnnotationSpecSet:input_type -> google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + 24, // 52: google.cloud.datalabeling.v1beta1.DataLabelingService.GetAnnotationSpecSet:input_type -> google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + 25, // 53: google.cloud.datalabeling.v1beta1.DataLabelingService.ListAnnotationSpecSets:input_type -> google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + 27, // 54: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteAnnotationSpecSet:input_type -> google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + 28, // 55: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateInstruction:input_type -> google.cloud.datalabeling.v1beta1.CreateInstructionRequest + 29, // 56: google.cloud.datalabeling.v1beta1.DataLabelingService.GetInstruction:input_type -> google.cloud.datalabeling.v1beta1.GetInstructionRequest + 31, // 57: google.cloud.datalabeling.v1beta1.DataLabelingService.ListInstructions:input_type -> google.cloud.datalabeling.v1beta1.ListInstructionsRequest + 30, // 58: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteInstruction:input_type -> google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + 33, // 59: google.cloud.datalabeling.v1beta1.DataLabelingService.GetEvaluation:input_type -> google.cloud.datalabeling.v1beta1.GetEvaluationRequest + 34, // 60: google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations:input_type -> google.cloud.datalabeling.v1beta1.SearchEvaluationsRequest + 36, // 61: google.cloud.datalabeling.v1beta1.DataLabelingService.SearchExampleComparisons:input_type -> google.cloud.datalabeling.v1beta1.SearchExampleComparisonsRequest + 38, // 62: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateEvaluationJob:input_type -> google.cloud.datalabeling.v1beta1.CreateEvaluationJobRequest + 39, // 63: google.cloud.datalabeling.v1beta1.DataLabelingService.UpdateEvaluationJob:input_type -> google.cloud.datalabeling.v1beta1.UpdateEvaluationJobRequest + 40, // 64: google.cloud.datalabeling.v1beta1.DataLabelingService.GetEvaluationJob:input_type -> google.cloud.datalabeling.v1beta1.GetEvaluationJobRequest + 41, // 65: google.cloud.datalabeling.v1beta1.DataLabelingService.PauseEvaluationJob:input_type -> google.cloud.datalabeling.v1beta1.PauseEvaluationJobRequest + 42, // 66: google.cloud.datalabeling.v1beta1.DataLabelingService.ResumeEvaluationJob:input_type -> google.cloud.datalabeling.v1beta1.ResumeEvaluationJobRequest + 43, // 67: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteEvaluationJob:input_type -> google.cloud.datalabeling.v1beta1.DeleteEvaluationJobRequest + 44, // 68: google.cloud.datalabeling.v1beta1.DataLabelingService.ListEvaluationJobs:input_type -> google.cloud.datalabeling.v1beta1.ListEvaluationJobsRequest + 47, // 69: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateDataset:output_type -> google.cloud.datalabeling.v1beta1.Dataset + 47, // 70: google.cloud.datalabeling.v1beta1.DataLabelingService.GetDataset:output_type -> google.cloud.datalabeling.v1beta1.Dataset + 6, // 71: google.cloud.datalabeling.v1beta1.DataLabelingService.ListDatasets:output_type -> google.cloud.datalabeling.v1beta1.ListDatasetsResponse + 69, // 72: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteDataset:output_type -> google.protobuf.Empty + 70, // 73: google.cloud.datalabeling.v1beta1.DataLabelingService.ImportData:output_type -> google.longrunning.Operation + 70, // 74: google.cloud.datalabeling.v1beta1.DataLabelingService.ExportData:output_type -> google.longrunning.Operation + 50, // 75: google.cloud.datalabeling.v1beta1.DataLabelingService.GetDataItem:output_type -> google.cloud.datalabeling.v1beta1.DataItem + 12, // 76: google.cloud.datalabeling.v1beta1.DataLabelingService.ListDataItems:output_type -> google.cloud.datalabeling.v1beta1.ListDataItemsResponse + 51, // 77: google.cloud.datalabeling.v1beta1.DataLabelingService.GetAnnotatedDataset:output_type -> google.cloud.datalabeling.v1beta1.AnnotatedDataset + 15, // 78: google.cloud.datalabeling.v1beta1.DataLabelingService.ListAnnotatedDatasets:output_type -> google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + 69, // 79: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteAnnotatedDataset:output_type -> google.protobuf.Empty + 70, // 80: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelImage:output_type -> google.longrunning.Operation + 70, // 81: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelVideo:output_type -> google.longrunning.Operation + 70, // 82: google.cloud.datalabeling.v1beta1.DataLabelingService.LabelText:output_type -> google.longrunning.Operation + 63, // 83: google.cloud.datalabeling.v1beta1.DataLabelingService.GetExample:output_type -> google.cloud.datalabeling.v1beta1.Example + 22, // 84: google.cloud.datalabeling.v1beta1.DataLabelingService.ListExamples:output_type -> google.cloud.datalabeling.v1beta1.ListExamplesResponse + 64, // 85: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateAnnotationSpecSet:output_type -> google.cloud.datalabeling.v1beta1.AnnotationSpecSet + 64, // 86: google.cloud.datalabeling.v1beta1.DataLabelingService.GetAnnotationSpecSet:output_type -> google.cloud.datalabeling.v1beta1.AnnotationSpecSet + 26, // 87: google.cloud.datalabeling.v1beta1.DataLabelingService.ListAnnotationSpecSets:output_type -> google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + 69, // 88: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteAnnotationSpecSet:output_type -> google.protobuf.Empty + 70, // 89: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateInstruction:output_type -> google.longrunning.Operation + 65, // 90: google.cloud.datalabeling.v1beta1.DataLabelingService.GetInstruction:output_type -> google.cloud.datalabeling.v1beta1.Instruction + 32, // 91: google.cloud.datalabeling.v1beta1.DataLabelingService.ListInstructions:output_type -> google.cloud.datalabeling.v1beta1.ListInstructionsResponse + 69, // 92: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteInstruction:output_type -> google.protobuf.Empty + 66, // 93: google.cloud.datalabeling.v1beta1.DataLabelingService.GetEvaluation:output_type -> google.cloud.datalabeling.v1beta1.Evaluation + 35, // 94: google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations:output_type -> google.cloud.datalabeling.v1beta1.SearchEvaluationsResponse + 37, // 95: google.cloud.datalabeling.v1beta1.DataLabelingService.SearchExampleComparisons:output_type -> google.cloud.datalabeling.v1beta1.SearchExampleComparisonsResponse + 67, // 96: google.cloud.datalabeling.v1beta1.DataLabelingService.CreateEvaluationJob:output_type -> google.cloud.datalabeling.v1beta1.EvaluationJob + 67, // 97: google.cloud.datalabeling.v1beta1.DataLabelingService.UpdateEvaluationJob:output_type -> google.cloud.datalabeling.v1beta1.EvaluationJob + 67, // 98: google.cloud.datalabeling.v1beta1.DataLabelingService.GetEvaluationJob:output_type -> google.cloud.datalabeling.v1beta1.EvaluationJob + 69, // 99: google.cloud.datalabeling.v1beta1.DataLabelingService.PauseEvaluationJob:output_type -> google.protobuf.Empty + 69, // 100: google.cloud.datalabeling.v1beta1.DataLabelingService.ResumeEvaluationJob:output_type -> google.protobuf.Empty + 69, // 101: google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteEvaluationJob:output_type -> google.protobuf.Empty + 45, // 102: google.cloud.datalabeling.v1beta1.DataLabelingService.ListEvaluationJobs:output_type -> google.cloud.datalabeling.v1beta1.ListEvaluationJobsResponse + 69, // [69:103] is the sub-list for method output_type + 35, // [35:69] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_init() } +func file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_init() { + if File_google_cloud_datalabeling_v1beta1_data_labeling_service_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() + file_google_cloud_datalabeling_v1beta1_dataset_proto_init() + file_google_cloud_datalabeling_v1beta1_evaluation_proto_init() + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_init() + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() + file_google_cloud_datalabeling_v1beta1_instruction_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDatasetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDatasetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDataItemRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDataItemsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDataItemsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAnnotatedDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAnnotatedDatasetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAnnotatedDatasetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAnnotatedDatasetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelVideoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelTextRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetExampleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListExamplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListExamplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAnnotationSpecSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAnnotationSpecSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAnnotationSpecSetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAnnotationSpecSetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAnnotationSpecSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateInstructionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetInstructionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteInstructionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListInstructionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListInstructionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEvaluationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchEvaluationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchEvaluationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchExampleComparisonsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchExampleComparisonsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEvaluationJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEvaluationJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEvaluationJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PauseEvaluationJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResumeEvaluationJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteEvaluationJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEvaluationJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEvaluationJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchExampleComparisonsResponse_ExampleComparison); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[14].OneofWrappers = []interface{}{ + (*LabelImageRequest_ImageClassificationConfig)(nil), + (*LabelImageRequest_BoundingPolyConfig)(nil), + (*LabelImageRequest_PolylineConfig)(nil), + (*LabelImageRequest_SegmentationConfig)(nil), + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*LabelVideoRequest_VideoClassificationConfig)(nil), + (*LabelVideoRequest_ObjectDetectionConfig)(nil), + (*LabelVideoRequest_ObjectTrackingConfig)(nil), + (*LabelVideoRequest_EventConfig)(nil), + } + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes[16].OneofWrappers = []interface{}{ + (*LabelTextRequest_TextClassificationConfig)(nil), + (*LabelTextRequest_TextEntityExtractionConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDesc, + NumEnums: 3, + NumMessages: 44, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_depIdxs, + EnumInfos: file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_enumTypes, + MessageInfos: file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_data_labeling_service_proto = out.File + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_data_labeling_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DataLabelingServiceClient is the client API for DataLabelingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DataLabelingServiceClient interface { + // Creates dataset. If success return a Dataset resource. + CreateDataset(ctx context.Context, in *CreateDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) + // Gets dataset by resource name. + GetDataset(ctx context.Context, in *GetDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) + // Lists datasets under a project. Pagination is supported. + ListDatasets(ctx context.Context, in *ListDatasetsRequest, opts ...grpc.CallOption) (*ListDatasetsResponse, error) + // Deletes a dataset by resource name. + DeleteDataset(ctx context.Context, in *DeleteDatasetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Imports data into dataset based on source locations defined in request. + // It can be called multiple times for the same dataset. Each dataset can + // only have one long running operation running on it. For example, no + // labeling task (also long running operation) can be started while + // importing is still ongoing. Vice versa. + ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Exports data and annotations from dataset. + ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Gets a data item in a dataset by resource name. This API can be + // called after data are imported into dataset. + GetDataItem(ctx context.Context, in *GetDataItemRequest, opts ...grpc.CallOption) (*DataItem, error) + // Lists data items in a dataset. This API can be called after data + // are imported into dataset. Pagination is supported. + ListDataItems(ctx context.Context, in *ListDataItemsRequest, opts ...grpc.CallOption) (*ListDataItemsResponse, error) + // Gets an annotated dataset by resource name. + GetAnnotatedDataset(ctx context.Context, in *GetAnnotatedDatasetRequest, opts ...grpc.CallOption) (*AnnotatedDataset, error) + // Lists annotated datasets for a dataset. Pagination is supported. + ListAnnotatedDatasets(ctx context.Context, in *ListAnnotatedDatasetsRequest, opts ...grpc.CallOption) (*ListAnnotatedDatasetsResponse, error) + // Deletes an annotated dataset by resource name. + DeleteAnnotatedDataset(ctx context.Context, in *DeleteAnnotatedDatasetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Starts a labeling task for image. The type of image labeling task is + // configured by feature in the request. + LabelImage(ctx context.Context, in *LabelImageRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Starts a labeling task for video. The type of video labeling task is + // configured by feature in the request. + LabelVideo(ctx context.Context, in *LabelVideoRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Starts a labeling task for text. The type of text labeling task is + // configured by feature in the request. + LabelText(ctx context.Context, in *LabelTextRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Gets an example by resource name, including both data and annotation. + GetExample(ctx context.Context, in *GetExampleRequest, opts ...grpc.CallOption) (*Example, error) + // Lists examples in an annotated dataset. Pagination is supported. + ListExamples(ctx context.Context, in *ListExamplesRequest, opts ...grpc.CallOption) (*ListExamplesResponse, error) + // Creates an annotation spec set by providing a set of labels. + CreateAnnotationSpecSet(ctx context.Context, in *CreateAnnotationSpecSetRequest, opts ...grpc.CallOption) (*AnnotationSpecSet, error) + // Gets an annotation spec set by resource name. + GetAnnotationSpecSet(ctx context.Context, in *GetAnnotationSpecSetRequest, opts ...grpc.CallOption) (*AnnotationSpecSet, error) + // Lists annotation spec sets for a project. Pagination is supported. + ListAnnotationSpecSets(ctx context.Context, in *ListAnnotationSpecSetsRequest, opts ...grpc.CallOption) (*ListAnnotationSpecSetsResponse, error) + // Deletes an annotation spec set by resource name. + DeleteAnnotationSpecSet(ctx context.Context, in *DeleteAnnotationSpecSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Creates an instruction for how data should be labeled. + CreateInstruction(ctx context.Context, in *CreateInstructionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Gets an instruction by resource name. + GetInstruction(ctx context.Context, in *GetInstructionRequest, opts ...grpc.CallOption) (*Instruction, error) + // Lists instructions for a project. Pagination is supported. + ListInstructions(ctx context.Context, in *ListInstructionsRequest, opts ...grpc.CallOption) (*ListInstructionsResponse, error) + // Deletes an instruction object by resource name. + DeleteInstruction(ctx context.Context, in *DeleteInstructionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Gets an evaluation by resource name (to search, use + // [projects.evaluations.search][google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations]). + GetEvaluation(ctx context.Context, in *GetEvaluationRequest, opts ...grpc.CallOption) (*Evaluation, error) + // Searches [evaluations][google.cloud.datalabeling.v1beta1.Evaluation] within a project. + SearchEvaluations(ctx context.Context, in *SearchEvaluationsRequest, opts ...grpc.CallOption) (*SearchEvaluationsResponse, error) + // Searches example comparisons from an evaluation. The return format is a + // list of example comparisons that show ground truth and prediction(s) for + // a single input. Search by providing an evaluation ID. + SearchExampleComparisons(ctx context.Context, in *SearchExampleComparisonsRequest, opts ...grpc.CallOption) (*SearchExampleComparisonsResponse, error) + // Creates an evaluation job. + CreateEvaluationJob(ctx context.Context, in *CreateEvaluationJobRequest, opts ...grpc.CallOption) (*EvaluationJob, error) + // Updates an evaluation job. You can only update certain fields of the job's + // [EvaluationJobConfig][google.cloud.datalabeling.v1beta1.EvaluationJobConfig]: `humanAnnotationConfig.instruction`, + // `exampleCount`, and `exampleSamplePercentage`. + // + // If you want to change any other aspect of the evaluation job, you must + // delete the job and create a new one. + UpdateEvaluationJob(ctx context.Context, in *UpdateEvaluationJobRequest, opts ...grpc.CallOption) (*EvaluationJob, error) + // Gets an evaluation job by resource name. + GetEvaluationJob(ctx context.Context, in *GetEvaluationJobRequest, opts ...grpc.CallOption) (*EvaluationJob, error) + // Pauses an evaluation job. Pausing an evaluation job that is already in a + // `PAUSED` state is a no-op. + PauseEvaluationJob(ctx context.Context, in *PauseEvaluationJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Resumes a paused evaluation job. A deleted evaluation job can't be resumed. + // Resuming a running or scheduled evaluation job is a no-op. + ResumeEvaluationJob(ctx context.Context, in *ResumeEvaluationJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Stops and deletes an evaluation job. + DeleteEvaluationJob(ctx context.Context, in *DeleteEvaluationJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Lists all evaluation jobs within a project with possible filters. + // Pagination is supported. + ListEvaluationJobs(ctx context.Context, in *ListEvaluationJobsRequest, opts ...grpc.CallOption) (*ListEvaluationJobsResponse, error) +} + +type dataLabelingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDataLabelingServiceClient(cc grpc.ClientConnInterface) DataLabelingServiceClient { + return &dataLabelingServiceClient{cc} +} + +func (c *dataLabelingServiceClient) CreateDataset(ctx context.Context, in *CreateDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) { + out := new(Dataset) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetDataset(ctx context.Context, in *GetDatasetRequest, opts ...grpc.CallOption) (*Dataset, error) { + out := new(Dataset) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListDatasets(ctx context.Context, in *ListDatasetsRequest, opts ...grpc.CallOption) (*ListDatasetsResponse, error) { + out := new(ListDatasetsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListDatasets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) DeleteDataset(ctx context.Context, in *DeleteDatasetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ImportData(ctx context.Context, in *ImportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ImportData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ExportData(ctx context.Context, in *ExportDataRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ExportData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetDataItem(ctx context.Context, in *GetDataItemRequest, opts ...grpc.CallOption) (*DataItem, error) { + out := new(DataItem) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetDataItem", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListDataItems(ctx context.Context, in *ListDataItemsRequest, opts ...grpc.CallOption) (*ListDataItemsResponse, error) { + out := new(ListDataItemsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListDataItems", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetAnnotatedDataset(ctx context.Context, in *GetAnnotatedDatasetRequest, opts ...grpc.CallOption) (*AnnotatedDataset, error) { + out := new(AnnotatedDataset) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetAnnotatedDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListAnnotatedDatasets(ctx context.Context, in *ListAnnotatedDatasetsRequest, opts ...grpc.CallOption) (*ListAnnotatedDatasetsResponse, error) { + out := new(ListAnnotatedDatasetsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListAnnotatedDatasets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) DeleteAnnotatedDataset(ctx context.Context, in *DeleteAnnotatedDatasetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteAnnotatedDataset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) LabelImage(ctx context.Context, in *LabelImageRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/LabelImage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) LabelVideo(ctx context.Context, in *LabelVideoRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/LabelVideo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) LabelText(ctx context.Context, in *LabelTextRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/LabelText", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetExample(ctx context.Context, in *GetExampleRequest, opts ...grpc.CallOption) (*Example, error) { + out := new(Example) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetExample", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListExamples(ctx context.Context, in *ListExamplesRequest, opts ...grpc.CallOption) (*ListExamplesResponse, error) { + out := new(ListExamplesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListExamples", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) CreateAnnotationSpecSet(ctx context.Context, in *CreateAnnotationSpecSetRequest, opts ...grpc.CallOption) (*AnnotationSpecSet, error) { + out := new(AnnotationSpecSet) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateAnnotationSpecSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetAnnotationSpecSet(ctx context.Context, in *GetAnnotationSpecSetRequest, opts ...grpc.CallOption) (*AnnotationSpecSet, error) { + out := new(AnnotationSpecSet) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetAnnotationSpecSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListAnnotationSpecSets(ctx context.Context, in *ListAnnotationSpecSetsRequest, opts ...grpc.CallOption) (*ListAnnotationSpecSetsResponse, error) { + out := new(ListAnnotationSpecSetsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListAnnotationSpecSets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) DeleteAnnotationSpecSet(ctx context.Context, in *DeleteAnnotationSpecSetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteAnnotationSpecSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) CreateInstruction(ctx context.Context, in *CreateInstructionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateInstruction", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetInstruction(ctx context.Context, in *GetInstructionRequest, opts ...grpc.CallOption) (*Instruction, error) { + out := new(Instruction) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetInstruction", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListInstructions(ctx context.Context, in *ListInstructionsRequest, opts ...grpc.CallOption) (*ListInstructionsResponse, error) { + out := new(ListInstructionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListInstructions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) DeleteInstruction(ctx context.Context, in *DeleteInstructionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteInstruction", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetEvaluation(ctx context.Context, in *GetEvaluationRequest, opts ...grpc.CallOption) (*Evaluation, error) { + out := new(Evaluation) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetEvaluation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) SearchEvaluations(ctx context.Context, in *SearchEvaluationsRequest, opts ...grpc.CallOption) (*SearchEvaluationsResponse, error) { + out := new(SearchEvaluationsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/SearchEvaluations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) SearchExampleComparisons(ctx context.Context, in *SearchExampleComparisonsRequest, opts ...grpc.CallOption) (*SearchExampleComparisonsResponse, error) { + out := new(SearchExampleComparisonsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/SearchExampleComparisons", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) CreateEvaluationJob(ctx context.Context, in *CreateEvaluationJobRequest, opts ...grpc.CallOption) (*EvaluationJob, error) { + out := new(EvaluationJob) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateEvaluationJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) UpdateEvaluationJob(ctx context.Context, in *UpdateEvaluationJobRequest, opts ...grpc.CallOption) (*EvaluationJob, error) { + out := new(EvaluationJob) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/UpdateEvaluationJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) GetEvaluationJob(ctx context.Context, in *GetEvaluationJobRequest, opts ...grpc.CallOption) (*EvaluationJob, error) { + out := new(EvaluationJob) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetEvaluationJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) PauseEvaluationJob(ctx context.Context, in *PauseEvaluationJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/PauseEvaluationJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ResumeEvaluationJob(ctx context.Context, in *ResumeEvaluationJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ResumeEvaluationJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) DeleteEvaluationJob(ctx context.Context, in *DeleteEvaluationJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteEvaluationJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataLabelingServiceClient) ListEvaluationJobs(ctx context.Context, in *ListEvaluationJobsRequest, opts ...grpc.CallOption) (*ListEvaluationJobsResponse, error) { + out := new(ListEvaluationJobsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListEvaluationJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataLabelingServiceServer is the server API for DataLabelingService service. +type DataLabelingServiceServer interface { + // Creates dataset. If success return a Dataset resource. + CreateDataset(context.Context, *CreateDatasetRequest) (*Dataset, error) + // Gets dataset by resource name. + GetDataset(context.Context, *GetDatasetRequest) (*Dataset, error) + // Lists datasets under a project. Pagination is supported. + ListDatasets(context.Context, *ListDatasetsRequest) (*ListDatasetsResponse, error) + // Deletes a dataset by resource name. + DeleteDataset(context.Context, *DeleteDatasetRequest) (*emptypb.Empty, error) + // Imports data into dataset based on source locations defined in request. + // It can be called multiple times for the same dataset. Each dataset can + // only have one long running operation running on it. For example, no + // labeling task (also long running operation) can be started while + // importing is still ongoing. Vice versa. + ImportData(context.Context, *ImportDataRequest) (*longrunning.Operation, error) + // Exports data and annotations from dataset. + ExportData(context.Context, *ExportDataRequest) (*longrunning.Operation, error) + // Gets a data item in a dataset by resource name. This API can be + // called after data are imported into dataset. + GetDataItem(context.Context, *GetDataItemRequest) (*DataItem, error) + // Lists data items in a dataset. This API can be called after data + // are imported into dataset. Pagination is supported. + ListDataItems(context.Context, *ListDataItemsRequest) (*ListDataItemsResponse, error) + // Gets an annotated dataset by resource name. + GetAnnotatedDataset(context.Context, *GetAnnotatedDatasetRequest) (*AnnotatedDataset, error) + // Lists annotated datasets for a dataset. Pagination is supported. + ListAnnotatedDatasets(context.Context, *ListAnnotatedDatasetsRequest) (*ListAnnotatedDatasetsResponse, error) + // Deletes an annotated dataset by resource name. + DeleteAnnotatedDataset(context.Context, *DeleteAnnotatedDatasetRequest) (*emptypb.Empty, error) + // Starts a labeling task for image. The type of image labeling task is + // configured by feature in the request. + LabelImage(context.Context, *LabelImageRequest) (*longrunning.Operation, error) + // Starts a labeling task for video. The type of video labeling task is + // configured by feature in the request. + LabelVideo(context.Context, *LabelVideoRequest) (*longrunning.Operation, error) + // Starts a labeling task for text. The type of text labeling task is + // configured by feature in the request. + LabelText(context.Context, *LabelTextRequest) (*longrunning.Operation, error) + // Gets an example by resource name, including both data and annotation. + GetExample(context.Context, *GetExampleRequest) (*Example, error) + // Lists examples in an annotated dataset. Pagination is supported. + ListExamples(context.Context, *ListExamplesRequest) (*ListExamplesResponse, error) + // Creates an annotation spec set by providing a set of labels. + CreateAnnotationSpecSet(context.Context, *CreateAnnotationSpecSetRequest) (*AnnotationSpecSet, error) + // Gets an annotation spec set by resource name. + GetAnnotationSpecSet(context.Context, *GetAnnotationSpecSetRequest) (*AnnotationSpecSet, error) + // Lists annotation spec sets for a project. Pagination is supported. + ListAnnotationSpecSets(context.Context, *ListAnnotationSpecSetsRequest) (*ListAnnotationSpecSetsResponse, error) + // Deletes an annotation spec set by resource name. + DeleteAnnotationSpecSet(context.Context, *DeleteAnnotationSpecSetRequest) (*emptypb.Empty, error) + // Creates an instruction for how data should be labeled. + CreateInstruction(context.Context, *CreateInstructionRequest) (*longrunning.Operation, error) + // Gets an instruction by resource name. + GetInstruction(context.Context, *GetInstructionRequest) (*Instruction, error) + // Lists instructions for a project. Pagination is supported. + ListInstructions(context.Context, *ListInstructionsRequest) (*ListInstructionsResponse, error) + // Deletes an instruction object by resource name. + DeleteInstruction(context.Context, *DeleteInstructionRequest) (*emptypb.Empty, error) + // Gets an evaluation by resource name (to search, use + // [projects.evaluations.search][google.cloud.datalabeling.v1beta1.DataLabelingService.SearchEvaluations]). + GetEvaluation(context.Context, *GetEvaluationRequest) (*Evaluation, error) + // Searches [evaluations][google.cloud.datalabeling.v1beta1.Evaluation] within a project. + SearchEvaluations(context.Context, *SearchEvaluationsRequest) (*SearchEvaluationsResponse, error) + // Searches example comparisons from an evaluation. The return format is a + // list of example comparisons that show ground truth and prediction(s) for + // a single input. Search by providing an evaluation ID. + SearchExampleComparisons(context.Context, *SearchExampleComparisonsRequest) (*SearchExampleComparisonsResponse, error) + // Creates an evaluation job. + CreateEvaluationJob(context.Context, *CreateEvaluationJobRequest) (*EvaluationJob, error) + // Updates an evaluation job. You can only update certain fields of the job's + // [EvaluationJobConfig][google.cloud.datalabeling.v1beta1.EvaluationJobConfig]: `humanAnnotationConfig.instruction`, + // `exampleCount`, and `exampleSamplePercentage`. + // + // If you want to change any other aspect of the evaluation job, you must + // delete the job and create a new one. + UpdateEvaluationJob(context.Context, *UpdateEvaluationJobRequest) (*EvaluationJob, error) + // Gets an evaluation job by resource name. + GetEvaluationJob(context.Context, *GetEvaluationJobRequest) (*EvaluationJob, error) + // Pauses an evaluation job. Pausing an evaluation job that is already in a + // `PAUSED` state is a no-op. + PauseEvaluationJob(context.Context, *PauseEvaluationJobRequest) (*emptypb.Empty, error) + // Resumes a paused evaluation job. A deleted evaluation job can't be resumed. + // Resuming a running or scheduled evaluation job is a no-op. + ResumeEvaluationJob(context.Context, *ResumeEvaluationJobRequest) (*emptypb.Empty, error) + // Stops and deletes an evaluation job. + DeleteEvaluationJob(context.Context, *DeleteEvaluationJobRequest) (*emptypb.Empty, error) + // Lists all evaluation jobs within a project with possible filters. + // Pagination is supported. + ListEvaluationJobs(context.Context, *ListEvaluationJobsRequest) (*ListEvaluationJobsResponse, error) +} + +// UnimplementedDataLabelingServiceServer can be embedded to have forward compatible implementations. +type UnimplementedDataLabelingServiceServer struct { +} + +func (*UnimplementedDataLabelingServiceServer) CreateDataset(context.Context, *CreateDatasetRequest) (*Dataset, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDataset not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetDataset(context.Context, *GetDatasetRequest) (*Dataset, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataset not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListDatasets(context.Context, *ListDatasetsRequest) (*ListDatasetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDatasets not implemented") +} +func (*UnimplementedDataLabelingServiceServer) DeleteDataset(context.Context, *DeleteDatasetRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDataset not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ImportData(context.Context, *ImportDataRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportData not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ExportData(context.Context, *ExportDataRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportData not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetDataItem(context.Context, *GetDataItemRequest) (*DataItem, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataItem not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListDataItems(context.Context, *ListDataItemsRequest) (*ListDataItemsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDataItems not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetAnnotatedDataset(context.Context, *GetAnnotatedDatasetRequest) (*AnnotatedDataset, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAnnotatedDataset not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListAnnotatedDatasets(context.Context, *ListAnnotatedDatasetsRequest) (*ListAnnotatedDatasetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAnnotatedDatasets not implemented") +} +func (*UnimplementedDataLabelingServiceServer) DeleteAnnotatedDataset(context.Context, *DeleteAnnotatedDatasetRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAnnotatedDataset not implemented") +} +func (*UnimplementedDataLabelingServiceServer) LabelImage(context.Context, *LabelImageRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method LabelImage not implemented") +} +func (*UnimplementedDataLabelingServiceServer) LabelVideo(context.Context, *LabelVideoRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method LabelVideo not implemented") +} +func (*UnimplementedDataLabelingServiceServer) LabelText(context.Context, *LabelTextRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method LabelText not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetExample(context.Context, *GetExampleRequest) (*Example, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExample not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListExamples(context.Context, *ListExamplesRequest) (*ListExamplesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExamples not implemented") +} +func (*UnimplementedDataLabelingServiceServer) CreateAnnotationSpecSet(context.Context, *CreateAnnotationSpecSetRequest) (*AnnotationSpecSet, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAnnotationSpecSet not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetAnnotationSpecSet(context.Context, *GetAnnotationSpecSetRequest) (*AnnotationSpecSet, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAnnotationSpecSet not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListAnnotationSpecSets(context.Context, *ListAnnotationSpecSetsRequest) (*ListAnnotationSpecSetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAnnotationSpecSets not implemented") +} +func (*UnimplementedDataLabelingServiceServer) DeleteAnnotationSpecSet(context.Context, *DeleteAnnotationSpecSetRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAnnotationSpecSet not implemented") +} +func (*UnimplementedDataLabelingServiceServer) CreateInstruction(context.Context, *CreateInstructionRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateInstruction not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetInstruction(context.Context, *GetInstructionRequest) (*Instruction, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInstruction not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListInstructions(context.Context, *ListInstructionsRequest) (*ListInstructionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInstructions not implemented") +} +func (*UnimplementedDataLabelingServiceServer) DeleteInstruction(context.Context, *DeleteInstructionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteInstruction not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetEvaluation(context.Context, *GetEvaluationRequest) (*Evaluation, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEvaluation not implemented") +} +func (*UnimplementedDataLabelingServiceServer) SearchEvaluations(context.Context, *SearchEvaluationsRequest) (*SearchEvaluationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchEvaluations not implemented") +} +func (*UnimplementedDataLabelingServiceServer) SearchExampleComparisons(context.Context, *SearchExampleComparisonsRequest) (*SearchExampleComparisonsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchExampleComparisons not implemented") +} +func (*UnimplementedDataLabelingServiceServer) CreateEvaluationJob(context.Context, *CreateEvaluationJobRequest) (*EvaluationJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEvaluationJob not implemented") +} +func (*UnimplementedDataLabelingServiceServer) UpdateEvaluationJob(context.Context, *UpdateEvaluationJobRequest) (*EvaluationJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEvaluationJob not implemented") +} +func (*UnimplementedDataLabelingServiceServer) GetEvaluationJob(context.Context, *GetEvaluationJobRequest) (*EvaluationJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEvaluationJob not implemented") +} +func (*UnimplementedDataLabelingServiceServer) PauseEvaluationJob(context.Context, *PauseEvaluationJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseEvaluationJob not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ResumeEvaluationJob(context.Context, *ResumeEvaluationJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResumeEvaluationJob not implemented") +} +func (*UnimplementedDataLabelingServiceServer) DeleteEvaluationJob(context.Context, *DeleteEvaluationJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteEvaluationJob not implemented") +} +func (*UnimplementedDataLabelingServiceServer) ListEvaluationJobs(context.Context, *ListEvaluationJobsRequest) (*ListEvaluationJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEvaluationJobs not implemented") +} + +func RegisterDataLabelingServiceServer(s *grpc.Server, srv DataLabelingServiceServer) { + s.RegisterService(&_DataLabelingService_serviceDesc, srv) +} + +func _DataLabelingService_CreateDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).CreateDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).CreateDataset(ctx, req.(*CreateDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetDataset(ctx, req.(*GetDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListDatasets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDatasetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListDatasets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListDatasets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListDatasets(ctx, req.(*ListDatasetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_DeleteDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).DeleteDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).DeleteDataset(ctx, req.(*DeleteDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ImportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ImportData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ImportData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ImportData(ctx, req.(*ImportDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ExportData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ExportData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ExportData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ExportData(ctx, req.(*ExportDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetDataItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataItemRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetDataItem(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetDataItem", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetDataItem(ctx, req.(*GetDataItemRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListDataItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDataItemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListDataItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListDataItems", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListDataItems(ctx, req.(*ListDataItemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetAnnotatedDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAnnotatedDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetAnnotatedDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetAnnotatedDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetAnnotatedDataset(ctx, req.(*GetAnnotatedDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListAnnotatedDatasets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAnnotatedDatasetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListAnnotatedDatasets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListAnnotatedDatasets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListAnnotatedDatasets(ctx, req.(*ListAnnotatedDatasetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_DeleteAnnotatedDataset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAnnotatedDatasetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).DeleteAnnotatedDataset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteAnnotatedDataset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).DeleteAnnotatedDataset(ctx, req.(*DeleteAnnotatedDatasetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_LabelImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LabelImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).LabelImage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/LabelImage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).LabelImage(ctx, req.(*LabelImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_LabelVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LabelVideoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).LabelVideo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/LabelVideo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).LabelVideo(ctx, req.(*LabelVideoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_LabelText_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LabelTextRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).LabelText(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/LabelText", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).LabelText(ctx, req.(*LabelTextRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetExample_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExampleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetExample(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetExample", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetExample(ctx, req.(*GetExampleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListExamples_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExamplesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListExamples(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListExamples", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListExamples(ctx, req.(*ListExamplesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_CreateAnnotationSpecSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAnnotationSpecSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).CreateAnnotationSpecSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateAnnotationSpecSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).CreateAnnotationSpecSet(ctx, req.(*CreateAnnotationSpecSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetAnnotationSpecSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAnnotationSpecSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetAnnotationSpecSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetAnnotationSpecSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetAnnotationSpecSet(ctx, req.(*GetAnnotationSpecSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListAnnotationSpecSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAnnotationSpecSetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListAnnotationSpecSets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListAnnotationSpecSets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListAnnotationSpecSets(ctx, req.(*ListAnnotationSpecSetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_DeleteAnnotationSpecSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAnnotationSpecSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).DeleteAnnotationSpecSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteAnnotationSpecSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).DeleteAnnotationSpecSet(ctx, req.(*DeleteAnnotationSpecSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_CreateInstruction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateInstructionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).CreateInstruction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateInstruction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).CreateInstruction(ctx, req.(*CreateInstructionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetInstruction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInstructionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetInstruction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetInstruction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetInstruction(ctx, req.(*GetInstructionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListInstructions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInstructionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListInstructions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListInstructions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListInstructions(ctx, req.(*ListInstructionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_DeleteInstruction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteInstructionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).DeleteInstruction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteInstruction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).DeleteInstruction(ctx, req.(*DeleteInstructionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetEvaluation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEvaluationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetEvaluation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetEvaluation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetEvaluation(ctx, req.(*GetEvaluationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_SearchEvaluations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchEvaluationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).SearchEvaluations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/SearchEvaluations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).SearchEvaluations(ctx, req.(*SearchEvaluationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_SearchExampleComparisons_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchExampleComparisonsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).SearchExampleComparisons(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/SearchExampleComparisons", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).SearchExampleComparisons(ctx, req.(*SearchExampleComparisonsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_CreateEvaluationJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEvaluationJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).CreateEvaluationJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/CreateEvaluationJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).CreateEvaluationJob(ctx, req.(*CreateEvaluationJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_UpdateEvaluationJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEvaluationJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).UpdateEvaluationJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/UpdateEvaluationJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).UpdateEvaluationJob(ctx, req.(*UpdateEvaluationJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_GetEvaluationJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEvaluationJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).GetEvaluationJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/GetEvaluationJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).GetEvaluationJob(ctx, req.(*GetEvaluationJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_PauseEvaluationJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PauseEvaluationJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).PauseEvaluationJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/PauseEvaluationJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).PauseEvaluationJob(ctx, req.(*PauseEvaluationJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ResumeEvaluationJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResumeEvaluationJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ResumeEvaluationJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ResumeEvaluationJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ResumeEvaluationJob(ctx, req.(*ResumeEvaluationJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_DeleteEvaluationJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEvaluationJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).DeleteEvaluationJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteEvaluationJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).DeleteEvaluationJob(ctx, req.(*DeleteEvaluationJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataLabelingService_ListEvaluationJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEvaluationJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataLabelingServiceServer).ListEvaluationJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datalabeling.v1beta1.DataLabelingService/ListEvaluationJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataLabelingServiceServer).ListEvaluationJobs(ctx, req.(*ListEvaluationJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _DataLabelingService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.datalabeling.v1beta1.DataLabelingService", + HandlerType: (*DataLabelingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDataset", + Handler: _DataLabelingService_CreateDataset_Handler, + }, + { + MethodName: "GetDataset", + Handler: _DataLabelingService_GetDataset_Handler, + }, + { + MethodName: "ListDatasets", + Handler: _DataLabelingService_ListDatasets_Handler, + }, + { + MethodName: "DeleteDataset", + Handler: _DataLabelingService_DeleteDataset_Handler, + }, + { + MethodName: "ImportData", + Handler: _DataLabelingService_ImportData_Handler, + }, + { + MethodName: "ExportData", + Handler: _DataLabelingService_ExportData_Handler, + }, + { + MethodName: "GetDataItem", + Handler: _DataLabelingService_GetDataItem_Handler, + }, + { + MethodName: "ListDataItems", + Handler: _DataLabelingService_ListDataItems_Handler, + }, + { + MethodName: "GetAnnotatedDataset", + Handler: _DataLabelingService_GetAnnotatedDataset_Handler, + }, + { + MethodName: "ListAnnotatedDatasets", + Handler: _DataLabelingService_ListAnnotatedDatasets_Handler, + }, + { + MethodName: "DeleteAnnotatedDataset", + Handler: _DataLabelingService_DeleteAnnotatedDataset_Handler, + }, + { + MethodName: "LabelImage", + Handler: _DataLabelingService_LabelImage_Handler, + }, + { + MethodName: "LabelVideo", + Handler: _DataLabelingService_LabelVideo_Handler, + }, + { + MethodName: "LabelText", + Handler: _DataLabelingService_LabelText_Handler, + }, + { + MethodName: "GetExample", + Handler: _DataLabelingService_GetExample_Handler, + }, + { + MethodName: "ListExamples", + Handler: _DataLabelingService_ListExamples_Handler, + }, + { + MethodName: "CreateAnnotationSpecSet", + Handler: _DataLabelingService_CreateAnnotationSpecSet_Handler, + }, + { + MethodName: "GetAnnotationSpecSet", + Handler: _DataLabelingService_GetAnnotationSpecSet_Handler, + }, + { + MethodName: "ListAnnotationSpecSets", + Handler: _DataLabelingService_ListAnnotationSpecSets_Handler, + }, + { + MethodName: "DeleteAnnotationSpecSet", + Handler: _DataLabelingService_DeleteAnnotationSpecSet_Handler, + }, + { + MethodName: "CreateInstruction", + Handler: _DataLabelingService_CreateInstruction_Handler, + }, + { + MethodName: "GetInstruction", + Handler: _DataLabelingService_GetInstruction_Handler, + }, + { + MethodName: "ListInstructions", + Handler: _DataLabelingService_ListInstructions_Handler, + }, + { + MethodName: "DeleteInstruction", + Handler: _DataLabelingService_DeleteInstruction_Handler, + }, + { + MethodName: "GetEvaluation", + Handler: _DataLabelingService_GetEvaluation_Handler, + }, + { + MethodName: "SearchEvaluations", + Handler: _DataLabelingService_SearchEvaluations_Handler, + }, + { + MethodName: "SearchExampleComparisons", + Handler: _DataLabelingService_SearchExampleComparisons_Handler, + }, + { + MethodName: "CreateEvaluationJob", + Handler: _DataLabelingService_CreateEvaluationJob_Handler, + }, + { + MethodName: "UpdateEvaluationJob", + Handler: _DataLabelingService_UpdateEvaluationJob_Handler, + }, + { + MethodName: "GetEvaluationJob", + Handler: _DataLabelingService_GetEvaluationJob_Handler, + }, + { + MethodName: "PauseEvaluationJob", + Handler: _DataLabelingService_PauseEvaluationJob_Handler, + }, + { + MethodName: "ResumeEvaluationJob", + Handler: _DataLabelingService_ResumeEvaluationJob_Handler, + }, + { + MethodName: "DeleteEvaluationJob", + Handler: _DataLabelingService_DeleteEvaluationJob_Handler, + }, + { + MethodName: "ListEvaluationJobs", + Handler: _DataLabelingService_ListEvaluationJobs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/datalabeling/v1beta1/data_labeling_service.proto", +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go b/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go new file mode 100644 index 000000000000..f3a7009db87c --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/data_payloads.pb.go @@ -0,0 +1,474 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/data_payloads.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Container of information about an image. +type ImagePayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Image format. + MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // A byte string of a thumbnail image. + ImageThumbnail []byte `protobuf:"bytes,2,opt,name=image_thumbnail,json=imageThumbnail,proto3" json:"image_thumbnail,omitempty"` + // Image uri from the user bucket. + ImageUri string `protobuf:"bytes,3,opt,name=image_uri,json=imageUri,proto3" json:"image_uri,omitempty"` + // Signed uri of the image file in the service bucket. + SignedUri string `protobuf:"bytes,4,opt,name=signed_uri,json=signedUri,proto3" json:"signed_uri,omitempty"` +} + +func (x *ImagePayload) Reset() { + *x = ImagePayload{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImagePayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImagePayload) ProtoMessage() {} + +func (x *ImagePayload) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImagePayload.ProtoReflect.Descriptor instead. +func (*ImagePayload) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescGZIP(), []int{0} +} + +func (x *ImagePayload) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *ImagePayload) GetImageThumbnail() []byte { + if x != nil { + return x.ImageThumbnail + } + return nil +} + +func (x *ImagePayload) GetImageUri() string { + if x != nil { + return x.ImageUri + } + return "" +} + +func (x *ImagePayload) GetSignedUri() string { + if x != nil { + return x.SignedUri + } + return "" +} + +// Container of information about a piece of text. +type TextPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Text content. + TextContent string `protobuf:"bytes,1,opt,name=text_content,json=textContent,proto3" json:"text_content,omitempty"` +} + +func (x *TextPayload) Reset() { + *x = TextPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextPayload) ProtoMessage() {} + +func (x *TextPayload) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextPayload.ProtoReflect.Descriptor instead. +func (*TextPayload) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescGZIP(), []int{1} +} + +func (x *TextPayload) GetTextContent() string { + if x != nil { + return x.TextContent + } + return "" +} + +// Container of information of a video thumbnail. +type VideoThumbnail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A byte string of the video frame. + Thumbnail []byte `protobuf:"bytes,1,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"` + // Time offset relative to the beginning of the video, corresponding to the + // video frame where the thumbnail has been extracted from. + TimeOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=time_offset,json=timeOffset,proto3" json:"time_offset,omitempty"` +} + +func (x *VideoThumbnail) Reset() { + *x = VideoThumbnail{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoThumbnail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoThumbnail) ProtoMessage() {} + +func (x *VideoThumbnail) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoThumbnail.ProtoReflect.Descriptor instead. +func (*VideoThumbnail) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescGZIP(), []int{2} +} + +func (x *VideoThumbnail) GetThumbnail() []byte { + if x != nil { + return x.Thumbnail + } + return nil +} + +func (x *VideoThumbnail) GetTimeOffset() *durationpb.Duration { + if x != nil { + return x.TimeOffset + } + return nil +} + +// Container of information of a video. +type VideoPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Video format. + MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // Video uri from the user bucket. + VideoUri string `protobuf:"bytes,2,opt,name=video_uri,json=videoUri,proto3" json:"video_uri,omitempty"` + // The list of video thumbnails. + VideoThumbnails []*VideoThumbnail `protobuf:"bytes,3,rep,name=video_thumbnails,json=videoThumbnails,proto3" json:"video_thumbnails,omitempty"` + // FPS of the video. + FrameRate float32 `protobuf:"fixed32,4,opt,name=frame_rate,json=frameRate,proto3" json:"frame_rate,omitempty"` + // Signed uri of the video file in the service bucket. + SignedUri string `protobuf:"bytes,5,opt,name=signed_uri,json=signedUri,proto3" json:"signed_uri,omitempty"` +} + +func (x *VideoPayload) Reset() { + *x = VideoPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoPayload) ProtoMessage() {} + +func (x *VideoPayload) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoPayload.ProtoReflect.Descriptor instead. +func (*VideoPayload) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescGZIP(), []int{3} +} + +func (x *VideoPayload) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *VideoPayload) GetVideoUri() string { + if x != nil { + return x.VideoUri + } + return "" +} + +func (x *VideoPayload) GetVideoThumbnails() []*VideoThumbnail { + if x != nil { + return x.VideoThumbnails + } + return nil +} + +func (x *VideoPayload) GetFrameRate() float32 { + if x != nil { + return x.FrameRate + } + return 0 +} + +func (x *VideoPayload) GetSignedUri() string { + if x != nil { + return x.SignedUri + } + return "" +} + +var File_google_cloud_datalabeling_v1beta1_data_payloads_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0c, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, + 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x69, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x69, 0x22, 0x30, 0x0a, + 0x0b, 0x54, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x21, 0x0a, 0x0c, + 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x6a, 0x0a, 0x0e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, + 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x12, + 0x3a, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0xe4, 0x01, 0x0a, 0x0c, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x69, 0x64, + 0x65, 0x6f, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x55, 0x72, 0x69, 0x12, 0x5c, 0x0a, 0x10, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, + 0x61, 0x69, 0x6c, 0x52, 0x0f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x52, + 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x72, + 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, + 0x72, 0x69, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4d, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, 0x02, 0x21, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_datalabeling_v1beta1_data_payloads_proto_goTypes = []interface{}{ + (*ImagePayload)(nil), // 0: google.cloud.datalabeling.v1beta1.ImagePayload + (*TextPayload)(nil), // 1: google.cloud.datalabeling.v1beta1.TextPayload + (*VideoThumbnail)(nil), // 2: google.cloud.datalabeling.v1beta1.VideoThumbnail + (*VideoPayload)(nil), // 3: google.cloud.datalabeling.v1beta1.VideoPayload + (*durationpb.Duration)(nil), // 4: google.protobuf.Duration +} +var file_google_cloud_datalabeling_v1beta1_data_payloads_proto_depIdxs = []int32{ + 4, // 0: google.cloud.datalabeling.v1beta1.VideoThumbnail.time_offset:type_name -> google.protobuf.Duration + 2, // 1: google.cloud.datalabeling.v1beta1.VideoPayload.video_thumbnails:type_name -> google.cloud.datalabeling.v1beta1.VideoThumbnail + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_data_payloads_proto_init() } +func file_google_cloud_datalabeling_v1beta1_data_payloads_proto_init() { + if File_google_cloud_datalabeling_v1beta1_data_payloads_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImagePayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoThumbnail); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_data_payloads_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_data_payloads_proto_depIdxs, + MessageInfos: file_google_cloud_datalabeling_v1beta1_data_payloads_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_data_payloads_proto = out.File + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go b/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go new file mode 100644 index 000000000000..6fa856d79060 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/dataset.pb.go @@ -0,0 +1,2114 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DataType int32 + +const ( + DataType_DATA_TYPE_UNSPECIFIED DataType = 0 + // Allowed for continuous evaluation. + DataType_IMAGE DataType = 1 + DataType_VIDEO DataType = 2 + // Allowed for continuous evaluation. + DataType_TEXT DataType = 4 + // Allowed for continuous evaluation. + DataType_GENERAL_DATA DataType = 6 +) + +// Enum value maps for DataType. +var ( + DataType_name = map[int32]string{ + 0: "DATA_TYPE_UNSPECIFIED", + 1: "IMAGE", + 2: "VIDEO", + 4: "TEXT", + 6: "GENERAL_DATA", + } + DataType_value = map[string]int32{ + "DATA_TYPE_UNSPECIFIED": 0, + "IMAGE": 1, + "VIDEO": 2, + "TEXT": 4, + "GENERAL_DATA": 6, + } +) + +func (x DataType) Enum() *DataType { + p := new(DataType) + *p = x + return p +} + +func (x DataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_enumTypes[0].Descriptor() +} + +func (DataType) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_dataset_proto_enumTypes[0] +} + +func (x DataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataType.Descriptor instead. +func (DataType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{0} +} + +// Dataset is the resource to hold your data. You can request multiple labeling +// tasks for a dataset while each one will generate an AnnotatedDataset. +type Dataset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Dataset resource name, format is: + // projects/{project_id}/datasets/{dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The display name of the dataset. Maximum of 64 characters. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. User-provided description of the annotation specification set. + // The description can be up to 10000 characters long. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. Time the dataset is created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. This is populated with the original input configs + // where ImportData is called. It is available only after the clients + // import data to this dataset. + InputConfigs []*InputConfig `protobuf:"bytes,5,rep,name=input_configs,json=inputConfigs,proto3" json:"input_configs,omitempty"` + // Output only. The names of any related resources that are blocking changes + // to the dataset. + BlockingResources []string `protobuf:"bytes,6,rep,name=blocking_resources,json=blockingResources,proto3" json:"blocking_resources,omitempty"` + // Output only. The number of data items in the dataset. + DataItemCount int64 `protobuf:"varint,7,opt,name=data_item_count,json=dataItemCount,proto3" json:"data_item_count,omitempty"` +} + +func (x *Dataset) Reset() { + *x = Dataset{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dataset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dataset) ProtoMessage() {} + +func (x *Dataset) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dataset.ProtoReflect.Descriptor instead. +func (*Dataset) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{0} +} + +func (x *Dataset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Dataset) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Dataset) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Dataset) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Dataset) GetInputConfigs() []*InputConfig { + if x != nil { + return x.InputConfigs + } + return nil +} + +func (x *Dataset) GetBlockingResources() []string { + if x != nil { + return x.BlockingResources + } + return nil +} + +func (x *Dataset) GetDataItemCount() int64 { + if x != nil { + return x.DataItemCount + } + return 0 +} + +// The configuration of input data, including data type, location, etc. +type InputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The metadata associated with each data type. + // + // Types that are assignable to DataTypeMetadata: + // + // *InputConfig_TextMetadata + DataTypeMetadata isInputConfig_DataTypeMetadata `protobuf_oneof:"data_type_metadata"` + // Required. Where the data is from. + // + // Types that are assignable to Source: + // + // *InputConfig_GcsSource + // *InputConfig_BigquerySource + Source isInputConfig_Source `protobuf_oneof:"source"` + // Required. Data type must be specifed when user tries to import data. + DataType DataType `protobuf:"varint,1,opt,name=data_type,json=dataType,proto3,enum=google.cloud.datalabeling.v1beta1.DataType" json:"data_type,omitempty"` + // Optional. The type of annotation to be performed on this data. You must + // specify this field if you are using this InputConfig in an + // [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. + AnnotationType AnnotationType `protobuf:"varint,3,opt,name=annotation_type,json=annotationType,proto3,enum=google.cloud.datalabeling.v1beta1.AnnotationType" json:"annotation_type,omitempty"` + // Optional. Metadata about annotations for the input. You must specify this + // field if you are using this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] for a + // model version that performs classification. + ClassificationMetadata *ClassificationMetadata `protobuf:"bytes,4,opt,name=classification_metadata,json=classificationMetadata,proto3" json:"classification_metadata,omitempty"` +} + +func (x *InputConfig) Reset() { + *x = InputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputConfig) ProtoMessage() {} + +func (x *InputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputConfig.ProtoReflect.Descriptor instead. +func (*InputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{1} +} + +func (m *InputConfig) GetDataTypeMetadata() isInputConfig_DataTypeMetadata { + if m != nil { + return m.DataTypeMetadata + } + return nil +} + +func (x *InputConfig) GetTextMetadata() *TextMetadata { + if x, ok := x.GetDataTypeMetadata().(*InputConfig_TextMetadata); ok { + return x.TextMetadata + } + return nil +} + +func (m *InputConfig) GetSource() isInputConfig_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *InputConfig) GetGcsSource() *GcsSource { + if x, ok := x.GetSource().(*InputConfig_GcsSource); ok { + return x.GcsSource + } + return nil +} + +func (x *InputConfig) GetBigquerySource() *BigQuerySource { + if x, ok := x.GetSource().(*InputConfig_BigquerySource); ok { + return x.BigquerySource + } + return nil +} + +func (x *InputConfig) GetDataType() DataType { + if x != nil { + return x.DataType + } + return DataType_DATA_TYPE_UNSPECIFIED +} + +func (x *InputConfig) GetAnnotationType() AnnotationType { + if x != nil { + return x.AnnotationType + } + return AnnotationType_ANNOTATION_TYPE_UNSPECIFIED +} + +func (x *InputConfig) GetClassificationMetadata() *ClassificationMetadata { + if x != nil { + return x.ClassificationMetadata + } + return nil +} + +type isInputConfig_DataTypeMetadata interface { + isInputConfig_DataTypeMetadata() +} + +type InputConfig_TextMetadata struct { + // Required for text import, as language code must be specified. + TextMetadata *TextMetadata `protobuf:"bytes,6,opt,name=text_metadata,json=textMetadata,proto3,oneof"` +} + +func (*InputConfig_TextMetadata) isInputConfig_DataTypeMetadata() {} + +type isInputConfig_Source interface { + isInputConfig_Source() +} + +type InputConfig_GcsSource struct { + // Source located in Cloud Storage. + GcsSource *GcsSource `protobuf:"bytes,2,opt,name=gcs_source,json=gcsSource,proto3,oneof"` +} + +type InputConfig_BigquerySource struct { + // Source located in BigQuery. You must specify this field if you are using + // this InputConfig in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. + BigquerySource *BigQuerySource `protobuf:"bytes,5,opt,name=bigquery_source,json=bigquerySource,proto3,oneof"` +} + +func (*InputConfig_GcsSource) isInputConfig_Source() {} + +func (*InputConfig_BigquerySource) isInputConfig_Source() {} + +// Metadata for the text. +type TextMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The language of this text, as a + // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Default value is en-US. + LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *TextMetadata) Reset() { + *x = TextMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextMetadata) ProtoMessage() {} + +func (x *TextMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextMetadata.ProtoReflect.Descriptor instead. +func (*TextMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{2} +} + +func (x *TextMetadata) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// Metadata for classification annotations. +type ClassificationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether the classification task is multi-label or not. + IsMultiLabel bool `protobuf:"varint,1,opt,name=is_multi_label,json=isMultiLabel,proto3" json:"is_multi_label,omitempty"` +} + +func (x *ClassificationMetadata) Reset() { + *x = ClassificationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationMetadata) ProtoMessage() {} + +func (x *ClassificationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationMetadata.ProtoReflect.Descriptor instead. +func (*ClassificationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{3} +} + +func (x *ClassificationMetadata) GetIsMultiLabel() bool { + if x != nil { + return x.IsMultiLabel + } + return false +} + +// Source of the Cloud Storage file to be imported. +type GcsSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The input URI of source file. This must be a Cloud Storage path + // (`gs://...`). + InputUri string `protobuf:"bytes,1,opt,name=input_uri,json=inputUri,proto3" json:"input_uri,omitempty"` + // Required. The format of the source file. Only "text/csv" is supported. + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *GcsSource) Reset() { + *x = GcsSource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsSource) ProtoMessage() {} + +func (x *GcsSource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsSource.ProtoReflect.Descriptor instead. +func (*GcsSource) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{4} +} + +func (x *GcsSource) GetInputUri() string { + if x != nil { + return x.InputUri + } + return "" +} + +func (x *GcsSource) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +// The BigQuery location for input data. If used in an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob], this +// is where the service saves the prediction input and output sampled from the +// model version. +type BigQuerySource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. BigQuery URI to a table, up to 2,000 characters long. If you + // specify the URI of a table that does not exist, Data Labeling Service + // creates a table at the URI with the correct schema when you create your + // [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob]. If you specify the URI of a table that already exists, + // it must have the + // [correct + // schema](/ml-engine/docs/continuous-evaluation/create-job#table-schema). + // + // Provide the table URI in the following format: + // + // "bq://{your_project_id}/{your_dataset_name}/{your_table_name}" + // + // [Learn + // more](/ml-engine/docs/continuous-evaluation/create-job#table-schema). + InputUri string `protobuf:"bytes,1,opt,name=input_uri,json=inputUri,proto3" json:"input_uri,omitempty"` +} + +func (x *BigQuerySource) Reset() { + *x = BigQuerySource{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQuerySource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQuerySource) ProtoMessage() {} + +func (x *BigQuerySource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQuerySource.ProtoReflect.Descriptor instead. +func (*BigQuerySource) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{5} +} + +func (x *BigQuerySource) GetInputUri() string { + if x != nil { + return x.InputUri + } + return "" +} + +// The configuration of output data. +type OutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Location to output data to. + // + // Types that are assignable to Destination: + // + // *OutputConfig_GcsDestination + // *OutputConfig_GcsFolderDestination + Destination isOutputConfig_Destination `protobuf_oneof:"destination"` +} + +func (x *OutputConfig) Reset() { + *x = OutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputConfig) ProtoMessage() {} + +func (x *OutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead. +func (*OutputConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{6} +} + +func (m *OutputConfig) GetDestination() isOutputConfig_Destination { + if m != nil { + return m.Destination + } + return nil +} + +func (x *OutputConfig) GetGcsDestination() *GcsDestination { + if x, ok := x.GetDestination().(*OutputConfig_GcsDestination); ok { + return x.GcsDestination + } + return nil +} + +func (x *OutputConfig) GetGcsFolderDestination() *GcsFolderDestination { + if x, ok := x.GetDestination().(*OutputConfig_GcsFolderDestination); ok { + return x.GcsFolderDestination + } + return nil +} + +type isOutputConfig_Destination interface { + isOutputConfig_Destination() +} + +type OutputConfig_GcsDestination struct { + // Output to a file in Cloud Storage. Should be used for labeling output + // other than image segmentation. + GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"` +} + +type OutputConfig_GcsFolderDestination struct { + // Output to a folder in Cloud Storage. Should be used for image + // segmentation labeling output. + GcsFolderDestination *GcsFolderDestination `protobuf:"bytes,2,opt,name=gcs_folder_destination,json=gcsFolderDestination,proto3,oneof"` +} + +func (*OutputConfig_GcsDestination) isOutputConfig_Destination() {} + +func (*OutputConfig_GcsFolderDestination) isOutputConfig_Destination() {} + +// Export destination of the data.Only gcs path is allowed in +// output_uri. +type GcsDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The output uri of destination file. + OutputUri string `protobuf:"bytes,1,opt,name=output_uri,json=outputUri,proto3" json:"output_uri,omitempty"` + // Required. The format of the gcs destination. Only "text/csv" and + // "application/json" + // are supported. + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` +} + +func (x *GcsDestination) Reset() { + *x = GcsDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsDestination) ProtoMessage() {} + +func (x *GcsDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsDestination.ProtoReflect.Descriptor instead. +func (*GcsDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{7} +} + +func (x *GcsDestination) GetOutputUri() string { + if x != nil { + return x.OutputUri + } + return "" +} + +func (x *GcsDestination) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +// Export folder destination of the data. +type GcsFolderDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Cloud Storage directory to export data to. + OutputFolderUri string `protobuf:"bytes,1,opt,name=output_folder_uri,json=outputFolderUri,proto3" json:"output_folder_uri,omitempty"` +} + +func (x *GcsFolderDestination) Reset() { + *x = GcsFolderDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsFolderDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsFolderDestination) ProtoMessage() {} + +func (x *GcsFolderDestination) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsFolderDestination.ProtoReflect.Descriptor instead. +func (*GcsFolderDestination) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{8} +} + +func (x *GcsFolderDestination) GetOutputFolderUri() string { + if x != nil { + return x.OutputFolderUri + } + return "" +} + +// DataItem is a piece of data, without annotation. For example, an image. +type DataItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. + // + // Types that are assignable to Payload: + // + // *DataItem_ImagePayload + // *DataItem_TextPayload + // *DataItem_VideoPayload + Payload isDataItem_Payload `protobuf_oneof:"payload"` + // Output only. Name of the data item, in format of: + // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DataItem) Reset() { + *x = DataItem{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataItem) ProtoMessage() {} + +func (x *DataItem) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataItem.ProtoReflect.Descriptor instead. +func (*DataItem) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{9} +} + +func (m *DataItem) GetPayload() isDataItem_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (x *DataItem) GetImagePayload() *ImagePayload { + if x, ok := x.GetPayload().(*DataItem_ImagePayload); ok { + return x.ImagePayload + } + return nil +} + +func (x *DataItem) GetTextPayload() *TextPayload { + if x, ok := x.GetPayload().(*DataItem_TextPayload); ok { + return x.TextPayload + } + return nil +} + +func (x *DataItem) GetVideoPayload() *VideoPayload { + if x, ok := x.GetPayload().(*DataItem_VideoPayload); ok { + return x.VideoPayload + } + return nil +} + +func (x *DataItem) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type isDataItem_Payload interface { + isDataItem_Payload() +} + +type DataItem_ImagePayload struct { + // The image payload, a container of the image bytes/uri. + ImagePayload *ImagePayload `protobuf:"bytes,2,opt,name=image_payload,json=imagePayload,proto3,oneof"` +} + +type DataItem_TextPayload struct { + // The text payload, a container of text content. + TextPayload *TextPayload `protobuf:"bytes,3,opt,name=text_payload,json=textPayload,proto3,oneof"` +} + +type DataItem_VideoPayload struct { + // The video payload, a container of the video uri. + VideoPayload *VideoPayload `protobuf:"bytes,4,opt,name=video_payload,json=videoPayload,proto3,oneof"` +} + +func (*DataItem_ImagePayload) isDataItem_Payload() {} + +func (*DataItem_TextPayload) isDataItem_Payload() {} + +func (*DataItem_VideoPayload) isDataItem_Payload() {} + +// AnnotatedDataset is a set holding annotations for data in a Dataset. Each +// labeling task will generate an AnnotatedDataset under the Dataset that the +// task is requested for. +type AnnotatedDataset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. AnnotatedDataset resource name in format of: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The display name of the AnnotatedDataset. It is specified in + // HumanAnnotationConfig when user starts a labeling task. Maximum of 64 + // characters. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. The description of the AnnotatedDataset. It is specified in + // HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 + // characters. + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` + // Output only. Source of the annotation. + AnnotationSource AnnotationSource `protobuf:"varint,3,opt,name=annotation_source,json=annotationSource,proto3,enum=google.cloud.datalabeling.v1beta1.AnnotationSource" json:"annotation_source,omitempty"` + // Output only. Type of the annotation. It is specified when starting labeling + // task. + AnnotationType AnnotationType `protobuf:"varint,8,opt,name=annotation_type,json=annotationType,proto3,enum=google.cloud.datalabeling.v1beta1.AnnotationType" json:"annotation_type,omitempty"` + // Output only. Number of examples in the annotated dataset. + ExampleCount int64 `protobuf:"varint,4,opt,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"` + // Output only. Number of examples that have annotation in the annotated + // dataset. + CompletedExampleCount int64 `protobuf:"varint,5,opt,name=completed_example_count,json=completedExampleCount,proto3" json:"completed_example_count,omitempty"` + // Output only. Per label statistics. + LabelStats *LabelStats `protobuf:"bytes,6,opt,name=label_stats,json=labelStats,proto3" json:"label_stats,omitempty"` + // Output only. Time the AnnotatedDataset was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Additional information about AnnotatedDataset. + Metadata *AnnotatedDatasetMetadata `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Output only. The names of any related resources that are blocking changes + // to the annotated dataset. + BlockingResources []string `protobuf:"bytes,11,rep,name=blocking_resources,json=blockingResources,proto3" json:"blocking_resources,omitempty"` +} + +func (x *AnnotatedDataset) Reset() { + *x = AnnotatedDataset{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotatedDataset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotatedDataset) ProtoMessage() {} + +func (x *AnnotatedDataset) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotatedDataset.ProtoReflect.Descriptor instead. +func (*AnnotatedDataset) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{10} +} + +func (x *AnnotatedDataset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AnnotatedDataset) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *AnnotatedDataset) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AnnotatedDataset) GetAnnotationSource() AnnotationSource { + if x != nil { + return x.AnnotationSource + } + return AnnotationSource_ANNOTATION_SOURCE_UNSPECIFIED +} + +func (x *AnnotatedDataset) GetAnnotationType() AnnotationType { + if x != nil { + return x.AnnotationType + } + return AnnotationType_ANNOTATION_TYPE_UNSPECIFIED +} + +func (x *AnnotatedDataset) GetExampleCount() int64 { + if x != nil { + return x.ExampleCount + } + return 0 +} + +func (x *AnnotatedDataset) GetCompletedExampleCount() int64 { + if x != nil { + return x.CompletedExampleCount + } + return 0 +} + +func (x *AnnotatedDataset) GetLabelStats() *LabelStats { + if x != nil { + return x.LabelStats + } + return nil +} + +func (x *AnnotatedDataset) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *AnnotatedDataset) GetMetadata() *AnnotatedDatasetMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AnnotatedDataset) GetBlockingResources() []string { + if x != nil { + return x.BlockingResources + } + return nil +} + +// Statistics about annotation specs. +type LabelStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map of each annotation spec's example count. Key is the annotation spec + // name and value is the number of examples for that annotation spec. + // If the annotated dataset does not have annotation spec, the map will return + // a pair where the key is empty string and value is the total number of + // annotations. + ExampleCount map[string]int64 `protobuf:"bytes,1,rep,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *LabelStats) Reset() { + *x = LabelStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelStats) ProtoMessage() {} + +func (x *LabelStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelStats.ProtoReflect.Descriptor instead. +func (*LabelStats) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{11} +} + +func (x *LabelStats) GetExampleCount() map[string]int64 { + if x != nil { + return x.ExampleCount + } + return nil +} + +// Metadata on AnnotatedDataset. +type AnnotatedDatasetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specific request configuration used when requesting the labeling task. + // + // Types that are assignable to AnnotationRequestConfig: + // + // *AnnotatedDatasetMetadata_ImageClassificationConfig + // *AnnotatedDatasetMetadata_BoundingPolyConfig + // *AnnotatedDatasetMetadata_PolylineConfig + // *AnnotatedDatasetMetadata_SegmentationConfig + // *AnnotatedDatasetMetadata_VideoClassificationConfig + // *AnnotatedDatasetMetadata_ObjectDetectionConfig + // *AnnotatedDatasetMetadata_ObjectTrackingConfig + // *AnnotatedDatasetMetadata_EventConfig + // *AnnotatedDatasetMetadata_TextClassificationConfig + // *AnnotatedDatasetMetadata_TextEntityExtractionConfig + AnnotationRequestConfig isAnnotatedDatasetMetadata_AnnotationRequestConfig `protobuf_oneof:"annotation_request_config"` + // HumanAnnotationConfig used when requesting the human labeling task for this + // AnnotatedDataset. + HumanAnnotationConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=human_annotation_config,json=humanAnnotationConfig,proto3" json:"human_annotation_config,omitempty"` +} + +func (x *AnnotatedDatasetMetadata) Reset() { + *x = AnnotatedDatasetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotatedDatasetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotatedDatasetMetadata) ProtoMessage() {} + +func (x *AnnotatedDatasetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotatedDatasetMetadata.ProtoReflect.Descriptor instead. +func (*AnnotatedDatasetMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{12} +} + +func (m *AnnotatedDatasetMetadata) GetAnnotationRequestConfig() isAnnotatedDatasetMetadata_AnnotationRequestConfig { + if m != nil { + return m.AnnotationRequestConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetImageClassificationConfig() *ImageClassificationConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_ImageClassificationConfig); ok { + return x.ImageClassificationConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetBoundingPolyConfig() *BoundingPolyConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_BoundingPolyConfig); ok { + return x.BoundingPolyConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetPolylineConfig() *PolylineConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_PolylineConfig); ok { + return x.PolylineConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetSegmentationConfig() *SegmentationConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_SegmentationConfig); ok { + return x.SegmentationConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetVideoClassificationConfig() *VideoClassificationConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_VideoClassificationConfig); ok { + return x.VideoClassificationConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetObjectDetectionConfig() *ObjectDetectionConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_ObjectDetectionConfig); ok { + return x.ObjectDetectionConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetObjectTrackingConfig() *ObjectTrackingConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_ObjectTrackingConfig); ok { + return x.ObjectTrackingConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetEventConfig() *EventConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_EventConfig); ok { + return x.EventConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetTextClassificationConfig() *TextClassificationConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_TextClassificationConfig); ok { + return x.TextClassificationConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetTextEntityExtractionConfig() *TextEntityExtractionConfig { + if x, ok := x.GetAnnotationRequestConfig().(*AnnotatedDatasetMetadata_TextEntityExtractionConfig); ok { + return x.TextEntityExtractionConfig + } + return nil +} + +func (x *AnnotatedDatasetMetadata) GetHumanAnnotationConfig() *HumanAnnotationConfig { + if x != nil { + return x.HumanAnnotationConfig + } + return nil +} + +type isAnnotatedDatasetMetadata_AnnotationRequestConfig interface { + isAnnotatedDatasetMetadata_AnnotationRequestConfig() +} + +type AnnotatedDatasetMetadata_ImageClassificationConfig struct { + // Configuration for image classification task. + ImageClassificationConfig *ImageClassificationConfig `protobuf:"bytes,2,opt,name=image_classification_config,json=imageClassificationConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_BoundingPolyConfig struct { + // Configuration for image bounding box and bounding poly task. + BoundingPolyConfig *BoundingPolyConfig `protobuf:"bytes,3,opt,name=bounding_poly_config,json=boundingPolyConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_PolylineConfig struct { + // Configuration for image polyline task. + PolylineConfig *PolylineConfig `protobuf:"bytes,4,opt,name=polyline_config,json=polylineConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_SegmentationConfig struct { + // Configuration for image segmentation task. + SegmentationConfig *SegmentationConfig `protobuf:"bytes,5,opt,name=segmentation_config,json=segmentationConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_VideoClassificationConfig struct { + // Configuration for video classification task. + VideoClassificationConfig *VideoClassificationConfig `protobuf:"bytes,6,opt,name=video_classification_config,json=videoClassificationConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_ObjectDetectionConfig struct { + // Configuration for video object detection task. + ObjectDetectionConfig *ObjectDetectionConfig `protobuf:"bytes,7,opt,name=object_detection_config,json=objectDetectionConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_ObjectTrackingConfig struct { + // Configuration for video object tracking task. + ObjectTrackingConfig *ObjectTrackingConfig `protobuf:"bytes,8,opt,name=object_tracking_config,json=objectTrackingConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_EventConfig struct { + // Configuration for video event labeling task. + EventConfig *EventConfig `protobuf:"bytes,9,opt,name=event_config,json=eventConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_TextClassificationConfig struct { + // Configuration for text classification task. + TextClassificationConfig *TextClassificationConfig `protobuf:"bytes,10,opt,name=text_classification_config,json=textClassificationConfig,proto3,oneof"` +} + +type AnnotatedDatasetMetadata_TextEntityExtractionConfig struct { + // Configuration for text entity extraction task. + TextEntityExtractionConfig *TextEntityExtractionConfig `protobuf:"bytes,11,opt,name=text_entity_extraction_config,json=textEntityExtractionConfig,proto3,oneof"` +} + +func (*AnnotatedDatasetMetadata_ImageClassificationConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_BoundingPolyConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_PolylineConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_SegmentationConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_VideoClassificationConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_ObjectDetectionConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_ObjectTrackingConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_EventConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() {} + +func (*AnnotatedDatasetMetadata_TextClassificationConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +func (*AnnotatedDatasetMetadata_TextEntityExtractionConfig) isAnnotatedDatasetMetadata_AnnotationRequestConfig() { +} + +// An Example is a piece of data and its annotation. For example, an image with +// label "house". +type Example struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The data part of Example. + // + // Types that are assignable to Payload: + // + // *Example_ImagePayload + // *Example_TextPayload + // *Example_VideoPayload + Payload isExample_Payload `protobuf_oneof:"payload"` + // Output only. Name of the example, in format of: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id}/examples/{example_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. Annotations for the piece of data in Example. + // One piece of data can have multiple annotations. + Annotations []*Annotation `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty"` +} + +func (x *Example) Reset() { + *x = Example{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Example) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Example) ProtoMessage() {} + +func (x *Example) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Example.ProtoReflect.Descriptor instead. +func (*Example) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP(), []int{13} +} + +func (m *Example) GetPayload() isExample_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (x *Example) GetImagePayload() *ImagePayload { + if x, ok := x.GetPayload().(*Example_ImagePayload); ok { + return x.ImagePayload + } + return nil +} + +func (x *Example) GetTextPayload() *TextPayload { + if x, ok := x.GetPayload().(*Example_TextPayload); ok { + return x.TextPayload + } + return nil +} + +func (x *Example) GetVideoPayload() *VideoPayload { + if x, ok := x.GetPayload().(*Example_VideoPayload); ok { + return x.VideoPayload + } + return nil +} + +func (x *Example) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Example) GetAnnotations() []*Annotation { + if x != nil { + return x.Annotations + } + return nil +} + +type isExample_Payload interface { + isExample_Payload() +} + +type Example_ImagePayload struct { + // The image payload, a container of the image bytes/uri. + ImagePayload *ImagePayload `protobuf:"bytes,2,opt,name=image_payload,json=imagePayload,proto3,oneof"` +} + +type Example_TextPayload struct { + // The text payload, a container of the text content. + TextPayload *TextPayload `protobuf:"bytes,6,opt,name=text_payload,json=textPayload,proto3,oneof"` +} + +type Example_VideoPayload struct { + // The video payload, a container of the video uri. + VideoPayload *VideoPayload `protobuf:"bytes,7,opt,name=video_payload,json=videoPayload,proto3,oneof"` +} + +func (*Example_ImagePayload) isExample_Payload() {} + +func (*Example_TextPayload) isExample_Payload() {} + +func (*Example_VideoPayload) isExample_Payload() {} + +var File_google_cloud_datalabeling_v1beta1_dataset_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, 0x75, 0x6d, 0x61, 0x6e, + 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x03, 0x0a, 0x07, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0d, 0x69, + 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x12, 0x2d, 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x49, 0x74, + 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x4f, 0xea, 0x41, 0x4c, 0x0a, 0x23, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x12, 0x25, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x22, 0xcc, 0x04, 0x0a, 0x0b, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x0d, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x4d, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x48, 0x01, 0x52, 0x09, 0x67, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x5c, 0x0a, 0x0f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x69, 0x67, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x01, 0x52, 0x0e, 0x62, + 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x48, 0x0a, + 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, + 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x72, 0x0a, 0x17, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x16, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x0c, 0x54, 0x65, 0x78, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x3e, 0x0a, 0x16, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x45, 0x0a, 0x09, + 0x47, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x2d, 0x0a, 0x0e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x55, + 0x72, 0x69, 0x22, 0xec, 0x01, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0f, 0x67, 0x63, 0x73, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0e, 0x67, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x6f, 0x0a, 0x16, 0x67, 0x63, 0x73, 0x5f, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x67, 0x63, + 0x73, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x4c, 0x0a, 0x0e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x75, 0x72, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x55, + 0x72, 0x69, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x42, 0x0a, 0x14, 0x47, 0x63, 0x73, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x66, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, + 0x55, 0x72, 0x69, 0x22, 0x96, 0x03, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x56, 0x0a, 0x0d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x53, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, + 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x56, 0x0a, + 0x0d, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x66, 0xea, 0x41, 0x63, 0x0a, 0x24, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x3b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x74, 0x65, 0x6d, + 0x7d, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x9b, 0x06, 0x0a, + 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x11, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, + 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x12, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x7e, 0xea, 0x41, 0x7b, 0x0a, + 0x2c, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x4b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x22, 0xb3, 0x01, 0x0a, 0x0a, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x0d, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, + 0x3f, 0x0a, 0x11, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x98, 0x0a, 0x0a, 0x18, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x7e, 0x0a, + 0x1b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x48, 0x00, 0x52, 0x19, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, 0x0a, + 0x14, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x79, + 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x68, 0x0a, 0x13, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x7e, 0x0a, 0x1b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x19, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x72, 0x0a, 0x17, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x15, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, 0x16, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x14, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7b, 0x0a, 0x1a, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x18, 0x74, + 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x1d, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, + 0x52, 0x1a, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x17, + 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1b, + 0x0a, 0x19, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8a, 0x04, 0x0a, 0x07, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, + 0x00, 0x52, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x53, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x56, 0x0a, 0x0d, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x0c, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x3a, 0x89, 0x01, 0xea, 0x41, 0x85, 0x01, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x5e, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x7d, 0x42, 0x09, 0x0a, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x57, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, + 0x44, 0x45, 0x4f, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x04, 0x12, + 0x10, 0x0a, 0x0c, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, + 0x06, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4d, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, 0x02, 0x21, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0x31, + 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, + 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_dataset_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_google_cloud_datalabeling_v1beta1_dataset_proto_goTypes = []interface{}{ + (DataType)(0), // 0: google.cloud.datalabeling.v1beta1.DataType + (*Dataset)(nil), // 1: google.cloud.datalabeling.v1beta1.Dataset + (*InputConfig)(nil), // 2: google.cloud.datalabeling.v1beta1.InputConfig + (*TextMetadata)(nil), // 3: google.cloud.datalabeling.v1beta1.TextMetadata + (*ClassificationMetadata)(nil), // 4: google.cloud.datalabeling.v1beta1.ClassificationMetadata + (*GcsSource)(nil), // 5: google.cloud.datalabeling.v1beta1.GcsSource + (*BigQuerySource)(nil), // 6: google.cloud.datalabeling.v1beta1.BigQuerySource + (*OutputConfig)(nil), // 7: google.cloud.datalabeling.v1beta1.OutputConfig + (*GcsDestination)(nil), // 8: google.cloud.datalabeling.v1beta1.GcsDestination + (*GcsFolderDestination)(nil), // 9: google.cloud.datalabeling.v1beta1.GcsFolderDestination + (*DataItem)(nil), // 10: google.cloud.datalabeling.v1beta1.DataItem + (*AnnotatedDataset)(nil), // 11: google.cloud.datalabeling.v1beta1.AnnotatedDataset + (*LabelStats)(nil), // 12: google.cloud.datalabeling.v1beta1.LabelStats + (*AnnotatedDatasetMetadata)(nil), // 13: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata + (*Example)(nil), // 14: google.cloud.datalabeling.v1beta1.Example + nil, // 15: google.cloud.datalabeling.v1beta1.LabelStats.ExampleCountEntry + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (AnnotationType)(0), // 17: google.cloud.datalabeling.v1beta1.AnnotationType + (*ImagePayload)(nil), // 18: google.cloud.datalabeling.v1beta1.ImagePayload + (*TextPayload)(nil), // 19: google.cloud.datalabeling.v1beta1.TextPayload + (*VideoPayload)(nil), // 20: google.cloud.datalabeling.v1beta1.VideoPayload + (AnnotationSource)(0), // 21: google.cloud.datalabeling.v1beta1.AnnotationSource + (*ImageClassificationConfig)(nil), // 22: google.cloud.datalabeling.v1beta1.ImageClassificationConfig + (*BoundingPolyConfig)(nil), // 23: google.cloud.datalabeling.v1beta1.BoundingPolyConfig + (*PolylineConfig)(nil), // 24: google.cloud.datalabeling.v1beta1.PolylineConfig + (*SegmentationConfig)(nil), // 25: google.cloud.datalabeling.v1beta1.SegmentationConfig + (*VideoClassificationConfig)(nil), // 26: google.cloud.datalabeling.v1beta1.VideoClassificationConfig + (*ObjectDetectionConfig)(nil), // 27: google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + (*ObjectTrackingConfig)(nil), // 28: google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + (*EventConfig)(nil), // 29: google.cloud.datalabeling.v1beta1.EventConfig + (*TextClassificationConfig)(nil), // 30: google.cloud.datalabeling.v1beta1.TextClassificationConfig + (*TextEntityExtractionConfig)(nil), // 31: google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + (*HumanAnnotationConfig)(nil), // 32: google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + (*Annotation)(nil), // 33: google.cloud.datalabeling.v1beta1.Annotation +} +var file_google_cloud_datalabeling_v1beta1_dataset_proto_depIdxs = []int32{ + 16, // 0: google.cloud.datalabeling.v1beta1.Dataset.create_time:type_name -> google.protobuf.Timestamp + 2, // 1: google.cloud.datalabeling.v1beta1.Dataset.input_configs:type_name -> google.cloud.datalabeling.v1beta1.InputConfig + 3, // 2: google.cloud.datalabeling.v1beta1.InputConfig.text_metadata:type_name -> google.cloud.datalabeling.v1beta1.TextMetadata + 5, // 3: google.cloud.datalabeling.v1beta1.InputConfig.gcs_source:type_name -> google.cloud.datalabeling.v1beta1.GcsSource + 6, // 4: google.cloud.datalabeling.v1beta1.InputConfig.bigquery_source:type_name -> google.cloud.datalabeling.v1beta1.BigQuerySource + 0, // 5: google.cloud.datalabeling.v1beta1.InputConfig.data_type:type_name -> google.cloud.datalabeling.v1beta1.DataType + 17, // 6: google.cloud.datalabeling.v1beta1.InputConfig.annotation_type:type_name -> google.cloud.datalabeling.v1beta1.AnnotationType + 4, // 7: google.cloud.datalabeling.v1beta1.InputConfig.classification_metadata:type_name -> google.cloud.datalabeling.v1beta1.ClassificationMetadata + 8, // 8: google.cloud.datalabeling.v1beta1.OutputConfig.gcs_destination:type_name -> google.cloud.datalabeling.v1beta1.GcsDestination + 9, // 9: google.cloud.datalabeling.v1beta1.OutputConfig.gcs_folder_destination:type_name -> google.cloud.datalabeling.v1beta1.GcsFolderDestination + 18, // 10: google.cloud.datalabeling.v1beta1.DataItem.image_payload:type_name -> google.cloud.datalabeling.v1beta1.ImagePayload + 19, // 11: google.cloud.datalabeling.v1beta1.DataItem.text_payload:type_name -> google.cloud.datalabeling.v1beta1.TextPayload + 20, // 12: google.cloud.datalabeling.v1beta1.DataItem.video_payload:type_name -> google.cloud.datalabeling.v1beta1.VideoPayload + 21, // 13: google.cloud.datalabeling.v1beta1.AnnotatedDataset.annotation_source:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSource + 17, // 14: google.cloud.datalabeling.v1beta1.AnnotatedDataset.annotation_type:type_name -> google.cloud.datalabeling.v1beta1.AnnotationType + 12, // 15: google.cloud.datalabeling.v1beta1.AnnotatedDataset.label_stats:type_name -> google.cloud.datalabeling.v1beta1.LabelStats + 16, // 16: google.cloud.datalabeling.v1beta1.AnnotatedDataset.create_time:type_name -> google.protobuf.Timestamp + 13, // 17: google.cloud.datalabeling.v1beta1.AnnotatedDataset.metadata:type_name -> google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata + 15, // 18: google.cloud.datalabeling.v1beta1.LabelStats.example_count:type_name -> google.cloud.datalabeling.v1beta1.LabelStats.ExampleCountEntry + 22, // 19: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.image_classification_config:type_name -> google.cloud.datalabeling.v1beta1.ImageClassificationConfig + 23, // 20: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.bounding_poly_config:type_name -> google.cloud.datalabeling.v1beta1.BoundingPolyConfig + 24, // 21: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.polyline_config:type_name -> google.cloud.datalabeling.v1beta1.PolylineConfig + 25, // 22: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.segmentation_config:type_name -> google.cloud.datalabeling.v1beta1.SegmentationConfig + 26, // 23: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.video_classification_config:type_name -> google.cloud.datalabeling.v1beta1.VideoClassificationConfig + 27, // 24: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.object_detection_config:type_name -> google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + 28, // 25: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.object_tracking_config:type_name -> google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + 29, // 26: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.event_config:type_name -> google.cloud.datalabeling.v1beta1.EventConfig + 30, // 27: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.text_classification_config:type_name -> google.cloud.datalabeling.v1beta1.TextClassificationConfig + 31, // 28: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.text_entity_extraction_config:type_name -> google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + 32, // 29: google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.human_annotation_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 18, // 30: google.cloud.datalabeling.v1beta1.Example.image_payload:type_name -> google.cloud.datalabeling.v1beta1.ImagePayload + 19, // 31: google.cloud.datalabeling.v1beta1.Example.text_payload:type_name -> google.cloud.datalabeling.v1beta1.TextPayload + 20, // 32: google.cloud.datalabeling.v1beta1.Example.video_payload:type_name -> google.cloud.datalabeling.v1beta1.VideoPayload + 33, // 33: google.cloud.datalabeling.v1beta1.Example.annotations:type_name -> google.cloud.datalabeling.v1beta1.Annotation + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_dataset_proto_init() } +func file_google_cloud_datalabeling_v1beta1_dataset_proto_init() { + if File_google_cloud_datalabeling_v1beta1_dataset_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_init() + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() + file_google_cloud_datalabeling_v1beta1_data_payloads_proto_init() + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dataset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQuerySource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsFolderDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotatedDataset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotatedDatasetMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Example); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*InputConfig_TextMetadata)(nil), + (*InputConfig_GcsSource)(nil), + (*InputConfig_BigquerySource)(nil), + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*OutputConfig_GcsDestination)(nil), + (*OutputConfig_GcsFolderDestination)(nil), + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*DataItem_ImagePayload)(nil), + (*DataItem_TextPayload)(nil), + (*DataItem_VideoPayload)(nil), + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*AnnotatedDatasetMetadata_ImageClassificationConfig)(nil), + (*AnnotatedDatasetMetadata_BoundingPolyConfig)(nil), + (*AnnotatedDatasetMetadata_PolylineConfig)(nil), + (*AnnotatedDatasetMetadata_SegmentationConfig)(nil), + (*AnnotatedDatasetMetadata_VideoClassificationConfig)(nil), + (*AnnotatedDatasetMetadata_ObjectDetectionConfig)(nil), + (*AnnotatedDatasetMetadata_ObjectTrackingConfig)(nil), + (*AnnotatedDatasetMetadata_EventConfig)(nil), + (*AnnotatedDatasetMetadata_TextClassificationConfig)(nil), + (*AnnotatedDatasetMetadata_TextEntityExtractionConfig)(nil), + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*Example_ImagePayload)(nil), + (*Example_TextPayload)(nil), + (*Example_VideoPayload)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDesc, + NumEnums: 1, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_dataset_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_dataset_proto_depIdxs, + EnumInfos: file_google_cloud_datalabeling_v1beta1_dataset_proto_enumTypes, + MessageInfos: file_google_cloud_datalabeling_v1beta1_dataset_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_dataset_proto = out.File + file_google_cloud_datalabeling_v1beta1_dataset_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_dataset_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_dataset_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go b/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go new file mode 100644 index 000000000000..0270f308355d --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/evaluation.pb.go @@ -0,0 +1,1278 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/evaluation.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Describes an evaluation between a machine learning model's predictions and +// ground truth labels. Created when an [EvaluationJob][google.cloud.datalabeling.v1beta1.EvaluationJob] runs successfully. +type Evaluation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Resource name of an evaluation. The name has the following + // format: + // + // "projects/{project_id}/datasets/{dataset_id}/evaluations/{evaluation_id}' + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. Options used in the evaluation job that created this + // evaluation. + Config *EvaluationConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + // Output only. Timestamp for when the evaluation job that created this + // evaluation ran. + EvaluationJobRunTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=evaluation_job_run_time,json=evaluationJobRunTime,proto3" json:"evaluation_job_run_time,omitempty"` + // Output only. Timestamp for when this evaluation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Metrics comparing predictions to ground truth labels. + EvaluationMetrics *EvaluationMetrics `protobuf:"bytes,5,opt,name=evaluation_metrics,json=evaluationMetrics,proto3" json:"evaluation_metrics,omitempty"` + // Output only. Type of task that the model version being evaluated performs, + // as defined in the + // + // [evaluationJobConfig.inputConfig.annotationType][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config] + // field of the evaluation job that created this evaluation. + AnnotationType AnnotationType `protobuf:"varint,6,opt,name=annotation_type,json=annotationType,proto3,enum=google.cloud.datalabeling.v1beta1.AnnotationType" json:"annotation_type,omitempty"` + // Output only. The number of items in the ground truth dataset that were used + // for this evaluation. Only populated when the evaulation is for certain + // AnnotationTypes. + EvaluatedItemCount int64 `protobuf:"varint,7,opt,name=evaluated_item_count,json=evaluatedItemCount,proto3" json:"evaluated_item_count,omitempty"` +} + +func (x *Evaluation) Reset() { + *x = Evaluation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Evaluation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Evaluation) ProtoMessage() {} + +func (x *Evaluation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Evaluation.ProtoReflect.Descriptor instead. +func (*Evaluation) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{0} +} + +func (x *Evaluation) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Evaluation) GetConfig() *EvaluationConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *Evaluation) GetEvaluationJobRunTime() *timestamppb.Timestamp { + if x != nil { + return x.EvaluationJobRunTime + } + return nil +} + +func (x *Evaluation) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Evaluation) GetEvaluationMetrics() *EvaluationMetrics { + if x != nil { + return x.EvaluationMetrics + } + return nil +} + +func (x *Evaluation) GetAnnotationType() AnnotationType { + if x != nil { + return x.AnnotationType + } + return AnnotationType_ANNOTATION_TYPE_UNSPECIFIED +} + +func (x *Evaluation) GetEvaluatedItemCount() int64 { + if x != nil { + return x.EvaluatedItemCount + } + return 0 +} + +// Configuration details used for calculating evaluation metrics and creating an +// [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation]. +type EvaluationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Vertical specific options for general metrics. + // + // Types that are assignable to VerticalOption: + // + // *EvaluationConfig_BoundingBoxEvaluationOptions + VerticalOption isEvaluationConfig_VerticalOption `protobuf_oneof:"vertical_option"` +} + +func (x *EvaluationConfig) Reset() { + *x = EvaluationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvaluationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvaluationConfig) ProtoMessage() {} + +func (x *EvaluationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvaluationConfig.ProtoReflect.Descriptor instead. +func (*EvaluationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{1} +} + +func (m *EvaluationConfig) GetVerticalOption() isEvaluationConfig_VerticalOption { + if m != nil { + return m.VerticalOption + } + return nil +} + +func (x *EvaluationConfig) GetBoundingBoxEvaluationOptions() *BoundingBoxEvaluationOptions { + if x, ok := x.GetVerticalOption().(*EvaluationConfig_BoundingBoxEvaluationOptions); ok { + return x.BoundingBoxEvaluationOptions + } + return nil +} + +type isEvaluationConfig_VerticalOption interface { + isEvaluationConfig_VerticalOption() +} + +type EvaluationConfig_BoundingBoxEvaluationOptions struct { + // Only specify this field if the related model performs image object + // detection (`IMAGE_BOUNDING_BOX_ANNOTATION`). Describes how to evaluate + // bounding boxes. + BoundingBoxEvaluationOptions *BoundingBoxEvaluationOptions `protobuf:"bytes,1,opt,name=bounding_box_evaluation_options,json=boundingBoxEvaluationOptions,proto3,oneof"` +} + +func (*EvaluationConfig_BoundingBoxEvaluationOptions) isEvaluationConfig_VerticalOption() {} + +// Options regarding evaluation between bounding boxes. +type BoundingBoxEvaluationOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Minimum + // [intersection-over-union + // + // (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) + // required for 2 bounding boxes to be considered a match. This must be a + // number between 0 and 1. + IouThreshold float32 `protobuf:"fixed32,1,opt,name=iou_threshold,json=iouThreshold,proto3" json:"iou_threshold,omitempty"` +} + +func (x *BoundingBoxEvaluationOptions) Reset() { + *x = BoundingBoxEvaluationOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundingBoxEvaluationOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundingBoxEvaluationOptions) ProtoMessage() {} + +func (x *BoundingBoxEvaluationOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundingBoxEvaluationOptions.ProtoReflect.Descriptor instead. +func (*BoundingBoxEvaluationOptions) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{2} +} + +func (x *BoundingBoxEvaluationOptions) GetIouThreshold() float32 { + if x != nil { + return x.IouThreshold + } + return 0 +} + +type EvaluationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Common metrics covering most general cases. + // + // Types that are assignable to Metrics: + // + // *EvaluationMetrics_ClassificationMetrics + // *EvaluationMetrics_ObjectDetectionMetrics + Metrics isEvaluationMetrics_Metrics `protobuf_oneof:"metrics"` +} + +func (x *EvaluationMetrics) Reset() { + *x = EvaluationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvaluationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvaluationMetrics) ProtoMessage() {} + +func (x *EvaluationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvaluationMetrics.ProtoReflect.Descriptor instead. +func (*EvaluationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{3} +} + +func (m *EvaluationMetrics) GetMetrics() isEvaluationMetrics_Metrics { + if m != nil { + return m.Metrics + } + return nil +} + +func (x *EvaluationMetrics) GetClassificationMetrics() *ClassificationMetrics { + if x, ok := x.GetMetrics().(*EvaluationMetrics_ClassificationMetrics); ok { + return x.ClassificationMetrics + } + return nil +} + +func (x *EvaluationMetrics) GetObjectDetectionMetrics() *ObjectDetectionMetrics { + if x, ok := x.GetMetrics().(*EvaluationMetrics_ObjectDetectionMetrics); ok { + return x.ObjectDetectionMetrics + } + return nil +} + +type isEvaluationMetrics_Metrics interface { + isEvaluationMetrics_Metrics() +} + +type EvaluationMetrics_ClassificationMetrics struct { + ClassificationMetrics *ClassificationMetrics `protobuf:"bytes,1,opt,name=classification_metrics,json=classificationMetrics,proto3,oneof"` +} + +type EvaluationMetrics_ObjectDetectionMetrics struct { + ObjectDetectionMetrics *ObjectDetectionMetrics `protobuf:"bytes,2,opt,name=object_detection_metrics,json=objectDetectionMetrics,proto3,oneof"` +} + +func (*EvaluationMetrics_ClassificationMetrics) isEvaluationMetrics_Metrics() {} + +func (*EvaluationMetrics_ObjectDetectionMetrics) isEvaluationMetrics_Metrics() {} + +// Metrics calculated for a classification model. +type ClassificationMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Precision-recall curve based on ground truth labels, predicted labels, and + // scores for the predicted labels. + PrCurve *PrCurve `protobuf:"bytes,1,opt,name=pr_curve,json=prCurve,proto3" json:"pr_curve,omitempty"` + // Confusion matrix of predicted labels vs. ground truth labels. + ConfusionMatrix *ConfusionMatrix `protobuf:"bytes,2,opt,name=confusion_matrix,json=confusionMatrix,proto3" json:"confusion_matrix,omitempty"` +} + +func (x *ClassificationMetrics) Reset() { + *x = ClassificationMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassificationMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassificationMetrics) ProtoMessage() {} + +func (x *ClassificationMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassificationMetrics.ProtoReflect.Descriptor instead. +func (*ClassificationMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{4} +} + +func (x *ClassificationMetrics) GetPrCurve() *PrCurve { + if x != nil { + return x.PrCurve + } + return nil +} + +func (x *ClassificationMetrics) GetConfusionMatrix() *ConfusionMatrix { + if x != nil { + return x.ConfusionMatrix + } + return nil +} + +// Metrics calculated for an image object detection (bounding box) model. +type ObjectDetectionMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Precision-recall curve. + PrCurve *PrCurve `protobuf:"bytes,1,opt,name=pr_curve,json=prCurve,proto3" json:"pr_curve,omitempty"` +} + +func (x *ObjectDetectionMetrics) Reset() { + *x = ObjectDetectionMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObjectDetectionMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectDetectionMetrics) ProtoMessage() {} + +func (x *ObjectDetectionMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObjectDetectionMetrics.ProtoReflect.Descriptor instead. +func (*ObjectDetectionMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{5} +} + +func (x *ObjectDetectionMetrics) GetPrCurve() *PrCurve { + if x != nil { + return x.PrCurve + } + return nil +} + +type PrCurve struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The annotation spec of the label for which the precision-recall curve + // calculated. If this field is empty, that means the precision-recall curve + // is an aggregate curve for all labels. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` + // Area under the precision-recall curve. Not to be confused with area under + // a receiver operating characteristic (ROC) curve. + AreaUnderCurve float32 `protobuf:"fixed32,2,opt,name=area_under_curve,json=areaUnderCurve,proto3" json:"area_under_curve,omitempty"` + // Entries that make up the precision-recall graph. Each entry is a "point" on + // the graph drawn for a different `confidence_threshold`. + ConfidenceMetricsEntries []*PrCurve_ConfidenceMetricsEntry `protobuf:"bytes,3,rep,name=confidence_metrics_entries,json=confidenceMetricsEntries,proto3" json:"confidence_metrics_entries,omitempty"` + // Mean average prcision of this curve. + MeanAveragePrecision float32 `protobuf:"fixed32,4,opt,name=mean_average_precision,json=meanAveragePrecision,proto3" json:"mean_average_precision,omitempty"` +} + +func (x *PrCurve) Reset() { + *x = PrCurve{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrCurve) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrCurve) ProtoMessage() {} + +func (x *PrCurve) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrCurve.ProtoReflect.Descriptor instead. +func (*PrCurve) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{6} +} + +func (x *PrCurve) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +func (x *PrCurve) GetAreaUnderCurve() float32 { + if x != nil { + return x.AreaUnderCurve + } + return 0 +} + +func (x *PrCurve) GetConfidenceMetricsEntries() []*PrCurve_ConfidenceMetricsEntry { + if x != nil { + return x.ConfidenceMetricsEntries + } + return nil +} + +func (x *PrCurve) GetMeanAveragePrecision() float32 { + if x != nil { + return x.MeanAveragePrecision + } + return 0 +} + +// Confusion matrix of the model running the classification. Only applicable +// when the metrics entry aggregates multiple labels. Not applicable when the +// entry is for a single label. +type ConfusionMatrix struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Row []*ConfusionMatrix_Row `protobuf:"bytes,1,rep,name=row,proto3" json:"row,omitempty"` +} + +func (x *ConfusionMatrix) Reset() { + *x = ConfusionMatrix{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfusionMatrix) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfusionMatrix) ProtoMessage() {} + +func (x *ConfusionMatrix) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfusionMatrix.ProtoReflect.Descriptor instead. +func (*ConfusionMatrix) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{7} +} + +func (x *ConfusionMatrix) GetRow() []*ConfusionMatrix_Row { + if x != nil { + return x.Row + } + return nil +} + +type PrCurve_ConfidenceMetricsEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Threshold used for this entry. + // + // For classification tasks, this is a classification threshold: a + // predicted label is categorized as positive or negative (in the context of + // this point on the PR curve) based on whether the label's score meets this + // threshold. + // + // For image object detection (bounding box) tasks, this is the + // [intersection-over-union + // + // (IOU)](/vision/automl/object-detection/docs/evaluate#intersection-over-union) + // threshold for the context of this point on the PR curve. + ConfidenceThreshold float32 `protobuf:"fixed32,1,opt,name=confidence_threshold,json=confidenceThreshold,proto3" json:"confidence_threshold,omitempty"` + // Recall value. + Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"` + // Precision value. + Precision float32 `protobuf:"fixed32,3,opt,name=precision,proto3" json:"precision,omitempty"` + // Harmonic mean of recall and precision. + F1Score float32 `protobuf:"fixed32,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"` + // Recall value for entries with label that has highest score. + RecallAt1 float32 `protobuf:"fixed32,5,opt,name=recall_at1,json=recallAt1,proto3" json:"recall_at1,omitempty"` + // Precision value for entries with label that has highest score. + PrecisionAt1 float32 `protobuf:"fixed32,6,opt,name=precision_at1,json=precisionAt1,proto3" json:"precision_at1,omitempty"` + // The harmonic mean of [recall_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at1]. + F1ScoreAt1 float32 `protobuf:"fixed32,7,opt,name=f1_score_at1,json=f1ScoreAt1,proto3" json:"f1_score_at1,omitempty"` + // Recall value for entries with label that has highest 5 scores. + RecallAt5 float32 `protobuf:"fixed32,8,opt,name=recall_at5,json=recallAt5,proto3" json:"recall_at5,omitempty"` + // Precision value for entries with label that has highest 5 scores. + PrecisionAt5 float32 `protobuf:"fixed32,9,opt,name=precision_at5,json=precisionAt5,proto3" json:"precision_at5,omitempty"` + // The harmonic mean of [recall_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.recall_at5] and [precision_at5][google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry.precision_at5]. + F1ScoreAt5 float32 `protobuf:"fixed32,10,opt,name=f1_score_at5,json=f1ScoreAt5,proto3" json:"f1_score_at5,omitempty"` +} + +func (x *PrCurve_ConfidenceMetricsEntry) Reset() { + *x = PrCurve_ConfidenceMetricsEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrCurve_ConfidenceMetricsEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrCurve_ConfidenceMetricsEntry) ProtoMessage() {} + +func (x *PrCurve_ConfidenceMetricsEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrCurve_ConfidenceMetricsEntry.ProtoReflect.Descriptor instead. +func (*PrCurve_ConfidenceMetricsEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetConfidenceThreshold() float32 { + if x != nil { + return x.ConfidenceThreshold + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetRecall() float32 { + if x != nil { + return x.Recall + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetPrecision() float32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetF1Score() float32 { + if x != nil { + return x.F1Score + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetRecallAt1() float32 { + if x != nil { + return x.RecallAt1 + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetPrecisionAt1() float32 { + if x != nil { + return x.PrecisionAt1 + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetF1ScoreAt1() float32 { + if x != nil { + return x.F1ScoreAt1 + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetRecallAt5() float32 { + if x != nil { + return x.RecallAt5 + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetPrecisionAt5() float32 { + if x != nil { + return x.PrecisionAt5 + } + return 0 +} + +func (x *PrCurve_ConfidenceMetricsEntry) GetF1ScoreAt5() float32 { + if x != nil { + return x.F1ScoreAt5 + } + return 0 +} + +type ConfusionMatrix_ConfusionMatrixEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The annotation spec of a predicted label. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` + // Number of items predicted to have this label. (The ground truth label for + // these items is the `Row.annotationSpec` of this entry's parent.) + ItemCount int32 `protobuf:"varint,2,opt,name=item_count,json=itemCount,proto3" json:"item_count,omitempty"` +} + +func (x *ConfusionMatrix_ConfusionMatrixEntry) Reset() { + *x = ConfusionMatrix_ConfusionMatrixEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfusionMatrix_ConfusionMatrixEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfusionMatrix_ConfusionMatrixEntry) ProtoMessage() {} + +func (x *ConfusionMatrix_ConfusionMatrixEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfusionMatrix_ConfusionMatrixEntry.ProtoReflect.Descriptor instead. +func (*ConfusionMatrix_ConfusionMatrixEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *ConfusionMatrix_ConfusionMatrixEntry) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +func (x *ConfusionMatrix_ConfusionMatrixEntry) GetItemCount() int32 { + if x != nil { + return x.ItemCount + } + return 0 +} + +// A row in the confusion matrix. Each entry in this row has the same +// ground truth label. +type ConfusionMatrix_Row struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The annotation spec of the ground truth label for this row. + AnnotationSpec *AnnotationSpec `protobuf:"bytes,1,opt,name=annotation_spec,json=annotationSpec,proto3" json:"annotation_spec,omitempty"` + // A list of the confusion matrix entries. One entry for each possible + // predicted label. + Entries []*ConfusionMatrix_ConfusionMatrixEntry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"` +} + +func (x *ConfusionMatrix_Row) Reset() { + *x = ConfusionMatrix_Row{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfusionMatrix_Row) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfusionMatrix_Row) ProtoMessage() {} + +func (x *ConfusionMatrix_Row) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfusionMatrix_Row.ProtoReflect.Descriptor instead. +func (*ConfusionMatrix_Row) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP(), []int{7, 1} +} + +func (x *ConfusionMatrix_Row) GetAnnotationSpec() *AnnotationSpec { + if x != nil { + return x.AnnotationSpec + } + return nil +} + +func (x *ConfusionMatrix_Row) GetEntries() []*ConfusionMatrix_ConfusionMatrixEntry { + if x != nil { + return x.Entries + } + return nil +} + +var File_google_cloud_datalabeling_v1beta1_evaluation_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x04, 0x0a, 0x0a, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x17, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x14, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, + 0x52, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x12, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x11, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x64, 0x49, 0x74, + 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x6b, 0xea, 0x41, 0x68, 0x0a, 0x26, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x7d, 0x2f, 0x65, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0xb0, 0x01, 0x0a, 0x10, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x88, 0x01, 0x0a, 0x1f, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x42, 0x6f, 0x78, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x1c, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x42, 0x6f, 0x78, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x1c, 0x42, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6f, 0x75, 0x5f, 0x74, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, + 0x69, 0x6f, 0x75, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x88, 0x02, 0x0a, + 0x11, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x71, 0x0a, 0x16, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x48, 0x00, 0x52, 0x15, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x75, 0x0a, 0x18, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x48, 0x00, 0x52, 0x16, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x09, 0x0a, 0x07, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x12, 0x45, 0x0a, 0x08, 0x70, 0x72, 0x5f, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x43, 0x75, 0x72, 0x76, 0x65, 0x52, + 0x07, 0x70, 0x72, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, + 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, + 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x22, 0x5f, 0x0a, 0x16, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x12, 0x45, 0x0a, 0x08, 0x70, 0x72, 0x5f, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x43, 0x75, 0x72, 0x76, 0x65, 0x52, + 0x07, 0x70, 0x72, 0x43, 0x75, 0x72, 0x76, 0x65, 0x22, 0xb1, 0x05, 0x0a, 0x07, 0x50, 0x72, 0x43, + 0x75, 0x72, 0x76, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x28, 0x0a, 0x10, 0x61, 0x72, 0x65, 0x61, 0x5f, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x63, + 0x75, 0x72, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x61, 0x72, 0x65, 0x61, + 0x55, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, 0x7f, 0x0a, 0x1a, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x43, 0x75, 0x72, 0x76, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x18, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6d, + 0x65, 0x61, 0x6e, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x6d, 0x65, 0x61, + 0x6e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x1a, 0xe8, 0x02, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x14, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x06, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x07, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x61, 0x74, 0x31, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x41, 0x74, 0x31, 0x12, + 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x31, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x41, 0x74, 0x31, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x31, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x5f, 0x61, 0x74, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x66, 0x31, 0x53, 0x63, + 0x6f, 0x72, 0x65, 0x41, 0x74, 0x31, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x61, 0x6c, 0x6c, + 0x5f, 0x61, 0x74, 0x35, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x72, 0x65, 0x63, 0x61, + 0x6c, 0x6c, 0x41, 0x74, 0x35, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x35, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x35, 0x12, 0x20, 0x0a, 0x0c, 0x66, 0x31, + 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x74, 0x35, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x0a, 0x66, 0x31, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x41, 0x74, 0x35, 0x22, 0xb6, 0x03, 0x0a, + 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, + 0x12, 0x48, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x03, 0x72, 0x6f, 0x77, 0x1a, 0x91, 0x01, 0x0a, 0x14, 0x43, + 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, + 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xc4, + 0x01, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x5a, 0x0a, 0x0f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x52, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x61, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x75, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, + 0x01, 0x5a, 0x4d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0xaa, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_google_cloud_datalabeling_v1beta1_evaluation_proto_goTypes = []interface{}{ + (*Evaluation)(nil), // 0: google.cloud.datalabeling.v1beta1.Evaluation + (*EvaluationConfig)(nil), // 1: google.cloud.datalabeling.v1beta1.EvaluationConfig + (*BoundingBoxEvaluationOptions)(nil), // 2: google.cloud.datalabeling.v1beta1.BoundingBoxEvaluationOptions + (*EvaluationMetrics)(nil), // 3: google.cloud.datalabeling.v1beta1.EvaluationMetrics + (*ClassificationMetrics)(nil), // 4: google.cloud.datalabeling.v1beta1.ClassificationMetrics + (*ObjectDetectionMetrics)(nil), // 5: google.cloud.datalabeling.v1beta1.ObjectDetectionMetrics + (*PrCurve)(nil), // 6: google.cloud.datalabeling.v1beta1.PrCurve + (*ConfusionMatrix)(nil), // 7: google.cloud.datalabeling.v1beta1.ConfusionMatrix + (*PrCurve_ConfidenceMetricsEntry)(nil), // 8: google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry + (*ConfusionMatrix_ConfusionMatrixEntry)(nil), // 9: google.cloud.datalabeling.v1beta1.ConfusionMatrix.ConfusionMatrixEntry + (*ConfusionMatrix_Row)(nil), // 10: google.cloud.datalabeling.v1beta1.ConfusionMatrix.Row + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (AnnotationType)(0), // 12: google.cloud.datalabeling.v1beta1.AnnotationType + (*AnnotationSpec)(nil), // 13: google.cloud.datalabeling.v1beta1.AnnotationSpec +} +var file_google_cloud_datalabeling_v1beta1_evaluation_proto_depIdxs = []int32{ + 1, // 0: google.cloud.datalabeling.v1beta1.Evaluation.config:type_name -> google.cloud.datalabeling.v1beta1.EvaluationConfig + 11, // 1: google.cloud.datalabeling.v1beta1.Evaluation.evaluation_job_run_time:type_name -> google.protobuf.Timestamp + 11, // 2: google.cloud.datalabeling.v1beta1.Evaluation.create_time:type_name -> google.protobuf.Timestamp + 3, // 3: google.cloud.datalabeling.v1beta1.Evaluation.evaluation_metrics:type_name -> google.cloud.datalabeling.v1beta1.EvaluationMetrics + 12, // 4: google.cloud.datalabeling.v1beta1.Evaluation.annotation_type:type_name -> google.cloud.datalabeling.v1beta1.AnnotationType + 2, // 5: google.cloud.datalabeling.v1beta1.EvaluationConfig.bounding_box_evaluation_options:type_name -> google.cloud.datalabeling.v1beta1.BoundingBoxEvaluationOptions + 4, // 6: google.cloud.datalabeling.v1beta1.EvaluationMetrics.classification_metrics:type_name -> google.cloud.datalabeling.v1beta1.ClassificationMetrics + 5, // 7: google.cloud.datalabeling.v1beta1.EvaluationMetrics.object_detection_metrics:type_name -> google.cloud.datalabeling.v1beta1.ObjectDetectionMetrics + 6, // 8: google.cloud.datalabeling.v1beta1.ClassificationMetrics.pr_curve:type_name -> google.cloud.datalabeling.v1beta1.PrCurve + 7, // 9: google.cloud.datalabeling.v1beta1.ClassificationMetrics.confusion_matrix:type_name -> google.cloud.datalabeling.v1beta1.ConfusionMatrix + 6, // 10: google.cloud.datalabeling.v1beta1.ObjectDetectionMetrics.pr_curve:type_name -> google.cloud.datalabeling.v1beta1.PrCurve + 13, // 11: google.cloud.datalabeling.v1beta1.PrCurve.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 8, // 12: google.cloud.datalabeling.v1beta1.PrCurve.confidence_metrics_entries:type_name -> google.cloud.datalabeling.v1beta1.PrCurve.ConfidenceMetricsEntry + 10, // 13: google.cloud.datalabeling.v1beta1.ConfusionMatrix.row:type_name -> google.cloud.datalabeling.v1beta1.ConfusionMatrix.Row + 13, // 14: google.cloud.datalabeling.v1beta1.ConfusionMatrix.ConfusionMatrixEntry.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 13, // 15: google.cloud.datalabeling.v1beta1.ConfusionMatrix.Row.annotation_spec:type_name -> google.cloud.datalabeling.v1beta1.AnnotationSpec + 9, // 16: google.cloud.datalabeling.v1beta1.ConfusionMatrix.Row.entries:type_name -> google.cloud.datalabeling.v1beta1.ConfusionMatrix.ConfusionMatrixEntry + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_evaluation_proto_init() } +func file_google_cloud_datalabeling_v1beta1_evaluation_proto_init() { + if File_google_cloud_datalabeling_v1beta1_evaluation_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_annotation_proto_init() + file_google_cloud_datalabeling_v1beta1_annotation_spec_set_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Evaluation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvaluationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundingBoxEvaluationOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvaluationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassificationMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectDetectionMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrCurve); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfusionMatrix); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrCurve_ConfidenceMetricsEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfusionMatrix_ConfusionMatrixEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfusionMatrix_Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*EvaluationConfig_BoundingBoxEvaluationOptions)(nil), + } + file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*EvaluationMetrics_ClassificationMetrics)(nil), + (*EvaluationMetrics_ObjectDetectionMetrics)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_evaluation_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_evaluation_proto_depIdxs, + MessageInfos: file_google_cloud_datalabeling_v1beta1_evaluation_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_evaluation_proto = out.File + file_google_cloud_datalabeling_v1beta1_evaluation_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_evaluation_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_evaluation_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go b/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go new file mode 100644 index 000000000000..fc7626adb0e8 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/evaluation_job.pb.go @@ -0,0 +1,958 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/evaluation_job.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// State of the job. +type EvaluationJob_State int32 + +const ( + EvaluationJob_STATE_UNSPECIFIED EvaluationJob_State = 0 + // The job is scheduled to run at the [configured interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. You + // can [pause][google.cloud.datalabeling.v1beta1.DataLabelingService.PauseEvaluationJob] or + // [delete][google.cloud.datalabeling.v1beta1.DataLabelingService.DeleteEvaluationJob] the job. + // + // When the job is in this state, it samples prediction input and output + // from your model version into your BigQuery table as predictions occur. + EvaluationJob_SCHEDULED EvaluationJob_State = 1 + // The job is currently running. When the job runs, Data Labeling Service + // does several things: + // + // 1. If you have configured your job to use Data Labeling Service for + // ground truth labeling, the service creates a + // [Dataset][google.cloud.datalabeling.v1beta1.Dataset] and a labeling task for all data sampled + // since the last time the job ran. Human labelers provide ground truth + // labels for your data. Human labeling may take hours, or even days, + // depending on how much data has been sampled. The job remains in the + // `RUNNING` state during this time, and it can even be running multiple + // times in parallel if it gets triggered again (for example 24 hours + // later) before the earlier run has completed. When human labelers have + // finished labeling the data, the next step occurs. + //

+ // If you have configured your job to provide your own ground truth + // labels, Data Labeling Service still creates a [Dataset][google.cloud.datalabeling.v1beta1.Dataset] for newly + // sampled data, but it expects that you have already added ground truth + // labels to the BigQuery table by this time. The next step occurs + // immediately. + // + // 2. Data Labeling Service creates an [Evaluation][google.cloud.datalabeling.v1beta1.Evaluation] by comparing your + // model version's predictions with the ground truth labels. + // + // If the job remains in this state for a long time, it continues to sample + // prediction data into your BigQuery table and will run again at the next + // interval, even if it causes the job to run multiple times in parallel. + EvaluationJob_RUNNING EvaluationJob_State = 2 + // The job is not sampling prediction input and output into your BigQuery + // table and it will not run according to its schedule. You can + // [resume][google.cloud.datalabeling.v1beta1.DataLabelingService.ResumeEvaluationJob] the job. + EvaluationJob_PAUSED EvaluationJob_State = 3 + // The job has this state right before it is deleted. + EvaluationJob_STOPPED EvaluationJob_State = 4 +) + +// Enum value maps for EvaluationJob_State. +var ( + EvaluationJob_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "SCHEDULED", + 2: "RUNNING", + 3: "PAUSED", + 4: "STOPPED", + } + EvaluationJob_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "RUNNING": 2, + "PAUSED": 3, + "STOPPED": 4, + } +) + +func (x EvaluationJob_State) Enum() *EvaluationJob_State { + p := new(EvaluationJob_State) + *p = x + return p +} + +func (x EvaluationJob_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EvaluationJob_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_enumTypes[0].Descriptor() +} + +func (EvaluationJob_State) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_enumTypes[0] +} + +func (x EvaluationJob_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EvaluationJob_State.Descriptor instead. +func (EvaluationJob_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescGZIP(), []int{0, 0} +} + +// Defines an evaluation job that runs periodically to generate +// [Evaluations][google.cloud.datalabeling.v1beta1.Evaluation]. [Creating an evaluation +// job](/ml-engine/docs/continuous-evaluation/create-job) is the starting point +// for using continuous evaluation. +type EvaluationJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. After you create a job, Data Labeling Service assigns a name + // to the job with the following format: + // + // "projects/{project_id}/evaluationJobs/{evaluation_job_id}" + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Description of the job. The description can be up to 25,000 + // characters long. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Output only. Describes the current state of the job. + State EvaluationJob_State `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.datalabeling.v1beta1.EvaluationJob_State" json:"state,omitempty"` + // Required. Describes the interval at which the job runs. This interval must + // be at least 1 day, and it is rounded to the nearest day. For example, if + // you specify a 50-hour interval, the job runs every 2 days. + // + // You can provide the schedule in + // [crontab format](/scheduler/docs/configuring/cron-job-schedules) or in an + // [English-like + // format](/appengine/docs/standard/python/config/cronref#schedule_format). + // + // Regardless of what you specify, the job will run at 10:00 AM UTC. Only the + // interval from this schedule is used, not the specific time of day. + Schedule string `protobuf:"bytes,4,opt,name=schedule,proto3" json:"schedule,omitempty"` + // Required. The [AI Platform Prediction model + // version](/ml-engine/docs/prediction-overview) to be evaluated. Prediction + // input and output is sampled from this model version. When creating an + // evaluation job, specify the model version in the following format: + // + // "projects/{project_id}/models/{model_name}/versions/{version_name}" + // + // There can only be one evaluation job per model version. + ModelVersion string `protobuf:"bytes,5,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"` + // Required. Configuration details for the evaluation job. + EvaluationJobConfig *EvaluationJobConfig `protobuf:"bytes,6,opt,name=evaluation_job_config,json=evaluationJobConfig,proto3" json:"evaluation_job_config,omitempty"` + // Required. Name of the [AnnotationSpecSet][google.cloud.datalabeling.v1beta1.AnnotationSpecSet] describing all the + // labels that your machine learning model outputs. You must create this + // resource before you create an evaluation job and provide its name in the + // following format: + // + // "projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}" + AnnotationSpecSet string `protobuf:"bytes,7,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Required. Whether you want Data Labeling Service to provide ground truth + // labels for prediction input. If you want the service to assign human + // labelers to annotate your data, set this to `true`. If you want to provide + // your own ground truth labels in the evaluation job's BigQuery table, set + // this to `false`. + LabelMissingGroundTruth bool `protobuf:"varint,8,opt,name=label_missing_ground_truth,json=labelMissingGroundTruth,proto3" json:"label_missing_ground_truth,omitempty"` + // Output only. Every time the evaluation job runs and an error occurs, the + // failed attempt is appended to this array. + Attempts []*Attempt `protobuf:"bytes,9,rep,name=attempts,proto3" json:"attempts,omitempty"` + // Output only. Timestamp of when this evaluation job was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *EvaluationJob) Reset() { + *x = EvaluationJob{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvaluationJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvaluationJob) ProtoMessage() {} + +func (x *EvaluationJob) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvaluationJob.ProtoReflect.Descriptor instead. +func (*EvaluationJob) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescGZIP(), []int{0} +} + +func (x *EvaluationJob) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EvaluationJob) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *EvaluationJob) GetState() EvaluationJob_State { + if x != nil { + return x.State + } + return EvaluationJob_STATE_UNSPECIFIED +} + +func (x *EvaluationJob) GetSchedule() string { + if x != nil { + return x.Schedule + } + return "" +} + +func (x *EvaluationJob) GetModelVersion() string { + if x != nil { + return x.ModelVersion + } + return "" +} + +func (x *EvaluationJob) GetEvaluationJobConfig() *EvaluationJobConfig { + if x != nil { + return x.EvaluationJobConfig + } + return nil +} + +func (x *EvaluationJob) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *EvaluationJob) GetLabelMissingGroundTruth() bool { + if x != nil { + return x.LabelMissingGroundTruth + } + return false +} + +func (x *EvaluationJob) GetAttempts() []*Attempt { + if x != nil { + return x.Attempts + } + return nil +} + +func (x *EvaluationJob) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +// Configures specific details of how a continuous evaluation job works. Provide +// this configuration when you create an EvaluationJob. +type EvaluationJobConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Details for how you want human reviewers to provide ground truth + // labels. + // + // Types that are assignable to HumanAnnotationRequestConfig: + // + // *EvaluationJobConfig_ImageClassificationConfig + // *EvaluationJobConfig_BoundingPolyConfig + // *EvaluationJobConfig_TextClassificationConfig + HumanAnnotationRequestConfig isEvaluationJobConfig_HumanAnnotationRequestConfig `protobuf_oneof:"human_annotation_request_config"` + // Rquired. Details for the sampled prediction input. Within this + // configuration, there are requirements for several fields: + // + // - `dataType` must be one of `IMAGE`, `TEXT`, or `GENERAL_DATA`. + // - `annotationType` must be one of `IMAGE_CLASSIFICATION_ANNOTATION`, + // `TEXT_CLASSIFICATION_ANNOTATION`, `GENERAL_CLASSIFICATION_ANNOTATION`, + // or `IMAGE_BOUNDING_BOX_ANNOTATION` (image object detection). + // - If your machine learning model performs classification, you must specify + // `classificationMetadata.isMultiLabel`. + // - You must specify `bigquerySource` (not `gcsSource`). + InputConfig *InputConfig `protobuf:"bytes,1,opt,name=input_config,json=inputConfig,proto3" json:"input_config,omitempty"` + // Required. Details for calculating evaluation metrics and creating + // [Evaulations][google.cloud.datalabeling.v1beta1.Evaluation]. If your model version performs image object + // detection, you must specify the `boundingBoxEvaluationOptions` field within + // this configuration. Otherwise, provide an empty object for this + // configuration. + EvaluationConfig *EvaluationConfig `protobuf:"bytes,2,opt,name=evaluation_config,json=evaluationConfig,proto3" json:"evaluation_config,omitempty"` + // Optional. Details for human annotation of your data. If you set + // [labelMissingGroundTruth][google.cloud.datalabeling.v1beta1.EvaluationJob.label_missing_ground_truth] to + // `true` for this evaluation job, then you must specify this field. If you + // plan to provide your own ground truth labels, then omit this field. + // + // Note that you must create an [Instruction][google.cloud.datalabeling.v1beta1.Instruction] resource before you can + // specify this field. Provide the name of the instruction resource in the + // `instruction` field within this configuration. + HumanAnnotationConfig *HumanAnnotationConfig `protobuf:"bytes,3,opt,name=human_annotation_config,json=humanAnnotationConfig,proto3" json:"human_annotation_config,omitempty"` + // Required. Prediction keys that tell Data Labeling Service where to find the + // data for evaluation in your BigQuery table. When the service samples + // prediction input and output from your model version and saves it to + // BigQuery, the data gets stored as JSON strings in the BigQuery table. These + // keys tell Data Labeling Service how to parse the JSON. + // + // You can provide the following entries in this field: + // + // - `data_json_key`: the data key for prediction input. You must provide + // either this key or `reference_json_key`. + // - `reference_json_key`: the data reference key for prediction input. You + // must provide either this key or `data_json_key`. + // - `label_json_key`: the label key for prediction output. Required. + // - `label_score_json_key`: the score key for prediction output. Required. + // - `bounding_box_json_key`: the bounding box key for prediction output. + // Required if your model version perform image object detection. + // + // Learn [how to configure prediction + // keys](/ml-engine/docs/continuous-evaluation/create-job#prediction-keys). + BigqueryImportKeys map[string]string `protobuf:"bytes,9,rep,name=bigquery_import_keys,json=bigqueryImportKeys,proto3" json:"bigquery_import_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. The maximum number of predictions to sample and save to BigQuery + // during each [evaluation interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. This limit + // overrides `example_sample_percentage`: even if the service has not sampled + // enough predictions to fulfill `example_sample_perecentage` during an + // interval, it stops sampling predictions when it meets this limit. + ExampleCount int32 `protobuf:"varint,10,opt,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"` + // Required. Fraction of predictions to sample and save to BigQuery during + // each [evaluation interval][google.cloud.datalabeling.v1beta1.EvaluationJob.schedule]. For example, 0.1 means + // 10% of predictions served by your model version get saved to BigQuery. + ExampleSamplePercentage float64 `protobuf:"fixed64,11,opt,name=example_sample_percentage,json=exampleSamplePercentage,proto3" json:"example_sample_percentage,omitempty"` + // Optional. Configuration details for evaluation job alerts. Specify this + // field if you want to receive email alerts if the evaluation job finds that + // your predictions have low mean average precision during a run. + EvaluationJobAlertConfig *EvaluationJobAlertConfig `protobuf:"bytes,13,opt,name=evaluation_job_alert_config,json=evaluationJobAlertConfig,proto3" json:"evaluation_job_alert_config,omitempty"` +} + +func (x *EvaluationJobConfig) Reset() { + *x = EvaluationJobConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvaluationJobConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvaluationJobConfig) ProtoMessage() {} + +func (x *EvaluationJobConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvaluationJobConfig.ProtoReflect.Descriptor instead. +func (*EvaluationJobConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescGZIP(), []int{1} +} + +func (m *EvaluationJobConfig) GetHumanAnnotationRequestConfig() isEvaluationJobConfig_HumanAnnotationRequestConfig { + if m != nil { + return m.HumanAnnotationRequestConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetImageClassificationConfig() *ImageClassificationConfig { + if x, ok := x.GetHumanAnnotationRequestConfig().(*EvaluationJobConfig_ImageClassificationConfig); ok { + return x.ImageClassificationConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetBoundingPolyConfig() *BoundingPolyConfig { + if x, ok := x.GetHumanAnnotationRequestConfig().(*EvaluationJobConfig_BoundingPolyConfig); ok { + return x.BoundingPolyConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetTextClassificationConfig() *TextClassificationConfig { + if x, ok := x.GetHumanAnnotationRequestConfig().(*EvaluationJobConfig_TextClassificationConfig); ok { + return x.TextClassificationConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetInputConfig() *InputConfig { + if x != nil { + return x.InputConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetEvaluationConfig() *EvaluationConfig { + if x != nil { + return x.EvaluationConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetHumanAnnotationConfig() *HumanAnnotationConfig { + if x != nil { + return x.HumanAnnotationConfig + } + return nil +} + +func (x *EvaluationJobConfig) GetBigqueryImportKeys() map[string]string { + if x != nil { + return x.BigqueryImportKeys + } + return nil +} + +func (x *EvaluationJobConfig) GetExampleCount() int32 { + if x != nil { + return x.ExampleCount + } + return 0 +} + +func (x *EvaluationJobConfig) GetExampleSamplePercentage() float64 { + if x != nil { + return x.ExampleSamplePercentage + } + return 0 +} + +func (x *EvaluationJobConfig) GetEvaluationJobAlertConfig() *EvaluationJobAlertConfig { + if x != nil { + return x.EvaluationJobAlertConfig + } + return nil +} + +type isEvaluationJobConfig_HumanAnnotationRequestConfig interface { + isEvaluationJobConfig_HumanAnnotationRequestConfig() +} + +type EvaluationJobConfig_ImageClassificationConfig struct { + // Specify this field if your model version performs image classification or + // general classification. + // + // `annotationSpecSet` in this configuration must match + // [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. + // `allowMultiLabel` in this configuration must match + // `classificationMetadata.isMultiLabel` in [input_config][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]. + ImageClassificationConfig *ImageClassificationConfig `protobuf:"bytes,4,opt,name=image_classification_config,json=imageClassificationConfig,proto3,oneof"` +} + +type EvaluationJobConfig_BoundingPolyConfig struct { + // Specify this field if your model version performs image object detection + // (bounding box detection). + // + // `annotationSpecSet` in this configuration must match + // [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. + BoundingPolyConfig *BoundingPolyConfig `protobuf:"bytes,5,opt,name=bounding_poly_config,json=boundingPolyConfig,proto3,oneof"` +} + +type EvaluationJobConfig_TextClassificationConfig struct { + // Specify this field if your model version performs text classification. + // + // `annotationSpecSet` in this configuration must match + // [EvaluationJob.annotationSpecSet][google.cloud.datalabeling.v1beta1.EvaluationJob.annotation_spec_set]. + // `allowMultiLabel` in this configuration must match + // `classificationMetadata.isMultiLabel` in [input_config][google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config]. + TextClassificationConfig *TextClassificationConfig `protobuf:"bytes,8,opt,name=text_classification_config,json=textClassificationConfig,proto3,oneof"` +} + +func (*EvaluationJobConfig_ImageClassificationConfig) isEvaluationJobConfig_HumanAnnotationRequestConfig() { +} + +func (*EvaluationJobConfig_BoundingPolyConfig) isEvaluationJobConfig_HumanAnnotationRequestConfig() {} + +func (*EvaluationJobConfig_TextClassificationConfig) isEvaluationJobConfig_HumanAnnotationRequestConfig() { +} + +// Provides details for how an evaluation job sends email alerts based on the +// results of a run. +type EvaluationJobAlertConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. An email address to send alerts to. + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + // Required. A number between 0 and 1 that describes a minimum mean average + // precision threshold. When the evaluation job runs, if it calculates that + // your model version's predictions from the recent interval have + // [meanAveragePrecision][google.cloud.datalabeling.v1beta1.PrCurve.mean_average_precision] below this + // threshold, then it sends an alert to your specified email. + MinAcceptableMeanAveragePrecision float64 `protobuf:"fixed64,2,opt,name=min_acceptable_mean_average_precision,json=minAcceptableMeanAveragePrecision,proto3" json:"min_acceptable_mean_average_precision,omitempty"` +} + +func (x *EvaluationJobAlertConfig) Reset() { + *x = EvaluationJobAlertConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvaluationJobAlertConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvaluationJobAlertConfig) ProtoMessage() {} + +func (x *EvaluationJobAlertConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvaluationJobAlertConfig.ProtoReflect.Descriptor instead. +func (*EvaluationJobAlertConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescGZIP(), []int{2} +} + +func (x *EvaluationJobAlertConfig) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *EvaluationJobAlertConfig) GetMinAcceptableMeanAveragePrecision() float64 { + if x != nil { + return x.MinAcceptableMeanAveragePrecision + } + return 0 +} + +// Records a failed evaluation job run. +type Attempt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttemptTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=attempt_time,json=attemptTime,proto3" json:"attempt_time,omitempty"` + // Details of errors that occurred. + PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"` +} + +func (x *Attempt) Reset() { + *x = Attempt{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attempt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attempt) ProtoMessage() {} + +func (x *Attempt) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Attempt.ProtoReflect.Descriptor instead. +func (*Attempt) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescGZIP(), []int{3} +} + +func (x *Attempt) GetAttemptTime() *timestamppb.Timestamp { + if x != nil { + return x.AttemptTime + } + return nil +} + +func (x *Attempt) GetPartialFailures() []*status.Status { + if x != nil { + return x.PartialFailures + } + return nil +} + +var File_google_cloud_datalabeling_v1beta1_evaluation_job_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, + 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, + 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x05, 0x0a, 0x0d, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x6a, 0x0a, + 0x15, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x74, 0x72, 0x75, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x54, 0x72, 0x75, 0x74, 0x68, 0x12, 0x46, 0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x74, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, + 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, + 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x55, 0x53, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, + 0x3a, 0x62, 0xea, 0x41, 0x5f, 0x0a, 0x29, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, + 0x12, 0x32, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, + 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x6a, 0x6f, 0x62, 0x7d, 0x22, 0xee, 0x08, 0x0a, 0x13, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7e, 0x0a, 0x1b, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, + 0x00, 0x52, 0x19, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, 0x0a, 0x14, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x12, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7b, 0x0a, 0x1a, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x18, 0x74, 0x65, 0x78, 0x74, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x11, 0x65, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x17, 0x68, 0x75, 0x6d, + 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, + 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x80, 0x01, 0x0a, 0x14, + 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x42, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x62, 0x69, 0x67, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, + 0x7a, 0x0a, 0x1b, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6a, 0x6f, + 0x62, 0x5f, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x18, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, + 0x41, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x45, 0x0a, 0x17, 0x42, + 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x42, 0x21, 0x0a, 0x1f, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x82, 0x01, 0x0a, 0x18, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x50, 0x0a, 0x25, 0x6d, 0x69, 0x6e, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x61, 0x6e, 0x5f, + 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x21, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x61, 0x6e, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x87, 0x01, 0x0a, 0x07, 0x41, + 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x73, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, + 0x5a, 0x4d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, + 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_goTypes = []interface{}{ + (EvaluationJob_State)(0), // 0: google.cloud.datalabeling.v1beta1.EvaluationJob.State + (*EvaluationJob)(nil), // 1: google.cloud.datalabeling.v1beta1.EvaluationJob + (*EvaluationJobConfig)(nil), // 2: google.cloud.datalabeling.v1beta1.EvaluationJobConfig + (*EvaluationJobAlertConfig)(nil), // 3: google.cloud.datalabeling.v1beta1.EvaluationJobAlertConfig + (*Attempt)(nil), // 4: google.cloud.datalabeling.v1beta1.Attempt + nil, // 5: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.BigqueryImportKeysEntry + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*ImageClassificationConfig)(nil), // 7: google.cloud.datalabeling.v1beta1.ImageClassificationConfig + (*BoundingPolyConfig)(nil), // 8: google.cloud.datalabeling.v1beta1.BoundingPolyConfig + (*TextClassificationConfig)(nil), // 9: google.cloud.datalabeling.v1beta1.TextClassificationConfig + (*InputConfig)(nil), // 10: google.cloud.datalabeling.v1beta1.InputConfig + (*EvaluationConfig)(nil), // 11: google.cloud.datalabeling.v1beta1.EvaluationConfig + (*HumanAnnotationConfig)(nil), // 12: google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + (*status.Status)(nil), // 13: google.rpc.Status +} +var file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_depIdxs = []int32{ + 0, // 0: google.cloud.datalabeling.v1beta1.EvaluationJob.state:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJob.State + 2, // 1: google.cloud.datalabeling.v1beta1.EvaluationJob.evaluation_job_config:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJobConfig + 4, // 2: google.cloud.datalabeling.v1beta1.EvaluationJob.attempts:type_name -> google.cloud.datalabeling.v1beta1.Attempt + 6, // 3: google.cloud.datalabeling.v1beta1.EvaluationJob.create_time:type_name -> google.protobuf.Timestamp + 7, // 4: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.image_classification_config:type_name -> google.cloud.datalabeling.v1beta1.ImageClassificationConfig + 8, // 5: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.bounding_poly_config:type_name -> google.cloud.datalabeling.v1beta1.BoundingPolyConfig + 9, // 6: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.text_classification_config:type_name -> google.cloud.datalabeling.v1beta1.TextClassificationConfig + 10, // 7: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.input_config:type_name -> google.cloud.datalabeling.v1beta1.InputConfig + 11, // 8: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.evaluation_config:type_name -> google.cloud.datalabeling.v1beta1.EvaluationConfig + 12, // 9: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.human_annotation_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 5, // 10: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.bigquery_import_keys:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJobConfig.BigqueryImportKeysEntry + 3, // 11: google.cloud.datalabeling.v1beta1.EvaluationJobConfig.evaluation_job_alert_config:type_name -> google.cloud.datalabeling.v1beta1.EvaluationJobAlertConfig + 6, // 12: google.cloud.datalabeling.v1beta1.Attempt.attempt_time:type_name -> google.protobuf.Timestamp + 13, // 13: google.cloud.datalabeling.v1beta1.Attempt.partial_failures:type_name -> google.rpc.Status + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_init() } +func file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_init() { + if File_google_cloud_datalabeling_v1beta1_evaluation_job_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_init() + file_google_cloud_datalabeling_v1beta1_evaluation_proto_init() + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvaluationJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvaluationJobConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvaluationJobAlertConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Attempt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*EvaluationJobConfig_ImageClassificationConfig)(nil), + (*EvaluationJobConfig_BoundingPolyConfig)(nil), + (*EvaluationJobConfig_TextClassificationConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_depIdxs, + EnumInfos: file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_enumTypes, + MessageInfos: file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_evaluation_job_proto = out.File + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_evaluation_job_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go b/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go new file mode 100644 index 000000000000..99749c2e80c6 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/human_annotation_config.pb.go @@ -0,0 +1,1334 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StringAggregationType int32 + +const ( + StringAggregationType_STRING_AGGREGATION_TYPE_UNSPECIFIED StringAggregationType = 0 + // Majority vote to aggregate answers. + StringAggregationType_MAJORITY_VOTE StringAggregationType = 1 + // Unanimous answers will be adopted. + StringAggregationType_UNANIMOUS_VOTE StringAggregationType = 2 + // Preserve all answers by crowd compute. + StringAggregationType_NO_AGGREGATION StringAggregationType = 3 +) + +// Enum value maps for StringAggregationType. +var ( + StringAggregationType_name = map[int32]string{ + 0: "STRING_AGGREGATION_TYPE_UNSPECIFIED", + 1: "MAJORITY_VOTE", + 2: "UNANIMOUS_VOTE", + 3: "NO_AGGREGATION", + } + StringAggregationType_value = map[string]int32{ + "STRING_AGGREGATION_TYPE_UNSPECIFIED": 0, + "MAJORITY_VOTE": 1, + "UNANIMOUS_VOTE": 2, + "NO_AGGREGATION": 3, + } +) + +func (x StringAggregationType) Enum() *StringAggregationType { + p := new(StringAggregationType) + *p = x + return p +} + +func (x StringAggregationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StringAggregationType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_enumTypes[0].Descriptor() +} + +func (StringAggregationType) Type() protoreflect.EnumType { + return &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_enumTypes[0] +} + +func (x StringAggregationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StringAggregationType.Descriptor instead. +func (StringAggregationType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{0} +} + +// Configuration for how human labeling task should be done. +type HumanAnnotationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Instruction resource name. + Instruction string `protobuf:"bytes,1,opt,name=instruction,proto3" json:"instruction,omitempty"` + // Required. A human-readable name for AnnotatedDataset defined by + // users. Maximum of 64 characters + // . + AnnotatedDatasetDisplayName string `protobuf:"bytes,2,opt,name=annotated_dataset_display_name,json=annotatedDatasetDisplayName,proto3" json:"annotated_dataset_display_name,omitempty"` + // Optional. A human-readable description for AnnotatedDataset. + // The description can be up to 10000 characters long. + AnnotatedDatasetDescription string `protobuf:"bytes,3,opt,name=annotated_dataset_description,json=annotatedDatasetDescription,proto3" json:"annotated_dataset_description,omitempty"` + // Optional. A human-readable label used to logically group labeling tasks. + // This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`. + LabelGroup string `protobuf:"bytes,4,opt,name=label_group,json=labelGroup,proto3" json:"label_group,omitempty"` + // Optional. The Language of this question, as a + // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Default value is en-US. + // Only need to set this when task is language related. For example, French + // text classification. + LanguageCode string `protobuf:"bytes,5,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // Optional. Replication of questions. Each question will be sent to up to + // this number of contributors to label. Aggregated answers will be returned. + // Default is set to 1. + // For image related labeling, valid values are 1, 3, 5. + ReplicaCount int32 `protobuf:"varint,6,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"` + // Optional. Maximum duration for contributors to answer a question. Maximum + // is 3600 seconds. Default is 3600 seconds. + QuestionDuration *durationpb.Duration `protobuf:"bytes,7,opt,name=question_duration,json=questionDuration,proto3" json:"question_duration,omitempty"` + // Optional. If you want your own labeling contributors to manage and work on + // this labeling request, you can set these contributors here. We will give + // them access to the question types in crowdcompute. Note that these + // emails must be registered in crowdcompute worker UI: + // https://crowd-compute.appspot.com/ + ContributorEmails []string `protobuf:"bytes,9,rep,name=contributor_emails,json=contributorEmails,proto3" json:"contributor_emails,omitempty"` + // Email of the user who started the labeling task and should be notified by + // email. If empty no notification will be sent. + UserEmailAddress string `protobuf:"bytes,10,opt,name=user_email_address,json=userEmailAddress,proto3" json:"user_email_address,omitempty"` +} + +func (x *HumanAnnotationConfig) Reset() { + *x = HumanAnnotationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HumanAnnotationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HumanAnnotationConfig) ProtoMessage() {} + +func (x *HumanAnnotationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HumanAnnotationConfig.ProtoReflect.Descriptor instead. +func (*HumanAnnotationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{0} +} + +func (x *HumanAnnotationConfig) GetInstruction() string { + if x != nil { + return x.Instruction + } + return "" +} + +func (x *HumanAnnotationConfig) GetAnnotatedDatasetDisplayName() string { + if x != nil { + return x.AnnotatedDatasetDisplayName + } + return "" +} + +func (x *HumanAnnotationConfig) GetAnnotatedDatasetDescription() string { + if x != nil { + return x.AnnotatedDatasetDescription + } + return "" +} + +func (x *HumanAnnotationConfig) GetLabelGroup() string { + if x != nil { + return x.LabelGroup + } + return "" +} + +func (x *HumanAnnotationConfig) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *HumanAnnotationConfig) GetReplicaCount() int32 { + if x != nil { + return x.ReplicaCount + } + return 0 +} + +func (x *HumanAnnotationConfig) GetQuestionDuration() *durationpb.Duration { + if x != nil { + return x.QuestionDuration + } + return nil +} + +func (x *HumanAnnotationConfig) GetContributorEmails() []string { + if x != nil { + return x.ContributorEmails + } + return nil +} + +func (x *HumanAnnotationConfig) GetUserEmailAddress() string { + if x != nil { + return x.UserEmailAddress + } + return "" +} + +// Config for image classification human labeling task. +type ImageClassificationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Optional. If allow_multi_label is true, contributors are able to choose + // multiple labels for one image. + AllowMultiLabel bool `protobuf:"varint,2,opt,name=allow_multi_label,json=allowMultiLabel,proto3" json:"allow_multi_label,omitempty"` + // Optional. The type of how to aggregate answers. + AnswerAggregationType StringAggregationType `protobuf:"varint,3,opt,name=answer_aggregation_type,json=answerAggregationType,proto3,enum=google.cloud.datalabeling.v1beta1.StringAggregationType" json:"answer_aggregation_type,omitempty"` +} + +func (x *ImageClassificationConfig) Reset() { + *x = ImageClassificationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImageClassificationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImageClassificationConfig) ProtoMessage() {} + +func (x *ImageClassificationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImageClassificationConfig.ProtoReflect.Descriptor instead. +func (*ImageClassificationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{1} +} + +func (x *ImageClassificationConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *ImageClassificationConfig) GetAllowMultiLabel() bool { + if x != nil { + return x.AllowMultiLabel + } + return false +} + +func (x *ImageClassificationConfig) GetAnswerAggregationType() StringAggregationType { + if x != nil { + return x.AnswerAggregationType + } + return StringAggregationType_STRING_AGGREGATION_TYPE_UNSPECIFIED +} + +// Config for image bounding poly (and bounding box) human labeling task. +type BoundingPolyConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Optional. Instruction message showed on contributors UI. + InstructionMessage string `protobuf:"bytes,2,opt,name=instruction_message,json=instructionMessage,proto3" json:"instruction_message,omitempty"` +} + +func (x *BoundingPolyConfig) Reset() { + *x = BoundingPolyConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoundingPolyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoundingPolyConfig) ProtoMessage() {} + +func (x *BoundingPolyConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoundingPolyConfig.ProtoReflect.Descriptor instead. +func (*BoundingPolyConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{2} +} + +func (x *BoundingPolyConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *BoundingPolyConfig) GetInstructionMessage() string { + if x != nil { + return x.InstructionMessage + } + return "" +} + +// Config for image polyline human labeling task. +type PolylineConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Optional. Instruction message showed on contributors UI. + InstructionMessage string `protobuf:"bytes,2,opt,name=instruction_message,json=instructionMessage,proto3" json:"instruction_message,omitempty"` +} + +func (x *PolylineConfig) Reset() { + *x = PolylineConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PolylineConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolylineConfig) ProtoMessage() {} + +func (x *PolylineConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PolylineConfig.ProtoReflect.Descriptor instead. +func (*PolylineConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{3} +} + +func (x *PolylineConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *PolylineConfig) GetInstructionMessage() string { + if x != nil { + return x.InstructionMessage + } + return "" +} + +// Config for image segmentation +type SegmentationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. format: + // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Instruction message showed on labelers UI. + InstructionMessage string `protobuf:"bytes,2,opt,name=instruction_message,json=instructionMessage,proto3" json:"instruction_message,omitempty"` +} + +func (x *SegmentationConfig) Reset() { + *x = SegmentationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SegmentationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SegmentationConfig) ProtoMessage() {} + +func (x *SegmentationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SegmentationConfig.ProtoReflect.Descriptor instead. +func (*SegmentationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{4} +} + +func (x *SegmentationConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *SegmentationConfig) GetInstructionMessage() string { + if x != nil { + return x.InstructionMessage + } + return "" +} + +// Config for video classification human labeling task. +// Currently two types of video classification are supported: +// 1. Assign labels on the entire video. +// 2. Split the video into multiple video clips based on camera shot, and +// assign labels on each video clip. +type VideoClassificationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The list of annotation spec set configs. + // Since watching a video clip takes much longer time than an image, we + // support label with multiple AnnotationSpecSet at the same time. Labels + // in each AnnotationSpecSet will be shown in a group to contributors. + // Contributors can select one or more (depending on whether to allow multi + // label) from each group. + AnnotationSpecSetConfigs []*VideoClassificationConfig_AnnotationSpecSetConfig `protobuf:"bytes,1,rep,name=annotation_spec_set_configs,json=annotationSpecSetConfigs,proto3" json:"annotation_spec_set_configs,omitempty"` + // Optional. Option to apply shot detection on the video. + ApplyShotDetection bool `protobuf:"varint,2,opt,name=apply_shot_detection,json=applyShotDetection,proto3" json:"apply_shot_detection,omitempty"` +} + +func (x *VideoClassificationConfig) Reset() { + *x = VideoClassificationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoClassificationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoClassificationConfig) ProtoMessage() {} + +func (x *VideoClassificationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoClassificationConfig.ProtoReflect.Descriptor instead. +func (*VideoClassificationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{5} +} + +func (x *VideoClassificationConfig) GetAnnotationSpecSetConfigs() []*VideoClassificationConfig_AnnotationSpecSetConfig { + if x != nil { + return x.AnnotationSpecSetConfigs + } + return nil +} + +func (x *VideoClassificationConfig) GetApplyShotDetection() bool { + if x != nil { + return x.ApplyShotDetection + } + return false +} + +// Config for video object detection human labeling task. +// Object detection will be conducted on the images extracted from the video, +// and those objects will be labeled with bounding boxes. +// User need to specify the number of images to be extracted per second as the +// extraction frame rate. +type ObjectDetectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Required. Number of frames per second to be extracted from the video. + ExtractionFrameRate float64 `protobuf:"fixed64,3,opt,name=extraction_frame_rate,json=extractionFrameRate,proto3" json:"extraction_frame_rate,omitempty"` +} + +func (x *ObjectDetectionConfig) Reset() { + *x = ObjectDetectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObjectDetectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectDetectionConfig) ProtoMessage() {} + +func (x *ObjectDetectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObjectDetectionConfig.ProtoReflect.Descriptor instead. +func (*ObjectDetectionConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{6} +} + +func (x *ObjectDetectionConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *ObjectDetectionConfig) GetExtractionFrameRate() float64 { + if x != nil { + return x.ExtractionFrameRate + } + return 0 +} + +// Config for video object tracking human labeling task. +type ObjectTrackingConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` +} + +func (x *ObjectTrackingConfig) Reset() { + *x = ObjectTrackingConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObjectTrackingConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectTrackingConfig) ProtoMessage() {} + +func (x *ObjectTrackingConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObjectTrackingConfig.ProtoReflect.Descriptor instead. +func (*ObjectTrackingConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{7} +} + +func (x *ObjectTrackingConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +// Config for video event human labeling task. +type EventConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The list of annotation spec set resource name. Similar to video + // classification, we support selecting event from multiple AnnotationSpecSet + // at the same time. + AnnotationSpecSets []string `protobuf:"bytes,1,rep,name=annotation_spec_sets,json=annotationSpecSets,proto3" json:"annotation_spec_sets,omitempty"` +} + +func (x *EventConfig) Reset() { + *x = EventConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventConfig) ProtoMessage() {} + +func (x *EventConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventConfig.ProtoReflect.Descriptor instead. +func (*EventConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{8} +} + +func (x *EventConfig) GetAnnotationSpecSets() []string { + if x != nil { + return x.AnnotationSpecSets + } + return nil +} + +// Config for text classification human labeling task. +type TextClassificationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. If allow_multi_label is true, contributors are able to choose + // multiple labels for one text segment. + AllowMultiLabel bool `protobuf:"varint,1,opt,name=allow_multi_label,json=allowMultiLabel,proto3" json:"allow_multi_label,omitempty"` + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,2,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Optional. Configs for sentiment selection. + SentimentConfig *SentimentConfig `protobuf:"bytes,3,opt,name=sentiment_config,json=sentimentConfig,proto3" json:"sentiment_config,omitempty"` +} + +func (x *TextClassificationConfig) Reset() { + *x = TextClassificationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextClassificationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextClassificationConfig) ProtoMessage() {} + +func (x *TextClassificationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextClassificationConfig.ProtoReflect.Descriptor instead. +func (*TextClassificationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{9} +} + +func (x *TextClassificationConfig) GetAllowMultiLabel() bool { + if x != nil { + return x.AllowMultiLabel + } + return false +} + +func (x *TextClassificationConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *TextClassificationConfig) GetSentimentConfig() *SentimentConfig { + if x != nil { + return x.SentimentConfig + } + return nil +} + +// Config for setting up sentiments. +type SentimentConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set to true, contributors will have the option to select sentiment of + // the label they selected, to mark it as negative or positive label. Default + // is false. + EnableLabelSentimentSelection bool `protobuf:"varint,1,opt,name=enable_label_sentiment_selection,json=enableLabelSentimentSelection,proto3" json:"enable_label_sentiment_selection,omitempty"` +} + +func (x *SentimentConfig) Reset() { + *x = SentimentConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SentimentConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SentimentConfig) ProtoMessage() {} + +func (x *SentimentConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SentimentConfig.ProtoReflect.Descriptor instead. +func (*SentimentConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{10} +} + +func (x *SentimentConfig) GetEnableLabelSentimentSelection() bool { + if x != nil { + return x.EnableLabelSentimentSelection + } + return false +} + +// Config for text entity extraction human labeling task. +type TextEntityExtractionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` +} + +func (x *TextEntityExtractionConfig) Reset() { + *x = TextEntityExtractionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextEntityExtractionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextEntityExtractionConfig) ProtoMessage() {} + +func (x *TextEntityExtractionConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextEntityExtractionConfig.ProtoReflect.Descriptor instead. +func (*TextEntityExtractionConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{11} +} + +func (x *TextEntityExtractionConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +// Annotation spec set with the setting of allowing multi labels or not. +type VideoClassificationConfig_AnnotationSpecSetConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Annotation spec set resource name. + AnnotationSpecSet string `protobuf:"bytes,1,opt,name=annotation_spec_set,json=annotationSpecSet,proto3" json:"annotation_spec_set,omitempty"` + // Optional. If allow_multi_label is true, contributors are able to + // choose multiple labels from one annotation spec set. + AllowMultiLabel bool `protobuf:"varint,2,opt,name=allow_multi_label,json=allowMultiLabel,proto3" json:"allow_multi_label,omitempty"` +} + +func (x *VideoClassificationConfig_AnnotationSpecSetConfig) Reset() { + *x = VideoClassificationConfig_AnnotationSpecSetConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VideoClassificationConfig_AnnotationSpecSetConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VideoClassificationConfig_AnnotationSpecSetConfig) ProtoMessage() {} + +func (x *VideoClassificationConfig_AnnotationSpecSetConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VideoClassificationConfig_AnnotationSpecSetConfig.ProtoReflect.Descriptor instead. +func (*VideoClassificationConfig_AnnotationSpecSetConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *VideoClassificationConfig_AnnotationSpecSetConfig) GetAnnotationSpecSet() string { + if x != nil { + return x.AnnotationSpecSet + } + return "" +} + +func (x *VideoClassificationConfig_AnnotationSpecSetConfig) GetAllowMultiLabel() bool { + if x != nil { + return x.AllowMultiLabel + } + return false +} + +var File_google_cloud_datalabeling_v1beta1_human_annotation_config_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x03, 0x0a, 0x15, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x25, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x1e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x1b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x47, 0x0a, 0x1d, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x1b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x28, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x45, 0x6d, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0xf8, 0x01, 0x0a, 0x19, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x75, 0x0a, 0x17, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, + 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x7f, 0x0a, + 0x12, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x13, 0x69, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7b, + 0x0a, 0x0e, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, + 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x13, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x7a, 0x0a, 0x12, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xee, 0x02, 0x0a, 0x19, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x98, 0x01, 0x0a, 0x1b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x18, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x12, 0x35, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x64, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x12, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x68, 0x6f, 0x74, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x7f, 0x0a, 0x17, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x85, 0x01, 0x0a, 0x15, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x61, 0x74, 0x65, + 0x22, 0x4b, 0x0a, 0x14, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x22, 0x44, 0x0a, + 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x14, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, + 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x12, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, + 0x65, 0x74, 0x73, 0x22, 0xe4, 0x01, 0x0a, 0x18, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x2f, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x12, 0x62, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5a, 0x0a, 0x0f, 0x53, 0x65, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, + 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x65, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x1a, 0x54, 0x65, 0x78, 0x74, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x33, 0x0a, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x53, 0x65, 0x74, 0x2a, 0x7b, 0x0a, 0x15, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x47, 0x47, + 0x52, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4d, + 0x41, 0x4a, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x55, 0x4e, 0x41, 0x4e, 0x49, 0x4d, 0x4f, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x45, + 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0xaa, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, + 0x42, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_goTypes = []interface{}{ + (StringAggregationType)(0), // 0: google.cloud.datalabeling.v1beta1.StringAggregationType + (*HumanAnnotationConfig)(nil), // 1: google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + (*ImageClassificationConfig)(nil), // 2: google.cloud.datalabeling.v1beta1.ImageClassificationConfig + (*BoundingPolyConfig)(nil), // 3: google.cloud.datalabeling.v1beta1.BoundingPolyConfig + (*PolylineConfig)(nil), // 4: google.cloud.datalabeling.v1beta1.PolylineConfig + (*SegmentationConfig)(nil), // 5: google.cloud.datalabeling.v1beta1.SegmentationConfig + (*VideoClassificationConfig)(nil), // 6: google.cloud.datalabeling.v1beta1.VideoClassificationConfig + (*ObjectDetectionConfig)(nil), // 7: google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + (*ObjectTrackingConfig)(nil), // 8: google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + (*EventConfig)(nil), // 9: google.cloud.datalabeling.v1beta1.EventConfig + (*TextClassificationConfig)(nil), // 10: google.cloud.datalabeling.v1beta1.TextClassificationConfig + (*SentimentConfig)(nil), // 11: google.cloud.datalabeling.v1beta1.SentimentConfig + (*TextEntityExtractionConfig)(nil), // 12: google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + (*VideoClassificationConfig_AnnotationSpecSetConfig)(nil), // 13: google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + (*durationpb.Duration)(nil), // 14: google.protobuf.Duration +} +var file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_depIdxs = []int32{ + 14, // 0: google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.question_duration:type_name -> google.protobuf.Duration + 0, // 1: google.cloud.datalabeling.v1beta1.ImageClassificationConfig.answer_aggregation_type:type_name -> google.cloud.datalabeling.v1beta1.StringAggregationType + 13, // 2: google.cloud.datalabeling.v1beta1.VideoClassificationConfig.annotation_spec_set_configs:type_name -> google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + 11, // 3: google.cloud.datalabeling.v1beta1.TextClassificationConfig.sentiment_config:type_name -> google.cloud.datalabeling.v1beta1.SentimentConfig + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() } +func file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() { + if File_google_cloud_datalabeling_v1beta1_human_annotation_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HumanAnnotationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImageClassificationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoundingPolyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolylineConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SegmentationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoClassificationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectDetectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObjectTrackingConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextClassificationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SentimentConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextEntityExtractionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VideoClassificationConfig_AnnotationSpecSetConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDesc, + NumEnums: 1, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_depIdxs, + EnumInfos: file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_enumTypes, + MessageInfos: file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_human_annotation_config_proto = out.File + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go b/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go new file mode 100644 index 000000000000..cdf9692a1b77 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/instruction.pb.go @@ -0,0 +1,448 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Instruction of how to perform the labeling task for human operators. +// Currently only PDF instruction is supported. +type Instruction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The display name of the instruction. Maximum of 64 characters. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. User-provided description of the instruction. + // The description can be up to 10000 characters long. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. Creation time of instruction. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Last update time of instruction. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Required. The data type of this instruction. + DataType DataType `protobuf:"varint,6,opt,name=data_type,json=dataType,proto3,enum=google.cloud.datalabeling.v1beta1.DataType" json:"data_type,omitempty"` + // Deprecated: this instruction format is not supported any more. + // Instruction from a CSV file, such as for classification task. + // The CSV file should have exact two columns, in the following format: + // + // * The first column is labeled data, such as an image reference, text. + // * The second column is comma separated labels associated with data. + // + // Deprecated: Do not use. + CsvInstruction *CsvInstruction `protobuf:"bytes,7,opt,name=csv_instruction,json=csvInstruction,proto3" json:"csv_instruction,omitempty"` + // Instruction from a PDF document. The PDF should be in a Cloud Storage + // bucket. + PdfInstruction *PdfInstruction `protobuf:"bytes,9,opt,name=pdf_instruction,json=pdfInstruction,proto3" json:"pdf_instruction,omitempty"` + // Output only. The names of any related resources that are blocking changes + // to the instruction. + BlockingResources []string `protobuf:"bytes,10,rep,name=blocking_resources,json=blockingResources,proto3" json:"blocking_resources,omitempty"` +} + +func (x *Instruction) Reset() { + *x = Instruction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Instruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Instruction) ProtoMessage() {} + +func (x *Instruction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Instruction.ProtoReflect.Descriptor instead. +func (*Instruction) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescGZIP(), []int{0} +} + +func (x *Instruction) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Instruction) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Instruction) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Instruction) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Instruction) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Instruction) GetDataType() DataType { + if x != nil { + return x.DataType + } + return DataType_DATA_TYPE_UNSPECIFIED +} + +// Deprecated: Do not use. +func (x *Instruction) GetCsvInstruction() *CsvInstruction { + if x != nil { + return x.CsvInstruction + } + return nil +} + +func (x *Instruction) GetPdfInstruction() *PdfInstruction { + if x != nil { + return x.PdfInstruction + } + return nil +} + +func (x *Instruction) GetBlockingResources() []string { + if x != nil { + return x.BlockingResources + } + return nil +} + +// Deprecated: this instruction format is not supported any more. +// Instruction from a CSV file. +type CsvInstruction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CSV file for the instruction. Only gcs path is allowed. + GcsFileUri string `protobuf:"bytes,1,opt,name=gcs_file_uri,json=gcsFileUri,proto3" json:"gcs_file_uri,omitempty"` +} + +func (x *CsvInstruction) Reset() { + *x = CsvInstruction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CsvInstruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CsvInstruction) ProtoMessage() {} + +func (x *CsvInstruction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CsvInstruction.ProtoReflect.Descriptor instead. +func (*CsvInstruction) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescGZIP(), []int{1} +} + +func (x *CsvInstruction) GetGcsFileUri() string { + if x != nil { + return x.GcsFileUri + } + return "" +} + +// Instruction from a PDF file. +type PdfInstruction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // PDF file for the instruction. Only gcs path is allowed. + GcsFileUri string `protobuf:"bytes,1,opt,name=gcs_file_uri,json=gcsFileUri,proto3" json:"gcs_file_uri,omitempty"` +} + +func (x *PdfInstruction) Reset() { + *x = PdfInstruction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PdfInstruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PdfInstruction) ProtoMessage() {} + +func (x *PdfInstruction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PdfInstruction.ProtoReflect.Descriptor instead. +func (*PdfInstruction) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescGZIP(), []int{2} +} + +func (x *PdfInstruction) GetGcsFileUri() string { + if x != nil { + return x.GcsFileUri + } + return "" +} + +var File_google_cloud_datalabeling_v1beta1_instruction_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x04, 0x0a, 0x0b, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x5e, 0x0a, 0x0f, 0x63, 0x73, 0x76, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x73, 0x76, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x0e, 0x63, 0x73, 0x76, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x0f, 0x70, 0x64, 0x66, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x64, 0x66, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, + 0x70, 0x64, 0x66, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, + 0x0a, 0x12, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x5b, 0xea, + 0x41, 0x58, 0x0a, 0x27, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0x32, 0x0a, 0x0e, 0x43, 0x73, + 0x76, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0c, + 0x67, 0x63, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x67, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x69, 0x22, 0x32, + 0x0a, 0x0e, 0x50, 0x64, 0x66, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0c, 0x67, 0x63, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x55, + 0x72, 0x69, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x4d, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0xaa, 0x02, 0x21, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_datalabeling_v1beta1_instruction_proto_goTypes = []interface{}{ + (*Instruction)(nil), // 0: google.cloud.datalabeling.v1beta1.Instruction + (*CsvInstruction)(nil), // 1: google.cloud.datalabeling.v1beta1.CsvInstruction + (*PdfInstruction)(nil), // 2: google.cloud.datalabeling.v1beta1.PdfInstruction + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp + (DataType)(0), // 4: google.cloud.datalabeling.v1beta1.DataType +} +var file_google_cloud_datalabeling_v1beta1_instruction_proto_depIdxs = []int32{ + 3, // 0: google.cloud.datalabeling.v1beta1.Instruction.create_time:type_name -> google.protobuf.Timestamp + 3, // 1: google.cloud.datalabeling.v1beta1.Instruction.update_time:type_name -> google.protobuf.Timestamp + 4, // 2: google.cloud.datalabeling.v1beta1.Instruction.data_type:type_name -> google.cloud.datalabeling.v1beta1.DataType + 1, // 3: google.cloud.datalabeling.v1beta1.Instruction.csv_instruction:type_name -> google.cloud.datalabeling.v1beta1.CsvInstruction + 2, // 4: google.cloud.datalabeling.v1beta1.Instruction.pdf_instruction:type_name -> google.cloud.datalabeling.v1beta1.PdfInstruction + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_instruction_proto_init() } +func file_google_cloud_datalabeling_v1beta1_instruction_proto_init() { + if File_google_cloud_datalabeling_v1beta1_instruction_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Instruction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CsvInstruction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PdfInstruction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_instruction_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_instruction_proto_depIdxs, + MessageInfos: file_google_cloud_datalabeling_v1beta1_instruction_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_instruction_proto = out.File + file_google_cloud_datalabeling_v1beta1_instruction_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_instruction_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_instruction_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go b/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go new file mode 100644 index 000000000000..ae66503e39a6 --- /dev/null +++ b/datalabeling/apiv1beta1/datalabelingpb/operations.pb.go @@ -0,0 +1,1916 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package datalabelingpb + +import ( + reflect "reflect" + sync "sync" + + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Response used for ImportData longrunning operation. +type ImportDataOperationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ouptut only. The name of imported dataset. + Dataset string `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Output only. Total number of examples requested to import + TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` + // Output only. Number of examples imported successfully. + ImportCount int32 `protobuf:"varint,3,opt,name=import_count,json=importCount,proto3" json:"import_count,omitempty"` +} + +func (x *ImportDataOperationResponse) Reset() { + *x = ImportDataOperationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDataOperationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataOperationResponse) ProtoMessage() {} + +func (x *ImportDataOperationResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataOperationResponse.ProtoReflect.Descriptor instead. +func (*ImportDataOperationResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{0} +} + +func (x *ImportDataOperationResponse) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *ImportDataOperationResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +func (x *ImportDataOperationResponse) GetImportCount() int32 { + if x != nil { + return x.ImportCount + } + return 0 +} + +// Response used for ExportDataset longrunning operation. +type ExportDataOperationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ouptut only. The name of dataset. + // "projects/*/datasets/*" + Dataset string `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Output only. Total number of examples requested to export + TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` + // Output only. Number of examples exported successfully. + ExportCount int32 `protobuf:"varint,3,opt,name=export_count,json=exportCount,proto3" json:"export_count,omitempty"` + // Output only. Statistic infos of labels in the exported dataset. + LabelStats *LabelStats `protobuf:"bytes,4,opt,name=label_stats,json=labelStats,proto3" json:"label_stats,omitempty"` + // Output only. output_config in the ExportData request. + OutputConfig *OutputConfig `protobuf:"bytes,5,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` +} + +func (x *ExportDataOperationResponse) Reset() { + *x = ExportDataOperationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataOperationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataOperationResponse) ProtoMessage() {} + +func (x *ExportDataOperationResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataOperationResponse.ProtoReflect.Descriptor instead. +func (*ExportDataOperationResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{1} +} + +func (x *ExportDataOperationResponse) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *ExportDataOperationResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +func (x *ExportDataOperationResponse) GetExportCount() int32 { + if x != nil { + return x.ExportCount + } + return 0 +} + +func (x *ExportDataOperationResponse) GetLabelStats() *LabelStats { + if x != nil { + return x.LabelStats + } + return nil +} + +func (x *ExportDataOperationResponse) GetOutputConfig() *OutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +// Metadata of an ImportData operation. +type ImportDataOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The name of imported dataset. + // "projects/*/datasets/*" + Dataset string `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"` + // Output only. Timestamp when import dataset request was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *ImportDataOperationMetadata) Reset() { + *x = ImportDataOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDataOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataOperationMetadata) ProtoMessage() {} + +func (x *ImportDataOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataOperationMetadata.ProtoReflect.Descriptor instead. +func (*ImportDataOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{2} +} + +func (x *ImportDataOperationMetadata) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *ImportDataOperationMetadata) GetPartialFailures() []*status.Status { + if x != nil { + return x.PartialFailures + } + return nil +} + +func (x *ImportDataOperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +// Metadata of an ExportData operation. +type ExportDataOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The name of dataset to be exported. + // "projects/*/datasets/*" + Dataset string `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"` + // Output only. Timestamp when export dataset request was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *ExportDataOperationMetadata) Reset() { + *x = ExportDataOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDataOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDataOperationMetadata) ProtoMessage() {} + +func (x *ExportDataOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDataOperationMetadata.ProtoReflect.Descriptor instead. +func (*ExportDataOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{3} +} + +func (x *ExportDataOperationMetadata) GetDataset() string { + if x != nil { + return x.Dataset + } + return "" +} + +func (x *ExportDataOperationMetadata) GetPartialFailures() []*status.Status { + if x != nil { + return x.PartialFailures + } + return nil +} + +func (x *ExportDataOperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +// Metadata of a labeling operation, such as LabelImage or LabelVideo. +// Next tag: 20 +type LabelOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ouptut only. Details of specific label operation. + // + // Types that are assignable to Details: + // + // *LabelOperationMetadata_ImageClassificationDetails + // *LabelOperationMetadata_ImageBoundingBoxDetails + // *LabelOperationMetadata_ImageBoundingPolyDetails + // *LabelOperationMetadata_ImageOrientedBoundingBoxDetails + // *LabelOperationMetadata_ImagePolylineDetails + // *LabelOperationMetadata_ImageSegmentationDetails + // *LabelOperationMetadata_VideoClassificationDetails + // *LabelOperationMetadata_VideoObjectDetectionDetails + // *LabelOperationMetadata_VideoObjectTrackingDetails + // *LabelOperationMetadata_VideoEventDetails + // *LabelOperationMetadata_TextClassificationDetails + // *LabelOperationMetadata_TextEntityExtractionDetails + Details isLabelOperationMetadata_Details `protobuf_oneof:"details"` + // Output only. Progress of label operation. Range: [0, 100]. + ProgressPercent int32 `protobuf:"varint,1,opt,name=progress_percent,json=progressPercent,proto3" json:"progress_percent,omitempty"` + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"` + // Output only. Timestamp when labeling request was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *LabelOperationMetadata) Reset() { + *x = LabelOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelOperationMetadata) ProtoMessage() {} + +func (x *LabelOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{4} +} + +func (m *LabelOperationMetadata) GetDetails() isLabelOperationMetadata_Details { + if m != nil { + return m.Details + } + return nil +} + +func (x *LabelOperationMetadata) GetImageClassificationDetails() *LabelImageClassificationOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_ImageClassificationDetails); ok { + return x.ImageClassificationDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetImageBoundingBoxDetails() *LabelImageBoundingBoxOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_ImageBoundingBoxDetails); ok { + return x.ImageBoundingBoxDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetImageBoundingPolyDetails() *LabelImageBoundingPolyOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_ImageBoundingPolyDetails); ok { + return x.ImageBoundingPolyDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetImageOrientedBoundingBoxDetails() *LabelImageOrientedBoundingBoxOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_ImageOrientedBoundingBoxDetails); ok { + return x.ImageOrientedBoundingBoxDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetImagePolylineDetails() *LabelImagePolylineOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_ImagePolylineDetails); ok { + return x.ImagePolylineDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetImageSegmentationDetails() *LabelImageSegmentationOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_ImageSegmentationDetails); ok { + return x.ImageSegmentationDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetVideoClassificationDetails() *LabelVideoClassificationOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_VideoClassificationDetails); ok { + return x.VideoClassificationDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetVideoObjectDetectionDetails() *LabelVideoObjectDetectionOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_VideoObjectDetectionDetails); ok { + return x.VideoObjectDetectionDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetVideoObjectTrackingDetails() *LabelVideoObjectTrackingOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_VideoObjectTrackingDetails); ok { + return x.VideoObjectTrackingDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetVideoEventDetails() *LabelVideoEventOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_VideoEventDetails); ok { + return x.VideoEventDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetTextClassificationDetails() *LabelTextClassificationOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_TextClassificationDetails); ok { + return x.TextClassificationDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetTextEntityExtractionDetails() *LabelTextEntityExtractionOperationMetadata { + if x, ok := x.GetDetails().(*LabelOperationMetadata_TextEntityExtractionDetails); ok { + return x.TextEntityExtractionDetails + } + return nil +} + +func (x *LabelOperationMetadata) GetProgressPercent() int32 { + if x != nil { + return x.ProgressPercent + } + return 0 +} + +func (x *LabelOperationMetadata) GetPartialFailures() []*status.Status { + if x != nil { + return x.PartialFailures + } + return nil +} + +func (x *LabelOperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +type isLabelOperationMetadata_Details interface { + isLabelOperationMetadata_Details() +} + +type LabelOperationMetadata_ImageClassificationDetails struct { + // Details of label image classification operation. + ImageClassificationDetails *LabelImageClassificationOperationMetadata `protobuf:"bytes,3,opt,name=image_classification_details,json=imageClassificationDetails,proto3,oneof"` +} + +type LabelOperationMetadata_ImageBoundingBoxDetails struct { + // Details of label image bounding box operation. + ImageBoundingBoxDetails *LabelImageBoundingBoxOperationMetadata `protobuf:"bytes,4,opt,name=image_bounding_box_details,json=imageBoundingBoxDetails,proto3,oneof"` +} + +type LabelOperationMetadata_ImageBoundingPolyDetails struct { + // Details of label image bounding poly operation. + ImageBoundingPolyDetails *LabelImageBoundingPolyOperationMetadata `protobuf:"bytes,11,opt,name=image_bounding_poly_details,json=imageBoundingPolyDetails,proto3,oneof"` +} + +type LabelOperationMetadata_ImageOrientedBoundingBoxDetails struct { + // Details of label image oriented bounding box operation. + ImageOrientedBoundingBoxDetails *LabelImageOrientedBoundingBoxOperationMetadata `protobuf:"bytes,14,opt,name=image_oriented_bounding_box_details,json=imageOrientedBoundingBoxDetails,proto3,oneof"` +} + +type LabelOperationMetadata_ImagePolylineDetails struct { + // Details of label image polyline operation. + ImagePolylineDetails *LabelImagePolylineOperationMetadata `protobuf:"bytes,12,opt,name=image_polyline_details,json=imagePolylineDetails,proto3,oneof"` +} + +type LabelOperationMetadata_ImageSegmentationDetails struct { + // Details of label image segmentation operation. + ImageSegmentationDetails *LabelImageSegmentationOperationMetadata `protobuf:"bytes,15,opt,name=image_segmentation_details,json=imageSegmentationDetails,proto3,oneof"` +} + +type LabelOperationMetadata_VideoClassificationDetails struct { + // Details of label video classification operation. + VideoClassificationDetails *LabelVideoClassificationOperationMetadata `protobuf:"bytes,5,opt,name=video_classification_details,json=videoClassificationDetails,proto3,oneof"` +} + +type LabelOperationMetadata_VideoObjectDetectionDetails struct { + // Details of label video object detection operation. + VideoObjectDetectionDetails *LabelVideoObjectDetectionOperationMetadata `protobuf:"bytes,6,opt,name=video_object_detection_details,json=videoObjectDetectionDetails,proto3,oneof"` +} + +type LabelOperationMetadata_VideoObjectTrackingDetails struct { + // Details of label video object tracking operation. + VideoObjectTrackingDetails *LabelVideoObjectTrackingOperationMetadata `protobuf:"bytes,7,opt,name=video_object_tracking_details,json=videoObjectTrackingDetails,proto3,oneof"` +} + +type LabelOperationMetadata_VideoEventDetails struct { + // Details of label video event operation. + VideoEventDetails *LabelVideoEventOperationMetadata `protobuf:"bytes,8,opt,name=video_event_details,json=videoEventDetails,proto3,oneof"` +} + +type LabelOperationMetadata_TextClassificationDetails struct { + // Details of label text classification operation. + TextClassificationDetails *LabelTextClassificationOperationMetadata `protobuf:"bytes,9,opt,name=text_classification_details,json=textClassificationDetails,proto3,oneof"` +} + +type LabelOperationMetadata_TextEntityExtractionDetails struct { + // Details of label text entity extraction operation. + TextEntityExtractionDetails *LabelTextEntityExtractionOperationMetadata `protobuf:"bytes,13,opt,name=text_entity_extraction_details,json=textEntityExtractionDetails,proto3,oneof"` +} + +func (*LabelOperationMetadata_ImageClassificationDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_ImageBoundingBoxDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_ImageBoundingPolyDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_ImageOrientedBoundingBoxDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_ImagePolylineDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_ImageSegmentationDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_VideoClassificationDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_VideoObjectDetectionDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_VideoObjectTrackingDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_VideoEventDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_TextClassificationDetails) isLabelOperationMetadata_Details() {} + +func (*LabelOperationMetadata_TextEntityExtractionDetails) isLabelOperationMetadata_Details() {} + +// Metadata of a LabelImageClassification operation. +type LabelImageClassificationOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelImageClassificationOperationMetadata) Reset() { + *x = LabelImageClassificationOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImageClassificationOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImageClassificationOperationMetadata) ProtoMessage() {} + +func (x *LabelImageClassificationOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImageClassificationOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelImageClassificationOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{5} +} + +func (x *LabelImageClassificationOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelImageBoundingBox operation metadata. +type LabelImageBoundingBoxOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelImageBoundingBoxOperationMetadata) Reset() { + *x = LabelImageBoundingBoxOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImageBoundingBoxOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImageBoundingBoxOperationMetadata) ProtoMessage() {} + +func (x *LabelImageBoundingBoxOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImageBoundingBoxOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelImageBoundingBoxOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{6} +} + +func (x *LabelImageBoundingBoxOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelImageOrientedBoundingBox operation metadata. +type LabelImageOrientedBoundingBoxOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelImageOrientedBoundingBoxOperationMetadata) Reset() { + *x = LabelImageOrientedBoundingBoxOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImageOrientedBoundingBoxOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImageOrientedBoundingBoxOperationMetadata) ProtoMessage() {} + +func (x *LabelImageOrientedBoundingBoxOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImageOrientedBoundingBoxOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelImageOrientedBoundingBoxOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{7} +} + +func (x *LabelImageOrientedBoundingBoxOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of LabelImageBoundingPoly operation metadata. +type LabelImageBoundingPolyOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelImageBoundingPolyOperationMetadata) Reset() { + *x = LabelImageBoundingPolyOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImageBoundingPolyOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImageBoundingPolyOperationMetadata) ProtoMessage() {} + +func (x *LabelImageBoundingPolyOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImageBoundingPolyOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelImageBoundingPolyOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{8} +} + +func (x *LabelImageBoundingPolyOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of LabelImagePolyline operation metadata. +type LabelImagePolylineOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelImagePolylineOperationMetadata) Reset() { + *x = LabelImagePolylineOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImagePolylineOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImagePolylineOperationMetadata) ProtoMessage() {} + +func (x *LabelImagePolylineOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImagePolylineOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelImagePolylineOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{9} +} + +func (x *LabelImagePolylineOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelImageSegmentation operation metadata. +type LabelImageSegmentationOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelImageSegmentationOperationMetadata) Reset() { + *x = LabelImageSegmentationOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelImageSegmentationOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelImageSegmentationOperationMetadata) ProtoMessage() {} + +func (x *LabelImageSegmentationOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelImageSegmentationOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelImageSegmentationOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{10} +} + +func (x *LabelImageSegmentationOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelVideoClassification operation metadata. +type LabelVideoClassificationOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelVideoClassificationOperationMetadata) Reset() { + *x = LabelVideoClassificationOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelVideoClassificationOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelVideoClassificationOperationMetadata) ProtoMessage() {} + +func (x *LabelVideoClassificationOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelVideoClassificationOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelVideoClassificationOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{11} +} + +func (x *LabelVideoClassificationOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelVideoObjectDetection operation metadata. +type LabelVideoObjectDetectionOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelVideoObjectDetectionOperationMetadata) Reset() { + *x = LabelVideoObjectDetectionOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelVideoObjectDetectionOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelVideoObjectDetectionOperationMetadata) ProtoMessage() {} + +func (x *LabelVideoObjectDetectionOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelVideoObjectDetectionOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelVideoObjectDetectionOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{12} +} + +func (x *LabelVideoObjectDetectionOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelVideoObjectTracking operation metadata. +type LabelVideoObjectTrackingOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelVideoObjectTrackingOperationMetadata) Reset() { + *x = LabelVideoObjectTrackingOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelVideoObjectTrackingOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelVideoObjectTrackingOperationMetadata) ProtoMessage() {} + +func (x *LabelVideoObjectTrackingOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelVideoObjectTrackingOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelVideoObjectTrackingOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{13} +} + +func (x *LabelVideoObjectTrackingOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelVideoEvent operation metadata. +type LabelVideoEventOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelVideoEventOperationMetadata) Reset() { + *x = LabelVideoEventOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelVideoEventOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelVideoEventOperationMetadata) ProtoMessage() {} + +func (x *LabelVideoEventOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelVideoEventOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelVideoEventOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{14} +} + +func (x *LabelVideoEventOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelTextClassification operation metadata. +type LabelTextClassificationOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelTextClassificationOperationMetadata) Reset() { + *x = LabelTextClassificationOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelTextClassificationOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelTextClassificationOperationMetadata) ProtoMessage() {} + +func (x *LabelTextClassificationOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelTextClassificationOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelTextClassificationOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{15} +} + +func (x *LabelTextClassificationOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Details of a LabelTextEntityExtraction operation metadata. +type LabelTextEntityExtractionOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Basic human annotation config used in labeling request. + BasicConfig *HumanAnnotationConfig `protobuf:"bytes,1,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` +} + +func (x *LabelTextEntityExtractionOperationMetadata) Reset() { + *x = LabelTextEntityExtractionOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LabelTextEntityExtractionOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LabelTextEntityExtractionOperationMetadata) ProtoMessage() {} + +func (x *LabelTextEntityExtractionOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LabelTextEntityExtractionOperationMetadata.ProtoReflect.Descriptor instead. +func (*LabelTextEntityExtractionOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{16} +} + +func (x *LabelTextEntityExtractionOperationMetadata) GetBasicConfig() *HumanAnnotationConfig { + if x != nil { + return x.BasicConfig + } + return nil +} + +// Metadata of a CreateInstruction operation. +type CreateInstructionMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the created Instruction. + // projects/{project_id}/instructions/{instruction_id} + Instruction string `protobuf:"bytes,1,opt,name=instruction,proto3" json:"instruction,omitempty"` + // Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"` + // Timestamp when create instruction request was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *CreateInstructionMetadata) Reset() { + *x = CreateInstructionMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInstructionMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInstructionMetadata) ProtoMessage() {} + +func (x *CreateInstructionMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInstructionMetadata.ProtoReflect.Descriptor instead. +func (*CreateInstructionMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateInstructionMetadata) GetInstruction() string { + if x != nil { + return x.Instruction + } + return "" +} + +func (x *CreateInstructionMetadata) GetPartialFailures() []*status.Status { + if x != nil { + return x.PartialFailures + } + return nil +} + +func (x *CreateInstructionMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +var File_google_cloud_datalabeling_v1beta1_operations_proto protoreflect.FileDescriptor + +var file_google_cloud_datalabeling_v1beta1_operations_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, 0x75, 0x6d, 0x61, + 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x1b, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0xa1, 0x02, 0x0a, 0x1b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, + 0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x54, + 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0xb3, 0x01, 0x0a, 0x1b, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x3d, + 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x1b, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x83, 0x0f, 0x0a, 0x16, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x90, 0x01, 0x0a, 0x1c, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x1a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x88, + 0x01, 0x0a, 0x1a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, + 0x52, 0x17, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, + 0x6f, 0x78, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x1b, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x79, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x18, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x79, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x23, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x78, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x75, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x42, 0x6f, 0x78, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x7e, 0x0a, 0x16, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, + 0x6e, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x79, + 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x1a, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x4a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x18, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x1c, 0x76, 0x69, 0x64, + 0x65, 0x6f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, + 0x1a, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x1e, + 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, + 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x1d, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1a, 0x76, 0x69, 0x64, 0x65, + 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x75, 0x0a, 0x13, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, + 0x65, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x76, 0x69, 0x64, 0x65, + 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x8d, 0x01, + 0x0a, 0x1b, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, 0x78, + 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x19, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x94, 0x01, + 0x0a, 0x1e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x78, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x54, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x1b, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, + 0x3d, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x29, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, + 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0x85, 0x01, 0x0a, 0x26, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8d, 0x01, 0x0a, 0x2e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x65, 0x64, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x78, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x27, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x50, 0x6f, 0x6c, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x82, 0x01, 0x0a, 0x23, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x86, 0x01, 0x0a, 0x27, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, + 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0x88, 0x01, 0x0a, 0x29, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, + 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x89, 0x01, 0x0a, 0x2a, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, + 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x88, 0x01, 0x0a, 0x29, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x61, 0x63, + 0x6b, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x7f, 0x0a, 0x20, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x87, 0x01, 0x0a, 0x28, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, 0x78, + 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0b, 0x62, 0x61, 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x89, 0x01, + 0x0a, 0x2a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5b, 0x0a, 0x0c, + 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xb9, 0x01, 0x0a, 0x19, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x10, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, + 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x42, 0xe7, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, + 0x01, 0x5a, 0x4d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0xaa, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x21, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescOnce sync.Once + file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescData = file_google_cloud_datalabeling_v1beta1_operations_proto_rawDesc +) + +func file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescGZIP() []byte { + file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescOnce.Do(func() { + file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescData) + }) + return file_google_cloud_datalabeling_v1beta1_operations_proto_rawDescData +} + +var file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_google_cloud_datalabeling_v1beta1_operations_proto_goTypes = []interface{}{ + (*ImportDataOperationResponse)(nil), // 0: google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + (*ExportDataOperationResponse)(nil), // 1: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + (*ImportDataOperationMetadata)(nil), // 2: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + (*ExportDataOperationMetadata)(nil), // 3: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + (*LabelOperationMetadata)(nil), // 4: google.cloud.datalabeling.v1beta1.LabelOperationMetadata + (*LabelImageClassificationOperationMetadata)(nil), // 5: google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + (*LabelImageBoundingBoxOperationMetadata)(nil), // 6: google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + (*LabelImageOrientedBoundingBoxOperationMetadata)(nil), // 7: google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + (*LabelImageBoundingPolyOperationMetadata)(nil), // 8: google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + (*LabelImagePolylineOperationMetadata)(nil), // 9: google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + (*LabelImageSegmentationOperationMetadata)(nil), // 10: google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + (*LabelVideoClassificationOperationMetadata)(nil), // 11: google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + (*LabelVideoObjectDetectionOperationMetadata)(nil), // 12: google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + (*LabelVideoObjectTrackingOperationMetadata)(nil), // 13: google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + (*LabelVideoEventOperationMetadata)(nil), // 14: google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + (*LabelTextClassificationOperationMetadata)(nil), // 15: google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + (*LabelTextEntityExtractionOperationMetadata)(nil), // 16: google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + (*CreateInstructionMetadata)(nil), // 17: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata + (*LabelStats)(nil), // 18: google.cloud.datalabeling.v1beta1.LabelStats + (*OutputConfig)(nil), // 19: google.cloud.datalabeling.v1beta1.OutputConfig + (*status.Status)(nil), // 20: google.rpc.Status + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp + (*HumanAnnotationConfig)(nil), // 22: google.cloud.datalabeling.v1beta1.HumanAnnotationConfig +} +var file_google_cloud_datalabeling_v1beta1_operations_proto_depIdxs = []int32{ + 18, // 0: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.label_stats:type_name -> google.cloud.datalabeling.v1beta1.LabelStats + 19, // 1: google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.output_config:type_name -> google.cloud.datalabeling.v1beta1.OutputConfig + 20, // 2: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.partial_failures:type_name -> google.rpc.Status + 21, // 3: google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 20, // 4: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.partial_failures:type_name -> google.rpc.Status + 21, // 5: google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 5, // 6: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.image_classification_details:type_name -> google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + 6, // 7: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.image_bounding_box_details:type_name -> google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + 8, // 8: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.image_bounding_poly_details:type_name -> google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + 7, // 9: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.image_oriented_bounding_box_details:type_name -> google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + 9, // 10: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.image_polyline_details:type_name -> google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + 10, // 11: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.image_segmentation_details:type_name -> google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + 11, // 12: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.video_classification_details:type_name -> google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + 12, // 13: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.video_object_detection_details:type_name -> google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + 13, // 14: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.video_object_tracking_details:type_name -> google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + 14, // 15: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.video_event_details:type_name -> google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + 15, // 16: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.text_classification_details:type_name -> google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + 16, // 17: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.text_entity_extraction_details:type_name -> google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + 20, // 18: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.partial_failures:type_name -> google.rpc.Status + 21, // 19: google.cloud.datalabeling.v1beta1.LabelOperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 22, // 20: google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 21: google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 22: google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 23: google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 24: google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 25: google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 26: google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 27: google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 28: google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 29: google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 30: google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 22, // 31: google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata.basic_config:type_name -> google.cloud.datalabeling.v1beta1.HumanAnnotationConfig + 20, // 32: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.partial_failures:type_name -> google.rpc.Status + 21, // 33: google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.create_time:type_name -> google.protobuf.Timestamp + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_google_cloud_datalabeling_v1beta1_operations_proto_init() } +func file_google_cloud_datalabeling_v1beta1_operations_proto_init() { + if File_google_cloud_datalabeling_v1beta1_operations_proto != nil { + return + } + file_google_cloud_datalabeling_v1beta1_dataset_proto_init() + file_google_cloud_datalabeling_v1beta1_human_annotation_config_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDataOperationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataOperationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDataOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDataOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImageClassificationOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImageBoundingBoxOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImageOrientedBoundingBoxOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImageBoundingPolyOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImagePolylineOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelImageSegmentationOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelVideoClassificationOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelVideoObjectDetectionOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelVideoObjectTrackingOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelVideoEventOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelTextClassificationOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LabelTextEntityExtractionOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateInstructionMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*LabelOperationMetadata_ImageClassificationDetails)(nil), + (*LabelOperationMetadata_ImageBoundingBoxDetails)(nil), + (*LabelOperationMetadata_ImageBoundingPolyDetails)(nil), + (*LabelOperationMetadata_ImageOrientedBoundingBoxDetails)(nil), + (*LabelOperationMetadata_ImagePolylineDetails)(nil), + (*LabelOperationMetadata_ImageSegmentationDetails)(nil), + (*LabelOperationMetadata_VideoClassificationDetails)(nil), + (*LabelOperationMetadata_VideoObjectDetectionDetails)(nil), + (*LabelOperationMetadata_VideoObjectTrackingDetails)(nil), + (*LabelOperationMetadata_VideoEventDetails)(nil), + (*LabelOperationMetadata_TextClassificationDetails)(nil), + (*LabelOperationMetadata_TextEntityExtractionDetails)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datalabeling_v1beta1_operations_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datalabeling_v1beta1_operations_proto_goTypes, + DependencyIndexes: file_google_cloud_datalabeling_v1beta1_operations_proto_depIdxs, + MessageInfos: file_google_cloud_datalabeling_v1beta1_operations_proto_msgTypes, + }.Build() + File_google_cloud_datalabeling_v1beta1_operations_proto = out.File + file_google_cloud_datalabeling_v1beta1_operations_proto_rawDesc = nil + file_google_cloud_datalabeling_v1beta1_operations_proto_goTypes = nil + file_google_cloud_datalabeling_v1beta1_operations_proto_depIdxs = nil +} diff --git a/datalabeling/apiv1beta1/doc.go b/datalabeling/apiv1beta1/doc.go index 25b40c7bcb36..36c0931588c6 100644 --- a/datalabeling/apiv1beta1/doc.go +++ b/datalabeling/apiv1beta1/doc.go @@ -19,45 +19,56 @@ // // Public API for Google Cloud AI Data Labeling Service. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// NOTE: This package is in beta. It is not stable, and may be subject to changes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datalabeling.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datalabeling.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datalabeling.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &datalabelingpb.CreateDatasetRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1#CreateDatasetRequest. -// } -// resp, err := c.CreateDataset(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datalabeling.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &datalabelingpb.CreateDatasetRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1#CreateDatasetRequest. +// } +// resp, err := c.CreateDataset(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. @@ -71,6 +82,8 @@ package datalabeling // import "cloud.google.com/go/datalabeling/apiv1beta1" import ( "context" + "fmt" + "net/http" "os" "runtime" "strconv" @@ -159,3 +172,22 @@ func versionGo() string { } return "UNKNOWN" } + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/datalabeling/apiv1beta1/gapic_metadata.json b/datalabeling/apiv1beta1/gapic_metadata.json index bc3f8733da35..33fd26deb7b8 100644 --- a/datalabeling/apiv1beta1/gapic_metadata.json +++ b/datalabeling/apiv1beta1/gapic_metadata.json @@ -181,6 +181,181 @@ ] } } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CreateAnnotationSpecSet": { + "methods": [ + "CreateAnnotationSpecSet" + ] + }, + "CreateDataset": { + "methods": [ + "CreateDataset" + ] + }, + "CreateEvaluationJob": { + "methods": [ + "CreateEvaluationJob" + ] + }, + "CreateInstruction": { + "methods": [ + "CreateInstruction" + ] + }, + "DeleteAnnotatedDataset": { + "methods": [ + "DeleteAnnotatedDataset" + ] + }, + "DeleteAnnotationSpecSet": { + "methods": [ + "DeleteAnnotationSpecSet" + ] + }, + "DeleteDataset": { + "methods": [ + "DeleteDataset" + ] + }, + "DeleteEvaluationJob": { + "methods": [ + "DeleteEvaluationJob" + ] + }, + "DeleteInstruction": { + "methods": [ + "DeleteInstruction" + ] + }, + "ExportData": { + "methods": [ + "ExportData" + ] + }, + "GetAnnotatedDataset": { + "methods": [ + "GetAnnotatedDataset" + ] + }, + "GetAnnotationSpecSet": { + "methods": [ + "GetAnnotationSpecSet" + ] + }, + "GetDataItem": { + "methods": [ + "GetDataItem" + ] + }, + "GetDataset": { + "methods": [ + "GetDataset" + ] + }, + "GetEvaluation": { + "methods": [ + "GetEvaluation" + ] + }, + "GetEvaluationJob": { + "methods": [ + "GetEvaluationJob" + ] + }, + "GetExample": { + "methods": [ + "GetExample" + ] + }, + "GetInstruction": { + "methods": [ + "GetInstruction" + ] + }, + "ImportData": { + "methods": [ + "ImportData" + ] + }, + "LabelImage": { + "methods": [ + "LabelImage" + ] + }, + "LabelText": { + "methods": [ + "LabelText" + ] + }, + "LabelVideo": { + "methods": [ + "LabelVideo" + ] + }, + "ListAnnotatedDatasets": { + "methods": [ + "ListAnnotatedDatasets" + ] + }, + "ListAnnotationSpecSets": { + "methods": [ + "ListAnnotationSpecSets" + ] + }, + "ListDataItems": { + "methods": [ + "ListDataItems" + ] + }, + "ListDatasets": { + "methods": [ + "ListDatasets" + ] + }, + "ListEvaluationJobs": { + "methods": [ + "ListEvaluationJobs" + ] + }, + "ListExamples": { + "methods": [ + "ListExamples" + ] + }, + "ListInstructions": { + "methods": [ + "ListInstructions" + ] + }, + "PauseEvaluationJob": { + "methods": [ + "PauseEvaluationJob" + ] + }, + "ResumeEvaluationJob": { + "methods": [ + "ResumeEvaluationJob" + ] + }, + "SearchEvaluations": { + "methods": [ + "SearchEvaluations" + ] + }, + "SearchExampleComparisons": { + "methods": [ + "SearchExampleComparisons" + ] + }, + "UpdateEvaluationJob": { + "methods": [ + "UpdateEvaluationJob" + ] + } + } } } } diff --git a/datalabeling/go.mod b/datalabeling/go.mod index 689fd40dae23..fa0e4a08f50e 100644 --- a/datalabeling/go.mod +++ b/datalabeling/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/datalabeling -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/datalabeling/go.sum b/datalabeling/go.sum index f00d995cec43..fe8755ea9d8f 100644 --- a/datalabeling/go.sum +++ b/datalabeling/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f h1:hJ/Y5SqPXbarffmAsApliUlcvMU+wScNGfyop4bZm8o= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +621,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +638,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/datalabeling/go_mod_tidy_hack.go b/datalabeling/go_mod_tidy_hack.go deleted file mode 100644 index 91b972954b55..000000000000 --- a/datalabeling/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package datalabeling - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/datalabeling/internal/version.go b/datalabeling/internal/version.go index 2d40693cc33f..d0d3f79115b7 100644 --- a/datalabeling/internal/version.go +++ b/datalabeling/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.3.0" +const Version = "0.5.0" diff --git a/dataplex/CHANGES.md b/dataplex/CHANGES.md index ad2bd7a4db32..338eebd24e46 100644 --- a/dataplex/CHANGES.md +++ b/dataplex/CHANGES.md @@ -1,6 +1,13 @@ # Changes +## [1.1.0](https://github.com/googleapis/google-cloud-go/compare/dataplex/v1.0.0...dataplex/v1.1.0) (2022-07-19) + + +### Features + +* **dataplex:** Add IAM support for Explore content APIs feat: Add support for custom container for Task feat: Add support for cross project for Task feat: Add support for custom encryption key to be used for encrypt data on the PDs associated with the VMs in your Dataproc cluster for Task feat: Add support for Latest job in Task resource feat: User mode filter in Explore list sessions API feat: Support logging sampled file paths per partition to Cloud logging for Discovery event ([8b17366](https://github.com/googleapis/google-cloud-go/commit/8b17366c46bbd8a0b2adf39ec3b058eb83192933)) + ## [1.0.0](https://github.com/googleapis/google-cloud-go/compare/dataplex/v0.4.0...dataplex/v1.0.0) (2022-06-29) diff --git a/dataplex/apiv1/content_client.go b/dataplex/apiv1/content_client.go index 04e989c6f699..f59cafb633f5 100644 --- a/dataplex/apiv1/content_client.go +++ b/dataplex/apiv1/content_client.go @@ -21,6 +21,7 @@ import ( "fmt" "math" "net/url" + "time" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" @@ -28,7 +29,11 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dataplexpb "google.golang.org/genproto/googleapis/cloud/dataplex/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/protobuf/proto" ) @@ -37,11 +42,20 @@ var newContentClientHook clientHook // ContentCallOptions contains the retry settings for each method of ContentClient. type ContentCallOptions struct { - CreateContent []gax.CallOption - UpdateContent []gax.CallOption - DeleteContent []gax.CallOption - GetContent []gax.CallOption - ListContent []gax.CallOption + CreateContent []gax.CallOption + UpdateContent []gax.CallOption + DeleteContent []gax.CallOption + GetContent []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + ListContent []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultContentGRPCClientOptions() []option.ClientOption { @@ -61,8 +75,57 @@ func defaultContentCallOptions() *ContentCallOptions { CreateContent: []gax.CallOption{}, UpdateContent: []gax.CallOption{}, DeleteContent: []gax.CallOption{}, - GetContent: []gax.CallOption{}, - ListContent: []gax.CallOption{}, + GetContent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetIamPolicy: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListContent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -75,7 +138,16 @@ type internalContentClient interface { UpdateContent(context.Context, *dataplexpb.UpdateContentRequest, ...gax.CallOption) (*dataplexpb.Content, error) DeleteContent(context.Context, *dataplexpb.DeleteContentRequest, ...gax.CallOption) error GetContent(context.Context, *dataplexpb.GetContentRequest, ...gax.CallOption) (*dataplexpb.Content, error) + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) ListContent(context.Context, *dataplexpb.ListContentRequest, ...gax.CallOption) *ContentIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ContentClient is a client for interacting with Cloud Dataplex API. @@ -107,7 +179,8 @@ func (c *ContentClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ContentClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -132,11 +205,74 @@ func (c *ContentClient) GetContent(ctx context.Context, req *dataplexpb.GetConte return c.internalClient.GetContent(ctx, req, opts...) } +// GetIamPolicy gets the access control policy for a contentitem resource. A NOT_FOUND +// error is returned if the resource does not exist. An empty policy is +// returned if the resource exists but does not have a policy set on it. +// +// Caller must have Google IAM dataplex.content.getIamPolicy permission +// on the resource. +func (c *ContentClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified contentitem resource. +// Replaces any existing policy. +// +// Caller must have Google IAM dataplex.content.setIamPolicy permission +// on the resource. +func (c *ContentClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns the caller’s permissions on a resource. +// If the resource does not exist, an empty set of +// permissions is returned (a NOT_FOUND error is not returned). +// +// A caller is not required to have Google IAM permission to make this +// request. +// +// Note: This operation is designed to be used for building permission-aware +// UIs and command-line tools, not for authorization checking. This operation +// may “fail open” without warning. +func (c *ContentClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + // ListContent list content. func (c *ContentClient) ListContent(ctx context.Context, req *dataplexpb.ListContentRequest, opts ...gax.CallOption) *ContentIterator { return c.internalClient.ListContent(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *ContentClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ContentClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ContentClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *ContentClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ContentClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ContentClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // contentGRPCClient is a client for interacting with Cloud Dataplex API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -153,6 +289,10 @@ type contentGRPCClient struct { // The gRPC API client. contentClient dataplexpb.ContentServiceClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -187,6 +327,8 @@ func NewContentClient(ctx context.Context, opts ...option.ClientOption) (*Conten disableDeadlines: disableDeadlines, contentClient: dataplexpb.NewContentServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -197,7 +339,8 @@ func NewContentClient(ctx context.Context, opts ...option.ClientOption) (*Conten // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *contentGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -218,6 +361,11 @@ func (c *contentGRPCClient) Close() error { } func (c *contentGRPCClient) CreateContent(ctx context.Context, req *dataplexpb.CreateContentRequest, opts ...gax.CallOption) (*dataplexpb.Content, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -235,6 +383,11 @@ func (c *contentGRPCClient) CreateContent(ctx context.Context, req *dataplexpb.C } func (c *contentGRPCClient) UpdateContent(ctx context.Context, req *dataplexpb.UpdateContentRequest, opts ...gax.CallOption) (*dataplexpb.Content, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "content.name", url.QueryEscape(req.GetContent().GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -252,6 +405,11 @@ func (c *contentGRPCClient) UpdateContent(ctx context.Context, req *dataplexpb.U } func (c *contentGRPCClient) DeleteContent(ctx context.Context, req *dataplexpb.DeleteContentRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -265,6 +423,11 @@ func (c *contentGRPCClient) DeleteContent(ctx context.Context, req *dataplexpb.D } func (c *contentGRPCClient) GetContent(ctx context.Context, req *dataplexpb.GetContentRequest, opts ...gax.CallOption) (*dataplexpb.Content, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -281,6 +444,72 @@ func (c *contentGRPCClient) GetContent(ctx context.Context, req *dataplexpb.GetC return resp, nil } +func (c *contentGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contentClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contentGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contentClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contentGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contentClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + func (c *contentGRPCClient) ListContent(ctx context.Context, req *dataplexpb.ListContentRequest, opts ...gax.CallOption) *ContentIterator { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -326,6 +555,156 @@ func (c *contentGRPCClient) ListContent(ctx context.Context, req *dataplexpb.Lis return it } +func (c *contentGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contentGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *contentGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *contentGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *contentGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contentGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ContentIterator manages a stream of *dataplexpb.Content. type ContentIterator struct { items []*dataplexpb.Content @@ -372,3 +751,97 @@ func (it *ContentIterator) takeBuf() interface{} { it.items = nil return b } + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dataplex/apiv1/content_client_example_test.go b/dataplex/apiv1/content_client_example_test.go index 74b6c34bfc1a..e970393fe47f 100644 --- a/dataplex/apiv1/content_client_example_test.go +++ b/dataplex/apiv1/content_client_example_test.go @@ -22,10 +22,18 @@ import ( dataplex "cloud.google.com/go/dataplex/apiv1" "google.golang.org/api/iterator" dataplexpb "google.golang.org/genproto/googleapis/cloud/dataplex/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + iampb "google.golang.org/genproto/googleapis/iam/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewContentClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewContentClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +46,11 @@ func ExampleNewContentClient() { func ExampleContentClient_CreateContent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewContentClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +71,11 @@ func ExampleContentClient_CreateContent() { func ExampleContentClient_UpdateContent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewContentClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +96,11 @@ func ExampleContentClient_UpdateContent() { func ExampleContentClient_DeleteContent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewContentClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +119,11 @@ func ExampleContentClient_DeleteContent() { func ExampleContentClient_GetContent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewContentClient(ctx) if err != nil { // TODO: Handle error. @@ -114,8 +142,88 @@ func ExampleContentClient_GetContent() { _ = resp } +func ExampleContentClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContentClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContentClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleContentClient_ListContent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewContentClient(ctx) if err != nil { // TODO: Handle error. @@ -139,3 +247,161 @@ func ExampleContentClient_ListContent() { _ = resp } } + +func ExampleContentClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContentClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleContentClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleContentClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleContentClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContentClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewContentClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dataplex/apiv1/dataplex_client.go b/dataplex/apiv1/dataplex_client.go index 98ca9f8672da..bbd7a0522134 100644 --- a/dataplex/apiv1/dataplex_client.go +++ b/dataplex/apiv1/dataplex_client.go @@ -31,6 +31,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dataplexpb "google.golang.org/genproto/googleapis/cloud/dataplex/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -74,6 +75,12 @@ type CallOptions struct { ListEnvironments []gax.CallOption GetEnvironment []gax.CallOption ListSessions []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -249,9 +256,35 @@ func defaultCallOptions() *CallOptions { CreateEnvironment: []gax.CallOption{}, UpdateEnvironment: []gax.CallOption{}, DeleteEnvironment: []gax.CallOption{}, - ListEnvironments: []gax.CallOption{}, - GetEnvironment: []gax.CallOption{}, - ListSessions: []gax.CallOption{}, + ListEnvironments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListSessions: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -307,6 +340,12 @@ type internalClient interface { ListEnvironments(context.Context, *dataplexpb.ListEnvironmentsRequest, ...gax.CallOption) *EnvironmentIterator GetEnvironment(context.Context, *dataplexpb.GetEnvironmentRequest, ...gax.CallOption) (*dataplexpb.Environment, error) ListSessions(context.Context, *dataplexpb.ListSessionsRequest, ...gax.CallOption) *SessionIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // Client is a client for interacting with Cloud Dataplex API. @@ -314,9 +353,9 @@ type internalClient interface { // // Dataplex service provides data lakes as a service. The primary resources // offered by this service are Lakes, Zones and Assets which collectively allow -// a data adminstrator to organize, manage, secure and catalog data across their -// organization located across cloud projects in a variety of storage systems -// including Cloud Storage and BigQuery. +// a data administrator to organize, manage, secure and catalog data across +// their organization located across cloud projects in a variety of storage +// systems including Cloud Storage and BigQuery. type Client struct { // The internal transport-dependent client. internalClient internalClient @@ -347,7 +386,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -606,6 +646,36 @@ func (c *Client) ListSessions(ctx context.Context, req *dataplexpb.ListSessionsR return c.internalClient.ListSessions(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Cloud Dataplex API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -627,6 +697,10 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -636,9 +710,9 @@ type gRPCClient struct { // // Dataplex service provides data lakes as a service. The primary resources // offered by this service are Lakes, Zones and Assets which collectively allow -// a data adminstrator to organize, manage, secure and catalog data across their -// organization located across cloud projects in a variety of storage systems -// including Cloud Storage and BigQuery. +// a data administrator to organize, manage, secure and catalog data across +// their organization located across cloud projects in a variety of storage +// systems including Cloud Storage and BigQuery. func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := defaultGRPCClientOptions() if newClientHook != nil { @@ -665,6 +739,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: dataplexpb.NewDataplexServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -686,7 +762,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -1483,6 +1560,11 @@ func (c *gRPCClient) CancelJob(ctx context.Context, req *dataplexpb.CancelJobReq } func (c *gRPCClient) CreateEnvironment(ctx context.Context, req *dataplexpb.CreateEnvironmentRequest, opts ...gax.CallOption) (*CreateEnvironmentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -1502,6 +1584,11 @@ func (c *gRPCClient) CreateEnvironment(ctx context.Context, req *dataplexpb.Crea } func (c *gRPCClient) UpdateEnvironment(ctx context.Context, req *dataplexpb.UpdateEnvironmentRequest, opts ...gax.CallOption) (*UpdateEnvironmentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "environment.name", url.QueryEscape(req.GetEnvironment().GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -1521,6 +1608,11 @@ func (c *gRPCClient) UpdateEnvironment(ctx context.Context, req *dataplexpb.Upda } func (c *gRPCClient) DeleteEnvironment(ctx context.Context, req *dataplexpb.DeleteEnvironmentRequest, opts ...gax.CallOption) (*DeleteEnvironmentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -1585,6 +1677,11 @@ func (c *gRPCClient) ListEnvironments(ctx context.Context, req *dataplexpb.ListE } func (c *gRPCClient) GetEnvironment(ctx context.Context, req *dataplexpb.GetEnvironmentRequest, opts ...gax.CallOption) (*dataplexpb.Environment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -1646,6 +1743,156 @@ func (c *gRPCClient) ListSessions(ctx context.Context, req *dataplexpb.ListSessi return it } +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateAssetOperation manages a long-running operation from CreateAsset. type CreateAssetOperation struct { lro *longrunning.Operation diff --git a/dataplex/apiv1/dataplex_client_example_test.go b/dataplex/apiv1/dataplex_client_example_test.go index e7379eaf4bf8..f4a1af5fc633 100644 --- a/dataplex/apiv1/dataplex_client_example_test.go +++ b/dataplex/apiv1/dataplex_client_example_test.go @@ -22,10 +22,17 @@ import ( dataplex "cloud.google.com/go/dataplex/apiv1" "google.golang.org/api/iterator" dataplexpb "google.golang.org/genproto/googleapis/cloud/dataplex/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewClient() { func ExampleClient_CreateLake() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +75,11 @@ func ExampleClient_CreateLake() { func ExampleClient_UpdateLake() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -88,6 +105,11 @@ func ExampleClient_UpdateLake() { func ExampleClient_DeleteLake() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -111,6 +133,11 @@ func ExampleClient_DeleteLake() { func ExampleClient_ListLakes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +164,11 @@ func ExampleClient_ListLakes() { func ExampleClient_GetLake() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +189,11 @@ func ExampleClient_GetLake() { func ExampleClient_ListLakeActions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +220,11 @@ func ExampleClient_ListLakeActions() { func ExampleClient_CreateZone() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +250,11 @@ func ExampleClient_CreateZone() { func ExampleClient_UpdateZone() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -233,6 +280,11 @@ func ExampleClient_UpdateZone() { func ExampleClient_DeleteZone() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -256,6 +308,11 @@ func ExampleClient_DeleteZone() { func ExampleClient_ListZones() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -282,6 +339,11 @@ func ExampleClient_ListZones() { func ExampleClient_GetZone() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +364,11 @@ func ExampleClient_GetZone() { func ExampleClient_ListZoneActions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -328,6 +395,11 @@ func ExampleClient_ListZoneActions() { func ExampleClient_CreateAsset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -353,6 +425,11 @@ func ExampleClient_CreateAsset() { func ExampleClient_UpdateAsset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -378,6 +455,11 @@ func ExampleClient_UpdateAsset() { func ExampleClient_DeleteAsset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -401,6 +483,11 @@ func ExampleClient_DeleteAsset() { func ExampleClient_ListAssets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -427,6 +514,11 @@ func ExampleClient_ListAssets() { func ExampleClient_GetAsset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -447,6 +539,11 @@ func ExampleClient_GetAsset() { func ExampleClient_ListAssetActions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -473,6 +570,11 @@ func ExampleClient_ListAssetActions() { func ExampleClient_CreateTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -498,6 +600,11 @@ func ExampleClient_CreateTask() { func ExampleClient_UpdateTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -523,6 +630,11 @@ func ExampleClient_UpdateTask() { func ExampleClient_DeleteTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -546,6 +658,11 @@ func ExampleClient_DeleteTask() { func ExampleClient_ListTasks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -572,6 +689,11 @@ func ExampleClient_ListTasks() { func ExampleClient_GetTask() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -592,6 +714,11 @@ func ExampleClient_GetTask() { func ExampleClient_ListJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -618,6 +745,11 @@ func ExampleClient_ListJobs() { func ExampleClient_GetJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -638,6 +770,11 @@ func ExampleClient_GetJob() { func ExampleClient_CancelJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -656,6 +793,11 @@ func ExampleClient_CancelJob() { func ExampleClient_CreateEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -681,6 +823,11 @@ func ExampleClient_CreateEnvironment() { func ExampleClient_UpdateEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -706,6 +853,11 @@ func ExampleClient_UpdateEnvironment() { func ExampleClient_DeleteEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -729,6 +881,11 @@ func ExampleClient_DeleteEnvironment() { func ExampleClient_ListEnvironments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -755,6 +912,11 @@ func ExampleClient_ListEnvironments() { func ExampleClient_GetEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -775,6 +937,11 @@ func ExampleClient_GetEnvironment() { func ExampleClient_ListSessions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -798,3 +965,161 @@ func ExampleClient_ListSessions() { _ = resp } } + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dataplex/apiv1/doc.go b/dataplex/apiv1/doc.go index 638a504ab786..e974d4083840 100644 --- a/dataplex/apiv1/doc.go +++ b/dataplex/apiv1/doc.go @@ -19,45 +19,56 @@ // // Dataplex API is used to manage the lifecycle of data lakes. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := dataplex.NewContentClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataplex.NewContentClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := dataplex.NewContentClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &dataplexpb.CreateContentRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataplex/v1#CreateContentRequest. -// } -// resp, err := c.CreateContent(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataplex.NewContentClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dataplexpb.CreateContentRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataplex/v1#CreateContentRequest. +// } +// resp, err := c.CreateContent(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewContentClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/dataplex/apiv1/gapic_metadata.json b/dataplex/apiv1/gapic_metadata.json index 792388743357..e1c77a798360 100644 --- a/dataplex/apiv1/gapic_metadata.json +++ b/dataplex/apiv1/gapic_metadata.json @@ -10,6 +10,11 @@ "grpc": { "libraryClient": "ContentClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateContent": { "methods": [ "CreateContent" @@ -20,16 +25,56 @@ "DeleteContent" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, "GetContent": { "methods": [ "GetContent" ] }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListContent": { "methods": [ "ListContent" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, "UpdateContent": { "methods": [ "UpdateContent" @@ -49,6 +94,11 @@ "CancelJob" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateAsset": { "methods": [ "CreateAsset" @@ -89,6 +139,11 @@ "DeleteLake" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, "DeleteTask": { "methods": [ "DeleteTask" @@ -119,6 +174,16 @@ "GetLake" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetTask": { "methods": [ "GetTask" @@ -159,6 +224,16 @@ "ListLakes" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListSessions": { "methods": [ "ListSessions" @@ -213,6 +288,11 @@ "grpc": { "libraryClient": "MetadataClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateEntity": { "methods": [ "CreateEntity" @@ -228,6 +308,11 @@ "DeleteEntity" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, "DeletePartition": { "methods": [ "DeletePartition" @@ -238,6 +323,16 @@ "GetEntity" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetPartition": { "methods": [ "GetPartition" @@ -248,6 +343,16 @@ "ListEntities" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListPartitions": { "methods": [ "ListPartitions" diff --git a/dataplex/apiv1/metadata_client.go b/dataplex/apiv1/metadata_client.go index 0c90f399de43..913602b289f0 100644 --- a/dataplex/apiv1/metadata_client.go +++ b/dataplex/apiv1/metadata_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dataplexpb "google.golang.org/genproto/googleapis/cloud/dataplex/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -48,6 +50,12 @@ type MetadataCallOptions struct { DeletePartition []gax.CallOption GetPartition []gax.CallOption ListPartitions []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultMetadataGRPCClientOptions() []option.ClientOption { @@ -113,6 +121,12 @@ func defaultMetadataCallOptions() *MetadataCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -130,6 +144,12 @@ type internalMetadataClient interface { DeletePartition(context.Context, *dataplexpb.DeletePartitionRequest, ...gax.CallOption) error GetPartition(context.Context, *dataplexpb.GetPartitionRequest, ...gax.CallOption) (*dataplexpb.Partition, error) ListPartitions(context.Context, *dataplexpb.ListPartitionsRequest, ...gax.CallOption) *PartitionIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // MetadataClient is a client for interacting with Cloud Dataplex API. @@ -162,7 +182,8 @@ func (c *MetadataClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *MetadataClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -212,6 +233,36 @@ func (c *MetadataClient) ListPartitions(ctx context.Context, req *dataplexpb.Lis return c.internalClient.ListPartitions(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *MetadataClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *MetadataClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *MetadataClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *MetadataClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *MetadataClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *MetadataClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // metadataGRPCClient is a client for interacting with Cloud Dataplex API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -228,6 +279,10 @@ type metadataGRPCClient struct { // The gRPC API client. metadataClient dataplexpb.MetadataServiceClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -263,6 +318,8 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad disableDeadlines: disableDeadlines, metadataClient: dataplexpb.NewMetadataServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -273,7 +330,8 @@ func NewMetadataClient(ctx context.Context, opts ...option.ClientOption) (*Metad // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *metadataGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -529,6 +587,156 @@ func (c *metadataGRPCClient) ListPartitions(ctx context.Context, req *dataplexpb return it } +func (c *metadataGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *metadataGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *metadataGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *metadataGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *metadataGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *metadataGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // EntityIterator manages a stream of *dataplexpb.Entity. type EntityIterator struct { items []*dataplexpb.Entity diff --git a/dataplex/apiv1/metadata_client_example_test.go b/dataplex/apiv1/metadata_client_example_test.go index 8cdb5ac00a42..c3b8766df014 100644 --- a/dataplex/apiv1/metadata_client_example_test.go +++ b/dataplex/apiv1/metadata_client_example_test.go @@ -22,10 +22,17 @@ import ( dataplex "cloud.google.com/go/dataplex/apiv1" "google.golang.org/api/iterator" dataplexpb "google.golang.org/genproto/googleapis/cloud/dataplex/v1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewMetadataClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewMetadataClient() { func ExampleMetadataClient_CreateEntity() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +70,11 @@ func ExampleMetadataClient_CreateEntity() { func ExampleMetadataClient_UpdateEntity() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +95,11 @@ func ExampleMetadataClient_UpdateEntity() { func ExampleMetadataClient_DeleteEntity() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +118,11 @@ func ExampleMetadataClient_DeleteEntity() { func ExampleMetadataClient_GetEntity() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -116,6 +143,11 @@ func ExampleMetadataClient_GetEntity() { func ExampleMetadataClient_ListEntities() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +174,11 @@ func ExampleMetadataClient_ListEntities() { func ExampleMetadataClient_CreatePartition() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +199,11 @@ func ExampleMetadataClient_CreatePartition() { func ExampleMetadataClient_DeletePartition() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +222,11 @@ func ExampleMetadataClient_DeletePartition() { func ExampleMetadataClient_GetPartition() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -200,6 +247,11 @@ func ExampleMetadataClient_GetPartition() { func ExampleMetadataClient_ListPartitions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataplex.NewMetadataClient(ctx) if err != nil { // TODO: Handle error. @@ -223,3 +275,161 @@ func ExampleMetadataClient_ListPartitions() { _ = resp } } + +func ExampleMetadataClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewMetadataClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleMetadataClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewMetadataClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleMetadataClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewMetadataClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleMetadataClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewMetadataClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleMetadataClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewMetadataClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleMetadataClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dataplex.NewMetadataClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dataplex/go.mod b/dataplex/go.mod index bb19c3d2848a..ff8d2c9b4346 100644 --- a/dataplex/go.mod +++ b/dataplex/go.mod @@ -5,10 +5,10 @@ go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 ) require ( @@ -18,9 +18,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect go.opencensus.io v0.23.0 // indirect - golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect ) diff --git a/dataplex/go.sum b/dataplex/go.sum index f00d995cec43..c796dcdc6677 100644 --- a/dataplex/go.sum +++ b/dataplex/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/dataplex/internal/version.go b/dataplex/internal/version.go index db6d2e3e99d1..6aea1adc121f 100644 --- a/dataplex/internal/version.go +++ b/dataplex/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.0.0" +const Version = "1.1.0" diff --git a/dataproc/apiv1/autoscaling_policy_client.go b/dataproc/apiv1/autoscaling_policy_client.go index 24f71bc55349..952bf7255f1a 100644 --- a/dataproc/apiv1/autoscaling_policy_client.go +++ b/dataproc/apiv1/autoscaling_policy_client.go @@ -143,7 +143,8 @@ func (c *AutoscalingPolicyClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AutoscalingPolicyClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -238,7 +239,8 @@ func NewAutoscalingPolicyClient(ctx context.Context, opts ...option.ClientOption // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *autoscalingPolicyGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dataproc/apiv1/autoscaling_policy_client_example_test.go b/dataproc/apiv1/autoscaling_policy_client_example_test.go index 3d40dcc6724f..aafe766dfb5a 100644 --- a/dataproc/apiv1/autoscaling_policy_client_example_test.go +++ b/dataproc/apiv1/autoscaling_policy_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewAutoscalingPolicyClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewAutoscalingPolicyClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewAutoscalingPolicyClient() { func ExampleAutoscalingPolicyClient_CreateAutoscalingPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewAutoscalingPolicyClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleAutoscalingPolicyClient_CreateAutoscalingPolicy() { func ExampleAutoscalingPolicyClient_UpdateAutoscalingPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewAutoscalingPolicyClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleAutoscalingPolicyClient_UpdateAutoscalingPolicy() { func ExampleAutoscalingPolicyClient_GetAutoscalingPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewAutoscalingPolicyClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +118,11 @@ func ExampleAutoscalingPolicyClient_GetAutoscalingPolicy() { func ExampleAutoscalingPolicyClient_ListAutoscalingPolicies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewAutoscalingPolicyClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleAutoscalingPolicyClient_ListAutoscalingPolicies() { func ExampleAutoscalingPolicyClient_DeleteAutoscalingPolicy() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewAutoscalingPolicyClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataproc/apiv1/batch_controller_client.go b/dataproc/apiv1/batch_controller_client.go index caf68d83e3e9..df26594c11b1 100644 --- a/dataproc/apiv1/batch_controller_client.go +++ b/dataproc/apiv1/batch_controller_client.go @@ -114,7 +114,8 @@ func (c *BatchControllerClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *BatchControllerClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -222,7 +223,8 @@ func NewBatchControllerClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *batchControllerGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dataproc/apiv1/batch_controller_client_example_test.go b/dataproc/apiv1/batch_controller_client_example_test.go index e9e48d93d1c2..3cc6c17d76b1 100644 --- a/dataproc/apiv1/batch_controller_client_example_test.go +++ b/dataproc/apiv1/batch_controller_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewBatchControllerClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewBatchControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewBatchControllerClient() { func ExampleBatchControllerClient_CreateBatch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewBatchControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +73,11 @@ func ExampleBatchControllerClient_CreateBatch() { func ExampleBatchControllerClient_GetBatch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewBatchControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +98,11 @@ func ExampleBatchControllerClient_GetBatch() { func ExampleBatchControllerClient_ListBatches() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewBatchControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleBatchControllerClient_ListBatches() { func ExampleBatchControllerClient_DeleteBatch() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewBatchControllerClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataproc/apiv1/cluster_controller_client.go b/dataproc/apiv1/cluster_controller_client.go index fdc01dc65ff9..c355f54ca2a6 100644 --- a/dataproc/apiv1/cluster_controller_client.go +++ b/dataproc/apiv1/cluster_controller_client.go @@ -197,7 +197,8 @@ func (c *ClusterControllerClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ClusterControllerClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -369,7 +370,8 @@ func NewClusterControllerClient(ctx context.Context, opts ...option.ClientOption // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *clusterControllerGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dataproc/apiv1/cluster_controller_client_example_test.go b/dataproc/apiv1/cluster_controller_client_example_test.go index d35719758475..00e9fc5efa37 100644 --- a/dataproc/apiv1/cluster_controller_client_example_test.go +++ b/dataproc/apiv1/cluster_controller_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClusterControllerClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClusterControllerClient() { func ExampleClusterControllerClient_CreateCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +73,11 @@ func ExampleClusterControllerClient_CreateCluster() { func ExampleClusterControllerClient_UpdateCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -88,6 +103,11 @@ func ExampleClusterControllerClient_UpdateCluster() { func ExampleClusterControllerClient_StopCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -113,6 +133,11 @@ func ExampleClusterControllerClient_StopCluster() { func ExampleClusterControllerClient_StartCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +163,11 @@ func ExampleClusterControllerClient_StartCluster() { func ExampleClusterControllerClient_DeleteCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -161,6 +191,11 @@ func ExampleClusterControllerClient_DeleteCluster() { func ExampleClusterControllerClient_GetCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -181,6 +216,11 @@ func ExampleClusterControllerClient_GetCluster() { func ExampleClusterControllerClient_ListClusters() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +247,11 @@ func ExampleClusterControllerClient_ListClusters() { func ExampleClusterControllerClient_DiagnoseCluster() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewClusterControllerClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataproc/apiv1/doc.go b/dataproc/apiv1/doc.go index 720f8e14f609..34c99016c832 100644 --- a/dataproc/apiv1/doc.go +++ b/dataproc/apiv1/doc.go @@ -19,45 +19,56 @@ // // Manages Hadoop-based clusters and jobs on Google Cloud Platform. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := dataproc.NewAutoscalingPolicyClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataproc.NewAutoscalingPolicyClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := dataproc.NewAutoscalingPolicyClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &dataprocpb.CreateAutoscalingPolicyRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataproc/v1#CreateAutoscalingPolicyRequest. -// } -// resp, err := c.CreateAutoscalingPolicy(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataproc.NewAutoscalingPolicyClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dataprocpb.CreateAutoscalingPolicyRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataproc/v1#CreateAutoscalingPolicyRequest. +// } +// resp, err := c.CreateAutoscalingPolicy(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewAutoscalingPolicyClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/dataproc/apiv1/job_controller_client.go b/dataproc/apiv1/job_controller_client.go index 282a1fb682e3..a51a0442ad4f 100644 --- a/dataproc/apiv1/job_controller_client.go +++ b/dataproc/apiv1/job_controller_client.go @@ -200,7 +200,8 @@ func (c *JobControllerClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *JobControllerClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -327,7 +328,8 @@ func NewJobControllerClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *jobControllerGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dataproc/apiv1/job_controller_client_example_test.go b/dataproc/apiv1/job_controller_client_example_test.go index aac90d0f8da9..c174a3739b15 100644 --- a/dataproc/apiv1/job_controller_client_example_test.go +++ b/dataproc/apiv1/job_controller_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewJobControllerClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewJobControllerClient() { func ExampleJobControllerClient_SubmitJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleJobControllerClient_SubmitJob() { func ExampleJobControllerClient_SubmitJobAsOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +98,11 @@ func ExampleJobControllerClient_SubmitJobAsOperation() { func ExampleJobControllerClient_GetJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -103,6 +123,11 @@ func ExampleJobControllerClient_GetJob() { func ExampleJobControllerClient_ListJobs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -129,6 +154,11 @@ func ExampleJobControllerClient_ListJobs() { func ExampleJobControllerClient_UpdateJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -149,6 +179,11 @@ func ExampleJobControllerClient_UpdateJob() { func ExampleJobControllerClient_CancelJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +204,11 @@ func ExampleJobControllerClient_CancelJob() { func ExampleJobControllerClient_DeleteJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewJobControllerClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataproc/apiv1/mock_test.go b/dataproc/apiv1/mock_test.go deleted file mode 100644 index 10df9b6e9c7a..000000000000 --- a/dataproc/apiv1/mock_test.go +++ /dev/null @@ -1,1781 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package dataproc - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - dataprocpb "google.golang.org/genproto/googleapis/cloud/dataproc/v1" - longrunningpb "google.golang.org/genproto/googleapis/longrunning" - field_maskpb "google.golang.org/genproto/protobuf/field_mask" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockClusterControllerServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dataprocpb.ClusterControllerServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockClusterControllerServer) CreateCluster(ctx context.Context, req *dataprocpb.CreateClusterRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockClusterControllerServer) UpdateCluster(ctx context.Context, req *dataprocpb.UpdateClusterRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockClusterControllerServer) DeleteCluster(ctx context.Context, req *dataprocpb.DeleteClusterRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockClusterControllerServer) GetCluster(ctx context.Context, req *dataprocpb.GetClusterRequest) (*dataprocpb.Cluster, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.Cluster), nil -} - -func (s *mockClusterControllerServer) ListClusters(ctx context.Context, req *dataprocpb.ListClustersRequest) (*dataprocpb.ListClustersResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.ListClustersResponse), nil -} - -func (s *mockClusterControllerServer) DiagnoseCluster(ctx context.Context, req *dataprocpb.DiagnoseClusterRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -type mockJobControllerServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dataprocpb.JobControllerServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockJobControllerServer) SubmitJob(ctx context.Context, req *dataprocpb.SubmitJobRequest) (*dataprocpb.Job, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.Job), nil -} - -func (s *mockJobControllerServer) GetJob(ctx context.Context, req *dataprocpb.GetJobRequest) (*dataprocpb.Job, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.Job), nil -} - -func (s *mockJobControllerServer) ListJobs(ctx context.Context, req *dataprocpb.ListJobsRequest) (*dataprocpb.ListJobsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.ListJobsResponse), nil -} - -func (s *mockJobControllerServer) UpdateJob(ctx context.Context, req *dataprocpb.UpdateJobRequest) (*dataprocpb.Job, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.Job), nil -} - -func (s *mockJobControllerServer) CancelJob(ctx context.Context, req *dataprocpb.CancelJobRequest) (*dataprocpb.Job, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.Job), nil -} - -func (s *mockJobControllerServer) DeleteJob(ctx context.Context, req *dataprocpb.DeleteJobRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -type mockWorkflowTemplateServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dataprocpb.WorkflowTemplateServiceServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockWorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, req *dataprocpb.CreateWorkflowTemplateRequest) (*dataprocpb.WorkflowTemplate, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.WorkflowTemplate), nil -} - -func (s *mockWorkflowTemplateServer) GetWorkflowTemplate(ctx context.Context, req *dataprocpb.GetWorkflowTemplateRequest) (*dataprocpb.WorkflowTemplate, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.WorkflowTemplate), nil -} - -func (s *mockWorkflowTemplateServer) InstantiateWorkflowTemplate(ctx context.Context, req *dataprocpb.InstantiateWorkflowTemplateRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockWorkflowTemplateServer) InstantiateInlineWorkflowTemplate(ctx context.Context, req *dataprocpb.InstantiateInlineWorkflowTemplateRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockWorkflowTemplateServer) UpdateWorkflowTemplate(ctx context.Context, req *dataprocpb.UpdateWorkflowTemplateRequest) (*dataprocpb.WorkflowTemplate, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.WorkflowTemplate), nil -} - -func (s *mockWorkflowTemplateServer) ListWorkflowTemplates(ctx context.Context, req *dataprocpb.ListWorkflowTemplatesRequest) (*dataprocpb.ListWorkflowTemplatesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dataprocpb.ListWorkflowTemplatesResponse), nil -} - -func (s *mockWorkflowTemplateServer) DeleteWorkflowTemplate(ctx context.Context, req *dataprocpb.DeleteWorkflowTemplateRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockClusterController mockClusterControllerServer - mockJobController mockJobControllerServer - mockWorkflowTemplate mockWorkflowTemplateServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - dataprocpb.RegisterClusterControllerServer(serv, &mockClusterController) - dataprocpb.RegisterJobControllerServer(serv, &mockJobController) - dataprocpb.RegisterWorkflowTemplateServiceServer(serv, &mockWorkflowTemplate) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestClusterControllerCreateCluster(t *testing.T) { - var projectId2 string = "projectId2939242356" - var clusterName string = "clusterName-1018081872" - var clusterUuid string = "clusterUuid-1017854240" - var expectedResponse = &dataprocpb.Cluster{ - ProjectId: projectId2, - ClusterName: clusterName, - ClusterUuid: clusterUuid, - } - - mockClusterController.err = nil - mockClusterController.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var cluster *dataprocpb.Cluster = &dataprocpb.Cluster{} - var request = &dataprocpb.CreateClusterRequest{ - ProjectId: projectId, - Region: region, - Cluster: cluster, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterControllerCreateClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterController.err = nil - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var cluster *dataprocpb.Cluster = &dataprocpb.Cluster{} - var request = &dataprocpb.CreateClusterRequest{ - ProjectId: projectId, - Region: region, - Cluster: cluster, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.CreateCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterControllerUpdateCluster(t *testing.T) { - var projectId2 string = "projectId2939242356" - var clusterName2 string = "clusterName2875867491" - var clusterUuid string = "clusterUuid-1017854240" - var expectedResponse = &dataprocpb.Cluster{ - ProjectId: projectId2, - ClusterName: clusterName2, - ClusterUuid: clusterUuid, - } - - mockClusterController.err = nil - mockClusterController.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var cluster *dataprocpb.Cluster = &dataprocpb.Cluster{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &dataprocpb.UpdateClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - Cluster: cluster, - UpdateMask: updateMask, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.UpdateCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterControllerUpdateClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterController.err = nil - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var cluster *dataprocpb.Cluster = &dataprocpb.Cluster{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &dataprocpb.UpdateClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - Cluster: cluster, - UpdateMask: updateMask, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.UpdateCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterControllerDeleteCluster(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockClusterController.err = nil - mockClusterController.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var request = &dataprocpb.DeleteClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestClusterControllerDeleteClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterController.err = nil - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var request = &dataprocpb.DeleteClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DeleteCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestClusterControllerGetCluster(t *testing.T) { - var projectId2 string = "projectId2939242356" - var clusterName2 string = "clusterName2875867491" - var clusterUuid string = "clusterUuid-1017854240" - var expectedResponse = &dataprocpb.Cluster{ - ProjectId: projectId2, - ClusterName: clusterName2, - ClusterUuid: clusterUuid, - } - - mockClusterController.err = nil - mockClusterController.reqs = nil - - mockClusterController.resps = append(mockClusterController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var request = &dataprocpb.GetClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetCluster(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterControllerGetClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var request = &dataprocpb.GetClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetCluster(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterControllerListClusters(t *testing.T) { - var nextPageToken string = "" - var clustersElement *dataprocpb.Cluster = &dataprocpb.Cluster{} - var clusters = []*dataprocpb.Cluster{clustersElement} - var expectedResponse = &dataprocpb.ListClustersResponse{ - NextPageToken: nextPageToken, - Clusters: clusters, - } - - mockClusterController.err = nil - mockClusterController.reqs = nil - - mockClusterController.resps = append(mockClusterController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var request = &dataprocpb.ListClustersRequest{ - ProjectId: projectId, - Region: region, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListClusters(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Clusters[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestClusterControllerListClustersError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var request = &dataprocpb.ListClustersRequest{ - ProjectId: projectId, - Region: region, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListClusters(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestClusterControllerDiagnoseCluster(t *testing.T) { - var expectedResponse *dataprocpb.DiagnoseClusterResults = &dataprocpb.DiagnoseClusterResults{} - - mockClusterController.err = nil - mockClusterController.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var request = &dataprocpb.DiagnoseClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DiagnoseCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - _, err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockClusterController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestClusterControllerDiagnoseClusterError(t *testing.T) { - errCode := codes.PermissionDenied - mockClusterController.err = nil - mockClusterController.resps = append(mockClusterController.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var clusterName string = "clusterName-1018081872" - var request = &dataprocpb.DiagnoseClusterRequest{ - ProjectId: projectId, - Region: region, - ClusterName: clusterName, - } - - c, err := NewClusterControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.DiagnoseCluster(context.Background(), request) - if err != nil { - t.Fatal(err) - } - _, err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestJobControllerSubmitJob(t *testing.T) { - var driverOutputResourceUri string = "driverOutputResourceUri-542229086" - var driverControlFilesUri string = "driverControlFilesUri207057643" - var jobUuid string = "jobUuid-1615012099" - var expectedResponse = &dataprocpb.Job{ - DriverOutputResourceUri: driverOutputResourceUri, - DriverControlFilesUri: driverControlFilesUri, - JobUuid: jobUuid, - } - - mockJobController.err = nil - mockJobController.reqs = nil - - mockJobController.resps = append(mockJobController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var job *dataprocpb.Job = &dataprocpb.Job{} - var request = &dataprocpb.SubmitJobRequest{ - ProjectId: projectId, - Region: region, - Job: job, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SubmitJob(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockJobController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestJobControllerSubmitJobError(t *testing.T) { - errCode := codes.PermissionDenied - mockJobController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var job *dataprocpb.Job = &dataprocpb.Job{} - var request = &dataprocpb.SubmitJobRequest{ - ProjectId: projectId, - Region: region, - Job: job, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SubmitJob(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestJobControllerGetJob(t *testing.T) { - var driverOutputResourceUri string = "driverOutputResourceUri-542229086" - var driverControlFilesUri string = "driverControlFilesUri207057643" - var jobUuid string = "jobUuid-1615012099" - var expectedResponse = &dataprocpb.Job{ - DriverOutputResourceUri: driverOutputResourceUri, - DriverControlFilesUri: driverControlFilesUri, - JobUuid: jobUuid, - } - - mockJobController.err = nil - mockJobController.reqs = nil - - mockJobController.resps = append(mockJobController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var request = &dataprocpb.GetJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetJob(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockJobController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestJobControllerGetJobError(t *testing.T) { - errCode := codes.PermissionDenied - mockJobController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var request = &dataprocpb.GetJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetJob(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestJobControllerListJobs(t *testing.T) { - var nextPageToken string = "" - var jobsElement *dataprocpb.Job = &dataprocpb.Job{} - var jobs = []*dataprocpb.Job{jobsElement} - var expectedResponse = &dataprocpb.ListJobsResponse{ - NextPageToken: nextPageToken, - Jobs: jobs, - } - - mockJobController.err = nil - mockJobController.reqs = nil - - mockJobController.resps = append(mockJobController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var request = &dataprocpb.ListJobsRequest{ - ProjectId: projectId, - Region: region, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListJobs(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockJobController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Jobs[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestJobControllerListJobsError(t *testing.T) { - errCode := codes.PermissionDenied - mockJobController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var request = &dataprocpb.ListJobsRequest{ - ProjectId: projectId, - Region: region, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListJobs(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestJobControllerUpdateJob(t *testing.T) { - var driverOutputResourceUri string = "driverOutputResourceUri-542229086" - var driverControlFilesUri string = "driverControlFilesUri207057643" - var jobUuid string = "jobUuid-1615012099" - var expectedResponse = &dataprocpb.Job{ - DriverOutputResourceUri: driverOutputResourceUri, - DriverControlFilesUri: driverControlFilesUri, - JobUuid: jobUuid, - } - - mockJobController.err = nil - mockJobController.reqs = nil - - mockJobController.resps = append(mockJobController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var job *dataprocpb.Job = &dataprocpb.Job{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &dataprocpb.UpdateJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - Job: job, - UpdateMask: updateMask, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateJob(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockJobController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestJobControllerUpdateJobError(t *testing.T) { - errCode := codes.PermissionDenied - mockJobController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var job *dataprocpb.Job = &dataprocpb.Job{} - var updateMask *field_maskpb.FieldMask = &field_maskpb.FieldMask{} - var request = &dataprocpb.UpdateJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - Job: job, - UpdateMask: updateMask, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateJob(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestJobControllerCancelJob(t *testing.T) { - var driverOutputResourceUri string = "driverOutputResourceUri-542229086" - var driverControlFilesUri string = "driverControlFilesUri207057643" - var jobUuid string = "jobUuid-1615012099" - var expectedResponse = &dataprocpb.Job{ - DriverOutputResourceUri: driverOutputResourceUri, - DriverControlFilesUri: driverControlFilesUri, - JobUuid: jobUuid, - } - - mockJobController.err = nil - mockJobController.reqs = nil - - mockJobController.resps = append(mockJobController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var request = &dataprocpb.CancelJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CancelJob(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockJobController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestJobControllerCancelJobError(t *testing.T) { - errCode := codes.PermissionDenied - mockJobController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var request = &dataprocpb.CancelJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CancelJob(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestJobControllerDeleteJob(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockJobController.err = nil - mockJobController.reqs = nil - - mockJobController.resps = append(mockJobController.resps[:0], expectedResponse) - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var request = &dataprocpb.DeleteJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteJob(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockJobController.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestJobControllerDeleteJobError(t *testing.T) { - errCode := codes.PermissionDenied - mockJobController.err = gstatus.Error(errCode, "test error") - - var projectId string = "projectId-1969970175" - var region string = "region-934795532" - var jobId string = "jobId-1154752291" - var request = &dataprocpb.DeleteJobRequest{ - ProjectId: projectId, - Region: region, - JobId: jobId, - } - - c, err := NewJobControllerClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteJob(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestWorkflowTemplateServiceCreateWorkflowTemplate(t *testing.T) { - var id string = "id3355" - var name string = "name3373707" - var version int32 = 351608024 - var expectedResponse = &dataprocpb.WorkflowTemplate{ - Id: id, - Name: name, - Version: version, - } - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/regions/%s", "[PROJECT]", "[REGION]") - var template *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var request = &dataprocpb.CreateWorkflowTemplateRequest{ - Parent: formattedParent, - Template: template, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateWorkflowTemplate(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestWorkflowTemplateServiceCreateWorkflowTemplateError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/regions/%s", "[PROJECT]", "[REGION]") - var template *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var request = &dataprocpb.CreateWorkflowTemplateRequest{ - Parent: formattedParent, - Template: template, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateWorkflowTemplate(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestWorkflowTemplateServiceGetWorkflowTemplate(t *testing.T) { - var id string = "id3355" - var name2 string = "name2-1052831874" - var version int32 = 351608024 - var expectedResponse = &dataprocpb.WorkflowTemplate{ - Id: id, - Name: name2, - Version: version, - } - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/regions/%s/workflowTemplates/%s", "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - var request = &dataprocpb.GetWorkflowTemplateRequest{ - Name: formattedName, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetWorkflowTemplate(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestWorkflowTemplateServiceGetWorkflowTemplateError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/regions/%s/workflowTemplates/%s", "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - var request = &dataprocpb.GetWorkflowTemplateRequest{ - Name: formattedName, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetWorkflowTemplate(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestWorkflowTemplateServiceInstantiateWorkflowTemplate(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedName string = fmt.Sprintf("projects/%s/regions/%s/workflowTemplates/%s", "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - var request = &dataprocpb.InstantiateWorkflowTemplateRequest{ - Name: formattedName, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.InstantiateWorkflowTemplate(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestWorkflowTemplateServiceInstantiateWorkflowTemplateError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedName string = fmt.Sprintf("projects/%s/regions/%s/workflowTemplates/%s", "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - var request = &dataprocpb.InstantiateWorkflowTemplateRequest{ - Name: formattedName, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.InstantiateWorkflowTemplate(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestWorkflowTemplateServiceInstantiateInlineWorkflowTemplate(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/regions/%s", "[PROJECT]", "[REGION]") - var template *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var request = &dataprocpb.InstantiateInlineWorkflowTemplateRequest{ - Parent: formattedParent, - Template: template, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.InstantiateInlineWorkflowTemplate(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestWorkflowTemplateServiceInstantiateInlineWorkflowTemplateError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/regions/%s", "[PROJECT]", "[REGION]") - var template *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var request = &dataprocpb.InstantiateInlineWorkflowTemplateRequest{ - Parent: formattedParent, - Template: template, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.InstantiateInlineWorkflowTemplate(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestWorkflowTemplateServiceUpdateWorkflowTemplate(t *testing.T) { - var id string = "id3355" - var name string = "name3373707" - var version int32 = 351608024 - var expectedResponse = &dataprocpb.WorkflowTemplate{ - Id: id, - Name: name, - Version: version, - } - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], expectedResponse) - - var template *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var request = &dataprocpb.UpdateWorkflowTemplateRequest{ - Template: template, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateWorkflowTemplate(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestWorkflowTemplateServiceUpdateWorkflowTemplateError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = gstatus.Error(errCode, "test error") - - var template *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var request = &dataprocpb.UpdateWorkflowTemplateRequest{ - Template: template, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateWorkflowTemplate(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestWorkflowTemplateServiceListWorkflowTemplates(t *testing.T) { - var nextPageToken string = "" - var templatesElement *dataprocpb.WorkflowTemplate = &dataprocpb.WorkflowTemplate{} - var templates = []*dataprocpb.WorkflowTemplate{templatesElement} - var expectedResponse = &dataprocpb.ListWorkflowTemplatesResponse{ - NextPageToken: nextPageToken, - Templates: templates, - } - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/regions/%s", "[PROJECT]", "[REGION]") - var request = &dataprocpb.ListWorkflowTemplatesRequest{ - Parent: formattedParent, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListWorkflowTemplates(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Templates[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestWorkflowTemplateServiceListWorkflowTemplatesError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/regions/%s", "[PROJECT]", "[REGION]") - var request = &dataprocpb.ListWorkflowTemplatesRequest{ - Parent: formattedParent, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListWorkflowTemplates(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestWorkflowTemplateServiceDeleteWorkflowTemplate(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockWorkflowTemplate.err = nil - mockWorkflowTemplate.reqs = nil - - mockWorkflowTemplate.resps = append(mockWorkflowTemplate.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/regions/%s/workflowTemplates/%s", "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - var request = &dataprocpb.DeleteWorkflowTemplateRequest{ - Name: formattedName, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteWorkflowTemplate(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockWorkflowTemplate.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestWorkflowTemplateServiceDeleteWorkflowTemplateError(t *testing.T) { - errCode := codes.PermissionDenied - mockWorkflowTemplate.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/regions/%s/workflowTemplates/%s", "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]") - var request = &dataprocpb.DeleteWorkflowTemplateRequest{ - Name: formattedName, - } - - c, err := NewWorkflowTemplateClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteWorkflowTemplate(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} diff --git a/dataproc/apiv1/workflow_template_client.go b/dataproc/apiv1/workflow_template_client.go index c4b47a342440..dac40697ee11 100644 --- a/dataproc/apiv1/workflow_template_client.go +++ b/dataproc/apiv1/workflow_template_client.go @@ -200,7 +200,8 @@ func (c *WorkflowTemplateClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *WorkflowTemplateClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -375,7 +376,8 @@ func NewWorkflowTemplateClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *workflowTemplateGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dataproc/apiv1/workflow_template_client_example_test.go b/dataproc/apiv1/workflow_template_client_example_test.go index a2ba7d10f0ba..ea2e1dc4c6f8 100644 --- a/dataproc/apiv1/workflow_template_client_example_test.go +++ b/dataproc/apiv1/workflow_template_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewWorkflowTemplateClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewWorkflowTemplateClient() { func ExampleWorkflowTemplateClient_CreateWorkflowTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +68,11 @@ func ExampleWorkflowTemplateClient_CreateWorkflowTemplate() { func ExampleWorkflowTemplateClient_GetWorkflowTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleWorkflowTemplateClient_GetWorkflowTemplate() { func ExampleWorkflowTemplateClient_InstantiateWorkflowTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -101,6 +121,11 @@ func ExampleWorkflowTemplateClient_InstantiateWorkflowTemplate() { func ExampleWorkflowTemplateClient_InstantiateInlineWorkflowTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleWorkflowTemplateClient_InstantiateInlineWorkflowTemplate() { func ExampleWorkflowTemplateClient_UpdateWorkflowTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleWorkflowTemplateClient_UpdateWorkflowTemplate() { func ExampleWorkflowTemplateClient_ListWorkflowTemplates() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleWorkflowTemplateClient_ListWorkflowTemplates() { func ExampleWorkflowTemplateClient_DeleteWorkflowTemplate() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataproc.NewWorkflowTemplateClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataproc/go.mod b/dataproc/go.mod index 837cfafbdcb4..fab6ca9d0b73 100644 --- a/dataproc/go.mod +++ b/dataproc/go.mod @@ -1,13 +1,26 @@ module cloud.google.com/go/dataproc -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 - github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/dataproc/go.sum b/dataproc/go.sum index f00d995cec43..c796dcdc6677 100644 --- a/dataproc/go.sum +++ b/dataproc/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/dataqna/CHANGES.md b/dataqna/CHANGES.md index 22a39d327d75..52f35af60576 100644 --- a/dataqna/CHANGES.md +++ b/dataqna/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/dataqna/v0.4.0...dataqna/v0.5.0) (2022-09-19) + + +### Features + +* **dataqna:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + ## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/dataqna/v0.3.0...dataqna/v0.4.0) (2022-06-29) diff --git a/dataqna/apiv1alpha/auto_suggestion_client.go b/dataqna/apiv1alpha/auto_suggestion_client.go index 8accbd5c0d4e..290208711529 100644 --- a/dataqna/apiv1alpha/auto_suggestion_client.go +++ b/dataqna/apiv1alpha/auto_suggestion_client.go @@ -120,7 +120,8 @@ func (c *AutoSuggestionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AutoSuggestionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -205,7 +206,8 @@ func NewAutoSuggestionClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *autoSuggestionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -303,7 +305,7 @@ func (c *autoSuggestionRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *autoSuggestionRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/dataqna/apiv1alpha/auto_suggestion_client_example_test.go b/dataqna/apiv1alpha/auto_suggestion_client_example_test.go index 4e524b5fefc4..a55043effcc4 100644 --- a/dataqna/apiv1alpha/auto_suggestion_client_example_test.go +++ b/dataqna/apiv1alpha/auto_suggestion_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewAutoSuggestionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewAutoSuggestionClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewAutoSuggestionClient() { func ExampleNewAutoSuggestionRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewAutoSuggestionRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewAutoSuggestionRESTClient() { func ExampleAutoSuggestionClient_SuggestQueries() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewAutoSuggestionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go b/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go new file mode 100644 index 000000000000..b1c06244f377 --- /dev/null +++ b/dataqna/apiv1alpha/dataqnapb/annotated_string.pb.go @@ -0,0 +1,408 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dataqna/v1alpha/annotated_string.proto + +package dataqnapb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Semantic markup types. +type AnnotatedString_SemanticMarkupType int32 + +const ( + // No markup type was specified. + AnnotatedString_MARKUP_TYPE_UNSPECIFIED AnnotatedString_SemanticMarkupType = 0 + // Markup for a substring denoting a metric. + AnnotatedString_METRIC AnnotatedString_SemanticMarkupType = 1 + // Markup for a substring denoting a dimension. + AnnotatedString_DIMENSION AnnotatedString_SemanticMarkupType = 2 + // Markup for a substring denoting a filter. + AnnotatedString_FILTER AnnotatedString_SemanticMarkupType = 3 + // Markup for an unused substring. + AnnotatedString_UNUSED AnnotatedString_SemanticMarkupType = 4 + // Markup for a substring containing blocked phrases. + AnnotatedString_BLOCKED AnnotatedString_SemanticMarkupType = 5 + // Markup for a substring that contains terms for row. + AnnotatedString_ROW AnnotatedString_SemanticMarkupType = 6 +) + +// Enum value maps for AnnotatedString_SemanticMarkupType. +var ( + AnnotatedString_SemanticMarkupType_name = map[int32]string{ + 0: "MARKUP_TYPE_UNSPECIFIED", + 1: "METRIC", + 2: "DIMENSION", + 3: "FILTER", + 4: "UNUSED", + 5: "BLOCKED", + 6: "ROW", + } + AnnotatedString_SemanticMarkupType_value = map[string]int32{ + "MARKUP_TYPE_UNSPECIFIED": 0, + "METRIC": 1, + "DIMENSION": 2, + "FILTER": 3, + "UNUSED": 4, + "BLOCKED": 5, + "ROW": 6, + } +) + +func (x AnnotatedString_SemanticMarkupType) Enum() *AnnotatedString_SemanticMarkupType { + p := new(AnnotatedString_SemanticMarkupType) + *p = x + return p +} + +func (x AnnotatedString_SemanticMarkupType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AnnotatedString_SemanticMarkupType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_annotated_string_proto_enumTypes[0].Descriptor() +} + +func (AnnotatedString_SemanticMarkupType) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_annotated_string_proto_enumTypes[0] +} + +func (x AnnotatedString_SemanticMarkupType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AnnotatedString_SemanticMarkupType.Descriptor instead. +func (AnnotatedString_SemanticMarkupType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescGZIP(), []int{0, 0} +} + +// Describes string annotation from both semantic and formatting perspectives. +// Example: +// +// User Query: +// +// top countries by population in Africa +// +// 0 4 14 17 28 31 37 +// +// Table Data: +// +// + "country" - dimension +// + "population" - metric +// + "Africa" - value in the "continent" column +// +// text_formatted = `"top countries by population in Africa"` +// +// html_formatted = +// +// `"top countries by population in Africa"` +// +// ``` +// markups = [ +// +// {DIMENSION, 4, 12}, // 'countries' +// {METRIC, 17, 26}, // 'population' +// {FILTER, 31, 36} // 'Africa' +// +// ] +// ``` +// +// Note that html formattings for 'DIMENSION' and 'METRIC' are the same, while +// semantic markups are different. +type AnnotatedString struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Text version of the string. + TextFormatted string `protobuf:"bytes,1,opt,name=text_formatted,json=textFormatted,proto3" json:"text_formatted,omitempty"` + // HTML version of the string annotation. + HtmlFormatted string `protobuf:"bytes,2,opt,name=html_formatted,json=htmlFormatted,proto3" json:"html_formatted,omitempty"` + // Semantic version of the string annotation. + Markups []*AnnotatedString_SemanticMarkup `protobuf:"bytes,3,rep,name=markups,proto3" json:"markups,omitempty"` +} + +func (x *AnnotatedString) Reset() { + *x = AnnotatedString{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotatedString) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotatedString) ProtoMessage() {} + +func (x *AnnotatedString) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotatedString.ProtoReflect.Descriptor instead. +func (*AnnotatedString) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescGZIP(), []int{0} +} + +func (x *AnnotatedString) GetTextFormatted() string { + if x != nil { + return x.TextFormatted + } + return "" +} + +func (x *AnnotatedString) GetHtmlFormatted() string { + if x != nil { + return x.HtmlFormatted + } + return "" +} + +func (x *AnnotatedString) GetMarkups() []*AnnotatedString_SemanticMarkup { + if x != nil { + return x.Markups + } + return nil +} + +// Semantic markup denotes a substring (by index and length) with markup +// information. +type AnnotatedString_SemanticMarkup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The semantic type of the markup substring. + Type AnnotatedString_SemanticMarkupType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.dataqna.v1alpha.AnnotatedString_SemanticMarkupType" json:"type,omitempty"` + // Unicode character index of the query. + StartCharIndex int32 `protobuf:"varint,2,opt,name=start_char_index,json=startCharIndex,proto3" json:"start_char_index,omitempty"` + // The length (number of unicode characters) of the markup substring. + Length int32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` +} + +func (x *AnnotatedString_SemanticMarkup) Reset() { + *x = AnnotatedString_SemanticMarkup{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotatedString_SemanticMarkup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotatedString_SemanticMarkup) ProtoMessage() {} + +func (x *AnnotatedString_SemanticMarkup) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnnotatedString_SemanticMarkup.ProtoReflect.Descriptor instead. +func (*AnnotatedString_SemanticMarkup) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AnnotatedString_SemanticMarkup) GetType() AnnotatedString_SemanticMarkupType { + if x != nil { + return x.Type + } + return AnnotatedString_MARKUP_TYPE_UNSPECIFIED +} + +func (x *AnnotatedString_SemanticMarkup) GetStartCharIndex() int32 { + if x != nil { + return x.StartCharIndex + } + return 0 +} + +func (x *AnnotatedString_SemanticMarkup) GetLength() int32 { + if x != nil { + return x.Length + } + return 0 +} + +var File_google_cloud_dataqna_v1alpha_annotated_string_proto protoreflect.FileDescriptor + +var file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x22, 0xde, 0x03, 0x0a, 0x0f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x68, 0x74, 0x6d, 0x6c, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x74, 0x6d, 0x6c, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x75, 0x70, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x4d, 0x61, + 0x72, 0x6b, 0x75, 0x70, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x75, 0x70, 0x73, 0x1a, 0xa8, 0x01, + 0x0a, 0x0e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x4d, 0x61, 0x72, 0x6b, 0x75, 0x70, + 0x12, 0x54, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x40, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x4d, 0x61, 0x72, 0x6b, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x63, 0x68, 0x61, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x7a, 0x0a, 0x12, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x4d, 0x61, 0x72, 0x6b, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, + 0x0a, 0x17, 0x4d, 0x41, 0x52, 0x4b, 0x55, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, + 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x49, 0x4d, 0x45, 0x4e, + 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, + 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x55, 0x53, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0b, + 0x0a, 0x07, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x52, + 0x4f, 0x57, 0x10, 0x06, 0x42, 0xdf, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, + 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x14, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x2e, 0x56, 0x31, + 0x41, 0x6c, 0x70, 0x68, 0x61, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x5c, 0x56, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0xea, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x3a, 0x3a, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescOnce sync.Once + file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescData = file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDesc +) + +func file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescGZIP() []byte { + file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescOnce.Do(func() { + file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescData) + }) + return file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDescData +} + +var file_google_cloud_dataqna_v1alpha_annotated_string_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_dataqna_v1alpha_annotated_string_proto_goTypes = []interface{}{ + (AnnotatedString_SemanticMarkupType)(0), // 0: google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkupType + (*AnnotatedString)(nil), // 1: google.cloud.dataqna.v1alpha.AnnotatedString + (*AnnotatedString_SemanticMarkup)(nil), // 2: google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup +} +var file_google_cloud_dataqna_v1alpha_annotated_string_proto_depIdxs = []int32{ + 2, // 0: google.cloud.dataqna.v1alpha.AnnotatedString.markups:type_name -> google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup + 0, // 1: google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup.type:type_name -> google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkupType + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() } +func file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() { + if File_google_cloud_dataqna_v1alpha_annotated_string_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotatedString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotatedString_SemanticMarkup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dataqna_v1alpha_annotated_string_proto_goTypes, + DependencyIndexes: file_google_cloud_dataqna_v1alpha_annotated_string_proto_depIdxs, + EnumInfos: file_google_cloud_dataqna_v1alpha_annotated_string_proto_enumTypes, + MessageInfos: file_google_cloud_dataqna_v1alpha_annotated_string_proto_msgTypes, + }.Build() + File_google_cloud_dataqna_v1alpha_annotated_string_proto = out.File + file_google_cloud_dataqna_v1alpha_annotated_string_proto_rawDesc = nil + file_google_cloud_dataqna_v1alpha_annotated_string_proto_goTypes = nil + file_google_cloud_dataqna_v1alpha_annotated_string_proto_depIdxs = nil +} diff --git a/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go b/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go new file mode 100644 index 000000000000..96d2bb77ca33 --- /dev/null +++ b/dataqna/apiv1alpha/dataqnapb/auto_suggestion_service.pb.go @@ -0,0 +1,765 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto + +package dataqnapb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The type of suggestion. +type SuggestionType int32 + +const ( + // No suggestiont type is specified. + SuggestionType_SUGGESTION_TYPE_UNSPECIFIED SuggestionType = 0 + // Entity suggestion type. Suggestions are for single entities. + SuggestionType_ENTITY SuggestionType = 1 + // Template suggestion type. Suggestions are for full sentences. + SuggestionType_TEMPLATE SuggestionType = 2 +) + +// Enum value maps for SuggestionType. +var ( + SuggestionType_name = map[int32]string{ + 0: "SUGGESTION_TYPE_UNSPECIFIED", + 1: "ENTITY", + 2: "TEMPLATE", + } + SuggestionType_value = map[string]int32{ + "SUGGESTION_TYPE_UNSPECIFIED": 0, + "ENTITY": 1, + "TEMPLATE": 2, + } +) + +func (x SuggestionType) Enum() *SuggestionType { + p := new(SuggestionType) + *p = x + return p +} + +func (x SuggestionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SuggestionType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_enumTypes[0].Descriptor() +} + +func (SuggestionType) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_enumTypes[0] +} + +func (x SuggestionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SuggestionType.Descriptor instead. +func (SuggestionType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP(), []int{0} +} + +// Request for query suggestions. +type SuggestQueriesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent of the suggestion query is the resource denoting the project and + // location. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The scopes to which this search is restricted. The only supported scope + // pattern is + // `//bigquery.googleapis.com/projects/{GCP-PROJECT-ID}/datasets/{DATASET-ID}/tables/{TABLE-ID}`. + Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` + // User query for which to generate suggestions. If the query is empty, zero + // state suggestions are returned. This allows UIs to display suggestions + // right away, helping the user to get a sense of what a query might look + // like. + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + // The requested suggestion type. Multiple suggestion types can be + // requested, but there is no guarantee that the service will return + // suggestions for each type. Suggestions for a requested type might rank + // lower than suggestions for other types and the service may decide to cut + // these suggestions off. + SuggestionTypes []SuggestionType `protobuf:"varint,4,rep,packed,name=suggestion_types,json=suggestionTypes,proto3,enum=google.cloud.dataqna.v1alpha.SuggestionType" json:"suggestion_types,omitempty"` +} + +func (x *SuggestQueriesRequest) Reset() { + *x = SuggestQueriesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuggestQueriesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuggestQueriesRequest) ProtoMessage() {} + +func (x *SuggestQueriesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuggestQueriesRequest.ProtoReflect.Descriptor instead. +func (*SuggestQueriesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP(), []int{0} +} + +func (x *SuggestQueriesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *SuggestQueriesRequest) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *SuggestQueriesRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SuggestQueriesRequest) GetSuggestionTypes() []SuggestionType { + if x != nil { + return x.SuggestionTypes + } + return nil +} + +// A suggestion for a query with a ranking score. +type Suggestion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Detailed information about the suggestion. + SuggestionInfo *SuggestionInfo `protobuf:"bytes,1,opt,name=suggestion_info,json=suggestionInfo,proto3" json:"suggestion_info,omitempty"` + // The score of the suggestion. This can be used to define ordering in UI. + // The score represents confidence in the suggestion where higher is better. + // All score values must be in the range [0, 1). + RankingScore float64 `protobuf:"fixed64,2,opt,name=ranking_score,json=rankingScore,proto3" json:"ranking_score,omitempty"` + // The type of the suggestion. + SuggestionType SuggestionType `protobuf:"varint,3,opt,name=suggestion_type,json=suggestionType,proto3,enum=google.cloud.dataqna.v1alpha.SuggestionType" json:"suggestion_type,omitempty"` +} + +func (x *Suggestion) Reset() { + *x = Suggestion{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Suggestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Suggestion) ProtoMessage() {} + +func (x *Suggestion) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Suggestion.ProtoReflect.Descriptor instead. +func (*Suggestion) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP(), []int{1} +} + +func (x *Suggestion) GetSuggestionInfo() *SuggestionInfo { + if x != nil { + return x.SuggestionInfo + } + return nil +} + +func (x *Suggestion) GetRankingScore() float64 { + if x != nil { + return x.RankingScore + } + return 0 +} + +func (x *Suggestion) GetSuggestionType() SuggestionType { + if x != nil { + return x.SuggestionType + } + return SuggestionType_SUGGESTION_TYPE_UNSPECIFIED +} + +// Detailed information about the suggestion. +type SuggestionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Annotations for the suggestion. This provides information about which part + // of the suggestion corresponds to what semantic meaning (e.g. a metric). + AnnotatedSuggestion *AnnotatedString `protobuf:"bytes,1,opt,name=annotated_suggestion,json=annotatedSuggestion,proto3" json:"annotated_suggestion,omitempty"` + // Matches between user query and the annotated string. + QueryMatches []*SuggestionInfo_MatchInfo `protobuf:"bytes,2,rep,name=query_matches,json=queryMatches,proto3" json:"query_matches,omitempty"` +} + +func (x *SuggestionInfo) Reset() { + *x = SuggestionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuggestionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuggestionInfo) ProtoMessage() {} + +func (x *SuggestionInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuggestionInfo.ProtoReflect.Descriptor instead. +func (*SuggestionInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP(), []int{2} +} + +func (x *SuggestionInfo) GetAnnotatedSuggestion() *AnnotatedString { + if x != nil { + return x.AnnotatedSuggestion + } + return nil +} + +func (x *SuggestionInfo) GetQueryMatches() []*SuggestionInfo_MatchInfo { + if x != nil { + return x.QueryMatches + } + return nil +} + +// Response to SuggestQueries. +type SuggestQueriesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of suggestions. + Suggestions []*Suggestion `protobuf:"bytes,1,rep,name=suggestions,proto3" json:"suggestions,omitempty"` +} + +func (x *SuggestQueriesResponse) Reset() { + *x = SuggestQueriesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuggestQueriesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuggestQueriesResponse) ProtoMessage() {} + +func (x *SuggestQueriesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuggestQueriesResponse.ProtoReflect.Descriptor instead. +func (*SuggestQueriesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP(), []int{3} +} + +func (x *SuggestQueriesResponse) GetSuggestions() []*Suggestion { + if x != nil { + return x.Suggestions + } + return nil +} + +// MatchInfo describes which part of suggestion matched with data in user +// typed query. This can be used to highlight matching parts in the UI. This +// is different from the annotations provided in annotated_suggestion. The +// annotated_suggestion provides information about the semantic meaning, while +// this provides information about how it relates to the input. +// +// Example: +// user query: `top products` +// +// ``` +// +// annotated_suggestion { +// text_formatted = "top product_group" +// html_formatted = "top product_group" +// markups { +// {type: TEXT, start_char_index: 0, length: 3} +// {type: DIMENSION, start_char_index: 4, length: 13} +// } +// } +// +// query_matches { +// { start_char_index: 0, length: 3 } +// { start_char_index: 4, length: 7} +// } +// +// ``` +type SuggestionInfo_MatchInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unicode character index of the string annotation. + StartCharIndex int32 `protobuf:"varint,1,opt,name=start_char_index,json=startCharIndex,proto3" json:"start_char_index,omitempty"` + // Count of unicode characters of this substring. + Length int32 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +func (x *SuggestionInfo_MatchInfo) Reset() { + *x = SuggestionInfo_MatchInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuggestionInfo_MatchInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuggestionInfo_MatchInfo) ProtoMessage() {} + +func (x *SuggestionInfo_MatchInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuggestionInfo_MatchInfo.ProtoReflect.Descriptor instead. +func (*SuggestionInfo_MatchInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *SuggestionInfo_MatchInfo) GetStartCharIndex() int32 { + if x != nil { + return x.StartCharIndex + } + return 0 +} + +func (x *SuggestionInfo_MatchInfo) GetLength() int32 { + if x != nil { + return x.Length + } + return 0 +} + +var File_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto protoreflect.FileDescriptor + +var file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, + 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xe1, 0x01, 0x0a, 0x15, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x57, 0x0a, + 0x10, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xdf, 0x01, 0x0a, 0x0a, 0x53, 0x75, 0x67, 0x67, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x0f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, + 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x73, 0x75, + 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x12, 0x55, 0x0a, 0x0f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, + 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9e, 0x02, 0x0a, 0x0e, 0x53, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x60, 0x0a, 0x14, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, + 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x1a, 0x4d, 0x0a, 0x09, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x16, 0x53, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0b, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, + 0x4b, 0x0a, 0x0e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x55, 0x47, 0x47, 0x45, 0x53, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x02, 0x32, 0xa5, 0x02, 0x0a, + 0x15, 0x41, 0x75, 0x74, 0x6f, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbf, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x67, 0x67, 0x65, + 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x75, + 0x67, 0x67, 0x65, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x1a, 0x4a, 0xca, 0x41, 0x16, 0x64, 0x61, 0x74, + 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xe5, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, + 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x1a, 0x41, 0x75, 0x74, 0x6f, 0x53, + 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0xaa, 0x02, 0x1c, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x51, 0x6e, 0x41, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0xca, 0x02, 0x1c, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x51, + 0x6e, 0x41, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xea, 0x02, 0x1f, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, + 0x51, 0x6e, 0x41, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescOnce sync.Once + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescData = file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDesc +) + +func file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescGZIP() []byte { + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescOnce.Do(func() { + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescData) + }) + return file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDescData +} + +var file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_goTypes = []interface{}{ + (SuggestionType)(0), // 0: google.cloud.dataqna.v1alpha.SuggestionType + (*SuggestQueriesRequest)(nil), // 1: google.cloud.dataqna.v1alpha.SuggestQueriesRequest + (*Suggestion)(nil), // 2: google.cloud.dataqna.v1alpha.Suggestion + (*SuggestionInfo)(nil), // 3: google.cloud.dataqna.v1alpha.SuggestionInfo + (*SuggestQueriesResponse)(nil), // 4: google.cloud.dataqna.v1alpha.SuggestQueriesResponse + (*SuggestionInfo_MatchInfo)(nil), // 5: google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo + (*AnnotatedString)(nil), // 6: google.cloud.dataqna.v1alpha.AnnotatedString +} +var file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_depIdxs = []int32{ + 0, // 0: google.cloud.dataqna.v1alpha.SuggestQueriesRequest.suggestion_types:type_name -> google.cloud.dataqna.v1alpha.SuggestionType + 3, // 1: google.cloud.dataqna.v1alpha.Suggestion.suggestion_info:type_name -> google.cloud.dataqna.v1alpha.SuggestionInfo + 0, // 2: google.cloud.dataqna.v1alpha.Suggestion.suggestion_type:type_name -> google.cloud.dataqna.v1alpha.SuggestionType + 6, // 3: google.cloud.dataqna.v1alpha.SuggestionInfo.annotated_suggestion:type_name -> google.cloud.dataqna.v1alpha.AnnotatedString + 5, // 4: google.cloud.dataqna.v1alpha.SuggestionInfo.query_matches:type_name -> google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo + 2, // 5: google.cloud.dataqna.v1alpha.SuggestQueriesResponse.suggestions:type_name -> google.cloud.dataqna.v1alpha.Suggestion + 1, // 6: google.cloud.dataqna.v1alpha.AutoSuggestionService.SuggestQueries:input_type -> google.cloud.dataqna.v1alpha.SuggestQueriesRequest + 4, // 7: google.cloud.dataqna.v1alpha.AutoSuggestionService.SuggestQueries:output_type -> google.cloud.dataqna.v1alpha.SuggestQueriesResponse + 7, // [7:8] is the sub-list for method output_type + 6, // [6:7] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_init() } +func file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_init() { + if File_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto != nil { + return + } + file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuggestQueriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Suggestion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuggestionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuggestQueriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuggestionInfo_MatchInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_goTypes, + DependencyIndexes: file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_depIdxs, + EnumInfos: file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_enumTypes, + MessageInfos: file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_msgTypes, + }.Build() + File_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto = out.File + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_rawDesc = nil + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_goTypes = nil + file_google_cloud_dataqna_v1alpha_auto_suggestion_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AutoSuggestionServiceClient is the client API for AutoSuggestionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AutoSuggestionServiceClient interface { + // Gets a list of suggestions based on a prefix string. + // AutoSuggestion tolerance should be less than 1 second. + SuggestQueries(ctx context.Context, in *SuggestQueriesRequest, opts ...grpc.CallOption) (*SuggestQueriesResponse, error) +} + +type autoSuggestionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAutoSuggestionServiceClient(cc grpc.ClientConnInterface) AutoSuggestionServiceClient { + return &autoSuggestionServiceClient{cc} +} + +func (c *autoSuggestionServiceClient) SuggestQueries(ctx context.Context, in *SuggestQueriesRequest, opts ...grpc.CallOption) (*SuggestQueriesResponse, error) { + out := new(SuggestQueriesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dataqna.v1alpha.AutoSuggestionService/SuggestQueries", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AutoSuggestionServiceServer is the server API for AutoSuggestionService service. +type AutoSuggestionServiceServer interface { + // Gets a list of suggestions based on a prefix string. + // AutoSuggestion tolerance should be less than 1 second. + SuggestQueries(context.Context, *SuggestQueriesRequest) (*SuggestQueriesResponse, error) +} + +// UnimplementedAutoSuggestionServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAutoSuggestionServiceServer struct { +} + +func (*UnimplementedAutoSuggestionServiceServer) SuggestQueries(context.Context, *SuggestQueriesRequest) (*SuggestQueriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SuggestQueries not implemented") +} + +func RegisterAutoSuggestionServiceServer(s *grpc.Server, srv AutoSuggestionServiceServer) { + s.RegisterService(&_AutoSuggestionService_serviceDesc, srv) +} + +func _AutoSuggestionService_SuggestQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuggestQueriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AutoSuggestionServiceServer).SuggestQueries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataqna.v1alpha.AutoSuggestionService/SuggestQueries", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AutoSuggestionServiceServer).SuggestQueries(ctx, req.(*SuggestQueriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AutoSuggestionService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dataqna.v1alpha.AutoSuggestionService", + HandlerType: (*AutoSuggestionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SuggestQueries", + Handler: _AutoSuggestionService_SuggestQueries_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dataqna/v1alpha/auto_suggestion_service.proto", +} diff --git a/dataqna/apiv1alpha/dataqnapb/question.pb.go b/dataqna/apiv1alpha/dataqnapb/question.pb.go new file mode 100644 index 000000000000..ffc387a5e3d1 --- /dev/null +++ b/dataqna/apiv1alpha/dataqnapb/question.pb.go @@ -0,0 +1,1966 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dataqna/v1alpha/question.proto + +package dataqnapb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Query entities of an interpretation. +type InterpretEntity int32 + +const ( + // No interpret entity was specified. + InterpretEntity_INTERPRET_ENTITY_UNSPECIFIED InterpretEntity = 0 + // A dimenstion entity. + InterpretEntity_DIMENSION InterpretEntity = 1 + // A metric entity. + InterpretEntity_METRIC InterpretEntity = 2 +) + +// Enum value maps for InterpretEntity. +var ( + InterpretEntity_name = map[int32]string{ + 0: "INTERPRET_ENTITY_UNSPECIFIED", + 1: "DIMENSION", + 2: "METRIC", + } + InterpretEntity_value = map[string]int32{ + "INTERPRET_ENTITY_UNSPECIFIED": 0, + "DIMENSION": 1, + "METRIC": 2, + } +) + +func (x InterpretEntity) Enum() *InterpretEntity { + p := new(InterpretEntity) + *p = x + return p +} + +func (x InterpretEntity) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InterpretEntity) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[0].Descriptor() +} + +func (InterpretEntity) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[0] +} + +func (x InterpretEntity) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InterpretEntity.Descriptor instead. +func (InterpretEntity) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{0} +} + +// The interpret error code provides an error category why the interpretation +// failed. +type InterpretError_InterpretErrorCode int32 + +const ( + // No interpret error code was specified. + InterpretError_INTERPRET_ERROR_CODE_UNSPECIFIED InterpretError_InterpretErrorCode = 0 + // The query is not valid. + InterpretError_INVALID_QUERY InterpretError_InterpretErrorCode = 1 + // The interpreter failed to understand the question. For example, because + // it was too ambiguous. + InterpretError_FAILED_TO_UNDERSTAND InterpretError_InterpretErrorCode = 2 + // The interpreter could understand the question, but was not able to arrive + // at an answer. For example, because a requested operation is not + // supported. + InterpretError_FAILED_TO_ANSWER InterpretError_InterpretErrorCode = 3 +) + +// Enum value maps for InterpretError_InterpretErrorCode. +var ( + InterpretError_InterpretErrorCode_name = map[int32]string{ + 0: "INTERPRET_ERROR_CODE_UNSPECIFIED", + 1: "INVALID_QUERY", + 2: "FAILED_TO_UNDERSTAND", + 3: "FAILED_TO_ANSWER", + } + InterpretError_InterpretErrorCode_value = map[string]int32{ + "INTERPRET_ERROR_CODE_UNSPECIFIED": 0, + "INVALID_QUERY": 1, + "FAILED_TO_UNDERSTAND": 2, + "FAILED_TO_ANSWER": 3, + } +) + +func (x InterpretError_InterpretErrorCode) Enum() *InterpretError_InterpretErrorCode { + p := new(InterpretError_InterpretErrorCode) + *p = x + return p +} + +func (x InterpretError_InterpretErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InterpretError_InterpretErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[1].Descriptor() +} + +func (InterpretError_InterpretErrorCode) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[1] +} + +func (x InterpretError_InterpretErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InterpretError_InterpretErrorCode.Descriptor instead. +func (InterpretError_InterpretErrorCode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{1, 0} +} + +// Enum of possible job execution statuses. +type ExecutionInfo_JobExecutionState int32 + +const ( + // No job execution was specified. + ExecutionInfo_JOB_EXECUTION_STATE_UNSPECIFIED ExecutionInfo_JobExecutionState = 0 + // No job execution was requested, yet. + ExecutionInfo_NOT_EXECUTED ExecutionInfo_JobExecutionState = 1 + // The job is running. + ExecutionInfo_RUNNING ExecutionInfo_JobExecutionState = 2 + // The job completed successfully. + ExecutionInfo_SUCCEEDED ExecutionInfo_JobExecutionState = 3 + // The job completed unsuccessfully. + ExecutionInfo_FAILED ExecutionInfo_JobExecutionState = 4 +) + +// Enum value maps for ExecutionInfo_JobExecutionState. +var ( + ExecutionInfo_JobExecutionState_name = map[int32]string{ + 0: "JOB_EXECUTION_STATE_UNSPECIFIED", + 1: "NOT_EXECUTED", + 2: "RUNNING", + 3: "SUCCEEDED", + 4: "FAILED", + } + ExecutionInfo_JobExecutionState_value = map[string]int32{ + "JOB_EXECUTION_STATE_UNSPECIFIED": 0, + "NOT_EXECUTED": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "FAILED": 4, + } +) + +func (x ExecutionInfo_JobExecutionState) Enum() *ExecutionInfo_JobExecutionState { + p := new(ExecutionInfo_JobExecutionState) + *p = x + return p +} + +func (x ExecutionInfo_JobExecutionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExecutionInfo_JobExecutionState) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[2].Descriptor() +} + +func (ExecutionInfo_JobExecutionState) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[2] +} + +func (x ExecutionInfo_JobExecutionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExecutionInfo_JobExecutionState.Descriptor instead. +func (ExecutionInfo_JobExecutionState) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{2, 0} +} + +// Enumeration of visualzation types to use for query response data. +type InterpretationStructure_VisualizationType int32 + +const ( + // No visualization type was specified. + InterpretationStructure_VISUALIZATION_TYPE_UNSPECIFIED InterpretationStructure_VisualizationType = 0 + // Show a table. + InterpretationStructure_TABLE InterpretationStructure_VisualizationType = 1 + // Show a [bar + // chart](https://developers.google.com/chart/interactive/docs/gallery/barchart). + InterpretationStructure_BAR_CHART InterpretationStructure_VisualizationType = 2 + // Show a [column + // chart](https://developers.google.com/chart/interactive/docs/gallery/columnchart). + InterpretationStructure_COLUMN_CHART InterpretationStructure_VisualizationType = 3 + // Show a + // [timeline](https://developers.google.com/chart/interactive/docs/gallery/timeline). + InterpretationStructure_TIMELINE InterpretationStructure_VisualizationType = 4 + // Show a [scatter + // plot](https://developers.google.com/chart/interactive/docs/gallery/scatterchart). + InterpretationStructure_SCATTER_PLOT InterpretationStructure_VisualizationType = 5 + // Show a [pie + // chart](https://developers.google.com/chart/interactive/docs/gallery/piechart). + InterpretationStructure_PIE_CHART InterpretationStructure_VisualizationType = 6 + // Show a [line + // chart](https://developers.google.com/chart/interactive/docs/gallery/linechart). + InterpretationStructure_LINE_CHART InterpretationStructure_VisualizationType = 7 + // Show an [area + // chart](https://developers.google.com/chart/interactive/docs/gallery/areachart). + InterpretationStructure_AREA_CHART InterpretationStructure_VisualizationType = 8 + // Show a [combo + // chart](https://developers.google.com/chart/interactive/docs/gallery/combochart). + InterpretationStructure_COMBO_CHART InterpretationStructure_VisualizationType = 9 + // Show a + // [histogram](https://developers.google.com/chart/interactive/docs/gallery/histogram). + InterpretationStructure_HISTOGRAM InterpretationStructure_VisualizationType = 10 + // This denotes queries when the user has not specified the particular type + // of chart and has mentioned only a generic chart name such as "Chart", + // "Plot", "Graph", etc. This will differentiate it from specific charting + // terms such as "Bar chart", "Pie chart", etc. + InterpretationStructure_GENERIC_CHART InterpretationStructure_VisualizationType = 11 + // The user tried to specify a chart type, but the interpreter could not + // understand the type. The client should display a generic chart and may + // give a hint to the user that the requested type was not understood. + InterpretationStructure_CHART_NOT_UNDERSTOOD InterpretationStructure_VisualizationType = 12 +) + +// Enum value maps for InterpretationStructure_VisualizationType. +var ( + InterpretationStructure_VisualizationType_name = map[int32]string{ + 0: "VISUALIZATION_TYPE_UNSPECIFIED", + 1: "TABLE", + 2: "BAR_CHART", + 3: "COLUMN_CHART", + 4: "TIMELINE", + 5: "SCATTER_PLOT", + 6: "PIE_CHART", + 7: "LINE_CHART", + 8: "AREA_CHART", + 9: "COMBO_CHART", + 10: "HISTOGRAM", + 11: "GENERIC_CHART", + 12: "CHART_NOT_UNDERSTOOD", + } + InterpretationStructure_VisualizationType_value = map[string]int32{ + "VISUALIZATION_TYPE_UNSPECIFIED": 0, + "TABLE": 1, + "BAR_CHART": 2, + "COLUMN_CHART": 3, + "TIMELINE": 4, + "SCATTER_PLOT": 5, + "PIE_CHART": 6, + "LINE_CHART": 7, + "AREA_CHART": 8, + "COMBO_CHART": 9, + "HISTOGRAM": 10, + "GENERIC_CHART": 11, + "CHART_NOT_UNDERSTOOD": 12, + } +) + +func (x InterpretationStructure_VisualizationType) Enum() *InterpretationStructure_VisualizationType { + p := new(InterpretationStructure_VisualizationType) + *p = x + return p +} + +func (x InterpretationStructure_VisualizationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InterpretationStructure_VisualizationType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[3].Descriptor() +} + +func (InterpretationStructure_VisualizationType) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_question_proto_enumTypes[3] +} + +func (x InterpretationStructure_VisualizationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InterpretationStructure_VisualizationType.Descriptor instead. +func (InterpretationStructure_VisualizationType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{7, 0} +} + +// The question resource represents a natural language query, its settings, +// understanding generated by the system, and answer retrieval status. +// A question cannot be modified. +type Question struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Immutable. The unique identifier for the Question. The ID is server-generated. + // Example: `projects/foo/locations/bar/questions/123` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Immutable. Scopes to be used for the question. A scope defines the relevant data set + // scope. It can be a reference to a specific data source or a collection of + // data sources. Currently, support is limited to a single BigQuery table. + // There must be exactly one `scopes` element. + // + // Example: + // `//bigquery.googleapis.com/projects/test-project/datasets/foo/tables/bar` + Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` + // Required. Immutable. The query in natural language. + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + // A list of annotations to use instead of the default annotation of a data + // source (set in the data source reference resource). There must not be + // more than one annotation with the same data source reference. + DataSourceAnnotations []string `protobuf:"bytes,4,rep,name=data_source_annotations,json=dataSourceAnnotations,proto3" json:"data_source_annotations,omitempty"` + // An error field explaining why interpretation failed. This is only populated + // if the interpretation failed. + // + // Note: This is different from getting a status error on the request itself. + // This is not a client or server error and the Question resource is still + // persisted, but the service could not interpret the question. Clients should + // present the error to the user so the user can rephrase the question. + InterpretError *InterpretError `protobuf:"bytes,5,opt,name=interpret_error,json=interpretError,proto3" json:"interpret_error,omitempty"` + // A list of interpretations for this question. + Interpretations []*Interpretation `protobuf:"bytes,6,rep,name=interpretations,proto3" json:"interpretations,omitempty"` + // Time when the question was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The e-mail address of the user that created this question. + UserEmail string `protobuf:"bytes,8,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` + // Input only. Immutable. Flags to request additional information for debugging purposes. + DebugFlags *DebugFlags `protobuf:"bytes,9,opt,name=debug_flags,json=debugFlags,proto3" json:"debug_flags,omitempty"` + // Top level debug information. + // This will be stored as the type DebugInformation. + // Using Any so clients don't need to pull in anything + // inside the debug message. + DebugInfo *anypb.Any `protobuf:"bytes,10,opt,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` +} + +func (x *Question) Reset() { + *x = Question{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Question) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Question) ProtoMessage() {} + +func (x *Question) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Question.ProtoReflect.Descriptor instead. +func (*Question) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{0} +} + +func (x *Question) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Question) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *Question) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *Question) GetDataSourceAnnotations() []string { + if x != nil { + return x.DataSourceAnnotations + } + return nil +} + +func (x *Question) GetInterpretError() *InterpretError { + if x != nil { + return x.InterpretError + } + return nil +} + +func (x *Question) GetInterpretations() []*Interpretation { + if x != nil { + return x.Interpretations + } + return nil +} + +func (x *Question) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Question) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *Question) GetDebugFlags() *DebugFlags { + if x != nil { + return x.DebugFlags + } + return nil +} + +func (x *Question) GetDebugInfo() *anypb.Any { + if x != nil { + return x.DebugInfo + } + return nil +} + +// Details on the failure to interpret the question. +type InterpretError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Error message explaining why this question could not be interpreted. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // The code for the error category why the interpretation failed. + Code InterpretError_InterpretErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=google.cloud.dataqna.v1alpha.InterpretError_InterpretErrorCode" json:"code,omitempty"` + // Details on interpretation failure. + Details *InterpretError_InterpretErrorDetails `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` +} + +func (x *InterpretError) Reset() { + *x = InterpretError{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretError) ProtoMessage() {} + +func (x *InterpretError) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretError.ProtoReflect.Descriptor instead. +func (*InterpretError) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{1} +} + +func (x *InterpretError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *InterpretError) GetCode() InterpretError_InterpretErrorCode { + if x != nil { + return x.Code + } + return InterpretError_INTERPRET_ERROR_CODE_UNSPECIFIED +} + +func (x *InterpretError) GetDetails() *InterpretError_InterpretErrorDetails { + if x != nil { + return x.Details + } + return nil +} + +// Information about the backend status (such as BigQuery) of the execution. +type ExecutionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status returned by the backend when the job was created. + JobCreationStatus *status.Status `protobuf:"bytes,1,opt,name=job_creation_status,json=jobCreationStatus,proto3" json:"job_creation_status,omitempty"` + // Status of the job execution. + JobExecutionState ExecutionInfo_JobExecutionState `protobuf:"varint,2,opt,name=job_execution_state,json=jobExecutionState,proto3,enum=google.cloud.dataqna.v1alpha.ExecutionInfo_JobExecutionState" json:"job_execution_state,omitempty"` + // Time when the execution was triggered. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // BigQuery job information. + // Future versions will have different backends. Hence, clients must make sure + // they can handle it when this field is not populated. + BigqueryJob *BigQueryJob `protobuf:"bytes,4,opt,name=bigquery_job,json=bigqueryJob,proto3" json:"bigquery_job,omitempty"` +} + +func (x *ExecutionInfo) Reset() { + *x = ExecutionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecutionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecutionInfo) ProtoMessage() {} + +func (x *ExecutionInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecutionInfo.ProtoReflect.Descriptor instead. +func (*ExecutionInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{2} +} + +func (x *ExecutionInfo) GetJobCreationStatus() *status.Status { + if x != nil { + return x.JobCreationStatus + } + return nil +} + +func (x *ExecutionInfo) GetJobExecutionState() ExecutionInfo_JobExecutionState { + if x != nil { + return x.JobExecutionState + } + return ExecutionInfo_JOB_EXECUTION_STATE_UNSPECIFIED +} + +func (x *ExecutionInfo) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ExecutionInfo) GetBigqueryJob() *BigQueryJob { + if x != nil { + return x.BigqueryJob + } + return nil +} + +// BigQuery job information. This can be used to query the BigQuery API and +// retrieve the current job's status (using +// [jobs.get](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/get)). +type BigQueryJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The job ID. + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + // The project ID of the job. + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The location where the job is running. + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` +} + +func (x *BigQueryJob) Reset() { + *x = BigQueryJob{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BigQueryJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BigQueryJob) ProtoMessage() {} + +func (x *BigQueryJob) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BigQueryJob.ProtoReflect.Descriptor instead. +func (*BigQueryJob) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{3} +} + +func (x *BigQueryJob) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *BigQueryJob) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *BigQueryJob) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +// An interpretation of a natural language query. +type Interpretation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of data sources used in the current understanding. + DataSources []string `protobuf:"bytes,1,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"` + // The level of confidence that one of the interpretations is correct. This is + // a value in the range [0, 1] where a value of 0.5 or below is to be + // considered a low confidence. + Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"` + // A list of unused phrases. Clients should display a Did You Mean (DYM) + // + // dialog if this is non-empty, even if this is the only interpretation. + UnusedPhrases []string `protobuf:"bytes,3,rep,name=unused_phrases,json=unusedPhrases,proto3" json:"unused_phrases,omitempty"` + // Human readable representation of the query. + HumanReadable *HumanReadable `protobuf:"bytes,4,opt,name=human_readable,json=humanReadable,proto3" json:"human_readable,omitempty"` + // Information about the interpretation structure that helps to understand and + // visualize the response. + InterpretationStructure *InterpretationStructure `protobuf:"bytes,5,opt,name=interpretation_structure,json=interpretationStructure,proto3" json:"interpretation_structure,omitempty"` + // Representation of the data query to be sent to the backend. + DataQuery *DataQuery `protobuf:"bytes,6,opt,name=data_query,json=dataQuery,proto3" json:"data_query,omitempty"` + // Information about the backend response. This is populated only if execution + // of an interpretation was requested. + ExecutionInfo *ExecutionInfo `protobuf:"bytes,7,opt,name=execution_info,json=executionInfo,proto3" json:"execution_info,omitempty"` +} + +func (x *Interpretation) Reset() { + *x = Interpretation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Interpretation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Interpretation) ProtoMessage() {} + +func (x *Interpretation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Interpretation.ProtoReflect.Descriptor instead. +func (*Interpretation) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{4} +} + +func (x *Interpretation) GetDataSources() []string { + if x != nil { + return x.DataSources + } + return nil +} + +func (x *Interpretation) GetConfidence() float64 { + if x != nil { + return x.Confidence + } + return 0 +} + +func (x *Interpretation) GetUnusedPhrases() []string { + if x != nil { + return x.UnusedPhrases + } + return nil +} + +func (x *Interpretation) GetHumanReadable() *HumanReadable { + if x != nil { + return x.HumanReadable + } + return nil +} + +func (x *Interpretation) GetInterpretationStructure() *InterpretationStructure { + if x != nil { + return x.InterpretationStructure + } + return nil +} + +func (x *Interpretation) GetDataQuery() *DataQuery { + if x != nil { + return x.DataQuery + } + return nil +} + +func (x *Interpretation) GetExecutionInfo() *ExecutionInfo { + if x != nil { + return x.ExecutionInfo + } + return nil +} + +// Representation of the data query for the backend. +// This is provided for informational purposes only. Clients should not use +// it to send it to the backend directly, but rather use the `execute` RPC +// to trigger the execution. Using the `execute` RPC is needed in order to +// track the state of a question and report on it correctly to the data +// administrators. +type DataQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The generated SQL query to be sent to the backend. + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` +} + +func (x *DataQuery) Reset() { + *x = DataQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataQuery) ProtoMessage() {} + +func (x *DataQuery) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataQuery.ProtoReflect.Descriptor instead. +func (*DataQuery) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{5} +} + +func (x *DataQuery) GetSql() string { + if x != nil { + return x.Sql + } + return "" +} + +// Human readable interpretation. +type HumanReadable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Generated query explaining the interpretation. + GeneratedInterpretation *AnnotatedString `protobuf:"bytes,1,opt,name=generated_interpretation,json=generatedInterpretation,proto3" json:"generated_interpretation,omitempty"` + // Annotations on the original query. + OriginalQuestion *AnnotatedString `protobuf:"bytes,2,opt,name=original_question,json=originalQuestion,proto3" json:"original_question,omitempty"` +} + +func (x *HumanReadable) Reset() { + *x = HumanReadable{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HumanReadable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HumanReadable) ProtoMessage() {} + +func (x *HumanReadable) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HumanReadable.ProtoReflect.Descriptor instead. +func (*HumanReadable) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{6} +} + +func (x *HumanReadable) GetGeneratedInterpretation() *AnnotatedString { + if x != nil { + return x.GeneratedInterpretation + } + return nil +} + +func (x *HumanReadable) GetOriginalQuestion() *AnnotatedString { + if x != nil { + return x.OriginalQuestion + } + return nil +} + +// Information about the interpretation structure that helps to understand and +// visualize the response. +type InterpretationStructure struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of possible visualization types to apply for this interpretation. The + // order has no relevance. + VisualizationTypes []InterpretationStructure_VisualizationType `protobuf:"varint,1,rep,packed,name=visualization_types,json=visualizationTypes,proto3,enum=google.cloud.dataqna.v1alpha.InterpretationStructure_VisualizationType" json:"visualization_types,omitempty"` + // Information about the output columns, that is, the columns that will be + // returned by the backend. + ColumnInfo []*InterpretationStructure_ColumnInfo `protobuf:"bytes,2,rep,name=column_info,json=columnInfo,proto3" json:"column_info,omitempty"` +} + +func (x *InterpretationStructure) Reset() { + *x = InterpretationStructure{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretationStructure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretationStructure) ProtoMessage() {} + +func (x *InterpretationStructure) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretationStructure.ProtoReflect.Descriptor instead. +func (*InterpretationStructure) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{7} +} + +func (x *InterpretationStructure) GetVisualizationTypes() []InterpretationStructure_VisualizationType { + if x != nil { + return x.VisualizationTypes + } + return nil +} + +func (x *InterpretationStructure) GetColumnInfo() []*InterpretationStructure_ColumnInfo { + if x != nil { + return x.ColumnInfo + } + return nil +} + +// Configuriation of debug flags. +type DebugFlags struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether to include the original VAQuery. + IncludeVaQuery bool `protobuf:"varint,1,opt,name=include_va_query,json=includeVaQuery,proto3" json:"include_va_query,omitempty"` + // Whether to include the original nested VAQuery. + IncludeNestedVaQuery bool `protobuf:"varint,2,opt,name=include_nested_va_query,json=includeNestedVaQuery,proto3" json:"include_nested_va_query,omitempty"` + // Whether to include the original human interpretation strings generated + // by Analyza. + IncludeHumanInterpretation bool `protobuf:"varint,3,opt,name=include_human_interpretation,json=includeHumanInterpretation,proto3" json:"include_human_interpretation,omitempty"` + // Whether to include the Aqua debug response. + IncludeAquaDebugResponse bool `protobuf:"varint,4,opt,name=include_aqua_debug_response,json=includeAquaDebugResponse,proto3" json:"include_aqua_debug_response,omitempty"` + // The time in milliseconds from Unix epoch to be used + // to process the query. This is useful for testing + // the queries at different time period. + // If not set or time_override <= 0, then the current + // time is used. + TimeOverride int64 `protobuf:"varint,5,opt,name=time_override,json=timeOverride,proto3" json:"time_override,omitempty"` + // Set to true if request is initiated by an internal Google user. + IsInternalGoogleUser bool `protobuf:"varint,6,opt,name=is_internal_google_user,json=isInternalGoogleUser,proto3" json:"is_internal_google_user,omitempty"` + // Determines whether cache needs to be ignored. If set to + // true, cache won't be queried and updated. + IgnoreCache bool `protobuf:"varint,7,opt,name=ignore_cache,json=ignoreCache,proto3" json:"ignore_cache,omitempty"` + // Whether to include the request/response pair from the call to the + // EntityIndex for SearchEntities. + IncludeSearchEntitiesRpc bool `protobuf:"varint,8,opt,name=include_search_entities_rpc,json=includeSearchEntitiesRpc,proto3" json:"include_search_entities_rpc,omitempty"` + // Whether to include the request/response pair from the call to the + // Annotations service for ListColumnAnnotations. + IncludeListColumnAnnotationsRpc bool `protobuf:"varint,9,opt,name=include_list_column_annotations_rpc,json=includeListColumnAnnotationsRpc,proto3" json:"include_list_column_annotations_rpc,omitempty"` + // Whether to include the entity list passed to Analyza. + IncludeVirtualAnalystEntities bool `protobuf:"varint,10,opt,name=include_virtual_analyst_entities,json=includeVirtualAnalystEntities,proto3" json:"include_virtual_analyst_entities,omitempty"` + // Whether to include the table list. + IncludeTableList bool `protobuf:"varint,11,opt,name=include_table_list,json=includeTableList,proto3" json:"include_table_list,omitempty"` + // Whether to include the domain list. + IncludeDomainList bool `protobuf:"varint,12,opt,name=include_domain_list,json=includeDomainList,proto3" json:"include_domain_list,omitempty"` +} + +func (x *DebugFlags) Reset() { + *x = DebugFlags{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DebugFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DebugFlags) ProtoMessage() {} + +func (x *DebugFlags) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DebugFlags.ProtoReflect.Descriptor instead. +func (*DebugFlags) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{8} +} + +func (x *DebugFlags) GetIncludeVaQuery() bool { + if x != nil { + return x.IncludeVaQuery + } + return false +} + +func (x *DebugFlags) GetIncludeNestedVaQuery() bool { + if x != nil { + return x.IncludeNestedVaQuery + } + return false +} + +func (x *DebugFlags) GetIncludeHumanInterpretation() bool { + if x != nil { + return x.IncludeHumanInterpretation + } + return false +} + +func (x *DebugFlags) GetIncludeAquaDebugResponse() bool { + if x != nil { + return x.IncludeAquaDebugResponse + } + return false +} + +func (x *DebugFlags) GetTimeOverride() int64 { + if x != nil { + return x.TimeOverride + } + return 0 +} + +func (x *DebugFlags) GetIsInternalGoogleUser() bool { + if x != nil { + return x.IsInternalGoogleUser + } + return false +} + +func (x *DebugFlags) GetIgnoreCache() bool { + if x != nil { + return x.IgnoreCache + } + return false +} + +func (x *DebugFlags) GetIncludeSearchEntitiesRpc() bool { + if x != nil { + return x.IncludeSearchEntitiesRpc + } + return false +} + +func (x *DebugFlags) GetIncludeListColumnAnnotationsRpc() bool { + if x != nil { + return x.IncludeListColumnAnnotationsRpc + } + return false +} + +func (x *DebugFlags) GetIncludeVirtualAnalystEntities() bool { + if x != nil { + return x.IncludeVirtualAnalystEntities + } + return false +} + +func (x *DebugFlags) GetIncludeTableList() bool { + if x != nil { + return x.IncludeTableList + } + return false +} + +func (x *DebugFlags) GetIncludeDomainList() bool { + if x != nil { + return x.IncludeDomainList + } + return false +} + +// Details on interpretation failure. +type InterpretError_InterpretErrorDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Populated if parts of the query are unsupported. + UnsupportedDetails *InterpretError_InterpretUnsupportedDetails `protobuf:"bytes,1,opt,name=unsupported_details,json=unsupportedDetails,proto3" json:"unsupported_details,omitempty"` + // Populated if the query is incomplete. + IncompleteQueryDetails *InterpretError_InterpretIncompleteQueryDetails `protobuf:"bytes,2,opt,name=incomplete_query_details,json=incompleteQueryDetails,proto3" json:"incomplete_query_details,omitempty"` + // Populated if the query was too ambiguous. + AmbiguityDetails *InterpretError_InterpretAmbiguityDetails `protobuf:"bytes,3,opt,name=ambiguity_details,json=ambiguityDetails,proto3" json:"ambiguity_details,omitempty"` +} + +func (x *InterpretError_InterpretErrorDetails) Reset() { + *x = InterpretError_InterpretErrorDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretError_InterpretErrorDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretError_InterpretErrorDetails) ProtoMessage() {} + +func (x *InterpretError_InterpretErrorDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretError_InterpretErrorDetails.ProtoReflect.Descriptor instead. +func (*InterpretError_InterpretErrorDetails) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *InterpretError_InterpretErrorDetails) GetUnsupportedDetails() *InterpretError_InterpretUnsupportedDetails { + if x != nil { + return x.UnsupportedDetails + } + return nil +} + +func (x *InterpretError_InterpretErrorDetails) GetIncompleteQueryDetails() *InterpretError_InterpretIncompleteQueryDetails { + if x != nil { + return x.IncompleteQueryDetails + } + return nil +} + +func (x *InterpretError_InterpretErrorDetails) GetAmbiguityDetails() *InterpretError_InterpretAmbiguityDetails { + if x != nil { + return x.AmbiguityDetails + } + return nil +} + +// Details about unsupported parts in a query. +type InterpretError_InterpretUnsupportedDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unsupported operators. For example: median. + Operators []string `protobuf:"bytes,1,rep,name=operators,proto3" json:"operators,omitempty"` + // Unsupported intents. + Intent []string `protobuf:"bytes,2,rep,name=intent,proto3" json:"intent,omitempty"` +} + +func (x *InterpretError_InterpretUnsupportedDetails) Reset() { + *x = InterpretError_InterpretUnsupportedDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretError_InterpretUnsupportedDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretError_InterpretUnsupportedDetails) ProtoMessage() {} + +func (x *InterpretError_InterpretUnsupportedDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretError_InterpretUnsupportedDetails.ProtoReflect.Descriptor instead. +func (*InterpretError_InterpretUnsupportedDetails) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *InterpretError_InterpretUnsupportedDetails) GetOperators() []string { + if x != nil { + return x.Operators + } + return nil +} + +func (x *InterpretError_InterpretUnsupportedDetails) GetIntent() []string { + if x != nil { + return x.Intent + } + return nil +} + +// Details about an incomplete query. +type InterpretError_InterpretIncompleteQueryDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of missing interpret entities. + Entities []InterpretEntity `protobuf:"varint,1,rep,packed,name=entities,proto3,enum=google.cloud.dataqna.v1alpha.InterpretEntity" json:"entities,omitempty"` +} + +func (x *InterpretError_InterpretIncompleteQueryDetails) Reset() { + *x = InterpretError_InterpretIncompleteQueryDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretError_InterpretIncompleteQueryDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretError_InterpretIncompleteQueryDetails) ProtoMessage() {} + +func (x *InterpretError_InterpretIncompleteQueryDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretError_InterpretIncompleteQueryDetails.ProtoReflect.Descriptor instead. +func (*InterpretError_InterpretIncompleteQueryDetails) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *InterpretError_InterpretIncompleteQueryDetails) GetEntities() []InterpretEntity { + if x != nil { + return x.Entities + } + return nil +} + +// Details about a query that was too ambiguous. Currently, the message +// has no fields and its presence signals that there was ambiguity. +type InterpretError_InterpretAmbiguityDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InterpretError_InterpretAmbiguityDetails) Reset() { + *x = InterpretError_InterpretAmbiguityDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretError_InterpretAmbiguityDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretError_InterpretAmbiguityDetails) ProtoMessage() {} + +func (x *InterpretError_InterpretAmbiguityDetails) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretError_InterpretAmbiguityDetails.ProtoReflect.Descriptor instead. +func (*InterpretError_InterpretAmbiguityDetails) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{1, 3} +} + +// Information about a column. +type InterpretationStructure_ColumnInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The alias of the output column as used by the backend. For example, the + // field name in the schema provided in the query response in BigQuery. + OutputAlias string `protobuf:"bytes,1,opt,name=output_alias,json=outputAlias,proto3" json:"output_alias,omitempty"` + // Human readable name of the output column. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` +} + +func (x *InterpretationStructure_ColumnInfo) Reset() { + *x = InterpretationStructure_ColumnInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretationStructure_ColumnInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretationStructure_ColumnInfo) ProtoMessage() {} + +func (x *InterpretationStructure_ColumnInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretationStructure_ColumnInfo.ProtoReflect.Descriptor instead. +func (*InterpretationStructure_ColumnInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *InterpretationStructure_ColumnInfo) GetOutputAlias() string { + if x != nil { + return x.OutputAlias + } + return "" +} + +func (x *InterpretationStructure_ColumnInfo) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +var File_google_cloud_dataqna_v1alpha_question_proto protoreflect.FileDescriptor + +var file_google_cloud_dataqna_v1alpha_question_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x98, 0x05, 0x0a, 0x08, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, + 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, + 0x41, 0x05, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, + 0x05, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x64, 0x61, 0x74, 0x61, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x55, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x51, 0x0a, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x42, + 0x06, 0xe0, 0x41, 0x05, 0xe0, 0x41, 0x04, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x46, 0x6c, + 0x61, 0x67, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x62, 0xea, 0x41, 0x5f, 0x0a, 0x1f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0xcf, 0x07, 0x0a, + 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, + 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x90, 0x03, 0x0a, + 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x79, 0x0a, 0x13, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x55, 0x6e, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x12, 0x75, + 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x12, 0x86, 0x01, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x49, 0x6e, 0x63, 0x6f, + 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x52, 0x16, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x73, 0x0a, 0x11, 0x61, 0x6d, + 0x62, 0x69, 0x67, 0x75, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x41, 0x6d, 0x62, + 0x69, 0x67, 0x75, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x10, 0x61, + 0x6d, 0x62, 0x69, 0x67, 0x75, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, + 0x53, 0x0a, 0x1b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x55, 0x6e, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x6c, 0x0a, 0x1f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x49, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x1a, 0x1b, 0x0a, 0x19, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x41, + 0x6d, 0x62, 0x69, 0x67, 0x75, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, + 0x7d, 0x0a, 0x12, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, + 0x45, 0x54, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x49, + 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x18, + 0x0a, 0x14, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x55, 0x4e, 0x44, 0x45, + 0x52, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x5f, 0x41, 0x4e, 0x53, 0x57, 0x45, 0x52, 0x10, 0x03, 0x22, 0xc1, + 0x03, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x42, 0x0a, 0x13, 0x6a, 0x6f, 0x62, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x11, 0x6a, 0x6f, 0x62, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x6d, 0x0a, 0x13, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4a, + 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x11, 0x6a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x4c, 0x0a, 0x0c, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6a, 0x6f, 0x62, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4a, 0x6f, + 0x62, 0x52, 0x0b, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x22, 0x72, + 0x0a, 0x11, 0x4a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x4a, 0x4f, 0x42, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x54, 0x5f, + 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, + 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, + 0x45, 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x04, 0x22, 0x5f, 0x0a, 0x0b, 0x42, 0x69, 0x67, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4a, 0x6f, + 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xdc, 0x03, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x75, + 0x73, 0x65, 0x64, 0x5f, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0d, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, + 0x12, 0x52, 0x0a, 0x0e, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, + 0x64, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0d, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x70, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x17, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, + 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x52, + 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x1d, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, + 0x6c, 0x22, 0xd5, 0x01, 0x0a, 0x0d, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x68, 0x0a, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, + 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xcc, 0x04, 0x0a, 0x17, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x78, 0x0a, 0x13, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x76, 0x69, 0x73, + 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, + 0x61, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, + 0x66, 0x6f, 0x1a, 0x52, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x6c, + 0x69, 0x61, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xff, 0x01, 0x0a, 0x11, 0x56, 0x69, 0x73, 0x75, 0x61, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x1e, + 0x56, 0x49, 0x53, 0x55, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x42, + 0x41, 0x52, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4f, + 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, + 0x54, 0x49, 0x4d, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x43, + 0x41, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x50, 0x4c, 0x4f, 0x54, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, + 0x50, 0x49, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, + 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x41, + 0x52, 0x45, 0x41, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x43, + 0x4f, 0x4d, 0x42, 0x4f, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, + 0x48, 0x49, 0x53, 0x54, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x47, + 0x45, 0x4e, 0x45, 0x52, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x54, 0x10, 0x0b, 0x12, 0x18, + 0x0a, 0x14, 0x43, 0x48, 0x41, 0x52, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, 0x4e, 0x44, 0x45, + 0x52, 0x53, 0x54, 0x4f, 0x4f, 0x44, 0x10, 0x0c, 0x22, 0xa1, 0x05, 0x0a, 0x0a, 0x44, 0x65, 0x62, + 0x75, 0x67, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x76, 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x61, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x35, 0x0a, 0x17, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6e, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x56, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x1c, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x48, 0x75, 0x6d, 0x61, 0x6e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x1b, 0x69, 0x6e, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x71, 0x75, 0x61, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x41, 0x71, 0x75, 0x61, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x35, + 0x0a, 0x17, 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x3d, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x70, 0x63, 0x12, 0x4c, 0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x70, 0x63, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x70, 0x63, 0x12, 0x47, 0x0a, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x74, + 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x41, + 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2c, + 0x0a, 0x12, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x13, + 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, + 0x64, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x2a, 0x4e, 0x0a, 0x0f, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x20, 0x0a, 0x1c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, + 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x49, 0x4d, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x02, 0x42, 0xd8, 0x01, 0x0a, + 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x42, 0x0d, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, + 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x2e, 0x56, + 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xea, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x3a, 0x3a, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dataqna_v1alpha_question_proto_rawDescOnce sync.Once + file_google_cloud_dataqna_v1alpha_question_proto_rawDescData = file_google_cloud_dataqna_v1alpha_question_proto_rawDesc +) + +func file_google_cloud_dataqna_v1alpha_question_proto_rawDescGZIP() []byte { + file_google_cloud_dataqna_v1alpha_question_proto_rawDescOnce.Do(func() { + file_google_cloud_dataqna_v1alpha_question_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dataqna_v1alpha_question_proto_rawDescData) + }) + return file_google_cloud_dataqna_v1alpha_question_proto_rawDescData +} + +var file_google_cloud_dataqna_v1alpha_question_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_google_cloud_dataqna_v1alpha_question_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_cloud_dataqna_v1alpha_question_proto_goTypes = []interface{}{ + (InterpretEntity)(0), // 0: google.cloud.dataqna.v1alpha.InterpretEntity + (InterpretError_InterpretErrorCode)(0), // 1: google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode + (ExecutionInfo_JobExecutionState)(0), // 2: google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState + (InterpretationStructure_VisualizationType)(0), // 3: google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType + (*Question)(nil), // 4: google.cloud.dataqna.v1alpha.Question + (*InterpretError)(nil), // 5: google.cloud.dataqna.v1alpha.InterpretError + (*ExecutionInfo)(nil), // 6: google.cloud.dataqna.v1alpha.ExecutionInfo + (*BigQueryJob)(nil), // 7: google.cloud.dataqna.v1alpha.BigQueryJob + (*Interpretation)(nil), // 8: google.cloud.dataqna.v1alpha.Interpretation + (*DataQuery)(nil), // 9: google.cloud.dataqna.v1alpha.DataQuery + (*HumanReadable)(nil), // 10: google.cloud.dataqna.v1alpha.HumanReadable + (*InterpretationStructure)(nil), // 11: google.cloud.dataqna.v1alpha.InterpretationStructure + (*DebugFlags)(nil), // 12: google.cloud.dataqna.v1alpha.DebugFlags + (*InterpretError_InterpretErrorDetails)(nil), // 13: google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails + (*InterpretError_InterpretUnsupportedDetails)(nil), // 14: google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails + (*InterpretError_InterpretIncompleteQueryDetails)(nil), // 15: google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails + (*InterpretError_InterpretAmbiguityDetails)(nil), // 16: google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails + (*InterpretationStructure_ColumnInfo)(nil), // 17: google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*anypb.Any)(nil), // 19: google.protobuf.Any + (*status.Status)(nil), // 20: google.rpc.Status + (*AnnotatedString)(nil), // 21: google.cloud.dataqna.v1alpha.AnnotatedString +} +var file_google_cloud_dataqna_v1alpha_question_proto_depIdxs = []int32{ + 5, // 0: google.cloud.dataqna.v1alpha.Question.interpret_error:type_name -> google.cloud.dataqna.v1alpha.InterpretError + 8, // 1: google.cloud.dataqna.v1alpha.Question.interpretations:type_name -> google.cloud.dataqna.v1alpha.Interpretation + 18, // 2: google.cloud.dataqna.v1alpha.Question.create_time:type_name -> google.protobuf.Timestamp + 12, // 3: google.cloud.dataqna.v1alpha.Question.debug_flags:type_name -> google.cloud.dataqna.v1alpha.DebugFlags + 19, // 4: google.cloud.dataqna.v1alpha.Question.debug_info:type_name -> google.protobuf.Any + 1, // 5: google.cloud.dataqna.v1alpha.InterpretError.code:type_name -> google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode + 13, // 6: google.cloud.dataqna.v1alpha.InterpretError.details:type_name -> google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails + 20, // 7: google.cloud.dataqna.v1alpha.ExecutionInfo.job_creation_status:type_name -> google.rpc.Status + 2, // 8: google.cloud.dataqna.v1alpha.ExecutionInfo.job_execution_state:type_name -> google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState + 18, // 9: google.cloud.dataqna.v1alpha.ExecutionInfo.create_time:type_name -> google.protobuf.Timestamp + 7, // 10: google.cloud.dataqna.v1alpha.ExecutionInfo.bigquery_job:type_name -> google.cloud.dataqna.v1alpha.BigQueryJob + 10, // 11: google.cloud.dataqna.v1alpha.Interpretation.human_readable:type_name -> google.cloud.dataqna.v1alpha.HumanReadable + 11, // 12: google.cloud.dataqna.v1alpha.Interpretation.interpretation_structure:type_name -> google.cloud.dataqna.v1alpha.InterpretationStructure + 9, // 13: google.cloud.dataqna.v1alpha.Interpretation.data_query:type_name -> google.cloud.dataqna.v1alpha.DataQuery + 6, // 14: google.cloud.dataqna.v1alpha.Interpretation.execution_info:type_name -> google.cloud.dataqna.v1alpha.ExecutionInfo + 21, // 15: google.cloud.dataqna.v1alpha.HumanReadable.generated_interpretation:type_name -> google.cloud.dataqna.v1alpha.AnnotatedString + 21, // 16: google.cloud.dataqna.v1alpha.HumanReadable.original_question:type_name -> google.cloud.dataqna.v1alpha.AnnotatedString + 3, // 17: google.cloud.dataqna.v1alpha.InterpretationStructure.visualization_types:type_name -> google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType + 17, // 18: google.cloud.dataqna.v1alpha.InterpretationStructure.column_info:type_name -> google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo + 14, // 19: google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails.unsupported_details:type_name -> google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails + 15, // 20: google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails.incomplete_query_details:type_name -> google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails + 16, // 21: google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails.ambiguity_details:type_name -> google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails + 0, // 22: google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails.entities:type_name -> google.cloud.dataqna.v1alpha.InterpretEntity + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_google_cloud_dataqna_v1alpha_question_proto_init() } +func file_google_cloud_dataqna_v1alpha_question_proto_init() { + if File_google_cloud_dataqna_v1alpha_question_proto != nil { + return + } + file_google_cloud_dataqna_v1alpha_annotated_string_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Question); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecutionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BigQueryJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Interpretation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HumanReadable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretationStructure); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DebugFlags); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretError_InterpretErrorDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretError_InterpretUnsupportedDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretError_InterpretIncompleteQueryDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretError_InterpretAmbiguityDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretationStructure_ColumnInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dataqna_v1alpha_question_proto_rawDesc, + NumEnums: 4, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dataqna_v1alpha_question_proto_goTypes, + DependencyIndexes: file_google_cloud_dataqna_v1alpha_question_proto_depIdxs, + EnumInfos: file_google_cloud_dataqna_v1alpha_question_proto_enumTypes, + MessageInfos: file_google_cloud_dataqna_v1alpha_question_proto_msgTypes, + }.Build() + File_google_cloud_dataqna_v1alpha_question_proto = out.File + file_google_cloud_dataqna_v1alpha_question_proto_rawDesc = nil + file_google_cloud_dataqna_v1alpha_question_proto_goTypes = nil + file_google_cloud_dataqna_v1alpha_question_proto_depIdxs = nil +} diff --git a/dataqna/apiv1alpha/dataqnapb/question_service.pb.go b/dataqna/apiv1alpha/dataqnapb/question_service.pb.go new file mode 100644 index 000000000000..52e9e7b71734 --- /dev/null +++ b/dataqna/apiv1alpha/dataqnapb/question_service.pb.go @@ -0,0 +1,855 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dataqna/v1alpha/question_service.proto + +package dataqnapb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A request to get a previously created question. +type GetQuestionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The unique identifier for the question. + // Example: `projects/foo/locations/bar/questions/1234` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The list of fields to be retrieved. + ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` +} + +func (x *GetQuestionRequest) Reset() { + *x = GetQuestionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuestionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuestionRequest) ProtoMessage() {} + +func (x *GetQuestionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetQuestionRequest.ProtoReflect.Descriptor instead. +func (*GetQuestionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetQuestionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetQuestionRequest) GetReadMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.ReadMask + } + return nil +} + +// Request to create a question resource. +type CreateQuestionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the project this data source reference belongs to. + // Example: `projects/foo/locations/bar` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The question to create. + Question *Question `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"` +} + +func (x *CreateQuestionRequest) Reset() { + *x = CreateQuestionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateQuestionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateQuestionRequest) ProtoMessage() {} + +func (x *CreateQuestionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateQuestionRequest.ProtoReflect.Descriptor instead. +func (*CreateQuestionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateQuestionRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateQuestionRequest) GetQuestion() *Question { + if x != nil { + return x.Question + } + return nil +} + +// Request to execute an interpretation. +type ExecuteQuestionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The unique identifier for the question. + // Example: `projects/foo/locations/bar/questions/1234` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Index of the interpretation to execute. + InterpretationIndex int32 `protobuf:"varint,2,opt,name=interpretation_index,json=interpretationIndex,proto3" json:"interpretation_index,omitempty"` +} + +func (x *ExecuteQuestionRequest) Reset() { + *x = ExecuteQuestionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteQuestionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteQuestionRequest) ProtoMessage() {} + +func (x *ExecuteQuestionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteQuestionRequest.ProtoReflect.Descriptor instead. +func (*ExecuteQuestionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ExecuteQuestionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExecuteQuestionRequest) GetInterpretationIndex() int32 { + if x != nil { + return x.InterpretationIndex + } + return 0 +} + +// Request to get user feedback. +type GetUserFeedbackRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The unique identifier for the user feedback. + // User feedback is a singleton resource on a Question. + // Example: `projects/foo/locations/bar/questions/1234/userFeedback` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetUserFeedbackRequest) Reset() { + *x = GetUserFeedbackRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserFeedbackRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserFeedbackRequest) ProtoMessage() {} + +func (x *GetUserFeedbackRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserFeedbackRequest.ProtoReflect.Descriptor instead. +func (*GetUserFeedbackRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetUserFeedbackRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request to updates user feedback. +type UpdateUserFeedbackRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The user feedback to update. This can be called even if there is no + // user feedback so far. + // The feedback's name field is used to identify the user feedback (and the + // corresponding question) to update. + UserFeedback *UserFeedback `protobuf:"bytes,1,opt,name=user_feedback,json=userFeedback,proto3" json:"user_feedback,omitempty"` + // The list of fields to be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateUserFeedbackRequest) Reset() { + *x = UpdateUserFeedbackRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUserFeedbackRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUserFeedbackRequest) ProtoMessage() {} + +func (x *UpdateUserFeedbackRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateUserFeedbackRequest.ProtoReflect.Descriptor instead. +func (*UpdateUserFeedbackRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateUserFeedbackRequest) GetUserFeedback() *UserFeedback { + if x != nil { + return x.UserFeedback + } + return nil +} + +func (x *UpdateUserFeedbackRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +var File_google_cloud_dataqna_v1alpha_question_service_proto protoreflect.FileDescriptor + +var file_google_cloud_dataqna_v1alpha_question_service_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x09, 0x72, + 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x47, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x69, 0x0a, 0x16, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, + 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x59, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, + 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0xae, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x46, + 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, + 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, + 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, + 0x62, 0x61, 0x63, 0x6b, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, + 0x6b, 0x32, 0xec, 0x08, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaa, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xc5, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, + 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x08, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x2c, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xd2, 0x01, 0x0a, 0x0f, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x19, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0xc3, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, + 0x61, 0x63, 0x6b, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, + 0x64, 0x62, 0x61, 0x63, 0x6b, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x7d, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xfc, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x37, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, + 0x6b, 0x22, 0x80, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5e, 0x32, 0x4d, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x62, + 0x61, 0x63, 0x6b, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x7d, 0x3a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0xda, 0x41, 0x19, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x1a, 0x4a, 0xca, 0x41, 0x16, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, + 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x42, 0xdf, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x14, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x71, + 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x71, + 0x6e, 0x61, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, + 0x61, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0xea, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescOnce sync.Once + file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescData = file_google_cloud_dataqna_v1alpha_question_service_proto_rawDesc +) + +func file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescGZIP() []byte { + file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescOnce.Do(func() { + file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescData) + }) + return file_google_cloud_dataqna_v1alpha_question_service_proto_rawDescData +} + +var file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_dataqna_v1alpha_question_service_proto_goTypes = []interface{}{ + (*GetQuestionRequest)(nil), // 0: google.cloud.dataqna.v1alpha.GetQuestionRequest + (*CreateQuestionRequest)(nil), // 1: google.cloud.dataqna.v1alpha.CreateQuestionRequest + (*ExecuteQuestionRequest)(nil), // 2: google.cloud.dataqna.v1alpha.ExecuteQuestionRequest + (*GetUserFeedbackRequest)(nil), // 3: google.cloud.dataqna.v1alpha.GetUserFeedbackRequest + (*UpdateUserFeedbackRequest)(nil), // 4: google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest + (*fieldmaskpb.FieldMask)(nil), // 5: google.protobuf.FieldMask + (*Question)(nil), // 6: google.cloud.dataqna.v1alpha.Question + (*UserFeedback)(nil), // 7: google.cloud.dataqna.v1alpha.UserFeedback +} +var file_google_cloud_dataqna_v1alpha_question_service_proto_depIdxs = []int32{ + 5, // 0: google.cloud.dataqna.v1alpha.GetQuestionRequest.read_mask:type_name -> google.protobuf.FieldMask + 6, // 1: google.cloud.dataqna.v1alpha.CreateQuestionRequest.question:type_name -> google.cloud.dataqna.v1alpha.Question + 7, // 2: google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest.user_feedback:type_name -> google.cloud.dataqna.v1alpha.UserFeedback + 5, // 3: google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 4: google.cloud.dataqna.v1alpha.QuestionService.GetQuestion:input_type -> google.cloud.dataqna.v1alpha.GetQuestionRequest + 1, // 5: google.cloud.dataqna.v1alpha.QuestionService.CreateQuestion:input_type -> google.cloud.dataqna.v1alpha.CreateQuestionRequest + 2, // 6: google.cloud.dataqna.v1alpha.QuestionService.ExecuteQuestion:input_type -> google.cloud.dataqna.v1alpha.ExecuteQuestionRequest + 3, // 7: google.cloud.dataqna.v1alpha.QuestionService.GetUserFeedback:input_type -> google.cloud.dataqna.v1alpha.GetUserFeedbackRequest + 4, // 8: google.cloud.dataqna.v1alpha.QuestionService.UpdateUserFeedback:input_type -> google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest + 6, // 9: google.cloud.dataqna.v1alpha.QuestionService.GetQuestion:output_type -> google.cloud.dataqna.v1alpha.Question + 6, // 10: google.cloud.dataqna.v1alpha.QuestionService.CreateQuestion:output_type -> google.cloud.dataqna.v1alpha.Question + 6, // 11: google.cloud.dataqna.v1alpha.QuestionService.ExecuteQuestion:output_type -> google.cloud.dataqna.v1alpha.Question + 7, // 12: google.cloud.dataqna.v1alpha.QuestionService.GetUserFeedback:output_type -> google.cloud.dataqna.v1alpha.UserFeedback + 7, // 13: google.cloud.dataqna.v1alpha.QuestionService.UpdateUserFeedback:output_type -> google.cloud.dataqna.v1alpha.UserFeedback + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_google_cloud_dataqna_v1alpha_question_service_proto_init() } +func file_google_cloud_dataqna_v1alpha_question_service_proto_init() { + if File_google_cloud_dataqna_v1alpha_question_service_proto != nil { + return + } + file_google_cloud_dataqna_v1alpha_question_proto_init() + file_google_cloud_dataqna_v1alpha_user_feedback_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuestionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateQuestionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteQuestionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserFeedbackRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUserFeedbackRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dataqna_v1alpha_question_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dataqna_v1alpha_question_service_proto_goTypes, + DependencyIndexes: file_google_cloud_dataqna_v1alpha_question_service_proto_depIdxs, + MessageInfos: file_google_cloud_dataqna_v1alpha_question_service_proto_msgTypes, + }.Build() + File_google_cloud_dataqna_v1alpha_question_service_proto = out.File + file_google_cloud_dataqna_v1alpha_question_service_proto_rawDesc = nil + file_google_cloud_dataqna_v1alpha_question_service_proto_goTypes = nil + file_google_cloud_dataqna_v1alpha_question_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// QuestionServiceClient is the client API for QuestionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QuestionServiceClient interface { + // Gets a previously created question. + GetQuestion(ctx context.Context, in *GetQuestionRequest, opts ...grpc.CallOption) (*Question, error) + // Creates a question. + CreateQuestion(ctx context.Context, in *CreateQuestionRequest, opts ...grpc.CallOption) (*Question, error) + // Executes an interpretation. + ExecuteQuestion(ctx context.Context, in *ExecuteQuestionRequest, opts ...grpc.CallOption) (*Question, error) + // Gets previously created user feedback. + GetUserFeedback(ctx context.Context, in *GetUserFeedbackRequest, opts ...grpc.CallOption) (*UserFeedback, error) + // Updates user feedback. This creates user feedback if there was none before + // (upsert). + UpdateUserFeedback(ctx context.Context, in *UpdateUserFeedbackRequest, opts ...grpc.CallOption) (*UserFeedback, error) +} + +type questionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewQuestionServiceClient(cc grpc.ClientConnInterface) QuestionServiceClient { + return &questionServiceClient{cc} +} + +func (c *questionServiceClient) GetQuestion(ctx context.Context, in *GetQuestionRequest, opts ...grpc.CallOption) (*Question, error) { + out := new(Question) + err := c.cc.Invoke(ctx, "/google.cloud.dataqna.v1alpha.QuestionService/GetQuestion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *questionServiceClient) CreateQuestion(ctx context.Context, in *CreateQuestionRequest, opts ...grpc.CallOption) (*Question, error) { + out := new(Question) + err := c.cc.Invoke(ctx, "/google.cloud.dataqna.v1alpha.QuestionService/CreateQuestion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *questionServiceClient) ExecuteQuestion(ctx context.Context, in *ExecuteQuestionRequest, opts ...grpc.CallOption) (*Question, error) { + out := new(Question) + err := c.cc.Invoke(ctx, "/google.cloud.dataqna.v1alpha.QuestionService/ExecuteQuestion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *questionServiceClient) GetUserFeedback(ctx context.Context, in *GetUserFeedbackRequest, opts ...grpc.CallOption) (*UserFeedback, error) { + out := new(UserFeedback) + err := c.cc.Invoke(ctx, "/google.cloud.dataqna.v1alpha.QuestionService/GetUserFeedback", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *questionServiceClient) UpdateUserFeedback(ctx context.Context, in *UpdateUserFeedbackRequest, opts ...grpc.CallOption) (*UserFeedback, error) { + out := new(UserFeedback) + err := c.cc.Invoke(ctx, "/google.cloud.dataqna.v1alpha.QuestionService/UpdateUserFeedback", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QuestionServiceServer is the server API for QuestionService service. +type QuestionServiceServer interface { + // Gets a previously created question. + GetQuestion(context.Context, *GetQuestionRequest) (*Question, error) + // Creates a question. + CreateQuestion(context.Context, *CreateQuestionRequest) (*Question, error) + // Executes an interpretation. + ExecuteQuestion(context.Context, *ExecuteQuestionRequest) (*Question, error) + // Gets previously created user feedback. + GetUserFeedback(context.Context, *GetUserFeedbackRequest) (*UserFeedback, error) + // Updates user feedback. This creates user feedback if there was none before + // (upsert). + UpdateUserFeedback(context.Context, *UpdateUserFeedbackRequest) (*UserFeedback, error) +} + +// UnimplementedQuestionServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQuestionServiceServer struct { +} + +func (*UnimplementedQuestionServiceServer) GetQuestion(context.Context, *GetQuestionRequest) (*Question, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQuestion not implemented") +} +func (*UnimplementedQuestionServiceServer) CreateQuestion(context.Context, *CreateQuestionRequest) (*Question, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateQuestion not implemented") +} +func (*UnimplementedQuestionServiceServer) ExecuteQuestion(context.Context, *ExecuteQuestionRequest) (*Question, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecuteQuestion not implemented") +} +func (*UnimplementedQuestionServiceServer) GetUserFeedback(context.Context, *GetUserFeedbackRequest) (*UserFeedback, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserFeedback not implemented") +} +func (*UnimplementedQuestionServiceServer) UpdateUserFeedback(context.Context, *UpdateUserFeedbackRequest) (*UserFeedback, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserFeedback not implemented") +} + +func RegisterQuestionServiceServer(s *grpc.Server, srv QuestionServiceServer) { + s.RegisterService(&_QuestionService_serviceDesc, srv) +} + +func _QuestionService_GetQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQuestionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuestionServiceServer).GetQuestion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataqna.v1alpha.QuestionService/GetQuestion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuestionServiceServer).GetQuestion(ctx, req.(*GetQuestionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuestionService_CreateQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateQuestionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuestionServiceServer).CreateQuestion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataqna.v1alpha.QuestionService/CreateQuestion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuestionServiceServer).CreateQuestion(ctx, req.(*CreateQuestionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuestionService_ExecuteQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecuteQuestionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuestionServiceServer).ExecuteQuestion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataqna.v1alpha.QuestionService/ExecuteQuestion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuestionServiceServer).ExecuteQuestion(ctx, req.(*ExecuteQuestionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuestionService_GetUserFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserFeedbackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuestionServiceServer).GetUserFeedback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataqna.v1alpha.QuestionService/GetUserFeedback", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuestionServiceServer).GetUserFeedback(ctx, req.(*GetUserFeedbackRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QuestionService_UpdateUserFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserFeedbackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuestionServiceServer).UpdateUserFeedback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dataqna.v1alpha.QuestionService/UpdateUserFeedback", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuestionServiceServer).UpdateUserFeedback(ctx, req.(*UpdateUserFeedbackRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QuestionService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dataqna.v1alpha.QuestionService", + HandlerType: (*QuestionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetQuestion", + Handler: _QuestionService_GetQuestion_Handler, + }, + { + MethodName: "CreateQuestion", + Handler: _QuestionService_CreateQuestion_Handler, + }, + { + MethodName: "ExecuteQuestion", + Handler: _QuestionService_ExecuteQuestion_Handler, + }, + { + MethodName: "GetUserFeedback", + Handler: _QuestionService_GetUserFeedback_Handler, + }, + { + MethodName: "UpdateUserFeedback", + Handler: _QuestionService_UpdateUserFeedback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dataqna/v1alpha/question_service.proto", +} diff --git a/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go b/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go new file mode 100644 index 000000000000..3522235de100 --- /dev/null +++ b/dataqna/apiv1alpha/dataqnapb/user_feedback.pb.go @@ -0,0 +1,278 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dataqna/v1alpha/user_feedback.proto + +package dataqnapb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration of feedback ratings. +type UserFeedback_UserFeedbackRating int32 + +const ( + // No rating was specified. + UserFeedback_USER_FEEDBACK_RATING_UNSPECIFIED UserFeedback_UserFeedbackRating = 0 + // The user provided positive feedback. + UserFeedback_POSITIVE UserFeedback_UserFeedbackRating = 1 + // The user provided negative feedback. + UserFeedback_NEGATIVE UserFeedback_UserFeedbackRating = 2 +) + +// Enum value maps for UserFeedback_UserFeedbackRating. +var ( + UserFeedback_UserFeedbackRating_name = map[int32]string{ + 0: "USER_FEEDBACK_RATING_UNSPECIFIED", + 1: "POSITIVE", + 2: "NEGATIVE", + } + UserFeedback_UserFeedbackRating_value = map[string]int32{ + "USER_FEEDBACK_RATING_UNSPECIFIED": 0, + "POSITIVE": 1, + "NEGATIVE": 2, + } +) + +func (x UserFeedback_UserFeedbackRating) Enum() *UserFeedback_UserFeedbackRating { + p := new(UserFeedback_UserFeedbackRating) + *p = x + return p +} + +func (x UserFeedback_UserFeedbackRating) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UserFeedback_UserFeedbackRating) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dataqna_v1alpha_user_feedback_proto_enumTypes[0].Descriptor() +} + +func (UserFeedback_UserFeedbackRating) Type() protoreflect.EnumType { + return &file_google_cloud_dataqna_v1alpha_user_feedback_proto_enumTypes[0] +} + +func (x UserFeedback_UserFeedbackRating) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UserFeedback_UserFeedbackRating.Descriptor instead. +func (UserFeedback_UserFeedbackRating) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescGZIP(), []int{0, 0} +} + +// Feedback provided by a user. +type UserFeedback struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The unique identifier for the user feedback. + // User feedback is a singleton resource on a Question. + // Example: `projects/foo/locations/bar/questions/1234/userFeedback` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Free form user feedback, such as a text box. + FreeFormFeedback string `protobuf:"bytes,2,opt,name=free_form_feedback,json=freeFormFeedback,proto3" json:"free_form_feedback,omitempty"` + // The user feedback rating + Rating UserFeedback_UserFeedbackRating `protobuf:"varint,3,opt,name=rating,proto3,enum=google.cloud.dataqna.v1alpha.UserFeedback_UserFeedbackRating" json:"rating,omitempty"` +} + +func (x *UserFeedback) Reset() { + *x = UserFeedback{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserFeedback) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserFeedback) ProtoMessage() {} + +func (x *UserFeedback) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserFeedback.ProtoReflect.Descriptor instead. +func (*UserFeedback) Descriptor() ([]byte, []int) { + return file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescGZIP(), []int{0} +} + +func (x *UserFeedback) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UserFeedback) GetFreeFormFeedback() string { + if x != nil { + return x.FreeFormFeedback + } + return "" +} + +func (x *UserFeedback) GetRating() UserFeedback_UserFeedbackRating { + if x != nil { + return x.Rating + } + return UserFeedback_USER_FEEDBACK_RATING_UNSPECIFIED +} + +var File_google_cloud_dataqna_v1alpha_user_feedback_proto protoreflect.FileDescriptor + +var file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x02, 0x0a, + 0x0c, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x66, 0x72, 0x65, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x46, 0x65, 0x65, 0x64, + 0x62, 0x61, 0x63, 0x6b, 0x12, 0x55, 0x0a, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x56, 0x0a, 0x12, 0x55, + 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x12, 0x24, 0x0a, 0x20, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x44, 0x42, 0x41, + 0x43, 0x4b, 0x5f, 0x52, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x45, 0x47, 0x41, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x02, 0x3a, 0x73, 0xea, 0x41, 0x70, 0x0a, 0x23, 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, + 0x61, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x49, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x42, 0xdc, 0x01, 0x0a, 0x20, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x11, 0x55, + 0x73, 0x65, 0x72, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, + 0x64, 0x61, 0x74, 0x61, 0x71, 0x6e, 0x61, 0xaa, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x2e, 0x56, + 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0xca, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0xea, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x51, 0x6e, 0x41, 0x3a, 0x3a, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescOnce sync.Once + file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescData = file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDesc +) + +func file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescGZIP() []byte { + file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescOnce.Do(func() { + file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescData) + }) + return file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDescData +} + +var file_google_cloud_dataqna_v1alpha_user_feedback_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_dataqna_v1alpha_user_feedback_proto_goTypes = []interface{}{ + (UserFeedback_UserFeedbackRating)(0), // 0: google.cloud.dataqna.v1alpha.UserFeedback.UserFeedbackRating + (*UserFeedback)(nil), // 1: google.cloud.dataqna.v1alpha.UserFeedback +} +var file_google_cloud_dataqna_v1alpha_user_feedback_proto_depIdxs = []int32{ + 0, // 0: google.cloud.dataqna.v1alpha.UserFeedback.rating:type_name -> google.cloud.dataqna.v1alpha.UserFeedback.UserFeedbackRating + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_dataqna_v1alpha_user_feedback_proto_init() } +func file_google_cloud_dataqna_v1alpha_user_feedback_proto_init() { + if File_google_cloud_dataqna_v1alpha_user_feedback_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserFeedback); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dataqna_v1alpha_user_feedback_proto_goTypes, + DependencyIndexes: file_google_cloud_dataqna_v1alpha_user_feedback_proto_depIdxs, + EnumInfos: file_google_cloud_dataqna_v1alpha_user_feedback_proto_enumTypes, + MessageInfos: file_google_cloud_dataqna_v1alpha_user_feedback_proto_msgTypes, + }.Build() + File_google_cloud_dataqna_v1alpha_user_feedback_proto = out.File + file_google_cloud_dataqna_v1alpha_user_feedback_proto_rawDesc = nil + file_google_cloud_dataqna_v1alpha_user_feedback_proto_goTypes = nil + file_google_cloud_dataqna_v1alpha_user_feedback_proto_depIdxs = nil +} diff --git a/dataqna/apiv1alpha/doc.go b/dataqna/apiv1alpha/doc.go index 7b90fbc5d95d..462bd96450eb 100644 --- a/dataqna/apiv1alpha/doc.go +++ b/dataqna/apiv1alpha/doc.go @@ -20,47 +20,58 @@ // Data QnA is a natural language question and answer service for BigQuery // data. // -// NOTE: This package is in alpha. It is not stable, and is likely to change. +// NOTE: This package is in alpha. It is not stable, and is likely to change. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := dataqna.NewAutoSuggestionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataqna.NewAutoSuggestionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := dataqna.NewAutoSuggestionClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &dataqnapb.SuggestQueriesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataqna/v1alpha#SuggestQueriesRequest. -// } -// resp, err := c.SuggestQueries(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dataqna.NewAutoSuggestionClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dataqnapb.SuggestQueriesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dataqna/v1alpha#SuggestQueriesRequest. +// } +// resp, err := c.SuggestQueries(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewAutoSuggestionClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/dataqna/apiv1alpha/question_client.go b/dataqna/apiv1alpha/question_client.go index 46dde2514f85..568d666ce19e 100644 --- a/dataqna/apiv1alpha/question_client.go +++ b/dataqna/apiv1alpha/question_client.go @@ -175,7 +175,8 @@ func (c *QuestionClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *QuestionClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -280,7 +281,8 @@ func NewQuestionClient(ctx context.Context, opts ...option.ClientOption) (*Quest // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *questionGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -378,7 +380,7 @@ func (c *questionRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *questionRESTClient) Connection() *grpc.ClientConn { return nil } @@ -501,8 +503,12 @@ func (c *questionRESTClient) GetQuestion(ctx context.Context, req *dataqnapb.Get baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetName()) params := url.Values{} - if req.GetReadMask().GetPaths() != nil { - params.Add("readMask.paths", fmt.Sprintf("%v", req.GetReadMask().GetPaths())) + if req.GetReadMask() != nil { + readMask, err := protojson.Marshal(req.GetReadMask()) + if err != nil { + return nil, err + } + params.Add("readMask", string(readMask)) } baseUrl.RawQuery = params.Encode() @@ -741,8 +747,12 @@ func (c *questionRESTClient) UpdateUserFeedback(ctx context.Context, req *dataqn baseUrl.Path += fmt.Sprintf("/v1alpha/%v", req.GetUserFeedback().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() diff --git a/dataqna/apiv1alpha/question_client_example_test.go b/dataqna/apiv1alpha/question_client_example_test.go index 3421dfd3bf69..7b55dfef3dd2 100644 --- a/dataqna/apiv1alpha/question_client_example_test.go +++ b/dataqna/apiv1alpha/question_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewQuestionClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewQuestionClient() { func ExampleNewQuestionRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -49,6 +59,11 @@ func ExampleNewQuestionRESTClient() { func ExampleQuestionClient_GetQuestion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionClient(ctx) if err != nil { // TODO: Handle error. @@ -69,6 +84,11 @@ func ExampleQuestionClient_GetQuestion() { func ExampleQuestionClient_CreateQuestion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionClient(ctx) if err != nil { // TODO: Handle error. @@ -89,6 +109,11 @@ func ExampleQuestionClient_CreateQuestion() { func ExampleQuestionClient_ExecuteQuestion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +134,11 @@ func ExampleQuestionClient_ExecuteQuestion() { func ExampleQuestionClient_GetUserFeedback() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionClient(ctx) if err != nil { // TODO: Handle error. @@ -129,6 +159,11 @@ func ExampleQuestionClient_GetUserFeedback() { func ExampleQuestionClient_UpdateUserFeedback() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dataqna.NewQuestionClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dataqna/go.mod b/dataqna/go.mod index e5dce34361ad..4655729d6c78 100644 --- a/dataqna/go.mod +++ b/dataqna/go.mod @@ -1,12 +1,25 @@ module cloud.google.com/go/dataqna -go 1.16 +go 1.17 require ( - cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/dataqna/go.sum b/dataqna/go.sum index f00d995cec43..e75fb777b024 100644 --- a/dataqna/go.sum +++ b/dataqna/go.sum @@ -27,9 +27,8 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0 h1:DAq3r8y4mDgyB/ZPJ9v/5VJNqjgJAxTn6ZYLlUywOu8= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.102.1 h1:vpK6iQWv/2uUeFJth4/cBHsQAGjn1iIE6AAlxipRaA0= -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -162,6 +161,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +290,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +311,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +385,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +499,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +587,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +620,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +637,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/dataqna/go_mod_tidy_hack.go b/dataqna/go_mod_tidy_hack.go deleted file mode 100644 index e1cbd39152d1..000000000000 --- a/dataqna/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package dataqna - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/dataqna/internal/version.go b/dataqna/internal/version.go index 3f98e7de6063..d0d3f79115b7 100644 --- a/dataqna/internal/version.go +++ b/dataqna/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.4.0" +const Version = "0.5.0" diff --git a/datastore/admin/apiv1/datastore_admin_client.go b/datastore/admin/apiv1/datastore_admin_client.go index 9acf8cb0ab9c..f39bdf174475 100644 --- a/datastore/admin/apiv1/datastore_admin_client.go +++ b/datastore/admin/apiv1/datastore_admin_client.go @@ -127,7 +127,7 @@ type internalDatastoreAdminClient interface { // DatastoreAdminClient is a client for interacting with Cloud Datastore API. // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. // -// Google Cloud Datastore Admin API +// # Google Cloud Datastore Admin API // // The Datastore Admin API provides several admin services for Cloud Datastore. // @@ -205,7 +205,8 @@ func (c *DatastoreAdminClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DatastoreAdminClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -349,7 +350,7 @@ type datastoreAdminGRPCClient struct { // NewDatastoreAdminClient creates a new datastore admin client based on gRPC. // The returned client must be Closed when it is done being used to clean up its underlying connections. // -// Google Cloud Datastore Admin API +// # Google Cloud Datastore Admin API // // The Datastore Admin API provides several admin services for Cloud Datastore. // @@ -445,7 +446,8 @@ func NewDatastoreAdminClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *datastoreAdminGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/datastore/admin/apiv1/datastore_admin_client_example_test.go b/datastore/admin/apiv1/datastore_admin_client_example_test.go index 692743ac73a4..c83b3bb81e77 100644 --- a/datastore/admin/apiv1/datastore_admin_client_example_test.go +++ b/datastore/admin/apiv1/datastore_admin_client_example_test.go @@ -27,6 +27,11 @@ import ( func ExampleNewDatastoreAdminClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +44,11 @@ func ExampleNewDatastoreAdminClient() { func ExampleDatastoreAdminClient_ExportEntities() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleDatastoreAdminClient_ExportEntities() { func ExampleDatastoreAdminClient_ImportEntities() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -87,6 +102,11 @@ func ExampleDatastoreAdminClient_ImportEntities() { func ExampleDatastoreAdminClient_CreateIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -112,6 +132,11 @@ func ExampleDatastoreAdminClient_CreateIndex() { func ExampleDatastoreAdminClient_DeleteIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -137,6 +162,11 @@ func ExampleDatastoreAdminClient_DeleteIndex() { func ExampleDatastoreAdminClient_GetIndex() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +187,11 @@ func ExampleDatastoreAdminClient_GetIndex() { func ExampleDatastoreAdminClient_ListIndexes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +218,11 @@ func ExampleDatastoreAdminClient_ListIndexes() { func ExampleDatastoreAdminClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -201,6 +241,11 @@ func ExampleDatastoreAdminClient_CancelOperation() { func ExampleDatastoreAdminClient_DeleteOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -219,6 +264,11 @@ func ExampleDatastoreAdminClient_DeleteOperation() { func ExampleDatastoreAdminClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. @@ -239,6 +289,11 @@ func ExampleDatastoreAdminClient_GetOperation() { func ExampleDatastoreAdminClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := admin.NewDatastoreAdminClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datastore/admin/apiv1/doc.go b/datastore/admin/apiv1/doc.go index d687f2834de4..eb6997edb184 100644 --- a/datastore/admin/apiv1/doc.go +++ b/datastore/admin/apiv1/doc.go @@ -20,52 +20,63 @@ // Accesses the schemaless NoSQL database to provide fully managed, robust, // scalable storage for your application. // -// NOTE: This package is in alpha. It is not stable, and is likely to change. +// NOTE: This package is in alpha. It is not stable, and is likely to change. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := admin.NewDatastoreAdminClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := admin.NewDatastoreAdminClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := admin.NewDatastoreAdminClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &adminpb.ExportEntitiesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/datastore/admin/v1#ExportEntitiesRequest. -// } -// op, err := c.ExportEntities(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// -// resp, err := op.Wait(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := admin.NewDatastoreAdminClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &adminpb.ExportEntitiesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/datastore/admin/v1#ExportEntitiesRequest. +// } +// op, err := c.ExportEntities(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewDatastoreAdminClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/datastore/doc.go b/datastore/doc.go index d11046cfcfa0..453fb8106f28 100644 --- a/datastore/doc.go +++ b/datastore/doc.go @@ -18,8 +18,7 @@ Package datastore provides a client for Google Cloud Datastore. See https://godoc.org/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. - -Basic Operations +# Basic Operations Entities are the unit of storage and are associated with a key. A key consists of an optional parent key, a string application ID, a string kind @@ -95,8 +94,7 @@ NewUpsert and NewDelete and applies them. Datastore.Mutate uses non-transactional mode; if atomicity is required, use Transaction.Mutate instead. - -Properties +# Properties An entity's contents can be represented by a variety of types. These are typically struct pointers, but can also be any type that implements the @@ -164,8 +162,7 @@ Example code: J int `datastore:",noindex" json:"j"` } - -Slice Fields +# Slice Fields A field of slice type corresponds to a Datastore array property, except for []byte, which corresponds to a Datastore blob. @@ -177,14 +174,14 @@ the slice field remains unchanged. If a non-array value is loaded into a slice field, the result will be a slice with one element, containing the value. -Loading Nulls +# Loading Nulls Loading a Datastore Null into a basic type (int, float, etc.) results in a zero value. Loading a Null into a slice of basic type results in a slice of size 1 containing the zero value. Loading a Null into a pointer field results in nil. Loading a Null into a field of struct type is an error. -Pointer Fields +# Pointer Fields A struct field can be a pointer to a signed integer, floating-point number, string or bool. Putting a non-nil pointer will store its dereferenced value. Putting a nil @@ -194,8 +191,7 @@ in which case no property will be stored. Loading a Null into a pointer field sets the pointer to nil. Loading any other value allocates new storage with the value, and sets the field to point to it. - -Key Field +# Key Field If the struct contains a *datastore.Key field tagged with the name "__key__", its value will be ignored on Put. When reading the Entity back into the Go struct, @@ -233,9 +229,7 @@ Example code: // Prints {12 /Entity,stringID} } - - -Structured Properties +# Structured Properties If the struct pointed to contains other structs, then the nested or embedded structs are themselves saved as Entity values. For example, given these definitions: @@ -326,8 +320,7 @@ Note that the "flatten" option cannot be used for Entity value fields or PropertyLoadSaver implementers. The server will reject any dotted field names for an Entity value. - -The PropertyLoadSaver Interface +# The PropertyLoadSaver Interface An entity's contents can also be represented by any type that implements the PropertyLoadSaver interface. This type may be a struct pointer, but it does @@ -377,7 +370,7 @@ Example code: The *PropertyList type implements PropertyLoadSaver, and can therefore hold an arbitrary entity's contents. -The KeyLoader Interface +# The KeyLoader Interface If a type implements the PropertyLoadSaver interface, it may also want to implement the KeyLoader interface. @@ -411,8 +404,7 @@ Example code: To load a Key into a struct which does not implement the PropertyLoadSaver interface, see the "Key Field" section above. - -Queries +# Queries Queries retrieve entities based on their properties or key's ancestry. Running a query yields an iterator of results: either keys or (key, entity) pairs. @@ -462,8 +454,7 @@ Example code: } } - -Transactions +# Transactions Client.RunInTransaction runs a function in a transaction. @@ -499,7 +490,7 @@ Example code: Pass the ReadOnly option to RunInTransaction if your transaction is used only for Get, GetMulti or queries. Read-only transactions are more efficient. -Google Cloud Datastore Emulator +# Google Cloud Datastore Emulator This package supports the Cloud Datastore emulator, which is useful for testing and development. Environment variables are used to indicate that datastore traffic should be diff --git a/datastore/go.mod b/datastore/go.mod index ac415cd61a11..9a770e0da3ec 100644 --- a/datastore/go.mod +++ b/datastore/go.mod @@ -1,14 +1,27 @@ module cloud.google.com/go/datastore -go 1.15 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/golang/protobuf v1.5.2 github.com/google/go-cmp v0.5.8 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/datastore/go.sum b/datastore/go.sum index b883b68a4ce5..c9f3ba89599b 100644 --- a/datastore/go.sum +++ b/datastore/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -498,8 +501,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -586,8 +589,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -618,8 +623,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -634,8 +640,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/datastore/go_mod_tidy_hack.go b/datastore/go_mod_tidy_hack.go deleted file mode 100644 index 217bd13f1b9d..000000000000 --- a/datastore/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package datastore - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/datastore/integration_test.go b/datastore/integration_test.go index 69864eb2d576..05551f32aee0 100644 --- a/datastore/integration_test.go +++ b/datastore/integration_test.go @@ -25,7 +25,6 @@ import ( "reflect" "sort" "strings" - "sync" "testing" "time" @@ -584,9 +583,6 @@ func TestIntegration_LargeQuery(t *testing.T) { q := NewQuery("SQChild").Ancestor(parent).Filter("T=", now).Order("I") - // Wait group to allow us to run query tests in parallel below. - var wg sync.WaitGroup - // Check we get the expected count and results for various limits/offsets. queryTests := []struct { limit, offset, want int @@ -607,12 +603,13 @@ func TestIntegration_LargeQuery(t *testing.T) { {limit: 1000, offset: 100, want: n - 100}, {limit: 500, offset: 500, want: n - 500}, } - for _, tt := range queryTests { + for i, tt := range queryTests { q := q.Limit(tt.limit).Offset(tt.offset) - wg.Add(1) + limit := tt.limit + offset := tt.offset + want := tt.want - go func(limit, offset, want int) { - defer wg.Done() + t.Run(fmt.Sprintf("queryTest_%d", i), func(t *testing.T) { // Check Count returns the expected number of results. count, err := client.Count(ctx, q) if err != nil { @@ -638,10 +635,11 @@ func TestIntegration_LargeQuery(t *testing.T) { break } } - }(tt.limit, tt.offset, tt.want) + t.Parallel() + }) } - // Also check iterator cursor behaviour. + // Also check iterator cursor behavior. cursorTests := []struct { limit, offset int // Query limit and offset. count int // The number of times to call "next" @@ -662,12 +660,13 @@ func TestIntegration_LargeQuery(t *testing.T) { {count: 200, offset: 500, limit: -1, want: 700}, {count: 200, offset: 1000, limit: -1, want: -1}, // No more results. } - for _, tt := range cursorTests { - wg.Add(1) - - go func(count, limit, offset, want int) { - defer wg.Done() + for i, tt := range cursorTests { + count := tt.count + limit := tt.limit + offset := tt.offset + want := tt.want + t.Run(fmt.Sprintf("cursorTest_%d", i), func(t *testing.T) { ctx := context.WithValue(ctx, ckey{}, fmt.Sprintf("c=%d,l=%d,o=%d", count, limit, offset)) // Run iterator through count calls to Next. it := client.Run(ctx, q.Limit(limit).Offset(offset).KeysOnly()) @@ -703,9 +702,9 @@ func TestIntegration_LargeQuery(t *testing.T) { case entity.I != want: t.Errorf("count=%d, limit=%d, offset=%d: got.I = %d, want %d", count, limit, offset, entity.I, want) } - }(tt.count, tt.limit, tt.offset, tt.want) + t.Parallel() + }) } - wg.Wait() } func TestIntegration_EventualConsistency(t *testing.T) { diff --git a/datastore/query.go b/datastore/query.go index c2ed359eeaff..196fd11aa9ee 100644 --- a/datastore/query.go +++ b/datastore/query.go @@ -521,7 +521,7 @@ func (c *Client) Count(ctx context.Context, q *Query) (n int, err error) { // The keys returned by GetAll will be in a 1-1 correspondence with the entities // added to dst. // -// If q is a ``keys-only'' query, GetAll ignores dst and only returns the keys. +// If q is a “keys-only” query, GetAll ignores dst and only returns the keys. // // The running time and number of API calls made by GetAll scale linearly with // with the sum of the query's offset and limit. Unless the result count is diff --git a/datastore/release-please-config.json b/datastore/release-please-config.json index 6efacea9d394..3b324cd54215 100644 --- a/datastore/release-please-config.json +++ b/datastore/release-please-config.json @@ -7,5 +7,6 @@ "datastore": { "component": "datastore" } - } + }, + "plugins": ["sentence-case"] } \ No newline at end of file diff --git a/datastream/CHANGES.md b/datastream/CHANGES.md index 35b85e5bd0f6..28cd8c2a4da5 100644 --- a/datastream/CHANGES.md +++ b/datastream/CHANGES.md @@ -1,6 +1,20 @@ # Changes +## [1.2.0](https://github.com/googleapis/google-cloud-go/compare/datastream/v1.1.0...datastream/v1.2.0) (2022-09-19) + + +### Features + +* **datastream:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [1.1.0](https://github.com/googleapis/google-cloud-go/compare/datastream/v1.0.0...datastream/v1.1.0) (2022-09-06) + + +### Features + +* **datastream:** added support for BigQuery destination and PostgreSQL source types ([204b856](https://github.com/googleapis/google-cloud-go/commit/204b85632f2556ab2c74020250850b53f6a405ff)) + ## [1.0.0](https://github.com/googleapis/google-cloud-go/compare/datastream/v0.5.0...datastream/v1.0.0) (2022-06-29) diff --git a/datastream/apiv1/datastream_client.go b/datastream/apiv1/datastream_client.go index dd81c06eac88..25a7df272c16 100644 --- a/datastream/apiv1/datastream_client.go +++ b/datastream/apiv1/datastream_client.go @@ -70,6 +70,10 @@ type CallOptions struct { DeleteRoute []gax.CallOption GetLocation []gax.CallOption ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -260,9 +264,13 @@ func defaultCallOptions() *CallOptions { }) }), }, - DeleteRoute: []gax.CallOption{}, - GetLocation: []gax.CallOption{}, - ListLocations: []gax.CallOption{}, + DeleteRoute: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -308,6 +316,10 @@ type internalClient interface { DeleteRouteOperation(name string) *DeleteRouteOperation GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // Client is a client for interacting with Datastream API. @@ -344,7 +356,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -552,6 +565,26 @@ func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocation return c.internalClient.ListLocations(ctx, req, opts...) } +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Datastream API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -573,6 +606,8 @@ type gRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + locationsClient locationpb.LocationsClient // The x-goog-* metadata to be sent with each request. @@ -609,6 +644,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error disableDeadlines: disableDeadlines, client: datastreampb.NewDatastreamClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -631,7 +667,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -1421,6 +1458,94 @@ func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLoca return it } +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateConnectionProfileOperation manages a long-running operation from CreateConnectionProfile. type CreateConnectionProfileOperation struct { lro *longrunning.Operation @@ -2161,6 +2286,53 @@ func (it *LocationIterator) takeBuf() interface{} { return b } +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // PrivateConnectionIterator manages a stream of *datastreampb.PrivateConnection. type PrivateConnectionIterator struct { items []*datastreampb.PrivateConnection diff --git a/datastream/apiv1/datastream_client_example_test.go b/datastream/apiv1/datastream_client_example_test.go index 0f0f63aa1acd..3da9742eb52a 100644 --- a/datastream/apiv1/datastream_client_example_test.go +++ b/datastream/apiv1/datastream_client_example_test.go @@ -23,10 +23,16 @@ import ( "google.golang.org/api/iterator" datastreampb "google.golang.org/genproto/googleapis/cloud/datastream/v1" locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -39,6 +45,11 @@ func ExampleNewClient() { func ExampleClient_ListConnectionProfiles() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -65,6 +76,11 @@ func ExampleClient_ListConnectionProfiles() { func ExampleClient_GetConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -85,6 +101,11 @@ func ExampleClient_GetConnectionProfile() { func ExampleClient_CreateConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -110,6 +131,11 @@ func ExampleClient_CreateConnectionProfile() { func ExampleClient_UpdateConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -135,6 +161,11 @@ func ExampleClient_UpdateConnectionProfile() { func ExampleClient_DeleteConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -158,6 +189,11 @@ func ExampleClient_DeleteConnectionProfile() { func ExampleClient_DiscoverConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -178,6 +214,11 @@ func ExampleClient_DiscoverConnectionProfile() { func ExampleClient_ListStreams() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -204,6 +245,11 @@ func ExampleClient_ListStreams() { func ExampleClient_GetStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -224,6 +270,11 @@ func ExampleClient_GetStream() { func ExampleClient_CreateStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -249,6 +300,11 @@ func ExampleClient_CreateStream() { func ExampleClient_UpdateStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -274,6 +330,11 @@ func ExampleClient_UpdateStream() { func ExampleClient_DeleteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -297,6 +358,11 @@ func ExampleClient_DeleteStream() { func ExampleClient_GetStreamObject() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -317,6 +383,11 @@ func ExampleClient_GetStreamObject() { func ExampleClient_LookupStreamObject() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -337,6 +408,11 @@ func ExampleClient_LookupStreamObject() { func ExampleClient_ListStreamObjects() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -363,6 +439,11 @@ func ExampleClient_ListStreamObjects() { func ExampleClient_StartBackfillJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -383,6 +464,11 @@ func ExampleClient_StartBackfillJob() { func ExampleClient_StopBackfillJob() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -403,6 +489,11 @@ func ExampleClient_StopBackfillJob() { func ExampleClient_FetchStaticIps() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -429,6 +520,11 @@ func ExampleClient_FetchStaticIps() { func ExampleClient_CreatePrivateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -454,6 +550,11 @@ func ExampleClient_CreatePrivateConnection() { func ExampleClient_GetPrivateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -474,6 +575,11 @@ func ExampleClient_GetPrivateConnection() { func ExampleClient_ListPrivateConnections() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -500,6 +606,11 @@ func ExampleClient_ListPrivateConnections() { func ExampleClient_DeletePrivateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -523,6 +634,11 @@ func ExampleClient_DeletePrivateConnection() { func ExampleClient_CreateRoute() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -548,6 +664,11 @@ func ExampleClient_CreateRoute() { func ExampleClient_GetRoute() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -568,6 +689,11 @@ func ExampleClient_GetRoute() { func ExampleClient_ListRoutes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -594,6 +720,11 @@ func ExampleClient_ListRoutes() { func ExampleClient_DeleteRoute() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -617,6 +748,11 @@ func ExampleClient_DeleteRoute() { func ExampleClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -637,6 +773,11 @@ func ExampleClient_GetLocation() { func ExampleClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -660,3 +801,105 @@ func ExampleClient_ListLocations() { _ = resp } } + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datastream.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datastream.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datastream.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := datastream.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/datastream/apiv1/doc.go b/datastream/apiv1/doc.go index e27d61460397..7f7a9ec790bc 100644 --- a/datastream/apiv1/doc.go +++ b/datastream/apiv1/doc.go @@ -17,49 +17,60 @@ // Package datastream is an auto-generated package for the // Datastream API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datastream.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datastream.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datastream.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datastream.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &datastreampb.ListConnectionProfilesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datastream/v1#ListConnectionProfilesRequest. -// } -// it := c.ListConnectionProfiles(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } +// req := &datastreampb.ListConnectionProfilesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datastream/v1#ListConnectionProfilesRequest. +// } +// it := c.ListConnectionProfiles(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } // -// Use of Context +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/datastream/apiv1/gapic_metadata.json b/datastream/apiv1/gapic_metadata.json index 44b08ef3f0c4..a30fef7ec5d0 100644 --- a/datastream/apiv1/gapic_metadata.json +++ b/datastream/apiv1/gapic_metadata.json @@ -10,6 +10,11 @@ "grpc": { "libraryClient": "Client", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateConnectionProfile": { "methods": [ "CreateConnectionProfile" @@ -35,6 +40,11 @@ "DeleteConnectionProfile" ] }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, "DeletePrivateConnection": { "methods": [ "DeletePrivateConnection" @@ -70,6 +80,11 @@ "GetLocation" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetPrivateConnection": { "methods": [ "GetPrivateConnection" @@ -100,6 +115,11 @@ "ListLocations" ] }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListPrivateConnections": { "methods": [ "ListPrivateConnections" diff --git a/datastream/apiv1alpha1/datastream_client.go b/datastream/apiv1alpha1/datastream_client.go index 97c9fa916340..2749d7002cd1 100644 --- a/datastream/apiv1alpha1/datastream_client.go +++ b/datastream/apiv1alpha1/datastream_client.go @@ -417,7 +417,8 @@ func (c *Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -678,7 +679,8 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *gRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -777,7 +779,7 @@ func (c *restClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *restClient) Connection() *grpc.ClientConn { return nil } @@ -1618,8 +1620,12 @@ func (c *restClient) UpdateConnectionProfile(ctx context.Context, req *datastrea if req.GetRequestId() != "" { params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) } - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -2045,8 +2051,12 @@ func (c *restClient) UpdateStream(ctx context.Context, req *datastreampb.UpdateS if req.GetRequestId() != "" { params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) } - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } if req.GetValidateOnly() { params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) diff --git a/datastream/apiv1alpha1/datastream_client_example_test.go b/datastream/apiv1alpha1/datastream_client_example_test.go index 585afb7f2d7d..ac6b96888e3e 100644 --- a/datastream/apiv1alpha1/datastream_client_example_test.go +++ b/datastream/apiv1alpha1/datastream_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewClient() { func ExampleNewRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -50,6 +60,11 @@ func ExampleNewRESTClient() { func ExampleClient_ListConnectionProfiles() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -76,6 +91,11 @@ func ExampleClient_ListConnectionProfiles() { func ExampleClient_GetConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +116,11 @@ func ExampleClient_GetConnectionProfile() { func ExampleClient_CreateConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -121,6 +146,11 @@ func ExampleClient_CreateConnectionProfile() { func ExampleClient_UpdateConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -146,6 +176,11 @@ func ExampleClient_UpdateConnectionProfile() { func ExampleClient_DeleteConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +204,11 @@ func ExampleClient_DeleteConnectionProfile() { func ExampleClient_DiscoverConnectionProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -189,6 +229,11 @@ func ExampleClient_DiscoverConnectionProfile() { func ExampleClient_ListStreams() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -215,6 +260,11 @@ func ExampleClient_ListStreams() { func ExampleClient_GetStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -235,6 +285,11 @@ func ExampleClient_GetStream() { func ExampleClient_CreateStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -260,6 +315,11 @@ func ExampleClient_CreateStream() { func ExampleClient_UpdateStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -285,6 +345,11 @@ func ExampleClient_UpdateStream() { func ExampleClient_DeleteStream() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -308,6 +373,11 @@ func ExampleClient_DeleteStream() { func ExampleClient_FetchErrors() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -333,6 +403,11 @@ func ExampleClient_FetchErrors() { func ExampleClient_FetchStaticIps() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -359,6 +434,11 @@ func ExampleClient_FetchStaticIps() { func ExampleClient_CreatePrivateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -384,6 +464,11 @@ func ExampleClient_CreatePrivateConnection() { func ExampleClient_GetPrivateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -404,6 +489,11 @@ func ExampleClient_GetPrivateConnection() { func ExampleClient_ListPrivateConnections() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -430,6 +520,11 @@ func ExampleClient_ListPrivateConnections() { func ExampleClient_DeletePrivateConnection() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -453,6 +548,11 @@ func ExampleClient_DeletePrivateConnection() { func ExampleClient_CreateRoute() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -478,6 +578,11 @@ func ExampleClient_CreateRoute() { func ExampleClient_GetRoute() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -498,6 +603,11 @@ func ExampleClient_GetRoute() { func ExampleClient_ListRoutes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. @@ -524,6 +634,11 @@ func ExampleClient_ListRoutes() { func ExampleClient_DeleteRoute() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := datastream.NewClient(ctx) if err != nil { // TODO: Handle error. diff --git a/datastream/apiv1alpha1/datastreampb/datastream.pb.go b/datastream/apiv1alpha1/datastreampb/datastream.pb.go new file mode 100644 index 000000000000..03c4d869cda0 --- /dev/null +++ b/datastream/apiv1alpha1/datastreampb/datastream.pb.go @@ -0,0 +1,4421 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datastream/v1alpha1/datastream.proto + +package datastreampb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for 'discover' ConnectionProfile request. +type DiscoverConnectionProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent resource of the ConnectionProfile type. Must be in the + // format `projects/*/locations/*`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The connection profile on which to run discover. + // + // Types that are assignable to Target: + // + // *DiscoverConnectionProfileRequest_ConnectionProfile + // *DiscoverConnectionProfileRequest_ConnectionProfileName + Target isDiscoverConnectionProfileRequest_Target `protobuf_oneof:"target"` + // Types that are assignable to Depth: + // + // *DiscoverConnectionProfileRequest_Recursive + // *DiscoverConnectionProfileRequest_RecursionDepth + Depth isDiscoverConnectionProfileRequest_Depth `protobuf_oneof:"depth"` + // The data object to enrich with child data objects and metadata. + // + // Types that are assignable to DataObject: + // + // *DiscoverConnectionProfileRequest_OracleRdbms + // *DiscoverConnectionProfileRequest_MysqlRdbms + DataObject isDiscoverConnectionProfileRequest_DataObject `protobuf_oneof:"data_object"` +} + +func (x *DiscoverConnectionProfileRequest) Reset() { + *x = DiscoverConnectionProfileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiscoverConnectionProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoverConnectionProfileRequest) ProtoMessage() {} + +func (x *DiscoverConnectionProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoverConnectionProfileRequest.ProtoReflect.Descriptor instead. +func (*DiscoverConnectionProfileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{0} +} + +func (x *DiscoverConnectionProfileRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (m *DiscoverConnectionProfileRequest) GetTarget() isDiscoverConnectionProfileRequest_Target { + if m != nil { + return m.Target + } + return nil +} + +func (x *DiscoverConnectionProfileRequest) GetConnectionProfile() *ConnectionProfile { + if x, ok := x.GetTarget().(*DiscoverConnectionProfileRequest_ConnectionProfile); ok { + return x.ConnectionProfile + } + return nil +} + +func (x *DiscoverConnectionProfileRequest) GetConnectionProfileName() string { + if x, ok := x.GetTarget().(*DiscoverConnectionProfileRequest_ConnectionProfileName); ok { + return x.ConnectionProfileName + } + return "" +} + +func (m *DiscoverConnectionProfileRequest) GetDepth() isDiscoverConnectionProfileRequest_Depth { + if m != nil { + return m.Depth + } + return nil +} + +func (x *DiscoverConnectionProfileRequest) GetRecursive() bool { + if x, ok := x.GetDepth().(*DiscoverConnectionProfileRequest_Recursive); ok { + return x.Recursive + } + return false +} + +func (x *DiscoverConnectionProfileRequest) GetRecursionDepth() int32 { + if x, ok := x.GetDepth().(*DiscoverConnectionProfileRequest_RecursionDepth); ok { + return x.RecursionDepth + } + return 0 +} + +func (m *DiscoverConnectionProfileRequest) GetDataObject() isDiscoverConnectionProfileRequest_DataObject { + if m != nil { + return m.DataObject + } + return nil +} + +func (x *DiscoverConnectionProfileRequest) GetOracleRdbms() *OracleRdbms { + if x, ok := x.GetDataObject().(*DiscoverConnectionProfileRequest_OracleRdbms); ok { + return x.OracleRdbms + } + return nil +} + +func (x *DiscoverConnectionProfileRequest) GetMysqlRdbms() *MysqlRdbms { + if x, ok := x.GetDataObject().(*DiscoverConnectionProfileRequest_MysqlRdbms); ok { + return x.MysqlRdbms + } + return nil +} + +type isDiscoverConnectionProfileRequest_Target interface { + isDiscoverConnectionProfileRequest_Target() +} + +type DiscoverConnectionProfileRequest_ConnectionProfile struct { + // An ad-hoc ConnectionProfile configuration. + ConnectionProfile *ConnectionProfile `protobuf:"bytes,200,opt,name=connection_profile,json=connectionProfile,proto3,oneof"` +} + +type DiscoverConnectionProfileRequest_ConnectionProfileName struct { + // A reference to an existing ConnectionProfile. + ConnectionProfileName string `protobuf:"bytes,201,opt,name=connection_profile_name,json=connectionProfileName,proto3,oneof"` +} + +func (*DiscoverConnectionProfileRequest_ConnectionProfile) isDiscoverConnectionProfileRequest_Target() { +} + +func (*DiscoverConnectionProfileRequest_ConnectionProfileName) isDiscoverConnectionProfileRequest_Target() { +} + +type isDiscoverConnectionProfileRequest_Depth interface { + isDiscoverConnectionProfileRequest_Depth() +} + +type DiscoverConnectionProfileRequest_Recursive struct { + // Whether to retrieve the full hierarchy of data objects (TRUE) or only the + // current level (FALSE). + Recursive bool `protobuf:"varint,3,opt,name=recursive,proto3,oneof"` +} + +type DiscoverConnectionProfileRequest_RecursionDepth struct { + // The number of hierarchy levels below the current level to be retrieved. + RecursionDepth int32 `protobuf:"varint,4,opt,name=recursion_depth,json=recursionDepth,proto3,oneof"` +} + +func (*DiscoverConnectionProfileRequest_Recursive) isDiscoverConnectionProfileRequest_Depth() {} + +func (*DiscoverConnectionProfileRequest_RecursionDepth) isDiscoverConnectionProfileRequest_Depth() {} + +type isDiscoverConnectionProfileRequest_DataObject interface { + isDiscoverConnectionProfileRequest_DataObject() +} + +type DiscoverConnectionProfileRequest_OracleRdbms struct { + // Oracle RDBMS to enrich with child data objects and metadata. + OracleRdbms *OracleRdbms `protobuf:"bytes,100,opt,name=oracle_rdbms,json=oracleRdbms,proto3,oneof"` +} + +type DiscoverConnectionProfileRequest_MysqlRdbms struct { + // MySQL RDBMS to enrich with child data objects and metadata. + MysqlRdbms *MysqlRdbms `protobuf:"bytes,101,opt,name=mysql_rdbms,json=mysqlRdbms,proto3,oneof"` +} + +func (*DiscoverConnectionProfileRequest_OracleRdbms) isDiscoverConnectionProfileRequest_DataObject() { +} + +func (*DiscoverConnectionProfileRequest_MysqlRdbms) isDiscoverConnectionProfileRequest_DataObject() {} + +type DiscoverConnectionProfileResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The data object that has been enriched by the discover API call. + // + // Types that are assignable to DataObject: + // + // *DiscoverConnectionProfileResponse_OracleRdbms + // *DiscoverConnectionProfileResponse_MysqlRdbms + DataObject isDiscoverConnectionProfileResponse_DataObject `protobuf_oneof:"data_object"` +} + +func (x *DiscoverConnectionProfileResponse) Reset() { + *x = DiscoverConnectionProfileResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiscoverConnectionProfileResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoverConnectionProfileResponse) ProtoMessage() {} + +func (x *DiscoverConnectionProfileResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoverConnectionProfileResponse.ProtoReflect.Descriptor instead. +func (*DiscoverConnectionProfileResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{1} +} + +func (m *DiscoverConnectionProfileResponse) GetDataObject() isDiscoverConnectionProfileResponse_DataObject { + if m != nil { + return m.DataObject + } + return nil +} + +func (x *DiscoverConnectionProfileResponse) GetOracleRdbms() *OracleRdbms { + if x, ok := x.GetDataObject().(*DiscoverConnectionProfileResponse_OracleRdbms); ok { + return x.OracleRdbms + } + return nil +} + +func (x *DiscoverConnectionProfileResponse) GetMysqlRdbms() *MysqlRdbms { + if x, ok := x.GetDataObject().(*DiscoverConnectionProfileResponse_MysqlRdbms); ok { + return x.MysqlRdbms + } + return nil +} + +type isDiscoverConnectionProfileResponse_DataObject interface { + isDiscoverConnectionProfileResponse_DataObject() +} + +type DiscoverConnectionProfileResponse_OracleRdbms struct { + // Enriched Oracle RDBMS object. + OracleRdbms *OracleRdbms `protobuf:"bytes,100,opt,name=oracle_rdbms,json=oracleRdbms,proto3,oneof"` +} + +type DiscoverConnectionProfileResponse_MysqlRdbms struct { + // Enriched MySQL RDBMS object. + MysqlRdbms *MysqlRdbms `protobuf:"bytes,101,opt,name=mysql_rdbms,json=mysqlRdbms,proto3,oneof"` +} + +func (*DiscoverConnectionProfileResponse_OracleRdbms) isDiscoverConnectionProfileResponse_DataObject() { +} + +func (*DiscoverConnectionProfileResponse_MysqlRdbms) isDiscoverConnectionProfileResponse_DataObject() { +} + +// Request message for 'FetchStaticIps' request. +type FetchStaticIpsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name resource of the Response type. Must be in the + // format `projects/*/locations/*`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Maximum number of Ips to return, will likely not be specified. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous `ListStaticIps` call. + // will likely not be specified. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *FetchStaticIpsRequest) Reset() { + *x = FetchStaticIpsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchStaticIpsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchStaticIpsRequest) ProtoMessage() {} + +func (x *FetchStaticIpsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchStaticIpsRequest.ProtoReflect.Descriptor instead. +func (*FetchStaticIpsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{2} +} + +func (x *FetchStaticIpsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FetchStaticIpsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *FetchStaticIpsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for a 'FetchStaticIps' response. +type FetchStaticIpsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list of static ips by account + StaticIps []string `protobuf:"bytes,1,rep,name=static_ips,json=staticIps,proto3" json:"static_ips,omitempty"` + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *FetchStaticIpsResponse) Reset() { + *x = FetchStaticIpsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchStaticIpsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchStaticIpsResponse) ProtoMessage() {} + +func (x *FetchStaticIpsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchStaticIpsResponse.ProtoReflect.Descriptor instead. +func (*FetchStaticIpsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{3} +} + +func (x *FetchStaticIpsResponse) GetStaticIps() []string { + if x != nil { + return x.StaticIps + } + return nil +} + +func (x *FetchStaticIpsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for 'FetchErrors' request. +type FetchErrorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the Stream resource for which to fetch any errors. + Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` +} + +func (x *FetchErrorsRequest) Reset() { + *x = FetchErrorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchErrorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchErrorsRequest) ProtoMessage() {} + +func (x *FetchErrorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchErrorsRequest.ProtoReflect.Descriptor instead. +func (*FetchErrorsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{4} +} + +func (x *FetchErrorsRequest) GetStream() string { + if x != nil { + return x.Stream + } + return "" +} + +// Response message for a 'FetchErrors' response. +type FetchErrorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of errors on the Stream. + Errors []*Error `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *FetchErrorsResponse) Reset() { + *x = FetchErrorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchErrorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchErrorsResponse) ProtoMessage() {} + +func (x *FetchErrorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchErrorsResponse.ProtoReflect.Descriptor instead. +func (*FetchErrorsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{5} +} + +func (x *FetchErrorsResponse) GetErrors() []*Error { + if x != nil { + return x.Errors + } + return nil +} + +type ListConnectionProfilesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of connection profiles. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Maximum number of connection profiles to return. + // If unspecified, at most 50 connection profiles will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token received from a previous `ListConnectionProfiles` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListConnectionProfiles` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter request. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Order by fields for the result. + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListConnectionProfilesRequest) Reset() { + *x = ListConnectionProfilesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListConnectionProfilesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConnectionProfilesRequest) ProtoMessage() {} + +func (x *ListConnectionProfilesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConnectionProfilesRequest.ProtoReflect.Descriptor instead. +func (*ListConnectionProfilesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{6} +} + +func (x *ListConnectionProfilesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListConnectionProfilesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListConnectionProfilesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListConnectionProfilesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListConnectionProfilesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type ListConnectionProfilesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of connection profiles. + ConnectionProfiles []*ConnectionProfile `protobuf:"bytes,1,rep,name=connection_profiles,json=connectionProfiles,proto3" json:"connection_profiles,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListConnectionProfilesResponse) Reset() { + *x = ListConnectionProfilesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListConnectionProfilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConnectionProfilesResponse) ProtoMessage() {} + +func (x *ListConnectionProfilesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConnectionProfilesResponse.ProtoReflect.Descriptor instead. +func (*ListConnectionProfilesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{7} +} + +func (x *ListConnectionProfilesResponse) GetConnectionProfiles() []*ConnectionProfile { + if x != nil { + return x.ConnectionProfiles + } + return nil +} + +func (x *ListConnectionProfilesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListConnectionProfilesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +type GetConnectionProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the connection profile resource to get. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetConnectionProfileRequest) Reset() { + *x = GetConnectionProfileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConnectionProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConnectionProfileRequest) ProtoMessage() {} + +func (x *GetConnectionProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConnectionProfileRequest.ProtoReflect.Descriptor instead. +func (*GetConnectionProfileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{8} +} + +func (x *GetConnectionProfileRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type CreateConnectionProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of ConnectionProfiles. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The connection profile identifier. + ConnectionProfileId string `protobuf:"bytes,2,opt,name=connection_profile_id,json=connectionProfileId,proto3" json:"connection_profile_id,omitempty"` + // Required. The connection profile resource to create. + ConnectionProfile *ConnectionProfile `protobuf:"bytes,3,opt,name=connection_profile,json=connectionProfile,proto3" json:"connection_profile,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreateConnectionProfileRequest) Reset() { + *x = CreateConnectionProfileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateConnectionProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateConnectionProfileRequest) ProtoMessage() {} + +func (x *CreateConnectionProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateConnectionProfileRequest.ProtoReflect.Descriptor instead. +func (*CreateConnectionProfileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateConnectionProfileRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateConnectionProfileRequest) GetConnectionProfileId() string { + if x != nil { + return x.ConnectionProfileId + } + return "" +} + +func (x *CreateConnectionProfileRequest) GetConnectionProfile() *ConnectionProfile { + if x != nil { + return x.ConnectionProfile + } + return nil +} + +func (x *CreateConnectionProfileRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type UpdateConnectionProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Field mask is used to specify the fields to be overwritten in the + // ConnectionProfile resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Required. The ConnectionProfile to update. + ConnectionProfile *ConnectionProfile `protobuf:"bytes,2,opt,name=connection_profile,json=connectionProfile,proto3" json:"connection_profile,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *UpdateConnectionProfileRequest) Reset() { + *x = UpdateConnectionProfileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateConnectionProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateConnectionProfileRequest) ProtoMessage() {} + +func (x *UpdateConnectionProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateConnectionProfileRequest.ProtoReflect.Descriptor instead. +func (*UpdateConnectionProfileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateConnectionProfileRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateConnectionProfileRequest) GetConnectionProfile() *ConnectionProfile { + if x != nil { + return x.ConnectionProfile + } + return nil +} + +func (x *UpdateConnectionProfileRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type DeleteConnectionProfileRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the connection profile resource to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteConnectionProfileRequest) Reset() { + *x = DeleteConnectionProfileRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteConnectionProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteConnectionProfileRequest) ProtoMessage() {} + +func (x *DeleteConnectionProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteConnectionProfileRequest.ProtoReflect.Descriptor instead. +func (*DeleteConnectionProfileRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteConnectionProfileRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteConnectionProfileRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type ListStreamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of streams. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Maximum number of streams to return. + // If unspecified, at most 50 streams will be returned. The maximum + // value is 1000; values above 1000 will be coerced to 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token received from a previous `ListStreams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListStreams` + // must match the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter request. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Order by fields for the result. + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListStreamsRequest) Reset() { + *x = ListStreamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStreamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStreamsRequest) ProtoMessage() {} + +func (x *ListStreamsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStreamsRequest.ProtoReflect.Descriptor instead. +func (*ListStreamsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{12} +} + +func (x *ListStreamsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListStreamsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListStreamsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListStreamsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListStreamsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type ListStreamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of streams + Streams []*Stream `protobuf:"bytes,1,rep,name=streams,proto3" json:"streams,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListStreamsResponse) Reset() { + *x = ListStreamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStreamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStreamsResponse) ProtoMessage() {} + +func (x *ListStreamsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStreamsResponse.ProtoReflect.Descriptor instead. +func (*ListStreamsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{13} +} + +func (x *ListStreamsResponse) GetStreams() []*Stream { + if x != nil { + return x.Streams + } + return nil +} + +func (x *ListStreamsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListStreamsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +type GetStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the stream resource to get. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetStreamRequest) Reset() { + *x = GetStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStreamRequest) ProtoMessage() {} + +func (x *GetStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStreamRequest.ProtoReflect.Descriptor instead. +func (*GetStreamRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{14} +} + +func (x *GetStreamRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type CreateStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of streams. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The stream identifier. + StreamId string `protobuf:"bytes,2,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"` + // Required. The stream resource to create. + Stream *Stream `protobuf:"bytes,3,opt,name=stream,proto3" json:"stream,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Optional. Only validate the stream, but do not create any resources. + // The default is false. + ValidateOnly bool `protobuf:"varint,5,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` + // Optional. Create the stream without validating it. + Force bool `protobuf:"varint,6,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *CreateStreamRequest) Reset() { + *x = CreateStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStreamRequest) ProtoMessage() {} + +func (x *CreateStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStreamRequest.ProtoReflect.Descriptor instead. +func (*CreateStreamRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateStreamRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateStreamRequest) GetStreamId() string { + if x != nil { + return x.StreamId + } + return "" +} + +func (x *CreateStreamRequest) GetStream() *Stream { + if x != nil { + return x.Stream + } + return nil +} + +func (x *CreateStreamRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *CreateStreamRequest) GetValidateOnly() bool { + if x != nil { + return x.ValidateOnly + } + return false +} + +func (x *CreateStreamRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type UpdateStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Field mask is used to specify the fields to be overwritten in the + // stream resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Required. The stream resource to update. + Stream *Stream `protobuf:"bytes,2,opt,name=stream,proto3" json:"stream,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Optional. Only validate the stream with the changes, without actually updating it. + // The default is false. + ValidateOnly bool `protobuf:"varint,4,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` + // Optional. Execute the update without validating it. + Force bool `protobuf:"varint,5,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *UpdateStreamRequest) Reset() { + *x = UpdateStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateStreamRequest) ProtoMessage() {} + +func (x *UpdateStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateStreamRequest.ProtoReflect.Descriptor instead. +func (*UpdateStreamRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateStreamRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateStreamRequest) GetStream() *Stream { + if x != nil { + return x.Stream + } + return nil +} + +func (x *UpdateStreamRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *UpdateStreamRequest) GetValidateOnly() bool { + if x != nil { + return x.ValidateOnly + } + return false +} + +func (x *UpdateStreamRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type DeleteStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the stream resource to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteStreamRequest) Reset() { + *x = DeleteStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteStreamRequest) ProtoMessage() {} + +func (x *DeleteStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteStreamRequest.ProtoReflect.Descriptor instead. +func (*DeleteStreamRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{17} +} + +func (x *DeleteStreamRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteStreamRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Represents the metadata of the long-running operation. +type OperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The time the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The time the operation finished running. + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Output only. Server-defined resource path for the target of the operation. + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // Output only. Name of the verb executed by the operation. + Verb string `protobuf:"bytes,4,opt,name=verb,proto3" json:"verb,omitempty"` + // Output only. Human-readable status of the operation, if any. + StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + RequestedCancellation bool `protobuf:"varint,6,opt,name=requested_cancellation,json=requestedCancellation,proto3" json:"requested_cancellation,omitempty"` + // Output only. API version used to start the operation. + ApiVersion string `protobuf:"bytes,7,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + // Output only. Results of executed validations if there are any. + ValidationResult *ValidationResult `protobuf:"bytes,8,opt,name=validation_result,json=validationResult,proto3" json:"validation_result,omitempty"` +} + +func (x *OperationMetadata) Reset() { + *x = OperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationMetadata) ProtoMessage() {} + +func (x *OperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. +func (*OperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{18} +} + +func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *OperationMetadata) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *OperationMetadata) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *OperationMetadata) GetVerb() string { + if x != nil { + return x.Verb + } + return "" +} + +func (x *OperationMetadata) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" +} + +func (x *OperationMetadata) GetRequestedCancellation() bool { + if x != nil { + return x.RequestedCancellation + } + return false +} + +func (x *OperationMetadata) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *OperationMetadata) GetValidationResult() *ValidationResult { + if x != nil { + return x.ValidationResult + } + return nil +} + +type CreatePrivateConnectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of PrivateConnections. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The private connectivity identifier. + PrivateConnectionId string `protobuf:"bytes,2,opt,name=private_connection_id,json=privateConnectionId,proto3" json:"private_connection_id,omitempty"` + // Required. The Private Connectivity resource to create. + PrivateConnection *PrivateConnection `protobuf:"bytes,3,opt,name=private_connection,json=privateConnection,proto3" json:"private_connection,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreatePrivateConnectionRequest) Reset() { + *x = CreatePrivateConnectionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePrivateConnectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePrivateConnectionRequest) ProtoMessage() {} + +func (x *CreatePrivateConnectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePrivateConnectionRequest.ProtoReflect.Descriptor instead. +func (*CreatePrivateConnectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{19} +} + +func (x *CreatePrivateConnectionRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreatePrivateConnectionRequest) GetPrivateConnectionId() string { + if x != nil { + return x.PrivateConnectionId + } + return "" +} + +func (x *CreatePrivateConnectionRequest) GetPrivateConnection() *PrivateConnection { + if x != nil { + return x.PrivateConnection + } + return nil +} + +func (x *CreatePrivateConnectionRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type ListPrivateConnectionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of private connectivity configurations. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Maximum number of private connectivity configurations to return. + // If unspecified, at most 50 private connectivity configurations that will be + // returned. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token received from a previous `ListPrivateConnections` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListPrivateConnections` must match the call that provided the page + // token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter request. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Order by fields for the result. + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListPrivateConnectionsRequest) Reset() { + *x = ListPrivateConnectionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPrivateConnectionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPrivateConnectionsRequest) ProtoMessage() {} + +func (x *ListPrivateConnectionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPrivateConnectionsRequest.ProtoReflect.Descriptor instead. +func (*ListPrivateConnectionsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{20} +} + +func (x *ListPrivateConnectionsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListPrivateConnectionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPrivateConnectionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListPrivateConnectionsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListPrivateConnectionsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type ListPrivateConnectionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of private connectivity configurations. + PrivateConnections []*PrivateConnection `protobuf:"bytes,1,rep,name=private_connections,json=privateConnections,proto3" json:"private_connections,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListPrivateConnectionsResponse) Reset() { + *x = ListPrivateConnectionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPrivateConnectionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPrivateConnectionsResponse) ProtoMessage() {} + +func (x *ListPrivateConnectionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPrivateConnectionsResponse.ProtoReflect.Descriptor instead. +func (*ListPrivateConnectionsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{21} +} + +func (x *ListPrivateConnectionsResponse) GetPrivateConnections() []*PrivateConnection { + if x != nil { + return x.PrivateConnections + } + return nil +} + +func (x *ListPrivateConnectionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListPrivateConnectionsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +type DeletePrivateConnectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the private connectivity configuration to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Optional. If set to true, any child routes that belong to this PrivateConnection will + // also be deleted. + Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeletePrivateConnectionRequest) Reset() { + *x = DeletePrivateConnectionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePrivateConnectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePrivateConnectionRequest) ProtoMessage() {} + +func (x *DeletePrivateConnectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePrivateConnectionRequest.ProtoReflect.Descriptor instead. +func (*DeletePrivateConnectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{22} +} + +func (x *DeletePrivateConnectionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeletePrivateConnectionRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *DeletePrivateConnectionRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type GetPrivateConnectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the private connectivity configuration to get. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetPrivateConnectionRequest) Reset() { + *x = GetPrivateConnectionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPrivateConnectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPrivateConnectionRequest) ProtoMessage() {} + +func (x *GetPrivateConnectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPrivateConnectionRequest.ProtoReflect.Descriptor instead. +func (*GetPrivateConnectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{23} +} + +func (x *GetPrivateConnectionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// route creation request +type CreateRouteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of Routes. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The Route identifier. + RouteId string `protobuf:"bytes,2,opt,name=route_id,json=routeId,proto3" json:"route_id,omitempty"` + // Required. The Route resource to create. + Route *Route `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreateRouteRequest) Reset() { + *x = CreateRouteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRouteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRouteRequest) ProtoMessage() {} + +func (x *CreateRouteRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRouteRequest.ProtoReflect.Descriptor instead. +func (*CreateRouteRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{24} +} + +func (x *CreateRouteRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateRouteRequest) GetRouteId() string { + if x != nil { + return x.RouteId + } + return "" +} + +func (x *CreateRouteRequest) GetRoute() *Route { + if x != nil { + return x.Route + } + return nil +} + +func (x *CreateRouteRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// route list request +type ListRoutesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent that owns the collection of Routess. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Maximum number of Routes to return. The service may return + // fewer than this value. If unspecified, at most 50 Routes + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Page token received from a previous `ListRoutes` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListRoutes` must match the call that provided the page + // token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter request. + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Order by fields for the result. + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListRoutesRequest) Reset() { + *x = ListRoutesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRoutesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoutesRequest) ProtoMessage() {} + +func (x *ListRoutesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRoutesRequest.ProtoReflect.Descriptor instead. +func (*ListRoutesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{25} +} + +func (x *ListRoutesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListRoutesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRoutesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRoutesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListRoutesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// route list response +type ListRoutesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of Routes. + Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"` + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListRoutesResponse) Reset() { + *x = ListRoutesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRoutesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoutesResponse) ProtoMessage() {} + +func (x *ListRoutesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRoutesResponse.ProtoReflect.Descriptor instead. +func (*ListRoutesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{26} +} + +func (x *ListRoutesResponse) GetRoutes() []*Route { + if x != nil { + return x.Routes + } + return nil +} + +func (x *ListRoutesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListRoutesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// route deletion request +type DeleteRouteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Route resource to delete. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteRouteRequest) Reset() { + *x = DeleteRouteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRouteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRouteRequest) ProtoMessage() {} + +func (x *DeleteRouteRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRouteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRouteRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{27} +} + +func (x *DeleteRouteRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteRouteRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// route get request +type GetRouteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Route resource to get. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetRouteRequest) Reset() { + *x = GetRouteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRouteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRouteRequest) ProtoMessage() {} + +func (x *GetRouteRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRouteRequest.ProtoReflect.Descriptor instead. +func (*GetRouteRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP(), []int{28} +} + +func (x *GetRouteRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_datastream_v1alpha1_datastream_proto protoreflect.FileDescriptor + +var file_google_cloud_datastream_v1alpha1_datastream_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x04, + 0x0a, 0x20, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x12, 0x2b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x65, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, + 0x65, 0x12, 0x29, 0x0a, 0x0f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x64, + 0x65, 0x70, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0e, 0x72, 0x65, + 0x63, 0x75, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x52, 0x0a, 0x0c, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x72, 0x64, 0x62, 0x6d, 0x73, 0x18, 0x64, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, + 0x73, 0x48, 0x02, 0x52, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, + 0x12, 0x4f, 0x0a, 0x0b, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x64, 0x62, 0x6d, 0x73, 0x18, + 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, + 0x62, 0x6d, 0x73, 0x48, 0x02, 0x52, 0x0a, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, + 0x73, 0x42, 0x08, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x64, + 0x65, 0x70, 0x74, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x21, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0c, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x5f, 0x72, 0x64, 0x62, 0x6d, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x48, 0x00, + 0x52, 0x0b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x12, 0x4f, 0x0a, + 0x0b, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x64, 0x62, 0x6d, 0x73, 0x18, 0x65, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, 0x73, + 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x42, 0x0d, + 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x92, 0x01, + 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x49, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x5f, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x49, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x49, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x53, 0x0a, 0x12, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x41, 0x22, 0x0a, 0x20, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x56, 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3f, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x22, 0xdb, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x12, 0x2b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0xd0, + 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x64, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, + 0x65, 0x22, 0x66, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x1e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2d, 0x12, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x15, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x49, 0x64, 0x12, 0x67, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, + 0xef, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x67, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x22, 0x0a, + 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, + 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x22, 0xc5, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, + 0x12, 0x20, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x07, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, + 0x50, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x22, 0x12, 0x20, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12, 0x45, 0x0a, + 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, + 0x6c, 0x79, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x87, 0x02, + 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x22, + 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x19, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x77, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x22, 0xbb, 0x03, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x12, 0x17, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xb3, + 0x02, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x12, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x37, + 0x0a, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x67, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x22, 0xdb, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x12, 0x2b, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x22, 0xd0, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, + 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x22, 0x66, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x49, 0x64, + 0x12, 0x42, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0x9f, + 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, + 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x75, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, + 0x0a, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x8a, 0x27, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0xea, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0xd7, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb0, 0x02, + 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb3, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x52, 0x22, 0x3c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x3a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0xda, 0x41, 0x2f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x2c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0xca, 0x41, 0x26, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x11, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0xb2, 0x02, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x40, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb5, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x65, 0x32, 0x4f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0xda, 0x41, 0x1e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0xca, 0x41, 0x26, 0x0a, + 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xf4, 0x01, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x78, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x3c, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, + 0x41, 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xf6, 0x01, 0x0a, + 0x19, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x42, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x22, 0x45, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x3a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0xbe, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xab, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xdf, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3b, 0x22, 0x31, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xda, 0x41, + 0x17, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2c, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0xca, 0x41, 0x1b, 0x0a, 0x06, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xe1, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x32, 0x38, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, + 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xda, 0x41, 0x12, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0xca, 0x41, 0x1b, 0x0a, + 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xd3, 0x01, 0x0a, 0x0c, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x2a, 0x31, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0xd9, 0x01, 0x0a, 0x0b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x22, 0x3f, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x3a, 0x01, + 0x2a, 0xca, 0x41, 0x28, 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xca, 0x01, 0x0a, + 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x49, 0x70, 0x73, 0x12, + 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x49, 0x70, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x49, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x49, + 0x70, 0x73, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xb0, 0x02, 0x0a, 0x17, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb3, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x22, + 0x3c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x12, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0xda, 0x41, 0x2f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0xca, 0x41, 0x26, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xd7, 0x01, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xea, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0xf4, 0x01, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x78, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x3c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, + 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xee, 0x01, 0x0a, 0x0b, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x89, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x22, 0x45, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x3a, + 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0xda, 0x41, 0x15, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0xca, 0x41, + 0x1a, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xbc, 0x01, 0x0a, 0x08, + 0x47, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x22, 0x54, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xcf, 0x01, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xe6, 0x01, 0x0a, + 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x81, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x2a, 0x45, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2a, 0x0a, 0x15, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x42, 0xfd, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x1b, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x56, 0x31, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xea, 0x02, + 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescOnce sync.Once + file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescData = file_google_cloud_datastream_v1alpha1_datastream_proto_rawDesc +) + +func file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescGZIP() []byte { + file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescOnce.Do(func() { + file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescData) + }) + return file_google_cloud_datastream_v1alpha1_datastream_proto_rawDescData +} + +var file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_google_cloud_datastream_v1alpha1_datastream_proto_goTypes = []interface{}{ + (*DiscoverConnectionProfileRequest)(nil), // 0: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest + (*DiscoverConnectionProfileResponse)(nil), // 1: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse + (*FetchStaticIpsRequest)(nil), // 2: google.cloud.datastream.v1alpha1.FetchStaticIpsRequest + (*FetchStaticIpsResponse)(nil), // 3: google.cloud.datastream.v1alpha1.FetchStaticIpsResponse + (*FetchErrorsRequest)(nil), // 4: google.cloud.datastream.v1alpha1.FetchErrorsRequest + (*FetchErrorsResponse)(nil), // 5: google.cloud.datastream.v1alpha1.FetchErrorsResponse + (*ListConnectionProfilesRequest)(nil), // 6: google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest + (*ListConnectionProfilesResponse)(nil), // 7: google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse + (*GetConnectionProfileRequest)(nil), // 8: google.cloud.datastream.v1alpha1.GetConnectionProfileRequest + (*CreateConnectionProfileRequest)(nil), // 9: google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest + (*UpdateConnectionProfileRequest)(nil), // 10: google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest + (*DeleteConnectionProfileRequest)(nil), // 11: google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest + (*ListStreamsRequest)(nil), // 12: google.cloud.datastream.v1alpha1.ListStreamsRequest + (*ListStreamsResponse)(nil), // 13: google.cloud.datastream.v1alpha1.ListStreamsResponse + (*GetStreamRequest)(nil), // 14: google.cloud.datastream.v1alpha1.GetStreamRequest + (*CreateStreamRequest)(nil), // 15: google.cloud.datastream.v1alpha1.CreateStreamRequest + (*UpdateStreamRequest)(nil), // 16: google.cloud.datastream.v1alpha1.UpdateStreamRequest + (*DeleteStreamRequest)(nil), // 17: google.cloud.datastream.v1alpha1.DeleteStreamRequest + (*OperationMetadata)(nil), // 18: google.cloud.datastream.v1alpha1.OperationMetadata + (*CreatePrivateConnectionRequest)(nil), // 19: google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest + (*ListPrivateConnectionsRequest)(nil), // 20: google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest + (*ListPrivateConnectionsResponse)(nil), // 21: google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse + (*DeletePrivateConnectionRequest)(nil), // 22: google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest + (*GetPrivateConnectionRequest)(nil), // 23: google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest + (*CreateRouteRequest)(nil), // 24: google.cloud.datastream.v1alpha1.CreateRouteRequest + (*ListRoutesRequest)(nil), // 25: google.cloud.datastream.v1alpha1.ListRoutesRequest + (*ListRoutesResponse)(nil), // 26: google.cloud.datastream.v1alpha1.ListRoutesResponse + (*DeleteRouteRequest)(nil), // 27: google.cloud.datastream.v1alpha1.DeleteRouteRequest + (*GetRouteRequest)(nil), // 28: google.cloud.datastream.v1alpha1.GetRouteRequest + (*ConnectionProfile)(nil), // 29: google.cloud.datastream.v1alpha1.ConnectionProfile + (*OracleRdbms)(nil), // 30: google.cloud.datastream.v1alpha1.OracleRdbms + (*MysqlRdbms)(nil), // 31: google.cloud.datastream.v1alpha1.MysqlRdbms + (*Error)(nil), // 32: google.cloud.datastream.v1alpha1.Error + (*fieldmaskpb.FieldMask)(nil), // 33: google.protobuf.FieldMask + (*Stream)(nil), // 34: google.cloud.datastream.v1alpha1.Stream + (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp + (*ValidationResult)(nil), // 36: google.cloud.datastream.v1alpha1.ValidationResult + (*PrivateConnection)(nil), // 37: google.cloud.datastream.v1alpha1.PrivateConnection + (*Route)(nil), // 38: google.cloud.datastream.v1alpha1.Route + (*longrunning.Operation)(nil), // 39: google.longrunning.Operation +} +var file_google_cloud_datastream_v1alpha1_datastream_proto_depIdxs = []int32{ + 29, // 0: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.connection_profile:type_name -> google.cloud.datastream.v1alpha1.ConnectionProfile + 30, // 1: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.oracle_rdbms:type_name -> google.cloud.datastream.v1alpha1.OracleRdbms + 31, // 2: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest.mysql_rdbms:type_name -> google.cloud.datastream.v1alpha1.MysqlRdbms + 30, // 3: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.oracle_rdbms:type_name -> google.cloud.datastream.v1alpha1.OracleRdbms + 31, // 4: google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse.mysql_rdbms:type_name -> google.cloud.datastream.v1alpha1.MysqlRdbms + 32, // 5: google.cloud.datastream.v1alpha1.FetchErrorsResponse.errors:type_name -> google.cloud.datastream.v1alpha1.Error + 29, // 6: google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse.connection_profiles:type_name -> google.cloud.datastream.v1alpha1.ConnectionProfile + 29, // 7: google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest.connection_profile:type_name -> google.cloud.datastream.v1alpha1.ConnectionProfile + 33, // 8: google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.update_mask:type_name -> google.protobuf.FieldMask + 29, // 9: google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest.connection_profile:type_name -> google.cloud.datastream.v1alpha1.ConnectionProfile + 34, // 10: google.cloud.datastream.v1alpha1.ListStreamsResponse.streams:type_name -> google.cloud.datastream.v1alpha1.Stream + 34, // 11: google.cloud.datastream.v1alpha1.CreateStreamRequest.stream:type_name -> google.cloud.datastream.v1alpha1.Stream + 33, // 12: google.cloud.datastream.v1alpha1.UpdateStreamRequest.update_mask:type_name -> google.protobuf.FieldMask + 34, // 13: google.cloud.datastream.v1alpha1.UpdateStreamRequest.stream:type_name -> google.cloud.datastream.v1alpha1.Stream + 35, // 14: google.cloud.datastream.v1alpha1.OperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 35, // 15: google.cloud.datastream.v1alpha1.OperationMetadata.end_time:type_name -> google.protobuf.Timestamp + 36, // 16: google.cloud.datastream.v1alpha1.OperationMetadata.validation_result:type_name -> google.cloud.datastream.v1alpha1.ValidationResult + 37, // 17: google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest.private_connection:type_name -> google.cloud.datastream.v1alpha1.PrivateConnection + 37, // 18: google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse.private_connections:type_name -> google.cloud.datastream.v1alpha1.PrivateConnection + 38, // 19: google.cloud.datastream.v1alpha1.CreateRouteRequest.route:type_name -> google.cloud.datastream.v1alpha1.Route + 38, // 20: google.cloud.datastream.v1alpha1.ListRoutesResponse.routes:type_name -> google.cloud.datastream.v1alpha1.Route + 6, // 21: google.cloud.datastream.v1alpha1.Datastream.ListConnectionProfiles:input_type -> google.cloud.datastream.v1alpha1.ListConnectionProfilesRequest + 8, // 22: google.cloud.datastream.v1alpha1.Datastream.GetConnectionProfile:input_type -> google.cloud.datastream.v1alpha1.GetConnectionProfileRequest + 9, // 23: google.cloud.datastream.v1alpha1.Datastream.CreateConnectionProfile:input_type -> google.cloud.datastream.v1alpha1.CreateConnectionProfileRequest + 10, // 24: google.cloud.datastream.v1alpha1.Datastream.UpdateConnectionProfile:input_type -> google.cloud.datastream.v1alpha1.UpdateConnectionProfileRequest + 11, // 25: google.cloud.datastream.v1alpha1.Datastream.DeleteConnectionProfile:input_type -> google.cloud.datastream.v1alpha1.DeleteConnectionProfileRequest + 0, // 26: google.cloud.datastream.v1alpha1.Datastream.DiscoverConnectionProfile:input_type -> google.cloud.datastream.v1alpha1.DiscoverConnectionProfileRequest + 12, // 27: google.cloud.datastream.v1alpha1.Datastream.ListStreams:input_type -> google.cloud.datastream.v1alpha1.ListStreamsRequest + 14, // 28: google.cloud.datastream.v1alpha1.Datastream.GetStream:input_type -> google.cloud.datastream.v1alpha1.GetStreamRequest + 15, // 29: google.cloud.datastream.v1alpha1.Datastream.CreateStream:input_type -> google.cloud.datastream.v1alpha1.CreateStreamRequest + 16, // 30: google.cloud.datastream.v1alpha1.Datastream.UpdateStream:input_type -> google.cloud.datastream.v1alpha1.UpdateStreamRequest + 17, // 31: google.cloud.datastream.v1alpha1.Datastream.DeleteStream:input_type -> google.cloud.datastream.v1alpha1.DeleteStreamRequest + 4, // 32: google.cloud.datastream.v1alpha1.Datastream.FetchErrors:input_type -> google.cloud.datastream.v1alpha1.FetchErrorsRequest + 2, // 33: google.cloud.datastream.v1alpha1.Datastream.FetchStaticIps:input_type -> google.cloud.datastream.v1alpha1.FetchStaticIpsRequest + 19, // 34: google.cloud.datastream.v1alpha1.Datastream.CreatePrivateConnection:input_type -> google.cloud.datastream.v1alpha1.CreatePrivateConnectionRequest + 23, // 35: google.cloud.datastream.v1alpha1.Datastream.GetPrivateConnection:input_type -> google.cloud.datastream.v1alpha1.GetPrivateConnectionRequest + 20, // 36: google.cloud.datastream.v1alpha1.Datastream.ListPrivateConnections:input_type -> google.cloud.datastream.v1alpha1.ListPrivateConnectionsRequest + 22, // 37: google.cloud.datastream.v1alpha1.Datastream.DeletePrivateConnection:input_type -> google.cloud.datastream.v1alpha1.DeletePrivateConnectionRequest + 24, // 38: google.cloud.datastream.v1alpha1.Datastream.CreateRoute:input_type -> google.cloud.datastream.v1alpha1.CreateRouteRequest + 28, // 39: google.cloud.datastream.v1alpha1.Datastream.GetRoute:input_type -> google.cloud.datastream.v1alpha1.GetRouteRequest + 25, // 40: google.cloud.datastream.v1alpha1.Datastream.ListRoutes:input_type -> google.cloud.datastream.v1alpha1.ListRoutesRequest + 27, // 41: google.cloud.datastream.v1alpha1.Datastream.DeleteRoute:input_type -> google.cloud.datastream.v1alpha1.DeleteRouteRequest + 7, // 42: google.cloud.datastream.v1alpha1.Datastream.ListConnectionProfiles:output_type -> google.cloud.datastream.v1alpha1.ListConnectionProfilesResponse + 29, // 43: google.cloud.datastream.v1alpha1.Datastream.GetConnectionProfile:output_type -> google.cloud.datastream.v1alpha1.ConnectionProfile + 39, // 44: google.cloud.datastream.v1alpha1.Datastream.CreateConnectionProfile:output_type -> google.longrunning.Operation + 39, // 45: google.cloud.datastream.v1alpha1.Datastream.UpdateConnectionProfile:output_type -> google.longrunning.Operation + 39, // 46: google.cloud.datastream.v1alpha1.Datastream.DeleteConnectionProfile:output_type -> google.longrunning.Operation + 1, // 47: google.cloud.datastream.v1alpha1.Datastream.DiscoverConnectionProfile:output_type -> google.cloud.datastream.v1alpha1.DiscoverConnectionProfileResponse + 13, // 48: google.cloud.datastream.v1alpha1.Datastream.ListStreams:output_type -> google.cloud.datastream.v1alpha1.ListStreamsResponse + 34, // 49: google.cloud.datastream.v1alpha1.Datastream.GetStream:output_type -> google.cloud.datastream.v1alpha1.Stream + 39, // 50: google.cloud.datastream.v1alpha1.Datastream.CreateStream:output_type -> google.longrunning.Operation + 39, // 51: google.cloud.datastream.v1alpha1.Datastream.UpdateStream:output_type -> google.longrunning.Operation + 39, // 52: google.cloud.datastream.v1alpha1.Datastream.DeleteStream:output_type -> google.longrunning.Operation + 39, // 53: google.cloud.datastream.v1alpha1.Datastream.FetchErrors:output_type -> google.longrunning.Operation + 3, // 54: google.cloud.datastream.v1alpha1.Datastream.FetchStaticIps:output_type -> google.cloud.datastream.v1alpha1.FetchStaticIpsResponse + 39, // 55: google.cloud.datastream.v1alpha1.Datastream.CreatePrivateConnection:output_type -> google.longrunning.Operation + 37, // 56: google.cloud.datastream.v1alpha1.Datastream.GetPrivateConnection:output_type -> google.cloud.datastream.v1alpha1.PrivateConnection + 21, // 57: google.cloud.datastream.v1alpha1.Datastream.ListPrivateConnections:output_type -> google.cloud.datastream.v1alpha1.ListPrivateConnectionsResponse + 39, // 58: google.cloud.datastream.v1alpha1.Datastream.DeletePrivateConnection:output_type -> google.longrunning.Operation + 39, // 59: google.cloud.datastream.v1alpha1.Datastream.CreateRoute:output_type -> google.longrunning.Operation + 38, // 60: google.cloud.datastream.v1alpha1.Datastream.GetRoute:output_type -> google.cloud.datastream.v1alpha1.Route + 26, // 61: google.cloud.datastream.v1alpha1.Datastream.ListRoutes:output_type -> google.cloud.datastream.v1alpha1.ListRoutesResponse + 39, // 62: google.cloud.datastream.v1alpha1.Datastream.DeleteRoute:output_type -> google.longrunning.Operation + 42, // [42:63] is the sub-list for method output_type + 21, // [21:42] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_google_cloud_datastream_v1alpha1_datastream_proto_init() } +func file_google_cloud_datastream_v1alpha1_datastream_proto_init() { + if File_google_cloud_datastream_v1alpha1_datastream_proto != nil { + return + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiscoverConnectionProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiscoverConnectionProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchStaticIpsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchStaticIpsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchErrorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchErrorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListConnectionProfilesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListConnectionProfilesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConnectionProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateConnectionProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateConnectionProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteConnectionProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStreamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStreamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreatePrivateConnectionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPrivateConnectionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPrivateConnectionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePrivateConnectionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPrivateConnectionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRoutesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRoutesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*DiscoverConnectionProfileRequest_ConnectionProfile)(nil), + (*DiscoverConnectionProfileRequest_ConnectionProfileName)(nil), + (*DiscoverConnectionProfileRequest_Recursive)(nil), + (*DiscoverConnectionProfileRequest_RecursionDepth)(nil), + (*DiscoverConnectionProfileRequest_OracleRdbms)(nil), + (*DiscoverConnectionProfileRequest_MysqlRdbms)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*DiscoverConnectionProfileResponse_OracleRdbms)(nil), + (*DiscoverConnectionProfileResponse_MysqlRdbms)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datastream_v1alpha1_datastream_proto_rawDesc, + NumEnums: 0, + NumMessages: 29, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_datastream_v1alpha1_datastream_proto_goTypes, + DependencyIndexes: file_google_cloud_datastream_v1alpha1_datastream_proto_depIdxs, + MessageInfos: file_google_cloud_datastream_v1alpha1_datastream_proto_msgTypes, + }.Build() + File_google_cloud_datastream_v1alpha1_datastream_proto = out.File + file_google_cloud_datastream_v1alpha1_datastream_proto_rawDesc = nil + file_google_cloud_datastream_v1alpha1_datastream_proto_goTypes = nil + file_google_cloud_datastream_v1alpha1_datastream_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DatastreamClient is the client API for Datastream service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DatastreamClient interface { + // Use this method to list connection profiles created in a project and + // location. + ListConnectionProfiles(ctx context.Context, in *ListConnectionProfilesRequest, opts ...grpc.CallOption) (*ListConnectionProfilesResponse, error) + // Use this method to get details about a connection profile. + GetConnectionProfile(ctx context.Context, in *GetConnectionProfileRequest, opts ...grpc.CallOption) (*ConnectionProfile, error) + // Use this method to create a connection profile in a project and location. + CreateConnectionProfile(ctx context.Context, in *CreateConnectionProfileRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to update the parameters of a connection profile. + UpdateConnectionProfile(ctx context.Context, in *UpdateConnectionProfileRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to delete a connection profile.. + DeleteConnectionProfile(ctx context.Context, in *DeleteConnectionProfileRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to discover a connection profile. + // The discover API call exposes the data objects and metadata belonging to + // the profile. Typically, a request returns children data objects under a + // parent data object that's optionally supplied in the request. + DiscoverConnectionProfile(ctx context.Context, in *DiscoverConnectionProfileRequest, opts ...grpc.CallOption) (*DiscoverConnectionProfileResponse, error) + // Use this method to list streams in a project and location. + ListStreams(ctx context.Context, in *ListStreamsRequest, opts ...grpc.CallOption) (*ListStreamsResponse, error) + // Use this method to get details about a stream. + GetStream(ctx context.Context, in *GetStreamRequest, opts ...grpc.CallOption) (*Stream, error) + // Use this method to create a stream. + CreateStream(ctx context.Context, in *CreateStreamRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to update the configuration of a stream. + UpdateStream(ctx context.Context, in *UpdateStreamRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to delete a stream. + DeleteStream(ctx context.Context, in *DeleteStreamRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to fetch any errors associated with a stream. + FetchErrors(ctx context.Context, in *FetchErrorsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // The FetchStaticIps API call exposes the static ips used by Datastream. + // Typically, a request returns children data objects under + // a parent data object that's optionally supplied in the request. + FetchStaticIps(ctx context.Context, in *FetchStaticIpsRequest, opts ...grpc.CallOption) (*FetchStaticIpsResponse, error) + // Use this method to create a private connectivity configuration. + CreatePrivateConnection(ctx context.Context, in *CreatePrivateConnectionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to get details about a private connectivity configuration. + GetPrivateConnection(ctx context.Context, in *GetPrivateConnectionRequest, opts ...grpc.CallOption) (*PrivateConnection, error) + // Use this method to list private connectivity configurations in a project + // and location. + ListPrivateConnections(ctx context.Context, in *ListPrivateConnectionsRequest, opts ...grpc.CallOption) (*ListPrivateConnectionsResponse, error) + // Use this method to delete a private connectivity configuration. + DeletePrivateConnection(ctx context.Context, in *DeletePrivateConnectionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to create a route for a private connectivity in a project + // and location. + CreateRoute(ctx context.Context, in *CreateRouteRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Use this method to get details about a route. + GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*Route, error) + // Use this method to list routes created for a private connectivity in a + // project and location. + ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc.CallOption) (*ListRoutesResponse, error) + // Use this method to delete a route. + DeleteRoute(ctx context.Context, in *DeleteRouteRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) +} + +type datastreamClient struct { + cc grpc.ClientConnInterface +} + +func NewDatastreamClient(cc grpc.ClientConnInterface) DatastreamClient { + return &datastreamClient{cc} +} + +func (c *datastreamClient) ListConnectionProfiles(ctx context.Context, in *ListConnectionProfilesRequest, opts ...grpc.CallOption) (*ListConnectionProfilesResponse, error) { + out := new(ListConnectionProfilesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/ListConnectionProfiles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) GetConnectionProfile(ctx context.Context, in *GetConnectionProfileRequest, opts ...grpc.CallOption) (*ConnectionProfile, error) { + out := new(ConnectionProfile) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/GetConnectionProfile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) CreateConnectionProfile(ctx context.Context, in *CreateConnectionProfileRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/CreateConnectionProfile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) UpdateConnectionProfile(ctx context.Context, in *UpdateConnectionProfileRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/UpdateConnectionProfile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) DeleteConnectionProfile(ctx context.Context, in *DeleteConnectionProfileRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/DeleteConnectionProfile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) DiscoverConnectionProfile(ctx context.Context, in *DiscoverConnectionProfileRequest, opts ...grpc.CallOption) (*DiscoverConnectionProfileResponse, error) { + out := new(DiscoverConnectionProfileResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/DiscoverConnectionProfile", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) ListStreams(ctx context.Context, in *ListStreamsRequest, opts ...grpc.CallOption) (*ListStreamsResponse, error) { + out := new(ListStreamsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/ListStreams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) GetStream(ctx context.Context, in *GetStreamRequest, opts ...grpc.CallOption) (*Stream, error) { + out := new(Stream) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/GetStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) CreateStream(ctx context.Context, in *CreateStreamRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/CreateStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) UpdateStream(ctx context.Context, in *UpdateStreamRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/UpdateStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) DeleteStream(ctx context.Context, in *DeleteStreamRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/DeleteStream", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) FetchErrors(ctx context.Context, in *FetchErrorsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/FetchErrors", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) FetchStaticIps(ctx context.Context, in *FetchStaticIpsRequest, opts ...grpc.CallOption) (*FetchStaticIpsResponse, error) { + out := new(FetchStaticIpsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/FetchStaticIps", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) CreatePrivateConnection(ctx context.Context, in *CreatePrivateConnectionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/CreatePrivateConnection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) GetPrivateConnection(ctx context.Context, in *GetPrivateConnectionRequest, opts ...grpc.CallOption) (*PrivateConnection, error) { + out := new(PrivateConnection) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/GetPrivateConnection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) ListPrivateConnections(ctx context.Context, in *ListPrivateConnectionsRequest, opts ...grpc.CallOption) (*ListPrivateConnectionsResponse, error) { + out := new(ListPrivateConnectionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/ListPrivateConnections", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) DeletePrivateConnection(ctx context.Context, in *DeletePrivateConnectionRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/DeletePrivateConnection", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) CreateRoute(ctx context.Context, in *CreateRouteRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/CreateRoute", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*Route, error) { + out := new(Route) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/GetRoute", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc.CallOption) (*ListRoutesResponse, error) { + out := new(ListRoutesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/ListRoutes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *datastreamClient) DeleteRoute(ctx context.Context, in *DeleteRouteRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.datastream.v1alpha1.Datastream/DeleteRoute", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DatastreamServer is the server API for Datastream service. +type DatastreamServer interface { + // Use this method to list connection profiles created in a project and + // location. + ListConnectionProfiles(context.Context, *ListConnectionProfilesRequest) (*ListConnectionProfilesResponse, error) + // Use this method to get details about a connection profile. + GetConnectionProfile(context.Context, *GetConnectionProfileRequest) (*ConnectionProfile, error) + // Use this method to create a connection profile in a project and location. + CreateConnectionProfile(context.Context, *CreateConnectionProfileRequest) (*longrunning.Operation, error) + // Use this method to update the parameters of a connection profile. + UpdateConnectionProfile(context.Context, *UpdateConnectionProfileRequest) (*longrunning.Operation, error) + // Use this method to delete a connection profile.. + DeleteConnectionProfile(context.Context, *DeleteConnectionProfileRequest) (*longrunning.Operation, error) + // Use this method to discover a connection profile. + // The discover API call exposes the data objects and metadata belonging to + // the profile. Typically, a request returns children data objects under a + // parent data object that's optionally supplied in the request. + DiscoverConnectionProfile(context.Context, *DiscoverConnectionProfileRequest) (*DiscoverConnectionProfileResponse, error) + // Use this method to list streams in a project and location. + ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error) + // Use this method to get details about a stream. + GetStream(context.Context, *GetStreamRequest) (*Stream, error) + // Use this method to create a stream. + CreateStream(context.Context, *CreateStreamRequest) (*longrunning.Operation, error) + // Use this method to update the configuration of a stream. + UpdateStream(context.Context, *UpdateStreamRequest) (*longrunning.Operation, error) + // Use this method to delete a stream. + DeleteStream(context.Context, *DeleteStreamRequest) (*longrunning.Operation, error) + // Use this method to fetch any errors associated with a stream. + FetchErrors(context.Context, *FetchErrorsRequest) (*longrunning.Operation, error) + // The FetchStaticIps API call exposes the static ips used by Datastream. + // Typically, a request returns children data objects under + // a parent data object that's optionally supplied in the request. + FetchStaticIps(context.Context, *FetchStaticIpsRequest) (*FetchStaticIpsResponse, error) + // Use this method to create a private connectivity configuration. + CreatePrivateConnection(context.Context, *CreatePrivateConnectionRequest) (*longrunning.Operation, error) + // Use this method to get details about a private connectivity configuration. + GetPrivateConnection(context.Context, *GetPrivateConnectionRequest) (*PrivateConnection, error) + // Use this method to list private connectivity configurations in a project + // and location. + ListPrivateConnections(context.Context, *ListPrivateConnectionsRequest) (*ListPrivateConnectionsResponse, error) + // Use this method to delete a private connectivity configuration. + DeletePrivateConnection(context.Context, *DeletePrivateConnectionRequest) (*longrunning.Operation, error) + // Use this method to create a route for a private connectivity in a project + // and location. + CreateRoute(context.Context, *CreateRouteRequest) (*longrunning.Operation, error) + // Use this method to get details about a route. + GetRoute(context.Context, *GetRouteRequest) (*Route, error) + // Use this method to list routes created for a private connectivity in a + // project and location. + ListRoutes(context.Context, *ListRoutesRequest) (*ListRoutesResponse, error) + // Use this method to delete a route. + DeleteRoute(context.Context, *DeleteRouteRequest) (*longrunning.Operation, error) +} + +// UnimplementedDatastreamServer can be embedded to have forward compatible implementations. +type UnimplementedDatastreamServer struct { +} + +func (*UnimplementedDatastreamServer) ListConnectionProfiles(context.Context, *ListConnectionProfilesRequest) (*ListConnectionProfilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListConnectionProfiles not implemented") +} +func (*UnimplementedDatastreamServer) GetConnectionProfile(context.Context, *GetConnectionProfileRequest) (*ConnectionProfile, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConnectionProfile not implemented") +} +func (*UnimplementedDatastreamServer) CreateConnectionProfile(context.Context, *CreateConnectionProfileRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateConnectionProfile not implemented") +} +func (*UnimplementedDatastreamServer) UpdateConnectionProfile(context.Context, *UpdateConnectionProfileRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateConnectionProfile not implemented") +} +func (*UnimplementedDatastreamServer) DeleteConnectionProfile(context.Context, *DeleteConnectionProfileRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteConnectionProfile not implemented") +} +func (*UnimplementedDatastreamServer) DiscoverConnectionProfile(context.Context, *DiscoverConnectionProfileRequest) (*DiscoverConnectionProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiscoverConnectionProfile not implemented") +} +func (*UnimplementedDatastreamServer) ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStreams not implemented") +} +func (*UnimplementedDatastreamServer) GetStream(context.Context, *GetStreamRequest) (*Stream, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStream not implemented") +} +func (*UnimplementedDatastreamServer) CreateStream(context.Context, *CreateStreamRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateStream not implemented") +} +func (*UnimplementedDatastreamServer) UpdateStream(context.Context, *UpdateStreamRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateStream not implemented") +} +func (*UnimplementedDatastreamServer) DeleteStream(context.Context, *DeleteStreamRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteStream not implemented") +} +func (*UnimplementedDatastreamServer) FetchErrors(context.Context, *FetchErrorsRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchErrors not implemented") +} +func (*UnimplementedDatastreamServer) FetchStaticIps(context.Context, *FetchStaticIpsRequest) (*FetchStaticIpsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchStaticIps not implemented") +} +func (*UnimplementedDatastreamServer) CreatePrivateConnection(context.Context, *CreatePrivateConnectionRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePrivateConnection not implemented") +} +func (*UnimplementedDatastreamServer) GetPrivateConnection(context.Context, *GetPrivateConnectionRequest) (*PrivateConnection, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPrivateConnection not implemented") +} +func (*UnimplementedDatastreamServer) ListPrivateConnections(context.Context, *ListPrivateConnectionsRequest) (*ListPrivateConnectionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPrivateConnections not implemented") +} +func (*UnimplementedDatastreamServer) DeletePrivateConnection(context.Context, *DeletePrivateConnectionRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePrivateConnection not implemented") +} +func (*UnimplementedDatastreamServer) CreateRoute(context.Context, *CreateRouteRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRoute not implemented") +} +func (*UnimplementedDatastreamServer) GetRoute(context.Context, *GetRouteRequest) (*Route, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRoute not implemented") +} +func (*UnimplementedDatastreamServer) ListRoutes(context.Context, *ListRoutesRequest) (*ListRoutesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRoutes not implemented") +} +func (*UnimplementedDatastreamServer) DeleteRoute(context.Context, *DeleteRouteRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRoute not implemented") +} + +func RegisterDatastreamServer(s *grpc.Server, srv DatastreamServer) { + s.RegisterService(&_Datastream_serviceDesc, srv) +} + +func _Datastream_ListConnectionProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListConnectionProfilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).ListConnectionProfiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/ListConnectionProfiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).ListConnectionProfiles(ctx, req.(*ListConnectionProfilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_GetConnectionProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConnectionProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).GetConnectionProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/GetConnectionProfile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).GetConnectionProfile(ctx, req.(*GetConnectionProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_CreateConnectionProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateConnectionProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).CreateConnectionProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/CreateConnectionProfile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).CreateConnectionProfile(ctx, req.(*CreateConnectionProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_UpdateConnectionProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateConnectionProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).UpdateConnectionProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/UpdateConnectionProfile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).UpdateConnectionProfile(ctx, req.(*UpdateConnectionProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_DeleteConnectionProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteConnectionProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).DeleteConnectionProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/DeleteConnectionProfile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).DeleteConnectionProfile(ctx, req.(*DeleteConnectionProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_DiscoverConnectionProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiscoverConnectionProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).DiscoverConnectionProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/DiscoverConnectionProfile", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).DiscoverConnectionProfile(ctx, req.(*DiscoverConnectionProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_ListStreams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStreamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).ListStreams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/ListStreams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).ListStreams(ctx, req.(*ListStreamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_GetStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).GetStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/GetStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).GetStream(ctx, req.(*GetStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_CreateStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).CreateStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/CreateStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).CreateStream(ctx, req.(*CreateStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_UpdateStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).UpdateStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/UpdateStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).UpdateStream(ctx, req.(*UpdateStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_DeleteStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteStreamRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).DeleteStream(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/DeleteStream", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).DeleteStream(ctx, req.(*DeleteStreamRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_FetchErrors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchErrorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).FetchErrors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/FetchErrors", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).FetchErrors(ctx, req.(*FetchErrorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_FetchStaticIps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchStaticIpsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).FetchStaticIps(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/FetchStaticIps", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).FetchStaticIps(ctx, req.(*FetchStaticIpsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_CreatePrivateConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePrivateConnectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).CreatePrivateConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/CreatePrivateConnection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).CreatePrivateConnection(ctx, req.(*CreatePrivateConnectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_GetPrivateConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPrivateConnectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).GetPrivateConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/GetPrivateConnection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).GetPrivateConnection(ctx, req.(*GetPrivateConnectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_ListPrivateConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPrivateConnectionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).ListPrivateConnections(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/ListPrivateConnections", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).ListPrivateConnections(ctx, req.(*ListPrivateConnectionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_DeletePrivateConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePrivateConnectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).DeletePrivateConnection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/DeletePrivateConnection", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).DeletePrivateConnection(ctx, req.(*DeletePrivateConnectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_CreateRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).CreateRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/CreateRoute", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).CreateRoute(ctx, req.(*CreateRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_GetRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).GetRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/GetRoute", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).GetRoute(ctx, req.(*GetRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_ListRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRoutesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).ListRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/ListRoutes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).ListRoutes(ctx, req.(*ListRoutesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Datastream_DeleteRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DatastreamServer).DeleteRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.datastream.v1alpha1.Datastream/DeleteRoute", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DatastreamServer).DeleteRoute(ctx, req.(*DeleteRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Datastream_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.datastream.v1alpha1.Datastream", + HandlerType: (*DatastreamServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListConnectionProfiles", + Handler: _Datastream_ListConnectionProfiles_Handler, + }, + { + MethodName: "GetConnectionProfile", + Handler: _Datastream_GetConnectionProfile_Handler, + }, + { + MethodName: "CreateConnectionProfile", + Handler: _Datastream_CreateConnectionProfile_Handler, + }, + { + MethodName: "UpdateConnectionProfile", + Handler: _Datastream_UpdateConnectionProfile_Handler, + }, + { + MethodName: "DeleteConnectionProfile", + Handler: _Datastream_DeleteConnectionProfile_Handler, + }, + { + MethodName: "DiscoverConnectionProfile", + Handler: _Datastream_DiscoverConnectionProfile_Handler, + }, + { + MethodName: "ListStreams", + Handler: _Datastream_ListStreams_Handler, + }, + { + MethodName: "GetStream", + Handler: _Datastream_GetStream_Handler, + }, + { + MethodName: "CreateStream", + Handler: _Datastream_CreateStream_Handler, + }, + { + MethodName: "UpdateStream", + Handler: _Datastream_UpdateStream_Handler, + }, + { + MethodName: "DeleteStream", + Handler: _Datastream_DeleteStream_Handler, + }, + { + MethodName: "FetchErrors", + Handler: _Datastream_FetchErrors_Handler, + }, + { + MethodName: "FetchStaticIps", + Handler: _Datastream_FetchStaticIps_Handler, + }, + { + MethodName: "CreatePrivateConnection", + Handler: _Datastream_CreatePrivateConnection_Handler, + }, + { + MethodName: "GetPrivateConnection", + Handler: _Datastream_GetPrivateConnection_Handler, + }, + { + MethodName: "ListPrivateConnections", + Handler: _Datastream_ListPrivateConnections_Handler, + }, + { + MethodName: "DeletePrivateConnection", + Handler: _Datastream_DeletePrivateConnection_Handler, + }, + { + MethodName: "CreateRoute", + Handler: _Datastream_CreateRoute_Handler, + }, + { + MethodName: "GetRoute", + Handler: _Datastream_GetRoute_Handler, + }, + { + MethodName: "ListRoutes", + Handler: _Datastream_ListRoutes_Handler, + }, + { + MethodName: "DeleteRoute", + Handler: _Datastream_DeleteRoute_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/datastream/v1alpha1/datastream.proto", +} diff --git a/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go b/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go new file mode 100644 index 000000000000..195828ef941b --- /dev/null +++ b/datastream/apiv1alpha1/datastreampb/datastream_resources.pb.go @@ -0,0 +1,4412 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/datastream/v1alpha1/datastream_resources.proto + +package datastreampb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// File format in Cloud Storage. +// +// Deprecated: Do not use. +type GcsFileFormat int32 + +const ( + // Unspecified Cloud Storage file format. + GcsFileFormat_GCS_FILE_FORMAT_UNSPECIFIED GcsFileFormat = 0 + // Avro file format + GcsFileFormat_AVRO GcsFileFormat = 1 +) + +// Enum value maps for GcsFileFormat. +var ( + GcsFileFormat_name = map[int32]string{ + 0: "GCS_FILE_FORMAT_UNSPECIFIED", + 1: "AVRO", + } + GcsFileFormat_value = map[string]int32{ + "GCS_FILE_FORMAT_UNSPECIFIED": 0, + "AVRO": 1, + } +) + +func (x GcsFileFormat) Enum() *GcsFileFormat { + p := new(GcsFileFormat) + *p = x + return p +} + +func (x GcsFileFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GcsFileFormat) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[0].Descriptor() +} + +func (GcsFileFormat) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[0] +} + +func (x GcsFileFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GcsFileFormat.Descriptor instead. +func (GcsFileFormat) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{0} +} + +// Schema file format. +type SchemaFileFormat int32 + +const ( + // Unspecified schema file format. + SchemaFileFormat_SCHEMA_FILE_FORMAT_UNSPECIFIED SchemaFileFormat = 0 + // Do not attach schema file. + SchemaFileFormat_NO_SCHEMA_FILE SchemaFileFormat = 1 + // Avro schema format. + SchemaFileFormat_AVRO_SCHEMA_FILE SchemaFileFormat = 2 +) + +// Enum value maps for SchemaFileFormat. +var ( + SchemaFileFormat_name = map[int32]string{ + 0: "SCHEMA_FILE_FORMAT_UNSPECIFIED", + 1: "NO_SCHEMA_FILE", + 2: "AVRO_SCHEMA_FILE", + } + SchemaFileFormat_value = map[string]int32{ + "SCHEMA_FILE_FORMAT_UNSPECIFIED": 0, + "NO_SCHEMA_FILE": 1, + "AVRO_SCHEMA_FILE": 2, + } +) + +func (x SchemaFileFormat) Enum() *SchemaFileFormat { + p := new(SchemaFileFormat) + *p = x + return p +} + +func (x SchemaFileFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SchemaFileFormat) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[1].Descriptor() +} + +func (SchemaFileFormat) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[1] +} + +func (x SchemaFileFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SchemaFileFormat.Descriptor instead. +func (SchemaFileFormat) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{1} +} + +// Private Connection state. +type PrivateConnection_State int32 + +const ( + PrivateConnection_STATE_UNSPECIFIED PrivateConnection_State = 0 + // The private connection is in creation state - creating resources. + PrivateConnection_CREATING PrivateConnection_State = 1 + // The private connection has been created with all of it's resources. + PrivateConnection_CREATED PrivateConnection_State = 2 + // The private connection creation has failed. + PrivateConnection_FAILED PrivateConnection_State = 3 +) + +// Enum value maps for PrivateConnection_State. +var ( + PrivateConnection_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "CREATED", + 3: "FAILED", + } + PrivateConnection_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "CREATED": 2, + "FAILED": 3, + } +) + +func (x PrivateConnection_State) Enum() *PrivateConnection_State { + p := new(PrivateConnection_State) + *p = x + return p +} + +func (x PrivateConnection_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PrivateConnection_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[2].Descriptor() +} + +func (PrivateConnection_State) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[2] +} + +func (x PrivateConnection_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PrivateConnection_State.Descriptor instead. +func (PrivateConnection_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{7, 0} +} + +// Json file compression. +type JsonFileFormat_JsonCompression int32 + +const ( + // Unspecified json file compression. + JsonFileFormat_JSON_COMPRESSION_UNSPECIFIED JsonFileFormat_JsonCompression = 0 + // Do not compress JSON file. + JsonFileFormat_NO_COMPRESSION JsonFileFormat_JsonCompression = 1 + // Gzip compression. + JsonFileFormat_GZIP JsonFileFormat_JsonCompression = 2 +) + +// Enum value maps for JsonFileFormat_JsonCompression. +var ( + JsonFileFormat_JsonCompression_name = map[int32]string{ + 0: "JSON_COMPRESSION_UNSPECIFIED", + 1: "NO_COMPRESSION", + 2: "GZIP", + } + JsonFileFormat_JsonCompression_value = map[string]int32{ + "JSON_COMPRESSION_UNSPECIFIED": 0, + "NO_COMPRESSION": 1, + "GZIP": 2, + } +) + +func (x JsonFileFormat_JsonCompression) Enum() *JsonFileFormat_JsonCompression { + p := new(JsonFileFormat_JsonCompression) + *p = x + return p +} + +func (x JsonFileFormat_JsonCompression) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JsonFileFormat_JsonCompression) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[3].Descriptor() +} + +func (JsonFileFormat_JsonCompression) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[3] +} + +func (x JsonFileFormat_JsonCompression) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JsonFileFormat_JsonCompression.Descriptor instead. +func (JsonFileFormat_JsonCompression) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{24, 0} +} + +// Stream state. +type Stream_State int32 + +const ( + // Unspecified stream state. + Stream_STATE_UNSPECIFIED Stream_State = 0 + // The stream has been created. + Stream_CREATED Stream_State = 1 + // The stream is running. + Stream_RUNNING Stream_State = 2 + // The stream is paused. + Stream_PAUSED Stream_State = 3 + // The stream is in maintenance mode. + // + // Updates are rejected on the resource in this state. + Stream_MAINTENANCE Stream_State = 4 + // The stream is experiencing an error that is preventing data from being + // streamed. + Stream_FAILED Stream_State = 5 + // The stream has experienced a terminal failure. + Stream_FAILED_PERMANENTLY Stream_State = 6 + // The stream is starting, but not yet running. + Stream_STARTING Stream_State = 7 + // The Stream is no longer reading new events, but still writing events in + // the buffer. + Stream_DRAINING Stream_State = 8 +) + +// Enum value maps for Stream_State. +var ( + Stream_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATED", + 2: "RUNNING", + 3: "PAUSED", + 4: "MAINTENANCE", + 5: "FAILED", + 6: "FAILED_PERMANENTLY", + 7: "STARTING", + 8: "DRAINING", + } + Stream_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATED": 1, + "RUNNING": 2, + "PAUSED": 3, + "MAINTENANCE": 4, + "FAILED": 5, + "FAILED_PERMANENTLY": 6, + "STARTING": 7, + "DRAINING": 8, + } +) + +func (x Stream_State) Enum() *Stream_State { + p := new(Stream_State) + *p = x + return p +} + +func (x Stream_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Stream_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[4].Descriptor() +} + +func (Stream_State) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[4] +} + +func (x Stream_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Stream_State.Descriptor instead. +func (Stream_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{27, 0} +} + +// Validation execution status. +type Validation_Status int32 + +const ( + // Unspecified status. + Validation_STATUS_UNSPECIFIED Validation_Status = 0 + // Validation did not execute. + Validation_NOT_EXECUTED Validation_Status = 1 + // Validation failed. + Validation_FAILED Validation_Status = 2 + // Validation passed. + Validation_PASSED Validation_Status = 3 +) + +// Enum value maps for Validation_Status. +var ( + Validation_Status_name = map[int32]string{ + 0: "STATUS_UNSPECIFIED", + 1: "NOT_EXECUTED", + 2: "FAILED", + 3: "PASSED", + } + Validation_Status_value = map[string]int32{ + "STATUS_UNSPECIFIED": 0, + "NOT_EXECUTED": 1, + "FAILED": 2, + "PASSED": 3, + } +) + +func (x Validation_Status) Enum() *Validation_Status { + p := new(Validation_Status) + *p = x + return p +} + +func (x Validation_Status) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Validation_Status) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[5].Descriptor() +} + +func (Validation_Status) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[5] +} + +func (x Validation_Status) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Validation_Status.Descriptor instead. +func (Validation_Status) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{30, 0} +} + +// Validation message level. +type ValidationMessage_Level int32 + +const ( + // Unspecified level. + ValidationMessage_LEVEL_UNSPECIFIED ValidationMessage_Level = 0 + // Potentially cause issues with the Stream. + ValidationMessage_WARNING ValidationMessage_Level = 1 + // Definitely cause issues with the Stream. + ValidationMessage_ERROR ValidationMessage_Level = 2 +) + +// Enum value maps for ValidationMessage_Level. +var ( + ValidationMessage_Level_name = map[int32]string{ + 0: "LEVEL_UNSPECIFIED", + 1: "WARNING", + 2: "ERROR", + } + ValidationMessage_Level_value = map[string]int32{ + "LEVEL_UNSPECIFIED": 0, + "WARNING": 1, + "ERROR": 2, + } +) + +func (x ValidationMessage_Level) Enum() *ValidationMessage_Level { + p := new(ValidationMessage_Level) + *p = x + return p +} + +func (x ValidationMessage_Level) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ValidationMessage_Level) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[6].Descriptor() +} + +func (ValidationMessage_Level) Type() protoreflect.EnumType { + return &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes[6] +} + +func (x ValidationMessage_Level) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ValidationMessage_Level.Descriptor instead. +func (ValidationMessage_Level) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{31, 0} +} + +// Oracle database profile. +type OracleProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Hostname for the Oracle connection. + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Port for the Oracle connection, default value is 1521. + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + // Required. Username for the Oracle connection. + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + // Required. Password for the Oracle connection. + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + // Required. Database for the Oracle connection. + DatabaseService string `protobuf:"bytes,5,opt,name=database_service,json=databaseService,proto3" json:"database_service,omitempty"` + // Connection string attributes + ConnectionAttributes map[string]string `protobuf:"bytes,6,rep,name=connection_attributes,json=connectionAttributes,proto3" json:"connection_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *OracleProfile) Reset() { + *x = OracleProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleProfile) ProtoMessage() {} + +func (x *OracleProfile) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OracleProfile.ProtoReflect.Descriptor instead. +func (*OracleProfile) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{0} +} + +func (x *OracleProfile) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *OracleProfile) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *OracleProfile) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *OracleProfile) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *OracleProfile) GetDatabaseService() string { + if x != nil { + return x.DatabaseService + } + return "" +} + +func (x *OracleProfile) GetConnectionAttributes() map[string]string { + if x != nil { + return x.ConnectionAttributes + } + return nil +} + +// MySQL database profile. +type MysqlProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Hostname for the MySQL connection. + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Port for the MySQL connection, default value is 3306. + Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + // Required. Username for the MySQL connection. + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + // Required. Input only. Password for the MySQL connection. + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + // SSL configuration for the MySQL connection. + SslConfig *MysqlSslConfig `protobuf:"bytes,5,opt,name=ssl_config,json=sslConfig,proto3" json:"ssl_config,omitempty"` +} + +func (x *MysqlProfile) Reset() { + *x = MysqlProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlProfile) ProtoMessage() {} + +func (x *MysqlProfile) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlProfile.ProtoReflect.Descriptor instead. +func (*MysqlProfile) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *MysqlProfile) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *MysqlProfile) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *MysqlProfile) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *MysqlProfile) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *MysqlProfile) GetSslConfig() *MysqlSslConfig { + if x != nil { + return x.SslConfig + } + return nil +} + +// Cloud Storage bucket profile. +type GcsProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The full project and resource path for Cloud Storage bucket including the + // name. + BucketName string `protobuf:"bytes,1,opt,name=bucket_name,json=bucketName,proto3" json:"bucket_name,omitempty"` + // The root path inside the Cloud Storage bucket. + RootPath string `protobuf:"bytes,2,opt,name=root_path,json=rootPath,proto3" json:"root_path,omitempty"` +} + +func (x *GcsProfile) Reset() { + *x = GcsProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsProfile) ProtoMessage() {} + +func (x *GcsProfile) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsProfile.ProtoReflect.Descriptor instead. +func (*GcsProfile) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{2} +} + +func (x *GcsProfile) GetBucketName() string { + if x != nil { + return x.BucketName + } + return "" +} + +func (x *GcsProfile) GetRootPath() string { + if x != nil { + return x.RootPath + } + return "" +} + +// No connectivity settings. +type NoConnectivitySettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NoConnectivitySettings) Reset() { + *x = NoConnectivitySettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NoConnectivitySettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NoConnectivitySettings) ProtoMessage() {} + +func (x *NoConnectivitySettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NoConnectivitySettings.ProtoReflect.Descriptor instead. +func (*NoConnectivitySettings) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{3} +} + +// Static IP address connectivity. +type StaticServiceIpConnectivity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StaticServiceIpConnectivity) Reset() { + *x = StaticServiceIpConnectivity{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticServiceIpConnectivity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticServiceIpConnectivity) ProtoMessage() {} + +func (x *StaticServiceIpConnectivity) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticServiceIpConnectivity.ProtoReflect.Descriptor instead. +func (*StaticServiceIpConnectivity) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{4} +} + +// Forward SSH Tunnel connectivity. +type ForwardSshTunnelConnectivity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Hostname for the SSH tunnel. + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + // Required. Username for the SSH tunnel. + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + // Port for the SSH tunnel, default value is 22. + Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` + // Types that are assignable to AuthenticationMethod: + // + // *ForwardSshTunnelConnectivity_Password + // *ForwardSshTunnelConnectivity_PrivateKey + AuthenticationMethod isForwardSshTunnelConnectivity_AuthenticationMethod `protobuf_oneof:"authentication_method"` +} + +func (x *ForwardSshTunnelConnectivity) Reset() { + *x = ForwardSshTunnelConnectivity{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ForwardSshTunnelConnectivity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ForwardSshTunnelConnectivity) ProtoMessage() {} + +func (x *ForwardSshTunnelConnectivity) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ForwardSshTunnelConnectivity.ProtoReflect.Descriptor instead. +func (*ForwardSshTunnelConnectivity) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{5} +} + +func (x *ForwardSshTunnelConnectivity) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *ForwardSshTunnelConnectivity) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *ForwardSshTunnelConnectivity) GetPort() int32 { + if x != nil { + return x.Port + } + return 0 +} + +func (m *ForwardSshTunnelConnectivity) GetAuthenticationMethod() isForwardSshTunnelConnectivity_AuthenticationMethod { + if m != nil { + return m.AuthenticationMethod + } + return nil +} + +func (x *ForwardSshTunnelConnectivity) GetPassword() string { + if x, ok := x.GetAuthenticationMethod().(*ForwardSshTunnelConnectivity_Password); ok { + return x.Password + } + return "" +} + +func (x *ForwardSshTunnelConnectivity) GetPrivateKey() string { + if x, ok := x.GetAuthenticationMethod().(*ForwardSshTunnelConnectivity_PrivateKey); ok { + return x.PrivateKey + } + return "" +} + +type isForwardSshTunnelConnectivity_AuthenticationMethod interface { + isForwardSshTunnelConnectivity_AuthenticationMethod() +} + +type ForwardSshTunnelConnectivity_Password struct { + // Input only. SSH password. + Password string `protobuf:"bytes,100,opt,name=password,proto3,oneof"` +} + +type ForwardSshTunnelConnectivity_PrivateKey struct { + // Input only. SSH private key. + PrivateKey string `protobuf:"bytes,101,opt,name=private_key,json=privateKey,proto3,oneof"` +} + +func (*ForwardSshTunnelConnectivity_Password) isForwardSshTunnelConnectivity_AuthenticationMethod() {} + +func (*ForwardSshTunnelConnectivity_PrivateKey) isForwardSshTunnelConnectivity_AuthenticationMethod() { +} + +// The VPC Peering configuration is used to create VPC peering between +// Datastream and the consumer's VPC. +type VpcPeeringConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. fully qualified name of the VPC Datastream will peer to. + VpcName string `protobuf:"bytes,1,opt,name=vpc_name,json=vpcName,proto3" json:"vpc_name,omitempty"` + // Required. A free subnet for peering. (CIDR of /29) + Subnet string `protobuf:"bytes,2,opt,name=subnet,proto3" json:"subnet,omitempty"` +} + +func (x *VpcPeeringConfig) Reset() { + *x = VpcPeeringConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VpcPeeringConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VpcPeeringConfig) ProtoMessage() {} + +func (x *VpcPeeringConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VpcPeeringConfig.ProtoReflect.Descriptor instead. +func (*VpcPeeringConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{6} +} + +func (x *VpcPeeringConfig) GetVpcName() string { + if x != nil { + return x.VpcName + } + return "" +} + +func (x *VpcPeeringConfig) GetSubnet() string { + if x != nil { + return x.Subnet + } + return "" +} + +// The PrivateConnection resource is used to establish private connectivity +// between Datastream and a customer's network. +type PrivateConnection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The create time of the resource. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The update time of the resource. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Labels. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. Display name. + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Output only. The state of the Private Connection. + State PrivateConnection_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.cloud.datastream.v1alpha1.PrivateConnection_State" json:"state,omitempty"` + // Output only. In case of error, the details of the error in a user-friendly format. + Error *Error `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` + // VPC Peering Config + VpcPeeringConfig *VpcPeeringConfig `protobuf:"bytes,100,opt,name=vpc_peering_config,json=vpcPeeringConfig,proto3" json:"vpc_peering_config,omitempty"` +} + +func (x *PrivateConnection) Reset() { + *x = PrivateConnection{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateConnection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateConnection) ProtoMessage() {} + +func (x *PrivateConnection) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrivateConnection.ProtoReflect.Descriptor instead. +func (*PrivateConnection) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{7} +} + +func (x *PrivateConnection) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PrivateConnection) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *PrivateConnection) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *PrivateConnection) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *PrivateConnection) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *PrivateConnection) GetState() PrivateConnection_State { + if x != nil { + return x.State + } + return PrivateConnection_STATE_UNSPECIFIED +} + +func (x *PrivateConnection) GetError() *Error { + if x != nil { + return x.Error + } + return nil +} + +func (x *PrivateConnection) GetVpcPeeringConfig() *VpcPeeringConfig { + if x != nil { + return x.VpcPeeringConfig + } + return nil +} + +// Private Connectivity +type PrivateConnectivity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrivateConnectionName string `protobuf:"bytes,1,opt,name=private_connection_name,json=privateConnectionName,proto3" json:"private_connection_name,omitempty"` +} + +func (x *PrivateConnectivity) Reset() { + *x = PrivateConnectivity{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateConnectivity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateConnectivity) ProtoMessage() {} + +func (x *PrivateConnectivity) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrivateConnectivity.ProtoReflect.Descriptor instead. +func (*PrivateConnectivity) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{8} +} + +func (x *PrivateConnectivity) GetPrivateConnectionName() string { + if x != nil { + return x.PrivateConnectionName + } + return "" +} + +// The Route resource is the child of the PrivateConnection resource. +// It used to define a route for a PrivateConnection setup. +type Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The create time of the resource. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The update time of the resource. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Labels. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. Display name. + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Destination address for connection + DestinationAddress string `protobuf:"bytes,6,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` + // Destination port for connection + DestinationPort int32 `protobuf:"varint,7,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` +} + +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{9} +} + +func (x *Route) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Route) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Route) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Route) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Route) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Route) GetDestinationAddress() string { + if x != nil { + return x.DestinationAddress + } + return "" +} + +func (x *Route) GetDestinationPort() int32 { + if x != nil { + return x.DestinationPort + } + return 0 +} + +// MySQL SSL configuration information. +type MysqlSslConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Input only. PEM-encoded private key associated with the Client Certificate. + // If this field is used then the 'client_certificate' and the + // 'ca_certificate' fields are mandatory. + ClientKey string `protobuf:"bytes,11,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` + // Output only. Indicates whether the client_key field is set. + ClientKeySet bool `protobuf:"varint,12,opt,name=client_key_set,json=clientKeySet,proto3" json:"client_key_set,omitempty"` + // Input only. PEM-encoded certificate that will be used by the replica to + // authenticate against the source database server. If this field is used + // then the 'client_key' and the 'ca_certificate' fields are mandatory. + ClientCertificate string `protobuf:"bytes,13,opt,name=client_certificate,json=clientCertificate,proto3" json:"client_certificate,omitempty"` + // Output only. Indicates whether the client_certificate field is set. + ClientCertificateSet bool `protobuf:"varint,14,opt,name=client_certificate_set,json=clientCertificateSet,proto3" json:"client_certificate_set,omitempty"` + // Input only. PEM-encoded certificate of the CA that signed the source database + // server's certificate. + CaCertificate string `protobuf:"bytes,15,opt,name=ca_certificate,json=caCertificate,proto3" json:"ca_certificate,omitempty"` + // Output only. Indicates whether the ca_certificate field is set. + CaCertificateSet bool `protobuf:"varint,16,opt,name=ca_certificate_set,json=caCertificateSet,proto3" json:"ca_certificate_set,omitempty"` +} + +func (x *MysqlSslConfig) Reset() { + *x = MysqlSslConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlSslConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlSslConfig) ProtoMessage() {} + +func (x *MysqlSslConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlSslConfig.ProtoReflect.Descriptor instead. +func (*MysqlSslConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{10} +} + +func (x *MysqlSslConfig) GetClientKey() string { + if x != nil { + return x.ClientKey + } + return "" +} + +func (x *MysqlSslConfig) GetClientKeySet() bool { + if x != nil { + return x.ClientKeySet + } + return false +} + +func (x *MysqlSslConfig) GetClientCertificate() string { + if x != nil { + return x.ClientCertificate + } + return "" +} + +func (x *MysqlSslConfig) GetClientCertificateSet() bool { + if x != nil { + return x.ClientCertificateSet + } + return false +} + +func (x *MysqlSslConfig) GetCaCertificate() string { + if x != nil { + return x.CaCertificate + } + return "" +} + +func (x *MysqlSslConfig) GetCaCertificateSet() bool { + if x != nil { + return x.CaCertificateSet + } + return false +} + +type ConnectionProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The create time of the resource. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The update time of the resource. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Labels. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. Display name. + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Connection configuration for the ConnectionProfile. + // + // Types that are assignable to Profile: + // + // *ConnectionProfile_OracleProfile + // *ConnectionProfile_GcsProfile + // *ConnectionProfile_MysqlProfile + Profile isConnectionProfile_Profile `protobuf_oneof:"profile"` + // Connectivity options used to establish a connection to the profile. + // + // Types that are assignable to Connectivity: + // + // *ConnectionProfile_NoConnectivity + // *ConnectionProfile_StaticServiceIpConnectivity + // *ConnectionProfile_ForwardSshConnectivity + // *ConnectionProfile_PrivateConnectivity + Connectivity isConnectionProfile_Connectivity `protobuf_oneof:"connectivity"` +} + +func (x *ConnectionProfile) Reset() { + *x = ConnectionProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectionProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionProfile) ProtoMessage() {} + +func (x *ConnectionProfile) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectionProfile.ProtoReflect.Descriptor instead. +func (*ConnectionProfile) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{11} +} + +func (x *ConnectionProfile) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ConnectionProfile) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ConnectionProfile) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *ConnectionProfile) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *ConnectionProfile) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (m *ConnectionProfile) GetProfile() isConnectionProfile_Profile { + if m != nil { + return m.Profile + } + return nil +} + +func (x *ConnectionProfile) GetOracleProfile() *OracleProfile { + if x, ok := x.GetProfile().(*ConnectionProfile_OracleProfile); ok { + return x.OracleProfile + } + return nil +} + +func (x *ConnectionProfile) GetGcsProfile() *GcsProfile { + if x, ok := x.GetProfile().(*ConnectionProfile_GcsProfile); ok { + return x.GcsProfile + } + return nil +} + +func (x *ConnectionProfile) GetMysqlProfile() *MysqlProfile { + if x, ok := x.GetProfile().(*ConnectionProfile_MysqlProfile); ok { + return x.MysqlProfile + } + return nil +} + +func (m *ConnectionProfile) GetConnectivity() isConnectionProfile_Connectivity { + if m != nil { + return m.Connectivity + } + return nil +} + +func (x *ConnectionProfile) GetNoConnectivity() *NoConnectivitySettings { + if x, ok := x.GetConnectivity().(*ConnectionProfile_NoConnectivity); ok { + return x.NoConnectivity + } + return nil +} + +func (x *ConnectionProfile) GetStaticServiceIpConnectivity() *StaticServiceIpConnectivity { + if x, ok := x.GetConnectivity().(*ConnectionProfile_StaticServiceIpConnectivity); ok { + return x.StaticServiceIpConnectivity + } + return nil +} + +func (x *ConnectionProfile) GetForwardSshConnectivity() *ForwardSshTunnelConnectivity { + if x, ok := x.GetConnectivity().(*ConnectionProfile_ForwardSshConnectivity); ok { + return x.ForwardSshConnectivity + } + return nil +} + +func (x *ConnectionProfile) GetPrivateConnectivity() *PrivateConnectivity { + if x, ok := x.GetConnectivity().(*ConnectionProfile_PrivateConnectivity); ok { + return x.PrivateConnectivity + } + return nil +} + +type isConnectionProfile_Profile interface { + isConnectionProfile_Profile() +} + +type ConnectionProfile_OracleProfile struct { + // Oracle ConnectionProfile configuration. + OracleProfile *OracleProfile `protobuf:"bytes,100,opt,name=oracle_profile,json=oracleProfile,proto3,oneof"` +} + +type ConnectionProfile_GcsProfile struct { + // Cloud Storage ConnectionProfile configuration. + GcsProfile *GcsProfile `protobuf:"bytes,101,opt,name=gcs_profile,json=gcsProfile,proto3,oneof"` +} + +type ConnectionProfile_MysqlProfile struct { + // MySQL ConnectionProfile configuration. + MysqlProfile *MysqlProfile `protobuf:"bytes,102,opt,name=mysql_profile,json=mysqlProfile,proto3,oneof"` +} + +func (*ConnectionProfile_OracleProfile) isConnectionProfile_Profile() {} + +func (*ConnectionProfile_GcsProfile) isConnectionProfile_Profile() {} + +func (*ConnectionProfile_MysqlProfile) isConnectionProfile_Profile() {} + +type isConnectionProfile_Connectivity interface { + isConnectionProfile_Connectivity() +} + +type ConnectionProfile_NoConnectivity struct { + // No connectivity option chosen. + NoConnectivity *NoConnectivitySettings `protobuf:"bytes,200,opt,name=no_connectivity,json=noConnectivity,proto3,oneof"` +} + +type ConnectionProfile_StaticServiceIpConnectivity struct { + // Static Service IP connectivity. + StaticServiceIpConnectivity *StaticServiceIpConnectivity `protobuf:"bytes,201,opt,name=static_service_ip_connectivity,json=staticServiceIpConnectivity,proto3,oneof"` +} + +type ConnectionProfile_ForwardSshConnectivity struct { + // Forward SSH tunnel connectivity. + ForwardSshConnectivity *ForwardSshTunnelConnectivity `protobuf:"bytes,202,opt,name=forward_ssh_connectivity,json=forwardSshConnectivity,proto3,oneof"` +} + +type ConnectionProfile_PrivateConnectivity struct { + // Private connectivity. + PrivateConnectivity *PrivateConnectivity `protobuf:"bytes,203,opt,name=private_connectivity,json=privateConnectivity,proto3,oneof"` +} + +func (*ConnectionProfile_NoConnectivity) isConnectionProfile_Connectivity() {} + +func (*ConnectionProfile_StaticServiceIpConnectivity) isConnectionProfile_Connectivity() {} + +func (*ConnectionProfile_ForwardSshConnectivity) isConnectionProfile_Connectivity() {} + +func (*ConnectionProfile_PrivateConnectivity) isConnectionProfile_Connectivity() {} + +// Oracle Column. +type OracleColumn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Column name. + ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` + // The Oracle data type. + DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + // Column length. + Length int32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` + // Column precision. + Precision int32 `protobuf:"varint,4,opt,name=precision,proto3" json:"precision,omitempty"` + // Column scale. + Scale int32 `protobuf:"varint,5,opt,name=scale,proto3" json:"scale,omitempty"` + // Column encoding. + Encoding string `protobuf:"bytes,6,opt,name=encoding,proto3" json:"encoding,omitempty"` + // Whether or not the column represents a primary key. + PrimaryKey bool `protobuf:"varint,7,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` + // Whether or not the column can accept a null value. + Nullable bool `protobuf:"varint,8,opt,name=nullable,proto3" json:"nullable,omitempty"` + // The ordinal position of the column in the table. + OrdinalPosition int32 `protobuf:"varint,9,opt,name=ordinal_position,json=ordinalPosition,proto3" json:"ordinal_position,omitempty"` +} + +func (x *OracleColumn) Reset() { + *x = OracleColumn{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleColumn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleColumn) ProtoMessage() {} + +func (x *OracleColumn) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OracleColumn.ProtoReflect.Descriptor instead. +func (*OracleColumn) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{12} +} + +func (x *OracleColumn) GetColumnName() string { + if x != nil { + return x.ColumnName + } + return "" +} + +func (x *OracleColumn) GetDataType() string { + if x != nil { + return x.DataType + } + return "" +} + +func (x *OracleColumn) GetLength() int32 { + if x != nil { + return x.Length + } + return 0 +} + +func (x *OracleColumn) GetPrecision() int32 { + if x != nil { + return x.Precision + } + return 0 +} + +func (x *OracleColumn) GetScale() int32 { + if x != nil { + return x.Scale + } + return 0 +} + +func (x *OracleColumn) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *OracleColumn) GetPrimaryKey() bool { + if x != nil { + return x.PrimaryKey + } + return false +} + +func (x *OracleColumn) GetNullable() bool { + if x != nil { + return x.Nullable + } + return false +} + +func (x *OracleColumn) GetOrdinalPosition() int32 { + if x != nil { + return x.OrdinalPosition + } + return 0 +} + +// Oracle table. +type OracleTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Table name. + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + // Oracle columns in the schema. + // When unspecified as part of inclue/exclude lists, includes/excludes + // everything. + OracleColumns []*OracleColumn `protobuf:"bytes,2,rep,name=oracle_columns,json=oracleColumns,proto3" json:"oracle_columns,omitempty"` +} + +func (x *OracleTable) Reset() { + *x = OracleTable{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleTable) ProtoMessage() {} + +func (x *OracleTable) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OracleTable.ProtoReflect.Descriptor instead. +func (*OracleTable) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{13} +} + +func (x *OracleTable) GetTableName() string { + if x != nil { + return x.TableName + } + return "" +} + +func (x *OracleTable) GetOracleColumns() []*OracleColumn { + if x != nil { + return x.OracleColumns + } + return nil +} + +// Oracle schema. +type OracleSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Schema name. + SchemaName string `protobuf:"bytes,1,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` + // Tables in the schema. + OracleTables []*OracleTable `protobuf:"bytes,2,rep,name=oracle_tables,json=oracleTables,proto3" json:"oracle_tables,omitempty"` +} + +func (x *OracleSchema) Reset() { + *x = OracleSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleSchema) ProtoMessage() {} + +func (x *OracleSchema) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OracleSchema.ProtoReflect.Descriptor instead. +func (*OracleSchema) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{14} +} + +func (x *OracleSchema) GetSchemaName() string { + if x != nil { + return x.SchemaName + } + return "" +} + +func (x *OracleSchema) GetOracleTables() []*OracleTable { + if x != nil { + return x.OracleTables + } + return nil +} + +// Oracle database structure. +type OracleRdbms struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Oracle schemas/databases in the database server. + OracleSchemas []*OracleSchema `protobuf:"bytes,1,rep,name=oracle_schemas,json=oracleSchemas,proto3" json:"oracle_schemas,omitempty"` +} + +func (x *OracleRdbms) Reset() { + *x = OracleRdbms{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleRdbms) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleRdbms) ProtoMessage() {} + +func (x *OracleRdbms) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OracleRdbms.ProtoReflect.Descriptor instead. +func (*OracleRdbms) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{15} +} + +func (x *OracleRdbms) GetOracleSchemas() []*OracleSchema { + if x != nil { + return x.OracleSchemas + } + return nil +} + +// Oracle data source configuration +type OracleSourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Oracle objects to include in the stream. + Allowlist *OracleRdbms `protobuf:"bytes,1,opt,name=allowlist,proto3" json:"allowlist,omitempty"` + // Oracle objects to exclude from the stream. + Rejectlist *OracleRdbms `protobuf:"bytes,2,opt,name=rejectlist,proto3" json:"rejectlist,omitempty"` +} + +func (x *OracleSourceConfig) Reset() { + *x = OracleSourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OracleSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OracleSourceConfig) ProtoMessage() {} + +func (x *OracleSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OracleSourceConfig.ProtoReflect.Descriptor instead. +func (*OracleSourceConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{16} +} + +func (x *OracleSourceConfig) GetAllowlist() *OracleRdbms { + if x != nil { + return x.Allowlist + } + return nil +} + +func (x *OracleSourceConfig) GetRejectlist() *OracleRdbms { + if x != nil { + return x.Rejectlist + } + return nil +} + +// MySQL Column. +type MysqlColumn struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Column name. + ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` + // The MySQL data type. Full data types list can be found here: + // https://dev.mysql.com/doc/refman/8.0/en/data-types.html + DataType string `protobuf:"bytes,2,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` + // Column length. + Length int32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` + // Column collation. + Collation string `protobuf:"bytes,4,opt,name=collation,proto3" json:"collation,omitempty"` + // Whether or not the column represents a primary key. + PrimaryKey bool `protobuf:"varint,5,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` + // Whether or not the column can accept a null value. + Nullable bool `protobuf:"varint,6,opt,name=nullable,proto3" json:"nullable,omitempty"` + // The ordinal position of the column in the table. + OrdinalPosition int32 `protobuf:"varint,7,opt,name=ordinal_position,json=ordinalPosition,proto3" json:"ordinal_position,omitempty"` +} + +func (x *MysqlColumn) Reset() { + *x = MysqlColumn{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlColumn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlColumn) ProtoMessage() {} + +func (x *MysqlColumn) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlColumn.ProtoReflect.Descriptor instead. +func (*MysqlColumn) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{17} +} + +func (x *MysqlColumn) GetColumnName() string { + if x != nil { + return x.ColumnName + } + return "" +} + +func (x *MysqlColumn) GetDataType() string { + if x != nil { + return x.DataType + } + return "" +} + +func (x *MysqlColumn) GetLength() int32 { + if x != nil { + return x.Length + } + return 0 +} + +func (x *MysqlColumn) GetCollation() string { + if x != nil { + return x.Collation + } + return "" +} + +func (x *MysqlColumn) GetPrimaryKey() bool { + if x != nil { + return x.PrimaryKey + } + return false +} + +func (x *MysqlColumn) GetNullable() bool { + if x != nil { + return x.Nullable + } + return false +} + +func (x *MysqlColumn) GetOrdinalPosition() int32 { + if x != nil { + return x.OrdinalPosition + } + return 0 +} + +// MySQL table. +type MysqlTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Table name. + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + // MySQL columns in the database. + // When unspecified as part of include/exclude lists, includes/excludes + // everything. + MysqlColumns []*MysqlColumn `protobuf:"bytes,2,rep,name=mysql_columns,json=mysqlColumns,proto3" json:"mysql_columns,omitempty"` +} + +func (x *MysqlTable) Reset() { + *x = MysqlTable{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlTable) ProtoMessage() {} + +func (x *MysqlTable) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlTable.ProtoReflect.Descriptor instead. +func (*MysqlTable) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{18} +} + +func (x *MysqlTable) GetTableName() string { + if x != nil { + return x.TableName + } + return "" +} + +func (x *MysqlTable) GetMysqlColumns() []*MysqlColumn { + if x != nil { + return x.MysqlColumns + } + return nil +} + +// MySQL database. +type MysqlDatabase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Database name. + DatabaseName string `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"` + // Tables in the database. + MysqlTables []*MysqlTable `protobuf:"bytes,2,rep,name=mysql_tables,json=mysqlTables,proto3" json:"mysql_tables,omitempty"` +} + +func (x *MysqlDatabase) Reset() { + *x = MysqlDatabase{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlDatabase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlDatabase) ProtoMessage() {} + +func (x *MysqlDatabase) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlDatabase.ProtoReflect.Descriptor instead. +func (*MysqlDatabase) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{19} +} + +func (x *MysqlDatabase) GetDatabaseName() string { + if x != nil { + return x.DatabaseName + } + return "" +} + +func (x *MysqlDatabase) GetMysqlTables() []*MysqlTable { + if x != nil { + return x.MysqlTables + } + return nil +} + +// MySQL database structure +type MysqlRdbms struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mysql databases on the server + MysqlDatabases []*MysqlDatabase `protobuf:"bytes,1,rep,name=mysql_databases,json=mysqlDatabases,proto3" json:"mysql_databases,omitempty"` +} + +func (x *MysqlRdbms) Reset() { + *x = MysqlRdbms{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlRdbms) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlRdbms) ProtoMessage() {} + +func (x *MysqlRdbms) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlRdbms.ProtoReflect.Descriptor instead. +func (*MysqlRdbms) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{20} +} + +func (x *MysqlRdbms) GetMysqlDatabases() []*MysqlDatabase { + if x != nil { + return x.MysqlDatabases + } + return nil +} + +// MySQL source configuration +type MysqlSourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MySQL objects to retrieve from the source. + Allowlist *MysqlRdbms `protobuf:"bytes,1,opt,name=allowlist,proto3" json:"allowlist,omitempty"` + // MySQL objects to exclude from the stream. + Rejectlist *MysqlRdbms `protobuf:"bytes,2,opt,name=rejectlist,proto3" json:"rejectlist,omitempty"` +} + +func (x *MysqlSourceConfig) Reset() { + *x = MysqlSourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MysqlSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MysqlSourceConfig) ProtoMessage() {} + +func (x *MysqlSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MysqlSourceConfig.ProtoReflect.Descriptor instead. +func (*MysqlSourceConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{21} +} + +func (x *MysqlSourceConfig) GetAllowlist() *MysqlRdbms { + if x != nil { + return x.Allowlist + } + return nil +} + +func (x *MysqlSourceConfig) GetRejectlist() *MysqlRdbms { + if x != nil { + return x.Rejectlist + } + return nil +} + +// The configuration of the stream source. +type SourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Source connection profile identifier. + SourceConnectionProfileName string `protobuf:"bytes,1,opt,name=source_connection_profile_name,json=sourceConnectionProfileName,proto3" json:"source_connection_profile_name,omitempty"` + // Stream configuration that is specific to the data source type. + // + // Types that are assignable to SourceStreamConfig: + // + // *SourceConfig_OracleSourceConfig + // *SourceConfig_MysqlSourceConfig + SourceStreamConfig isSourceConfig_SourceStreamConfig `protobuf_oneof:"source_stream_config"` +} + +func (x *SourceConfig) Reset() { + *x = SourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceConfig) ProtoMessage() {} + +func (x *SourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceConfig.ProtoReflect.Descriptor instead. +func (*SourceConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{22} +} + +func (x *SourceConfig) GetSourceConnectionProfileName() string { + if x != nil { + return x.SourceConnectionProfileName + } + return "" +} + +func (m *SourceConfig) GetSourceStreamConfig() isSourceConfig_SourceStreamConfig { + if m != nil { + return m.SourceStreamConfig + } + return nil +} + +func (x *SourceConfig) GetOracleSourceConfig() *OracleSourceConfig { + if x, ok := x.GetSourceStreamConfig().(*SourceConfig_OracleSourceConfig); ok { + return x.OracleSourceConfig + } + return nil +} + +func (x *SourceConfig) GetMysqlSourceConfig() *MysqlSourceConfig { + if x, ok := x.GetSourceStreamConfig().(*SourceConfig_MysqlSourceConfig); ok { + return x.MysqlSourceConfig + } + return nil +} + +type isSourceConfig_SourceStreamConfig interface { + isSourceConfig_SourceStreamConfig() +} + +type SourceConfig_OracleSourceConfig struct { + // Oracle data source configuration + OracleSourceConfig *OracleSourceConfig `protobuf:"bytes,100,opt,name=oracle_source_config,json=oracleSourceConfig,proto3,oneof"` +} + +type SourceConfig_MysqlSourceConfig struct { + // MySQL data source configuration + MysqlSourceConfig *MysqlSourceConfig `protobuf:"bytes,101,opt,name=mysql_source_config,json=mysqlSourceConfig,proto3,oneof"` +} + +func (*SourceConfig_OracleSourceConfig) isSourceConfig_SourceStreamConfig() {} + +func (*SourceConfig_MysqlSourceConfig) isSourceConfig_SourceStreamConfig() {} + +// AVRO file format configuration. +type AvroFileFormat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AvroFileFormat) Reset() { + *x = AvroFileFormat{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AvroFileFormat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AvroFileFormat) ProtoMessage() {} + +func (x *AvroFileFormat) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AvroFileFormat.ProtoReflect.Descriptor instead. +func (*AvroFileFormat) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{23} +} + +// JSON file format configuration. +type JsonFileFormat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The schema file format along JSON data files. + SchemaFileFormat SchemaFileFormat `protobuf:"varint,1,opt,name=schema_file_format,json=schemaFileFormat,proto3,enum=google.cloud.datastream.v1alpha1.SchemaFileFormat" json:"schema_file_format,omitempty"` + // Compression of the loaded JSON file. + Compression JsonFileFormat_JsonCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=google.cloud.datastream.v1alpha1.JsonFileFormat_JsonCompression" json:"compression,omitempty"` +} + +func (x *JsonFileFormat) Reset() { + *x = JsonFileFormat{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JsonFileFormat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JsonFileFormat) ProtoMessage() {} + +func (x *JsonFileFormat) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JsonFileFormat.ProtoReflect.Descriptor instead. +func (*JsonFileFormat) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{24} +} + +func (x *JsonFileFormat) GetSchemaFileFormat() SchemaFileFormat { + if x != nil { + return x.SchemaFileFormat + } + return SchemaFileFormat_SCHEMA_FILE_FORMAT_UNSPECIFIED +} + +func (x *JsonFileFormat) GetCompression() JsonFileFormat_JsonCompression { + if x != nil { + return x.Compression + } + return JsonFileFormat_JSON_COMPRESSION_UNSPECIFIED +} + +// Google Cloud Storage destination configuration +type GcsDestinationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path inside the Cloud Storage bucket to write data to. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // File format that data should be written in. + // Deprecated field - use file_format instead. + // + // Deprecated: Do not use. + GcsFileFormat GcsFileFormat `protobuf:"varint,2,opt,name=gcs_file_format,json=gcsFileFormat,proto3,enum=google.cloud.datastream.v1alpha1.GcsFileFormat" json:"gcs_file_format,omitempty"` + // The maximum file size to be saved in the bucket. + FileRotationMb int32 `protobuf:"varint,3,opt,name=file_rotation_mb,json=fileRotationMb,proto3" json:"file_rotation_mb,omitempty"` + // The maximum duration for which new events are added before a file is + // closed and a new file is created. + FileRotationInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=file_rotation_interval,json=fileRotationInterval,proto3" json:"file_rotation_interval,omitempty"` + // File Format that the data should be written in. + // + // Types that are assignable to FileFormat: + // + // *GcsDestinationConfig_AvroFileFormat + // *GcsDestinationConfig_JsonFileFormat + FileFormat isGcsDestinationConfig_FileFormat `protobuf_oneof:"file_format"` +} + +func (x *GcsDestinationConfig) Reset() { + *x = GcsDestinationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcsDestinationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcsDestinationConfig) ProtoMessage() {} + +func (x *GcsDestinationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcsDestinationConfig.ProtoReflect.Descriptor instead. +func (*GcsDestinationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{25} +} + +func (x *GcsDestinationConfig) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Deprecated: Do not use. +func (x *GcsDestinationConfig) GetGcsFileFormat() GcsFileFormat { + if x != nil { + return x.GcsFileFormat + } + return GcsFileFormat_GCS_FILE_FORMAT_UNSPECIFIED +} + +func (x *GcsDestinationConfig) GetFileRotationMb() int32 { + if x != nil { + return x.FileRotationMb + } + return 0 +} + +func (x *GcsDestinationConfig) GetFileRotationInterval() *durationpb.Duration { + if x != nil { + return x.FileRotationInterval + } + return nil +} + +func (m *GcsDestinationConfig) GetFileFormat() isGcsDestinationConfig_FileFormat { + if m != nil { + return m.FileFormat + } + return nil +} + +func (x *GcsDestinationConfig) GetAvroFileFormat() *AvroFileFormat { + if x, ok := x.GetFileFormat().(*GcsDestinationConfig_AvroFileFormat); ok { + return x.AvroFileFormat + } + return nil +} + +func (x *GcsDestinationConfig) GetJsonFileFormat() *JsonFileFormat { + if x, ok := x.GetFileFormat().(*GcsDestinationConfig_JsonFileFormat); ok { + return x.JsonFileFormat + } + return nil +} + +type isGcsDestinationConfig_FileFormat interface { + isGcsDestinationConfig_FileFormat() +} + +type GcsDestinationConfig_AvroFileFormat struct { + // AVRO file format configuration. + AvroFileFormat *AvroFileFormat `protobuf:"bytes,100,opt,name=avro_file_format,json=avroFileFormat,proto3,oneof"` +} + +type GcsDestinationConfig_JsonFileFormat struct { + // JSON file format configuration. + JsonFileFormat *JsonFileFormat `protobuf:"bytes,101,opt,name=json_file_format,json=jsonFileFormat,proto3,oneof"` +} + +func (*GcsDestinationConfig_AvroFileFormat) isGcsDestinationConfig_FileFormat() {} + +func (*GcsDestinationConfig_JsonFileFormat) isGcsDestinationConfig_FileFormat() {} + +// The configuration of the stream destination. +type DestinationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Destination connection profile identifier. + DestinationConnectionProfileName string `protobuf:"bytes,1,opt,name=destination_connection_profile_name,json=destinationConnectionProfileName,proto3" json:"destination_connection_profile_name,omitempty"` + // Stream configuration that is specific to the data destination type. + // + // Types that are assignable to DestinationStreamConfig: + // + // *DestinationConfig_GcsDestinationConfig + DestinationStreamConfig isDestinationConfig_DestinationStreamConfig `protobuf_oneof:"destination_stream_config"` +} + +func (x *DestinationConfig) Reset() { + *x = DestinationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationConfig) ProtoMessage() {} + +func (x *DestinationConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationConfig.ProtoReflect.Descriptor instead. +func (*DestinationConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{26} +} + +func (x *DestinationConfig) GetDestinationConnectionProfileName() string { + if x != nil { + return x.DestinationConnectionProfileName + } + return "" +} + +func (m *DestinationConfig) GetDestinationStreamConfig() isDestinationConfig_DestinationStreamConfig { + if m != nil { + return m.DestinationStreamConfig + } + return nil +} + +func (x *DestinationConfig) GetGcsDestinationConfig() *GcsDestinationConfig { + if x, ok := x.GetDestinationStreamConfig().(*DestinationConfig_GcsDestinationConfig); ok { + return x.GcsDestinationConfig + } + return nil +} + +type isDestinationConfig_DestinationStreamConfig interface { + isDestinationConfig_DestinationStreamConfig() +} + +type DestinationConfig_GcsDestinationConfig struct { + GcsDestinationConfig *GcsDestinationConfig `protobuf:"bytes,100,opt,name=gcs_destination_config,json=gcsDestinationConfig,proto3,oneof"` +} + +func (*DestinationConfig_GcsDestinationConfig) isDestinationConfig_DestinationStreamConfig() {} + +type Stream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The stream's name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The creation time of the stream. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The last update time of the stream. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Labels. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. Display name. + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Source connection profile configuration. + SourceConfig *SourceConfig `protobuf:"bytes,6,opt,name=source_config,json=sourceConfig,proto3" json:"source_config,omitempty"` + // Required. Destination connection profile configuration. + DestinationConfig *DestinationConfig `protobuf:"bytes,7,opt,name=destination_config,json=destinationConfig,proto3" json:"destination_config,omitempty"` + // The state of the stream. + State Stream_State `protobuf:"varint,8,opt,name=state,proto3,enum=google.cloud.datastream.v1alpha1.Stream_State" json:"state,omitempty"` + // Stream backfill strategy. + // + // Types that are assignable to BackfillStrategy: + // + // *Stream_BackfillAll + // *Stream_BackfillNone + BackfillStrategy isStream_BackfillStrategy `protobuf_oneof:"backfill_strategy"` + // Output only. Errors on the Stream. + Errors []*Error `protobuf:"bytes,9,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *Stream) Reset() { + *x = Stream{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Stream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stream) ProtoMessage() {} + +func (x *Stream) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stream.ProtoReflect.Descriptor instead. +func (*Stream) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{27} +} + +func (x *Stream) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Stream) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Stream) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Stream) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Stream) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Stream) GetSourceConfig() *SourceConfig { + if x != nil { + return x.SourceConfig + } + return nil +} + +func (x *Stream) GetDestinationConfig() *DestinationConfig { + if x != nil { + return x.DestinationConfig + } + return nil +} + +func (x *Stream) GetState() Stream_State { + if x != nil { + return x.State + } + return Stream_STATE_UNSPECIFIED +} + +func (m *Stream) GetBackfillStrategy() isStream_BackfillStrategy { + if m != nil { + return m.BackfillStrategy + } + return nil +} + +func (x *Stream) GetBackfillAll() *Stream_BackfillAllStrategy { + if x, ok := x.GetBackfillStrategy().(*Stream_BackfillAll); ok { + return x.BackfillAll + } + return nil +} + +func (x *Stream) GetBackfillNone() *Stream_BackfillNoneStrategy { + if x, ok := x.GetBackfillStrategy().(*Stream_BackfillNone); ok { + return x.BackfillNone + } + return nil +} + +func (x *Stream) GetErrors() []*Error { + if x != nil { + return x.Errors + } + return nil +} + +type isStream_BackfillStrategy interface { + isStream_BackfillStrategy() +} + +type Stream_BackfillAll struct { + // Automatically backfill objects included in the stream source + // configuration. Specific objects can be excluded. + BackfillAll *Stream_BackfillAllStrategy `protobuf:"bytes,101,opt,name=backfill_all,json=backfillAll,proto3,oneof"` +} + +type Stream_BackfillNone struct { + // Do not automatically backfill any objects. + BackfillNone *Stream_BackfillNoneStrategy `protobuf:"bytes,102,opt,name=backfill_none,json=backfillNone,proto3,oneof"` +} + +func (*Stream_BackfillAll) isStream_BackfillStrategy() {} + +func (*Stream_BackfillNone) isStream_BackfillStrategy() {} + +// Represent a user-facing Error. +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A title that explains the reason for the error. + Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` + // A unique identifier for this specific error, + // allowing it to be traced throughout the system in logs and API responses. + ErrorUuid string `protobuf:"bytes,2,opt,name=error_uuid,json=errorUuid,proto3" json:"error_uuid,omitempty"` + // A message containing more information about the error that occurred. + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // The time when the error occurred. + ErrorTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=error_time,json=errorTime,proto3" json:"error_time,omitempty"` + // Additional information about the error. + Details map[string]string `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Error) Reset() { + *x = Error{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{28} +} + +func (x *Error) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *Error) GetErrorUuid() string { + if x != nil { + return x.ErrorUuid + } + return "" +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Error) GetErrorTime() *timestamppb.Timestamp { + if x != nil { + return x.ErrorTime + } + return nil +} + +func (x *Error) GetDetails() map[string]string { + if x != nil { + return x.Details + } + return nil +} + +// Contains the current validation results. +type ValidationResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of validations (includes both executed as well as not executed + // validations). + Validations []*Validation `protobuf:"bytes,1,rep,name=validations,proto3" json:"validations,omitempty"` +} + +func (x *ValidationResult) Reset() { + *x = ValidationResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidationResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidationResult) ProtoMessage() {} + +func (x *ValidationResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead. +func (*ValidationResult) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{29} +} + +func (x *ValidationResult) GetValidations() []*Validation { + if x != nil { + return x.Validations + } + return nil +} + +type Validation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A short description of the validation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // Validation execution status. + Status Validation_Status `protobuf:"varint,2,opt,name=status,proto3,enum=google.cloud.datastream.v1alpha1.Validation_Status" json:"status,omitempty"` + // Messages reflecting the validation results. + Message []*ValidationMessage `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"` + // A custom code identifying this validation. + Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *Validation) Reset() { + *x = Validation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Validation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Validation) ProtoMessage() {} + +func (x *Validation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Validation.ProtoReflect.Descriptor instead. +func (*Validation) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{30} +} + +func (x *Validation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Validation) GetStatus() Validation_Status { + if x != nil { + return x.Status + } + return Validation_STATUS_UNSPECIFIED +} + +func (x *Validation) GetMessage() []*ValidationMessage { + if x != nil { + return x.Message + } + return nil +} + +func (x *Validation) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// Represent user-facing validation result message. +type ValidationMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The result of the validation. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Message severity level (warning or error). + Level ValidationMessage_Level `protobuf:"varint,2,opt,name=level,proto3,enum=google.cloud.datastream.v1alpha1.ValidationMessage_Level" json:"level,omitempty"` + // Additional metadata related to the result. + Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // A custom code identifying this specific message. + Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *ValidationMessage) Reset() { + *x = ValidationMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidationMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidationMessage) ProtoMessage() {} + +func (x *ValidationMessage) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidationMessage.ProtoReflect.Descriptor instead. +func (*ValidationMessage) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{31} +} + +func (x *ValidationMessage) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ValidationMessage) GetLevel() ValidationMessage_Level { + if x != nil { + return x.Level + } + return ValidationMessage_LEVEL_UNSPECIFIED +} + +func (x *ValidationMessage) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ValidationMessage) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// Backfill strategy to automatically backfill the Stream's objects. +// Specific objects can be excluded. +type Stream_BackfillAllStrategy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of objects to exclude. + // + // Types that are assignable to ExcludedObjects: + // + // *Stream_BackfillAllStrategy_OracleExcludedObjects + // *Stream_BackfillAllStrategy_MysqlExcludedObjects + ExcludedObjects isStream_BackfillAllStrategy_ExcludedObjects `protobuf_oneof:"excluded_objects"` +} + +func (x *Stream_BackfillAllStrategy) Reset() { + *x = Stream_BackfillAllStrategy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Stream_BackfillAllStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stream_BackfillAllStrategy) ProtoMessage() {} + +func (x *Stream_BackfillAllStrategy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stream_BackfillAllStrategy.ProtoReflect.Descriptor instead. +func (*Stream_BackfillAllStrategy) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{27, 0} +} + +func (m *Stream_BackfillAllStrategy) GetExcludedObjects() isStream_BackfillAllStrategy_ExcludedObjects { + if m != nil { + return m.ExcludedObjects + } + return nil +} + +func (x *Stream_BackfillAllStrategy) GetOracleExcludedObjects() *OracleRdbms { + if x, ok := x.GetExcludedObjects().(*Stream_BackfillAllStrategy_OracleExcludedObjects); ok { + return x.OracleExcludedObjects + } + return nil +} + +func (x *Stream_BackfillAllStrategy) GetMysqlExcludedObjects() *MysqlRdbms { + if x, ok := x.GetExcludedObjects().(*Stream_BackfillAllStrategy_MysqlExcludedObjects); ok { + return x.MysqlExcludedObjects + } + return nil +} + +type isStream_BackfillAllStrategy_ExcludedObjects interface { + isStream_BackfillAllStrategy_ExcludedObjects() +} + +type Stream_BackfillAllStrategy_OracleExcludedObjects struct { + // Oracle data source objects to avoid backfilling. + OracleExcludedObjects *OracleRdbms `protobuf:"bytes,1,opt,name=oracle_excluded_objects,json=oracleExcludedObjects,proto3,oneof"` +} + +type Stream_BackfillAllStrategy_MysqlExcludedObjects struct { + // MySQL data source objects to avoid backfilling. + MysqlExcludedObjects *MysqlRdbms `protobuf:"bytes,2,opt,name=mysql_excluded_objects,json=mysqlExcludedObjects,proto3,oneof"` +} + +func (*Stream_BackfillAllStrategy_OracleExcludedObjects) isStream_BackfillAllStrategy_ExcludedObjects() { +} + +func (*Stream_BackfillAllStrategy_MysqlExcludedObjects) isStream_BackfillAllStrategy_ExcludedObjects() { +} + +// Backfill strategy to disable automatic backfill for the Stream's objects. +type Stream_BackfillNoneStrategy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Stream_BackfillNoneStrategy) Reset() { + *x = Stream_BackfillNoneStrategy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Stream_BackfillNoneStrategy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stream_BackfillNoneStrategy) ProtoMessage() {} + +func (x *Stream_BackfillNoneStrategy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stream_BackfillNoneStrategy.ProtoReflect.Descriptor instead. +func (*Stream_BackfillNoneStrategy) Descriptor() ([]byte, []int) { + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP(), []int{27, 1} +} + +var File_google_cloud_datastream_v1alpha1_datastream_resources_proto protoreflect.FileDescriptor + +var file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, + 0x0d, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1f, + 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x47, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd9, + 0x01, 0x0a, 0x0c, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x1f, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x04, 0x52, + 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x4f, 0x0a, 0x0a, 0x73, 0x73, 0x6c, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x73, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x09, 0x73, 0x73, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x4f, 0x0a, 0x0a, 0x47, 0x63, + 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0a, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x18, 0x0a, 0x16, 0x4e, + 0x6f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x79, 0x22, 0xd8, 0x01, 0x0a, 0x1c, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x53, 0x73, 0x68, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x68, 0x6f, + 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x26, + 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x17, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, + 0x4f, 0x0a, 0x10, 0x56, 0x70, 0x63, 0x50, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x08, 0x76, 0x70, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x76, 0x70, 0x63, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, + 0x22, 0xb3, 0x06, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x60, + 0x0a, 0x12, 0x76, 0x70, 0x63, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x70, + 0x63, 0x50, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, + 0x76, 0x70, 0x63, 0x50, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x45, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x03, 0x3a, 0x81, 0x01, 0xea, 0x41, 0x7e, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x22, 0x52, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, + 0x17, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbd, 0x04, 0x0a, 0x05, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x26, + 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x10, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x85, 0x01, 0xea, 0x41, 0x81, 0x01, 0x0a, 0x1f, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x5e, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x7d, 0x22, 0xad, 0x02, 0x0a, 0x0e, 0x4d, + 0x79, 0x73, 0x71, 0x6c, 0x53, 0x73, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, + 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, + 0x79, 0x12, 0x29, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x12, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x11, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x12, 0x39, 0x0a, 0x16, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x14, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x0e, 0x63, + 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x04, 0x52, 0x0d, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x12, 0x63, 0x61, 0x5f, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x22, 0xe5, 0x09, 0x0a, 0x11, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, + 0x0a, 0x0e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x4f, 0x0a, 0x0b, 0x67, 0x63, 0x73, 0x5f, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x47, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x67, + 0x63, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x6d, 0x79, 0x73, + 0x71, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x64, 0x0a, 0x0f, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x18, 0xc8, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x48, 0x01, 0x52, 0x0e, 0x6e, 0x6f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x1e, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x48, + 0x01, 0x52, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x7b, + 0x0a, 0x18, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x53, 0x73, 0x68, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x48, 0x01, 0x52, 0x16, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x53, 0x73, 0x68, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x6b, 0x0a, 0x14, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x18, 0xcb, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x48, 0x01, 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x3a, 0x81, 0x01, 0xea, 0x41, 0x7e, 0x0a, 0x2b, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x4f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x7d, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, + 0x74, 0x79, 0x22, 0x9c, 0x02, 0x0a, 0x0c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, + 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, + 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, + 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, + 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x0b, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x55, 0x0a, 0x0e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x64, 0x0a, + 0x0b, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x12, 0x55, 0x0a, 0x0e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x12, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x09, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x52, 0x09, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x0a, 0x72, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x52, 0x0a, 0x72, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0b, 0x4d, 0x79, 0x73, 0x71, 0x6c, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, + 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x72, 0x64, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x7f, 0x0a, 0x0a, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x52, 0x0a, 0x0d, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x6d, 0x79, + 0x73, 0x71, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x0b, + 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x0a, 0x4d, + 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x12, 0x58, 0x0a, 0x0f, 0x6d, 0x79, 0x73, + 0x71, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x52, 0x0e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x11, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0a, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, + 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x52, 0x0a, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x6c, + 0x69, 0x73, 0x74, 0x22, 0xc1, 0x02, 0x0a, 0x0c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x1e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x68, + 0x0a, 0x14, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x13, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x79, + 0x73, 0x71, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x16, 0x0a, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x76, 0x72, 0x6f, 0x46, + 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa9, 0x02, 0x0a, 0x0e, 0x4a, 0x73, + 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x60, 0x0a, 0x12, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x10, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x62, + 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x0f, 0x4a, 0x73, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x1c, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x47, + 0x5a, 0x49, 0x50, 0x10, 0x02, 0x22, 0xcd, 0x03, 0x0a, 0x14, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x5b, 0x0a, 0x0f, 0x67, 0x63, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x0d, 0x67, 0x63, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, + 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x62, 0x12, 0x4f, 0x0a, 0x16, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5c, 0x0a, 0x10, 0x61, 0x76, + 0x72, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x64, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x76, 0x72, 0x6f, 0x46, 0x69, 0x6c, 0x65, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x76, 0x72, 0x6f, 0x46, 0x69, + 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x5c, 0x0a, 0x10, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x65, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x65, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x0d, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xf4, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x52, 0x0a, 0x23, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x20, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x6e, 0x0a, 0x16, 0x67, 0x63, 0x73, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x63, 0x73, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x67, 0x63, 0x73, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x1b, 0x0a, 0x19, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8f, 0x0b, 0x0a, + 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x5f, + 0x61, 0x6c, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x41, 0x6c, 0x6c, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x66, + 0x69, 0x6c, 0x6c, 0x41, 0x6c, 0x6c, 0x12, 0x64, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, + 0x6c, 0x6c, 0x5f, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, + 0x4e, 0x6f, 0x6e, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x00, 0x52, 0x0c, + 0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x4e, 0x6f, 0x6e, 0x65, 0x12, 0x44, 0x0a, 0x06, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x1a, 0xf8, 0x01, 0x0a, 0x13, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x41, + 0x6c, 0x6c, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x67, 0x0a, 0x17, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x64, 0x62, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x15, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x16, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x52, 0x64, 0x62, 0x6d, + 0x73, 0x48, 0x00, 0x52, 0x14, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x1a, 0x16, 0x0a, + 0x14, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x4e, 0x6f, 0x6e, 0x65, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x95, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, + 0x41, 0x55, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, + 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, + 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, + 0x53, 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, + 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x08, 0x3a, 0x5f, 0xea, 0x41, 0x5c, 0x0a, 0x20, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, + 0x38, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2f, 0x7b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x62, 0x61, 0x63, + 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0x9f, + 0x02, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x55, 0x75, 0x69, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x62, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xaa, 0x02, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x4d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x4a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x54, 0x5f, 0x45, + 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, + 0x03, 0x22, 0xe6, 0x02, 0x0a, 0x11, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x4f, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x12, 0x5d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x36, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x15, 0x0a, 0x11, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x3e, 0x0a, 0x0d, 0x47, 0x63, + 0x73, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x1b, 0x47, + 0x43, 0x53, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x41, 0x56, 0x52, 0x4f, 0x10, 0x01, 0x1a, 0x02, 0x18, 0x01, 0x2a, 0x60, 0x0a, 0x10, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, + 0x0a, 0x1e, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4f, + 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, + 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x56, 0x52, 0x4f, 0x5f, 0x53, + 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x02, 0x42, 0xff, 0x01, 0x0a, + 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x1d, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x56, 0x31, 0x41, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5c, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescOnce sync.Once + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescData = file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDesc +) + +func file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescGZIP() []byte { + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescOnce.Do(func() { + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescData) + }) + return file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDescData +} + +var file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_google_cloud_datastream_v1alpha1_datastream_resources_proto_goTypes = []interface{}{ + (GcsFileFormat)(0), // 0: google.cloud.datastream.v1alpha1.GcsFileFormat + (SchemaFileFormat)(0), // 1: google.cloud.datastream.v1alpha1.SchemaFileFormat + (PrivateConnection_State)(0), // 2: google.cloud.datastream.v1alpha1.PrivateConnection.State + (JsonFileFormat_JsonCompression)(0), // 3: google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression + (Stream_State)(0), // 4: google.cloud.datastream.v1alpha1.Stream.State + (Validation_Status)(0), // 5: google.cloud.datastream.v1alpha1.Validation.Status + (ValidationMessage_Level)(0), // 6: google.cloud.datastream.v1alpha1.ValidationMessage.Level + (*OracleProfile)(nil), // 7: google.cloud.datastream.v1alpha1.OracleProfile + (*MysqlProfile)(nil), // 8: google.cloud.datastream.v1alpha1.MysqlProfile + (*GcsProfile)(nil), // 9: google.cloud.datastream.v1alpha1.GcsProfile + (*NoConnectivitySettings)(nil), // 10: google.cloud.datastream.v1alpha1.NoConnectivitySettings + (*StaticServiceIpConnectivity)(nil), // 11: google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity + (*ForwardSshTunnelConnectivity)(nil), // 12: google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity + (*VpcPeeringConfig)(nil), // 13: google.cloud.datastream.v1alpha1.VpcPeeringConfig + (*PrivateConnection)(nil), // 14: google.cloud.datastream.v1alpha1.PrivateConnection + (*PrivateConnectivity)(nil), // 15: google.cloud.datastream.v1alpha1.PrivateConnectivity + (*Route)(nil), // 16: google.cloud.datastream.v1alpha1.Route + (*MysqlSslConfig)(nil), // 17: google.cloud.datastream.v1alpha1.MysqlSslConfig + (*ConnectionProfile)(nil), // 18: google.cloud.datastream.v1alpha1.ConnectionProfile + (*OracleColumn)(nil), // 19: google.cloud.datastream.v1alpha1.OracleColumn + (*OracleTable)(nil), // 20: google.cloud.datastream.v1alpha1.OracleTable + (*OracleSchema)(nil), // 21: google.cloud.datastream.v1alpha1.OracleSchema + (*OracleRdbms)(nil), // 22: google.cloud.datastream.v1alpha1.OracleRdbms + (*OracleSourceConfig)(nil), // 23: google.cloud.datastream.v1alpha1.OracleSourceConfig + (*MysqlColumn)(nil), // 24: google.cloud.datastream.v1alpha1.MysqlColumn + (*MysqlTable)(nil), // 25: google.cloud.datastream.v1alpha1.MysqlTable + (*MysqlDatabase)(nil), // 26: google.cloud.datastream.v1alpha1.MysqlDatabase + (*MysqlRdbms)(nil), // 27: google.cloud.datastream.v1alpha1.MysqlRdbms + (*MysqlSourceConfig)(nil), // 28: google.cloud.datastream.v1alpha1.MysqlSourceConfig + (*SourceConfig)(nil), // 29: google.cloud.datastream.v1alpha1.SourceConfig + (*AvroFileFormat)(nil), // 30: google.cloud.datastream.v1alpha1.AvroFileFormat + (*JsonFileFormat)(nil), // 31: google.cloud.datastream.v1alpha1.JsonFileFormat + (*GcsDestinationConfig)(nil), // 32: google.cloud.datastream.v1alpha1.GcsDestinationConfig + (*DestinationConfig)(nil), // 33: google.cloud.datastream.v1alpha1.DestinationConfig + (*Stream)(nil), // 34: google.cloud.datastream.v1alpha1.Stream + (*Error)(nil), // 35: google.cloud.datastream.v1alpha1.Error + (*ValidationResult)(nil), // 36: google.cloud.datastream.v1alpha1.ValidationResult + (*Validation)(nil), // 37: google.cloud.datastream.v1alpha1.Validation + (*ValidationMessage)(nil), // 38: google.cloud.datastream.v1alpha1.ValidationMessage + nil, // 39: google.cloud.datastream.v1alpha1.OracleProfile.ConnectionAttributesEntry + nil, // 40: google.cloud.datastream.v1alpha1.PrivateConnection.LabelsEntry + nil, // 41: google.cloud.datastream.v1alpha1.Route.LabelsEntry + nil, // 42: google.cloud.datastream.v1alpha1.ConnectionProfile.LabelsEntry + (*Stream_BackfillAllStrategy)(nil), // 43: google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy + (*Stream_BackfillNoneStrategy)(nil), // 44: google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy + nil, // 45: google.cloud.datastream.v1alpha1.Stream.LabelsEntry + nil, // 46: google.cloud.datastream.v1alpha1.Error.DetailsEntry + nil, // 47: google.cloud.datastream.v1alpha1.ValidationMessage.MetadataEntry + (*timestamppb.Timestamp)(nil), // 48: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 49: google.protobuf.Duration +} +var file_google_cloud_datastream_v1alpha1_datastream_resources_proto_depIdxs = []int32{ + 39, // 0: google.cloud.datastream.v1alpha1.OracleProfile.connection_attributes:type_name -> google.cloud.datastream.v1alpha1.OracleProfile.ConnectionAttributesEntry + 17, // 1: google.cloud.datastream.v1alpha1.MysqlProfile.ssl_config:type_name -> google.cloud.datastream.v1alpha1.MysqlSslConfig + 48, // 2: google.cloud.datastream.v1alpha1.PrivateConnection.create_time:type_name -> google.protobuf.Timestamp + 48, // 3: google.cloud.datastream.v1alpha1.PrivateConnection.update_time:type_name -> google.protobuf.Timestamp + 40, // 4: google.cloud.datastream.v1alpha1.PrivateConnection.labels:type_name -> google.cloud.datastream.v1alpha1.PrivateConnection.LabelsEntry + 2, // 5: google.cloud.datastream.v1alpha1.PrivateConnection.state:type_name -> google.cloud.datastream.v1alpha1.PrivateConnection.State + 35, // 6: google.cloud.datastream.v1alpha1.PrivateConnection.error:type_name -> google.cloud.datastream.v1alpha1.Error + 13, // 7: google.cloud.datastream.v1alpha1.PrivateConnection.vpc_peering_config:type_name -> google.cloud.datastream.v1alpha1.VpcPeeringConfig + 48, // 8: google.cloud.datastream.v1alpha1.Route.create_time:type_name -> google.protobuf.Timestamp + 48, // 9: google.cloud.datastream.v1alpha1.Route.update_time:type_name -> google.protobuf.Timestamp + 41, // 10: google.cloud.datastream.v1alpha1.Route.labels:type_name -> google.cloud.datastream.v1alpha1.Route.LabelsEntry + 48, // 11: google.cloud.datastream.v1alpha1.ConnectionProfile.create_time:type_name -> google.protobuf.Timestamp + 48, // 12: google.cloud.datastream.v1alpha1.ConnectionProfile.update_time:type_name -> google.protobuf.Timestamp + 42, // 13: google.cloud.datastream.v1alpha1.ConnectionProfile.labels:type_name -> google.cloud.datastream.v1alpha1.ConnectionProfile.LabelsEntry + 7, // 14: google.cloud.datastream.v1alpha1.ConnectionProfile.oracle_profile:type_name -> google.cloud.datastream.v1alpha1.OracleProfile + 9, // 15: google.cloud.datastream.v1alpha1.ConnectionProfile.gcs_profile:type_name -> google.cloud.datastream.v1alpha1.GcsProfile + 8, // 16: google.cloud.datastream.v1alpha1.ConnectionProfile.mysql_profile:type_name -> google.cloud.datastream.v1alpha1.MysqlProfile + 10, // 17: google.cloud.datastream.v1alpha1.ConnectionProfile.no_connectivity:type_name -> google.cloud.datastream.v1alpha1.NoConnectivitySettings + 11, // 18: google.cloud.datastream.v1alpha1.ConnectionProfile.static_service_ip_connectivity:type_name -> google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity + 12, // 19: google.cloud.datastream.v1alpha1.ConnectionProfile.forward_ssh_connectivity:type_name -> google.cloud.datastream.v1alpha1.ForwardSshTunnelConnectivity + 15, // 20: google.cloud.datastream.v1alpha1.ConnectionProfile.private_connectivity:type_name -> google.cloud.datastream.v1alpha1.PrivateConnectivity + 19, // 21: google.cloud.datastream.v1alpha1.OracleTable.oracle_columns:type_name -> google.cloud.datastream.v1alpha1.OracleColumn + 20, // 22: google.cloud.datastream.v1alpha1.OracleSchema.oracle_tables:type_name -> google.cloud.datastream.v1alpha1.OracleTable + 21, // 23: google.cloud.datastream.v1alpha1.OracleRdbms.oracle_schemas:type_name -> google.cloud.datastream.v1alpha1.OracleSchema + 22, // 24: google.cloud.datastream.v1alpha1.OracleSourceConfig.allowlist:type_name -> google.cloud.datastream.v1alpha1.OracleRdbms + 22, // 25: google.cloud.datastream.v1alpha1.OracleSourceConfig.rejectlist:type_name -> google.cloud.datastream.v1alpha1.OracleRdbms + 24, // 26: google.cloud.datastream.v1alpha1.MysqlTable.mysql_columns:type_name -> google.cloud.datastream.v1alpha1.MysqlColumn + 25, // 27: google.cloud.datastream.v1alpha1.MysqlDatabase.mysql_tables:type_name -> google.cloud.datastream.v1alpha1.MysqlTable + 26, // 28: google.cloud.datastream.v1alpha1.MysqlRdbms.mysql_databases:type_name -> google.cloud.datastream.v1alpha1.MysqlDatabase + 27, // 29: google.cloud.datastream.v1alpha1.MysqlSourceConfig.allowlist:type_name -> google.cloud.datastream.v1alpha1.MysqlRdbms + 27, // 30: google.cloud.datastream.v1alpha1.MysqlSourceConfig.rejectlist:type_name -> google.cloud.datastream.v1alpha1.MysqlRdbms + 23, // 31: google.cloud.datastream.v1alpha1.SourceConfig.oracle_source_config:type_name -> google.cloud.datastream.v1alpha1.OracleSourceConfig + 28, // 32: google.cloud.datastream.v1alpha1.SourceConfig.mysql_source_config:type_name -> google.cloud.datastream.v1alpha1.MysqlSourceConfig + 1, // 33: google.cloud.datastream.v1alpha1.JsonFileFormat.schema_file_format:type_name -> google.cloud.datastream.v1alpha1.SchemaFileFormat + 3, // 34: google.cloud.datastream.v1alpha1.JsonFileFormat.compression:type_name -> google.cloud.datastream.v1alpha1.JsonFileFormat.JsonCompression + 0, // 35: google.cloud.datastream.v1alpha1.GcsDestinationConfig.gcs_file_format:type_name -> google.cloud.datastream.v1alpha1.GcsFileFormat + 49, // 36: google.cloud.datastream.v1alpha1.GcsDestinationConfig.file_rotation_interval:type_name -> google.protobuf.Duration + 30, // 37: google.cloud.datastream.v1alpha1.GcsDestinationConfig.avro_file_format:type_name -> google.cloud.datastream.v1alpha1.AvroFileFormat + 31, // 38: google.cloud.datastream.v1alpha1.GcsDestinationConfig.json_file_format:type_name -> google.cloud.datastream.v1alpha1.JsonFileFormat + 32, // 39: google.cloud.datastream.v1alpha1.DestinationConfig.gcs_destination_config:type_name -> google.cloud.datastream.v1alpha1.GcsDestinationConfig + 48, // 40: google.cloud.datastream.v1alpha1.Stream.create_time:type_name -> google.protobuf.Timestamp + 48, // 41: google.cloud.datastream.v1alpha1.Stream.update_time:type_name -> google.protobuf.Timestamp + 45, // 42: google.cloud.datastream.v1alpha1.Stream.labels:type_name -> google.cloud.datastream.v1alpha1.Stream.LabelsEntry + 29, // 43: google.cloud.datastream.v1alpha1.Stream.source_config:type_name -> google.cloud.datastream.v1alpha1.SourceConfig + 33, // 44: google.cloud.datastream.v1alpha1.Stream.destination_config:type_name -> google.cloud.datastream.v1alpha1.DestinationConfig + 4, // 45: google.cloud.datastream.v1alpha1.Stream.state:type_name -> google.cloud.datastream.v1alpha1.Stream.State + 43, // 46: google.cloud.datastream.v1alpha1.Stream.backfill_all:type_name -> google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy + 44, // 47: google.cloud.datastream.v1alpha1.Stream.backfill_none:type_name -> google.cloud.datastream.v1alpha1.Stream.BackfillNoneStrategy + 35, // 48: google.cloud.datastream.v1alpha1.Stream.errors:type_name -> google.cloud.datastream.v1alpha1.Error + 48, // 49: google.cloud.datastream.v1alpha1.Error.error_time:type_name -> google.protobuf.Timestamp + 46, // 50: google.cloud.datastream.v1alpha1.Error.details:type_name -> google.cloud.datastream.v1alpha1.Error.DetailsEntry + 37, // 51: google.cloud.datastream.v1alpha1.ValidationResult.validations:type_name -> google.cloud.datastream.v1alpha1.Validation + 5, // 52: google.cloud.datastream.v1alpha1.Validation.status:type_name -> google.cloud.datastream.v1alpha1.Validation.Status + 38, // 53: google.cloud.datastream.v1alpha1.Validation.message:type_name -> google.cloud.datastream.v1alpha1.ValidationMessage + 6, // 54: google.cloud.datastream.v1alpha1.ValidationMessage.level:type_name -> google.cloud.datastream.v1alpha1.ValidationMessage.Level + 47, // 55: google.cloud.datastream.v1alpha1.ValidationMessage.metadata:type_name -> google.cloud.datastream.v1alpha1.ValidationMessage.MetadataEntry + 22, // 56: google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.oracle_excluded_objects:type_name -> google.cloud.datastream.v1alpha1.OracleRdbms + 27, // 57: google.cloud.datastream.v1alpha1.Stream.BackfillAllStrategy.mysql_excluded_objects:type_name -> google.cloud.datastream.v1alpha1.MysqlRdbms + 58, // [58:58] is the sub-list for method output_type + 58, // [58:58] is the sub-list for method input_type + 58, // [58:58] is the sub-list for extension type_name + 58, // [58:58] is the sub-list for extension extendee + 0, // [0:58] is the sub-list for field type_name +} + +func init() { file_google_cloud_datastream_v1alpha1_datastream_resources_proto_init() } +func file_google_cloud_datastream_v1alpha1_datastream_resources_proto_init() { + if File_google_cloud_datastream_v1alpha1_datastream_resources_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NoConnectivitySettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StaticServiceIpConnectivity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ForwardSshTunnelConnectivity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VpcPeeringConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateConnection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateConnectivity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlSslConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectionProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleColumn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleRdbms); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OracleSourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlColumn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlDatabase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlRdbms); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MysqlSourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AvroFileFormat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JsonFileFormat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcsDestinationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Stream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Validation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Stream_BackfillAllStrategy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Stream_BackfillNoneStrategy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*ForwardSshTunnelConnectivity_Password)(nil), + (*ForwardSshTunnelConnectivity_PrivateKey)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*ConnectionProfile_OracleProfile)(nil), + (*ConnectionProfile_GcsProfile)(nil), + (*ConnectionProfile_MysqlProfile)(nil), + (*ConnectionProfile_NoConnectivity)(nil), + (*ConnectionProfile_StaticServiceIpConnectivity)(nil), + (*ConnectionProfile_ForwardSshConnectivity)(nil), + (*ConnectionProfile_PrivateConnectivity)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[22].OneofWrappers = []interface{}{ + (*SourceConfig_OracleSourceConfig)(nil), + (*SourceConfig_MysqlSourceConfig)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[25].OneofWrappers = []interface{}{ + (*GcsDestinationConfig_AvroFileFormat)(nil), + (*GcsDestinationConfig_JsonFileFormat)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[26].OneofWrappers = []interface{}{ + (*DestinationConfig_GcsDestinationConfig)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[27].OneofWrappers = []interface{}{ + (*Stream_BackfillAll)(nil), + (*Stream_BackfillNone)(nil), + } + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes[36].OneofWrappers = []interface{}{ + (*Stream_BackfillAllStrategy_OracleExcludedObjects)(nil), + (*Stream_BackfillAllStrategy_MysqlExcludedObjects)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDesc, + NumEnums: 7, + NumMessages: 41, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_datastream_v1alpha1_datastream_resources_proto_goTypes, + DependencyIndexes: file_google_cloud_datastream_v1alpha1_datastream_resources_proto_depIdxs, + EnumInfos: file_google_cloud_datastream_v1alpha1_datastream_resources_proto_enumTypes, + MessageInfos: file_google_cloud_datastream_v1alpha1_datastream_resources_proto_msgTypes, + }.Build() + File_google_cloud_datastream_v1alpha1_datastream_resources_proto = out.File + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_rawDesc = nil + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_goTypes = nil + file_google_cloud_datastream_v1alpha1_datastream_resources_proto_depIdxs = nil +} diff --git a/datastream/apiv1alpha1/doc.go b/datastream/apiv1alpha1/doc.go index 374a068a1eef..91c80ee427fa 100644 --- a/datastream/apiv1alpha1/doc.go +++ b/datastream/apiv1alpha1/doc.go @@ -17,51 +17,62 @@ // Package datastream is an auto-generated package for the // Datastream API. // -// NOTE: This package is in alpha. It is not stable, and is likely to change. +// NOTE: This package is in alpha. It is not stable, and is likely to change. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := datastream.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datastream.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := datastream.NewClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &datastreampb.ListConnectionProfilesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datastream/v1alpha1#ListConnectionProfilesRequest. -// } -// it := c.ListConnectionProfiles(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := datastream.NewClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &datastreampb.ListConnectionProfilesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/datastream/v1alpha1#ListConnectionProfilesRequest. +// } +// it := c.ListConnectionProfiles(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context // // The ctx passed to NewClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. diff --git a/datastream/go.mod b/datastream/go.mod index 7ef0ff3cc673..d0ef3279b87d 100644 --- a/datastream/go.mod +++ b/datastream/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/datastream -go 1.16 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220829144015-23454907ede3 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/datastream/go.sum b/datastream/go.sum index f00d995cec43..bcdc5b4bdeef 100644 --- a/datastream/go.sum +++ b/datastream/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3 h1:4wwmycAWg7WUIFWgzxP6Wumy2GBLxmATgkhgpFnJl2U= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/datastream/go_mod_tidy_hack.go b/datastream/go_mod_tidy_hack.go deleted file mode 100644 index 2f7f6c27e8fc..000000000000 --- a/datastream/go_mod_tidy_hack.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the cloud.google.com/go import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package datastream - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go" diff --git a/datastream/internal/version.go b/datastream/internal/version.go index db6d2e3e99d1..d0e4a6fd16b3 100644 --- a/datastream/internal/version.go +++ b/datastream/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.0.0" +const Version = "1.2.0" diff --git a/debugger/apiv2/controller2_client.go b/debugger/apiv2/controller2_client.go index f2c3abd47237..a22f6e96fd36 100644 --- a/debugger/apiv2/controller2_client.go +++ b/debugger/apiv2/controller2_client.go @@ -142,7 +142,8 @@ func (c *Controller2Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Controller2Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -269,7 +270,8 @@ func NewController2Client(ctx context.Context, opts ...option.ClientOption) (*Co // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *controller2GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/debugger/apiv2/controller2_client_example_test.go b/debugger/apiv2/controller2_client_example_test.go index 71cda573e75b..cd7b60393b64 100644 --- a/debugger/apiv2/controller2_client_example_test.go +++ b/debugger/apiv2/controller2_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewController2Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewController2Client(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewController2Client() { func ExampleController2Client_RegisterDebuggee() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewController2Client(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExampleController2Client_RegisterDebuggee() { func ExampleController2Client_ListActiveBreakpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewController2Client(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +92,11 @@ func ExampleController2Client_ListActiveBreakpoints() { func ExampleController2Client_UpdateActiveBreakpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewController2Client(ctx) if err != nil { // TODO: Handle error. diff --git a/debugger/apiv2/debugger2_client.go b/debugger/apiv2/debugger2_client.go index 3eb49d40bf2f..128cbd67958a 100644 --- a/debugger/apiv2/debugger2_client.go +++ b/debugger/apiv2/debugger2_client.go @@ -162,7 +162,8 @@ func (c *Debugger2Client) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *Debugger2Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -263,7 +264,8 @@ func NewDebugger2Client(ctx context.Context, opts ...option.ClientOption) (*Debu // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *debugger2GRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/debugger/apiv2/debugger2_client_example_test.go b/debugger/apiv2/debugger2_client_example_test.go index 1505ee41346e..4f65977d1a1c 100644 --- a/debugger/apiv2/debugger2_client_example_test.go +++ b/debugger/apiv2/debugger2_client_example_test.go @@ -25,6 +25,11 @@ import ( func ExampleNewDebugger2Client() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewDebugger2Client(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +42,11 @@ func ExampleNewDebugger2Client() { func ExampleDebugger2Client_SetBreakpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewDebugger2Client(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +67,11 @@ func ExampleDebugger2Client_SetBreakpoint() { func ExampleDebugger2Client_GetBreakpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewDebugger2Client(ctx) if err != nil { // TODO: Handle error. @@ -77,6 +92,11 @@ func ExampleDebugger2Client_GetBreakpoint() { func ExampleDebugger2Client_DeleteBreakpoint() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewDebugger2Client(ctx) if err != nil { // TODO: Handle error. @@ -95,6 +115,11 @@ func ExampleDebugger2Client_DeleteBreakpoint() { func ExampleDebugger2Client_ListBreakpoints() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewDebugger2Client(ctx) if err != nil { // TODO: Handle error. @@ -115,6 +140,11 @@ func ExampleDebugger2Client_ListBreakpoints() { func ExampleDebugger2Client_ListDebuggees() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := debugger.NewDebugger2Client(ctx) if err != nil { // TODO: Handle error. diff --git a/debugger/apiv2/doc.go b/debugger/apiv2/doc.go index 15cbd53792a3..68a43859cccd 100644 --- a/debugger/apiv2/doc.go +++ b/debugger/apiv2/doc.go @@ -20,45 +20,56 @@ // Examines the call stack and variables of a running application without // stopping or slowing it down. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := debugger.NewController2Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := debugger.NewController2Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := debugger.NewController2Client(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &clouddebuggerpb.RegisterDebuggeeRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/clouddebugger/v2#RegisterDebuggeeRequest. -// } -// resp, err := c.RegisterDebuggee(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := debugger.NewController2Client(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &clouddebuggerpb.RegisterDebuggeeRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/clouddebugger/v2#RegisterDebuggeeRequest. +// } +// resp, err := c.RegisterDebuggee(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewController2Client is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/deploy/CHANGES.md b/deploy/CHANGES.md index 3c9622658cdb..8bd927a65aaa 100644 --- a/deploy/CHANGES.md +++ b/deploy/CHANGES.md @@ -1,6 +1,13 @@ # Changes +## [1.2.1](https://github.com/googleapis/google-cloud-go/compare/deploy/v1.2.0...deploy/v1.2.1) (2022-07-12) + + +### Documentation + +* **deploy:** Cloud Deploy API Platform Logging documentation ([6ffce1d](https://github.com/googleapis/google-cloud-go/commit/6ffce1dbf567758d23ac39aaf63dc17ced5e4db9)) + ## [1.2.0](https://github.com/googleapis/google-cloud-go/compare/deploy/v1.1.0...deploy/v1.2.0) (2022-02-23) diff --git a/deploy/apiv1/cloud_deploy_client.go b/deploy/apiv1/cloud_deploy_client.go index b2bdeb3a27c2..396709d10384 100644 --- a/deploy/apiv1/cloud_deploy_client.go +++ b/deploy/apiv1/cloud_deploy_client.go @@ -255,7 +255,8 @@ func (c *CloudDeployClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *CloudDeployClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -475,7 +476,8 @@ func NewCloudDeployClient(ctx context.Context, opts ...option.ClientOption) (*Cl // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *cloudDeployGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/deploy/apiv1/cloud_deploy_client_example_test.go b/deploy/apiv1/cloud_deploy_client_example_test.go index b1290d3e4840..564b3dc722c5 100644 --- a/deploy/apiv1/cloud_deploy_client_example_test.go +++ b/deploy/apiv1/cloud_deploy_client_example_test.go @@ -26,6 +26,11 @@ import ( func ExampleNewCloudDeployClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +43,11 @@ func ExampleNewCloudDeployClient() { func ExampleCloudDeployClient_ListDeliveryPipelines() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +74,11 @@ func ExampleCloudDeployClient_ListDeliveryPipelines() { func ExampleCloudDeployClient_GetDeliveryPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleCloudDeployClient_GetDeliveryPipeline() { func ExampleCloudDeployClient_CreateDeliveryPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +129,11 @@ func ExampleCloudDeployClient_CreateDeliveryPipeline() { func ExampleCloudDeployClient_UpdateDeliveryPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +159,11 @@ func ExampleCloudDeployClient_UpdateDeliveryPipeline() { func ExampleCloudDeployClient_DeleteDeliveryPipeline() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +187,11 @@ func ExampleCloudDeployClient_DeleteDeliveryPipeline() { func ExampleCloudDeployClient_ListTargets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -183,6 +218,11 @@ func ExampleCloudDeployClient_ListTargets() { func ExampleCloudDeployClient_GetTarget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -203,6 +243,11 @@ func ExampleCloudDeployClient_GetTarget() { func ExampleCloudDeployClient_CreateTarget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +273,11 @@ func ExampleCloudDeployClient_CreateTarget() { func ExampleCloudDeployClient_UpdateTarget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -253,6 +303,11 @@ func ExampleCloudDeployClient_UpdateTarget() { func ExampleCloudDeployClient_DeleteTarget() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +331,11 @@ func ExampleCloudDeployClient_DeleteTarget() { func ExampleCloudDeployClient_ListReleases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +362,11 @@ func ExampleCloudDeployClient_ListReleases() { func ExampleCloudDeployClient_GetRelease() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -322,6 +387,11 @@ func ExampleCloudDeployClient_GetRelease() { func ExampleCloudDeployClient_CreateRelease() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -347,6 +417,11 @@ func ExampleCloudDeployClient_CreateRelease() { func ExampleCloudDeployClient_ApproveRollout() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -367,6 +442,11 @@ func ExampleCloudDeployClient_ApproveRollout() { func ExampleCloudDeployClient_ListRollouts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -393,6 +473,11 @@ func ExampleCloudDeployClient_ListRollouts() { func ExampleCloudDeployClient_GetRollout() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -413,6 +498,11 @@ func ExampleCloudDeployClient_GetRollout() { func ExampleCloudDeployClient_CreateRollout() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. @@ -438,6 +528,11 @@ func ExampleCloudDeployClient_CreateRollout() { func ExampleCloudDeployClient_GetConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := deploy.NewCloudDeployClient(ctx) if err != nil { // TODO: Handle error. diff --git a/deploy/apiv1/doc.go b/deploy/apiv1/doc.go index f366a6bf8ef7..cb882313fb44 100644 --- a/deploy/apiv1/doc.go +++ b/deploy/apiv1/doc.go @@ -17,51 +17,62 @@ // Package deploy is an auto-generated package for the // Google Cloud Deploy API. // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := deploy.NewCloudDeployClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := deploy.NewCloudDeployClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := deploy.NewCloudDeployClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := deploy.NewCloudDeployClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // -// req := &deploypb.ListDeliveryPipelinesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/deploy/v1#ListDeliveryPipelinesRequest. -// } -// it := c.ListDeliveryPipelines(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } +// req := &deploypb.ListDeliveryPipelinesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/deploy/v1#ListDeliveryPipelinesRequest. +// } +// it := c.ListDeliveryPipelines(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } // -// Use of Context +// # Use of Context // -// The ctx passed to NewClient is used for authentication requests and +// The ctx passed to NewCloudDeployClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/deploy/go.mod b/deploy/go.mod index dc92d44b0b52..59a4425a1eb7 100644 --- a/deploy/go.mod +++ b/deploy/go.mod @@ -1,12 +1,26 @@ module cloud.google.com/go/deploy -go 1.15 +go 1.17 require ( cloud.google.com/go v0.102.1 github.com/googleapis/gax-go/v2 v2.4.0 - google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/api v0.95.0 + google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 + google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.1 +) + +require ( + cloud.google.com/go/compute v1.7.0 // indirect + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + go.opencensus.io v0.23.0 // indirect + golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect + golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/appengine v1.6.7 // indirect ) diff --git a/deploy/go.sum b/deploy/go.sum index f00d995cec43..c796dcdc6677 100644 --- a/deploy/go.sum +++ b/deploy/go.sum @@ -162,6 +162,7 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= @@ -290,8 +291,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 h1:Yqz/iviulwKwAREEeUd3nbBFn0XuyJqkoft2IlrvOhc= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -311,8 +312,10 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -383,8 +386,8 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810 h1:rHZQSjJdAI4Xf5Qzeh2bBc5YJIkPFVM6oDtMFYmgws0= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -497,8 +500,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0 h1:8rJoHuRxx+vCmZtAO/3k1dRLvYNVyTJtZ5oaFZvhgvc= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.95.0 h1:d1c24AAS01DYqXreBeuVV7ewY/U8Mnhh47pwtsgVtYg= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,8 +588,10 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 h1:hw4Y42zL1VyVKxPgRHHh191fpVBGV8sNVmcow5Z8VXY= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -617,8 +622,9 @@ google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -633,8 +639,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/deploy/internal/version.go b/deploy/internal/version.go index d0e4a6fd16b3..db8bbd4568f4 100644 --- a/deploy/internal/version.go +++ b/deploy/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.2.0" +const Version = "1.2.1" diff --git a/dialogflow/CHANGES.md b/dialogflow/CHANGES.md index f08b4bd6153c..589965634a05 100644 --- a/dialogflow/CHANGES.md +++ b/dialogflow/CHANGES.md @@ -1,5 +1,46 @@ # Changes +## [1.15.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.14.0...dialogflow/v1.15.0) (2022-09-19) + + +### Features + +* **dialogflow:** start generating proto message types ([563f546](https://github.com/googleapis/google-cloud-go/commit/563f546262e68102644db64134d1071fc8caa383)) + +## [1.14.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.13.0...dialogflow/v1.14.0) (2022-09-15) + + +### Features + +* **dialogflow/apiv2beta1:** add REST transport ([f7b0822](https://github.com/googleapis/google-cloud-go/commit/f7b082212b1e46ff2f4126b52d49618785c2e8ca)) + +## [1.13.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.12.1...dialogflow/v1.13.0) (2022-09-06) + + +### Features + +* **dialogflow:** start generating apiv2beta1 ([#6601](https://github.com/googleapis/google-cloud-go/issues/6601)) ([6f8b1eb](https://github.com/googleapis/google-cloud-go/commit/6f8b1eb205740568be20c9d1094860812aa27cb1)) + +## [1.12.1](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.12.0...dialogflow/v1.12.1) (2022-08-02) + + +### Documentation + +* **dialogflow:** added an explicit note that DetectIntentRequest's text input is limited by 256 characters ([1d6fbcc](https://github.com/googleapis/google-cloud-go/commit/1d6fbcc6406e2063201ef5a98de560bf32f7fb73)) + +## [1.12.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.11.0...dialogflow/v1.12.0) (2022-07-12) + + +### Features + +* **dialogflow:** deprecated the filter field and add resource_definition docs: add more meaningful comments ([8a1ad06](https://github.com/googleapis/google-cloud-go/commit/8a1ad06572a65afa91a0a77a85b849e766876671)) + + +### Documentation + +* **dialogflow/cx:** clarify descriptions of the AdvancedSettings and WebhookRequest data types ([1732e43](https://github.com/googleapis/google-cloud-go/commit/1732e4334c84019d93775d861be5c0008e3f5245)) +* **dialogflow/cx:** improve comments for protos ([963efe2](https://github.com/googleapis/google-cloud-go/commit/963efe22cf67bc04fed09b5fa8f9cb20b9edf1a3)) + ## [1.11.0](https://github.com/googleapis/google-cloud-go/compare/dialogflow/v1.10.0...dialogflow/v1.11.0) (2022-06-29) diff --git a/dialogflow/apiv2/agents_client.go b/dialogflow/apiv2/agents_client.go index 582169a288b3..356524e47e71 100644 --- a/dialogflow/apiv2/agents_client.go +++ b/dialogflow/apiv2/agents_client.go @@ -32,6 +32,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -52,6 +53,11 @@ type AgentsCallOptions struct { ImportAgent []gax.CallOption RestoreAgent []gax.CallOption GetValidationResult []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultAgentsGRPCClientOptions() []option.ClientOption { @@ -167,6 +173,11 @@ func defaultAgentsCallOptions() *AgentsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -188,6 +199,11 @@ type internalAgentsClient interface { RestoreAgent(context.Context, *dialogflowpb.RestoreAgentRequest, ...gax.CallOption) (*RestoreAgentOperation, error) RestoreAgentOperation(name string) *RestoreAgentOperation GetValidationResult(context.Context, *dialogflowpb.GetValidationResultRequest, ...gax.CallOption) (*dialogflowpb.ValidationResult, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // AgentsClient is a client for interacting with Dialogflow API. @@ -224,7 +240,8 @@ func (c *AgentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AgentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -265,11 +282,11 @@ func (c *AgentsClient) SearchAgents(ctx context.Context, req *dialogflowpb.Searc // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train an agent prior to sending it queries. See the // training @@ -290,10 +307,10 @@ func (c *AgentsClient) TrainAgentOperation(name string) *TrainAgentOperation { // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: ExportAgentResponse +// response: ExportAgentResponse func (c *AgentsClient) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { return c.internalClient.ExportAgent(ctx, req, opts...) } @@ -318,11 +335,11 @@ func (c *AgentsClient) ExportAgentOperation(name string) *ExportAgentOperation { // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // The operation only tracks when importing is complete, not when it is done // training. @@ -353,11 +370,11 @@ func (c *AgentsClient) ImportAgentOperation(name string) *ImportAgentOperation { // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // The operation only tracks when restoring is complete, not when it is done // training. @@ -381,6 +398,31 @@ func (c *AgentsClient) GetValidationResult(ctx context.Context, req *dialogflowp return c.internalClient.GetValidationResult(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *AgentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *AgentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *AgentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *AgentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *AgentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // agentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -402,6 +444,10 @@ type agentsGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -436,6 +482,8 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC disableDeadlines: disableDeadlines, agentsClient: dialogflowpb.NewAgentsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -457,7 +505,8 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *agentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -702,6 +751,143 @@ func (c *agentsGRPCClient) GetValidationResult(ctx context.Context, req *dialogf return resp, nil } +func (c *agentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *agentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *agentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ExportAgentOperation manages a long-running operation from ExportAgent. type ExportAgentOperation struct { lro *longrunning.Operation @@ -991,3 +1177,97 @@ func (it *AgentIterator) takeBuf() interface{} { it.items = nil return b } + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2/agents_client_example_test.go b/dialogflow/apiv2/agents_client_example_test.go index f00f3ff57c85..748d5800cad9 100644 --- a/dialogflow/apiv2/agents_client_example_test.go +++ b/dialogflow/apiv2/agents_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewAgentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewAgentsClient() { func ExampleAgentsClient_GetAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +70,11 @@ func ExampleAgentsClient_GetAgent() { func ExampleAgentsClient_SetAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +95,11 @@ func ExampleAgentsClient_SetAgent() { func ExampleAgentsClient_DeleteAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +118,11 @@ func ExampleAgentsClient_DeleteAgent() { func ExampleAgentsClient_SearchAgents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +149,11 @@ func ExampleAgentsClient_SearchAgents() { func ExampleAgentsClient_TrainAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -145,6 +177,11 @@ func ExampleAgentsClient_TrainAgent() { func ExampleAgentsClient_ExportAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +207,11 @@ func ExampleAgentsClient_ExportAgent() { func ExampleAgentsClient_ImportAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -193,6 +235,11 @@ func ExampleAgentsClient_ImportAgent() { func ExampleAgentsClient_RestoreAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -216,6 +263,11 @@ func ExampleAgentsClient_RestoreAgent() { func ExampleAgentsClient_GetValidationResult() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -233,3 +285,138 @@ func ExampleAgentsClient_GetValidationResult() { // TODO: Use resp. _ = resp } + +func ExampleAgentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAgentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAgentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/answer_records_client.go b/dialogflow/apiv2/answer_records_client.go index e395224c45fe..90b78fe6dd38 100644 --- a/dialogflow/apiv2/answer_records_client.go +++ b/dialogflow/apiv2/answer_records_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -41,6 +43,11 @@ var newAnswerRecordsClientHook clientHook type AnswerRecordsCallOptions struct { ListAnswerRecords []gax.CallOption UpdateAnswerRecord []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultAnswerRecordsGRPCClientOptions() []option.ClientOption { @@ -79,6 +86,11 @@ func defaultAnswerRecordsCallOptions() *AnswerRecordsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -89,6 +101,11 @@ type internalAnswerRecordsClient interface { Connection() *grpc.ClientConn ListAnswerRecords(context.Context, *dialogflowpb.ListAnswerRecordsRequest, ...gax.CallOption) *AnswerRecordIterator UpdateAnswerRecord(context.Context, *dialogflowpb.UpdateAnswerRecordRequest, ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // AnswerRecordsClient is a client for interacting with Dialogflow API. @@ -120,7 +137,8 @@ func (c *AnswerRecordsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AnswerRecordsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -136,6 +154,31 @@ func (c *AnswerRecordsClient) UpdateAnswerRecord(ctx context.Context, req *dialo return c.internalClient.UpdateAnswerRecord(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *AnswerRecordsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *AnswerRecordsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *AnswerRecordsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *AnswerRecordsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *AnswerRecordsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // answerRecordsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -152,6 +195,10 @@ type answerRecordsGRPCClient struct { // The gRPC API client. answerRecordsClient dialogflowpb.AnswerRecordsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -186,6 +233,8 @@ func NewAnswerRecordsClient(ctx context.Context, opts ...option.ClientOption) (* disableDeadlines: disableDeadlines, answerRecordsClient: dialogflowpb.NewAnswerRecordsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -196,7 +245,8 @@ func NewAnswerRecordsClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *answerRecordsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -283,6 +333,143 @@ func (c *answerRecordsGRPCClient) UpdateAnswerRecord(ctx context.Context, req *d return resp, nil } +func (c *answerRecordsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *answerRecordsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *answerRecordsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *answerRecordsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *answerRecordsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // AnswerRecordIterator manages a stream of *dialogflowpb.AnswerRecord. type AnswerRecordIterator struct { items []*dialogflowpb.AnswerRecord diff --git a/dialogflow/apiv2/answer_records_client_example_test.go b/dialogflow/apiv2/answer_records_client_example_test.go index 5f65dc26a579..3e5247fffb9e 100644 --- a/dialogflow/apiv2/answer_records_client_example_test.go +++ b/dialogflow/apiv2/answer_records_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewAnswerRecordsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAnswerRecordsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewAnswerRecordsClient() { func ExampleAnswerRecordsClient_ListAnswerRecords() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAnswerRecordsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleAnswerRecordsClient_ListAnswerRecords() { func ExampleAnswerRecordsClient_UpdateAnswerRecord() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewAnswerRecordsClient(ctx) if err != nil { // TODO: Handle error. @@ -81,3 +98,138 @@ func ExampleAnswerRecordsClient_UpdateAnswerRecord() { // TODO: Use resp. _ = resp } + +func ExampleAnswerRecordsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnswerRecordsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAnswerRecordsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAnswerRecordsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnswerRecordsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/contexts_client.go b/dialogflow/apiv2/contexts_client.go index dd072be7537c..add5bad7e626 100644 --- a/dialogflow/apiv2/contexts_client.go +++ b/dialogflow/apiv2/contexts_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -45,6 +47,11 @@ type ContextsCallOptions struct { UpdateContext []gax.CallOption DeleteContext []gax.CallOption DeleteAllContexts []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultContextsGRPCClientOptions() []option.ClientOption { @@ -127,6 +134,11 @@ func defaultContextsCallOptions() *ContextsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -141,6 +153,11 @@ type internalContextsClient interface { UpdateContext(context.Context, *dialogflowpb.UpdateContextRequest, ...gax.CallOption) (*dialogflowpb.Context, error) DeleteContext(context.Context, *dialogflowpb.DeleteContextRequest, ...gax.CallOption) error DeleteAllContexts(context.Context, *dialogflowpb.DeleteAllContextsRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ContextsClient is a client for interacting with Dialogflow API. @@ -172,7 +189,8 @@ func (c *ContextsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ContextsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -209,6 +227,31 @@ func (c *ContextsClient) DeleteAllContexts(ctx context.Context, req *dialogflowp return c.internalClient.DeleteAllContexts(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *ContextsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ContextsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ContextsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ContextsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ContextsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // contextsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -225,6 +268,10 @@ type contextsGRPCClient struct { // The gRPC API client. contextsClient dialogflowpb.ContextsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -259,6 +306,8 @@ func NewContextsClient(ctx context.Context, opts ...option.ClientOption) (*Conte disableDeadlines: disableDeadlines, contextsClient: dialogflowpb.NewContextsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -269,7 +318,8 @@ func NewContextsClient(ctx context.Context, opts ...option.ClientOption) (*Conte // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *contextsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -436,6 +486,143 @@ func (c *contextsGRPCClient) DeleteAllContexts(ctx context.Context, req *dialogf return err } +func (c *contextsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *contextsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *contextsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ContextIterator manages a stream of *dialogflowpb.Context. type ContextIterator struct { items []*dialogflowpb.Context diff --git a/dialogflow/apiv2/contexts_client_example_test.go b/dialogflow/apiv2/contexts_client_example_test.go index d1c7f367edd4..3986e9dbd7a6 100644 --- a/dialogflow/apiv2/contexts_client_example_test.go +++ b/dialogflow/apiv2/contexts_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewContextsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewContextsClient() { func ExampleContextsClient_ListContexts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleContextsClient_ListContexts() { func ExampleContextsClient_GetContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleContextsClient_GetContext() { func ExampleContextsClient_CreateContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleContextsClient_CreateContext() { func ExampleContextsClient_UpdateContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleContextsClient_UpdateContext() { func ExampleContextsClient_DeleteContext() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +174,11 @@ func ExampleContextsClient_DeleteContext() { func ExampleContextsClient_DeleteAllContexts() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewContextsClient(ctx) if err != nil { // TODO: Handle error. @@ -157,3 +194,138 @@ func ExampleContextsClient_DeleteAllContexts() { // TODO: Handle error. } } + +func ExampleContextsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleContextsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleContextsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/conversation_datasets_client.go b/dialogflow/apiv2/conversation_datasets_client.go index 725413bd100a..80b1bd13ca29 100644 --- a/dialogflow/apiv2/conversation_datasets_client.go +++ b/dialogflow/apiv2/conversation_datasets_client.go @@ -31,6 +31,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -47,6 +48,11 @@ type ConversationDatasetsCallOptions struct { ListConversationDatasets []gax.CallOption DeleteConversationDataset []gax.CallOption ImportConversationData []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultConversationDatasetsGRPCClientOptions() []option.ClientOption { @@ -118,6 +124,11 @@ func defaultConversationDatasetsCallOptions() *ConversationDatasetsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -134,6 +145,11 @@ type internalConversationDatasetsClient interface { DeleteConversationDatasetOperation(name string) *DeleteConversationDatasetOperation ImportConversationData(context.Context, *dialogflowpb.ImportConversationDataRequest, ...gax.CallOption) (*ImportConversationDataOperation, error) ImportConversationDataOperation(name string) *ImportConversationDataOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ConversationDatasetsClient is a client for interacting with Dialogflow API. @@ -173,7 +189,8 @@ func (c *ConversationDatasetsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ConversationDatasetsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -184,9 +201,9 @@ func (c *ConversationDatasetsClient) Connection() *grpc.ClientConn { // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: CreateConversationDatasetOperationMetadata +// metadata: CreateConversationDatasetOperationMetadata // -// response: ConversationDataset +// response: ConversationDataset func (c *ConversationDatasetsClient) CreateConversationDataset(ctx context.Context, req *dialogflowpb.CreateConversationDatasetRequest, opts ...gax.CallOption) (*CreateConversationDatasetOperation, error) { return c.internalClient.CreateConversationDataset(ctx, req, opts...) } @@ -214,10 +231,10 @@ func (c *ConversationDatasetsClient) ListConversationDatasets(ctx context.Contex // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: DeleteConversationDatasetOperationMetadata +// metadata: DeleteConversationDatasetOperationMetadata // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) func (c *ConversationDatasetsClient) DeleteConversationDataset(ctx context.Context, req *dialogflowpb.DeleteConversationDatasetRequest, opts ...gax.CallOption) (*DeleteConversationDatasetOperation, error) { return c.internalClient.DeleteConversationDataset(ctx, req, opts...) } @@ -236,9 +253,9 @@ func (c *ConversationDatasetsClient) DeleteConversationDatasetOperation(name str // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: ImportConversationDataOperationMetadata +// metadata: ImportConversationDataOperationMetadata // -// response: ImportConversationDataOperationResponse +// response: ImportConversationDataOperationResponse func (c *ConversationDatasetsClient) ImportConversationData(ctx context.Context, req *dialogflowpb.ImportConversationDataRequest, opts ...gax.CallOption) (*ImportConversationDataOperation, error) { return c.internalClient.ImportConversationData(ctx, req, opts...) } @@ -249,6 +266,31 @@ func (c *ConversationDatasetsClient) ImportConversationDataOperation(name string return c.internalClient.ImportConversationDataOperation(name) } +// GetLocation gets information about a location. +func (c *ConversationDatasetsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ConversationDatasetsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ConversationDatasetsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ConversationDatasetsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ConversationDatasetsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // conversationDatasetsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -270,6 +312,10 @@ type conversationDatasetsGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -307,6 +353,8 @@ func NewConversationDatasetsClient(ctx context.Context, opts ...option.ClientOpt disableDeadlines: disableDeadlines, conversationDatasetsClient: dialogflowpb.NewConversationDatasetsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -328,7 +376,8 @@ func NewConversationDatasetsClient(ctx context.Context, opts ...option.ClientOpt // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *conversationDatasetsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -487,6 +536,143 @@ func (c *conversationDatasetsGRPCClient) ImportConversationData(ctx context.Cont }, nil } +func (c *conversationDatasetsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationDatasetsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationDatasetsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationDatasetsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationDatasetsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateConversationDatasetOperation manages a long-running operation from CreateConversationDataset. type CreateConversationDatasetOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/conversation_datasets_client_example_test.go b/dialogflow/apiv2/conversation_datasets_client_example_test.go index 4e17967db3a7..54b60f519022 100644 --- a/dialogflow/apiv2/conversation_datasets_client_example_test.go +++ b/dialogflow/apiv2/conversation_datasets_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewConversationDatasetsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationDatasetsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewConversationDatasetsClient() { func ExampleConversationDatasetsClient_CreateConversationDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationDatasetsClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +75,11 @@ func ExampleConversationDatasetsClient_CreateConversationDataset() { func ExampleConversationDatasetsClient_GetConversationDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationDatasetsClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +100,11 @@ func ExampleConversationDatasetsClient_GetConversationDataset() { func ExampleConversationDatasetsClient_ListConversationDatasets() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationDatasetsClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +131,11 @@ func ExampleConversationDatasetsClient_ListConversationDatasets() { func ExampleConversationDatasetsClient_DeleteConversationDataset() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationDatasetsClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +159,11 @@ func ExampleConversationDatasetsClient_DeleteConversationDataset() { func ExampleConversationDatasetsClient_ImportConversationData() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationDatasetsClient(ctx) if err != nil { // TODO: Handle error. @@ -154,3 +186,138 @@ func ExampleConversationDatasetsClient_ImportConversationData() { // TODO: Use resp. _ = resp } + +func ExampleConversationDatasetsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationDatasetsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationDatasetsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationDatasetsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationDatasetsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationDatasetsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationDatasetsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationDatasetsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationDatasetsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationDatasetsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/conversation_models_client.go b/dialogflow/apiv2/conversation_models_client.go index 523f9412a9d2..aa233f352eba 100644 --- a/dialogflow/apiv2/conversation_models_client.go +++ b/dialogflow/apiv2/conversation_models_client.go @@ -31,6 +31,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -51,6 +52,11 @@ type ConversationModelsCallOptions struct { GetConversationModelEvaluation []gax.CallOption ListConversationModelEvaluations []gax.CallOption CreateConversationModelEvaluation []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultConversationModelsGRPCClientOptions() []option.ClientOption { @@ -166,6 +172,11 @@ func defaultConversationModelsCallOptions() *ConversationModelsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -188,6 +199,11 @@ type internalConversationModelsClient interface { ListConversationModelEvaluations(context.Context, *dialogflowpb.ListConversationModelEvaluationsRequest, ...gax.CallOption) *ConversationModelEvaluationIterator CreateConversationModelEvaluation(context.Context, *dialogflowpb.CreateConversationModelEvaluationRequest, ...gax.CallOption) (*CreateConversationModelEvaluationOperation, error) CreateConversationModelEvaluationOperation(name string) *CreateConversationModelEvaluationOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ConversationModelsClient is a client for interacting with Dialogflow API. @@ -224,7 +240,8 @@ func (c *ConversationModelsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ConversationModelsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -235,9 +252,9 @@ func (c *ConversationModelsClient) Connection() *grpc.ClientConn { // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: CreateConversationModelOperationMetadata +// metadata: CreateConversationModelOperationMetadata // -// response: ConversationModel +// response: ConversationModel func (c *ConversationModelsClient) CreateConversationModel(ctx context.Context, req *dialogflowpb.CreateConversationModelRequest, opts ...gax.CallOption) (*CreateConversationModelOperation, error) { return c.internalClient.CreateConversationModel(ctx, req, opts...) } @@ -264,10 +281,10 @@ func (c *ConversationModelsClient) ListConversationModels(ctx context.Context, r // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: DeleteConversationModelOperationMetadata +// metadata: DeleteConversationModelOperationMetadata // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) func (c *ConversationModelsClient) DeleteConversationModel(ctx context.Context, req *dialogflowpb.DeleteConversationModelRequest, opts ...gax.CallOption) (*DeleteConversationModelOperation, error) { return c.internalClient.DeleteConversationModel(ctx, req, opts...) } @@ -287,10 +304,10 @@ func (c *ConversationModelsClient) DeleteConversationModelOperation(name string) // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: DeployConversationModelOperationMetadata +// metadata: DeployConversationModelOperationMetadata // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) func (c *ConversationModelsClient) DeployConversationModel(ctx context.Context, req *dialogflowpb.DeployConversationModelRequest, opts ...gax.CallOption) (*DeployConversationModelOperation, error) { return c.internalClient.DeployConversationModel(ctx, req, opts...) } @@ -304,17 +321,17 @@ func (c *ConversationModelsClient) DeployConversationModelOperation(name string) // UndeployConversationModel undeploys a model. If the model is not deployed this method has no effect. // If the model is currently being used: // -// For article suggestion, article suggestion will fallback to the default -// model if model is undeployed. +// For article suggestion, article suggestion will fallback to the default +// model if model is undeployed. // // This method is a long-running // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: UndeployConversationModelOperationMetadata +// metadata: UndeployConversationModelOperationMetadata // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) func (c *ConversationModelsClient) UndeployConversationModel(ctx context.Context, req *dialogflowpb.UndeployConversationModelRequest, opts ...gax.CallOption) (*UndeployConversationModelOperation, error) { return c.internalClient.UndeployConversationModel(ctx, req, opts...) } @@ -346,6 +363,31 @@ func (c *ConversationModelsClient) CreateConversationModelEvaluationOperation(na return c.internalClient.CreateConversationModelEvaluationOperation(name) } +// GetLocation gets information about a location. +func (c *ConversationModelsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ConversationModelsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ConversationModelsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ConversationModelsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ConversationModelsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // conversationModelsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -367,6 +409,10 @@ type conversationModelsGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -401,6 +447,8 @@ func NewConversationModelsClient(ctx context.Context, opts ...option.ClientOptio disableDeadlines: disableDeadlines, conversationModelsClient: dialogflowpb.NewConversationModelsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -422,7 +470,8 @@ func NewConversationModelsClient(ctx context.Context, opts ...option.ClientOptio // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *conversationModelsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -696,6 +745,143 @@ func (c *conversationModelsGRPCClient) CreateConversationModelEvaluation(ctx con }, nil } +func (c *conversationModelsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationModelsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationModelsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationModelsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationModelsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateConversationModelOperation manages a long-running operation from CreateConversationModel. type CreateConversationModelOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/conversation_models_client_example_test.go b/dialogflow/apiv2/conversation_models_client_example_test.go index b38f8bbe4557..369014cda6ea 100644 --- a/dialogflow/apiv2/conversation_models_client_example_test.go +++ b/dialogflow/apiv2/conversation_models_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewConversationModelsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewConversationModelsClient() { func ExampleConversationModelsClient_CreateConversationModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -63,6 +75,11 @@ func ExampleConversationModelsClient_CreateConversationModel() { func ExampleConversationModelsClient_GetConversationModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -83,6 +100,11 @@ func ExampleConversationModelsClient_GetConversationModel() { func ExampleConversationModelsClient_ListConversationModels() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +131,11 @@ func ExampleConversationModelsClient_ListConversationModels() { func ExampleConversationModelsClient_DeleteConversationModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +159,11 @@ func ExampleConversationModelsClient_DeleteConversationModel() { func ExampleConversationModelsClient_DeployConversationModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -155,6 +187,11 @@ func ExampleConversationModelsClient_DeployConversationModel() { func ExampleConversationModelsClient_UndeployConversationModel() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -178,6 +215,11 @@ func ExampleConversationModelsClient_UndeployConversationModel() { func ExampleConversationModelsClient_GetConversationModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -198,6 +240,11 @@ func ExampleConversationModelsClient_GetConversationModelEvaluation() { func ExampleConversationModelsClient_ListConversationModelEvaluations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -224,6 +271,11 @@ func ExampleConversationModelsClient_ListConversationModelEvaluations() { func ExampleConversationModelsClient_CreateConversationModelEvaluation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationModelsClient(ctx) if err != nil { // TODO: Handle error. @@ -246,3 +298,138 @@ func ExampleConversationModelsClient_CreateConversationModelEvaluation() { // TODO: Use resp. _ = resp } + +func ExampleConversationModelsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationModelsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationModelsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationModelsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationModelsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationModelsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationModelsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationModelsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationModelsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationModelsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/conversation_profiles_client.go b/dialogflow/apiv2/conversation_profiles_client.go index 299ce1b6032c..deae05c8c18e 100644 --- a/dialogflow/apiv2/conversation_profiles_client.go +++ b/dialogflow/apiv2/conversation_profiles_client.go @@ -31,6 +31,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -49,6 +50,11 @@ type ConversationProfilesCallOptions struct { DeleteConversationProfile []gax.CallOption SetSuggestionFeatureConfig []gax.CallOption ClearSuggestionFeatureConfig []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultConversationProfilesGRPCClientOptions() []option.ClientOption { @@ -142,6 +148,11 @@ func defaultConversationProfilesCallOptions() *ConversationProfilesCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -159,6 +170,11 @@ type internalConversationProfilesClient interface { SetSuggestionFeatureConfigOperation(name string) *SetSuggestionFeatureConfigOperation ClearSuggestionFeatureConfig(context.Context, *dialogflowpb.ClearSuggestionFeatureConfigRequest, ...gax.CallOption) (*ClearSuggestionFeatureConfigOperation, error) ClearSuggestionFeatureConfigOperation(name string) *ClearSuggestionFeatureConfigOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ConversationProfilesClient is a client for interacting with Dialogflow API. @@ -195,7 +211,8 @@ func (c *ConversationProfilesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ConversationProfilesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -242,9 +259,9 @@ func (c *ConversationProfilesClient) DeleteConversationProfile(ctx context.Conte // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: SetSuggestionFeatureConfigOperationMetadata +// metadata: SetSuggestionFeatureConfigOperationMetadata // -// response: ConversationProfile +// response: ConversationProfile // // If a long running operation to add or update suggestion feature // config for the same conversation profile, participant role and suggestion @@ -267,9 +284,9 @@ func (c *ConversationProfilesClient) SetSuggestionFeatureConfigOperation(name st // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: ClearSuggestionFeatureConfigOperationMetadata +// metadata: ClearSuggestionFeatureConfigOperationMetadata // -// response: ConversationProfile +// response: ConversationProfile func (c *ConversationProfilesClient) ClearSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.ClearSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*ClearSuggestionFeatureConfigOperation, error) { return c.internalClient.ClearSuggestionFeatureConfig(ctx, req, opts...) } @@ -280,6 +297,31 @@ func (c *ConversationProfilesClient) ClearSuggestionFeatureConfigOperation(name return c.internalClient.ClearSuggestionFeatureConfigOperation(name) } +// GetLocation gets information about a location. +func (c *ConversationProfilesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ConversationProfilesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ConversationProfilesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ConversationProfilesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ConversationProfilesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // conversationProfilesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -301,6 +343,10 @@ type conversationProfilesGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -335,6 +381,8 @@ func NewConversationProfilesClient(ctx context.Context, opts ...option.ClientOpt disableDeadlines: disableDeadlines, conversationProfilesClient: dialogflowpb.NewConversationProfilesClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -356,7 +404,8 @@ func NewConversationProfilesClient(ctx context.Context, opts ...option.ClientOpt // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *conversationProfilesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -553,6 +602,143 @@ func (c *conversationProfilesGRPCClient) ClearSuggestionFeatureConfig(ctx contex }, nil } +func (c *conversationProfilesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationProfilesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationProfilesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ClearSuggestionFeatureConfigOperation manages a long-running operation from ClearSuggestionFeatureConfig. type ClearSuggestionFeatureConfigOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/conversation_profiles_client_example_test.go b/dialogflow/apiv2/conversation_profiles_client_example_test.go index 2a7fdf59b69e..d2f2a51a71d8 100644 --- a/dialogflow/apiv2/conversation_profiles_client_example_test.go +++ b/dialogflow/apiv2/conversation_profiles_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewConversationProfilesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewConversationProfilesClient() { func ExampleConversationProfilesClient_ListConversationProfiles() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleConversationProfilesClient_ListConversationProfiles() { func ExampleConversationProfilesClient_GetConversationProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleConversationProfilesClient_GetConversationProfile() { func ExampleConversationProfilesClient_CreateConversationProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleConversationProfilesClient_CreateConversationProfile() { func ExampleConversationProfilesClient_UpdateConversationProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleConversationProfilesClient_UpdateConversationProfile() { func ExampleConversationProfilesClient_DeleteConversationProfile() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +174,11 @@ func ExampleConversationProfilesClient_DeleteConversationProfile() { func ExampleConversationProfilesClient_SetSuggestionFeatureConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +204,11 @@ func ExampleConversationProfilesClient_SetSuggestionFeatureConfig() { func ExampleConversationProfilesClient_ClearSuggestionFeatureConfig() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationProfilesClient(ctx) if err != nil { // TODO: Handle error. @@ -189,3 +231,138 @@ func ExampleConversationProfilesClient_ClearSuggestionFeatureConfig() { // TODO: Use resp. _ = resp } + +func ExampleConversationProfilesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationProfilesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationProfilesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/conversations_client.go b/dialogflow/apiv2/conversations_client.go index b04512978330..db4909cad03c 100644 --- a/dialogflow/apiv2/conversations_client.go +++ b/dialogflow/apiv2/conversations_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -44,6 +46,11 @@ type ConversationsCallOptions struct { GetConversation []gax.CallOption CompleteConversation []gax.CallOption ListMessages []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultConversationsGRPCClientOptions() []option.ClientOption { @@ -115,6 +122,11 @@ func defaultConversationsCallOptions() *ConversationsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -128,6 +140,11 @@ type internalConversationsClient interface { GetConversation(context.Context, *dialogflowpb.GetConversationRequest, ...gax.CallOption) (*dialogflowpb.Conversation, error) CompleteConversation(context.Context, *dialogflowpb.CompleteConversationRequest, ...gax.CallOption) (*dialogflowpb.Conversation, error) ListMessages(context.Context, *dialogflowpb.ListMessagesRequest, ...gax.CallOption) *MessageIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ConversationsClient is a client for interacting with Dialogflow API. @@ -159,7 +176,8 @@ func (c *ConversationsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ConversationsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -210,6 +228,31 @@ func (c *ConversationsClient) ListMessages(ctx context.Context, req *dialogflowp return c.internalClient.ListMessages(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *ConversationsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ConversationsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ConversationsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ConversationsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ConversationsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // conversationsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -226,6 +269,10 @@ type conversationsGRPCClient struct { // The gRPC API client. conversationsClient dialogflowpb.ConversationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -260,6 +307,8 @@ func NewConversationsClient(ctx context.Context, opts ...option.ClientOption) (* disableDeadlines: disableDeadlines, conversationsClient: dialogflowpb.NewConversationsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -270,7 +319,8 @@ func NewConversationsClient(ctx context.Context, opts ...option.ClientOption) (* // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *conversationsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -446,6 +496,143 @@ func (c *conversationsGRPCClient) ListMessages(ctx context.Context, req *dialogf return it } +func (c *conversationsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ConversationIterator manages a stream of *dialogflowpb.Conversation. type ConversationIterator struct { items []*dialogflowpb.Conversation diff --git a/dialogflow/apiv2/conversations_client_example_test.go b/dialogflow/apiv2/conversations_client_example_test.go index 329bd18f04f8..2414b5aa6070 100644 --- a/dialogflow/apiv2/conversations_client_example_test.go +++ b/dialogflow/apiv2/conversations_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewConversationsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewConversationsClient() { func ExampleConversationsClient_CreateConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationsClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +70,11 @@ func ExampleConversationsClient_CreateConversation() { func ExampleConversationsClient_ListConversations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleConversationsClient_ListConversations() { func ExampleConversationsClient_GetConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleConversationsClient_GetConversation() { func ExampleConversationsClient_CompleteConversation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleConversationsClient_CompleteConversation() { func ExampleConversationsClient_ListMessages() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewConversationsClient(ctx) if err != nil { // TODO: Handle error. @@ -147,3 +179,138 @@ func ExampleConversationsClient_ListMessages() { _ = resp } } + +func ExampleConversationsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/doc.go b/dialogflow/apiv2/doc.go index f3f9d84fbb35..ec9d51a9e3e3 100644 --- a/dialogflow/apiv2/doc.go +++ b/dialogflow/apiv2/doc.go @@ -20,45 +20,56 @@ // Builds conversational interfaces (for example, chatbots, and voice-powered // apps and devices). // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := dialogflow.NewAgentsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dialogflow.NewAgentsClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := dialogflow.NewAgentsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &dialogflowpb.GetAgentRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2#GetAgentRequest. -// } -// resp, err := c.GetAgent(ctx, req) -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dialogflow.NewAgentsClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dialogflowpb.GetAgentRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2#GetAgentRequest. +// } +// resp, err := c.GetAgent(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewAgentsClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/dialogflow/apiv2/documents_client.go b/dialogflow/apiv2/documents_client.go index 34056ef13ac0..63a67c3e1e30 100644 --- a/dialogflow/apiv2/documents_client.go +++ b/dialogflow/apiv2/documents_client.go @@ -31,6 +31,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -50,6 +51,11 @@ type DocumentsCallOptions struct { UpdateDocument []gax.CallOption ReloadDocument []gax.CallOption ExportDocument []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultDocumentsGRPCClientOptions() []option.ClientOption { @@ -154,6 +160,11 @@ func defaultDocumentsCallOptions() *DocumentsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -176,6 +187,11 @@ type internalDocumentsClient interface { ReloadDocumentOperation(name string) *ReloadDocumentOperation ExportDocument(context.Context, *dialogflowpb.ExportDocumentRequest, ...gax.CallOption) (*ExportDocumentOperation, error) ExportDocumentOperation(name string) *ExportDocumentOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // DocumentsClient is a client for interacting with Dialogflow API. @@ -212,7 +228,8 @@ func (c *DocumentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DocumentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -233,9 +250,9 @@ func (c *DocumentsClient) GetDocument(ctx context.Context, req *dialogflowpb.Get // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: KnowledgeOperationMetadata +// metadata: KnowledgeOperationMetadata // -// response: Document +// response: Document func (c *DocumentsClient) CreateDocument(ctx context.Context, req *dialogflowpb.CreateDocumentRequest, opts ...gax.CallOption) (*CreateDocumentOperation, error) { return c.internalClient.CreateDocument(ctx, req, opts...) } @@ -254,9 +271,9 @@ func (c *DocumentsClient) CreateDocumentOperation(name string) *CreateDocumentOp // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: KnowledgeOperationMetadata +// metadata: KnowledgeOperationMetadata // -// response: ImportDocumentsResponse +// response: ImportDocumentsResponse func (c *DocumentsClient) ImportDocuments(ctx context.Context, req *dialogflowpb.ImportDocumentsRequest, opts ...gax.CallOption) (*ImportDocumentsOperation, error) { return c.internalClient.ImportDocuments(ctx, req, opts...) } @@ -273,10 +290,10 @@ func (c *DocumentsClient) ImportDocumentsOperation(name string) *ImportDocuments // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: KnowledgeOperationMetadata +// metadata: KnowledgeOperationMetadata // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) func (c *DocumentsClient) DeleteDocument(ctx context.Context, req *dialogflowpb.DeleteDocumentRequest, opts ...gax.CallOption) (*DeleteDocumentOperation, error) { return c.internalClient.DeleteDocument(ctx, req, opts...) } @@ -293,9 +310,9 @@ func (c *DocumentsClient) DeleteDocumentOperation(name string) *DeleteDocumentOp // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: KnowledgeOperationMetadata +// metadata: KnowledgeOperationMetadata // -// response: Document +// response: Document func (c *DocumentsClient) UpdateDocument(ctx context.Context, req *dialogflowpb.UpdateDocumentRequest, opts ...gax.CallOption) (*UpdateDocumentOperation, error) { return c.internalClient.UpdateDocument(ctx, req, opts...) } @@ -315,9 +332,9 @@ func (c *DocumentsClient) UpdateDocumentOperation(name string) *UpdateDocumentOp // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: KnowledgeOperationMetadata +// metadata: KnowledgeOperationMetadata // -// response: Document +// response: Document // // Note: The projects.agent.knowledgeBases.documents resource is deprecated; // only use projects.knowledgeBases.documents. @@ -338,9 +355,9 @@ func (c *DocumentsClient) ReloadDocumentOperation(name string) *ReloadDocumentOp // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: KnowledgeOperationMetadata +// metadata: KnowledgeOperationMetadata // -// response: Document +// response: Document func (c *DocumentsClient) ExportDocument(ctx context.Context, req *dialogflowpb.ExportDocumentRequest, opts ...gax.CallOption) (*ExportDocumentOperation, error) { return c.internalClient.ExportDocument(ctx, req, opts...) } @@ -351,6 +368,31 @@ func (c *DocumentsClient) ExportDocumentOperation(name string) *ExportDocumentOp return c.internalClient.ExportDocumentOperation(name) } +// GetLocation gets information about a location. +func (c *DocumentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *DocumentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *DocumentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *DocumentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *DocumentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // documentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -372,6 +414,10 @@ type documentsGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -406,6 +452,8 @@ func NewDocumentsClient(ctx context.Context, opts ...option.ClientOption) (*Docu disableDeadlines: disableDeadlines, documentsClient: dialogflowpb.NewDocumentsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -427,7 +475,8 @@ func NewDocumentsClient(ctx context.Context, opts ...option.ClientOption) (*Docu // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *documentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -658,6 +707,143 @@ func (c *documentsGRPCClient) ExportDocument(ctx context.Context, req *dialogflo }, nil } +func (c *documentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *documentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *documentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *documentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *documentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // CreateDocumentOperation manages a long-running operation from CreateDocument. type CreateDocumentOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/documents_client_example_test.go b/dialogflow/apiv2/documents_client_example_test.go index bc58a3eb51da..f36335929f40 100644 --- a/dialogflow/apiv2/documents_client_example_test.go +++ b/dialogflow/apiv2/documents_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewDocumentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewDocumentsClient() { func ExampleDocumentsClient_ListDocuments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleDocumentsClient_ListDocuments() { func ExampleDocumentsClient_GetDocument() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleDocumentsClient_GetDocument() { func ExampleDocumentsClient_CreateDocument() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -109,6 +131,11 @@ func ExampleDocumentsClient_CreateDocument() { func ExampleDocumentsClient_ImportDocuments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -134,6 +161,11 @@ func ExampleDocumentsClient_ImportDocuments() { func ExampleDocumentsClient_DeleteDocument() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -157,6 +189,11 @@ func ExampleDocumentsClient_DeleteDocument() { func ExampleDocumentsClient_UpdateDocument() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -182,6 +219,11 @@ func ExampleDocumentsClient_UpdateDocument() { func ExampleDocumentsClient_ReloadDocument() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +249,11 @@ func ExampleDocumentsClient_ReloadDocument() { func ExampleDocumentsClient_ExportDocument() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewDocumentsClient(ctx) if err != nil { // TODO: Handle error. @@ -229,3 +276,138 @@ func ExampleDocumentsClient_ExportDocument() { // TODO: Use resp. _ = resp } + +func ExampleDocumentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDocumentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDocumentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/entity_types_client.go b/dialogflow/apiv2/entity_types_client.go index 8005e10d3e87..2ebd47a08bde 100644 --- a/dialogflow/apiv2/entity_types_client.go +++ b/dialogflow/apiv2/entity_types_client.go @@ -32,6 +32,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -53,6 +54,11 @@ type EntityTypesCallOptions struct { BatchCreateEntities []gax.CallOption BatchUpdateEntities []gax.CallOption BatchDeleteEntities []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultEntityTypesGRPCClientOptions() []option.ClientOption { @@ -179,6 +185,11 @@ func defaultEntityTypesCallOptions() *EntityTypesCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -202,6 +213,11 @@ type internalEntityTypesClient interface { BatchUpdateEntitiesOperation(name string) *BatchUpdateEntitiesOperation BatchDeleteEntities(context.Context, *dialogflowpb.BatchDeleteEntitiesRequest, ...gax.CallOption) (*BatchDeleteEntitiesOperation, error) BatchDeleteEntitiesOperation(name string) *BatchDeleteEntitiesOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // EntityTypesClient is a client for interacting with Dialogflow API. @@ -238,7 +254,8 @@ func (c *EntityTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *EntityTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -286,10 +303,10 @@ func (c *EntityTypesClient) DeleteEntityType(ctx context.Context, req *dialogflo // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: BatchUpdateEntityTypesResponse +// response: BatchUpdateEntityTypesResponse // // Note: You should always train an agent prior to sending it queries. See the // training @@ -310,11 +327,11 @@ func (c *EntityTypesClient) BatchUpdateEntityTypesOperation(name string) *BatchU // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train an agent prior to sending it queries. See the // training @@ -335,11 +352,11 @@ func (c *EntityTypesClient) BatchDeleteEntityTypesOperation(name string) *BatchD // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train an agent prior to sending it queries. See the // training @@ -362,11 +379,11 @@ func (c *EntityTypesClient) BatchCreateEntitiesOperation(name string) *BatchCrea // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train an agent prior to sending it queries. See the // training @@ -387,11 +404,11 @@ func (c *EntityTypesClient) BatchUpdateEntitiesOperation(name string) *BatchUpda // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train an agent prior to sending it queries. See the // training @@ -406,6 +423,31 @@ func (c *EntityTypesClient) BatchDeleteEntitiesOperation(name string) *BatchDele return c.internalClient.BatchDeleteEntitiesOperation(name) } +// GetLocation gets information about a location. +func (c *EntityTypesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *EntityTypesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *EntityTypesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *EntityTypesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *EntityTypesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // entityTypesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -427,6 +469,10 @@ type entityTypesGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -461,6 +507,8 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En disableDeadlines: disableDeadlines, entityTypesClient: dialogflowpb.NewEntityTypesClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -482,7 +530,8 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *entityTypesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -751,6 +800,143 @@ func (c *entityTypesGRPCClient) BatchDeleteEntities(ctx context.Context, req *di }, nil } +func (c *entityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *entityTypesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *entityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // BatchCreateEntitiesOperation manages a long-running operation from BatchCreateEntities. type BatchCreateEntitiesOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/entity_types_client_example_test.go b/dialogflow/apiv2/entity_types_client_example_test.go index 72fe4eb76bf2..238e2205b9ad 100644 --- a/dialogflow/apiv2/entity_types_client_example_test.go +++ b/dialogflow/apiv2/entity_types_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewEntityTypesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewEntityTypesClient() { func ExampleEntityTypesClient_ListEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleEntityTypesClient_ListEntityTypes() { func ExampleEntityTypesClient_GetEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleEntityTypesClient_GetEntityType() { func ExampleEntityTypesClient_CreateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleEntityTypesClient_CreateEntityType() { func ExampleEntityTypesClient_UpdateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleEntityTypesClient_UpdateEntityType() { func ExampleEntityTypesClient_DeleteEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +174,11 @@ func ExampleEntityTypesClient_DeleteEntityType() { func ExampleEntityTypesClient_BatchUpdateEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +204,11 @@ func ExampleEntityTypesClient_BatchUpdateEntityTypes() { func ExampleEntityTypesClient_BatchDeleteEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +232,11 @@ func ExampleEntityTypesClient_BatchDeleteEntityTypes() { func ExampleEntityTypesClient_BatchCreateEntities() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -213,6 +260,11 @@ func ExampleEntityTypesClient_BatchCreateEntities() { func ExampleEntityTypesClient_BatchUpdateEntities() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -236,6 +288,11 @@ func ExampleEntityTypesClient_BatchUpdateEntities() { func ExampleEntityTypesClient_BatchDeleteEntities() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -256,3 +313,138 @@ func ExampleEntityTypesClient_BatchDeleteEntities() { // TODO: Handle error. } } + +func ExampleEntityTypesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEntityTypesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/environments_client.go b/dialogflow/apiv2/environments_client.go index 727a6cedd20e..aa49b226bad7 100644 --- a/dialogflow/apiv2/environments_client.go +++ b/dialogflow/apiv2/environments_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -45,6 +47,11 @@ type EnvironmentsCallOptions struct { UpdateEnvironment []gax.CallOption DeleteEnvironment []gax.CallOption GetEnvironmentHistory []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultEnvironmentsGRPCClientOptions() []option.ClientOption { @@ -127,6 +134,11 @@ func defaultEnvironmentsCallOptions() *EnvironmentsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -141,6 +153,11 @@ type internalEnvironmentsClient interface { UpdateEnvironment(context.Context, *dialogflowpb.UpdateEnvironmentRequest, ...gax.CallOption) (*dialogflowpb.Environment, error) DeleteEnvironment(context.Context, *dialogflowpb.DeleteEnvironmentRequest, ...gax.CallOption) error GetEnvironmentHistory(context.Context, *dialogflowpb.GetEnvironmentHistoryRequest, ...gax.CallOption) *EnvironmentHistory_EntryIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // EnvironmentsClient is a client for interacting with Dialogflow API. @@ -172,7 +189,8 @@ func (c *EnvironmentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *EnvironmentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -218,6 +236,31 @@ func (c *EnvironmentsClient) GetEnvironmentHistory(ctx context.Context, req *dia return c.internalClient.GetEnvironmentHistory(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *EnvironmentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *EnvironmentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *EnvironmentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *EnvironmentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *EnvironmentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // environmentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -234,6 +277,10 @@ type environmentsGRPCClient struct { // The gRPC API client. environmentsClient dialogflowpb.EnvironmentsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -268,6 +315,8 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E disableDeadlines: disableDeadlines, environmentsClient: dialogflowpb.NewEnvironmentsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -278,7 +327,8 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *environmentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -472,6 +522,143 @@ func (c *environmentsGRPCClient) GetEnvironmentHistory(ctx context.Context, req return it } +func (c *environmentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *environmentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // EnvironmentHistory_EntryIterator manages a stream of *dialogflowpb.EnvironmentHistory_Entry. type EnvironmentHistory_EntryIterator struct { items []*dialogflowpb.EnvironmentHistory_Entry diff --git a/dialogflow/apiv2/environments_client_example_test.go b/dialogflow/apiv2/environments_client_example_test.go index eccbc1874dbc..649980bd1c34 100644 --- a/dialogflow/apiv2/environments_client_example_test.go +++ b/dialogflow/apiv2/environments_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewEnvironmentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewEnvironmentsClient() { func ExampleEnvironmentsClient_ListEnvironments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleEnvironmentsClient_ListEnvironments() { func ExampleEnvironmentsClient_GetEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleEnvironmentsClient_GetEnvironment() { func ExampleEnvironmentsClient_CreateEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleEnvironmentsClient_CreateEnvironment() { func ExampleEnvironmentsClient_UpdateEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleEnvironmentsClient_UpdateEnvironment() { func ExampleEnvironmentsClient_DeleteEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +174,11 @@ func ExampleEnvironmentsClient_DeleteEnvironment() { func ExampleEnvironmentsClient_GetEnvironmentHistory() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -165,3 +202,138 @@ func ExampleEnvironmentsClient_GetEnvironmentHistory() { _ = resp } } + +func ExampleEnvironmentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEnvironmentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEnvironmentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/fulfillments_client.go b/dialogflow/apiv2/fulfillments_client.go index 8df0ddece04f..a5aa421b1f67 100644 --- a/dialogflow/apiv2/fulfillments_client.go +++ b/dialogflow/apiv2/fulfillments_client.go @@ -24,13 +24,17 @@ import ( "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" ) var newFulfillmentsClientHook clientHook @@ -39,6 +43,11 @@ var newFulfillmentsClientHook clientHook type FulfillmentsCallOptions struct { GetFulfillment []gax.CallOption UpdateFulfillment []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultFulfillmentsGRPCClientOptions() []option.ClientOption { @@ -77,6 +86,11 @@ func defaultFulfillmentsCallOptions() *FulfillmentsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -87,6 +101,11 @@ type internalFulfillmentsClient interface { Connection() *grpc.ClientConn GetFulfillment(context.Context, *dialogflowpb.GetFulfillmentRequest, ...gax.CallOption) (*dialogflowpb.Fulfillment, error) UpdateFulfillment(context.Context, *dialogflowpb.UpdateFulfillmentRequest, ...gax.CallOption) (*dialogflowpb.Fulfillment, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // FulfillmentsClient is a client for interacting with Dialogflow API. @@ -118,7 +137,8 @@ func (c *FulfillmentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FulfillmentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -133,6 +153,31 @@ func (c *FulfillmentsClient) UpdateFulfillment(ctx context.Context, req *dialogf return c.internalClient.UpdateFulfillment(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *FulfillmentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *FulfillmentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *FulfillmentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *FulfillmentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *FulfillmentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // fulfillmentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -149,6 +194,10 @@ type fulfillmentsGRPCClient struct { // The gRPC API client. fulfillmentsClient dialogflowpb.FulfillmentsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -183,6 +232,8 @@ func NewFulfillmentsClient(ctx context.Context, opts ...option.ClientOption) (*F disableDeadlines: disableDeadlines, fulfillmentsClient: dialogflowpb.NewFulfillmentsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -193,7 +244,8 @@ func NewFulfillmentsClient(ctx context.Context, opts ...option.ClientOption) (*F // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *fulfillmentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -256,3 +308,140 @@ func (c *fulfillmentsGRPCClient) UpdateFulfillment(ctx context.Context, req *dia } return resp, nil } + +func (c *fulfillmentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *fulfillmentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *fulfillmentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *fulfillmentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *fulfillmentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/dialogflow/apiv2/fulfillments_client_example_test.go b/dialogflow/apiv2/fulfillments_client_example_test.go index 97b32c101941..9959b5dff402 100644 --- a/dialogflow/apiv2/fulfillments_client_example_test.go +++ b/dialogflow/apiv2/fulfillments_client_example_test.go @@ -20,11 +20,19 @@ import ( "context" dialogflow "cloud.google.com/go/dialogflow/apiv2" + "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewFulfillmentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewFulfillmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -37,6 +45,11 @@ func ExampleNewFulfillmentsClient() { func ExampleFulfillmentsClient_GetFulfillment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewFulfillmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -57,6 +70,11 @@ func ExampleFulfillmentsClient_GetFulfillment() { func ExampleFulfillmentsClient_UpdateFulfillment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewFulfillmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -74,3 +92,138 @@ func ExampleFulfillmentsClient_UpdateFulfillment() { // TODO: Use resp. _ = resp } + +func ExampleFulfillmentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFulfillmentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleFulfillmentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleFulfillmentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFulfillmentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/gapic_metadata.json b/dialogflow/apiv2/gapic_metadata.json index 63f5ceb2214b..87ee11c5f3e5 100644 --- a/dialogflow/apiv2/gapic_metadata.json +++ b/dialogflow/apiv2/gapic_metadata.json @@ -10,6 +10,11 @@ "grpc": { "libraryClient": "AgentsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "DeleteAgent": { "methods": [ "DeleteAgent" @@ -25,6 +30,16 @@ "GetAgent" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetValidationResult": { "methods": [ "GetValidationResult" @@ -35,6 +50,16 @@ "ImportAgent" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "RestoreAgent": { "methods": [ "RestoreAgent" @@ -64,11 +89,36 @@ "grpc": { "libraryClient": "AnswerRecordsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListAnswerRecords": { "methods": [ "ListAnswerRecords" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateAnswerRecord": { "methods": [ "UpdateAnswerRecord" @@ -83,6 +133,11 @@ "grpc": { "libraryClient": "ContextsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateContext": { "methods": [ "CreateContext" @@ -103,11 +158,31 @@ "GetContext" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListContexts": { "methods": [ "ListContexts" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateContext": { "methods": [ "UpdateContext" @@ -122,6 +197,11 @@ "grpc": { "libraryClient": "ConversationDatasetsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateConversationDataset": { "methods": [ "CreateConversationDataset" @@ -137,6 +217,16 @@ "GetConversationDataset" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ImportConversationData": { "methods": [ "ImportConversationData" @@ -146,6 +236,16 @@ "methods": [ "ListConversationDatasets" ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] } } } @@ -156,6 +256,11 @@ "grpc": { "libraryClient": "ConversationModelsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateConversationModel": { "methods": [ "CreateConversationModel" @@ -186,6 +291,16 @@ "GetConversationModelEvaluation" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListConversationModelEvaluations": { "methods": [ "ListConversationModelEvaluations" @@ -196,6 +311,16 @@ "ListConversationModels" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UndeployConversationModel": { "methods": [ "UndeployConversationModel" @@ -210,6 +335,11 @@ "grpc": { "libraryClient": "ConversationProfilesClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "ClearSuggestionFeatureConfig": { "methods": [ "ClearSuggestionFeatureConfig" @@ -230,11 +360,31 @@ "GetConversationProfile" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListConversationProfiles": { "methods": [ "ListConversationProfiles" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "SetSuggestionFeatureConfig": { "methods": [ "SetSuggestionFeatureConfig" @@ -254,6 +404,11 @@ "grpc": { "libraryClient": "ConversationsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CompleteConversation": { "methods": [ "CompleteConversation" @@ -269,15 +424,35 @@ "GetConversation" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListConversations": { "methods": [ "ListConversations" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, "ListMessages": { "methods": [ "ListMessages" ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] } } } @@ -288,6 +463,11 @@ "grpc": { "libraryClient": "DocumentsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateDocument": { "methods": [ "CreateDocument" @@ -308,6 +488,16 @@ "GetDocument" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ImportDocuments": { "methods": [ "ImportDocuments" @@ -318,6 +508,16 @@ "ListDocuments" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ReloadDocument": { "methods": [ "ReloadDocument" @@ -362,6 +562,11 @@ "BatchUpdateEntityTypes" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateEntityType": { "methods": [ "CreateEntityType" @@ -377,11 +582,31 @@ "GetEntityType" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListEntityTypes": { "methods": [ "ListEntityTypes" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateEntityType": { "methods": [ "UpdateEntityType" @@ -396,6 +621,11 @@ "grpc": { "libraryClient": "EnvironmentsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateEnvironment": { "methods": [ "CreateEnvironment" @@ -416,11 +646,31 @@ "GetEnvironmentHistory" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListEnvironments": { "methods": [ "ListEnvironments" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateEnvironment": { "methods": [ "UpdateEnvironment" @@ -435,11 +685,36 @@ "grpc": { "libraryClient": "FulfillmentsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "GetFulfillment": { "methods": [ "GetFulfillment" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateFulfillment": { "methods": [ "UpdateFulfillment" @@ -464,6 +739,11 @@ "BatchUpdateIntents" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateIntent": { "methods": [ "CreateIntent" @@ -479,11 +759,31 @@ "GetIntent" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListIntents": { "methods": [ "ListIntents" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateIntent": { "methods": [ "UpdateIntent" @@ -498,6 +798,11 @@ "grpc": { "libraryClient": "KnowledgeBasesClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateKnowledgeBase": { "methods": [ "CreateKnowledgeBase" @@ -513,11 +818,31 @@ "GetKnowledgeBase" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListKnowledgeBases": { "methods": [ "ListKnowledgeBases" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "UpdateKnowledgeBase": { "methods": [ "UpdateKnowledgeBase" @@ -537,16 +862,41 @@ "AnalyzeContent" ] }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateParticipant": { "methods": [ "CreateParticipant" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetParticipant": { "methods": [ "GetParticipant" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListParticipants": { "methods": [ "ListParticipants" @@ -581,6 +931,11 @@ "grpc": { "libraryClient": "SessionEntityTypesClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateSessionEntityType": { "methods": [ "CreateSessionEntityType" @@ -591,11 +946,31 @@ "DeleteSessionEntityType" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetSessionEntityType": { "methods": [ "GetSessionEntityType" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListSessionEntityTypes": { "methods": [ "ListSessionEntityTypes" @@ -615,11 +990,36 @@ "grpc": { "libraryClient": "SessionsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "DetectIntent": { "methods": [ "DetectIntent" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "StreamingDetectIntent": { "methods": [ "StreamingDetectIntent" @@ -634,6 +1034,11 @@ "grpc": { "libraryClient": "VersionsClient", "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, "CreateVersion": { "methods": [ "CreateVersion" @@ -644,11 +1049,31 @@ "DeleteVersion" ] }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetVersion": { "methods": [ "GetVersion" ] }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, "ListVersions": { "methods": [ "ListVersions" diff --git a/dialogflow/apiv2/intents_client.go b/dialogflow/apiv2/intents_client.go index 9e226ef5a6e9..f23b7ee72c49 100644 --- a/dialogflow/apiv2/intents_client.go +++ b/dialogflow/apiv2/intents_client.go @@ -32,6 +32,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -50,6 +51,11 @@ type IntentsCallOptions struct { DeleteIntent []gax.CallOption BatchUpdateIntents []gax.CallOption BatchDeleteIntents []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultIntentsGRPCClientOptions() []option.ClientOption { @@ -143,6 +149,11 @@ func defaultIntentsCallOptions() *IntentsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -160,6 +171,11 @@ type internalIntentsClient interface { BatchUpdateIntentsOperation(name string) *BatchUpdateIntentsOperation BatchDeleteIntents(context.Context, *dialogflowpb.BatchDeleteIntentsRequest, ...gax.CallOption) (*BatchDeleteIntentsOperation, error) BatchDeleteIntentsOperation(name string) *BatchDeleteIntentsOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // IntentsClient is a client for interacting with Dialogflow API. @@ -196,7 +212,8 @@ func (c *IntentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *IntentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -244,10 +261,10 @@ func (c *IntentsClient) DeleteIntent(ctx context.Context, req *dialogflowpb.Dele // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: BatchUpdateIntentsResponse +// response: BatchUpdateIntentsResponse // // Note: You should always train an agent prior to sending it queries. See the // training @@ -268,11 +285,11 @@ func (c *IntentsClient) BatchUpdateIntentsOperation(name string) *BatchUpdateInt // operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train an agent prior to sending it queries. See the // training @@ -287,6 +304,31 @@ func (c *IntentsClient) BatchDeleteIntentsOperation(name string) *BatchDeleteInt return c.internalClient.BatchDeleteIntentsOperation(name) } +// GetLocation gets information about a location. +func (c *IntentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *IntentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *IntentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *IntentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *IntentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // intentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -308,6 +350,10 @@ type intentsGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -342,6 +388,8 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent disableDeadlines: disableDeadlines, intentsClient: dialogflowpb.NewIntentsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -363,7 +411,8 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *intentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -560,6 +609,143 @@ func (c *intentsGRPCClient) BatchDeleteIntents(ctx context.Context, req *dialogf }, nil } +func (c *intentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *intentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *intentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // BatchDeleteIntentsOperation manages a long-running operation from BatchDeleteIntents. type BatchDeleteIntentsOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/intents_client_example_test.go b/dialogflow/apiv2/intents_client_example_test.go index d7e8e839bdb9..5f0ff5ae0413 100644 --- a/dialogflow/apiv2/intents_client_example_test.go +++ b/dialogflow/apiv2/intents_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewIntentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewIntentsClient() { func ExampleIntentsClient_ListIntents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleIntentsClient_ListIntents() { func ExampleIntentsClient_GetIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleIntentsClient_GetIntent() { func ExampleIntentsClient_CreateIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleIntentsClient_CreateIntent() { func ExampleIntentsClient_UpdateIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleIntentsClient_UpdateIntent() { func ExampleIntentsClient_DeleteIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -142,6 +174,11 @@ func ExampleIntentsClient_DeleteIntent() { func ExampleIntentsClient_BatchUpdateIntents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +204,11 @@ func ExampleIntentsClient_BatchUpdateIntents() { func ExampleIntentsClient_BatchDeleteIntents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -187,3 +229,138 @@ func ExampleIntentsClient_BatchDeleteIntents() { // TODO: Handle error. } } + +func ExampleIntentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleIntentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleIntentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/knowledge_bases_client.go b/dialogflow/apiv2/knowledge_bases_client.go index c55629c80696..645ac7ed5b4d 100644 --- a/dialogflow/apiv2/knowledge_bases_client.go +++ b/dialogflow/apiv2/knowledge_bases_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -44,6 +46,11 @@ type KnowledgeBasesCallOptions struct { CreateKnowledgeBase []gax.CallOption DeleteKnowledgeBase []gax.CallOption UpdateKnowledgeBase []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultKnowledgeBasesGRPCClientOptions() []option.ClientOption { @@ -115,6 +122,11 @@ func defaultKnowledgeBasesCallOptions() *KnowledgeBasesCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -128,6 +140,11 @@ type internalKnowledgeBasesClient interface { CreateKnowledgeBase(context.Context, *dialogflowpb.CreateKnowledgeBaseRequest, ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) DeleteKnowledgeBase(context.Context, *dialogflowpb.DeleteKnowledgeBaseRequest, ...gax.CallOption) error UpdateKnowledgeBase(context.Context, *dialogflowpb.UpdateKnowledgeBaseRequest, ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // KnowledgeBasesClient is a client for interacting with Dialogflow API. @@ -159,7 +176,8 @@ func (c *KnowledgeBasesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *KnowledgeBasesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -189,6 +207,31 @@ func (c *KnowledgeBasesClient) UpdateKnowledgeBase(ctx context.Context, req *dia return c.internalClient.UpdateKnowledgeBase(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *KnowledgeBasesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *KnowledgeBasesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *KnowledgeBasesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *KnowledgeBasesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *KnowledgeBasesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // knowledgeBasesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -205,6 +248,10 @@ type knowledgeBasesGRPCClient struct { // The gRPC API client. knowledgeBasesClient dialogflowpb.KnowledgeBasesClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -239,6 +286,8 @@ func NewKnowledgeBasesClient(ctx context.Context, opts ...option.ClientOption) ( disableDeadlines: disableDeadlines, knowledgeBasesClient: dialogflowpb.NewKnowledgeBasesClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -249,7 +298,8 @@ func NewKnowledgeBasesClient(ctx context.Context, opts ...option.ClientOption) ( // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *knowledgeBasesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -398,6 +448,143 @@ func (c *knowledgeBasesGRPCClient) UpdateKnowledgeBase(ctx context.Context, req return resp, nil } +func (c *knowledgeBasesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *knowledgeBasesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *knowledgeBasesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // KnowledgeBaseIterator manages a stream of *dialogflowpb.KnowledgeBase. type KnowledgeBaseIterator struct { items []*dialogflowpb.KnowledgeBase diff --git a/dialogflow/apiv2/knowledge_bases_client_example_test.go b/dialogflow/apiv2/knowledge_bases_client_example_test.go index 9c1a65e9558d..7eb72b7dfc70 100644 --- a/dialogflow/apiv2/knowledge_bases_client_example_test.go +++ b/dialogflow/apiv2/knowledge_bases_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewKnowledgeBasesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewKnowledgeBasesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewKnowledgeBasesClient() { func ExampleKnowledgeBasesClient_ListKnowledgeBases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewKnowledgeBasesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleKnowledgeBasesClient_ListKnowledgeBases() { func ExampleKnowledgeBasesClient_GetKnowledgeBase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewKnowledgeBasesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleKnowledgeBasesClient_GetKnowledgeBase() { func ExampleKnowledgeBasesClient_CreateKnowledgeBase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewKnowledgeBasesClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleKnowledgeBasesClient_CreateKnowledgeBase() { func ExampleKnowledgeBasesClient_DeleteKnowledgeBase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewKnowledgeBasesClient(ctx) if err != nil { // TODO: Handle error. @@ -122,6 +149,11 @@ func ExampleKnowledgeBasesClient_DeleteKnowledgeBase() { func ExampleKnowledgeBasesClient_UpdateKnowledgeBase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewKnowledgeBasesClient(ctx) if err != nil { // TODO: Handle error. @@ -139,3 +171,138 @@ func ExampleKnowledgeBasesClient_UpdateKnowledgeBase() { // TODO: Use resp. _ = resp } + +func ExampleKnowledgeBasesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleKnowledgeBasesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleKnowledgeBasesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/mock_test.go b/dialogflow/apiv2/mock_test.go deleted file mode 100644 index 7242a10b24dc..000000000000 --- a/dialogflow/apiv2/mock_test.go +++ /dev/null @@ -1,3307 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by gapic-generator. DO NOT EDIT. - -package dialogflow - -import ( - "context" - "flag" - "fmt" - "io" - "log" - "net" - "os" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - emptypb "github.com/golang/protobuf/ptypes/empty" - "google.golang.org/api/option" - dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" - longrunningpb "google.golang.org/genproto/googleapis/longrunning" - - status "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - - gstatus "google.golang.org/grpc/status" -) - -var _ = io.EOF -var _ = ptypes.MarshalAny -var _ status.Status - -type mockAgentsServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dialogflowpb.AgentsServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockAgentsServer) GetAgent(ctx context.Context, req *dialogflowpb.GetAgentRequest) (*dialogflowpb.Agent, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Agent), nil -} - -func (s *mockAgentsServer) SetAgent(ctx context.Context, req *dialogflowpb.SetAgentRequest) (*dialogflowpb.Agent, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Agent), nil -} - -func (s *mockAgentsServer) DeleteAgent(ctx context.Context, req *dialogflowpb.DeleteAgentRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockAgentsServer) SearchAgents(ctx context.Context, req *dialogflowpb.SearchAgentsRequest) (*dialogflowpb.SearchAgentsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.SearchAgentsResponse), nil -} - -func (s *mockAgentsServer) TrainAgent(ctx context.Context, req *dialogflowpb.TrainAgentRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAgentsServer) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAgentsServer) ImportAgent(ctx context.Context, req *dialogflowpb.ImportAgentRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockAgentsServer) RestoreAgent(ctx context.Context, req *dialogflowpb.RestoreAgentRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -type mockContextsServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dialogflowpb.ContextsServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockContextsServer) ListContexts(ctx context.Context, req *dialogflowpb.ListContextsRequest) (*dialogflowpb.ListContextsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.ListContextsResponse), nil -} - -func (s *mockContextsServer) GetContext(ctx context.Context, req *dialogflowpb.GetContextRequest) (*dialogflowpb.Context, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Context), nil -} - -func (s *mockContextsServer) CreateContext(ctx context.Context, req *dialogflowpb.CreateContextRequest) (*dialogflowpb.Context, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Context), nil -} - -func (s *mockContextsServer) UpdateContext(ctx context.Context, req *dialogflowpb.UpdateContextRequest) (*dialogflowpb.Context, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Context), nil -} - -func (s *mockContextsServer) DeleteContext(ctx context.Context, req *dialogflowpb.DeleteContextRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockContextsServer) DeleteAllContexts(ctx context.Context, req *dialogflowpb.DeleteAllContextsRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -type mockEntityTypesServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dialogflowpb.EntityTypesServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockEntityTypesServer) ListEntityTypes(ctx context.Context, req *dialogflowpb.ListEntityTypesRequest) (*dialogflowpb.ListEntityTypesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.ListEntityTypesResponse), nil -} - -func (s *mockEntityTypesServer) GetEntityType(ctx context.Context, req *dialogflowpb.GetEntityTypeRequest) (*dialogflowpb.EntityType, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.EntityType), nil -} - -func (s *mockEntityTypesServer) CreateEntityType(ctx context.Context, req *dialogflowpb.CreateEntityTypeRequest) (*dialogflowpb.EntityType, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.EntityType), nil -} - -func (s *mockEntityTypesServer) UpdateEntityType(ctx context.Context, req *dialogflowpb.UpdateEntityTypeRequest) (*dialogflowpb.EntityType, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.EntityType), nil -} - -func (s *mockEntityTypesServer) DeleteEntityType(ctx context.Context, req *dialogflowpb.DeleteEntityTypeRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockEntityTypesServer) BatchUpdateEntityTypes(ctx context.Context, req *dialogflowpb.BatchUpdateEntityTypesRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockEntityTypesServer) BatchDeleteEntityTypes(ctx context.Context, req *dialogflowpb.BatchDeleteEntityTypesRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockEntityTypesServer) BatchCreateEntities(ctx context.Context, req *dialogflowpb.BatchCreateEntitiesRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockEntityTypesServer) BatchUpdateEntities(ctx context.Context, req *dialogflowpb.BatchUpdateEntitiesRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockEntityTypesServer) BatchDeleteEntities(ctx context.Context, req *dialogflowpb.BatchDeleteEntitiesRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -type mockIntentsServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dialogflowpb.IntentsServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockIntentsServer) ListIntents(ctx context.Context, req *dialogflowpb.ListIntentsRequest) (*dialogflowpb.ListIntentsResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.ListIntentsResponse), nil -} - -func (s *mockIntentsServer) GetIntent(ctx context.Context, req *dialogflowpb.GetIntentRequest) (*dialogflowpb.Intent, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Intent), nil -} - -func (s *mockIntentsServer) CreateIntent(ctx context.Context, req *dialogflowpb.CreateIntentRequest) (*dialogflowpb.Intent, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Intent), nil -} - -func (s *mockIntentsServer) UpdateIntent(ctx context.Context, req *dialogflowpb.UpdateIntentRequest) (*dialogflowpb.Intent, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.Intent), nil -} - -func (s *mockIntentsServer) DeleteIntent(ctx context.Context, req *dialogflowpb.DeleteIntentRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -func (s *mockIntentsServer) BatchUpdateIntents(ctx context.Context, req *dialogflowpb.BatchUpdateIntentsRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -func (s *mockIntentsServer) BatchDeleteIntents(ctx context.Context, req *dialogflowpb.BatchDeleteIntentsRequest) (*longrunningpb.Operation, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*longrunningpb.Operation), nil -} - -type mockSessionEntityTypesServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dialogflowpb.SessionEntityTypesServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockSessionEntityTypesServer) ListSessionEntityTypes(ctx context.Context, req *dialogflowpb.ListSessionEntityTypesRequest) (*dialogflowpb.ListSessionEntityTypesResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.ListSessionEntityTypesResponse), nil -} - -func (s *mockSessionEntityTypesServer) GetSessionEntityType(ctx context.Context, req *dialogflowpb.GetSessionEntityTypeRequest) (*dialogflowpb.SessionEntityType, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.SessionEntityType), nil -} - -func (s *mockSessionEntityTypesServer) CreateSessionEntityType(ctx context.Context, req *dialogflowpb.CreateSessionEntityTypeRequest) (*dialogflowpb.SessionEntityType, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.SessionEntityType), nil -} - -func (s *mockSessionEntityTypesServer) UpdateSessionEntityType(ctx context.Context, req *dialogflowpb.UpdateSessionEntityTypeRequest) (*dialogflowpb.SessionEntityType, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.SessionEntityType), nil -} - -func (s *mockSessionEntityTypesServer) DeleteSessionEntityType(ctx context.Context, req *dialogflowpb.DeleteSessionEntityTypeRequest) (*emptypb.Empty, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*emptypb.Empty), nil -} - -type mockSessionsServer struct { - // Embed for forward compatibility. - // Tests will keep working if more methods are added - // in the future. - dialogflowpb.SessionsServer - - reqs []proto.Message - - // If set, all calls return this error. - err error - - // responses to return if err == nil - resps []proto.Message -} - -func (s *mockSessionsServer) DetectIntent(ctx context.Context, req *dialogflowpb.DetectIntentRequest) (*dialogflowpb.DetectIntentResponse, error) { - md, _ := metadata.FromIncomingContext(ctx) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - s.reqs = append(s.reqs, req) - if s.err != nil { - return nil, s.err - } - return s.resps[0].(*dialogflowpb.DetectIntentResponse), nil -} - -func (s *mockSessionsServer) StreamingDetectIntent(stream dialogflowpb.Sessions_StreamingDetectIntentServer) error { - md, _ := metadata.FromIncomingContext(stream.Context()) - if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { - return fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) - } - for { - if req, err := stream.Recv(); err == io.EOF { - break - } else if err != nil { - return err - } else { - s.reqs = append(s.reqs, req) - } - } - if s.err != nil { - return s.err - } - for _, v := range s.resps { - if err := stream.Send(v.(*dialogflowpb.StreamingDetectIntentResponse)); err != nil { - return err - } - } - return nil -} - -// clientOpt is the option tests should use to connect to the test server. -// It is initialized by TestMain. -var clientOpt option.ClientOption - -var ( - mockAgents mockAgentsServer - mockContexts mockContextsServer - mockEntityTypes mockEntityTypesServer - mockIntents mockIntentsServer - mockSessionEntityTypes mockSessionEntityTypesServer - mockSessions mockSessionsServer -) - -func TestMain(m *testing.M) { - flag.Parse() - - serv := grpc.NewServer() - dialogflowpb.RegisterAgentsServer(serv, &mockAgents) - dialogflowpb.RegisterContextsServer(serv, &mockContexts) - dialogflowpb.RegisterEntityTypesServer(serv, &mockEntityTypes) - dialogflowpb.RegisterIntentsServer(serv, &mockIntents) - dialogflowpb.RegisterSessionEntityTypesServer(serv, &mockSessionEntityTypes) - dialogflowpb.RegisterSessionsServer(serv, &mockSessions) - - lis, err := net.Listen("tcp", "localhost:0") - if err != nil { - log.Fatal(err) - } - go serv.Serve(lis) - - conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure()) - if err != nil { - log.Fatal(err) - } - clientOpt = option.WithGRPCConn(conn) - - os.Exit(m.Run()) -} - -func TestAgentsSetAgent(t *testing.T) { - var parent string = "parent-995424086" - var displayName string = "displayName1615086568" - var defaultLanguageCode string = "defaultLanguageCode856575222" - var timeZone string = "timeZone36848094" - var description string = "description-1724546052" - var avatarUri string = "avatarUri-402824826" - var enableLogging bool = false - var classificationThreshold float32 = 1.11581064e8 - var expectedResponse = &dialogflowpb.Agent{ - Parent: parent, - DisplayName: displayName, - DefaultLanguageCode: defaultLanguageCode, - TimeZone: timeZone, - Description: description, - AvatarUri: avatarUri, - EnableLogging: enableLogging, - ClassificationThreshold: classificationThreshold, - } - - mockAgents.err = nil - mockAgents.reqs = nil - - mockAgents.resps = append(mockAgents.resps[:0], expectedResponse) - - var agent *dialogflowpb.Agent = &dialogflowpb.Agent{} - var request = &dialogflowpb.SetAgentRequest{ - Agent: agent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetAgent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAgentsSetAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = gstatus.Error(errCode, "test error") - - var agent *dialogflowpb.Agent = &dialogflowpb.Agent{} - var request = &dialogflowpb.SetAgentRequest{ - Agent: agent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SetAgent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAgentsDeleteAgent(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAgents.err = nil - mockAgents.reqs = nil - - mockAgents.resps = append(mockAgents.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.DeleteAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteAgent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAgentsDeleteAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.DeleteAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteAgent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAgentsGetAgent(t *testing.T) { - var parent2 string = "parent21175163357" - var displayName string = "displayName1615086568" - var defaultLanguageCode string = "defaultLanguageCode856575222" - var timeZone string = "timeZone36848094" - var description string = "description-1724546052" - var avatarUri string = "avatarUri-402824826" - var enableLogging bool = false - var classificationThreshold float32 = 1.11581064e8 - var expectedResponse = &dialogflowpb.Agent{ - Parent: parent2, - DisplayName: displayName, - DefaultLanguageCode: defaultLanguageCode, - TimeZone: timeZone, - Description: description, - AvatarUri: avatarUri, - EnableLogging: enableLogging, - ClassificationThreshold: classificationThreshold, - } - - mockAgents.err = nil - mockAgents.reqs = nil - - mockAgents.resps = append(mockAgents.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.GetAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetAgent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAgentsGetAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.GetAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetAgent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAgentsSearchAgents(t *testing.T) { - var nextPageToken string = "" - var agentsElement *dialogflowpb.Agent = &dialogflowpb.Agent{} - var agents = []*dialogflowpb.Agent{agentsElement} - var expectedResponse = &dialogflowpb.SearchAgentsResponse{ - NextPageToken: nextPageToken, - Agents: agents, - } - - mockAgents.err = nil - mockAgents.reqs = nil - - mockAgents.resps = append(mockAgents.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.SearchAgentsRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SearchAgents(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Agents[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAgentsSearchAgentsError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.SearchAgentsRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.SearchAgents(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAgentsTrainAgent(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAgents.err = nil - mockAgents.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.TrainAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.TrainAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAgentsTrainAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = nil - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.TrainAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.TrainAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAgentsExportAgent(t *testing.T) { - var agentUri string = "agentUri-1700713166" - var expectedResponse = &dialogflowpb.ExportAgentResponse{ - Agent: &dialogflowpb.ExportAgentResponse_AgentUri{ - AgentUri: agentUri, - }, - } - - mockAgents.err = nil - mockAgents.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.ExportAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestAgentsExportAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = nil - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.ExportAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ExportAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestAgentsImportAgent(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAgents.err = nil - mockAgents.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.ImportAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ImportAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAgentsImportAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = nil - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.ImportAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.ImportAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestAgentsRestoreAgent(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockAgents.err = nil - mockAgents.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.RestoreAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.RestoreAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockAgents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestAgentsRestoreAgentError(t *testing.T) { - errCode := codes.PermissionDenied - mockAgents.err = nil - mockAgents.resps = append(mockAgents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s", "[PROJECT]") - var request = &dialogflowpb.RestoreAgentRequest{ - Parent: formattedParent, - } - - c, err := NewAgentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.RestoreAgent(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestContextsListContexts(t *testing.T) { - var nextPageToken string = "" - var contextsElement *dialogflowpb.Context = &dialogflowpb.Context{} - var contexts = []*dialogflowpb.Context{contextsElement} - var expectedResponse = &dialogflowpb.ListContextsResponse{ - NextPageToken: nextPageToken, - Contexts: contexts, - } - - mockContexts.err = nil - mockContexts.reqs = nil - - mockContexts.resps = append(mockContexts.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var request = &dialogflowpb.ListContextsRequest{ - Parent: formattedParent, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListContexts(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Contexts[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContextsListContextsError(t *testing.T) { - errCode := codes.PermissionDenied - mockContexts.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var request = &dialogflowpb.ListContextsRequest{ - Parent: formattedParent, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListContexts(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContextsGetContext(t *testing.T) { - var name2 string = "name2-1052831874" - var lifespanCount int32 = 1178775510 - var expectedResponse = &dialogflowpb.Context{ - Name: name2, - LifespanCount: lifespanCount, - } - - mockContexts.err = nil - mockContexts.reqs = nil - - mockContexts.resps = append(mockContexts.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]") - var request = &dialogflowpb.GetContextRequest{ - Name: formattedName, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetContext(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContextsGetContextError(t *testing.T) { - errCode := codes.PermissionDenied - mockContexts.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]") - var request = &dialogflowpb.GetContextRequest{ - Name: formattedName, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetContext(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContextsCreateContext(t *testing.T) { - var name string = "name3373707" - var lifespanCount int32 = 1178775510 - var expectedResponse = &dialogflowpb.Context{ - Name: name, - LifespanCount: lifespanCount, - } - - mockContexts.err = nil - mockContexts.reqs = nil - - mockContexts.resps = append(mockContexts.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var context_ *dialogflowpb.Context = &dialogflowpb.Context{} - var request = &dialogflowpb.CreateContextRequest{ - Parent: formattedParent, - Context: context_, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateContext(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContextsCreateContextError(t *testing.T) { - errCode := codes.PermissionDenied - mockContexts.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var context_ *dialogflowpb.Context = &dialogflowpb.Context{} - var request = &dialogflowpb.CreateContextRequest{ - Parent: formattedParent, - Context: context_, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateContext(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContextsUpdateContext(t *testing.T) { - var name string = "name3373707" - var lifespanCount int32 = 1178775510 - var expectedResponse = &dialogflowpb.Context{ - Name: name, - LifespanCount: lifespanCount, - } - - mockContexts.err = nil - mockContexts.reqs = nil - - mockContexts.resps = append(mockContexts.resps[:0], expectedResponse) - - var context_ *dialogflowpb.Context = &dialogflowpb.Context{} - var request = &dialogflowpb.UpdateContextRequest{ - Context: context_, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateContext(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestContextsUpdateContextError(t *testing.T) { - errCode := codes.PermissionDenied - mockContexts.err = gstatus.Error(errCode, "test error") - - var context_ *dialogflowpb.Context = &dialogflowpb.Context{} - var request = &dialogflowpb.UpdateContextRequest{ - Context: context_, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateContext(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestContextsDeleteContext(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockContexts.err = nil - mockContexts.reqs = nil - - mockContexts.resps = append(mockContexts.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]") - var request = &dialogflowpb.DeleteContextRequest{ - Name: formattedName, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteContext(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestContextsDeleteContextError(t *testing.T) { - errCode := codes.PermissionDenied - mockContexts.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/contexts/%s", "[PROJECT]", "[SESSION]", "[CONTEXT]") - var request = &dialogflowpb.DeleteContextRequest{ - Name: formattedName, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteContext(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestContextsDeleteAllContexts(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockContexts.err = nil - mockContexts.reqs = nil - - mockContexts.resps = append(mockContexts.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var request = &dialogflowpb.DeleteAllContextsRequest{ - Parent: formattedParent, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteAllContexts(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockContexts.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestContextsDeleteAllContextsError(t *testing.T) { - errCode := codes.PermissionDenied - mockContexts.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var request = &dialogflowpb.DeleteAllContextsRequest{ - Parent: formattedParent, - } - - c, err := NewContextsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteAllContexts(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestEntityTypesListEntityTypes(t *testing.T) { - var nextPageToken string = "" - var entityTypesElement *dialogflowpb.EntityType = &dialogflowpb.EntityType{} - var entityTypes = []*dialogflowpb.EntityType{entityTypesElement} - var expectedResponse = &dialogflowpb.ListEntityTypesResponse{ - NextPageToken: nextPageToken, - EntityTypes: entityTypes, - } - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var request = &dialogflowpb.ListEntityTypesRequest{ - Parent: formattedParent, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListEntityTypes(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.EntityTypes[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestEntityTypesListEntityTypesError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var request = &dialogflowpb.ListEntityTypesRequest{ - Parent: formattedParent, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListEntityTypes(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestEntityTypesGetEntityType(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var enableFuzzyExtraction bool = true - var expectedResponse = &dialogflowpb.EntityType{ - Name: name2, - DisplayName: displayName, - EnableFuzzyExtraction: enableFuzzyExtraction, - } - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var request = &dialogflowpb.GetEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestEntityTypesGetEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var request = &dialogflowpb.GetEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestEntityTypesCreateEntityType(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var enableFuzzyExtraction bool = true - var expectedResponse = &dialogflowpb.EntityType{ - Name: name, - DisplayName: displayName, - EnableFuzzyExtraction: enableFuzzyExtraction, - } - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{} - var request = &dialogflowpb.CreateEntityTypeRequest{ - Parent: formattedParent, - EntityType: entityType, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestEntityTypesCreateEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{} - var request = &dialogflowpb.CreateEntityTypeRequest{ - Parent: formattedParent, - EntityType: entityType, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestEntityTypesUpdateEntityType(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var enableFuzzyExtraction bool = true - var expectedResponse = &dialogflowpb.EntityType{ - Name: name, - DisplayName: displayName, - EnableFuzzyExtraction: enableFuzzyExtraction, - } - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse) - - var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{} - var request = &dialogflowpb.UpdateEntityTypeRequest{ - EntityType: entityType, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestEntityTypesUpdateEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = gstatus.Error(errCode, "test error") - - var entityType *dialogflowpb.EntityType = &dialogflowpb.EntityType{} - var request = &dialogflowpb.UpdateEntityTypeRequest{ - EntityType: entityType, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestEntityTypesDeleteEntityType(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var request = &dialogflowpb.DeleteEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestEntityTypesDeleteEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var request = &dialogflowpb.DeleteEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestEntityTypesBatchUpdateEntityTypes(t *testing.T) { - var expectedResponse *dialogflowpb.BatchUpdateEntityTypesResponse = &dialogflowpb.BatchUpdateEntityTypesResponse{} - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var request = &dialogflowpb.BatchUpdateEntityTypesRequest{ - Parent: formattedParent, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchUpdateEntityTypes(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestEntityTypesBatchUpdateEntityTypesError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = nil - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var request = &dialogflowpb.BatchUpdateEntityTypesRequest{ - Parent: formattedParent, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchUpdateEntityTypes(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestEntityTypesBatchDeleteEntityTypes(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var entityTypeNames []string = nil - var request = &dialogflowpb.BatchDeleteEntityTypesRequest{ - Parent: formattedParent, - EntityTypeNames: entityTypeNames, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchDeleteEntityTypes(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestEntityTypesBatchDeleteEntityTypesError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = nil - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var entityTypeNames []string = nil - var request = &dialogflowpb.BatchDeleteEntityTypesRequest{ - Parent: formattedParent, - EntityTypeNames: entityTypeNames, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchDeleteEntityTypes(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestEntityTypesBatchCreateEntities(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var entities []*dialogflowpb.EntityType_Entity = nil - var request = &dialogflowpb.BatchCreateEntitiesRequest{ - Parent: formattedParent, - Entities: entities, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchCreateEntities(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestEntityTypesBatchCreateEntitiesError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = nil - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var entities []*dialogflowpb.EntityType_Entity = nil - var request = &dialogflowpb.BatchCreateEntitiesRequest{ - Parent: formattedParent, - Entities: entities, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchCreateEntities(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestEntityTypesBatchUpdateEntities(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var entities []*dialogflowpb.EntityType_Entity = nil - var request = &dialogflowpb.BatchUpdateEntitiesRequest{ - Parent: formattedParent, - Entities: entities, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchUpdateEntities(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestEntityTypesBatchUpdateEntitiesError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = nil - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var entities []*dialogflowpb.EntityType_Entity = nil - var request = &dialogflowpb.BatchUpdateEntitiesRequest{ - Parent: formattedParent, - Entities: entities, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchUpdateEntities(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestEntityTypesBatchDeleteEntities(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockEntityTypes.err = nil - mockEntityTypes.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var entityValues []string = nil - var request = &dialogflowpb.BatchDeleteEntitiesRequest{ - Parent: formattedParent, - EntityValues: entityValues, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchDeleteEntities(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestEntityTypesBatchDeleteEntitiesError(t *testing.T) { - errCode := codes.PermissionDenied - mockEntityTypes.err = nil - mockEntityTypes.resps = append(mockEntityTypes.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/entityTypes/%s", "[PROJECT]", "[ENTITY_TYPE]") - var entityValues []string = nil - var request = &dialogflowpb.BatchDeleteEntitiesRequest{ - Parent: formattedParent, - EntityValues: entityValues, - } - - c, err := NewEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchDeleteEntities(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestIntentsListIntents(t *testing.T) { - var nextPageToken string = "" - var intentsElement *dialogflowpb.Intent = &dialogflowpb.Intent{} - var intents = []*dialogflowpb.Intent{intentsElement} - var expectedResponse = &dialogflowpb.ListIntentsResponse{ - NextPageToken: nextPageToken, - Intents: intents, - } - - mockIntents.err = nil - mockIntents.reqs = nil - - mockIntents.resps = append(mockIntents.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var request = &dialogflowpb.ListIntentsRequest{ - Parent: formattedParent, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListIntents(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.Intents[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestIntentsListIntentsError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var request = &dialogflowpb.ListIntentsRequest{ - Parent: formattedParent, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListIntents(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestIntentsGetIntent(t *testing.T) { - var name2 string = "name2-1052831874" - var displayName string = "displayName1615086568" - var priority int32 = 1165461084 - var isFallback bool = false - var mlDisabled bool = true - var action string = "action-1422950858" - var resetContexts bool = true - var rootFollowupIntentName string = "rootFollowupIntentName402253784" - var parentFollowupIntentName string = "parentFollowupIntentName-1131901680" - var expectedResponse = &dialogflowpb.Intent{ - Name: name2, - DisplayName: displayName, - Priority: priority, - IsFallback: isFallback, - MlDisabled: mlDisabled, - Action: action, - ResetContexts: resetContexts, - RootFollowupIntentName: rootFollowupIntentName, - ParentFollowupIntentName: parentFollowupIntentName, - } - - mockIntents.err = nil - mockIntents.reqs = nil - - mockIntents.resps = append(mockIntents.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]") - var request = &dialogflowpb.GetIntentRequest{ - Name: formattedName, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIntent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestIntentsGetIntentError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]") - var request = &dialogflowpb.GetIntentRequest{ - Name: formattedName, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetIntent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestIntentsCreateIntent(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var priority int32 = 1165461084 - var isFallback bool = false - var mlDisabled bool = true - var action string = "action-1422950858" - var resetContexts bool = true - var rootFollowupIntentName string = "rootFollowupIntentName402253784" - var parentFollowupIntentName string = "parentFollowupIntentName-1131901680" - var expectedResponse = &dialogflowpb.Intent{ - Name: name, - DisplayName: displayName, - Priority: priority, - IsFallback: isFallback, - MlDisabled: mlDisabled, - Action: action, - ResetContexts: resetContexts, - RootFollowupIntentName: rootFollowupIntentName, - ParentFollowupIntentName: parentFollowupIntentName, - } - - mockIntents.err = nil - mockIntents.reqs = nil - - mockIntents.resps = append(mockIntents.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var intent *dialogflowpb.Intent = &dialogflowpb.Intent{} - var request = &dialogflowpb.CreateIntentRequest{ - Parent: formattedParent, - Intent: intent, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateIntent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestIntentsCreateIntentError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var intent *dialogflowpb.Intent = &dialogflowpb.Intent{} - var request = &dialogflowpb.CreateIntentRequest{ - Parent: formattedParent, - Intent: intent, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateIntent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestIntentsUpdateIntent(t *testing.T) { - var name string = "name3373707" - var displayName string = "displayName1615086568" - var priority int32 = 1165461084 - var isFallback bool = false - var mlDisabled bool = true - var action string = "action-1422950858" - var resetContexts bool = true - var rootFollowupIntentName string = "rootFollowupIntentName402253784" - var parentFollowupIntentName string = "parentFollowupIntentName-1131901680" - var expectedResponse = &dialogflowpb.Intent{ - Name: name, - DisplayName: displayName, - Priority: priority, - IsFallback: isFallback, - MlDisabled: mlDisabled, - Action: action, - ResetContexts: resetContexts, - RootFollowupIntentName: rootFollowupIntentName, - ParentFollowupIntentName: parentFollowupIntentName, - } - - mockIntents.err = nil - mockIntents.reqs = nil - - mockIntents.resps = append(mockIntents.resps[:0], expectedResponse) - - var intent *dialogflowpb.Intent = &dialogflowpb.Intent{} - var languageCode string = "languageCode-412800396" - var request = &dialogflowpb.UpdateIntentRequest{ - Intent: intent, - LanguageCode: languageCode, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateIntent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestIntentsUpdateIntentError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = gstatus.Error(errCode, "test error") - - var intent *dialogflowpb.Intent = &dialogflowpb.Intent{} - var languageCode string = "languageCode-412800396" - var request = &dialogflowpb.UpdateIntentRequest{ - Intent: intent, - LanguageCode: languageCode, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateIntent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestIntentsDeleteIntent(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockIntents.err = nil - mockIntents.reqs = nil - - mockIntents.resps = append(mockIntents.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]") - var request = &dialogflowpb.DeleteIntentRequest{ - Name: formattedName, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteIntent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestIntentsDeleteIntentError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/intents/%s", "[PROJECT]", "[INTENT]") - var request = &dialogflowpb.DeleteIntentRequest{ - Name: formattedName, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteIntent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestIntentsBatchUpdateIntents(t *testing.T) { - var expectedResponse *dialogflowpb.BatchUpdateIntentsResponse = &dialogflowpb.BatchUpdateIntentsResponse{} - - mockIntents.err = nil - mockIntents.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var languageCode string = "languageCode-412800396" - var request = &dialogflowpb.BatchUpdateIntentsRequest{ - Parent: formattedParent, - LanguageCode: languageCode, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchUpdateIntents(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestIntentsBatchUpdateIntentsError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = nil - mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var languageCode string = "languageCode-412800396" - var request = &dialogflowpb.BatchUpdateIntentsRequest{ - Parent: formattedParent, - LanguageCode: languageCode, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchUpdateIntents(context.Background(), request) - if err != nil { - t.Fatal(err) - } - resp, err := respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestIntentsBatchDeleteIntents(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockIntents.err = nil - mockIntents.reqs = nil - - any, err := ptypes.MarshalAny(expectedResponse) - if err != nil { - t.Fatal(err) - } - mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Response{Response: any}, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var intents []*dialogflowpb.Intent = nil - var request = &dialogflowpb.BatchDeleteIntentsRequest{ - Parent: formattedParent, - Intents: intents, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchDeleteIntents(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockIntents.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestIntentsBatchDeleteIntentsError(t *testing.T) { - errCode := codes.PermissionDenied - mockIntents.err = nil - mockIntents.resps = append(mockIntents.resps[:0], &longrunningpb.Operation{ - Name: "longrunning-test", - Done: true, - Result: &longrunningpb.Operation_Error{ - Error: &status.Status{ - Code: int32(errCode), - Message: "test error", - }, - }, - }) - - var formattedParent string = fmt.Sprintf("projects/%s/agent", "[PROJECT]") - var intents []*dialogflowpb.Intent = nil - var request = &dialogflowpb.BatchDeleteIntentsRequest{ - Parent: formattedParent, - Intents: intents, - } - - c, err := NewIntentsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - respLRO, err := c.BatchDeleteIntents(context.Background(), request) - if err != nil { - t.Fatal(err) - } - err = respLRO.Wait(context.Background()) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestSessionEntityTypesListSessionEntityTypes(t *testing.T) { - var nextPageToken string = "" - var sessionEntityTypesElement *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{} - var sessionEntityTypes = []*dialogflowpb.SessionEntityType{sessionEntityTypesElement} - var expectedResponse = &dialogflowpb.ListSessionEntityTypesResponse{ - NextPageToken: nextPageToken, - SessionEntityTypes: sessionEntityTypes, - } - - mockSessionEntityTypes.err = nil - mockSessionEntityTypes.reqs = nil - - mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var request = &dialogflowpb.ListSessionEntityTypesRequest{ - Parent: formattedParent, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListSessionEntityTypes(context.Background(), request).Next() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - want := (interface{})(expectedResponse.SessionEntityTypes[0]) - got := (interface{})(resp) - var ok bool - - switch want := (want).(type) { - case proto.Message: - ok = proto.Equal(want, got.(proto.Message)) - default: - ok = want == got - } - if !ok { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestSessionEntityTypesListSessionEntityTypesError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessionEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var request = &dialogflowpb.ListSessionEntityTypesRequest{ - Parent: formattedParent, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.ListSessionEntityTypes(context.Background(), request).Next() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestSessionEntityTypesGetSessionEntityType(t *testing.T) { - var name2 string = "name2-1052831874" - var expectedResponse = &dialogflowpb.SessionEntityType{ - Name: name2, - } - - mockSessionEntityTypes.err = nil - mockSessionEntityTypes.reqs = nil - - mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]") - var request = &dialogflowpb.GetSessionEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetSessionEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestSessionEntityTypesGetSessionEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessionEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]") - var request = &dialogflowpb.GetSessionEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.GetSessionEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestSessionEntityTypesCreateSessionEntityType(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &dialogflowpb.SessionEntityType{ - Name: name, - } - - mockSessionEntityTypes.err = nil - mockSessionEntityTypes.reqs = nil - - mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse) - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{} - var request = &dialogflowpb.CreateSessionEntityTypeRequest{ - Parent: formattedParent, - SessionEntityType: sessionEntityType, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateSessionEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestSessionEntityTypesCreateSessionEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessionEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedParent string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{} - var request = &dialogflowpb.CreateSessionEntityTypeRequest{ - Parent: formattedParent, - SessionEntityType: sessionEntityType, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.CreateSessionEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestSessionEntityTypesUpdateSessionEntityType(t *testing.T) { - var name string = "name3373707" - var expectedResponse = &dialogflowpb.SessionEntityType{ - Name: name, - } - - mockSessionEntityTypes.err = nil - mockSessionEntityTypes.reqs = nil - - mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse) - - var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{} - var request = &dialogflowpb.UpdateSessionEntityTypeRequest{ - SessionEntityType: sessionEntityType, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateSessionEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestSessionEntityTypesUpdateSessionEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessionEntityTypes.err = gstatus.Error(errCode, "test error") - - var sessionEntityType *dialogflowpb.SessionEntityType = &dialogflowpb.SessionEntityType{} - var request = &dialogflowpb.UpdateSessionEntityTypeRequest{ - SessionEntityType: sessionEntityType, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.UpdateSessionEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestSessionEntityTypesDeleteSessionEntityType(t *testing.T) { - var expectedResponse *emptypb.Empty = &emptypb.Empty{} - - mockSessionEntityTypes.err = nil - mockSessionEntityTypes.reqs = nil - - mockSessionEntityTypes.resps = append(mockSessionEntityTypes.resps[:0], expectedResponse) - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]") - var request = &dialogflowpb.DeleteSessionEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteSessionEntityType(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessionEntityTypes.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - -} - -func TestSessionEntityTypesDeleteSessionEntityTypeError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessionEntityTypes.err = gstatus.Error(errCode, "test error") - - var formattedName string = fmt.Sprintf("projects/%s/agent/sessions/%s/entityTypes/%s", "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]") - var request = &dialogflowpb.DeleteSessionEntityTypeRequest{ - Name: formattedName, - } - - c, err := NewSessionEntityTypesClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - err = c.DeleteSessionEntityType(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } -} -func TestSessionsDetectIntent(t *testing.T) { - var responseId string = "responseId1847552473" - var outputAudio []byte = []byte("24") - var expectedResponse = &dialogflowpb.DetectIntentResponse{ - ResponseId: responseId, - OutputAudio: outputAudio, - } - - mockSessions.err = nil - mockSessions.reqs = nil - - mockSessions.resps = append(mockSessions.resps[:0], expectedResponse) - - var formattedSession string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{} - var request = &dialogflowpb.DetectIntentRequest{ - Session: formattedSession, - QueryInput: queryInput, - } - - c, err := NewSessionsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.DetectIntent(context.Background(), request) - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessions.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestSessionsDetectIntentError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessions.err = gstatus.Error(errCode, "test error") - - var formattedSession string = fmt.Sprintf("projects/%s/agent/sessions/%s", "[PROJECT]", "[SESSION]") - var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{} - var request = &dialogflowpb.DetectIntentRequest{ - Session: formattedSession, - QueryInput: queryInput, - } - - c, err := NewSessionsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - resp, err := c.DetectIntent(context.Background(), request) - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} -func TestSessionsStreamingDetectIntent(t *testing.T) { - var responseId string = "responseId1847552473" - var outputAudio []byte = []byte("24") - var expectedResponse = &dialogflowpb.StreamingDetectIntentResponse{ - ResponseId: responseId, - OutputAudio: outputAudio, - } - - mockSessions.err = nil - mockSessions.reqs = nil - - mockSessions.resps = append(mockSessions.resps[:0], expectedResponse) - - var session string = "session1984987798" - var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{} - var request = &dialogflowpb.StreamingDetectIntentRequest{ - Session: session, - QueryInput: queryInput, - } - - c, err := NewSessionsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - stream, err := c.StreamingDetectIntent(context.Background()) - if err != nil { - t.Fatal(err) - } - if err := stream.Send(request); err != nil { - t.Fatal(err) - } - if err := stream.CloseSend(); err != nil { - t.Fatal(err) - } - resp, err := stream.Recv() - - if err != nil { - t.Fatal(err) - } - - if want, got := request, mockSessions.reqs[0]; !proto.Equal(want, got) { - t.Errorf("wrong request %q, want %q", got, want) - } - - if want, got := expectedResponse, resp; !proto.Equal(want, got) { - t.Errorf("wrong response %q, want %q)", got, want) - } -} - -func TestSessionsStreamingDetectIntentError(t *testing.T) { - errCode := codes.PermissionDenied - mockSessions.err = gstatus.Error(errCode, "test error") - - var session string = "session1984987798" - var queryInput *dialogflowpb.QueryInput = &dialogflowpb.QueryInput{} - var request = &dialogflowpb.StreamingDetectIntentRequest{ - Session: session, - QueryInput: queryInput, - } - - c, err := NewSessionsClient(context.Background(), clientOpt) - if err != nil { - t.Fatal(err) - } - - stream, err := c.StreamingDetectIntent(context.Background()) - if err != nil { - t.Fatal(err) - } - if err := stream.Send(request); err != nil { - t.Fatal(err) - } - if err := stream.CloseSend(); err != nil { - t.Fatal(err) - } - resp, err := stream.Recv() - - if st, ok := gstatus.FromError(err); !ok { - t.Errorf("got error %v, expected grpc error", err) - } else if c := st.Code(); c != errCode { - t.Errorf("got error code %q, want %q", c, errCode) - } - _ = resp -} diff --git a/dialogflow/apiv2/participants_client.go b/dialogflow/apiv2/participants_client.go index dfa07693e207..4b0fc9274f14 100644 --- a/dialogflow/apiv2/participants_client.go +++ b/dialogflow/apiv2/participants_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -47,6 +49,11 @@ type ParticipantsCallOptions struct { SuggestArticles []gax.CallOption SuggestFaqAnswers []gax.CallOption SuggestSmartReplies []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultParticipantsGRPCClientOptions() []option.ClientOption { @@ -151,6 +158,11 @@ func defaultParticipantsCallOptions() *ParticipantsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -167,6 +179,11 @@ type internalParticipantsClient interface { SuggestArticles(context.Context, *dialogflowpb.SuggestArticlesRequest, ...gax.CallOption) (*dialogflowpb.SuggestArticlesResponse, error) SuggestFaqAnswers(context.Context, *dialogflowpb.SuggestFaqAnswersRequest, ...gax.CallOption) (*dialogflowpb.SuggestFaqAnswersResponse, error) SuggestSmartReplies(context.Context, *dialogflowpb.SuggestSmartRepliesRequest, ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // ParticipantsClient is a client for interacting with Dialogflow API. @@ -198,7 +215,8 @@ func (c *ParticipantsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ParticipantsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -251,6 +269,31 @@ func (c *ParticipantsClient) SuggestSmartReplies(ctx context.Context, req *dialo return c.internalClient.SuggestSmartReplies(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *ParticipantsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ParticipantsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ParticipantsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ParticipantsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ParticipantsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // participantsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -267,6 +310,10 @@ type participantsGRPCClient struct { // The gRPC API client. participantsClient dialogflowpb.ParticipantsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -301,6 +348,8 @@ func NewParticipantsClient(ctx context.Context, opts ...option.ClientOption) (*P disableDeadlines: disableDeadlines, participantsClient: dialogflowpb.NewParticipantsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -311,7 +360,8 @@ func NewParticipantsClient(ctx context.Context, opts ...option.ClientOption) (*P // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *participantsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -530,6 +580,143 @@ func (c *participantsGRPCClient) SuggestSmartReplies(ctx context.Context, req *d return resp, nil } +func (c *participantsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *participantsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *participantsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // ParticipantIterator manages a stream of *dialogflowpb.Participant. type ParticipantIterator struct { items []*dialogflowpb.Participant diff --git a/dialogflow/apiv2/participants_client_example_test.go b/dialogflow/apiv2/participants_client_example_test.go index d5afbfe4abde..c7c2a7c034bf 100644 --- a/dialogflow/apiv2/participants_client_example_test.go +++ b/dialogflow/apiv2/participants_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewParticipantsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewParticipantsClient() { func ExampleParticipantsClient_CreateParticipant() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +70,11 @@ func ExampleParticipantsClient_CreateParticipant() { func ExampleParticipantsClient_GetParticipant() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +95,11 @@ func ExampleParticipantsClient_GetParticipant() { func ExampleParticipantsClient_ListParticipants() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleParticipantsClient_ListParticipants() { func ExampleParticipantsClient_UpdateParticipant() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleParticipantsClient_UpdateParticipant() { func ExampleParticipantsClient_AnalyzeContent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +176,11 @@ func ExampleParticipantsClient_AnalyzeContent() { func ExampleParticipantsClient_SuggestArticles() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +201,11 @@ func ExampleParticipantsClient_SuggestArticles() { func ExampleParticipantsClient_SuggestFaqAnswers() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -184,6 +226,11 @@ func ExampleParticipantsClient_SuggestFaqAnswers() { func ExampleParticipantsClient_SuggestSmartReplies() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewParticipantsClient(ctx) if err != nil { // TODO: Handle error. @@ -201,3 +248,138 @@ func ExampleParticipantsClient_SuggestSmartReplies() { // TODO: Use resp. _ = resp } + +func ExampleParticipantsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleParticipantsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleParticipantsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/session_entity_types_client.go b/dialogflow/apiv2/session_entity_types_client.go index ea5689793f96..0736e551c9ed 100644 --- a/dialogflow/apiv2/session_entity_types_client.go +++ b/dialogflow/apiv2/session_entity_types_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -44,6 +46,11 @@ type SessionEntityTypesCallOptions struct { CreateSessionEntityType []gax.CallOption UpdateSessionEntityType []gax.CallOption DeleteSessionEntityType []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultSessionEntityTypesGRPCClientOptions() []option.ClientOption { @@ -115,6 +122,11 @@ func defaultSessionEntityTypesCallOptions() *SessionEntityTypesCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -128,6 +140,11 @@ type internalSessionEntityTypesClient interface { CreateSessionEntityType(context.Context, *dialogflowpb.CreateSessionEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) UpdateSessionEntityType(context.Context, *dialogflowpb.UpdateSessionEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) DeleteSessionEntityType(context.Context, *dialogflowpb.DeleteSessionEntityTypeRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // SessionEntityTypesClient is a client for interacting with Dialogflow API. @@ -159,7 +176,8 @@ func (c *SessionEntityTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SessionEntityTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -212,6 +230,31 @@ func (c *SessionEntityTypesClient) DeleteSessionEntityType(ctx context.Context, return c.internalClient.DeleteSessionEntityType(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *SessionEntityTypesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *SessionEntityTypesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *SessionEntityTypesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *SessionEntityTypesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *SessionEntityTypesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // sessionEntityTypesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -228,6 +271,10 @@ type sessionEntityTypesGRPCClient struct { // The gRPC API client. sessionEntityTypesClient dialogflowpb.SessionEntityTypesClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -262,6 +309,8 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio disableDeadlines: disableDeadlines, sessionEntityTypesClient: dialogflowpb.NewSessionEntityTypesClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -272,7 +321,8 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *sessionEntityTypesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -421,6 +471,143 @@ func (c *sessionEntityTypesGRPCClient) DeleteSessionEntityType(ctx context.Conte return err } +func (c *sessionEntityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *sessionEntityTypesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *sessionEntityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // SessionEntityTypeIterator manages a stream of *dialogflowpb.SessionEntityType. type SessionEntityTypeIterator struct { items []*dialogflowpb.SessionEntityType diff --git a/dialogflow/apiv2/session_entity_types_client_example_test.go b/dialogflow/apiv2/session_entity_types_client_example_test.go index a89507052474..76e5488ca9f0 100644 --- a/dialogflow/apiv2/session_entity_types_client_example_test.go +++ b/dialogflow/apiv2/session_entity_types_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewSessionEntityTypesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewSessionEntityTypesClient() { func ExampleSessionEntityTypesClient_ListSessionEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleSessionEntityTypesClient_ListSessionEntityTypes() { func ExampleSessionEntityTypesClient_GetSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleSessionEntityTypesClient_GetSessionEntityType() { func ExampleSessionEntityTypesClient_CreateSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleSessionEntityTypesClient_CreateSessionEntityType() { func ExampleSessionEntityTypesClient_UpdateSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleSessionEntityTypesClient_UpdateSessionEntityType() { func ExampleSessionEntityTypesClient_DeleteSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -139,3 +171,138 @@ func ExampleSessionEntityTypesClient_DeleteSessionEntityType() { // TODO: Handle error. } } + +func ExampleSessionEntityTypesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleSessionEntityTypesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleSessionEntityTypesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/sessions_client.go b/dialogflow/apiv2/sessions_client.go index 202dc5b2a109..808f699b2a9d 100644 --- a/dialogflow/apiv2/sessions_client.go +++ b/dialogflow/apiv2/sessions_client.go @@ -24,13 +24,17 @@ import ( "time" gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" ) var newSessionsClientHook clientHook @@ -39,6 +43,11 @@ var newSessionsClientHook clientHook type SessionsCallOptions struct { DetectIntent []gax.CallOption StreamingDetectIntent []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultSessionsGRPCClientOptions() []option.ClientOption { @@ -67,6 +76,11 @@ func defaultSessionsCallOptions() *SessionsCallOptions { }), }, StreamingDetectIntent: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -77,6 +91,11 @@ type internalSessionsClient interface { Connection() *grpc.ClientConn DetectIntent(context.Context, *dialogflowpb.DetectIntentRequest, ...gax.CallOption) (*dialogflowpb.DetectIntentResponse, error) StreamingDetectIntent(context.Context, ...gax.CallOption) (dialogflowpb.Sessions_StreamingDetectIntentClient, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // SessionsClient is a client for interacting with Dialogflow API. @@ -111,7 +130,8 @@ func (c *SessionsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SessionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -153,6 +173,31 @@ func (c *SessionsClient) StreamingDetectIntent(ctx context.Context, opts ...gax. return c.internalClient.StreamingDetectIntent(ctx, opts...) } +// GetLocation gets information about a location. +func (c *SessionsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *SessionsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *SessionsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *SessionsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *SessionsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // sessionsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -169,6 +214,10 @@ type sessionsGRPCClient struct { // The gRPC API client. sessionsClient dialogflowpb.SessionsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -206,6 +255,8 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi disableDeadlines: disableDeadlines, sessionsClient: dialogflowpb.NewSessionsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -216,7 +267,8 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *sessionsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -272,3 +324,140 @@ func (c *sessionsGRPCClient) StreamingDetectIntent(ctx context.Context, opts ... } return resp, nil } + +func (c *sessionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *sessionsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *sessionsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/dialogflow/apiv2/sessions_client_example_test.go b/dialogflow/apiv2/sessions_client_example_test.go index 5b478229ce29..263886c2d48f 100644 --- a/dialogflow/apiv2/sessions_client_example_test.go +++ b/dialogflow/apiv2/sessions_client_example_test.go @@ -21,11 +21,19 @@ import ( "io" dialogflow "cloud.google.com/go/dialogflow/apiv2" + "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewSessionsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +46,11 @@ func ExampleNewSessionsClient() { func ExampleSessionsClient_DetectIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -58,6 +71,11 @@ func ExampleSessionsClient_DetectIntent() { func ExampleSessionsClient_StreamingDetectIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -90,3 +108,138 @@ func ExampleSessionsClient_StreamingDetectIntent() { _ = resp } } + +func ExampleSessionsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleSessionsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleSessionsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2/versions_client.go b/dialogflow/apiv2/versions_client.go index 95393950a8f1..eab722555d71 100644 --- a/dialogflow/apiv2/versions_client.go +++ b/dialogflow/apiv2/versions_client.go @@ -29,6 +29,8 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -39,11 +41,16 @@ var newVersionsClientHook clientHook // VersionsCallOptions contains the retry settings for each method of VersionsClient. type VersionsCallOptions struct { - ListVersions []gax.CallOption - GetVersion []gax.CallOption - CreateVersion []gax.CallOption - UpdateVersion []gax.CallOption - DeleteVersion []gax.CallOption + ListVersions []gax.CallOption + GetVersion []gax.CallOption + CreateVersion []gax.CallOption + UpdateVersion []gax.CallOption + DeleteVersion []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption } func defaultVersionsGRPCClientOptions() []option.ClientOption { @@ -115,6 +122,11 @@ func defaultVersionsCallOptions() *VersionsCallOptions { }) }), }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, } } @@ -128,6 +140,11 @@ type internalVersionsClient interface { CreateVersion(context.Context, *dialogflowpb.CreateVersionRequest, ...gax.CallOption) (*dialogflowpb.Version, error) UpdateVersion(context.Context, *dialogflowpb.UpdateVersionRequest, ...gax.CallOption) (*dialogflowpb.Version, error) DeleteVersion(context.Context, *dialogflowpb.DeleteVersionRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator } // VersionsClient is a client for interacting with Dialogflow API. @@ -159,7 +176,8 @@ func (c *VersionsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VersionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -195,6 +213,31 @@ func (c *VersionsClient) DeleteVersion(ctx context.Context, req *dialogflowpb.De return c.internalClient.DeleteVersion(ctx, req, opts...) } +// GetLocation gets information about a location. +func (c *VersionsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *VersionsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *VersionsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *VersionsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *VersionsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + // versionsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -211,6 +254,10 @@ type versionsGRPCClient struct { // The gRPC API client. versionsClient dialogflowpb.VersionsClient + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -245,6 +292,8 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi disableDeadlines: disableDeadlines, versionsClient: dialogflowpb.NewVersionsClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), } c.setGoogleClientInfo() @@ -255,7 +304,8 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *versionsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -404,6 +454,143 @@ func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *dialogflowp return err } +func (c *versionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *versionsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *versionsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + // VersionIterator manages a stream of *dialogflowpb.Version. type VersionIterator struct { items []*dialogflowpb.Version diff --git a/dialogflow/apiv2/versions_client_example_test.go b/dialogflow/apiv2/versions_client_example_test.go index f4908bbac20d..d1871d1cc21f 100644 --- a/dialogflow/apiv2/versions_client_example_test.go +++ b/dialogflow/apiv2/versions_client_example_test.go @@ -22,10 +22,17 @@ import ( dialogflow "cloud.google.com/go/dialogflow/apiv2" "google.golang.org/api/iterator" dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewVersionsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -38,6 +45,11 @@ func ExampleNewVersionsClient() { func ExampleVersionsClient_ListVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -64,6 +76,11 @@ func ExampleVersionsClient_ListVersions() { func ExampleVersionsClient_GetVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +101,11 @@ func ExampleVersionsClient_GetVersion() { func ExampleVersionsClient_CreateVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +126,11 @@ func ExampleVersionsClient_CreateVersion() { func ExampleVersionsClient_UpdateVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +151,11 @@ func ExampleVersionsClient_UpdateVersion() { func ExampleVersionsClient_DeleteVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := dialogflow.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -139,3 +171,138 @@ func ExampleVersionsClient_DeleteVersion() { // TODO: Handle error. } } + +func ExampleVersionsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleVersionsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleVersionsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/agents_client.go b/dialogflow/apiv2beta1/agents_client.go new file mode 100644 index 000000000000..9d1510a6dbf3 --- /dev/null +++ b/dialogflow/apiv2beta1/agents_client.go @@ -0,0 +1,2474 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + structpb "github.com/golang/protobuf/ptypes/struct" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newAgentsClientHook clientHook + +// AgentsCallOptions contains the retry settings for each method of AgentsClient. +type AgentsCallOptions struct { + GetAgent []gax.CallOption + SetAgent []gax.CallOption + DeleteAgent []gax.CallOption + SearchAgents []gax.CallOption + TrainAgent []gax.CallOption + ExportAgent []gax.CallOption + ImportAgent []gax.CallOption + RestoreAgent []gax.CallOption + GetValidationResult []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultAgentsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultAgentsCallOptions() *AgentsCallOptions { + return &AgentsCallOptions{ + GetAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SetAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SearchAgents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + TrainAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ExportAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ImportAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + RestoreAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetValidationResult: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultAgentsRESTCallOptions() *AgentsCallOptions { + return &AgentsCallOptions{ + GetAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + SetAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + SearchAgents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + TrainAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ExportAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ImportAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + RestoreAgent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetValidationResult: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalAgentsClient is an interface that defines the methods available from Dialogflow API. +type internalAgentsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + GetAgent(context.Context, *dialogflowpb.GetAgentRequest, ...gax.CallOption) (*dialogflowpb.Agent, error) + SetAgent(context.Context, *dialogflowpb.SetAgentRequest, ...gax.CallOption) (*dialogflowpb.Agent, error) + DeleteAgent(context.Context, *dialogflowpb.DeleteAgentRequest, ...gax.CallOption) error + SearchAgents(context.Context, *dialogflowpb.SearchAgentsRequest, ...gax.CallOption) *AgentIterator + TrainAgent(context.Context, *dialogflowpb.TrainAgentRequest, ...gax.CallOption) (*TrainAgentOperation, error) + TrainAgentOperation(name string) *TrainAgentOperation + ExportAgent(context.Context, *dialogflowpb.ExportAgentRequest, ...gax.CallOption) (*ExportAgentOperation, error) + ExportAgentOperation(name string) *ExportAgentOperation + ImportAgent(context.Context, *dialogflowpb.ImportAgentRequest, ...gax.CallOption) (*ImportAgentOperation, error) + ImportAgentOperation(name string) *ImportAgentOperation + RestoreAgent(context.Context, *dialogflowpb.RestoreAgentRequest, ...gax.CallOption) (*RestoreAgentOperation, error) + RestoreAgentOperation(name string) *RestoreAgentOperation + GetValidationResult(context.Context, *dialogflowpb.GetValidationResultRequest, ...gax.CallOption) (*dialogflowpb.ValidationResult, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// AgentsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Agents. +type AgentsClient struct { + // The internal transport-dependent client. + internalClient internalAgentsClient + + // The call options for this service. + CallOptions *AgentsCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *AgentsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *AgentsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *AgentsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// GetAgent retrieves the specified agent. +func (c *AgentsClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) { + return c.internalClient.GetAgent(ctx, req, opts...) +} + +// SetAgent creates/updates the specified agent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *AgentsClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) { + return c.internalClient.SetAgent(ctx, req, opts...) +} + +// DeleteAgent deletes the specified agent. +func (c *AgentsClient) DeleteAgent(ctx context.Context, req *dialogflowpb.DeleteAgentRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteAgent(ctx, req, opts...) +} + +// SearchAgents returns the list of agents. +// Since there is at most one conversational agent per project, this method is +// useful primarily for listing all agents across projects the caller has +// access to. One can achieve that with a wildcard project collection id “-”. +// Refer to List +// Sub-Collections (at https://cloud.google.com/apis/design/design_patterns#list_sub-collections). +func (c *AgentsClient) SearchAgents(ctx context.Context, req *dialogflowpb.SearchAgentsRequest, opts ...gax.CallOption) *AgentIterator { + return c.internalClient.SearchAgents(ctx, req, opts...) +} + +// TrainAgent trains the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *AgentsClient) TrainAgent(ctx context.Context, req *dialogflowpb.TrainAgentRequest, opts ...gax.CallOption) (*TrainAgentOperation, error) { + return c.internalClient.TrainAgent(ctx, req, opts...) +} + +// TrainAgentOperation returns a new TrainAgentOperation from a given name. +// The name must be that of a previously created TrainAgentOperation, possibly from a different process. +func (c *AgentsClient) TrainAgentOperation(name string) *TrainAgentOperation { + return c.internalClient.TrainAgentOperation(name) +} + +// ExportAgent exports the specified agent to a ZIP file. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: ExportAgentResponse +func (c *AgentsClient) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { + return c.internalClient.ExportAgent(ctx, req, opts...) +} + +// ExportAgentOperation returns a new ExportAgentOperation from a given name. +// The name must be that of a previously created ExportAgentOperation, possibly from a different process. +func (c *AgentsClient) ExportAgentOperation(name string) *ExportAgentOperation { + return c.internalClient.ExportAgentOperation(name) +} + +// ImportAgent imports the specified agent from a ZIP file. +// +// Uploads new intents and entity types without deleting the existing ones. +// Intents and entity types with the same name are replaced with the new +// versions from ImportAgentRequest. After the import, the imported draft +// agent will be trained automatically (unless disabled in agent settings). +// However, once the import is done, training may not be completed yet. Please +// call TrainAgent and wait for the operation it returns in order to train +// explicitly. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// The operation only tracks when importing is complete, not when it is done +// training. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *AgentsClient) ImportAgent(ctx context.Context, req *dialogflowpb.ImportAgentRequest, opts ...gax.CallOption) (*ImportAgentOperation, error) { + return c.internalClient.ImportAgent(ctx, req, opts...) +} + +// ImportAgentOperation returns a new ImportAgentOperation from a given name. +// The name must be that of a previously created ImportAgentOperation, possibly from a different process. +func (c *AgentsClient) ImportAgentOperation(name string) *ImportAgentOperation { + return c.internalClient.ImportAgentOperation(name) +} + +// RestoreAgent restores the specified agent from a ZIP file. +// +// Replaces the current agent version with a new one. All the intents and +// entity types in the older version are deleted. After the restore, the +// restored draft agent will be trained automatically (unless disabled in +// agent settings). However, once the restore is done, training may not be +// completed yet. Please call TrainAgent and wait for the operation it +// returns in order to train explicitly. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// The operation only tracks when restoring is complete, not when it is done +// training. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *AgentsClient) RestoreAgent(ctx context.Context, req *dialogflowpb.RestoreAgentRequest, opts ...gax.CallOption) (*RestoreAgentOperation, error) { + return c.internalClient.RestoreAgent(ctx, req, opts...) +} + +// RestoreAgentOperation returns a new RestoreAgentOperation from a given name. +// The name must be that of a previously created RestoreAgentOperation, possibly from a different process. +func (c *AgentsClient) RestoreAgentOperation(name string) *RestoreAgentOperation { + return c.internalClient.RestoreAgentOperation(name) +} + +// GetValidationResult gets agent validation result. Agent validation is performed during +// training time and is updated automatically when training is completed. +func (c *AgentsClient) GetValidationResult(ctx context.Context, req *dialogflowpb.GetValidationResultRequest, opts ...gax.CallOption) (*dialogflowpb.ValidationResult, error) { + return c.internalClient.GetValidationResult(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *AgentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *AgentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *AgentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *AgentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *AgentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// agentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type agentsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing AgentsClient + CallOptions **AgentsCallOptions + + // The gRPC API client. + agentsClient dialogflowpb.AgentsClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewAgentsClient creates a new agents client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Agents. +func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsClient, error) { + clientOpts := defaultAgentsGRPCClientOptions() + if newAgentsClientHook != nil { + hookOpts, err := newAgentsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := AgentsClient{CallOptions: defaultAgentsCallOptions()} + + c := &agentsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + agentsClient: dialogflowpb.NewAgentsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *agentsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *agentsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *agentsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type agentsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing AgentsClient + CallOptions **AgentsCallOptions +} + +// NewAgentsRESTClient creates a new agents rest client. +// +// Service for managing Agents. +func NewAgentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*AgentsClient, error) { + clientOpts := append(defaultAgentsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultAgentsRESTCallOptions() + c := &agentsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &AgentsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultAgentsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *agentsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *agentsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *agentsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *agentsGRPCClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAgent[0:len((*c.CallOptions).GetAgent):len((*c.CallOptions).GetAgent)], opts...) + var resp *dialogflowpb.Agent + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.GetAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "agent.parent", url.QueryEscape(req.GetAgent().GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetAgent[0:len((*c.CallOptions).SetAgent):len((*c.CallOptions).SetAgent)], opts...) + var resp *dialogflowpb.Agent + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.SetAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) DeleteAgent(ctx context.Context, req *dialogflowpb.DeleteAgentRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteAgent[0:len((*c.CallOptions).DeleteAgent):len((*c.CallOptions).DeleteAgent)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.agentsClient.DeleteAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *agentsGRPCClient) SearchAgents(ctx context.Context, req *dialogflowpb.SearchAgentsRequest, opts ...gax.CallOption) *AgentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SearchAgents[0:len((*c.CallOptions).SearchAgents):len((*c.CallOptions).SearchAgents)], opts...) + it := &AgentIterator{} + req = proto.Clone(req).(*dialogflowpb.SearchAgentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Agent, string, error) { + resp := &dialogflowpb.SearchAgentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.SearchAgents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAgents(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *agentsGRPCClient) TrainAgent(ctx context.Context, req *dialogflowpb.TrainAgentRequest, opts ...gax.CallOption) (*TrainAgentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).TrainAgent[0:len((*c.CallOptions).TrainAgent):len((*c.CallOptions).TrainAgent)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.TrainAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &TrainAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *agentsGRPCClient) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ExportAgent[0:len((*c.CallOptions).ExportAgent):len((*c.CallOptions).ExportAgent)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.ExportAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ExportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *agentsGRPCClient) ImportAgent(ctx context.Context, req *dialogflowpb.ImportAgentRequest, opts ...gax.CallOption) (*ImportAgentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ImportAgent[0:len((*c.CallOptions).ImportAgent):len((*c.CallOptions).ImportAgent)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.ImportAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *agentsGRPCClient) RestoreAgent(ctx context.Context, req *dialogflowpb.RestoreAgentRequest, opts ...gax.CallOption) (*RestoreAgentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).RestoreAgent[0:len((*c.CallOptions).RestoreAgent):len((*c.CallOptions).RestoreAgent)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.RestoreAgent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &RestoreAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *agentsGRPCClient) GetValidationResult(ctx context.Context, req *dialogflowpb.GetValidationResultRequest, opts ...gax.CallOption) (*dialogflowpb.ValidationResult, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetValidationResult[0:len((*c.CallOptions).GetValidationResult):len((*c.CallOptions).GetValidationResult)], opts...) + var resp *dialogflowpb.ValidationResult + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.agentsClient.GetValidationResult(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *agentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *agentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *agentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetAgent retrieves the specified agent. +func (c *agentsRESTClient) GetAgent(ctx context.Context, req *dialogflowpb.GetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAgent[0:len((*c.CallOptions).GetAgent):len((*c.CallOptions).GetAgent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Agent{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SetAgent creates/updates the specified agent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *agentsRESTClient) SetAgent(ctx context.Context, req *dialogflowpb.SetAgentRequest, opts ...gax.CallOption) (*dialogflowpb.Agent, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetAgent() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent", req.GetAgent().GetParent()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "agent.parent", url.QueryEscape(req.GetAgent().GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SetAgent[0:len((*c.CallOptions).SetAgent):len((*c.CallOptions).SetAgent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Agent{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteAgent deletes the specified agent. +func (c *agentsRESTClient) DeleteAgent(ctx context.Context, req *dialogflowpb.DeleteAgentRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// SearchAgents returns the list of agents. +// Since there is at most one conversational agent per project, this method is +// useful primarily for listing all agents across projects the caller has +// access to. One can achieve that with a wildcard project collection id “-”. +// Refer to List +// Sub-Collections (at https://cloud.google.com/apis/design/design_patterns#list_sub-collections). +func (c *agentsRESTClient) SearchAgents(ctx context.Context, req *dialogflowpb.SearchAgentsRequest, opts ...gax.CallOption) *AgentIterator { + it := &AgentIterator{} + req = proto.Clone(req).(*dialogflowpb.SearchAgentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Agent, string, error) { + resp := &dialogflowpb.SearchAgentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent:search", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAgents(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// TrainAgent trains the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *agentsRESTClient) TrainAgent(ctx context.Context, req *dialogflowpb.TrainAgentRequest, opts ...gax.CallOption) (*TrainAgentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent:train", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &TrainAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ExportAgent exports the specified agent to a ZIP file. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: ExportAgentResponse +func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *dialogflowpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent:export", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &ExportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ImportAgent imports the specified agent from a ZIP file. +// +// Uploads new intents and entity types without deleting the existing ones. +// Intents and entity types with the same name are replaced with the new +// versions from ImportAgentRequest. After the import, the imported draft +// agent will be trained automatically (unless disabled in agent settings). +// However, once the import is done, training may not be completed yet. Please +// call TrainAgent and wait for the operation it returns in order to train +// explicitly. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// The operation only tracks when importing is complete, not when it is done +// training. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *agentsRESTClient) ImportAgent(ctx context.Context, req *dialogflowpb.ImportAgentRequest, opts ...gax.CallOption) (*ImportAgentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent:import", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &ImportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// RestoreAgent restores the specified agent from a ZIP file. +// +// Replaces the current agent version with a new one. All the intents and +// entity types in the older version are deleted. After the restore, the +// restored draft agent will be trained automatically (unless disabled in +// agent settings). However, once the restore is done, training may not be +// completed yet. Please call TrainAgent and wait for the operation it +// returns in order to train explicitly. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// The operation only tracks when restoring is complete, not when it is done +// training. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *agentsRESTClient) RestoreAgent(ctx context.Context, req *dialogflowpb.RestoreAgentRequest, opts ...gax.CallOption) (*RestoreAgentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent:restore", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &RestoreAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetValidationResult gets agent validation result. Agent validation is performed during +// training time and is updated automatically when training is completed. +func (c *agentsRESTClient) GetValidationResult(ctx context.Context, req *dialogflowpb.GetValidationResultRequest, opts ...gax.CallOption) (*dialogflowpb.ValidationResult, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/agent/validationResult", req.GetParent()) + + params := url.Values{} + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetValidationResult[0:len((*c.CallOptions).GetValidationResult):len((*c.CallOptions).GetValidationResult)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.ValidationResult{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *agentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *agentsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *agentsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *agentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *agentsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ExportAgentOperation manages a long-running operation from ExportAgent. +type ExportAgentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ExportAgentOperation returns a new ExportAgentOperation from a given name. +// The name must be that of a previously created ExportAgentOperation, possibly from a different process. +func (c *agentsGRPCClient) ExportAgentOperation(name string) *ExportAgentOperation { + return &ExportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ExportAgentOperation returns a new ExportAgentOperation from a given name. +// The name must be that of a previously created ExportAgentOperation, possibly from a different process. +func (c *agentsRESTClient) ExportAgentOperation(name string) *ExportAgentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &ExportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ExportAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ExportAgentResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ExportAgentResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ExportAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ExportAgentResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ExportAgentResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ExportAgentOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ExportAgentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ExportAgentOperation) Name() string { + return op.lro.Name() +} + +// ImportAgentOperation manages a long-running operation from ImportAgent. +type ImportAgentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ImportAgentOperation returns a new ImportAgentOperation from a given name. +// The name must be that of a previously created ImportAgentOperation, possibly from a different process. +func (c *agentsGRPCClient) ImportAgentOperation(name string) *ImportAgentOperation { + return &ImportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ImportAgentOperation returns a new ImportAgentOperation from a given name. +// The name must be that of a previously created ImportAgentOperation, possibly from a different process. +func (c *agentsRESTClient) ImportAgentOperation(name string) *ImportAgentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &ImportAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ImportAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ImportAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ImportAgentOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ImportAgentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ImportAgentOperation) Name() string { + return op.lro.Name() +} + +// RestoreAgentOperation manages a long-running operation from RestoreAgent. +type RestoreAgentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// RestoreAgentOperation returns a new RestoreAgentOperation from a given name. +// The name must be that of a previously created RestoreAgentOperation, possibly from a different process. +func (c *agentsGRPCClient) RestoreAgentOperation(name string) *RestoreAgentOperation { + return &RestoreAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// RestoreAgentOperation returns a new RestoreAgentOperation from a given name. +// The name must be that of a previously created RestoreAgentOperation, possibly from a different process. +func (c *agentsRESTClient) RestoreAgentOperation(name string) *RestoreAgentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &RestoreAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *RestoreAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *RestoreAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *RestoreAgentOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *RestoreAgentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *RestoreAgentOperation) Name() string { + return op.lro.Name() +} + +// TrainAgentOperation manages a long-running operation from TrainAgent. +type TrainAgentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// TrainAgentOperation returns a new TrainAgentOperation from a given name. +// The name must be that of a previously created TrainAgentOperation, possibly from a different process. +func (c *agentsGRPCClient) TrainAgentOperation(name string) *TrainAgentOperation { + return &TrainAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// TrainAgentOperation returns a new TrainAgentOperation from a given name. +// The name must be that of a previously created TrainAgentOperation, possibly from a different process. +func (c *agentsRESTClient) TrainAgentOperation(name string) *TrainAgentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &TrainAgentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *TrainAgentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *TrainAgentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *TrainAgentOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *TrainAgentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *TrainAgentOperation) Name() string { + return op.lro.Name() +} + +// AgentIterator manages a stream of *dialogflowpb.Agent. +type AgentIterator struct { + items []*dialogflowpb.Agent + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Agent, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *AgentIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *AgentIterator) Next() (*dialogflowpb.Agent, error) { + var item *dialogflowpb.Agent + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *AgentIterator) bufLen() int { + return len(it.items) +} + +func (it *AgentIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/agents_client_example_test.go b/dialogflow/apiv2beta1/agents_client_example_test.go new file mode 100644 index 000000000000..6cdf54b85064 --- /dev/null +++ b/dialogflow/apiv2beta1/agents_client_example_test.go @@ -0,0 +1,439 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewAgentsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewAgentsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleAgentsClient_GetAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetAgentRequest. + } + resp, err := c.GetAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_SetAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SetAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#SetAgentRequest. + } + resp, err := c.SetAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_DeleteAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteAgentRequest. + } + err = c.DeleteAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAgentsClient_SearchAgents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SearchAgentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#SearchAgentsRequest. + } + it := c.SearchAgents(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAgentsClient_TrainAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.TrainAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#TrainAgentRequest. + } + op, err := c.TrainAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAgentsClient_ExportAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ExportAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ExportAgentRequest. + } + op, err := c.ExportAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_ImportAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ImportAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ImportAgentRequest. + } + op, err := c.ImportAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAgentsClient_RestoreAgent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.RestoreAgentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#RestoreAgentRequest. + } + op, err := c.RestoreAgent(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAgentsClient_GetValidationResult() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetValidationResultRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetValidationResultRequest. + } + resp, err := c.GetValidationResult(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAgentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAgentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAgentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAgentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/answer_records_client.go b/dialogflow/apiv2beta1/answer_records_client.go new file mode 100644 index 000000000000..935e11a7bb98 --- /dev/null +++ b/dialogflow/apiv2beta1/answer_records_client.go @@ -0,0 +1,1214 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newAnswerRecordsClientHook clientHook + +// AnswerRecordsCallOptions contains the retry settings for each method of AnswerRecordsClient. +type AnswerRecordsCallOptions struct { + GetAnswerRecord []gax.CallOption + ListAnswerRecords []gax.CallOption + UpdateAnswerRecord []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultAnswerRecordsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultAnswerRecordsCallOptions() *AnswerRecordsCallOptions { + return &AnswerRecordsCallOptions{ + GetAnswerRecord: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListAnswerRecords: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateAnswerRecord: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultAnswerRecordsRESTCallOptions() *AnswerRecordsCallOptions { + return &AnswerRecordsCallOptions{ + GetAnswerRecord: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListAnswerRecords: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateAnswerRecord: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalAnswerRecordsClient is an interface that defines the methods available from Dialogflow API. +type internalAnswerRecordsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + GetAnswerRecord(context.Context, *dialogflowpb.GetAnswerRecordRequest, ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) + ListAnswerRecords(context.Context, *dialogflowpb.ListAnswerRecordsRequest, ...gax.CallOption) *AnswerRecordIterator + UpdateAnswerRecord(context.Context, *dialogflowpb.UpdateAnswerRecordRequest, ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// AnswerRecordsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing AnswerRecords. +type AnswerRecordsClient struct { + // The internal transport-dependent client. + internalClient internalAnswerRecordsClient + + // The call options for this service. + CallOptions *AnswerRecordsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *AnswerRecordsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *AnswerRecordsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *AnswerRecordsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// GetAnswerRecord deprecated. +// Retrieves a specific answer record. +// +// Deprecated: GetAnswerRecord may be removed in a future version. +func (c *AnswerRecordsClient) GetAnswerRecord(ctx context.Context, req *dialogflowpb.GetAnswerRecordRequest, opts ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) { + return c.internalClient.GetAnswerRecord(ctx, req, opts...) +} + +// ListAnswerRecords returns the list of all answer records in the specified project in reverse +// chronological order. +func (c *AnswerRecordsClient) ListAnswerRecords(ctx context.Context, req *dialogflowpb.ListAnswerRecordsRequest, opts ...gax.CallOption) *AnswerRecordIterator { + return c.internalClient.ListAnswerRecords(ctx, req, opts...) +} + +// UpdateAnswerRecord updates the specified answer record. +func (c *AnswerRecordsClient) UpdateAnswerRecord(ctx context.Context, req *dialogflowpb.UpdateAnswerRecordRequest, opts ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) { + return c.internalClient.UpdateAnswerRecord(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *AnswerRecordsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *AnswerRecordsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *AnswerRecordsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *AnswerRecordsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *AnswerRecordsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// answerRecordsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type answerRecordsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing AnswerRecordsClient + CallOptions **AnswerRecordsCallOptions + + // The gRPC API client. + answerRecordsClient dialogflowpb.AnswerRecordsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewAnswerRecordsClient creates a new answer records client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing AnswerRecords. +func NewAnswerRecordsClient(ctx context.Context, opts ...option.ClientOption) (*AnswerRecordsClient, error) { + clientOpts := defaultAnswerRecordsGRPCClientOptions() + if newAnswerRecordsClientHook != nil { + hookOpts, err := newAnswerRecordsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := AnswerRecordsClient{CallOptions: defaultAnswerRecordsCallOptions()} + + c := &answerRecordsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + answerRecordsClient: dialogflowpb.NewAnswerRecordsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *answerRecordsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *answerRecordsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *answerRecordsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type answerRecordsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing AnswerRecordsClient + CallOptions **AnswerRecordsCallOptions +} + +// NewAnswerRecordsRESTClient creates a new answer records rest client. +// +// Service for managing AnswerRecords. +func NewAnswerRecordsRESTClient(ctx context.Context, opts ...option.ClientOption) (*AnswerRecordsClient, error) { + clientOpts := append(defaultAnswerRecordsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultAnswerRecordsRESTCallOptions() + c := &answerRecordsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &AnswerRecordsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultAnswerRecordsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *answerRecordsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *answerRecordsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *answerRecordsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *answerRecordsGRPCClient) GetAnswerRecord(ctx context.Context, req *dialogflowpb.GetAnswerRecordRequest, opts ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetAnswerRecord[0:len((*c.CallOptions).GetAnswerRecord):len((*c.CallOptions).GetAnswerRecord)], opts...) + var resp *dialogflowpb.AnswerRecord + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.answerRecordsClient.GetAnswerRecord(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *answerRecordsGRPCClient) ListAnswerRecords(ctx context.Context, req *dialogflowpb.ListAnswerRecordsRequest, opts ...gax.CallOption) *AnswerRecordIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListAnswerRecords[0:len((*c.CallOptions).ListAnswerRecords):len((*c.CallOptions).ListAnswerRecords)], opts...) + it := &AnswerRecordIterator{} + req = proto.Clone(req).(*dialogflowpb.ListAnswerRecordsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.AnswerRecord, string, error) { + resp := &dialogflowpb.ListAnswerRecordsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.answerRecordsClient.ListAnswerRecords(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetAnswerRecords(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *answerRecordsGRPCClient) UpdateAnswerRecord(ctx context.Context, req *dialogflowpb.UpdateAnswerRecordRequest, opts ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "answer_record.name", url.QueryEscape(req.GetAnswerRecord().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateAnswerRecord[0:len((*c.CallOptions).UpdateAnswerRecord):len((*c.CallOptions).UpdateAnswerRecord)], opts...) + var resp *dialogflowpb.AnswerRecord + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.answerRecordsClient.UpdateAnswerRecord(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *answerRecordsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *answerRecordsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *answerRecordsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *answerRecordsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *answerRecordsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetAnswerRecord deprecated. +// Retrieves a specific answer record. +// +// Deprecated: GetAnswerRecord may be removed in a future version. +func (c *answerRecordsRESTClient) GetAnswerRecord(ctx context.Context, req *dialogflowpb.GetAnswerRecordRequest, opts ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetAnswerRecord[0:len((*c.CallOptions).GetAnswerRecord):len((*c.CallOptions).GetAnswerRecord)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.AnswerRecord{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListAnswerRecords returns the list of all answer records in the specified project in reverse +// chronological order. +func (c *answerRecordsRESTClient) ListAnswerRecords(ctx context.Context, req *dialogflowpb.ListAnswerRecordsRequest, opts ...gax.CallOption) *AnswerRecordIterator { + it := &AnswerRecordIterator{} + req = proto.Clone(req).(*dialogflowpb.ListAnswerRecordsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.AnswerRecord, string, error) { + resp := &dialogflowpb.ListAnswerRecordsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/answerRecords", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetAnswerRecords(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateAnswerRecord updates the specified answer record. +func (c *answerRecordsRESTClient) UpdateAnswerRecord(ctx context.Context, req *dialogflowpb.UpdateAnswerRecordRequest, opts ...gax.CallOption) (*dialogflowpb.AnswerRecord, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetAnswerRecord() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetAnswerRecord().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "answer_record.name", url.QueryEscape(req.GetAnswerRecord().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateAnswerRecord[0:len((*c.CallOptions).UpdateAnswerRecord):len((*c.CallOptions).UpdateAnswerRecord)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.AnswerRecord{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *answerRecordsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *answerRecordsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *answerRecordsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *answerRecordsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *answerRecordsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// AnswerRecordIterator manages a stream of *dialogflowpb.AnswerRecord. +type AnswerRecordIterator struct { + items []*dialogflowpb.AnswerRecord + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.AnswerRecord, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *AnswerRecordIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *AnswerRecordIterator) Next() (*dialogflowpb.AnswerRecord, error) { + var item *dialogflowpb.AnswerRecord + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *AnswerRecordIterator) bufLen() int { + return len(it.items) +} + +func (it *AnswerRecordIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/answer_records_client_example_test.go b/dialogflow/apiv2beta1/answer_records_client_example_test.go new file mode 100644 index 000000000000..5b7ea015f2e7 --- /dev/null +++ b/dialogflow/apiv2beta1/answer_records_client_example_test.go @@ -0,0 +1,277 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewAnswerRecordsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewAnswerRecordsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleAnswerRecordsClient_GetAnswerRecord() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetAnswerRecordRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetAnswerRecordRequest. + } + resp, err := c.GetAnswerRecord(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnswerRecordsClient_ListAnswerRecords() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListAnswerRecordsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListAnswerRecordsRequest. + } + it := c.ListAnswerRecords(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAnswerRecordsClient_UpdateAnswerRecord() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateAnswerRecordRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateAnswerRecordRequest. + } + resp, err := c.UpdateAnswerRecord(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnswerRecordsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnswerRecordsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleAnswerRecordsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleAnswerRecordsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleAnswerRecordsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewAnswerRecordsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/contexts_client.go b/dialogflow/apiv2beta1/contexts_client.go new file mode 100644 index 000000000000..f5e466062acf --- /dev/null +++ b/dialogflow/apiv2beta1/contexts_client.go @@ -0,0 +1,1479 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newContextsClientHook clientHook + +// ContextsCallOptions contains the retry settings for each method of ContextsClient. +type ContextsCallOptions struct { + ListContexts []gax.CallOption + GetContext []gax.CallOption + CreateContext []gax.CallOption + UpdateContext []gax.CallOption + DeleteContext []gax.CallOption + DeleteAllContexts []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultContextsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultContextsCallOptions() *ContextsCallOptions { + return &ContextsCallOptions{ + ListContexts: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteAllContexts: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultContextsRESTCallOptions() *ContextsCallOptions { + return &ContextsCallOptions{ + ListContexts: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteContext: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteAllContexts: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalContextsClient is an interface that defines the methods available from Dialogflow API. +type internalContextsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListContexts(context.Context, *dialogflowpb.ListContextsRequest, ...gax.CallOption) *ContextIterator + GetContext(context.Context, *dialogflowpb.GetContextRequest, ...gax.CallOption) (*dialogflowpb.Context, error) + CreateContext(context.Context, *dialogflowpb.CreateContextRequest, ...gax.CallOption) (*dialogflowpb.Context, error) + UpdateContext(context.Context, *dialogflowpb.UpdateContextRequest, ...gax.CallOption) (*dialogflowpb.Context, error) + DeleteContext(context.Context, *dialogflowpb.DeleteContextRequest, ...gax.CallOption) error + DeleteAllContexts(context.Context, *dialogflowpb.DeleteAllContextsRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// ContextsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Contexts. +type ContextsClient struct { + // The internal transport-dependent client. + internalClient internalContextsClient + + // The call options for this service. + CallOptions *ContextsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *ContextsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *ContextsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *ContextsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListContexts returns the list of all contexts in the specified session. +func (c *ContextsClient) ListContexts(ctx context.Context, req *dialogflowpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator { + return c.internalClient.ListContexts(ctx, req, opts...) +} + +// GetContext retrieves the specified context. +func (c *ContextsClient) GetContext(ctx context.Context, req *dialogflowpb.GetContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + return c.internalClient.GetContext(ctx, req, opts...) +} + +// CreateContext creates a context. +// +// If the specified context already exists, overrides the context. +func (c *ContextsClient) CreateContext(ctx context.Context, req *dialogflowpb.CreateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + return c.internalClient.CreateContext(ctx, req, opts...) +} + +// UpdateContext updates the specified context. +func (c *ContextsClient) UpdateContext(ctx context.Context, req *dialogflowpb.UpdateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + return c.internalClient.UpdateContext(ctx, req, opts...) +} + +// DeleteContext deletes the specified context. +func (c *ContextsClient) DeleteContext(ctx context.Context, req *dialogflowpb.DeleteContextRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteContext(ctx, req, opts...) +} + +// DeleteAllContexts deletes all active contexts in the specified session. +func (c *ContextsClient) DeleteAllContexts(ctx context.Context, req *dialogflowpb.DeleteAllContextsRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteAllContexts(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *ContextsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ContextsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ContextsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ContextsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ContextsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// contextsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type contextsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing ContextsClient + CallOptions **ContextsCallOptions + + // The gRPC API client. + contextsClient dialogflowpb.ContextsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewContextsClient creates a new contexts client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Contexts. +func NewContextsClient(ctx context.Context, opts ...option.ClientOption) (*ContextsClient, error) { + clientOpts := defaultContextsGRPCClientOptions() + if newContextsClientHook != nil { + hookOpts, err := newContextsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := ContextsClient{CallOptions: defaultContextsCallOptions()} + + c := &contextsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + contextsClient: dialogflowpb.NewContextsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *contextsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *contextsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *contextsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type contextsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing ContextsClient + CallOptions **ContextsCallOptions +} + +// NewContextsRESTClient creates a new contexts rest client. +// +// Service for managing Contexts. +func NewContextsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ContextsClient, error) { + clientOpts := append(defaultContextsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultContextsRESTCallOptions() + c := &contextsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &ContextsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultContextsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *contextsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *contextsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *contextsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *contextsGRPCClient) ListContexts(ctx context.Context, req *dialogflowpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListContexts[0:len((*c.CallOptions).ListContexts):len((*c.CallOptions).ListContexts)], opts...) + it := &ContextIterator{} + req = proto.Clone(req).(*dialogflowpb.ListContextsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Context, string, error) { + resp := &dialogflowpb.ListContextsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contextsClient.ListContexts(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetContexts(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *contextsGRPCClient) GetContext(ctx context.Context, req *dialogflowpb.GetContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetContext[0:len((*c.CallOptions).GetContext):len((*c.CallOptions).GetContext)], opts...) + var resp *dialogflowpb.Context + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contextsClient.GetContext(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) CreateContext(ctx context.Context, req *dialogflowpb.CreateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateContext[0:len((*c.CallOptions).CreateContext):len((*c.CallOptions).CreateContext)], opts...) + var resp *dialogflowpb.Context + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contextsClient.CreateContext(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) UpdateContext(ctx context.Context, req *dialogflowpb.UpdateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context.name", url.QueryEscape(req.GetContext().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateContext[0:len((*c.CallOptions).UpdateContext):len((*c.CallOptions).UpdateContext)], opts...) + var resp *dialogflowpb.Context + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.contextsClient.UpdateContext(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) DeleteContext(ctx context.Context, req *dialogflowpb.DeleteContextRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteContext[0:len((*c.CallOptions).DeleteContext):len((*c.CallOptions).DeleteContext)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.contextsClient.DeleteContext(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *contextsGRPCClient) DeleteAllContexts(ctx context.Context, req *dialogflowpb.DeleteAllContextsRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteAllContexts[0:len((*c.CallOptions).DeleteAllContexts):len((*c.CallOptions).DeleteAllContexts)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.contextsClient.DeleteAllContexts(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *contextsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *contextsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *contextsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *contextsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListContexts returns the list of all contexts in the specified session. +func (c *contextsRESTClient) ListContexts(ctx context.Context, req *dialogflowpb.ListContextsRequest, opts ...gax.CallOption) *ContextIterator { + it := &ContextIterator{} + req = proto.Clone(req).(*dialogflowpb.ListContextsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Context, string, error) { + resp := &dialogflowpb.ListContextsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/contexts", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetContexts(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetContext retrieves the specified context. +func (c *contextsRESTClient) GetContext(ctx context.Context, req *dialogflowpb.GetContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetContext[0:len((*c.CallOptions).GetContext):len((*c.CallOptions).GetContext)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Context{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateContext creates a context. +// +// If the specified context already exists, overrides the context. +func (c *contextsRESTClient) CreateContext(ctx context.Context, req *dialogflowpb.CreateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetContext() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/contexts", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateContext[0:len((*c.CallOptions).CreateContext):len((*c.CallOptions).CreateContext)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Context{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateContext updates the specified context. +func (c *contextsRESTClient) UpdateContext(ctx context.Context, req *dialogflowpb.UpdateContextRequest, opts ...gax.CallOption) (*dialogflowpb.Context, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetContext() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetContext().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "context.name", url.QueryEscape(req.GetContext().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateContext[0:len((*c.CallOptions).UpdateContext):len((*c.CallOptions).UpdateContext)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Context{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteContext deletes the specified context. +func (c *contextsRESTClient) DeleteContext(ctx context.Context, req *dialogflowpb.DeleteContextRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteAllContexts deletes all active contexts in the specified session. +func (c *contextsRESTClient) DeleteAllContexts(ctx context.Context, req *dialogflowpb.DeleteAllContextsRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/contexts", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetLocation gets information about a location. +func (c *contextsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *contextsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *contextsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *contextsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *contextsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ContextIterator manages a stream of *dialogflowpb.Context. +type ContextIterator struct { + items []*dialogflowpb.Context + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Context, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ContextIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ContextIterator) Next() (*dialogflowpb.Context, error) { + var item *dialogflowpb.Context + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ContextIterator) bufLen() int { + return len(it.items) +} + +func (it *ContextIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/contexts_client_example_test.go b/dialogflow/apiv2beta1/contexts_client_example_test.go new file mode 100644 index 000000000000..983e175acc86 --- /dev/null +++ b/dialogflow/apiv2beta1/contexts_client_example_test.go @@ -0,0 +1,348 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewContextsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewContextsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleContextsClient_ListContexts() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListContextsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListContextsRequest. + } + it := c.ListContexts(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleContextsClient_GetContext() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetContextRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetContextRequest. + } + resp, err := c.GetContext(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_CreateContext() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateContextRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateContextRequest. + } + resp, err := c.CreateContext(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_UpdateContext() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateContextRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateContextRequest. + } + resp, err := c.UpdateContext(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_DeleteContext() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteContextRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteContextRequest. + } + err = c.DeleteContext(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleContextsClient_DeleteAllContexts() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteAllContextsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteAllContextsRequest. + } + err = c.DeleteAllContexts(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleContextsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleContextsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleContextsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleContextsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewContextsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/conversation_profiles_client.go b/dialogflow/apiv2beta1/conversation_profiles_client.go new file mode 100644 index 000000000000..c838bef80e04 --- /dev/null +++ b/dialogflow/apiv2beta1/conversation_profiles_client.go @@ -0,0 +1,1906 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newConversationProfilesClientHook clientHook + +// ConversationProfilesCallOptions contains the retry settings for each method of ConversationProfilesClient. +type ConversationProfilesCallOptions struct { + ListConversationProfiles []gax.CallOption + GetConversationProfile []gax.CallOption + CreateConversationProfile []gax.CallOption + UpdateConversationProfile []gax.CallOption + DeleteConversationProfile []gax.CallOption + SetSuggestionFeatureConfig []gax.CallOption + ClearSuggestionFeatureConfig []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultConversationProfilesGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultConversationProfilesCallOptions() *ConversationProfilesCallOptions { + return &ConversationProfilesCallOptions{ + ListConversationProfiles: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SetSuggestionFeatureConfig: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ClearSuggestionFeatureConfig: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultConversationProfilesRESTCallOptions() *ConversationProfilesCallOptions { + return &ConversationProfilesCallOptions{ + ListConversationProfiles: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteConversationProfile: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + SetSuggestionFeatureConfig: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ClearSuggestionFeatureConfig: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalConversationProfilesClient is an interface that defines the methods available from Dialogflow API. +type internalConversationProfilesClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListConversationProfiles(context.Context, *dialogflowpb.ListConversationProfilesRequest, ...gax.CallOption) *ConversationProfileIterator + GetConversationProfile(context.Context, *dialogflowpb.GetConversationProfileRequest, ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) + CreateConversationProfile(context.Context, *dialogflowpb.CreateConversationProfileRequest, ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) + UpdateConversationProfile(context.Context, *dialogflowpb.UpdateConversationProfileRequest, ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) + DeleteConversationProfile(context.Context, *dialogflowpb.DeleteConversationProfileRequest, ...gax.CallOption) error + SetSuggestionFeatureConfig(context.Context, *dialogflowpb.SetSuggestionFeatureConfigRequest, ...gax.CallOption) (*SetSuggestionFeatureConfigOperation, error) + SetSuggestionFeatureConfigOperation(name string) *SetSuggestionFeatureConfigOperation + ClearSuggestionFeatureConfig(context.Context, *dialogflowpb.ClearSuggestionFeatureConfigRequest, ...gax.CallOption) (*ClearSuggestionFeatureConfigOperation, error) + ClearSuggestionFeatureConfigOperation(name string) *ClearSuggestionFeatureConfigOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// ConversationProfilesClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing ConversationProfiles. +type ConversationProfilesClient struct { + // The internal transport-dependent client. + internalClient internalConversationProfilesClient + + // The call options for this service. + CallOptions *ConversationProfilesCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *ConversationProfilesClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *ConversationProfilesClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *ConversationProfilesClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListConversationProfiles returns the list of all conversation profiles in the specified project. +func (c *ConversationProfilesClient) ListConversationProfiles(ctx context.Context, req *dialogflowpb.ListConversationProfilesRequest, opts ...gax.CallOption) *ConversationProfileIterator { + return c.internalClient.ListConversationProfiles(ctx, req, opts...) +} + +// GetConversationProfile retrieves the specified conversation profile. +func (c *ConversationProfilesClient) GetConversationProfile(ctx context.Context, req *dialogflowpb.GetConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + return c.internalClient.GetConversationProfile(ctx, req, opts...) +} + +// CreateConversationProfile creates a conversation profile in the specified project. +// +// ConversationProfile.CreateTime and ConversationProfile.UpdateTime +// aren’t populated in the response. You can retrieve them via +// GetConversationProfile API. +func (c *ConversationProfilesClient) CreateConversationProfile(ctx context.Context, req *dialogflowpb.CreateConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + return c.internalClient.CreateConversationProfile(ctx, req, opts...) +} + +// UpdateConversationProfile updates the specified conversation profile. +// +// ConversationProfile.CreateTime and ConversationProfile.UpdateTime +// aren’t populated in the response. You can retrieve them via +// GetConversationProfile API. +func (c *ConversationProfilesClient) UpdateConversationProfile(ctx context.Context, req *dialogflowpb.UpdateConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + return c.internalClient.UpdateConversationProfile(ctx, req, opts...) +} + +// DeleteConversationProfile deletes the specified conversation profile. +func (c *ConversationProfilesClient) DeleteConversationProfile(ctx context.Context, req *dialogflowpb.DeleteConversationProfileRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteConversationProfile(ctx, req, opts...) +} + +// SetSuggestionFeatureConfig adds or updates a suggestion feature in a conversation profile. +// If the conversation profile contains the type of suggestion feature for +// the participant role, it will update it. Otherwise it will insert the +// suggestion feature. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: SetSuggestionFeatureConfigOperationMetadata +// +// response: ConversationProfile +// +// If a long running operation to add or update suggestion feature +// config for the same conversation profile, participant role and suggestion +// feature type exists, please cancel the existing long running operation +// before sending such request, otherwise the request will be rejected. +func (c *ConversationProfilesClient) SetSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.SetSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*SetSuggestionFeatureConfigOperation, error) { + return c.internalClient.SetSuggestionFeatureConfig(ctx, req, opts...) +} + +// SetSuggestionFeatureConfigOperation returns a new SetSuggestionFeatureConfigOperation from a given name. +// The name must be that of a previously created SetSuggestionFeatureConfigOperation, possibly from a different process. +func (c *ConversationProfilesClient) SetSuggestionFeatureConfigOperation(name string) *SetSuggestionFeatureConfigOperation { + return c.internalClient.SetSuggestionFeatureConfigOperation(name) +} + +// ClearSuggestionFeatureConfig clears a suggestion feature from a conversation profile for the given +// participant role. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: ClearSuggestionFeatureConfigOperationMetadata +// +// response: ConversationProfile +func (c *ConversationProfilesClient) ClearSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.ClearSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*ClearSuggestionFeatureConfigOperation, error) { + return c.internalClient.ClearSuggestionFeatureConfig(ctx, req, opts...) +} + +// ClearSuggestionFeatureConfigOperation returns a new ClearSuggestionFeatureConfigOperation from a given name. +// The name must be that of a previously created ClearSuggestionFeatureConfigOperation, possibly from a different process. +func (c *ConversationProfilesClient) ClearSuggestionFeatureConfigOperation(name string) *ClearSuggestionFeatureConfigOperation { + return c.internalClient.ClearSuggestionFeatureConfigOperation(name) +} + +// GetLocation gets information about a location. +func (c *ConversationProfilesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ConversationProfilesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ConversationProfilesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ConversationProfilesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ConversationProfilesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// conversationProfilesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type conversationProfilesGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing ConversationProfilesClient + CallOptions **ConversationProfilesCallOptions + + // The gRPC API client. + conversationProfilesClient dialogflowpb.ConversationProfilesClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewConversationProfilesClient creates a new conversation profiles client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing ConversationProfiles. +func NewConversationProfilesClient(ctx context.Context, opts ...option.ClientOption) (*ConversationProfilesClient, error) { + clientOpts := defaultConversationProfilesGRPCClientOptions() + if newConversationProfilesClientHook != nil { + hookOpts, err := newConversationProfilesClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := ConversationProfilesClient{CallOptions: defaultConversationProfilesCallOptions()} + + c := &conversationProfilesGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + conversationProfilesClient: dialogflowpb.NewConversationProfilesClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *conversationProfilesGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *conversationProfilesGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *conversationProfilesGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type conversationProfilesRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing ConversationProfilesClient + CallOptions **ConversationProfilesCallOptions +} + +// NewConversationProfilesRESTClient creates a new conversation profiles rest client. +// +// Service for managing ConversationProfiles. +func NewConversationProfilesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ConversationProfilesClient, error) { + clientOpts := append(defaultConversationProfilesRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultConversationProfilesRESTCallOptions() + c := &conversationProfilesRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &ConversationProfilesClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultConversationProfilesRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *conversationProfilesRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *conversationProfilesRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *conversationProfilesRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *conversationProfilesGRPCClient) ListConversationProfiles(ctx context.Context, req *dialogflowpb.ListConversationProfilesRequest, opts ...gax.CallOption) *ConversationProfileIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListConversationProfiles[0:len((*c.CallOptions).ListConversationProfiles):len((*c.CallOptions).ListConversationProfiles)], opts...) + it := &ConversationProfileIterator{} + req = proto.Clone(req).(*dialogflowpb.ListConversationProfilesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.ConversationProfile, string, error) { + resp := &dialogflowpb.ListConversationProfilesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationProfilesClient.ListConversationProfiles(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetConversationProfiles(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationProfilesGRPCClient) GetConversationProfile(ctx context.Context, req *dialogflowpb.GetConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetConversationProfile[0:len((*c.CallOptions).GetConversationProfile):len((*c.CallOptions).GetConversationProfile)], opts...) + var resp *dialogflowpb.ConversationProfile + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationProfilesClient.GetConversationProfile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) CreateConversationProfile(ctx context.Context, req *dialogflowpb.CreateConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateConversationProfile[0:len((*c.CallOptions).CreateConversationProfile):len((*c.CallOptions).CreateConversationProfile)], opts...) + var resp *dialogflowpb.ConversationProfile + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationProfilesClient.CreateConversationProfile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) UpdateConversationProfile(ctx context.Context, req *dialogflowpb.UpdateConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "conversation_profile.name", url.QueryEscape(req.GetConversationProfile().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateConversationProfile[0:len((*c.CallOptions).UpdateConversationProfile):len((*c.CallOptions).UpdateConversationProfile)], opts...) + var resp *dialogflowpb.ConversationProfile + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationProfilesClient.UpdateConversationProfile(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) DeleteConversationProfile(ctx context.Context, req *dialogflowpb.DeleteConversationProfileRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteConversationProfile[0:len((*c.CallOptions).DeleteConversationProfile):len((*c.CallOptions).DeleteConversationProfile)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.conversationProfilesClient.DeleteConversationProfile(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationProfilesGRPCClient) SetSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.SetSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*SetSuggestionFeatureConfigOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "conversation_profile", url.QueryEscape(req.GetConversationProfile()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SetSuggestionFeatureConfig[0:len((*c.CallOptions).SetSuggestionFeatureConfig):len((*c.CallOptions).SetSuggestionFeatureConfig)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationProfilesClient.SetSuggestionFeatureConfig(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &SetSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *conversationProfilesGRPCClient) ClearSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.ClearSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*ClearSuggestionFeatureConfigOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "conversation_profile", url.QueryEscape(req.GetConversationProfile()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ClearSuggestionFeatureConfig[0:len((*c.CallOptions).ClearSuggestionFeatureConfig):len((*c.CallOptions).ClearSuggestionFeatureConfig)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationProfilesClient.ClearSuggestionFeatureConfig(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ClearSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *conversationProfilesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationProfilesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationProfilesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationProfilesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListConversationProfiles returns the list of all conversation profiles in the specified project. +func (c *conversationProfilesRESTClient) ListConversationProfiles(ctx context.Context, req *dialogflowpb.ListConversationProfilesRequest, opts ...gax.CallOption) *ConversationProfileIterator { + it := &ConversationProfileIterator{} + req = proto.Clone(req).(*dialogflowpb.ListConversationProfilesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.ConversationProfile, string, error) { + resp := &dialogflowpb.ListConversationProfilesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/conversationProfiles", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetConversationProfiles(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetConversationProfile retrieves the specified conversation profile. +func (c *conversationProfilesRESTClient) GetConversationProfile(ctx context.Context, req *dialogflowpb.GetConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetConversationProfile[0:len((*c.CallOptions).GetConversationProfile):len((*c.CallOptions).GetConversationProfile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.ConversationProfile{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateConversationProfile creates a conversation profile in the specified project. +// +// ConversationProfile.CreateTime and ConversationProfile.UpdateTime +// aren’t populated in the response. You can retrieve them via +// GetConversationProfile API. +func (c *conversationProfilesRESTClient) CreateConversationProfile(ctx context.Context, req *dialogflowpb.CreateConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetConversationProfile() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/conversationProfiles", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateConversationProfile[0:len((*c.CallOptions).CreateConversationProfile):len((*c.CallOptions).CreateConversationProfile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.ConversationProfile{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateConversationProfile updates the specified conversation profile. +// +// ConversationProfile.CreateTime and ConversationProfile.UpdateTime +// aren’t populated in the response. You can retrieve them via +// GetConversationProfile API. +func (c *conversationProfilesRESTClient) UpdateConversationProfile(ctx context.Context, req *dialogflowpb.UpdateConversationProfileRequest, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetConversationProfile() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetConversationProfile().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "conversation_profile.name", url.QueryEscape(req.GetConversationProfile().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateConversationProfile[0:len((*c.CallOptions).UpdateConversationProfile):len((*c.CallOptions).UpdateConversationProfile)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.ConversationProfile{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteConversationProfile deletes the specified conversation profile. +func (c *conversationProfilesRESTClient) DeleteConversationProfile(ctx context.Context, req *dialogflowpb.DeleteConversationProfileRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// SetSuggestionFeatureConfig adds or updates a suggestion feature in a conversation profile. +// If the conversation profile contains the type of suggestion feature for +// the participant role, it will update it. Otherwise it will insert the +// suggestion feature. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: SetSuggestionFeatureConfigOperationMetadata +// +// response: ConversationProfile +// +// If a long running operation to add or update suggestion feature +// config for the same conversation profile, participant role and suggestion +// feature type exists, please cancel the existing long running operation +// before sending such request, otherwise the request will be rejected. +func (c *conversationProfilesRESTClient) SetSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.SetSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*SetSuggestionFeatureConfigOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:setSuggestionFeatureConfig", req.GetConversationProfile()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "conversation_profile", url.QueryEscape(req.GetConversationProfile()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &SetSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ClearSuggestionFeatureConfig clears a suggestion feature from a conversation profile for the given +// participant role. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: ClearSuggestionFeatureConfigOperationMetadata +// +// response: ConversationProfile +func (c *conversationProfilesRESTClient) ClearSuggestionFeatureConfig(ctx context.Context, req *dialogflowpb.ClearSuggestionFeatureConfigRequest, opts ...gax.CallOption) (*ClearSuggestionFeatureConfigOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:clearSuggestionFeatureConfig", req.GetConversationProfile()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "conversation_profile", url.QueryEscape(req.GetConversationProfile()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &ClearSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *conversationProfilesRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *conversationProfilesRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *conversationProfilesRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *conversationProfilesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *conversationProfilesRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ClearSuggestionFeatureConfigOperation manages a long-running operation from ClearSuggestionFeatureConfig. +type ClearSuggestionFeatureConfigOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ClearSuggestionFeatureConfigOperation returns a new ClearSuggestionFeatureConfigOperation from a given name. +// The name must be that of a previously created ClearSuggestionFeatureConfigOperation, possibly from a different process. +func (c *conversationProfilesGRPCClient) ClearSuggestionFeatureConfigOperation(name string) *ClearSuggestionFeatureConfigOperation { + return &ClearSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ClearSuggestionFeatureConfigOperation returns a new ClearSuggestionFeatureConfigOperation from a given name. +// The name must be that of a previously created ClearSuggestionFeatureConfigOperation, possibly from a different process. +func (c *conversationProfilesRESTClient) ClearSuggestionFeatureConfigOperation(name string) *ClearSuggestionFeatureConfigOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &ClearSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ClearSuggestionFeatureConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ConversationProfile + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ClearSuggestionFeatureConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ConversationProfile + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ClearSuggestionFeatureConfigOperation) Metadata() (*dialogflowpb.ClearSuggestionFeatureConfigOperationMetadata, error) { + var meta dialogflowpb.ClearSuggestionFeatureConfigOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ClearSuggestionFeatureConfigOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ClearSuggestionFeatureConfigOperation) Name() string { + return op.lro.Name() +} + +// SetSuggestionFeatureConfigOperation manages a long-running operation from SetSuggestionFeatureConfig. +type SetSuggestionFeatureConfigOperation struct { + lro *longrunning.Operation + pollPath string +} + +// SetSuggestionFeatureConfigOperation returns a new SetSuggestionFeatureConfigOperation from a given name. +// The name must be that of a previously created SetSuggestionFeatureConfigOperation, possibly from a different process. +func (c *conversationProfilesGRPCClient) SetSuggestionFeatureConfigOperation(name string) *SetSuggestionFeatureConfigOperation { + return &SetSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// SetSuggestionFeatureConfigOperation returns a new SetSuggestionFeatureConfigOperation from a given name. +// The name must be that of a previously created SetSuggestionFeatureConfigOperation, possibly from a different process. +func (c *conversationProfilesRESTClient) SetSuggestionFeatureConfigOperation(name string) *SetSuggestionFeatureConfigOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &SetSuggestionFeatureConfigOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *SetSuggestionFeatureConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ConversationProfile + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *SetSuggestionFeatureConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ConversationProfile, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ConversationProfile + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *SetSuggestionFeatureConfigOperation) Metadata() (*dialogflowpb.SetSuggestionFeatureConfigOperationMetadata, error) { + var meta dialogflowpb.SetSuggestionFeatureConfigOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *SetSuggestionFeatureConfigOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *SetSuggestionFeatureConfigOperation) Name() string { + return op.lro.Name() +} + +// ConversationProfileIterator manages a stream of *dialogflowpb.ConversationProfile. +type ConversationProfileIterator struct { + items []*dialogflowpb.ConversationProfile + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.ConversationProfile, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ConversationProfileIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ConversationProfileIterator) Next() (*dialogflowpb.ConversationProfile, error) { + var item *dialogflowpb.ConversationProfile + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ConversationProfileIterator) bufLen() int { + return len(it.items) +} + +func (it *ConversationProfileIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/conversation_profiles_client_example_test.go b/dialogflow/apiv2beta1/conversation_profiles_client_example_test.go new file mode 100644 index 000000000000..963184367072 --- /dev/null +++ b/dialogflow/apiv2beta1/conversation_profiles_client_example_test.go @@ -0,0 +1,385 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewConversationProfilesClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewConversationProfilesRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleConversationProfilesClient_ListConversationProfiles() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListConversationProfilesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListConversationProfilesRequest. + } + it := c.ListConversationProfiles(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationProfilesClient_GetConversationProfile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetConversationProfileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetConversationProfileRequest. + } + resp, err := c.GetConversationProfile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_CreateConversationProfile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateConversationProfileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateConversationProfileRequest. + } + resp, err := c.CreateConversationProfile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_UpdateConversationProfile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateConversationProfileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateConversationProfileRequest. + } + resp, err := c.UpdateConversationProfile(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_DeleteConversationProfile() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteConversationProfileRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteConversationProfileRequest. + } + err = c.DeleteConversationProfile(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationProfilesClient_SetSuggestionFeatureConfig() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SetSuggestionFeatureConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#SetSuggestionFeatureConfigRequest. + } + op, err := c.SetSuggestionFeatureConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_ClearSuggestionFeatureConfig() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ClearSuggestionFeatureConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ClearSuggestionFeatureConfigRequest. + } + op, err := c.ClearSuggestionFeatureConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationProfilesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationProfilesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationProfilesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationProfilesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/conversations_client.go b/dialogflow/apiv2beta1/conversations_client.go new file mode 100644 index 000000000000..81878653ccd2 --- /dev/null +++ b/dialogflow/apiv2beta1/conversations_client.go @@ -0,0 +1,1674 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newConversationsClientHook clientHook + +// ConversationsCallOptions contains the retry settings for each method of ConversationsClient. +type ConversationsCallOptions struct { + CreateConversation []gax.CallOption + ListConversations []gax.CallOption + GetConversation []gax.CallOption + CompleteConversation []gax.CallOption + BatchCreateMessages []gax.CallOption + ListMessages []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultConversationsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultConversationsCallOptions() *ConversationsCallOptions { + return &ConversationsCallOptions{ + CreateConversation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListConversations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetConversation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CompleteConversation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchCreateMessages: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListMessages: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultConversationsRESTCallOptions() *ConversationsCallOptions { + return &ConversationsCallOptions{ + CreateConversation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListConversations: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetConversation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CompleteConversation: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchCreateMessages: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListMessages: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalConversationsClient is an interface that defines the methods available from Dialogflow API. +type internalConversationsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateConversation(context.Context, *dialogflowpb.CreateConversationRequest, ...gax.CallOption) (*dialogflowpb.Conversation, error) + ListConversations(context.Context, *dialogflowpb.ListConversationsRequest, ...gax.CallOption) *ConversationIterator + GetConversation(context.Context, *dialogflowpb.GetConversationRequest, ...gax.CallOption) (*dialogflowpb.Conversation, error) + CompleteConversation(context.Context, *dialogflowpb.CompleteConversationRequest, ...gax.CallOption) (*dialogflowpb.Conversation, error) + BatchCreateMessages(context.Context, *dialogflowpb.BatchCreateMessagesRequest, ...gax.CallOption) (*dialogflowpb.BatchCreateMessagesResponse, error) + ListMessages(context.Context, *dialogflowpb.ListMessagesRequest, ...gax.CallOption) *MessageIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// ConversationsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Conversations. +type ConversationsClient struct { + // The internal transport-dependent client. + internalClient internalConversationsClient + + // The call options for this service. + CallOptions *ConversationsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *ConversationsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *ConversationsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *ConversationsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateConversation creates a new conversation. Conversations are auto-completed after 24 +// hours. +// +// Conversation Lifecycle: +// There are two stages during a conversation: Automated Agent Stage and +// Assist Stage. +// +// For Automated Agent Stage, there will be a dialogflow agent responding to +// user queries. +// +// For Assist Stage, there’s no dialogflow agent responding to user queries. +// But we will provide suggestions which are generated from conversation. +// +// If Conversation.conversation_profile is configured for a dialogflow +// agent, conversation will start from Automated Agent Stage, otherwise, it +// will start from Assist Stage. And during Automated Agent Stage, once an +// Intent with Intent.live_agent_handoff is triggered, conversation +// will transfer to Assist Stage. +func (c *ConversationsClient) CreateConversation(ctx context.Context, req *dialogflowpb.CreateConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + return c.internalClient.CreateConversation(ctx, req, opts...) +} + +// ListConversations returns the list of all conversations in the specified project. +func (c *ConversationsClient) ListConversations(ctx context.Context, req *dialogflowpb.ListConversationsRequest, opts ...gax.CallOption) *ConversationIterator { + return c.internalClient.ListConversations(ctx, req, opts...) +} + +// GetConversation retrieves the specific conversation. +func (c *ConversationsClient) GetConversation(ctx context.Context, req *dialogflowpb.GetConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + return c.internalClient.GetConversation(ctx, req, opts...) +} + +// CompleteConversation completes the specified conversation. Finished conversations are purged +// from the database after 30 days. +func (c *ConversationsClient) CompleteConversation(ctx context.Context, req *dialogflowpb.CompleteConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + return c.internalClient.CompleteConversation(ctx, req, opts...) +} + +// BatchCreateMessages batch ingests messages to conversation. Customers can use this RPC to +// ingest historical messages to conversation. +func (c *ConversationsClient) BatchCreateMessages(ctx context.Context, req *dialogflowpb.BatchCreateMessagesRequest, opts ...gax.CallOption) (*dialogflowpb.BatchCreateMessagesResponse, error) { + return c.internalClient.BatchCreateMessages(ctx, req, opts...) +} + +// ListMessages lists messages that belong to a given conversation. +// messages are ordered by create_time in descending order. To fetch +// updates without duplication, send request with filter +// create_time_epoch_microseconds > [first item's create_time of previous request] and empty page_token. +func (c *ConversationsClient) ListMessages(ctx context.Context, req *dialogflowpb.ListMessagesRequest, opts ...gax.CallOption) *MessageIterator { + return c.internalClient.ListMessages(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *ConversationsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ConversationsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ConversationsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ConversationsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ConversationsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// conversationsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type conversationsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing ConversationsClient + CallOptions **ConversationsCallOptions + + // The gRPC API client. + conversationsClient dialogflowpb.ConversationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewConversationsClient creates a new conversations client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Conversations. +func NewConversationsClient(ctx context.Context, opts ...option.ClientOption) (*ConversationsClient, error) { + clientOpts := defaultConversationsGRPCClientOptions() + if newConversationsClientHook != nil { + hookOpts, err := newConversationsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := ConversationsClient{CallOptions: defaultConversationsCallOptions()} + + c := &conversationsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + conversationsClient: dialogflowpb.NewConversationsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *conversationsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *conversationsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *conversationsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type conversationsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing ConversationsClient + CallOptions **ConversationsCallOptions +} + +// NewConversationsRESTClient creates a new conversations rest client. +// +// Service for managing Conversations. +func NewConversationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ConversationsClient, error) { + clientOpts := append(defaultConversationsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultConversationsRESTCallOptions() + c := &conversationsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &ConversationsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultConversationsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *conversationsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *conversationsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *conversationsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *conversationsGRPCClient) CreateConversation(ctx context.Context, req *dialogflowpb.CreateConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateConversation[0:len((*c.CallOptions).CreateConversation):len((*c.CallOptions).CreateConversation)], opts...) + var resp *dialogflowpb.Conversation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationsClient.CreateConversation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) ListConversations(ctx context.Context, req *dialogflowpb.ListConversationsRequest, opts ...gax.CallOption) *ConversationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListConversations[0:len((*c.CallOptions).ListConversations):len((*c.CallOptions).ListConversations)], opts...) + it := &ConversationIterator{} + req = proto.Clone(req).(*dialogflowpb.ListConversationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Conversation, string, error) { + resp := &dialogflowpb.ListConversationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationsClient.ListConversations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetConversations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationsGRPCClient) GetConversation(ctx context.Context, req *dialogflowpb.GetConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetConversation[0:len((*c.CallOptions).GetConversation):len((*c.CallOptions).GetConversation)], opts...) + var resp *dialogflowpb.Conversation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationsClient.GetConversation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) CompleteConversation(ctx context.Context, req *dialogflowpb.CompleteConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CompleteConversation[0:len((*c.CallOptions).CompleteConversation):len((*c.CallOptions).CompleteConversation)], opts...) + var resp *dialogflowpb.Conversation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationsClient.CompleteConversation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) BatchCreateMessages(ctx context.Context, req *dialogflowpb.BatchCreateMessagesRequest, opts ...gax.CallOption) (*dialogflowpb.BatchCreateMessagesResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchCreateMessages[0:len((*c.CallOptions).BatchCreateMessages):len((*c.CallOptions).BatchCreateMessages)], opts...) + var resp *dialogflowpb.BatchCreateMessagesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationsClient.BatchCreateMessages(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) ListMessages(ctx context.Context, req *dialogflowpb.ListMessagesRequest, opts ...gax.CallOption) *MessageIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListMessages[0:len((*c.CallOptions).ListMessages):len((*c.CallOptions).ListMessages)], opts...) + it := &MessageIterator{} + req = proto.Clone(req).(*dialogflowpb.ListMessagesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Message, string, error) { + resp := &dialogflowpb.ListMessagesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.conversationsClient.ListMessages(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetMessages(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *conversationsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *conversationsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *conversationsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateConversation creates a new conversation. Conversations are auto-completed after 24 +// hours. +// +// Conversation Lifecycle: +// There are two stages during a conversation: Automated Agent Stage and +// Assist Stage. +// +// For Automated Agent Stage, there will be a dialogflow agent responding to +// user queries. +// +// For Assist Stage, there’s no dialogflow agent responding to user queries. +// But we will provide suggestions which are generated from conversation. +// +// If Conversation.conversation_profile is configured for a dialogflow +// agent, conversation will start from Automated Agent Stage, otherwise, it +// will start from Assist Stage. And during Automated Agent Stage, once an +// Intent with Intent.live_agent_handoff is triggered, conversation +// will transfer to Assist Stage. +func (c *conversationsRESTClient) CreateConversation(ctx context.Context, req *dialogflowpb.CreateConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetConversation() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/conversations", req.GetParent()) + + params := url.Values{} + if req.GetConversationId() != "" { + params.Add("conversationId", fmt.Sprintf("%v", req.GetConversationId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateConversation[0:len((*c.CallOptions).CreateConversation):len((*c.CallOptions).CreateConversation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Conversation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListConversations returns the list of all conversations in the specified project. +func (c *conversationsRESTClient) ListConversations(ctx context.Context, req *dialogflowpb.ListConversationsRequest, opts ...gax.CallOption) *ConversationIterator { + it := &ConversationIterator{} + req = proto.Clone(req).(*dialogflowpb.ListConversationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Conversation, string, error) { + resp := &dialogflowpb.ListConversationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/conversations", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetConversations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetConversation retrieves the specific conversation. +func (c *conversationsRESTClient) GetConversation(ctx context.Context, req *dialogflowpb.GetConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetConversation[0:len((*c.CallOptions).GetConversation):len((*c.CallOptions).GetConversation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Conversation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CompleteConversation completes the specified conversation. Finished conversations are purged +// from the database after 30 days. +func (c *conversationsRESTClient) CompleteConversation(ctx context.Context, req *dialogflowpb.CompleteConversationRequest, opts ...gax.CallOption) (*dialogflowpb.Conversation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:complete", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CompleteConversation[0:len((*c.CallOptions).CompleteConversation):len((*c.CallOptions).CompleteConversation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Conversation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchCreateMessages batch ingests messages to conversation. Customers can use this RPC to +// ingest historical messages to conversation. +func (c *conversationsRESTClient) BatchCreateMessages(ctx context.Context, req *dialogflowpb.BatchCreateMessagesRequest, opts ...gax.CallOption) (*dialogflowpb.BatchCreateMessagesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/messages:batchCreate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).BatchCreateMessages[0:len((*c.CallOptions).BatchCreateMessages):len((*c.CallOptions).BatchCreateMessages)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.BatchCreateMessagesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListMessages lists messages that belong to a given conversation. +// messages are ordered by create_time in descending order. To fetch +// updates without duplication, send request with filter +// create_time_epoch_microseconds > [first item's create_time of previous request] and empty page_token. +func (c *conversationsRESTClient) ListMessages(ctx context.Context, req *dialogflowpb.ListMessagesRequest, opts ...gax.CallOption) *MessageIterator { + it := &MessageIterator{} + req = proto.Clone(req).(*dialogflowpb.ListMessagesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Message, string, error) { + resp := &dialogflowpb.ListMessagesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/messages", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMessages(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *conversationsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *conversationsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *conversationsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *conversationsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *conversationsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ConversationIterator manages a stream of *dialogflowpb.Conversation. +type ConversationIterator struct { + items []*dialogflowpb.Conversation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Conversation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ConversationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ConversationIterator) Next() (*dialogflowpb.Conversation, error) { + var item *dialogflowpb.Conversation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ConversationIterator) bufLen() int { + return len(it.items) +} + +func (it *ConversationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// MessageIterator manages a stream of *dialogflowpb.Message. +type MessageIterator struct { + items []*dialogflowpb.Message + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Message, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *MessageIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *MessageIterator) Next() (*dialogflowpb.Message, error) { + var item *dialogflowpb.Message + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *MessageIterator) bufLen() int { + return len(it.items) +} + +func (it *MessageIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/conversations_client_example_test.go b/dialogflow/apiv2beta1/conversations_client_example_test.go new file mode 100644 index 000000000000..e5b0b96bb079 --- /dev/null +++ b/dialogflow/apiv2beta1/conversations_client_example_test.go @@ -0,0 +1,358 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewConversationsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewConversationsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleConversationsClient_CreateConversation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateConversationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateConversationRequest. + } + resp, err := c.CreateConversation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_ListConversations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListConversationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListConversationsRequest. + } + it := c.ListConversations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationsClient_GetConversation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetConversationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetConversationRequest. + } + resp, err := c.GetConversation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_CompleteConversation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CompleteConversationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CompleteConversationRequest. + } + resp, err := c.CompleteConversation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_BatchCreateMessages() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchCreateMessagesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchCreateMessagesRequest. + } + resp, err := c.BatchCreateMessages(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_ListMessages() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListMessagesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListMessagesRequest. + } + it := c.ListMessages(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleConversationsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleConversationsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleConversationsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewConversationsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/doc.go b/dialogflow/apiv2beta1/doc.go new file mode 100644 index 000000000000..7bde9522e67f --- /dev/null +++ b/dialogflow/apiv2beta1/doc.go @@ -0,0 +1,195 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package dialogflow is an auto-generated package for the +// Dialogflow API. +// +// Builds conversational interfaces (for example, chatbots, and voice-powered +// apps and devices). +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # Example usage +// +// To get started with this package, create a client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dialogflow.NewAgentsClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := dialogflow.NewAgentsClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &dialogflowpb.GetAgentRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetAgentRequest. +// } +// resp, err := c.GetAgent(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewAgentsClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +package dialogflow // import "cloud.google.com/go/dialogflow/apiv2beta1" + +import ( + "context" + "fmt" + "net/http" + "os" + "runtime" + "strconv" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +func checkDisableDeadlines() (bool, error) { + raw, ok := os.LookupEnv("GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE") + if !ok { + return false, nil + } + + b, err := strconv.ParseBool(raw) + return b, err +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} diff --git a/dialogflow/apiv2beta1/documents_client.go b/dialogflow/apiv2beta1/documents_client.go new file mode 100644 index 000000000000..46315b0f0576 --- /dev/null +++ b/dialogflow/apiv2beta1/documents_client.go @@ -0,0 +1,2280 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newDocumentsClientHook clientHook + +// DocumentsCallOptions contains the retry settings for each method of DocumentsClient. +type DocumentsCallOptions struct { + ListDocuments []gax.CallOption + GetDocument []gax.CallOption + CreateDocument []gax.CallOption + ImportDocuments []gax.CallOption + DeleteDocument []gax.CallOption + UpdateDocument []gax.CallOption + ReloadDocument []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultDocumentsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultDocumentsCallOptions() *DocumentsCallOptions { + return &DocumentsCallOptions{ + ListDocuments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ImportDocuments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ReloadDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultDocumentsRESTCallOptions() *DocumentsCallOptions { + return &DocumentsCallOptions{ + ListDocuments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ImportDocuments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ReloadDocument: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalDocumentsClient is an interface that defines the methods available from Dialogflow API. +type internalDocumentsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListDocuments(context.Context, *dialogflowpb.ListDocumentsRequest, ...gax.CallOption) *DocumentIterator + GetDocument(context.Context, *dialogflowpb.GetDocumentRequest, ...gax.CallOption) (*dialogflowpb.Document, error) + CreateDocument(context.Context, *dialogflowpb.CreateDocumentRequest, ...gax.CallOption) (*CreateDocumentOperation, error) + CreateDocumentOperation(name string) *CreateDocumentOperation + ImportDocuments(context.Context, *dialogflowpb.ImportDocumentsRequest, ...gax.CallOption) (*ImportDocumentsOperation, error) + ImportDocumentsOperation(name string) *ImportDocumentsOperation + DeleteDocument(context.Context, *dialogflowpb.DeleteDocumentRequest, ...gax.CallOption) (*DeleteDocumentOperation, error) + DeleteDocumentOperation(name string) *DeleteDocumentOperation + UpdateDocument(context.Context, *dialogflowpb.UpdateDocumentRequest, ...gax.CallOption) (*UpdateDocumentOperation, error) + UpdateDocumentOperation(name string) *UpdateDocumentOperation + ReloadDocument(context.Context, *dialogflowpb.ReloadDocumentRequest, ...gax.CallOption) (*ReloadDocumentOperation, error) + ReloadDocumentOperation(name string) *ReloadDocumentOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// DocumentsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing knowledge Documents. +type DocumentsClient struct { + // The internal transport-dependent client. + internalClient internalDocumentsClient + + // The call options for this service. + CallOptions *DocumentsCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *DocumentsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *DocumentsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *DocumentsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListDocuments returns the list of all documents of the knowledge base. +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *DocumentsClient) ListDocuments(ctx context.Context, req *dialogflowpb.ListDocumentsRequest, opts ...gax.CallOption) *DocumentIterator { + return c.internalClient.ListDocuments(ctx, req, opts...) +} + +// GetDocument retrieves the specified document. +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *DocumentsClient) GetDocument(ctx context.Context, req *dialogflowpb.GetDocumentRequest, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + return c.internalClient.GetDocument(ctx, req, opts...) +} + +// CreateDocument creates a new document. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: Document +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *DocumentsClient) CreateDocument(ctx context.Context, req *dialogflowpb.CreateDocumentRequest, opts ...gax.CallOption) (*CreateDocumentOperation, error) { + return c.internalClient.CreateDocument(ctx, req, opts...) +} + +// CreateDocumentOperation returns a new CreateDocumentOperation from a given name. +// The name must be that of a previously created CreateDocumentOperation, possibly from a different process. +func (c *DocumentsClient) CreateDocumentOperation(name string) *CreateDocumentOperation { + return c.internalClient.CreateDocumentOperation(name) +} + +// ImportDocuments create documents by importing data from external sources. +// Dialogflow supports up to 350 documents in each request. If you try to +// import more, Dialogflow will return an error. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: ImportDocumentsResponse +func (c *DocumentsClient) ImportDocuments(ctx context.Context, req *dialogflowpb.ImportDocumentsRequest, opts ...gax.CallOption) (*ImportDocumentsOperation, error) { + return c.internalClient.ImportDocuments(ctx, req, opts...) +} + +// ImportDocumentsOperation returns a new ImportDocumentsOperation from a given name. +// The name must be that of a previously created ImportDocumentsOperation, possibly from a different process. +func (c *DocumentsClient) ImportDocumentsOperation(name string) *ImportDocumentsOperation { + return c.internalClient.ImportDocumentsOperation(name) +} + +// DeleteDocument deletes the specified document. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *DocumentsClient) DeleteDocument(ctx context.Context, req *dialogflowpb.DeleteDocumentRequest, opts ...gax.CallOption) (*DeleteDocumentOperation, error) { + return c.internalClient.DeleteDocument(ctx, req, opts...) +} + +// DeleteDocumentOperation returns a new DeleteDocumentOperation from a given name. +// The name must be that of a previously created DeleteDocumentOperation, possibly from a different process. +func (c *DocumentsClient) DeleteDocumentOperation(name string) *DeleteDocumentOperation { + return c.internalClient.DeleteDocumentOperation(name) +} + +// UpdateDocument updates the specified document. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: Document +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *DocumentsClient) UpdateDocument(ctx context.Context, req *dialogflowpb.UpdateDocumentRequest, opts ...gax.CallOption) (*UpdateDocumentOperation, error) { + return c.internalClient.UpdateDocument(ctx, req, opts...) +} + +// UpdateDocumentOperation returns a new UpdateDocumentOperation from a given name. +// The name must be that of a previously created UpdateDocumentOperation, possibly from a different process. +func (c *DocumentsClient) UpdateDocumentOperation(name string) *UpdateDocumentOperation { + return c.internalClient.UpdateDocumentOperation(name) +} + +// ReloadDocument reloads the specified document from its specified source, content_uri or +// content. The previously loaded content of the document will be deleted. +// Note: Even when the content of the document has not changed, there still +// may be side effects because of internal implementation changes. +// Note: If the document source is Google Cloud Storage URI, its metadata will +// be replaced with the custom metadata from Google Cloud Storage if the +// import_gcs_custom_metadata field is set to true in the request. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: Document +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *DocumentsClient) ReloadDocument(ctx context.Context, req *dialogflowpb.ReloadDocumentRequest, opts ...gax.CallOption) (*ReloadDocumentOperation, error) { + return c.internalClient.ReloadDocument(ctx, req, opts...) +} + +// ReloadDocumentOperation returns a new ReloadDocumentOperation from a given name. +// The name must be that of a previously created ReloadDocumentOperation, possibly from a different process. +func (c *DocumentsClient) ReloadDocumentOperation(name string) *ReloadDocumentOperation { + return c.internalClient.ReloadDocumentOperation(name) +} + +// GetLocation gets information about a location. +func (c *DocumentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *DocumentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *DocumentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *DocumentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *DocumentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// documentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type documentsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing DocumentsClient + CallOptions **DocumentsCallOptions + + // The gRPC API client. + documentsClient dialogflowpb.DocumentsClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewDocumentsClient creates a new documents client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing knowledge Documents. +func NewDocumentsClient(ctx context.Context, opts ...option.ClientOption) (*DocumentsClient, error) { + clientOpts := defaultDocumentsGRPCClientOptions() + if newDocumentsClientHook != nil { + hookOpts, err := newDocumentsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := DocumentsClient{CallOptions: defaultDocumentsCallOptions()} + + c := &documentsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + documentsClient: dialogflowpb.NewDocumentsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *documentsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *documentsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *documentsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type documentsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing DocumentsClient + CallOptions **DocumentsCallOptions +} + +// NewDocumentsRESTClient creates a new documents rest client. +// +// Service for managing knowledge Documents. +func NewDocumentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*DocumentsClient, error) { + clientOpts := append(defaultDocumentsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultDocumentsRESTCallOptions() + c := &documentsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &DocumentsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultDocumentsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *documentsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *documentsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *documentsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *documentsGRPCClient) ListDocuments(ctx context.Context, req *dialogflowpb.ListDocumentsRequest, opts ...gax.CallOption) *DocumentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListDocuments[0:len((*c.CallOptions).ListDocuments):len((*c.CallOptions).ListDocuments)], opts...) + it := &DocumentIterator{} + req = proto.Clone(req).(*dialogflowpb.ListDocumentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Document, string, error) { + resp := &dialogflowpb.ListDocumentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.ListDocuments(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetDocuments(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *documentsGRPCClient) GetDocument(ctx context.Context, req *dialogflowpb.GetDocumentRequest, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetDocument[0:len((*c.CallOptions).GetDocument):len((*c.CallOptions).GetDocument)], opts...) + var resp *dialogflowpb.Document + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.GetDocument(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *documentsGRPCClient) CreateDocument(ctx context.Context, req *dialogflowpb.CreateDocumentRequest, opts ...gax.CallOption) (*CreateDocumentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateDocument[0:len((*c.CallOptions).CreateDocument):len((*c.CallOptions).CreateDocument)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.CreateDocument(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentsGRPCClient) ImportDocuments(ctx context.Context, req *dialogflowpb.ImportDocumentsRequest, opts ...gax.CallOption) (*ImportDocumentsOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ImportDocuments[0:len((*c.CallOptions).ImportDocuments):len((*c.CallOptions).ImportDocuments)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.ImportDocuments(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportDocumentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentsGRPCClient) DeleteDocument(ctx context.Context, req *dialogflowpb.DeleteDocumentRequest, opts ...gax.CallOption) (*DeleteDocumentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteDocument[0:len((*c.CallOptions).DeleteDocument):len((*c.CallOptions).DeleteDocument)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.DeleteDocument(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentsGRPCClient) UpdateDocument(ctx context.Context, req *dialogflowpb.UpdateDocumentRequest, opts ...gax.CallOption) (*UpdateDocumentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "document.name", url.QueryEscape(req.GetDocument().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateDocument[0:len((*c.CallOptions).UpdateDocument):len((*c.CallOptions).UpdateDocument)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.UpdateDocument(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentsGRPCClient) ReloadDocument(ctx context.Context, req *dialogflowpb.ReloadDocumentRequest, opts ...gax.CallOption) (*ReloadDocumentOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ReloadDocument[0:len((*c.CallOptions).ReloadDocument):len((*c.CallOptions).ReloadDocument)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.ReloadDocument(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ReloadDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *documentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *documentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *documentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *documentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *documentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListDocuments returns the list of all documents of the knowledge base. +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *documentsRESTClient) ListDocuments(ctx context.Context, req *dialogflowpb.ListDocumentsRequest, opts ...gax.CallOption) *DocumentIterator { + it := &DocumentIterator{} + req = proto.Clone(req).(*dialogflowpb.ListDocumentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Document, string, error) { + resp := &dialogflowpb.ListDocumentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/documents", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDocuments(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetDocument retrieves the specified document. +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *documentsRESTClient) GetDocument(ctx context.Context, req *dialogflowpb.GetDocumentRequest, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetDocument[0:len((*c.CallOptions).GetDocument):len((*c.CallOptions).GetDocument)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Document{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateDocument creates a new document. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: Document +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *documentsRESTClient) CreateDocument(ctx context.Context, req *dialogflowpb.CreateDocumentRequest, opts ...gax.CallOption) (*CreateDocumentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDocument() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/documents", req.GetParent()) + + params := url.Values{} + if req.GetImportGcsCustomMetadata() { + params.Add("importGcsCustomMetadata", fmt.Sprintf("%v", req.GetImportGcsCustomMetadata())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &CreateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ImportDocuments create documents by importing data from external sources. +// Dialogflow supports up to 350 documents in each request. If you try to +// import more, Dialogflow will return an error. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: ImportDocumentsResponse +func (c *documentsRESTClient) ImportDocuments(ctx context.Context, req *dialogflowpb.ImportDocumentsRequest, opts ...gax.CallOption) (*ImportDocumentsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/documents:import", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &ImportDocumentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteDocument deletes the specified document. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *documentsRESTClient) DeleteDocument(ctx context.Context, req *dialogflowpb.DeleteDocumentRequest, opts ...gax.CallOption) (*DeleteDocumentOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &DeleteDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UpdateDocument updates the specified document. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: Document +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *documentsRESTClient) UpdateDocument(ctx context.Context, req *dialogflowpb.UpdateDocumentRequest, opts ...gax.CallOption) (*UpdateDocumentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDocument() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetDocument().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "document.name", url.QueryEscape(req.GetDocument().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &UpdateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ReloadDocument reloads the specified document from its specified source, content_uri or +// content. The previously loaded content of the document will be deleted. +// Note: Even when the content of the document has not changed, there still +// may be side effects because of internal implementation changes. +// Note: If the document source is Google Cloud Storage URI, its metadata will +// be replaced with the custom metadata from Google Cloud Storage if the +// import_gcs_custom_metadata field is set to true in the request. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). +// The returned Operation type has the following method-specific fields: +// +// metadata: KnowledgeOperationMetadata +// +// response: Document +// +// Note: The projects.agent.knowledgeBases.documents resource is deprecated; +// only use projects.knowledgeBases.documents. +func (c *documentsRESTClient) ReloadDocument(ctx context.Context, req *dialogflowpb.ReloadDocumentRequest, opts ...gax.CallOption) (*ReloadDocumentOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:reload", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &ReloadDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *documentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *documentsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *documentsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *documentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *documentsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateDocumentOperation manages a long-running operation from CreateDocument. +type CreateDocumentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateDocumentOperation returns a new CreateDocumentOperation from a given name. +// The name must be that of a previously created CreateDocumentOperation, possibly from a different process. +func (c *documentsGRPCClient) CreateDocumentOperation(name string) *CreateDocumentOperation { + return &CreateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateDocumentOperation returns a new CreateDocumentOperation from a given name. +// The name must be that of a previously created CreateDocumentOperation, possibly from a different process. +func (c *documentsRESTClient) CreateDocumentOperation(name string) *CreateDocumentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &CreateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateDocumentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.Document + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateDocumentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.Document + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateDocumentOperation) Metadata() (*dialogflowpb.KnowledgeOperationMetadata, error) { + var meta dialogflowpb.KnowledgeOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateDocumentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateDocumentOperation) Name() string { + return op.lro.Name() +} + +// DeleteDocumentOperation manages a long-running operation from DeleteDocument. +type DeleteDocumentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteDocumentOperation returns a new DeleteDocumentOperation from a given name. +// The name must be that of a previously created DeleteDocumentOperation, possibly from a different process. +func (c *documentsGRPCClient) DeleteDocumentOperation(name string) *DeleteDocumentOperation { + return &DeleteDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteDocumentOperation returns a new DeleteDocumentOperation from a given name. +// The name must be that of a previously created DeleteDocumentOperation, possibly from a different process. +func (c *documentsRESTClient) DeleteDocumentOperation(name string) *DeleteDocumentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &DeleteDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteDocumentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteDocumentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteDocumentOperation) Metadata() (*dialogflowpb.KnowledgeOperationMetadata, error) { + var meta dialogflowpb.KnowledgeOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteDocumentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteDocumentOperation) Name() string { + return op.lro.Name() +} + +// ImportDocumentsOperation manages a long-running operation from ImportDocuments. +type ImportDocumentsOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ImportDocumentsOperation returns a new ImportDocumentsOperation from a given name. +// The name must be that of a previously created ImportDocumentsOperation, possibly from a different process. +func (c *documentsGRPCClient) ImportDocumentsOperation(name string) *ImportDocumentsOperation { + return &ImportDocumentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ImportDocumentsOperation returns a new ImportDocumentsOperation from a given name. +// The name must be that of a previously created ImportDocumentsOperation, possibly from a different process. +func (c *documentsRESTClient) ImportDocumentsOperation(name string) *ImportDocumentsOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &ImportDocumentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ImportDocumentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ImportDocumentsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ImportDocumentsResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ImportDocumentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ImportDocumentsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.ImportDocumentsResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ImportDocumentsOperation) Metadata() (*dialogflowpb.KnowledgeOperationMetadata, error) { + var meta dialogflowpb.KnowledgeOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ImportDocumentsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ImportDocumentsOperation) Name() string { + return op.lro.Name() +} + +// ReloadDocumentOperation manages a long-running operation from ReloadDocument. +type ReloadDocumentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ReloadDocumentOperation returns a new ReloadDocumentOperation from a given name. +// The name must be that of a previously created ReloadDocumentOperation, possibly from a different process. +func (c *documentsGRPCClient) ReloadDocumentOperation(name string) *ReloadDocumentOperation { + return &ReloadDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ReloadDocumentOperation returns a new ReloadDocumentOperation from a given name. +// The name must be that of a previously created ReloadDocumentOperation, possibly from a different process. +func (c *documentsRESTClient) ReloadDocumentOperation(name string) *ReloadDocumentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &ReloadDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ReloadDocumentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.Document + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ReloadDocumentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.Document + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ReloadDocumentOperation) Metadata() (*dialogflowpb.KnowledgeOperationMetadata, error) { + var meta dialogflowpb.KnowledgeOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ReloadDocumentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ReloadDocumentOperation) Name() string { + return op.lro.Name() +} + +// UpdateDocumentOperation manages a long-running operation from UpdateDocument. +type UpdateDocumentOperation struct { + lro *longrunning.Operation + pollPath string +} + +// UpdateDocumentOperation returns a new UpdateDocumentOperation from a given name. +// The name must be that of a previously created UpdateDocumentOperation, possibly from a different process. +func (c *documentsGRPCClient) UpdateDocumentOperation(name string) *UpdateDocumentOperation { + return &UpdateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// UpdateDocumentOperation returns a new UpdateDocumentOperation from a given name. +// The name must be that of a previously created UpdateDocumentOperation, possibly from a different process. +func (c *documentsRESTClient) UpdateDocumentOperation(name string) *UpdateDocumentOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &UpdateDocumentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateDocumentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.Document + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateDocumentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.Document, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.Document + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateDocumentOperation) Metadata() (*dialogflowpb.KnowledgeOperationMetadata, error) { + var meta dialogflowpb.KnowledgeOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateDocumentOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateDocumentOperation) Name() string { + return op.lro.Name() +} + +// DocumentIterator manages a stream of *dialogflowpb.Document. +type DocumentIterator struct { + items []*dialogflowpb.Document + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Document, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *DocumentIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *DocumentIterator) Next() (*dialogflowpb.Document, error) { + var item *dialogflowpb.Document + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *DocumentIterator) bufLen() int { + return len(it.items) +} + +func (it *DocumentIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/documents_client_example_test.go b/dialogflow/apiv2beta1/documents_client_example_test.go new file mode 100644 index 000000000000..41c91bf30769 --- /dev/null +++ b/dialogflow/apiv2beta1/documents_client_example_test.go @@ -0,0 +1,400 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewDocumentsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewDocumentsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleDocumentsClient_ListDocuments() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListDocumentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListDocumentsRequest. + } + 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 + } +} + +func ExampleDocumentsClient_GetDocument() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetDocumentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetDocumentRequest. + } + resp, err := c.GetDocument(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_CreateDocument() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateDocumentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateDocumentRequest. + } + op, err := c.CreateDocument(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_ImportDocuments() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ImportDocumentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ImportDocumentsRequest. + } + op, err := c.ImportDocuments(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_DeleteDocument() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteDocumentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteDocumentRequest. + } + op, err := c.DeleteDocument(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDocumentsClient_UpdateDocument() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateDocumentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateDocumentRequest. + } + op, err := c.UpdateDocument(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_ReloadDocument() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ReloadDocumentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ReloadDocumentRequest. + } + op, err := c.ReloadDocument(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDocumentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDocumentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDocumentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/entity_types_client.go b/dialogflow/apiv2beta1/entity_types_client.go new file mode 100644 index 000000000000..73da39c2ce35 --- /dev/null +++ b/dialogflow/apiv2beta1/entity_types_client.go @@ -0,0 +1,2595 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + structpb "github.com/golang/protobuf/ptypes/struct" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newEntityTypesClientHook clientHook + +// EntityTypesCallOptions contains the retry settings for each method of EntityTypesClient. +type EntityTypesCallOptions struct { + ListEntityTypes []gax.CallOption + GetEntityType []gax.CallOption + CreateEntityType []gax.CallOption + UpdateEntityType []gax.CallOption + DeleteEntityType []gax.CallOption + BatchUpdateEntityTypes []gax.CallOption + BatchDeleteEntityTypes []gax.CallOption + BatchCreateEntities []gax.CallOption + BatchUpdateEntities []gax.CallOption + BatchDeleteEntities []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultEntityTypesGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultEntityTypesCallOptions() *EntityTypesCallOptions { + return &EntityTypesCallOptions{ + ListEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchUpdateEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchDeleteEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchCreateEntities: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchUpdateEntities: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchDeleteEntities: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultEntityTypesRESTCallOptions() *EntityTypesCallOptions { + return &EntityTypesCallOptions{ + ListEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchUpdateEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchDeleteEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchCreateEntities: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchUpdateEntities: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchDeleteEntities: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalEntityTypesClient is an interface that defines the methods available from Dialogflow API. +type internalEntityTypesClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListEntityTypes(context.Context, *dialogflowpb.ListEntityTypesRequest, ...gax.CallOption) *EntityTypeIterator + GetEntityType(context.Context, *dialogflowpb.GetEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.EntityType, error) + CreateEntityType(context.Context, *dialogflowpb.CreateEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.EntityType, error) + UpdateEntityType(context.Context, *dialogflowpb.UpdateEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.EntityType, error) + DeleteEntityType(context.Context, *dialogflowpb.DeleteEntityTypeRequest, ...gax.CallOption) error + BatchUpdateEntityTypes(context.Context, *dialogflowpb.BatchUpdateEntityTypesRequest, ...gax.CallOption) (*BatchUpdateEntityTypesOperation, error) + BatchUpdateEntityTypesOperation(name string) *BatchUpdateEntityTypesOperation + BatchDeleteEntityTypes(context.Context, *dialogflowpb.BatchDeleteEntityTypesRequest, ...gax.CallOption) (*BatchDeleteEntityTypesOperation, error) + BatchDeleteEntityTypesOperation(name string) *BatchDeleteEntityTypesOperation + BatchCreateEntities(context.Context, *dialogflowpb.BatchCreateEntitiesRequest, ...gax.CallOption) (*BatchCreateEntitiesOperation, error) + BatchCreateEntitiesOperation(name string) *BatchCreateEntitiesOperation + BatchUpdateEntities(context.Context, *dialogflowpb.BatchUpdateEntitiesRequest, ...gax.CallOption) (*BatchUpdateEntitiesOperation, error) + BatchUpdateEntitiesOperation(name string) *BatchUpdateEntitiesOperation + BatchDeleteEntities(context.Context, *dialogflowpb.BatchDeleteEntitiesRequest, ...gax.CallOption) (*BatchDeleteEntitiesOperation, error) + BatchDeleteEntitiesOperation(name string) *BatchDeleteEntitiesOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// EntityTypesClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing EntityTypes. +type EntityTypesClient struct { + // The internal transport-dependent client. + internalClient internalEntityTypesClient + + // The call options for this service. + CallOptions *EntityTypesCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *EntityTypesClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *EntityTypesClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *EntityTypesClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListEntityTypes returns the list of all entity types in the specified agent. +func (c *EntityTypesClient) ListEntityTypes(ctx context.Context, req *dialogflowpb.ListEntityTypesRequest, opts ...gax.CallOption) *EntityTypeIterator { + return c.internalClient.ListEntityTypes(ctx, req, opts...) +} + +// GetEntityType retrieves the specified entity type. +func (c *EntityTypesClient) GetEntityType(ctx context.Context, req *dialogflowpb.GetEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + return c.internalClient.GetEntityType(ctx, req, opts...) +} + +// CreateEntityType creates an entity type in the specified agent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) CreateEntityType(ctx context.Context, req *dialogflowpb.CreateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + return c.internalClient.CreateEntityType(ctx, req, opts...) +} + +// UpdateEntityType updates the specified entity type. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) UpdateEntityType(ctx context.Context, req *dialogflowpb.UpdateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + return c.internalClient.UpdateEntityType(ctx, req, opts...) +} + +// DeleteEntityType deletes the specified entity type. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) DeleteEntityType(ctx context.Context, req *dialogflowpb.DeleteEntityTypeRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteEntityType(ctx, req, opts...) +} + +// BatchUpdateEntityTypes updates/Creates multiple entity types in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: BatchUpdateEntityTypesResponse +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) BatchUpdateEntityTypes(ctx context.Context, req *dialogflowpb.BatchUpdateEntityTypesRequest, opts ...gax.CallOption) (*BatchUpdateEntityTypesOperation, error) { + return c.internalClient.BatchUpdateEntityTypes(ctx, req, opts...) +} + +// BatchUpdateEntityTypesOperation returns a new BatchUpdateEntityTypesOperation from a given name. +// The name must be that of a previously created BatchUpdateEntityTypesOperation, possibly from a different process. +func (c *EntityTypesClient) BatchUpdateEntityTypesOperation(name string) *BatchUpdateEntityTypesOperation { + return c.internalClient.BatchUpdateEntityTypesOperation(name) +} + +// BatchDeleteEntityTypes deletes entity types in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) BatchDeleteEntityTypes(ctx context.Context, req *dialogflowpb.BatchDeleteEntityTypesRequest, opts ...gax.CallOption) (*BatchDeleteEntityTypesOperation, error) { + return c.internalClient.BatchDeleteEntityTypes(ctx, req, opts...) +} + +// BatchDeleteEntityTypesOperation returns a new BatchDeleteEntityTypesOperation from a given name. +// The name must be that of a previously created BatchDeleteEntityTypesOperation, possibly from a different process. +func (c *EntityTypesClient) BatchDeleteEntityTypesOperation(name string) *BatchDeleteEntityTypesOperation { + return c.internalClient.BatchDeleteEntityTypesOperation(name) +} + +// BatchCreateEntities creates multiple new entities in the specified entity type. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) BatchCreateEntities(ctx context.Context, req *dialogflowpb.BatchCreateEntitiesRequest, opts ...gax.CallOption) (*BatchCreateEntitiesOperation, error) { + return c.internalClient.BatchCreateEntities(ctx, req, opts...) +} + +// BatchCreateEntitiesOperation returns a new BatchCreateEntitiesOperation from a given name. +// The name must be that of a previously created BatchCreateEntitiesOperation, possibly from a different process. +func (c *EntityTypesClient) BatchCreateEntitiesOperation(name string) *BatchCreateEntitiesOperation { + return c.internalClient.BatchCreateEntitiesOperation(name) +} + +// BatchUpdateEntities updates or creates multiple entities in the specified entity type. This +// method does not affect entities in the entity type that aren’t explicitly +// specified in the request. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +func (c *EntityTypesClient) BatchUpdateEntities(ctx context.Context, req *dialogflowpb.BatchUpdateEntitiesRequest, opts ...gax.CallOption) (*BatchUpdateEntitiesOperation, error) { + return c.internalClient.BatchUpdateEntities(ctx, req, opts...) +} + +// BatchUpdateEntitiesOperation returns a new BatchUpdateEntitiesOperation from a given name. +// The name must be that of a previously created BatchUpdateEntitiesOperation, possibly from a different process. +func (c *EntityTypesClient) BatchUpdateEntitiesOperation(name string) *BatchUpdateEntitiesOperation { + return c.internalClient.BatchUpdateEntitiesOperation(name) +} + +// BatchDeleteEntities deletes entities in the specified entity type. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *EntityTypesClient) BatchDeleteEntities(ctx context.Context, req *dialogflowpb.BatchDeleteEntitiesRequest, opts ...gax.CallOption) (*BatchDeleteEntitiesOperation, error) { + return c.internalClient.BatchDeleteEntities(ctx, req, opts...) +} + +// BatchDeleteEntitiesOperation returns a new BatchDeleteEntitiesOperation from a given name. +// The name must be that of a previously created BatchDeleteEntitiesOperation, possibly from a different process. +func (c *EntityTypesClient) BatchDeleteEntitiesOperation(name string) *BatchDeleteEntitiesOperation { + return c.internalClient.BatchDeleteEntitiesOperation(name) +} + +// GetLocation gets information about a location. +func (c *EntityTypesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *EntityTypesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *EntityTypesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *EntityTypesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *EntityTypesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// entityTypesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type entityTypesGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing EntityTypesClient + CallOptions **EntityTypesCallOptions + + // The gRPC API client. + entityTypesClient dialogflowpb.EntityTypesClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewEntityTypesClient creates a new entity types client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing EntityTypes. +func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*EntityTypesClient, error) { + clientOpts := defaultEntityTypesGRPCClientOptions() + if newEntityTypesClientHook != nil { + hookOpts, err := newEntityTypesClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := EntityTypesClient{CallOptions: defaultEntityTypesCallOptions()} + + c := &entityTypesGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + entityTypesClient: dialogflowpb.NewEntityTypesClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *entityTypesGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *entityTypesGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *entityTypesGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type entityTypesRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing EntityTypesClient + CallOptions **EntityTypesCallOptions +} + +// NewEntityTypesRESTClient creates a new entity types rest client. +// +// Service for managing EntityTypes. +func NewEntityTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*EntityTypesClient, error) { + clientOpts := append(defaultEntityTypesRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultEntityTypesRESTCallOptions() + c := &entityTypesRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &EntityTypesClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultEntityTypesRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *entityTypesRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *entityTypesRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *entityTypesRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *entityTypesGRPCClient) ListEntityTypes(ctx context.Context, req *dialogflowpb.ListEntityTypesRequest, opts ...gax.CallOption) *EntityTypeIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListEntityTypes[0:len((*c.CallOptions).ListEntityTypes):len((*c.CallOptions).ListEntityTypes)], opts...) + it := &EntityTypeIterator{} + req = proto.Clone(req).(*dialogflowpb.ListEntityTypesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.EntityType, string, error) { + resp := &dialogflowpb.ListEntityTypesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.ListEntityTypes(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetEntityTypes(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *entityTypesGRPCClient) GetEntityType(ctx context.Context, req *dialogflowpb.GetEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetEntityType[0:len((*c.CallOptions).GetEntityType):len((*c.CallOptions).GetEntityType)], opts...) + var resp *dialogflowpb.EntityType + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.GetEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) CreateEntityType(ctx context.Context, req *dialogflowpb.CreateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateEntityType[0:len((*c.CallOptions).CreateEntityType):len((*c.CallOptions).CreateEntityType)], opts...) + var resp *dialogflowpb.EntityType + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.CreateEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) UpdateEntityType(ctx context.Context, req *dialogflowpb.UpdateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type.name", url.QueryEscape(req.GetEntityType().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateEntityType[0:len((*c.CallOptions).UpdateEntityType):len((*c.CallOptions).UpdateEntityType)], opts...) + var resp *dialogflowpb.EntityType + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.UpdateEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) DeleteEntityType(ctx context.Context, req *dialogflowpb.DeleteEntityTypeRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteEntityType[0:len((*c.CallOptions).DeleteEntityType):len((*c.CallOptions).DeleteEntityType)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.entityTypesClient.DeleteEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *entityTypesGRPCClient) BatchUpdateEntityTypes(ctx context.Context, req *dialogflowpb.BatchUpdateEntityTypesRequest, opts ...gax.CallOption) (*BatchUpdateEntityTypesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchUpdateEntityTypes[0:len((*c.CallOptions).BatchUpdateEntityTypes):len((*c.CallOptions).BatchUpdateEntityTypes)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.BatchUpdateEntityTypes(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchUpdateEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *entityTypesGRPCClient) BatchDeleteEntityTypes(ctx context.Context, req *dialogflowpb.BatchDeleteEntityTypesRequest, opts ...gax.CallOption) (*BatchDeleteEntityTypesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchDeleteEntityTypes[0:len((*c.CallOptions).BatchDeleteEntityTypes):len((*c.CallOptions).BatchDeleteEntityTypes)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.BatchDeleteEntityTypes(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchDeleteEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *entityTypesGRPCClient) BatchCreateEntities(ctx context.Context, req *dialogflowpb.BatchCreateEntitiesRequest, opts ...gax.CallOption) (*BatchCreateEntitiesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchCreateEntities[0:len((*c.CallOptions).BatchCreateEntities):len((*c.CallOptions).BatchCreateEntities)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.BatchCreateEntities(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchCreateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *entityTypesGRPCClient) BatchUpdateEntities(ctx context.Context, req *dialogflowpb.BatchUpdateEntitiesRequest, opts ...gax.CallOption) (*BatchUpdateEntitiesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchUpdateEntities[0:len((*c.CallOptions).BatchUpdateEntities):len((*c.CallOptions).BatchUpdateEntities)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.BatchUpdateEntities(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchUpdateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *entityTypesGRPCClient) BatchDeleteEntities(ctx context.Context, req *dialogflowpb.BatchDeleteEntitiesRequest, opts ...gax.CallOption) (*BatchDeleteEntitiesOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchDeleteEntities[0:len((*c.CallOptions).BatchDeleteEntities):len((*c.CallOptions).BatchDeleteEntities)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.entityTypesClient.BatchDeleteEntities(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchDeleteEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *entityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *entityTypesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *entityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *entityTypesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListEntityTypes returns the list of all entity types in the specified agent. +func (c *entityTypesRESTClient) ListEntityTypes(ctx context.Context, req *dialogflowpb.ListEntityTypesRequest, opts ...gax.CallOption) *EntityTypeIterator { + it := &EntityTypeIterator{} + req = proto.Clone(req).(*dialogflowpb.ListEntityTypesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.EntityType, string, error) { + resp := &dialogflowpb.ListEntityTypesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entityTypes", req.GetParent()) + + params := url.Values{} + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEntityTypes(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetEntityType retrieves the specified entity type. +func (c *entityTypesRESTClient) GetEntityType(ctx context.Context, req *dialogflowpb.GetEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEntityType[0:len((*c.CallOptions).GetEntityType):len((*c.CallOptions).GetEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.EntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateEntityType creates an entity type in the specified agent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) CreateEntityType(ctx context.Context, req *dialogflowpb.CreateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntityType() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entityTypes", req.GetParent()) + + params := url.Values{} + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateEntityType[0:len((*c.CallOptions).CreateEntityType):len((*c.CallOptions).CreateEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.EntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateEntityType updates the specified entity type. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) UpdateEntityType(ctx context.Context, req *dialogflowpb.UpdateEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.EntityType, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEntityType() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetEntityType().GetName()) + + params := url.Values{} + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "entity_type.name", url.QueryEscape(req.GetEntityType().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEntityType[0:len((*c.CallOptions).UpdateEntityType):len((*c.CallOptions).UpdateEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.EntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteEntityType deletes the specified entity type. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) DeleteEntityType(ctx context.Context, req *dialogflowpb.DeleteEntityTypeRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// BatchUpdateEntityTypes updates/Creates multiple entity types in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: BatchUpdateEntityTypesResponse +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) BatchUpdateEntityTypes(ctx context.Context, req *dialogflowpb.BatchUpdateEntityTypesRequest, opts ...gax.CallOption) (*BatchUpdateEntityTypesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entityTypes:batchUpdate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchUpdateEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchDeleteEntityTypes deletes entity types in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) BatchDeleteEntityTypes(ctx context.Context, req *dialogflowpb.BatchDeleteEntityTypesRequest, opts ...gax.CallOption) (*BatchDeleteEntityTypesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entityTypes:batchDelete", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchDeleteEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchCreateEntities creates multiple new entities in the specified entity type. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) BatchCreateEntities(ctx context.Context, req *dialogflowpb.BatchCreateEntitiesRequest, opts ...gax.CallOption) (*BatchCreateEntitiesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entities:batchCreate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchCreateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchUpdateEntities updates or creates multiple entities in the specified entity type. This +// method does not affect entities in the entity type that aren’t explicitly +// specified in the request. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +func (c *entityTypesRESTClient) BatchUpdateEntities(ctx context.Context, req *dialogflowpb.BatchUpdateEntitiesRequest, opts ...gax.CallOption) (*BatchUpdateEntitiesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entities:batchUpdate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchUpdateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchDeleteEntities deletes entities in the specified entity type. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *entityTypesRESTClient) BatchDeleteEntities(ctx context.Context, req *dialogflowpb.BatchDeleteEntitiesRequest, opts ...gax.CallOption) (*BatchDeleteEntitiesOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entities:batchDelete", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchDeleteEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *entityTypesRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *entityTypesRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *entityTypesRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *entityTypesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *entityTypesRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// BatchCreateEntitiesOperation manages a long-running operation from BatchCreateEntities. +type BatchCreateEntitiesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchCreateEntitiesOperation returns a new BatchCreateEntitiesOperation from a given name. +// The name must be that of a previously created BatchCreateEntitiesOperation, possibly from a different process. +func (c *entityTypesGRPCClient) BatchCreateEntitiesOperation(name string) *BatchCreateEntitiesOperation { + return &BatchCreateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchCreateEntitiesOperation returns a new BatchCreateEntitiesOperation from a given name. +// The name must be that of a previously created BatchCreateEntitiesOperation, possibly from a different process. +func (c *entityTypesRESTClient) BatchCreateEntitiesOperation(name string) *BatchCreateEntitiesOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchCreateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchCreateEntitiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchCreateEntitiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchCreateEntitiesOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchCreateEntitiesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchCreateEntitiesOperation) Name() string { + return op.lro.Name() +} + +// BatchDeleteEntitiesOperation manages a long-running operation from BatchDeleteEntities. +type BatchDeleteEntitiesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchDeleteEntitiesOperation returns a new BatchDeleteEntitiesOperation from a given name. +// The name must be that of a previously created BatchDeleteEntitiesOperation, possibly from a different process. +func (c *entityTypesGRPCClient) BatchDeleteEntitiesOperation(name string) *BatchDeleteEntitiesOperation { + return &BatchDeleteEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchDeleteEntitiesOperation returns a new BatchDeleteEntitiesOperation from a given name. +// The name must be that of a previously created BatchDeleteEntitiesOperation, possibly from a different process. +func (c *entityTypesRESTClient) BatchDeleteEntitiesOperation(name string) *BatchDeleteEntitiesOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchDeleteEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchDeleteEntitiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchDeleteEntitiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchDeleteEntitiesOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchDeleteEntitiesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchDeleteEntitiesOperation) Name() string { + return op.lro.Name() +} + +// BatchDeleteEntityTypesOperation manages a long-running operation from BatchDeleteEntityTypes. +type BatchDeleteEntityTypesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchDeleteEntityTypesOperation returns a new BatchDeleteEntityTypesOperation from a given name. +// The name must be that of a previously created BatchDeleteEntityTypesOperation, possibly from a different process. +func (c *entityTypesGRPCClient) BatchDeleteEntityTypesOperation(name string) *BatchDeleteEntityTypesOperation { + return &BatchDeleteEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchDeleteEntityTypesOperation returns a new BatchDeleteEntityTypesOperation from a given name. +// The name must be that of a previously created BatchDeleteEntityTypesOperation, possibly from a different process. +func (c *entityTypesRESTClient) BatchDeleteEntityTypesOperation(name string) *BatchDeleteEntityTypesOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchDeleteEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchDeleteEntityTypesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchDeleteEntityTypesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchDeleteEntityTypesOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchDeleteEntityTypesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchDeleteEntityTypesOperation) Name() string { + return op.lro.Name() +} + +// BatchUpdateEntitiesOperation manages a long-running operation from BatchUpdateEntities. +type BatchUpdateEntitiesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchUpdateEntitiesOperation returns a new BatchUpdateEntitiesOperation from a given name. +// The name must be that of a previously created BatchUpdateEntitiesOperation, possibly from a different process. +func (c *entityTypesGRPCClient) BatchUpdateEntitiesOperation(name string) *BatchUpdateEntitiesOperation { + return &BatchUpdateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchUpdateEntitiesOperation returns a new BatchUpdateEntitiesOperation from a given name. +// The name must be that of a previously created BatchUpdateEntitiesOperation, possibly from a different process. +func (c *entityTypesRESTClient) BatchUpdateEntitiesOperation(name string) *BatchUpdateEntitiesOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchUpdateEntitiesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchUpdateEntitiesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchUpdateEntitiesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchUpdateEntitiesOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchUpdateEntitiesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchUpdateEntitiesOperation) Name() string { + return op.lro.Name() +} + +// BatchUpdateEntityTypesOperation manages a long-running operation from BatchUpdateEntityTypes. +type BatchUpdateEntityTypesOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchUpdateEntityTypesOperation returns a new BatchUpdateEntityTypesOperation from a given name. +// The name must be that of a previously created BatchUpdateEntityTypesOperation, possibly from a different process. +func (c *entityTypesGRPCClient) BatchUpdateEntityTypesOperation(name string) *BatchUpdateEntityTypesOperation { + return &BatchUpdateEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchUpdateEntityTypesOperation returns a new BatchUpdateEntityTypesOperation from a given name. +// The name must be that of a previously created BatchUpdateEntityTypesOperation, possibly from a different process. +func (c *entityTypesRESTClient) BatchUpdateEntityTypesOperation(name string) *BatchUpdateEntityTypesOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchUpdateEntityTypesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchUpdateEntityTypesOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateEntityTypesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.BatchUpdateEntityTypesResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchUpdateEntityTypesOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateEntityTypesResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.BatchUpdateEntityTypesResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchUpdateEntityTypesOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchUpdateEntityTypesOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchUpdateEntityTypesOperation) Name() string { + return op.lro.Name() +} + +// EntityTypeIterator manages a stream of *dialogflowpb.EntityType. +type EntityTypeIterator struct { + items []*dialogflowpb.EntityType + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.EntityType, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *EntityTypeIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *EntityTypeIterator) Next() (*dialogflowpb.EntityType, error) { + var item *dialogflowpb.EntityType + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *EntityTypeIterator) bufLen() int { + return len(it.items) +} + +func (it *EntityTypeIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/entity_types_client_example_test.go b/dialogflow/apiv2beta1/entity_types_client_example_test.go new file mode 100644 index 000000000000..1189e19894b3 --- /dev/null +++ b/dialogflow/apiv2beta1/entity_types_client_example_test.go @@ -0,0 +1,467 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewEntityTypesClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewEntityTypesRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleEntityTypesClient_ListEntityTypes() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListEntityTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListEntityTypesRequest. + } + it := c.ListEntityTypes(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEntityTypesClient_GetEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetEntityTypeRequest. + } + resp, err := c.GetEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_CreateEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateEntityTypeRequest. + } + resp, err := c.CreateEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_UpdateEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateEntityTypeRequest. + } + resp, err := c.UpdateEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_DeleteEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteEntityTypeRequest. + } + err = c.DeleteEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_BatchUpdateEntityTypes() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchUpdateEntityTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchUpdateEntityTypesRequest. + } + op, err := c.BatchUpdateEntityTypes(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_BatchDeleteEntityTypes() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchDeleteEntityTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchDeleteEntityTypesRequest. + } + op, err := c.BatchDeleteEntityTypes(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_BatchCreateEntities() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchCreateEntitiesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchCreateEntitiesRequest. + } + op, err := c.BatchCreateEntities(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_BatchUpdateEntities() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchUpdateEntitiesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchUpdateEntitiesRequest. + } + op, err := c.BatchUpdateEntities(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_BatchDeleteEntities() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchDeleteEntitiesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchDeleteEntitiesRequest. + } + op, err := c.BatchDeleteEntities(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEntityTypesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEntityTypesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEntityTypesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/environments_client.go b/dialogflow/apiv2beta1/environments_client.go new file mode 100644 index 000000000000..d3fd9992e18a --- /dev/null +++ b/dialogflow/apiv2beta1/environments_client.go @@ -0,0 +1,1631 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newEnvironmentsClientHook clientHook + +// EnvironmentsCallOptions contains the retry settings for each method of EnvironmentsClient. +type EnvironmentsCallOptions struct { + ListEnvironments []gax.CallOption + GetEnvironment []gax.CallOption + CreateEnvironment []gax.CallOption + UpdateEnvironment []gax.CallOption + DeleteEnvironment []gax.CallOption + GetEnvironmentHistory []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultEnvironmentsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultEnvironmentsCallOptions() *EnvironmentsCallOptions { + return &EnvironmentsCallOptions{ + ListEnvironments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetEnvironmentHistory: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultEnvironmentsRESTCallOptions() *EnvironmentsCallOptions { + return &EnvironmentsCallOptions{ + ListEnvironments: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteEnvironment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetEnvironmentHistory: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalEnvironmentsClient is an interface that defines the methods available from Dialogflow API. +type internalEnvironmentsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListEnvironments(context.Context, *dialogflowpb.ListEnvironmentsRequest, ...gax.CallOption) *EnvironmentIterator + GetEnvironment(context.Context, *dialogflowpb.GetEnvironmentRequest, ...gax.CallOption) (*dialogflowpb.Environment, error) + CreateEnvironment(context.Context, *dialogflowpb.CreateEnvironmentRequest, ...gax.CallOption) (*dialogflowpb.Environment, error) + UpdateEnvironment(context.Context, *dialogflowpb.UpdateEnvironmentRequest, ...gax.CallOption) (*dialogflowpb.Environment, error) + DeleteEnvironment(context.Context, *dialogflowpb.DeleteEnvironmentRequest, ...gax.CallOption) error + GetEnvironmentHistory(context.Context, *dialogflowpb.GetEnvironmentHistoryRequest, ...gax.CallOption) *EnvironmentHistory_EntryIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// EnvironmentsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Environments. +type EnvironmentsClient struct { + // The internal transport-dependent client. + internalClient internalEnvironmentsClient + + // The call options for this service. + CallOptions *EnvironmentsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *EnvironmentsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *EnvironmentsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *EnvironmentsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListEnvironments returns the list of all non-draft environments of the specified agent. +func (c *EnvironmentsClient) ListEnvironments(ctx context.Context, req *dialogflowpb.ListEnvironmentsRequest, opts ...gax.CallOption) *EnvironmentIterator { + return c.internalClient.ListEnvironments(ctx, req, opts...) +} + +// GetEnvironment retrieves the specified agent environment. +func (c *EnvironmentsClient) GetEnvironment(ctx context.Context, req *dialogflowpb.GetEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + return c.internalClient.GetEnvironment(ctx, req, opts...) +} + +// CreateEnvironment creates an agent environment. +func (c *EnvironmentsClient) CreateEnvironment(ctx context.Context, req *dialogflowpb.CreateEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + return c.internalClient.CreateEnvironment(ctx, req, opts...) +} + +// UpdateEnvironment updates the specified agent environment. +// +// This method allows you to deploy new agent versions into the environment. +// When an environment is pointed to a new agent version by setting +// environment.agent_version, the environment is temporarily set to the +// LOADING state. During that time, the environment keeps on serving the +// previous version of the agent. After the new agent version is done loading, +// the environment is set back to the RUNNING state. +// You can use “-” as Environment ID in environment name to update version +// in “draft” environment. WARNING: this will negate all recent changes to +// draft and can’t be undone. You may want to save the draft to a version +// before calling this function. +func (c *EnvironmentsClient) UpdateEnvironment(ctx context.Context, req *dialogflowpb.UpdateEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + return c.internalClient.UpdateEnvironment(ctx, req, opts...) +} + +// DeleteEnvironment deletes the specified agent environment. +func (c *EnvironmentsClient) DeleteEnvironment(ctx context.Context, req *dialogflowpb.DeleteEnvironmentRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteEnvironment(ctx, req, opts...) +} + +// GetEnvironmentHistory gets the history of the specified environment. +func (c *EnvironmentsClient) GetEnvironmentHistory(ctx context.Context, req *dialogflowpb.GetEnvironmentHistoryRequest, opts ...gax.CallOption) *EnvironmentHistory_EntryIterator { + return c.internalClient.GetEnvironmentHistory(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *EnvironmentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *EnvironmentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *EnvironmentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *EnvironmentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *EnvironmentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// environmentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type environmentsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing EnvironmentsClient + CallOptions **EnvironmentsCallOptions + + // The gRPC API client. + environmentsClient dialogflowpb.EnvironmentsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewEnvironmentsClient creates a new environments client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Environments. +func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*EnvironmentsClient, error) { + clientOpts := defaultEnvironmentsGRPCClientOptions() + if newEnvironmentsClientHook != nil { + hookOpts, err := newEnvironmentsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := EnvironmentsClient{CallOptions: defaultEnvironmentsCallOptions()} + + c := &environmentsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + environmentsClient: dialogflowpb.NewEnvironmentsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *environmentsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *environmentsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *environmentsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type environmentsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing EnvironmentsClient + CallOptions **EnvironmentsCallOptions +} + +// NewEnvironmentsRESTClient creates a new environments rest client. +// +// Service for managing Environments. +func NewEnvironmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*EnvironmentsClient, error) { + clientOpts := append(defaultEnvironmentsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultEnvironmentsRESTCallOptions() + c := &environmentsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &EnvironmentsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultEnvironmentsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *environmentsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *environmentsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *environmentsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *environmentsGRPCClient) ListEnvironments(ctx context.Context, req *dialogflowpb.ListEnvironmentsRequest, opts ...gax.CallOption) *EnvironmentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListEnvironments[0:len((*c.CallOptions).ListEnvironments):len((*c.CallOptions).ListEnvironments)], opts...) + it := &EnvironmentIterator{} + req = proto.Clone(req).(*dialogflowpb.ListEnvironmentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Environment, string, error) { + resp := &dialogflowpb.ListEnvironmentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.environmentsClient.ListEnvironments(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetEnvironments(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *environmentsGRPCClient) GetEnvironment(ctx context.Context, req *dialogflowpb.GetEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetEnvironment[0:len((*c.CallOptions).GetEnvironment):len((*c.CallOptions).GetEnvironment)], opts...) + var resp *dialogflowpb.Environment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.environmentsClient.GetEnvironment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) CreateEnvironment(ctx context.Context, req *dialogflowpb.CreateEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateEnvironment[0:len((*c.CallOptions).CreateEnvironment):len((*c.CallOptions).CreateEnvironment)], opts...) + var resp *dialogflowpb.Environment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.environmentsClient.CreateEnvironment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) UpdateEnvironment(ctx context.Context, req *dialogflowpb.UpdateEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "environment.name", url.QueryEscape(req.GetEnvironment().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateEnvironment[0:len((*c.CallOptions).UpdateEnvironment):len((*c.CallOptions).UpdateEnvironment)], opts...) + var resp *dialogflowpb.Environment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.environmentsClient.UpdateEnvironment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) DeleteEnvironment(ctx context.Context, req *dialogflowpb.DeleteEnvironmentRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteEnvironment[0:len((*c.CallOptions).DeleteEnvironment):len((*c.CallOptions).DeleteEnvironment)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.environmentsClient.DeleteEnvironment(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *environmentsGRPCClient) GetEnvironmentHistory(ctx context.Context, req *dialogflowpb.GetEnvironmentHistoryRequest, opts ...gax.CallOption) *EnvironmentHistory_EntryIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetEnvironmentHistory[0:len((*c.CallOptions).GetEnvironmentHistory):len((*c.CallOptions).GetEnvironmentHistory)], opts...) + it := &EnvironmentHistory_EntryIterator{} + req = proto.Clone(req).(*dialogflowpb.GetEnvironmentHistoryRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.EnvironmentHistory_Entry, string, error) { + resp := &dialogflowpb.EnvironmentHistory{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.environmentsClient.GetEnvironmentHistory(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetEntries(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *environmentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *environmentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *environmentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *environmentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListEnvironments returns the list of all non-draft environments of the specified agent. +func (c *environmentsRESTClient) ListEnvironments(ctx context.Context, req *dialogflowpb.ListEnvironmentsRequest, opts ...gax.CallOption) *EnvironmentIterator { + it := &EnvironmentIterator{} + req = proto.Clone(req).(*dialogflowpb.ListEnvironmentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Environment, string, error) { + resp := &dialogflowpb.ListEnvironmentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/environments", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEnvironments(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetEnvironment retrieves the specified agent environment. +func (c *environmentsRESTClient) GetEnvironment(ctx context.Context, req *dialogflowpb.GetEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetEnvironment[0:len((*c.CallOptions).GetEnvironment):len((*c.CallOptions).GetEnvironment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Environment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateEnvironment creates an agent environment. +func (c *environmentsRESTClient) CreateEnvironment(ctx context.Context, req *dialogflowpb.CreateEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEnvironment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/environments", req.GetParent()) + + params := url.Values{} + params.Add("environmentId", fmt.Sprintf("%v", req.GetEnvironmentId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateEnvironment[0:len((*c.CallOptions).CreateEnvironment):len((*c.CallOptions).CreateEnvironment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Environment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateEnvironment updates the specified agent environment. +// +// This method allows you to deploy new agent versions into the environment. +// When an environment is pointed to a new agent version by setting +// environment.agent_version, the environment is temporarily set to the +// LOADING state. During that time, the environment keeps on serving the +// previous version of the agent. After the new agent version is done loading, +// the environment is set back to the RUNNING state. +// You can use “-” as Environment ID in environment name to update version +// in “draft” environment. WARNING: this will negate all recent changes to +// draft and can’t be undone. You may want to save the draft to a version +// before calling this function. +func (c *environmentsRESTClient) UpdateEnvironment(ctx context.Context, req *dialogflowpb.UpdateEnvironmentRequest, opts ...gax.CallOption) (*dialogflowpb.Environment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetEnvironment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetEnvironment().GetName()) + + params := url.Values{} + if req.GetAllowLoadToDraftAndDiscardChanges() { + params.Add("allowLoadToDraftAndDiscardChanges", fmt.Sprintf("%v", req.GetAllowLoadToDraftAndDiscardChanges())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "environment.name", url.QueryEscape(req.GetEnvironment().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateEnvironment[0:len((*c.CallOptions).UpdateEnvironment):len((*c.CallOptions).UpdateEnvironment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Environment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteEnvironment deletes the specified agent environment. +func (c *environmentsRESTClient) DeleteEnvironment(ctx context.Context, req *dialogflowpb.DeleteEnvironmentRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetEnvironmentHistory gets the history of the specified environment. +func (c *environmentsRESTClient) GetEnvironmentHistory(ctx context.Context, req *dialogflowpb.GetEnvironmentHistoryRequest, opts ...gax.CallOption) *EnvironmentHistory_EntryIterator { + it := &EnvironmentHistory_EntryIterator{} + req = proto.Clone(req).(*dialogflowpb.GetEnvironmentHistoryRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.EnvironmentHistory_Entry, string, error) { + resp := &dialogflowpb.EnvironmentHistory{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/history", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetEntries(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetLocation gets information about a location. +func (c *environmentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *environmentsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *environmentsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *environmentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *environmentsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// EnvironmentHistory_EntryIterator manages a stream of *dialogflowpb.EnvironmentHistory_Entry. +type EnvironmentHistory_EntryIterator struct { + items []*dialogflowpb.EnvironmentHistory_Entry + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.EnvironmentHistory_Entry, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *EnvironmentHistory_EntryIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *EnvironmentHistory_EntryIterator) Next() (*dialogflowpb.EnvironmentHistory_Entry, error) { + var item *dialogflowpb.EnvironmentHistory_Entry + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *EnvironmentHistory_EntryIterator) bufLen() int { + return len(it.items) +} + +func (it *EnvironmentHistory_EntryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// EnvironmentIterator manages a stream of *dialogflowpb.Environment. +type EnvironmentIterator struct { + items []*dialogflowpb.Environment + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Environment, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *EnvironmentIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *EnvironmentIterator) Next() (*dialogflowpb.Environment, error) { + var item *dialogflowpb.Environment + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *EnvironmentIterator) bufLen() int { + return len(it.items) +} + +func (it *EnvironmentIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/environments_client_example_test.go b/dialogflow/apiv2beta1/environments_client_example_test.go new file mode 100644 index 000000000000..1d9f708d40fd --- /dev/null +++ b/dialogflow/apiv2beta1/environments_client_example_test.go @@ -0,0 +1,356 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewEnvironmentsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewEnvironmentsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleEnvironmentsClient_ListEnvironments() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListEnvironmentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListEnvironmentsRequest. + } + it := c.ListEnvironments(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEnvironmentsClient_GetEnvironment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetEnvironmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetEnvironmentRequest. + } + resp, err := c.GetEnvironment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_CreateEnvironment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateEnvironmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateEnvironmentRequest. + } + resp, err := c.CreateEnvironment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_UpdateEnvironment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateEnvironmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateEnvironmentRequest. + } + resp, err := c.UpdateEnvironment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_DeleteEnvironment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteEnvironmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteEnvironmentRequest. + } + err = c.DeleteEnvironment(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEnvironmentsClient_GetEnvironmentHistory() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetEnvironmentHistoryRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetEnvironmentHistoryRequest. + } + it := c.GetEnvironmentHistory(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEnvironmentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleEnvironmentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleEnvironmentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleEnvironmentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewEnvironmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/fulfillments_client.go b/dialogflow/apiv2beta1/fulfillments_client.go new file mode 100644 index 000000000000..df61dfe733af --- /dev/null +++ b/dialogflow/apiv2beta1/fulfillments_client.go @@ -0,0 +1,996 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newFulfillmentsClientHook clientHook + +// FulfillmentsCallOptions contains the retry settings for each method of FulfillmentsClient. +type FulfillmentsCallOptions struct { + GetFulfillment []gax.CallOption + UpdateFulfillment []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultFulfillmentsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultFulfillmentsCallOptions() *FulfillmentsCallOptions { + return &FulfillmentsCallOptions{ + GetFulfillment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateFulfillment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultFulfillmentsRESTCallOptions() *FulfillmentsCallOptions { + return &FulfillmentsCallOptions{ + GetFulfillment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateFulfillment: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalFulfillmentsClient is an interface that defines the methods available from Dialogflow API. +type internalFulfillmentsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + GetFulfillment(context.Context, *dialogflowpb.GetFulfillmentRequest, ...gax.CallOption) (*dialogflowpb.Fulfillment, error) + UpdateFulfillment(context.Context, *dialogflowpb.UpdateFulfillmentRequest, ...gax.CallOption) (*dialogflowpb.Fulfillment, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// FulfillmentsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Fulfillments. +type FulfillmentsClient struct { + // The internal transport-dependent client. + internalClient internalFulfillmentsClient + + // The call options for this service. + CallOptions *FulfillmentsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *FulfillmentsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *FulfillmentsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *FulfillmentsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// GetFulfillment retrieves the fulfillment. +func (c *FulfillmentsClient) GetFulfillment(ctx context.Context, req *dialogflowpb.GetFulfillmentRequest, opts ...gax.CallOption) (*dialogflowpb.Fulfillment, error) { + return c.internalClient.GetFulfillment(ctx, req, opts...) +} + +// UpdateFulfillment updates the fulfillment. +func (c *FulfillmentsClient) UpdateFulfillment(ctx context.Context, req *dialogflowpb.UpdateFulfillmentRequest, opts ...gax.CallOption) (*dialogflowpb.Fulfillment, error) { + return c.internalClient.UpdateFulfillment(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *FulfillmentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *FulfillmentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *FulfillmentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *FulfillmentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *FulfillmentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// fulfillmentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type fulfillmentsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing FulfillmentsClient + CallOptions **FulfillmentsCallOptions + + // The gRPC API client. + fulfillmentsClient dialogflowpb.FulfillmentsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewFulfillmentsClient creates a new fulfillments client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Fulfillments. +func NewFulfillmentsClient(ctx context.Context, opts ...option.ClientOption) (*FulfillmentsClient, error) { + clientOpts := defaultFulfillmentsGRPCClientOptions() + if newFulfillmentsClientHook != nil { + hookOpts, err := newFulfillmentsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := FulfillmentsClient{CallOptions: defaultFulfillmentsCallOptions()} + + c := &fulfillmentsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + fulfillmentsClient: dialogflowpb.NewFulfillmentsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *fulfillmentsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *fulfillmentsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *fulfillmentsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type fulfillmentsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing FulfillmentsClient + CallOptions **FulfillmentsCallOptions +} + +// NewFulfillmentsRESTClient creates a new fulfillments rest client. +// +// Service for managing Fulfillments. +func NewFulfillmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*FulfillmentsClient, error) { + clientOpts := append(defaultFulfillmentsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultFulfillmentsRESTCallOptions() + c := &fulfillmentsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &FulfillmentsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultFulfillmentsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *fulfillmentsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *fulfillmentsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *fulfillmentsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *fulfillmentsGRPCClient) GetFulfillment(ctx context.Context, req *dialogflowpb.GetFulfillmentRequest, opts ...gax.CallOption) (*dialogflowpb.Fulfillment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetFulfillment[0:len((*c.CallOptions).GetFulfillment):len((*c.CallOptions).GetFulfillment)], opts...) + var resp *dialogflowpb.Fulfillment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.fulfillmentsClient.GetFulfillment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *fulfillmentsGRPCClient) UpdateFulfillment(ctx context.Context, req *dialogflowpb.UpdateFulfillmentRequest, opts ...gax.CallOption) (*dialogflowpb.Fulfillment, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "fulfillment.name", url.QueryEscape(req.GetFulfillment().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateFulfillment[0:len((*c.CallOptions).UpdateFulfillment):len((*c.CallOptions).UpdateFulfillment)], opts...) + var resp *dialogflowpb.Fulfillment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.fulfillmentsClient.UpdateFulfillment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *fulfillmentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *fulfillmentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *fulfillmentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *fulfillmentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *fulfillmentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetFulfillment retrieves the fulfillment. +func (c *fulfillmentsRESTClient) GetFulfillment(ctx context.Context, req *dialogflowpb.GetFulfillmentRequest, opts ...gax.CallOption) (*dialogflowpb.Fulfillment, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetFulfillment[0:len((*c.CallOptions).GetFulfillment):len((*c.CallOptions).GetFulfillment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Fulfillment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateFulfillment updates the fulfillment. +func (c *fulfillmentsRESTClient) UpdateFulfillment(ctx context.Context, req *dialogflowpb.UpdateFulfillmentRequest, opts ...gax.CallOption) (*dialogflowpb.Fulfillment, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetFulfillment() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetFulfillment().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "fulfillment.name", url.QueryEscape(req.GetFulfillment().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateFulfillment[0:len((*c.CallOptions).UpdateFulfillment):len((*c.CallOptions).UpdateFulfillment)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Fulfillment{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *fulfillmentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *fulfillmentsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *fulfillmentsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *fulfillmentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *fulfillmentsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/dialogflow/apiv2beta1/fulfillments_client_example_test.go b/dialogflow/apiv2beta1/fulfillments_client_example_test.go new file mode 100644 index 000000000000..b5c5f0c5d65b --- /dev/null +++ b/dialogflow/apiv2beta1/fulfillments_client_example_test.go @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewFulfillmentsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewFulfillmentsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleFulfillmentsClient_GetFulfillment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetFulfillmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetFulfillmentRequest. + } + resp, err := c.GetFulfillment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFulfillmentsClient_UpdateFulfillment() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateFulfillmentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateFulfillmentRequest. + } + resp, err := c.UpdateFulfillment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFulfillmentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFulfillmentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleFulfillmentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleFulfillmentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleFulfillmentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewFulfillmentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/gapic_metadata.json b/dialogflow/apiv2beta1/gapic_metadata.json new file mode 100644 index 000000000000..572a82375818 --- /dev/null +++ b/dialogflow/apiv2beta1/gapic_metadata.json @@ -0,0 +1,1879 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.dialogflow.v2beta1", + "libraryPackage": "cloud.google.com/go/dialogflow/apiv2beta1", + "services": { + "Agents": { + "clients": { + "grpc": { + "libraryClient": "AgentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteAgent": { + "methods": [ + "DeleteAgent" + ] + }, + "ExportAgent": { + "methods": [ + "ExportAgent" + ] + }, + "GetAgent": { + "methods": [ + "GetAgent" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetValidationResult": { + "methods": [ + "GetValidationResult" + ] + }, + "ImportAgent": { + "methods": [ + "ImportAgent" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "RestoreAgent": { + "methods": [ + "RestoreAgent" + ] + }, + "SearchAgents": { + "methods": [ + "SearchAgents" + ] + }, + "SetAgent": { + "methods": [ + "SetAgent" + ] + }, + "TrainAgent": { + "methods": [ + "TrainAgent" + ] + } + } + }, + "rest": { + "libraryClient": "AgentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteAgent": { + "methods": [ + "DeleteAgent" + ] + }, + "ExportAgent": { + "methods": [ + "ExportAgent" + ] + }, + "GetAgent": { + "methods": [ + "GetAgent" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetValidationResult": { + "methods": [ + "GetValidationResult" + ] + }, + "ImportAgent": { + "methods": [ + "ImportAgent" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "RestoreAgent": { + "methods": [ + "RestoreAgent" + ] + }, + "SearchAgents": { + "methods": [ + "SearchAgents" + ] + }, + "SetAgent": { + "methods": [ + "SetAgent" + ] + }, + "TrainAgent": { + "methods": [ + "TrainAgent" + ] + } + } + } + } + }, + "AnswerRecords": { + "clients": { + "grpc": { + "libraryClient": "AnswerRecordsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "GetAnswerRecord": { + "methods": [ + "GetAnswerRecord" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListAnswerRecords": { + "methods": [ + "ListAnswerRecords" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateAnswerRecord": { + "methods": [ + "UpdateAnswerRecord" + ] + } + } + }, + "rest": { + "libraryClient": "AnswerRecordsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "GetAnswerRecord": { + "methods": [ + "GetAnswerRecord" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListAnswerRecords": { + "methods": [ + "ListAnswerRecords" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateAnswerRecord": { + "methods": [ + "UpdateAnswerRecord" + ] + } + } + } + } + }, + "Contexts": { + "clients": { + "grpc": { + "libraryClient": "ContextsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateContext": { + "methods": [ + "CreateContext" + ] + }, + "DeleteAllContexts": { + "methods": [ + "DeleteAllContexts" + ] + }, + "DeleteContext": { + "methods": [ + "DeleteContext" + ] + }, + "GetContext": { + "methods": [ + "GetContext" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListContexts": { + "methods": [ + "ListContexts" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateContext": { + "methods": [ + "UpdateContext" + ] + } + } + }, + "rest": { + "libraryClient": "ContextsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateContext": { + "methods": [ + "CreateContext" + ] + }, + "DeleteAllContexts": { + "methods": [ + "DeleteAllContexts" + ] + }, + "DeleteContext": { + "methods": [ + "DeleteContext" + ] + }, + "GetContext": { + "methods": [ + "GetContext" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListContexts": { + "methods": [ + "ListContexts" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateContext": { + "methods": [ + "UpdateContext" + ] + } + } + } + } + }, + "ConversationProfiles": { + "clients": { + "grpc": { + "libraryClient": "ConversationProfilesClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "ClearSuggestionFeatureConfig": { + "methods": [ + "ClearSuggestionFeatureConfig" + ] + }, + "CreateConversationProfile": { + "methods": [ + "CreateConversationProfile" + ] + }, + "DeleteConversationProfile": { + "methods": [ + "DeleteConversationProfile" + ] + }, + "GetConversationProfile": { + "methods": [ + "GetConversationProfile" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListConversationProfiles": { + "methods": [ + "ListConversationProfiles" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetSuggestionFeatureConfig": { + "methods": [ + "SetSuggestionFeatureConfig" + ] + }, + "UpdateConversationProfile": { + "methods": [ + "UpdateConversationProfile" + ] + } + } + }, + "rest": { + "libraryClient": "ConversationProfilesClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "ClearSuggestionFeatureConfig": { + "methods": [ + "ClearSuggestionFeatureConfig" + ] + }, + "CreateConversationProfile": { + "methods": [ + "CreateConversationProfile" + ] + }, + "DeleteConversationProfile": { + "methods": [ + "DeleteConversationProfile" + ] + }, + "GetConversationProfile": { + "methods": [ + "GetConversationProfile" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListConversationProfiles": { + "methods": [ + "ListConversationProfiles" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetSuggestionFeatureConfig": { + "methods": [ + "SetSuggestionFeatureConfig" + ] + }, + "UpdateConversationProfile": { + "methods": [ + "UpdateConversationProfile" + ] + } + } + } + } + }, + "Conversations": { + "clients": { + "grpc": { + "libraryClient": "ConversationsClient", + "rpcs": { + "BatchCreateMessages": { + "methods": [ + "BatchCreateMessages" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CompleteConversation": { + "methods": [ + "CompleteConversation" + ] + }, + "CreateConversation": { + "methods": [ + "CreateConversation" + ] + }, + "GetConversation": { + "methods": [ + "GetConversation" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListConversations": { + "methods": [ + "ListConversations" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListMessages": { + "methods": [ + "ListMessages" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + } + } + }, + "rest": { + "libraryClient": "ConversationsClient", + "rpcs": { + "BatchCreateMessages": { + "methods": [ + "BatchCreateMessages" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CompleteConversation": { + "methods": [ + "CompleteConversation" + ] + }, + "CreateConversation": { + "methods": [ + "CreateConversation" + ] + }, + "GetConversation": { + "methods": [ + "GetConversation" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListConversations": { + "methods": [ + "ListConversations" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListMessages": { + "methods": [ + "ListMessages" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + } + } + } + } + }, + "Documents": { + "clients": { + "grpc": { + "libraryClient": "DocumentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateDocument": { + "methods": [ + "CreateDocument" + ] + }, + "DeleteDocument": { + "methods": [ + "DeleteDocument" + ] + }, + "GetDocument": { + "methods": [ + "GetDocument" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportDocuments": { + "methods": [ + "ImportDocuments" + ] + }, + "ListDocuments": { + "methods": [ + "ListDocuments" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ReloadDocument": { + "methods": [ + "ReloadDocument" + ] + }, + "UpdateDocument": { + "methods": [ + "UpdateDocument" + ] + } + } + }, + "rest": { + "libraryClient": "DocumentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateDocument": { + "methods": [ + "CreateDocument" + ] + }, + "DeleteDocument": { + "methods": [ + "DeleteDocument" + ] + }, + "GetDocument": { + "methods": [ + "GetDocument" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportDocuments": { + "methods": [ + "ImportDocuments" + ] + }, + "ListDocuments": { + "methods": [ + "ListDocuments" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ReloadDocument": { + "methods": [ + "ReloadDocument" + ] + }, + "UpdateDocument": { + "methods": [ + "UpdateDocument" + ] + } + } + } + } + }, + "EntityTypes": { + "clients": { + "grpc": { + "libraryClient": "EntityTypesClient", + "rpcs": { + "BatchCreateEntities": { + "methods": [ + "BatchCreateEntities" + ] + }, + "BatchDeleteEntities": { + "methods": [ + "BatchDeleteEntities" + ] + }, + "BatchDeleteEntityTypes": { + "methods": [ + "BatchDeleteEntityTypes" + ] + }, + "BatchUpdateEntities": { + "methods": [ + "BatchUpdateEntities" + ] + }, + "BatchUpdateEntityTypes": { + "methods": [ + "BatchUpdateEntityTypes" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateEntityType": { + "methods": [ + "CreateEntityType" + ] + }, + "DeleteEntityType": { + "methods": [ + "DeleteEntityType" + ] + }, + "GetEntityType": { + "methods": [ + "GetEntityType" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListEntityTypes": { + "methods": [ + "ListEntityTypes" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateEntityType": { + "methods": [ + "UpdateEntityType" + ] + } + } + }, + "rest": { + "libraryClient": "EntityTypesClient", + "rpcs": { + "BatchCreateEntities": { + "methods": [ + "BatchCreateEntities" + ] + }, + "BatchDeleteEntities": { + "methods": [ + "BatchDeleteEntities" + ] + }, + "BatchDeleteEntityTypes": { + "methods": [ + "BatchDeleteEntityTypes" + ] + }, + "BatchUpdateEntities": { + "methods": [ + "BatchUpdateEntities" + ] + }, + "BatchUpdateEntityTypes": { + "methods": [ + "BatchUpdateEntityTypes" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateEntityType": { + "methods": [ + "CreateEntityType" + ] + }, + "DeleteEntityType": { + "methods": [ + "DeleteEntityType" + ] + }, + "GetEntityType": { + "methods": [ + "GetEntityType" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListEntityTypes": { + "methods": [ + "ListEntityTypes" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateEntityType": { + "methods": [ + "UpdateEntityType" + ] + } + } + } + } + }, + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateEnvironment": { + "methods": [ + "CreateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "DeleteEnvironment" + ] + }, + "GetEnvironment": { + "methods": [ + "GetEnvironment" + ] + }, + "GetEnvironmentHistory": { + "methods": [ + "GetEnvironmentHistory" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListEnvironments": { + "methods": [ + "ListEnvironments" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateEnvironment": { + "methods": [ + "UpdateEnvironment" + ] + } + } + }, + "rest": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateEnvironment": { + "methods": [ + "CreateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "DeleteEnvironment" + ] + }, + "GetEnvironment": { + "methods": [ + "GetEnvironment" + ] + }, + "GetEnvironmentHistory": { + "methods": [ + "GetEnvironmentHistory" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListEnvironments": { + "methods": [ + "ListEnvironments" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateEnvironment": { + "methods": [ + "UpdateEnvironment" + ] + } + } + } + } + }, + "Fulfillments": { + "clients": { + "grpc": { + "libraryClient": "FulfillmentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "GetFulfillment": { + "methods": [ + "GetFulfillment" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateFulfillment": { + "methods": [ + "UpdateFulfillment" + ] + } + } + }, + "rest": { + "libraryClient": "FulfillmentsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "GetFulfillment": { + "methods": [ + "GetFulfillment" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateFulfillment": { + "methods": [ + "UpdateFulfillment" + ] + } + } + } + } + }, + "Intents": { + "clients": { + "grpc": { + "libraryClient": "IntentsClient", + "rpcs": { + "BatchDeleteIntents": { + "methods": [ + "BatchDeleteIntents" + ] + }, + "BatchUpdateIntents": { + "methods": [ + "BatchUpdateIntents" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateIntent": { + "methods": [ + "CreateIntent" + ] + }, + "DeleteIntent": { + "methods": [ + "DeleteIntent" + ] + }, + "GetIntent": { + "methods": [ + "GetIntent" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListIntents": { + "methods": [ + "ListIntents" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateIntent": { + "methods": [ + "UpdateIntent" + ] + } + } + }, + "rest": { + "libraryClient": "IntentsClient", + "rpcs": { + "BatchDeleteIntents": { + "methods": [ + "BatchDeleteIntents" + ] + }, + "BatchUpdateIntents": { + "methods": [ + "BatchUpdateIntents" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateIntent": { + "methods": [ + "CreateIntent" + ] + }, + "DeleteIntent": { + "methods": [ + "DeleteIntent" + ] + }, + "GetIntent": { + "methods": [ + "GetIntent" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListIntents": { + "methods": [ + "ListIntents" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateIntent": { + "methods": [ + "UpdateIntent" + ] + } + } + } + } + }, + "KnowledgeBases": { + "clients": { + "grpc": { + "libraryClient": "KnowledgeBasesClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateKnowledgeBase": { + "methods": [ + "CreateKnowledgeBase" + ] + }, + "DeleteKnowledgeBase": { + "methods": [ + "DeleteKnowledgeBase" + ] + }, + "GetKnowledgeBase": { + "methods": [ + "GetKnowledgeBase" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListKnowledgeBases": { + "methods": [ + "ListKnowledgeBases" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateKnowledgeBase": { + "methods": [ + "UpdateKnowledgeBase" + ] + } + } + }, + "rest": { + "libraryClient": "KnowledgeBasesClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateKnowledgeBase": { + "methods": [ + "CreateKnowledgeBase" + ] + }, + "DeleteKnowledgeBase": { + "methods": [ + "DeleteKnowledgeBase" + ] + }, + "GetKnowledgeBase": { + "methods": [ + "GetKnowledgeBase" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListKnowledgeBases": { + "methods": [ + "ListKnowledgeBases" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateKnowledgeBase": { + "methods": [ + "UpdateKnowledgeBase" + ] + } + } + } + } + }, + "Participants": { + "clients": { + "grpc": { + "libraryClient": "ParticipantsClient", + "rpcs": { + "AnalyzeContent": { + "methods": [ + "AnalyzeContent" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CompileSuggestion": { + "methods": [ + "CompileSuggestion" + ] + }, + "CreateParticipant": { + "methods": [ + "CreateParticipant" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetParticipant": { + "methods": [ + "GetParticipant" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListParticipants": { + "methods": [ + "ListParticipants" + ] + }, + "ListSuggestions": { + "methods": [ + "ListSuggestions" + ] + }, + "StreamingAnalyzeContent": { + "methods": [ + "StreamingAnalyzeContent" + ] + }, + "SuggestArticles": { + "methods": [ + "SuggestArticles" + ] + }, + "SuggestFaqAnswers": { + "methods": [ + "SuggestFaqAnswers" + ] + }, + "SuggestSmartReplies": { + "methods": [ + "SuggestSmartReplies" + ] + }, + "UpdateParticipant": { + "methods": [ + "UpdateParticipant" + ] + } + } + }, + "rest": { + "libraryClient": "ParticipantsClient", + "rpcs": { + "AnalyzeContent": { + "methods": [ + "AnalyzeContent" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CompileSuggestion": { + "methods": [ + "CompileSuggestion" + ] + }, + "CreateParticipant": { + "methods": [ + "CreateParticipant" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetParticipant": { + "methods": [ + "GetParticipant" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListParticipants": { + "methods": [ + "ListParticipants" + ] + }, + "ListSuggestions": { + "methods": [ + "ListSuggestions" + ] + }, + "StreamingAnalyzeContent": { + "methods": [ + "StreamingAnalyzeContent" + ] + }, + "SuggestArticles": { + "methods": [ + "SuggestArticles" + ] + }, + "SuggestFaqAnswers": { + "methods": [ + "SuggestFaqAnswers" + ] + }, + "SuggestSmartReplies": { + "methods": [ + "SuggestSmartReplies" + ] + }, + "UpdateParticipant": { + "methods": [ + "UpdateParticipant" + ] + } + } + } + } + }, + "SessionEntityTypes": { + "clients": { + "grpc": { + "libraryClient": "SessionEntityTypesClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateSessionEntityType": { + "methods": [ + "CreateSessionEntityType" + ] + }, + "DeleteSessionEntityType": { + "methods": [ + "DeleteSessionEntityType" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetSessionEntityType": { + "methods": [ + "GetSessionEntityType" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListSessionEntityTypes": { + "methods": [ + "ListSessionEntityTypes" + ] + }, + "UpdateSessionEntityType": { + "methods": [ + "UpdateSessionEntityType" + ] + } + } + }, + "rest": { + "libraryClient": "SessionEntityTypesClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateSessionEntityType": { + "methods": [ + "CreateSessionEntityType" + ] + }, + "DeleteSessionEntityType": { + "methods": [ + "DeleteSessionEntityType" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetSessionEntityType": { + "methods": [ + "GetSessionEntityType" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListSessionEntityTypes": { + "methods": [ + "ListSessionEntityTypes" + ] + }, + "UpdateSessionEntityType": { + "methods": [ + "UpdateSessionEntityType" + ] + } + } + } + } + }, + "Sessions": { + "clients": { + "grpc": { + "libraryClient": "SessionsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DetectIntent": { + "methods": [ + "DetectIntent" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "StreamingDetectIntent": { + "methods": [ + "StreamingDetectIntent" + ] + } + } + }, + "rest": { + "libraryClient": "SessionsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DetectIntent": { + "methods": [ + "DetectIntent" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "StreamingDetectIntent": { + "methods": [ + "StreamingDetectIntent" + ] + } + } + } + } + }, + "Versions": { + "clients": { + "grpc": { + "libraryClient": "VersionsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateVersion": { + "methods": [ + "CreateVersion" + ] + }, + "DeleteVersion": { + "methods": [ + "DeleteVersion" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetVersion": { + "methods": [ + "GetVersion" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListVersions": { + "methods": [ + "ListVersions" + ] + }, + "UpdateVersion": { + "methods": [ + "UpdateVersion" + ] + } + } + }, + "rest": { + "libraryClient": "VersionsClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateVersion": { + "methods": [ + "CreateVersion" + ] + }, + "DeleteVersion": { + "methods": [ + "DeleteVersion" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetVersion": { + "methods": [ + "GetVersion" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListVersions": { + "methods": [ + "ListVersions" + ] + }, + "UpdateVersion": { + "methods": [ + "UpdateVersion" + ] + } + } + } + } + } + } +} diff --git a/dialogflow/apiv2beta1/intents_client.go b/dialogflow/apiv2beta1/intents_client.go new file mode 100644 index 000000000000..70462e0aee32 --- /dev/null +++ b/dialogflow/apiv2beta1/intents_client.go @@ -0,0 +1,1940 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + structpb "github.com/golang/protobuf/ptypes/struct" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newIntentsClientHook clientHook + +// IntentsCallOptions contains the retry settings for each method of IntentsClient. +type IntentsCallOptions struct { + ListIntents []gax.CallOption + GetIntent []gax.CallOption + CreateIntent []gax.CallOption + UpdateIntent []gax.CallOption + DeleteIntent []gax.CallOption + BatchUpdateIntents []gax.CallOption + BatchDeleteIntents []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultIntentsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultIntentsCallOptions() *IntentsCallOptions { + return &IntentsCallOptions{ + ListIntents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchUpdateIntents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchDeleteIntents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultIntentsRESTCallOptions() *IntentsCallOptions { + return &IntentsCallOptions{ + ListIntents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchUpdateIntents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchDeleteIntents: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalIntentsClient is an interface that defines the methods available from Dialogflow API. +type internalIntentsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListIntents(context.Context, *dialogflowpb.ListIntentsRequest, ...gax.CallOption) *IntentIterator + GetIntent(context.Context, *dialogflowpb.GetIntentRequest, ...gax.CallOption) (*dialogflowpb.Intent, error) + CreateIntent(context.Context, *dialogflowpb.CreateIntentRequest, ...gax.CallOption) (*dialogflowpb.Intent, error) + UpdateIntent(context.Context, *dialogflowpb.UpdateIntentRequest, ...gax.CallOption) (*dialogflowpb.Intent, error) + DeleteIntent(context.Context, *dialogflowpb.DeleteIntentRequest, ...gax.CallOption) error + BatchUpdateIntents(context.Context, *dialogflowpb.BatchUpdateIntentsRequest, ...gax.CallOption) (*BatchUpdateIntentsOperation, error) + BatchUpdateIntentsOperation(name string) *BatchUpdateIntentsOperation + BatchDeleteIntents(context.Context, *dialogflowpb.BatchDeleteIntentsRequest, ...gax.CallOption) (*BatchDeleteIntentsOperation, error) + BatchDeleteIntentsOperation(name string) *BatchDeleteIntentsOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// IntentsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Intents. +type IntentsClient struct { + // The internal transport-dependent client. + internalClient internalIntentsClient + + // The call options for this service. + CallOptions *IntentsCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *IntentsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *IntentsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *IntentsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListIntents returns the list of all intents in the specified agent. +func (c *IntentsClient) ListIntents(ctx context.Context, req *dialogflowpb.ListIntentsRequest, opts ...gax.CallOption) *IntentIterator { + return c.internalClient.ListIntents(ctx, req, opts...) +} + +// GetIntent retrieves the specified intent. +func (c *IntentsClient) GetIntent(ctx context.Context, req *dialogflowpb.GetIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + return c.internalClient.GetIntent(ctx, req, opts...) +} + +// CreateIntent creates an intent in the specified agent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *IntentsClient) CreateIntent(ctx context.Context, req *dialogflowpb.CreateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + return c.internalClient.CreateIntent(ctx, req, opts...) +} + +// UpdateIntent updates the specified intent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *IntentsClient) UpdateIntent(ctx context.Context, req *dialogflowpb.UpdateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + return c.internalClient.UpdateIntent(ctx, req, opts...) +} + +// DeleteIntent deletes the specified intent and its direct or indirect followup intents. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *IntentsClient) DeleteIntent(ctx context.Context, req *dialogflowpb.DeleteIntentRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteIntent(ctx, req, opts...) +} + +// BatchUpdateIntents updates/Creates multiple intents in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: BatchUpdateIntentsResponse +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *IntentsClient) BatchUpdateIntents(ctx context.Context, req *dialogflowpb.BatchUpdateIntentsRequest, opts ...gax.CallOption) (*BatchUpdateIntentsOperation, error) { + return c.internalClient.BatchUpdateIntents(ctx, req, opts...) +} + +// BatchUpdateIntentsOperation returns a new BatchUpdateIntentsOperation from a given name. +// The name must be that of a previously created BatchUpdateIntentsOperation, possibly from a different process. +func (c *IntentsClient) BatchUpdateIntentsOperation(name string) *BatchUpdateIntentsOperation { + return c.internalClient.BatchUpdateIntentsOperation(name) +} + +// BatchDeleteIntents deletes intents in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *IntentsClient) BatchDeleteIntents(ctx context.Context, req *dialogflowpb.BatchDeleteIntentsRequest, opts ...gax.CallOption) (*BatchDeleteIntentsOperation, error) { + return c.internalClient.BatchDeleteIntents(ctx, req, opts...) +} + +// BatchDeleteIntentsOperation returns a new BatchDeleteIntentsOperation from a given name. +// The name must be that of a previously created BatchDeleteIntentsOperation, possibly from a different process. +func (c *IntentsClient) BatchDeleteIntentsOperation(name string) *BatchDeleteIntentsOperation { + return c.internalClient.BatchDeleteIntentsOperation(name) +} + +// GetLocation gets information about a location. +func (c *IntentsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *IntentsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *IntentsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *IntentsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *IntentsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// intentsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type intentsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing IntentsClient + CallOptions **IntentsCallOptions + + // The gRPC API client. + intentsClient dialogflowpb.IntentsClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewIntentsClient creates a new intents client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Intents. +func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*IntentsClient, error) { + clientOpts := defaultIntentsGRPCClientOptions() + if newIntentsClientHook != nil { + hookOpts, err := newIntentsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := IntentsClient{CallOptions: defaultIntentsCallOptions()} + + c := &intentsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + intentsClient: dialogflowpb.NewIntentsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *intentsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *intentsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *intentsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type intentsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing IntentsClient + CallOptions **IntentsCallOptions +} + +// NewIntentsRESTClient creates a new intents rest client. +// +// Service for managing Intents. +func NewIntentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*IntentsClient, error) { + clientOpts := append(defaultIntentsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultIntentsRESTCallOptions() + c := &intentsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &IntentsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultIntentsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *intentsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *intentsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *intentsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *intentsGRPCClient) ListIntents(ctx context.Context, req *dialogflowpb.ListIntentsRequest, opts ...gax.CallOption) *IntentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListIntents[0:len((*c.CallOptions).ListIntents):len((*c.CallOptions).ListIntents)], opts...) + it := &IntentIterator{} + req = proto.Clone(req).(*dialogflowpb.ListIntentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Intent, string, error) { + resp := &dialogflowpb.ListIntentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.intentsClient.ListIntents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetIntents(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *intentsGRPCClient) GetIntent(ctx context.Context, req *dialogflowpb.GetIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetIntent[0:len((*c.CallOptions).GetIntent):len((*c.CallOptions).GetIntent)], opts...) + var resp *dialogflowpb.Intent + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.intentsClient.GetIntent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) CreateIntent(ctx context.Context, req *dialogflowpb.CreateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateIntent[0:len((*c.CallOptions).CreateIntent):len((*c.CallOptions).CreateIntent)], opts...) + var resp *dialogflowpb.Intent + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.intentsClient.CreateIntent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) UpdateIntent(ctx context.Context, req *dialogflowpb.UpdateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "intent.name", url.QueryEscape(req.GetIntent().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateIntent[0:len((*c.CallOptions).UpdateIntent):len((*c.CallOptions).UpdateIntent)], opts...) + var resp *dialogflowpb.Intent + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.intentsClient.UpdateIntent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) DeleteIntent(ctx context.Context, req *dialogflowpb.DeleteIntentRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteIntent[0:len((*c.CallOptions).DeleteIntent):len((*c.CallOptions).DeleteIntent)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.intentsClient.DeleteIntent(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *intentsGRPCClient) BatchUpdateIntents(ctx context.Context, req *dialogflowpb.BatchUpdateIntentsRequest, opts ...gax.CallOption) (*BatchUpdateIntentsOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchUpdateIntents[0:len((*c.CallOptions).BatchUpdateIntents):len((*c.CallOptions).BatchUpdateIntents)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.intentsClient.BatchUpdateIntents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchUpdateIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *intentsGRPCClient) BatchDeleteIntents(ctx context.Context, req *dialogflowpb.BatchDeleteIntentsRequest, opts ...gax.CallOption) (*BatchDeleteIntentsOperation, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchDeleteIntents[0:len((*c.CallOptions).BatchDeleteIntents):len((*c.CallOptions).BatchDeleteIntents)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.intentsClient.BatchDeleteIntents(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &BatchDeleteIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *intentsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *intentsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *intentsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *intentsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListIntents returns the list of all intents in the specified agent. +func (c *intentsRESTClient) ListIntents(ctx context.Context, req *dialogflowpb.ListIntentsRequest, opts ...gax.CallOption) *IntentIterator { + it := &IntentIterator{} + req = proto.Clone(req).(*dialogflowpb.ListIntentsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Intent, string, error) { + resp := &dialogflowpb.ListIntentsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/intents", req.GetParent()) + + params := url.Values{} + if req.GetIntentView() != 0 { + params.Add("intentView", fmt.Sprintf("%v", req.GetIntentView())) + } + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetIntents(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIntent retrieves the specified intent. +func (c *intentsRESTClient) GetIntent(ctx context.Context, req *dialogflowpb.GetIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetIntentView() != 0 { + params.Add("intentView", fmt.Sprintf("%v", req.GetIntentView())) + } + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetIntent[0:len((*c.CallOptions).GetIntent):len((*c.CallOptions).GetIntent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Intent{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateIntent creates an intent in the specified agent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *intentsRESTClient) CreateIntent(ctx context.Context, req *dialogflowpb.CreateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIntent() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/intents", req.GetParent()) + + params := url.Values{} + if req.GetIntentView() != 0 { + params.Add("intentView", fmt.Sprintf("%v", req.GetIntentView())) + } + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateIntent[0:len((*c.CallOptions).CreateIntent):len((*c.CallOptions).CreateIntent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Intent{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateIntent updates the specified intent. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *intentsRESTClient) UpdateIntent(ctx context.Context, req *dialogflowpb.UpdateIntentRequest, opts ...gax.CallOption) (*dialogflowpb.Intent, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIntent() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetIntent().GetName()) + + params := url.Values{} + if req.GetIntentView() != 0 { + params.Add("intentView", fmt.Sprintf("%v", req.GetIntentView())) + } + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "intent.name", url.QueryEscape(req.GetIntent().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateIntent[0:len((*c.CallOptions).UpdateIntent):len((*c.CallOptions).UpdateIntent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Intent{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteIntent deletes the specified intent and its direct or indirect followup intents. +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *intentsRESTClient) DeleteIntent(ctx context.Context, req *dialogflowpb.DeleteIntentRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// BatchUpdateIntents updates/Creates multiple intents in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: BatchUpdateIntentsResponse +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *intentsRESTClient) BatchUpdateIntents(ctx context.Context, req *dialogflowpb.BatchUpdateIntentsRequest, opts ...gax.CallOption) (*BatchUpdateIntentsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/intents:batchUpdate", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchUpdateIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// BatchDeleteIntents deletes intents in the specified agent. +// +// This method is a long-running +// operation (at https://cloud.google.com/dialogflow/es/docs/how/long-running-operations). +// The returned Operation type has the following method-specific fields: +// +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// +// Note: You should always train an agent prior to sending it queries. See the +// training +// documentation (at https://cloud.google.com/dialogflow/es/docs/training). +func (c *intentsRESTClient) BatchDeleteIntents(ctx context.Context, req *dialogflowpb.BatchDeleteIntentsRequest, opts ...gax.CallOption) (*BatchDeleteIntentsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/intents:batchDelete", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2beta1/%s", resp.GetName()) + return &BatchDeleteIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *intentsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *intentsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *intentsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *intentsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *intentsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// BatchDeleteIntentsOperation manages a long-running operation from BatchDeleteIntents. +type BatchDeleteIntentsOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchDeleteIntentsOperation returns a new BatchDeleteIntentsOperation from a given name. +// The name must be that of a previously created BatchDeleteIntentsOperation, possibly from a different process. +func (c *intentsGRPCClient) BatchDeleteIntentsOperation(name string) *BatchDeleteIntentsOperation { + return &BatchDeleteIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchDeleteIntentsOperation returns a new BatchDeleteIntentsOperation from a given name. +// The name must be that of a previously created BatchDeleteIntentsOperation, possibly from a different process. +func (c *intentsRESTClient) BatchDeleteIntentsOperation(name string) *BatchDeleteIntentsOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchDeleteIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchDeleteIntentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchDeleteIntentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchDeleteIntentsOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchDeleteIntentsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchDeleteIntentsOperation) Name() string { + return op.lro.Name() +} + +// BatchUpdateIntentsOperation manages a long-running operation from BatchUpdateIntents. +type BatchUpdateIntentsOperation struct { + lro *longrunning.Operation + pollPath string +} + +// BatchUpdateIntentsOperation returns a new BatchUpdateIntentsOperation from a given name. +// The name must be that of a previously created BatchUpdateIntentsOperation, possibly from a different process. +func (c *intentsGRPCClient) BatchUpdateIntentsOperation(name string) *BatchUpdateIntentsOperation { + return &BatchUpdateIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// BatchUpdateIntentsOperation returns a new BatchUpdateIntentsOperation from a given name. +// The name must be that of a previously created BatchUpdateIntentsOperation, possibly from a different process. +func (c *intentsRESTClient) BatchUpdateIntentsOperation(name string) *BatchUpdateIntentsOperation { + override := fmt.Sprintf("/v2beta1/%s", name) + return &BatchUpdateIntentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *BatchUpdateIntentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateIntentsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.BatchUpdateIntentsResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *BatchUpdateIntentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.BatchUpdateIntentsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp dialogflowpb.BatchUpdateIntentsResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *BatchUpdateIntentsOperation) Metadata() (*structpb.Struct, error) { + var meta structpb.Struct + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *BatchUpdateIntentsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *BatchUpdateIntentsOperation) Name() string { + return op.lro.Name() +} + +// IntentIterator manages a stream of *dialogflowpb.Intent. +type IntentIterator struct { + items []*dialogflowpb.Intent + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Intent, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *IntentIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *IntentIterator) Next() (*dialogflowpb.Intent, error) { + var item *dialogflowpb.Intent + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *IntentIterator) bufLen() int { + return len(it.items) +} + +func (it *IntentIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/intents_client_example_test.go b/dialogflow/apiv2beta1/intents_client_example_test.go new file mode 100644 index 000000000000..2824ea03ad89 --- /dev/null +++ b/dialogflow/apiv2beta1/intents_client_example_test.go @@ -0,0 +1,383 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewIntentsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewIntentsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleIntentsClient_ListIntents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListIntentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListIntentsRequest. + } + it := c.ListIntents(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleIntentsClient_GetIntent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetIntentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetIntentRequest. + } + resp, err := c.GetIntent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_CreateIntent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateIntentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateIntentRequest. + } + resp, err := c.CreateIntent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_UpdateIntent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateIntentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateIntentRequest. + } + resp, err := c.UpdateIntent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_DeleteIntent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteIntentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteIntentRequest. + } + err = c.DeleteIntent(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleIntentsClient_BatchUpdateIntents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchUpdateIntentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchUpdateIntentsRequest. + } + op, err := c.BatchUpdateIntents(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_BatchDeleteIntents() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.BatchDeleteIntentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#BatchDeleteIntentsRequest. + } + op, err := c.BatchDeleteIntents(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleIntentsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleIntentsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleIntentsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleIntentsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewIntentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/knowledge_bases_client.go b/dialogflow/apiv2beta1/knowledge_bases_client.go new file mode 100644 index 000000000000..24b3812cc5d0 --- /dev/null +++ b/dialogflow/apiv2beta1/knowledge_bases_client.go @@ -0,0 +1,1434 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newKnowledgeBasesClientHook clientHook + +// KnowledgeBasesCallOptions contains the retry settings for each method of KnowledgeBasesClient. +type KnowledgeBasesCallOptions struct { + ListKnowledgeBases []gax.CallOption + GetKnowledgeBase []gax.CallOption + CreateKnowledgeBase []gax.CallOption + DeleteKnowledgeBase []gax.CallOption + UpdateKnowledgeBase []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultKnowledgeBasesGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultKnowledgeBasesCallOptions() *KnowledgeBasesCallOptions { + return &KnowledgeBasesCallOptions{ + ListKnowledgeBases: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultKnowledgeBasesRESTCallOptions() *KnowledgeBasesCallOptions { + return &KnowledgeBasesCallOptions{ + ListKnowledgeBases: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateKnowledgeBase: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalKnowledgeBasesClient is an interface that defines the methods available from Dialogflow API. +type internalKnowledgeBasesClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListKnowledgeBases(context.Context, *dialogflowpb.ListKnowledgeBasesRequest, ...gax.CallOption) *KnowledgeBaseIterator + GetKnowledgeBase(context.Context, *dialogflowpb.GetKnowledgeBaseRequest, ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) + CreateKnowledgeBase(context.Context, *dialogflowpb.CreateKnowledgeBaseRequest, ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) + DeleteKnowledgeBase(context.Context, *dialogflowpb.DeleteKnowledgeBaseRequest, ...gax.CallOption) error + UpdateKnowledgeBase(context.Context, *dialogflowpb.UpdateKnowledgeBaseRequest, ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// KnowledgeBasesClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing KnowledgeBases. +type KnowledgeBasesClient struct { + // The internal transport-dependent client. + internalClient internalKnowledgeBasesClient + + // The call options for this service. + CallOptions *KnowledgeBasesCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *KnowledgeBasesClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *KnowledgeBasesClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *KnowledgeBasesClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListKnowledgeBases returns the list of all knowledge bases of the specified agent. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *KnowledgeBasesClient) ListKnowledgeBases(ctx context.Context, req *dialogflowpb.ListKnowledgeBasesRequest, opts ...gax.CallOption) *KnowledgeBaseIterator { + return c.internalClient.ListKnowledgeBases(ctx, req, opts...) +} + +// GetKnowledgeBase retrieves the specified knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *KnowledgeBasesClient) GetKnowledgeBase(ctx context.Context, req *dialogflowpb.GetKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + return c.internalClient.GetKnowledgeBase(ctx, req, opts...) +} + +// CreateKnowledgeBase creates a knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *KnowledgeBasesClient) CreateKnowledgeBase(ctx context.Context, req *dialogflowpb.CreateKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + return c.internalClient.CreateKnowledgeBase(ctx, req, opts...) +} + +// DeleteKnowledgeBase deletes the specified knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *KnowledgeBasesClient) DeleteKnowledgeBase(ctx context.Context, req *dialogflowpb.DeleteKnowledgeBaseRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteKnowledgeBase(ctx, req, opts...) +} + +// UpdateKnowledgeBase updates the specified knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *KnowledgeBasesClient) UpdateKnowledgeBase(ctx context.Context, req *dialogflowpb.UpdateKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + return c.internalClient.UpdateKnowledgeBase(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *KnowledgeBasesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *KnowledgeBasesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *KnowledgeBasesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *KnowledgeBasesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *KnowledgeBasesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// knowledgeBasesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type knowledgeBasesGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing KnowledgeBasesClient + CallOptions **KnowledgeBasesCallOptions + + // The gRPC API client. + knowledgeBasesClient dialogflowpb.KnowledgeBasesClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewKnowledgeBasesClient creates a new knowledge bases client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing KnowledgeBases. +func NewKnowledgeBasesClient(ctx context.Context, opts ...option.ClientOption) (*KnowledgeBasesClient, error) { + clientOpts := defaultKnowledgeBasesGRPCClientOptions() + if newKnowledgeBasesClientHook != nil { + hookOpts, err := newKnowledgeBasesClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := KnowledgeBasesClient{CallOptions: defaultKnowledgeBasesCallOptions()} + + c := &knowledgeBasesGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + knowledgeBasesClient: dialogflowpb.NewKnowledgeBasesClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *knowledgeBasesGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *knowledgeBasesGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *knowledgeBasesGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type knowledgeBasesRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing KnowledgeBasesClient + CallOptions **KnowledgeBasesCallOptions +} + +// NewKnowledgeBasesRESTClient creates a new knowledge bases rest client. +// +// Service for managing KnowledgeBases. +func NewKnowledgeBasesRESTClient(ctx context.Context, opts ...option.ClientOption) (*KnowledgeBasesClient, error) { + clientOpts := append(defaultKnowledgeBasesRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultKnowledgeBasesRESTCallOptions() + c := &knowledgeBasesRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &KnowledgeBasesClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultKnowledgeBasesRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *knowledgeBasesRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *knowledgeBasesRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *knowledgeBasesRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *knowledgeBasesGRPCClient) ListKnowledgeBases(ctx context.Context, req *dialogflowpb.ListKnowledgeBasesRequest, opts ...gax.CallOption) *KnowledgeBaseIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListKnowledgeBases[0:len((*c.CallOptions).ListKnowledgeBases):len((*c.CallOptions).ListKnowledgeBases)], opts...) + it := &KnowledgeBaseIterator{} + req = proto.Clone(req).(*dialogflowpb.ListKnowledgeBasesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.KnowledgeBase, string, error) { + resp := &dialogflowpb.ListKnowledgeBasesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.knowledgeBasesClient.ListKnowledgeBases(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetKnowledgeBases(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *knowledgeBasesGRPCClient) GetKnowledgeBase(ctx context.Context, req *dialogflowpb.GetKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetKnowledgeBase[0:len((*c.CallOptions).GetKnowledgeBase):len((*c.CallOptions).GetKnowledgeBase)], opts...) + var resp *dialogflowpb.KnowledgeBase + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.knowledgeBasesClient.GetKnowledgeBase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) CreateKnowledgeBase(ctx context.Context, req *dialogflowpb.CreateKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateKnowledgeBase[0:len((*c.CallOptions).CreateKnowledgeBase):len((*c.CallOptions).CreateKnowledgeBase)], opts...) + var resp *dialogflowpb.KnowledgeBase + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.knowledgeBasesClient.CreateKnowledgeBase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) DeleteKnowledgeBase(ctx context.Context, req *dialogflowpb.DeleteKnowledgeBaseRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteKnowledgeBase[0:len((*c.CallOptions).DeleteKnowledgeBase):len((*c.CallOptions).DeleteKnowledgeBase)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.knowledgeBasesClient.DeleteKnowledgeBase(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *knowledgeBasesGRPCClient) UpdateKnowledgeBase(ctx context.Context, req *dialogflowpb.UpdateKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "knowledge_base.name", url.QueryEscape(req.GetKnowledgeBase().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateKnowledgeBase[0:len((*c.CallOptions).UpdateKnowledgeBase):len((*c.CallOptions).UpdateKnowledgeBase)], opts...) + var resp *dialogflowpb.KnowledgeBase + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.knowledgeBasesClient.UpdateKnowledgeBase(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *knowledgeBasesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *knowledgeBasesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *knowledgeBasesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListKnowledgeBases returns the list of all knowledge bases of the specified agent. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *knowledgeBasesRESTClient) ListKnowledgeBases(ctx context.Context, req *dialogflowpb.ListKnowledgeBasesRequest, opts ...gax.CallOption) *KnowledgeBaseIterator { + it := &KnowledgeBaseIterator{} + req = proto.Clone(req).(*dialogflowpb.ListKnowledgeBasesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.KnowledgeBase, string, error) { + resp := &dialogflowpb.ListKnowledgeBasesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/knowledgeBases", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetKnowledgeBases(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetKnowledgeBase retrieves the specified knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *knowledgeBasesRESTClient) GetKnowledgeBase(ctx context.Context, req *dialogflowpb.GetKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetKnowledgeBase[0:len((*c.CallOptions).GetKnowledgeBase):len((*c.CallOptions).GetKnowledgeBase)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.KnowledgeBase{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateKnowledgeBase creates a knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *knowledgeBasesRESTClient) CreateKnowledgeBase(ctx context.Context, req *dialogflowpb.CreateKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetKnowledgeBase() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/knowledgeBases", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateKnowledgeBase[0:len((*c.CallOptions).CreateKnowledgeBase):len((*c.CallOptions).CreateKnowledgeBase)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.KnowledgeBase{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteKnowledgeBase deletes the specified knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *knowledgeBasesRESTClient) DeleteKnowledgeBase(ctx context.Context, req *dialogflowpb.DeleteKnowledgeBaseRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetForce() { + params.Add("force", fmt.Sprintf("%v", req.GetForce())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// UpdateKnowledgeBase updates the specified knowledge base. +// +// Note: The projects.agent.knowledgeBases resource is deprecated; +// only use projects.knowledgeBases. +func (c *knowledgeBasesRESTClient) UpdateKnowledgeBase(ctx context.Context, req *dialogflowpb.UpdateKnowledgeBaseRequest, opts ...gax.CallOption) (*dialogflowpb.KnowledgeBase, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetKnowledgeBase() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetKnowledgeBase().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "knowledge_base.name", url.QueryEscape(req.GetKnowledgeBase().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateKnowledgeBase[0:len((*c.CallOptions).UpdateKnowledgeBase):len((*c.CallOptions).UpdateKnowledgeBase)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.KnowledgeBase{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *knowledgeBasesRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *knowledgeBasesRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *knowledgeBasesRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *knowledgeBasesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *knowledgeBasesRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// KnowledgeBaseIterator manages a stream of *dialogflowpb.KnowledgeBase. +type KnowledgeBaseIterator struct { + items []*dialogflowpb.KnowledgeBase + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.KnowledgeBase, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *KnowledgeBaseIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *KnowledgeBaseIterator) Next() (*dialogflowpb.KnowledgeBase, error) { + var item *dialogflowpb.KnowledgeBase + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *KnowledgeBaseIterator) bufLen() int { + return len(it.items) +} + +func (it *KnowledgeBaseIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/knowledge_bases_client_example_test.go b/dialogflow/apiv2beta1/knowledge_bases_client_example_test.go new file mode 100644 index 000000000000..aba23fbf8f1a --- /dev/null +++ b/dialogflow/apiv2beta1/knowledge_bases_client_example_test.go @@ -0,0 +1,325 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewKnowledgeBasesClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewKnowledgeBasesRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleKnowledgeBasesClient_ListKnowledgeBases() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListKnowledgeBasesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListKnowledgeBasesRequest. + } + it := c.ListKnowledgeBases(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleKnowledgeBasesClient_GetKnowledgeBase() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetKnowledgeBaseRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetKnowledgeBaseRequest. + } + resp, err := c.GetKnowledgeBase(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_CreateKnowledgeBase() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateKnowledgeBaseRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateKnowledgeBaseRequest. + } + resp, err := c.CreateKnowledgeBase(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_DeleteKnowledgeBase() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteKnowledgeBaseRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteKnowledgeBaseRequest. + } + err = c.DeleteKnowledgeBase(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleKnowledgeBasesClient_UpdateKnowledgeBase() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateKnowledgeBaseRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateKnowledgeBaseRequest. + } + resp, err := c.UpdateKnowledgeBase(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleKnowledgeBasesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleKnowledgeBasesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleKnowledgeBasesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewKnowledgeBasesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/participants_client.go b/dialogflow/apiv2beta1/participants_client.go new file mode 100644 index 000000000000..82f0bbf2b46a --- /dev/null +++ b/dialogflow/apiv2beta1/participants_client.go @@ -0,0 +1,2207 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newParticipantsClientHook clientHook + +// ParticipantsCallOptions contains the retry settings for each method of ParticipantsClient. +type ParticipantsCallOptions struct { + CreateParticipant []gax.CallOption + GetParticipant []gax.CallOption + ListParticipants []gax.CallOption + UpdateParticipant []gax.CallOption + AnalyzeContent []gax.CallOption + StreamingAnalyzeContent []gax.CallOption + SuggestArticles []gax.CallOption + SuggestFaqAnswers []gax.CallOption + SuggestSmartReplies []gax.CallOption + ListSuggestions []gax.CallOption + CompileSuggestion []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultParticipantsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultParticipantsCallOptions() *ParticipantsCallOptions { + return &ParticipantsCallOptions{ + CreateParticipant: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetParticipant: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListParticipants: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateParticipant: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + AnalyzeContent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + StreamingAnalyzeContent: []gax.CallOption{}, + SuggestArticles: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SuggestFaqAnswers: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SuggestSmartReplies: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListSuggestions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CompileSuggestion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultParticipantsRESTCallOptions() *ParticipantsCallOptions { + return &ParticipantsCallOptions{ + CreateParticipant: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetParticipant: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListParticipants: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateParticipant: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + AnalyzeContent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + StreamingAnalyzeContent: []gax.CallOption{}, + SuggestArticles: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + SuggestFaqAnswers: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + SuggestSmartReplies: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListSuggestions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CompileSuggestion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalParticipantsClient is an interface that defines the methods available from Dialogflow API. +type internalParticipantsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateParticipant(context.Context, *dialogflowpb.CreateParticipantRequest, ...gax.CallOption) (*dialogflowpb.Participant, error) + GetParticipant(context.Context, *dialogflowpb.GetParticipantRequest, ...gax.CallOption) (*dialogflowpb.Participant, error) + ListParticipants(context.Context, *dialogflowpb.ListParticipantsRequest, ...gax.CallOption) *ParticipantIterator + UpdateParticipant(context.Context, *dialogflowpb.UpdateParticipantRequest, ...gax.CallOption) (*dialogflowpb.Participant, error) + AnalyzeContent(context.Context, *dialogflowpb.AnalyzeContentRequest, ...gax.CallOption) (*dialogflowpb.AnalyzeContentResponse, error) + StreamingAnalyzeContent(context.Context, ...gax.CallOption) (dialogflowpb.Participants_StreamingAnalyzeContentClient, error) + SuggestArticles(context.Context, *dialogflowpb.SuggestArticlesRequest, ...gax.CallOption) (*dialogflowpb.SuggestArticlesResponse, error) + SuggestFaqAnswers(context.Context, *dialogflowpb.SuggestFaqAnswersRequest, ...gax.CallOption) (*dialogflowpb.SuggestFaqAnswersResponse, error) + SuggestSmartReplies(context.Context, *dialogflowpb.SuggestSmartRepliesRequest, ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) + ListSuggestions(context.Context, *dialogflowpb.ListSuggestionsRequest, ...gax.CallOption) *SuggestionIterator + CompileSuggestion(context.Context, *dialogflowpb.CompileSuggestionRequest, ...gax.CallOption) (*dialogflowpb.CompileSuggestionResponse, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// ParticipantsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Participants. +type ParticipantsClient struct { + // The internal transport-dependent client. + internalClient internalParticipantsClient + + // The call options for this service. + CallOptions *ParticipantsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *ParticipantsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *ParticipantsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *ParticipantsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateParticipant creates a new participant in a conversation. +func (c *ParticipantsClient) CreateParticipant(ctx context.Context, req *dialogflowpb.CreateParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + return c.internalClient.CreateParticipant(ctx, req, opts...) +} + +// GetParticipant retrieves a conversation participant. +func (c *ParticipantsClient) GetParticipant(ctx context.Context, req *dialogflowpb.GetParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + return c.internalClient.GetParticipant(ctx, req, opts...) +} + +// ListParticipants returns the list of all participants in the specified conversation. +func (c *ParticipantsClient) ListParticipants(ctx context.Context, req *dialogflowpb.ListParticipantsRequest, opts ...gax.CallOption) *ParticipantIterator { + return c.internalClient.ListParticipants(ctx, req, opts...) +} + +// UpdateParticipant updates the specified participant. +func (c *ParticipantsClient) UpdateParticipant(ctx context.Context, req *dialogflowpb.UpdateParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + return c.internalClient.UpdateParticipant(ctx, req, opts...) +} + +// AnalyzeContent adds a text (chat, for example), or audio (phone recording, for example) +// message from a participant into the conversation. +// +// Note: Always use agent versions for production traffic +// sent to virtual agents. See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *ParticipantsClient) AnalyzeContent(ctx context.Context, req *dialogflowpb.AnalyzeContentRequest, opts ...gax.CallOption) (*dialogflowpb.AnalyzeContentResponse, error) { + return c.internalClient.AnalyzeContent(ctx, req, opts...) +} + +// StreamingAnalyzeContent adds a text (e.g., chat) or audio (e.g., phone recording) message from a +// participant into the conversation. +// Note: This method is only available through the gRPC API (not REST). +// +// The top-level message sent to the client by the server is +// StreamingAnalyzeContentResponse. Multiple response messages can be +// returned in order. The first one or more messages contain the +// recognition_result field. Each result represents a more complete +// transcript of what the user said. The next message contains the +// reply_text field, and potentially the reply_audio and/or the +// automated_agent_reply fields. +// +// Note: Always use agent versions for production traffic +// sent to virtual agents. See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *ParticipantsClient) StreamingAnalyzeContent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Participants_StreamingAnalyzeContentClient, error) { + return c.internalClient.StreamingAnalyzeContent(ctx, opts...) +} + +// SuggestArticles gets suggested articles for a participant based on specific historical +// messages. +// +// Note that ListSuggestions will only list the auto-generated +// suggestions, while CompileSuggestion will try to compile suggestion +// based on the provided conversation context in the real time. +func (c *ParticipantsClient) SuggestArticles(ctx context.Context, req *dialogflowpb.SuggestArticlesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestArticlesResponse, error) { + return c.internalClient.SuggestArticles(ctx, req, opts...) +} + +// SuggestFaqAnswers gets suggested faq answers for a participant based on specific historical +// messages. +func (c *ParticipantsClient) SuggestFaqAnswers(ctx context.Context, req *dialogflowpb.SuggestFaqAnswersRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestFaqAnswersResponse, error) { + return c.internalClient.SuggestFaqAnswers(ctx, req, opts...) +} + +// SuggestSmartReplies gets smart replies for a participant based on specific historical +// messages. +func (c *ParticipantsClient) SuggestSmartReplies(ctx context.Context, req *dialogflowpb.SuggestSmartRepliesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) { + return c.internalClient.SuggestSmartReplies(ctx, req, opts...) +} + +// ListSuggestions deprecated: Use inline suggestion, event based suggestion or +// Suggestion* API instead. +// See [HumanAgentAssistantConfig.name (at http://HumanAgentAssistantConfig.name)][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name (at http://google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name)] for more +// details. +// Removal Date: 2020-09-01. +// +// Retrieves suggestions for live agents. +// +// This method should be used by human agent client software to fetch auto +// generated suggestions in real-time, while the conversation with an end user +// is in progress. The functionality is implemented in terms of the +// list +// pagination (at https://cloud.google.com/apis/design/design_patterns#list_pagination) +// design pattern. The client app should use the next_page_token field +// to fetch the next batch of suggestions. suggestions are sorted by +// create_time in descending order. +// To fetch latest suggestion, just set page_size to 1. +// To fetch new suggestions without duplication, send request with filter +// create_time_epoch_microseconds > [first item's create_time of previous request] and empty page_token. +// +// Deprecated: ListSuggestions may be removed in a future version. +func (c *ParticipantsClient) ListSuggestions(ctx context.Context, req *dialogflowpb.ListSuggestionsRequest, opts ...gax.CallOption) *SuggestionIterator { + return c.internalClient.ListSuggestions(ctx, req, opts...) +} + +// CompileSuggestion deprecated. use SuggestArticles and SuggestFaqAnswers instead. +// +// Gets suggestions for a participant based on specific historical +// messages. +// +// Note that ListSuggestions will only list the auto-generated +// suggestions, while CompileSuggestion will try to compile suggestion +// based on the provided conversation context in the real time. +// +// Deprecated: CompileSuggestion may be removed in a future version. +func (c *ParticipantsClient) CompileSuggestion(ctx context.Context, req *dialogflowpb.CompileSuggestionRequest, opts ...gax.CallOption) (*dialogflowpb.CompileSuggestionResponse, error) { + return c.internalClient.CompileSuggestion(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *ParticipantsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *ParticipantsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *ParticipantsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *ParticipantsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *ParticipantsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// participantsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type participantsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing ParticipantsClient + CallOptions **ParticipantsCallOptions + + // The gRPC API client. + participantsClient dialogflowpb.ParticipantsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewParticipantsClient creates a new participants client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Participants. +func NewParticipantsClient(ctx context.Context, opts ...option.ClientOption) (*ParticipantsClient, error) { + clientOpts := defaultParticipantsGRPCClientOptions() + if newParticipantsClientHook != nil { + hookOpts, err := newParticipantsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := ParticipantsClient{CallOptions: defaultParticipantsCallOptions()} + + c := &participantsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + participantsClient: dialogflowpb.NewParticipantsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *participantsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *participantsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *participantsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type participantsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing ParticipantsClient + CallOptions **ParticipantsCallOptions +} + +// NewParticipantsRESTClient creates a new participants rest client. +// +// Service for managing Participants. +func NewParticipantsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ParticipantsClient, error) { + clientOpts := append(defaultParticipantsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultParticipantsRESTCallOptions() + c := &participantsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &ParticipantsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultParticipantsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *participantsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *participantsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *participantsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *participantsGRPCClient) CreateParticipant(ctx context.Context, req *dialogflowpb.CreateParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateParticipant[0:len((*c.CallOptions).CreateParticipant):len((*c.CallOptions).CreateParticipant)], opts...) + var resp *dialogflowpb.Participant + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.CreateParticipant(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) GetParticipant(ctx context.Context, req *dialogflowpb.GetParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetParticipant[0:len((*c.CallOptions).GetParticipant):len((*c.CallOptions).GetParticipant)], opts...) + var resp *dialogflowpb.Participant + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.GetParticipant(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) ListParticipants(ctx context.Context, req *dialogflowpb.ListParticipantsRequest, opts ...gax.CallOption) *ParticipantIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListParticipants[0:len((*c.CallOptions).ListParticipants):len((*c.CallOptions).ListParticipants)], opts...) + it := &ParticipantIterator{} + req = proto.Clone(req).(*dialogflowpb.ListParticipantsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Participant, string, error) { + resp := &dialogflowpb.ListParticipantsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.ListParticipants(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetParticipants(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *participantsGRPCClient) UpdateParticipant(ctx context.Context, req *dialogflowpb.UpdateParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "participant.name", url.QueryEscape(req.GetParticipant().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateParticipant[0:len((*c.CallOptions).UpdateParticipant):len((*c.CallOptions).UpdateParticipant)], opts...) + var resp *dialogflowpb.Participant + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.UpdateParticipant(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) AnalyzeContent(ctx context.Context, req *dialogflowpb.AnalyzeContentRequest, opts ...gax.CallOption) (*dialogflowpb.AnalyzeContentResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 220000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "participant", url.QueryEscape(req.GetParticipant()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).AnalyzeContent[0:len((*c.CallOptions).AnalyzeContent):len((*c.CallOptions).AnalyzeContent)], opts...) + var resp *dialogflowpb.AnalyzeContentResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.AnalyzeContent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) StreamingAnalyzeContent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Participants_StreamingAnalyzeContentClient, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + var resp dialogflowpb.Participants_StreamingAnalyzeContentClient + opts = append((*c.CallOptions).StreamingAnalyzeContent[0:len((*c.CallOptions).StreamingAnalyzeContent):len((*c.CallOptions).StreamingAnalyzeContent)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.StreamingAnalyzeContent(ctx, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) SuggestArticles(ctx context.Context, req *dialogflowpb.SuggestArticlesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestArticlesResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SuggestArticles[0:len((*c.CallOptions).SuggestArticles):len((*c.CallOptions).SuggestArticles)], opts...) + var resp *dialogflowpb.SuggestArticlesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.SuggestArticles(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) SuggestFaqAnswers(ctx context.Context, req *dialogflowpb.SuggestFaqAnswersRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestFaqAnswersResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SuggestFaqAnswers[0:len((*c.CallOptions).SuggestFaqAnswers):len((*c.CallOptions).SuggestFaqAnswers)], opts...) + var resp *dialogflowpb.SuggestFaqAnswersResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.SuggestFaqAnswers(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) SuggestSmartReplies(ctx context.Context, req *dialogflowpb.SuggestSmartRepliesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SuggestSmartReplies[0:len((*c.CallOptions).SuggestSmartReplies):len((*c.CallOptions).SuggestSmartReplies)], opts...) + var resp *dialogflowpb.SuggestSmartRepliesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.SuggestSmartReplies(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) ListSuggestions(ctx context.Context, req *dialogflowpb.ListSuggestionsRequest, opts ...gax.CallOption) *SuggestionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListSuggestions[0:len((*c.CallOptions).ListSuggestions):len((*c.CallOptions).ListSuggestions)], opts...) + it := &SuggestionIterator{} + req = proto.Clone(req).(*dialogflowpb.ListSuggestionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Suggestion, string, error) { + resp := &dialogflowpb.ListSuggestionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.ListSuggestions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetSuggestions(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *participantsGRPCClient) CompileSuggestion(ctx context.Context, req *dialogflowpb.CompileSuggestionRequest, opts ...gax.CallOption) (*dialogflowpb.CompileSuggestionResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CompileSuggestion[0:len((*c.CallOptions).CompileSuggestion):len((*c.CallOptions).CompileSuggestion)], opts...) + var resp *dialogflowpb.CompileSuggestionResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.CompileSuggestion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *participantsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *participantsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *participantsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateParticipant creates a new participant in a conversation. +func (c *participantsRESTClient) CreateParticipant(ctx context.Context, req *dialogflowpb.CreateParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetParticipant() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/participants", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateParticipant[0:len((*c.CallOptions).CreateParticipant):len((*c.CallOptions).CreateParticipant)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Participant{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetParticipant retrieves a conversation participant. +func (c *participantsRESTClient) GetParticipant(ctx context.Context, req *dialogflowpb.GetParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetParticipant[0:len((*c.CallOptions).GetParticipant):len((*c.CallOptions).GetParticipant)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Participant{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListParticipants returns the list of all participants in the specified conversation. +func (c *participantsRESTClient) ListParticipants(ctx context.Context, req *dialogflowpb.ListParticipantsRequest, opts ...gax.CallOption) *ParticipantIterator { + it := &ParticipantIterator{} + req = proto.Clone(req).(*dialogflowpb.ListParticipantsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Participant, string, error) { + resp := &dialogflowpb.ListParticipantsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/participants", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetParticipants(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// UpdateParticipant updates the specified participant. +func (c *participantsRESTClient) UpdateParticipant(ctx context.Context, req *dialogflowpb.UpdateParticipantRequest, opts ...gax.CallOption) (*dialogflowpb.Participant, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetParticipant() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetParticipant().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "participant.name", url.QueryEscape(req.GetParticipant().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateParticipant[0:len((*c.CallOptions).UpdateParticipant):len((*c.CallOptions).UpdateParticipant)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Participant{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// AnalyzeContent adds a text (chat, for example), or audio (phone recording, for example) +// message from a participant into the conversation. +// +// Note: Always use agent versions for production traffic +// sent to virtual agents. See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *participantsRESTClient) AnalyzeContent(ctx context.Context, req *dialogflowpb.AnalyzeContentRequest, opts ...gax.CallOption) (*dialogflowpb.AnalyzeContentResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:analyzeContent", req.GetParticipant()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "participant", url.QueryEscape(req.GetParticipant()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).AnalyzeContent[0:len((*c.CallOptions).AnalyzeContent):len((*c.CallOptions).AnalyzeContent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.AnalyzeContentResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// StreamingAnalyzeContent adds a text (e.g., chat) or audio (e.g., phone recording) message from a +// participant into the conversation. +// Note: This method is only available through the gRPC API (not REST). +// +// The top-level message sent to the client by the server is +// StreamingAnalyzeContentResponse. Multiple response messages can be +// returned in order. The first one or more messages contain the +// recognition_result field. Each result represents a more complete +// transcript of what the user said. The next message contains the +// reply_text field, and potentially the reply_audio and/or the +// automated_agent_reply fields. +// +// Note: Always use agent versions for production traffic +// sent to virtual agents. See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *participantsRESTClient) StreamingAnalyzeContent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Participants_StreamingAnalyzeContentClient, error) { + return nil, fmt.Errorf("StreamingAnalyzeContent not yet supported for REST clients") +} + +// SuggestArticles gets suggested articles for a participant based on specific historical +// messages. +// +// Note that ListSuggestions will only list the auto-generated +// suggestions, while CompileSuggestion will try to compile suggestion +// based on the provided conversation context in the real time. +func (c *participantsRESTClient) SuggestArticles(ctx context.Context, req *dialogflowpb.SuggestArticlesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestArticlesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/suggestions:suggestArticles", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SuggestArticles[0:len((*c.CallOptions).SuggestArticles):len((*c.CallOptions).SuggestArticles)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.SuggestArticlesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SuggestFaqAnswers gets suggested faq answers for a participant based on specific historical +// messages. +func (c *participantsRESTClient) SuggestFaqAnswers(ctx context.Context, req *dialogflowpb.SuggestFaqAnswersRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestFaqAnswersResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/suggestions:suggestFaqAnswers", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SuggestFaqAnswers[0:len((*c.CallOptions).SuggestFaqAnswers):len((*c.CallOptions).SuggestFaqAnswers)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.SuggestFaqAnswersResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// SuggestSmartReplies gets smart replies for a participant based on specific historical +// messages. +func (c *participantsRESTClient) SuggestSmartReplies(ctx context.Context, req *dialogflowpb.SuggestSmartRepliesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/suggestions:suggestSmartReplies", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).SuggestSmartReplies[0:len((*c.CallOptions).SuggestSmartReplies):len((*c.CallOptions).SuggestSmartReplies)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.SuggestSmartRepliesResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListSuggestions deprecated: Use inline suggestion, event based suggestion or +// Suggestion* API instead. +// See [HumanAgentAssistantConfig.name (at http://HumanAgentAssistantConfig.name)][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name (at http://google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name)] for more +// details. +// Removal Date: 2020-09-01. +// +// Retrieves suggestions for live agents. +// +// This method should be used by human agent client software to fetch auto +// generated suggestions in real-time, while the conversation with an end user +// is in progress. The functionality is implemented in terms of the +// list +// pagination (at https://cloud.google.com/apis/design/design_patterns#list_pagination) +// design pattern. The client app should use the next_page_token field +// to fetch the next batch of suggestions. suggestions are sorted by +// create_time in descending order. +// To fetch latest suggestion, just set page_size to 1. +// To fetch new suggestions without duplication, send request with filter +// create_time_epoch_microseconds > [first item's create_time of previous request] and empty page_token. +// +// Deprecated: ListSuggestions may be removed in a future version. +func (c *participantsRESTClient) ListSuggestions(ctx context.Context, req *dialogflowpb.ListSuggestionsRequest, opts ...gax.CallOption) *SuggestionIterator { + it := &SuggestionIterator{} + req = proto.Clone(req).(*dialogflowpb.ListSuggestionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Suggestion, string, error) { + resp := &dialogflowpb.ListSuggestionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/suggestions", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetSuggestions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CompileSuggestion deprecated. use SuggestArticles and SuggestFaqAnswers instead. +// +// Gets suggestions for a participant based on specific historical +// messages. +// +// Note that ListSuggestions will only list the auto-generated +// suggestions, while CompileSuggestion will try to compile suggestion +// based on the provided conversation context in the real time. +// +// Deprecated: CompileSuggestion may be removed in a future version. +func (c *participantsRESTClient) CompileSuggestion(ctx context.Context, req *dialogflowpb.CompileSuggestionRequest, opts ...gax.CallOption) (*dialogflowpb.CompileSuggestionResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/suggestions:compile", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CompileSuggestion[0:len((*c.CallOptions).CompileSuggestion):len((*c.CallOptions).CompileSuggestion)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.CompileSuggestionResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *participantsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *participantsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *participantsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *participantsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *participantsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ParticipantIterator manages a stream of *dialogflowpb.Participant. +type ParticipantIterator struct { + items []*dialogflowpb.Participant + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Participant, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ParticipantIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ParticipantIterator) Next() (*dialogflowpb.Participant, error) { + var item *dialogflowpb.Participant + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ParticipantIterator) bufLen() int { + return len(it.items) +} + +func (it *ParticipantIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// SuggestionIterator manages a stream of *dialogflowpb.Suggestion. +type SuggestionIterator struct { + items []*dialogflowpb.Suggestion + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Suggestion, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *SuggestionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *SuggestionIterator) Next() (*dialogflowpb.Suggestion, error) { + var item *dialogflowpb.Suggestion + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SuggestionIterator) bufLen() int { + return len(it.items) +} + +func (it *SuggestionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/participants_client_example_test.go b/dialogflow/apiv2beta1/participants_client_example_test.go new file mode 100644 index 000000000000..986f0af2c1f6 --- /dev/null +++ b/dialogflow/apiv2beta1/participants_client_example_test.go @@ -0,0 +1,499 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + "io" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewParticipantsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewParticipantsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleParticipantsClient_CreateParticipant() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateParticipantRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateParticipantRequest. + } + resp, err := c.CreateParticipant(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_GetParticipant() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetParticipantRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetParticipantRequest. + } + resp, err := c.GetParticipant(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_ListParticipants() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListParticipantsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListParticipantsRequest. + } + it := c.ListParticipants(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleParticipantsClient_UpdateParticipant() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateParticipantRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateParticipantRequest. + } + resp, err := c.UpdateParticipant(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_AnalyzeContent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.AnalyzeContentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#AnalyzeContentRequest. + } + resp, err := c.AnalyzeContent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_StreamingAnalyzeContent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + stream, err := c.StreamingAnalyzeContent(ctx) + if err != nil { + // TODO: Handle error. + } + go func() { + reqs := []*dialogflowpb.StreamingAnalyzeContentRequest{ + // 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 + } +} + +func ExampleParticipantsClient_SuggestArticles() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SuggestArticlesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#SuggestArticlesRequest. + } + resp, err := c.SuggestArticles(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_SuggestFaqAnswers() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SuggestFaqAnswersRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#SuggestFaqAnswersRequest. + } + resp, err := c.SuggestFaqAnswers(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_SuggestSmartReplies() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SuggestSmartRepliesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#SuggestSmartRepliesRequest. + } + resp, err := c.SuggestSmartReplies(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_ListSuggestions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListSuggestionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListSuggestionsRequest. + } + it := c.ListSuggestions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleParticipantsClient_CompileSuggestion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CompileSuggestionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CompileSuggestionRequest. + } + resp, err := c.CompileSuggestion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleParticipantsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleParticipantsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleParticipantsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/session_entity_types_client.go b/dialogflow/apiv2beta1/session_entity_types_client.go new file mode 100644 index 000000000000..7b467e5d5af9 --- /dev/null +++ b/dialogflow/apiv2beta1/session_entity_types_client.go @@ -0,0 +1,1440 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newSessionEntityTypesClientHook clientHook + +// SessionEntityTypesCallOptions contains the retry settings for each method of SessionEntityTypesClient. +type SessionEntityTypesCallOptions struct { + ListSessionEntityTypes []gax.CallOption + GetSessionEntityType []gax.CallOption + CreateSessionEntityType []gax.CallOption + UpdateSessionEntityType []gax.CallOption + DeleteSessionEntityType []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultSessionEntityTypesGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultSessionEntityTypesCallOptions() *SessionEntityTypesCallOptions { + return &SessionEntityTypesCallOptions{ + ListSessionEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultSessionEntityTypesRESTCallOptions() *SessionEntityTypesCallOptions { + return &SessionEntityTypesCallOptions{ + ListSessionEntityTypes: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteSessionEntityType: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalSessionEntityTypesClient is an interface that defines the methods available from Dialogflow API. +type internalSessionEntityTypesClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListSessionEntityTypes(context.Context, *dialogflowpb.ListSessionEntityTypesRequest, ...gax.CallOption) *SessionEntityTypeIterator + GetSessionEntityType(context.Context, *dialogflowpb.GetSessionEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) + CreateSessionEntityType(context.Context, *dialogflowpb.CreateSessionEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) + UpdateSessionEntityType(context.Context, *dialogflowpb.UpdateSessionEntityTypeRequest, ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) + DeleteSessionEntityType(context.Context, *dialogflowpb.DeleteSessionEntityTypeRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// SessionEntityTypesClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing SessionEntityTypes. +type SessionEntityTypesClient struct { + // The internal transport-dependent client. + internalClient internalSessionEntityTypesClient + + // The call options for this service. + CallOptions *SessionEntityTypesCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *SessionEntityTypesClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *SessionEntityTypesClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *SessionEntityTypesClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListSessionEntityTypes returns the list of all session entity types in the specified session. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *SessionEntityTypesClient) ListSessionEntityTypes(ctx context.Context, req *dialogflowpb.ListSessionEntityTypesRequest, opts ...gax.CallOption) *SessionEntityTypeIterator { + return c.internalClient.ListSessionEntityTypes(ctx, req, opts...) +} + +// GetSessionEntityType retrieves the specified session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *SessionEntityTypesClient) GetSessionEntityType(ctx context.Context, req *dialogflowpb.GetSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + return c.internalClient.GetSessionEntityType(ctx, req, opts...) +} + +// CreateSessionEntityType creates a session entity type. +// +// If the specified session entity type already exists, overrides the +// session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *SessionEntityTypesClient) CreateSessionEntityType(ctx context.Context, req *dialogflowpb.CreateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + return c.internalClient.CreateSessionEntityType(ctx, req, opts...) +} + +// UpdateSessionEntityType updates the specified session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *SessionEntityTypesClient) UpdateSessionEntityType(ctx context.Context, req *dialogflowpb.UpdateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + return c.internalClient.UpdateSessionEntityType(ctx, req, opts...) +} + +// DeleteSessionEntityType deletes the specified session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *SessionEntityTypesClient) DeleteSessionEntityType(ctx context.Context, req *dialogflowpb.DeleteSessionEntityTypeRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteSessionEntityType(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *SessionEntityTypesClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *SessionEntityTypesClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *SessionEntityTypesClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *SessionEntityTypesClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *SessionEntityTypesClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// sessionEntityTypesGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type sessionEntityTypesGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing SessionEntityTypesClient + CallOptions **SessionEntityTypesCallOptions + + // The gRPC API client. + sessionEntityTypesClient dialogflowpb.SessionEntityTypesClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewSessionEntityTypesClient creates a new session entity types client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing SessionEntityTypes. +func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*SessionEntityTypesClient, error) { + clientOpts := defaultSessionEntityTypesGRPCClientOptions() + if newSessionEntityTypesClientHook != nil { + hookOpts, err := newSessionEntityTypesClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := SessionEntityTypesClient{CallOptions: defaultSessionEntityTypesCallOptions()} + + c := &sessionEntityTypesGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + sessionEntityTypesClient: dialogflowpb.NewSessionEntityTypesClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *sessionEntityTypesGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *sessionEntityTypesGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *sessionEntityTypesGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type sessionEntityTypesRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing SessionEntityTypesClient + CallOptions **SessionEntityTypesCallOptions +} + +// NewSessionEntityTypesRESTClient creates a new session entity types rest client. +// +// Service for managing SessionEntityTypes. +func NewSessionEntityTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SessionEntityTypesClient, error) { + clientOpts := append(defaultSessionEntityTypesRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultSessionEntityTypesRESTCallOptions() + c := &sessionEntityTypesRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &SessionEntityTypesClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultSessionEntityTypesRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *sessionEntityTypesRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *sessionEntityTypesRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *sessionEntityTypesRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *sessionEntityTypesGRPCClient) ListSessionEntityTypes(ctx context.Context, req *dialogflowpb.ListSessionEntityTypesRequest, opts ...gax.CallOption) *SessionEntityTypeIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListSessionEntityTypes[0:len((*c.CallOptions).ListSessionEntityTypes):len((*c.CallOptions).ListSessionEntityTypes)], opts...) + it := &SessionEntityTypeIterator{} + req = proto.Clone(req).(*dialogflowpb.ListSessionEntityTypesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.SessionEntityType, string, error) { + resp := &dialogflowpb.ListSessionEntityTypesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.sessionEntityTypesClient.ListSessionEntityTypes(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetSessionEntityTypes(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *sessionEntityTypesGRPCClient) GetSessionEntityType(ctx context.Context, req *dialogflowpb.GetSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetSessionEntityType[0:len((*c.CallOptions).GetSessionEntityType):len((*c.CallOptions).GetSessionEntityType)], opts...) + var resp *dialogflowpb.SessionEntityType + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.sessionEntityTypesClient.GetSessionEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) CreateSessionEntityType(ctx context.Context, req *dialogflowpb.CreateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateSessionEntityType[0:len((*c.CallOptions).CreateSessionEntityType):len((*c.CallOptions).CreateSessionEntityType)], opts...) + var resp *dialogflowpb.SessionEntityType + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.sessionEntityTypesClient.CreateSessionEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) UpdateSessionEntityType(ctx context.Context, req *dialogflowpb.UpdateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "session_entity_type.name", url.QueryEscape(req.GetSessionEntityType().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateSessionEntityType[0:len((*c.CallOptions).UpdateSessionEntityType):len((*c.CallOptions).UpdateSessionEntityType)], opts...) + var resp *dialogflowpb.SessionEntityType + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.sessionEntityTypesClient.UpdateSessionEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) DeleteSessionEntityType(ctx context.Context, req *dialogflowpb.DeleteSessionEntityTypeRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteSessionEntityType[0:len((*c.CallOptions).DeleteSessionEntityType):len((*c.CallOptions).DeleteSessionEntityType)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.sessionEntityTypesClient.DeleteSessionEntityType(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *sessionEntityTypesGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *sessionEntityTypesGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *sessionEntityTypesGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionEntityTypesGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListSessionEntityTypes returns the list of all session entity types in the specified session. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *sessionEntityTypesRESTClient) ListSessionEntityTypes(ctx context.Context, req *dialogflowpb.ListSessionEntityTypesRequest, opts ...gax.CallOption) *SessionEntityTypeIterator { + it := &SessionEntityTypeIterator{} + req = proto.Clone(req).(*dialogflowpb.ListSessionEntityTypesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.SessionEntityType, string, error) { + resp := &dialogflowpb.ListSessionEntityTypesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entityTypes", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetSessionEntityTypes(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetSessionEntityType retrieves the specified session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *sessionEntityTypesRESTClient) GetSessionEntityType(ctx context.Context, req *dialogflowpb.GetSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetSessionEntityType[0:len((*c.CallOptions).GetSessionEntityType):len((*c.CallOptions).GetSessionEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.SessionEntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateSessionEntityType creates a session entity type. +// +// If the specified session entity type already exists, overrides the +// session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *sessionEntityTypesRESTClient) CreateSessionEntityType(ctx context.Context, req *dialogflowpb.CreateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetSessionEntityType() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/entityTypes", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateSessionEntityType[0:len((*c.CallOptions).CreateSessionEntityType):len((*c.CallOptions).CreateSessionEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.SessionEntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateSessionEntityType updates the specified session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *sessionEntityTypesRESTClient) UpdateSessionEntityType(ctx context.Context, req *dialogflowpb.UpdateSessionEntityTypeRequest, opts ...gax.CallOption) (*dialogflowpb.SessionEntityType, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetSessionEntityType() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetSessionEntityType().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "session_entity_type.name", url.QueryEscape(req.GetSessionEntityType().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateSessionEntityType[0:len((*c.CallOptions).UpdateSessionEntityType):len((*c.CallOptions).UpdateSessionEntityType)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.SessionEntityType{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteSessionEntityType deletes the specified session entity type. +// +// This method doesn’t work with Google Assistant integration. +// Contact Dialogflow support if you need to use session entities +// with Google Assistant integration. +func (c *sessionEntityTypesRESTClient) DeleteSessionEntityType(ctx context.Context, req *dialogflowpb.DeleteSessionEntityTypeRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetLocation gets information about a location. +func (c *sessionEntityTypesRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *sessionEntityTypesRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *sessionEntityTypesRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *sessionEntityTypesRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *sessionEntityTypesRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// SessionEntityTypeIterator manages a stream of *dialogflowpb.SessionEntityType. +type SessionEntityTypeIterator struct { + items []*dialogflowpb.SessionEntityType + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.SessionEntityType, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *SessionEntityTypeIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *SessionEntityTypeIterator) Next() (*dialogflowpb.SessionEntityType, error) { + var item *dialogflowpb.SessionEntityType + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SessionEntityTypeIterator) bufLen() int { + return len(it.items) +} + +func (it *SessionEntityTypeIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/session_entity_types_client_example_test.go b/dialogflow/apiv2beta1/session_entity_types_client_example_test.go new file mode 100644 index 000000000000..2c5874efed4c --- /dev/null +++ b/dialogflow/apiv2beta1/session_entity_types_client_example_test.go @@ -0,0 +1,325 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewSessionEntityTypesClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewSessionEntityTypesRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleSessionEntityTypesClient_ListSessionEntityTypes() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListSessionEntityTypesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListSessionEntityTypesRequest. + } + it := c.ListSessionEntityTypes(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleSessionEntityTypesClient_GetSessionEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetSessionEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetSessionEntityTypeRequest. + } + resp, err := c.GetSessionEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_CreateSessionEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateSessionEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateSessionEntityTypeRequest. + } + resp, err := c.CreateSessionEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_UpdateSessionEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateSessionEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateSessionEntityTypeRequest. + } + resp, err := c.UpdateSessionEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_DeleteSessionEntityType() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteSessionEntityTypeRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteSessionEntityTypeRequest. + } + err = c.DeleteSessionEntityType(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleSessionEntityTypesClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleSessionEntityTypesClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleSessionEntityTypesClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionEntityTypesClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionEntityTypesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/sessions_client.go b/dialogflow/apiv2beta1/sessions_client.go new file mode 100644 index 000000000000..d16271b7921c --- /dev/null +++ b/dialogflow/apiv2beta1/sessions_client.go @@ -0,0 +1,973 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newSessionsClientHook clientHook + +// SessionsCallOptions contains the retry settings for each method of SessionsClient. +type SessionsCallOptions struct { + DetectIntent []gax.CallOption + StreamingDetectIntent []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultSessionsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultSessionsCallOptions() *SessionsCallOptions { + return &SessionsCallOptions{ + DetectIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + StreamingDetectIntent: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultSessionsRESTCallOptions() *SessionsCallOptions { + return &SessionsCallOptions{ + DetectIntent: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + StreamingDetectIntent: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalSessionsClient is an interface that defines the methods available from Dialogflow API. +type internalSessionsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + DetectIntent(context.Context, *dialogflowpb.DetectIntentRequest, ...gax.CallOption) (*dialogflowpb.DetectIntentResponse, error) + StreamingDetectIntent(context.Context, ...gax.CallOption) (dialogflowpb.Sessions_StreamingDetectIntentClient, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// SessionsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// A service used for session interactions. +// +// For more information, see the API interactions +// guide (at https://cloud.google.com/dialogflow/docs/api-overview). +type SessionsClient struct { + // The internal transport-dependent client. + internalClient internalSessionsClient + + // The call options for this service. + CallOptions *SessionsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *SessionsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *SessionsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *SessionsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// DetectIntent processes a natural language query and returns structured, actionable data +// as a result. This method is not idempotent, because it may cause contexts +// and session entity types to be updated, which in turn might affect +// results of future queries. +// +// If you might use +// Agent Assist (at https://cloud.google.com/dialogflow/docs/#aa) +// or other CCAI products now or in the future, consider using +// AnalyzeContent +// instead of DetectIntent. AnalyzeContent has additional +// functionality for Agent Assist and other CCAI products. +// +// Note: Always use agent versions for production traffic. +// See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *SessionsClient) DetectIntent(ctx context.Context, req *dialogflowpb.DetectIntentRequest, opts ...gax.CallOption) (*dialogflowpb.DetectIntentResponse, error) { + return c.internalClient.DetectIntent(ctx, req, opts...) +} + +// StreamingDetectIntent processes a natural language query in audio format in a streaming fashion +// and returns structured, actionable data as a result. This method is only +// available via the gRPC API (not REST). +// +// If you might use +// Agent Assist (at https://cloud.google.com/dialogflow/docs/#aa) +// or other CCAI products now or in the future, consider using +// StreamingAnalyzeContent +// instead of StreamingDetectIntent. StreamingAnalyzeContent has +// additional functionality for Agent Assist and other CCAI products. +// +// Note: Always use agent versions for production traffic. +// See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *SessionsClient) StreamingDetectIntent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Sessions_StreamingDetectIntentClient, error) { + return c.internalClient.StreamingDetectIntent(ctx, opts...) +} + +// GetLocation gets information about a location. +func (c *SessionsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *SessionsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *SessionsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *SessionsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *SessionsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// sessionsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type sessionsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing SessionsClient + CallOptions **SessionsCallOptions + + // The gRPC API client. + sessionsClient dialogflowpb.SessionsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewSessionsClient creates a new sessions client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// A service used for session interactions. +// +// For more information, see the API interactions +// guide (at https://cloud.google.com/dialogflow/docs/api-overview). +func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*SessionsClient, error) { + clientOpts := defaultSessionsGRPCClientOptions() + if newSessionsClientHook != nil { + hookOpts, err := newSessionsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := SessionsClient{CallOptions: defaultSessionsCallOptions()} + + c := &sessionsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + sessionsClient: dialogflowpb.NewSessionsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *sessionsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *sessionsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *sessionsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type sessionsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing SessionsClient + CallOptions **SessionsCallOptions +} + +// NewSessionsRESTClient creates a new sessions rest client. +// +// A service used for session interactions. +// +// For more information, see the API interactions +// guide (at https://cloud.google.com/dialogflow/docs/api-overview). +func NewSessionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*SessionsClient, error) { + clientOpts := append(defaultSessionsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultSessionsRESTCallOptions() + c := &sessionsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &SessionsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultSessionsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *sessionsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *sessionsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *sessionsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *sessionsGRPCClient) DetectIntent(ctx context.Context, req *dialogflowpb.DetectIntentRequest, opts ...gax.CallOption) (*dialogflowpb.DetectIntentResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 220000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "session", url.QueryEscape(req.GetSession()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DetectIntent[0:len((*c.CallOptions).DetectIntent):len((*c.CallOptions).DetectIntent)], opts...) + var resp *dialogflowpb.DetectIntentResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.sessionsClient.DetectIntent(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionsGRPCClient) StreamingDetectIntent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Sessions_StreamingDetectIntentClient, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + var resp dialogflowpb.Sessions_StreamingDetectIntentClient + opts = append((*c.CallOptions).StreamingDetectIntent[0:len((*c.CallOptions).StreamingDetectIntent):len((*c.CallOptions).StreamingDetectIntent)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.sessionsClient.StreamingDetectIntent(ctx, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *sessionsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *sessionsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *sessionsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// DetectIntent processes a natural language query and returns structured, actionable data +// as a result. This method is not idempotent, because it may cause contexts +// and session entity types to be updated, which in turn might affect +// results of future queries. +// +// If you might use +// Agent Assist (at https://cloud.google.com/dialogflow/docs/#aa) +// or other CCAI products now or in the future, consider using +// AnalyzeContent +// instead of DetectIntent. AnalyzeContent has additional +// functionality for Agent Assist and other CCAI products. +// +// Note: Always use agent versions for production traffic. +// See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *sessionsRESTClient) DetectIntent(ctx context.Context, req *dialogflowpb.DetectIntentRequest, opts ...gax.CallOption) (*dialogflowpb.DetectIntentResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:detectIntent", req.GetSession()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "session", url.QueryEscape(req.GetSession()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).DetectIntent[0:len((*c.CallOptions).DetectIntent):len((*c.CallOptions).DetectIntent)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.DetectIntentResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// StreamingDetectIntent processes a natural language query in audio format in a streaming fashion +// and returns structured, actionable data as a result. This method is only +// available via the gRPC API (not REST). +// +// If you might use +// Agent Assist (at https://cloud.google.com/dialogflow/docs/#aa) +// or other CCAI products now or in the future, consider using +// StreamingAnalyzeContent +// instead of StreamingDetectIntent. StreamingAnalyzeContent has +// additional functionality for Agent Assist and other CCAI products. +// +// Note: Always use agent versions for production traffic. +// See Versions and +// environments (at https://cloud.google.com/dialogflow/es/docs/agents-versions). +func (c *sessionsRESTClient) StreamingDetectIntent(ctx context.Context, opts ...gax.CallOption) (dialogflowpb.Sessions_StreamingDetectIntentClient, error) { + return nil, fmt.Errorf("StreamingDetectIntent not yet supported for REST clients") +} + +// GetLocation gets information about a location. +func (c *sessionsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *sessionsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *sessionsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *sessionsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *sessionsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/dialogflow/apiv2beta1/sessions_client_example_test.go b/dialogflow/apiv2beta1/sessions_client_example_test.go new file mode 100644 index 000000000000..0f4cf6f9cea2 --- /dev/null +++ b/dialogflow/apiv2beta1/sessions_client_example_test.go @@ -0,0 +1,262 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + "io" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewSessionsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewSessionsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleSessionsClient_DetectIntent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DetectIntentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DetectIntentRequest. + } + resp, err := c.DetectIntent(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionsClient_StreamingDetectIntent() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + stream, err := c.StreamingDetectIntent(ctx) + if err != nil { + // TODO: Handle error. + } + go func() { + reqs := []*dialogflowpb.StreamingDetectIntentRequest{ + // 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 + } +} + +func ExampleSessionsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleSessionsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleSessionsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleSessionsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewSessionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/apiv2beta1/version.go b/dialogflow/apiv2beta1/version.go new file mode 100644 index 000000000000..50eb6dd10628 --- /dev/null +++ b/dialogflow/apiv2beta1/version.go @@ -0,0 +1,23 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package dialogflow + +import "cloud.google.com/go/dialogflow/internal" + +func init() { + versionClient = internal.Version +} diff --git a/dialogflow/apiv2beta1/versions_client.go b/dialogflow/apiv2beta1/versions_client.go new file mode 100644 index 000000000000..9e71b0999f76 --- /dev/null +++ b/dialogflow/apiv2beta1/versions_client.go @@ -0,0 +1,1406 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newVersionsClientHook clientHook + +// VersionsCallOptions contains the retry settings for each method of VersionsClient. +type VersionsCallOptions struct { + ListVersions []gax.CallOption + GetVersion []gax.CallOption + CreateVersion []gax.CallOption + UpdateVersion []gax.CallOption + DeleteVersion []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultVersionsGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("dialogflow.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("dialogflow.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultVersionsCallOptions() *VersionsCallOptions { + return &VersionsCallOptions{ + ListVersions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultVersionsRESTCallOptions() *VersionsCallOptions { + return &VersionsCallOptions{ + ListVersions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteVersion: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalVersionsClient is an interface that defines the methods available from Dialogflow API. +type internalVersionsClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListVersions(context.Context, *dialogflowpb.ListVersionsRequest, ...gax.CallOption) *VersionIterator + GetVersion(context.Context, *dialogflowpb.GetVersionRequest, ...gax.CallOption) (*dialogflowpb.Version, error) + CreateVersion(context.Context, *dialogflowpb.CreateVersionRequest, ...gax.CallOption) (*dialogflowpb.Version, error) + UpdateVersion(context.Context, *dialogflowpb.UpdateVersionRequest, ...gax.CallOption) (*dialogflowpb.Version, error) + DeleteVersion(context.Context, *dialogflowpb.DeleteVersionRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// VersionsClient is a client for interacting with Dialogflow API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for managing Versions. +type VersionsClient struct { + // The internal transport-dependent client. + internalClient internalVersionsClient + + // The call options for this service. + CallOptions *VersionsCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *VersionsClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *VersionsClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *VersionsClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListVersions returns the list of all versions of the specified agent. +func (c *VersionsClient) ListVersions(ctx context.Context, req *dialogflowpb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { + return c.internalClient.ListVersions(ctx, req, opts...) +} + +// GetVersion retrieves the specified agent version. +func (c *VersionsClient) GetVersion(ctx context.Context, req *dialogflowpb.GetVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + return c.internalClient.GetVersion(ctx, req, opts...) +} + +// CreateVersion creates an agent version. +// +// The new version points to the agent instance in the “default” environment. +func (c *VersionsClient) CreateVersion(ctx context.Context, req *dialogflowpb.CreateVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + return c.internalClient.CreateVersion(ctx, req, opts...) +} + +// UpdateVersion updates the specified agent version. +// +// Note that this method does not allow you to update the state of the agent +// the given version points to. It allows you to update only mutable +// properties of the version resource. +func (c *VersionsClient) UpdateVersion(ctx context.Context, req *dialogflowpb.UpdateVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + return c.internalClient.UpdateVersion(ctx, req, opts...) +} + +// DeleteVersion delete the specified agent version. +func (c *VersionsClient) DeleteVersion(ctx context.Context, req *dialogflowpb.DeleteVersionRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteVersion(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *VersionsClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *VersionsClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *VersionsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *VersionsClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *VersionsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// versionsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type versionsGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing VersionsClient + CallOptions **VersionsCallOptions + + // The gRPC API client. + versionsClient dialogflowpb.VersionsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewVersionsClient creates a new versions client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for managing Versions. +func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*VersionsClient, error) { + clientOpts := defaultVersionsGRPCClientOptions() + if newVersionsClientHook != nil { + hookOpts, err := newVersionsClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := VersionsClient{CallOptions: defaultVersionsCallOptions()} + + c := &versionsGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + versionsClient: dialogflowpb.NewVersionsClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *versionsGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *versionsGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *versionsGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type versionsRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing VersionsClient + CallOptions **VersionsCallOptions +} + +// NewVersionsRESTClient creates a new versions rest client. +// +// Service for managing Versions. +func NewVersionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*VersionsClient, error) { + clientOpts := append(defaultVersionsRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultVersionsRESTCallOptions() + c := &versionsRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &VersionsClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultVersionsRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://dialogflow.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://dialogflow.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://dialogflow.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *versionsRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *versionsRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *versionsRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *versionsGRPCClient) ListVersions(ctx context.Context, req *dialogflowpb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListVersions[0:len((*c.CallOptions).ListVersions):len((*c.CallOptions).ListVersions)], opts...) + it := &VersionIterator{} + req = proto.Clone(req).(*dialogflowpb.ListVersionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Version, string, error) { + resp := &dialogflowpb.ListVersionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.versionsClient.ListVersions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetVersions(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *versionsGRPCClient) GetVersion(ctx context.Context, req *dialogflowpb.GetVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetVersion[0:len((*c.CallOptions).GetVersion):len((*c.CallOptions).GetVersion)], opts...) + var resp *dialogflowpb.Version + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.versionsClient.GetVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) CreateVersion(ctx context.Context, req *dialogflowpb.CreateVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateVersion[0:len((*c.CallOptions).CreateVersion):len((*c.CallOptions).CreateVersion)], opts...) + var resp *dialogflowpb.Version + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.versionsClient.CreateVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) UpdateVersion(ctx context.Context, req *dialogflowpb.UpdateVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "version.name", url.QueryEscape(req.GetVersion().GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateVersion[0:len((*c.CallOptions).UpdateVersion):len((*c.CallOptions).UpdateVersion)], opts...) + var resp *dialogflowpb.Version + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.versionsClient.UpdateVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) DeleteVersion(ctx context.Context, req *dialogflowpb.DeleteVersionRequest, opts ...gax.CallOption) error { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteVersion[0:len((*c.CallOptions).DeleteVersion):len((*c.CallOptions).DeleteVersion)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.versionsClient.DeleteVersion(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *versionsGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *versionsGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *versionsGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *versionsGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListVersions returns the list of all versions of the specified agent. +func (c *versionsRESTClient) ListVersions(ctx context.Context, req *dialogflowpb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { + it := &VersionIterator{} + req = proto.Clone(req).(*dialogflowpb.ListVersionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*dialogflowpb.Version, string, error) { + resp := &dialogflowpb.ListVersionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/versions", req.GetParent()) + + params := url.Values{} + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetVersions(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetVersion retrieves the specified agent version. +func (c *versionsRESTClient) GetVersion(ctx context.Context, req *dialogflowpb.GetVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetVersion[0:len((*c.CallOptions).GetVersion):len((*c.CallOptions).GetVersion)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Version{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateVersion creates an agent version. +// +// The new version points to the agent instance in the “default” environment. +func (c *versionsRESTClient) CreateVersion(ctx context.Context, req *dialogflowpb.CreateVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetVersion() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/versions", req.GetParent()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).CreateVersion[0:len((*c.CallOptions).CreateVersion):len((*c.CallOptions).CreateVersion)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Version{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateVersion updates the specified agent version. +// +// Note that this method does not allow you to update the state of the agent +// the given version points to. It allows you to update only mutable +// properties of the version resource. +func (c *versionsRESTClient) UpdateVersion(ctx context.Context, req *dialogflowpb.UpdateVersionRequest, opts ...gax.CallOption) (*dialogflowpb.Version, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetVersion() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetVersion().GetName()) + + params := url.Values{} + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "version.name", url.QueryEscape(req.GetVersion().GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).UpdateVersion[0:len((*c.CallOptions).UpdateVersion):len((*c.CallOptions).UpdateVersion)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &dialogflowpb.Version{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteVersion delete the specified agent version. +func (c *versionsRESTClient) DeleteVersion(ctx context.Context, req *dialogflowpb.DeleteVersionRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetLocation gets information about a location. +func (c *versionsRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *versionsRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *versionsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *versionsRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *versionsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v2beta1/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// VersionIterator manages a stream of *dialogflowpb.Version. +type VersionIterator struct { + items []*dialogflowpb.Version + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*dialogflowpb.Version, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *VersionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *VersionIterator) Next() (*dialogflowpb.Version, error) { + var item *dialogflowpb.Version + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *VersionIterator) bufLen() int { + return len(it.items) +} + +func (it *VersionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/dialogflow/apiv2beta1/versions_client_example_test.go b/dialogflow/apiv2beta1/versions_client_example_test.go new file mode 100644 index 000000000000..27537fb25473 --- /dev/null +++ b/dialogflow/apiv2beta1/versions_client_example_test.go @@ -0,0 +1,325 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package dialogflow_test + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2beta1" + "google.golang.org/api/iterator" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func ExampleNewVersionsClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewVersionsRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleVersionsClient_ListVersions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ListVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#ListVersionsRequest. + } + it := c.ListVersions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleVersionsClient_GetVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.GetVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#GetVersionRequest. + } + resp, err := c.GetVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_CreateVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.CreateVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#CreateVersionRequest. + } + resp, err := c.CreateVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_UpdateVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.UpdateVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#UpdateVersionRequest. + } + resp, err := c.UpdateVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_DeleteVersion() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.DeleteVersionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1#DeleteVersionRequest. + } + err = c.DeleteVersion(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleVersionsClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleVersionsClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleVersionsClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleVersionsClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := dialogflow.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/dialogflow/cx/apiv3/agents_client.go b/dialogflow/cx/apiv3/agents_client.go index 72e769885101..7d84fe395db0 100644 --- a/dialogflow/cx/apiv3/agents_client.go +++ b/dialogflow/cx/apiv3/agents_client.go @@ -238,7 +238,8 @@ func (c *AgentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AgentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -282,10 +283,10 @@ func (c *AgentsClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgentReq // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: ExportAgentResponse +// response: ExportAgentResponse func (c *AgentsClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { return c.internalClient.ExportAgent(ctx, req, opts...) } @@ -305,11 +306,11 @@ func (c *AgentsClient) ExportAgentOperation(name string) *ExportAgentOperation { // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train flows prior to sending them queries. See the // training @@ -444,7 +445,8 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *agentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/agents_client_example_test.go b/dialogflow/cx/apiv3/agents_client_example_test.go index deed73360c4f..d5c7c85b3f53 100644 --- a/dialogflow/cx/apiv3/agents_client_example_test.go +++ b/dialogflow/cx/apiv3/agents_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewAgentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewAgentsClient() { func ExampleAgentsClient_ListAgents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleAgentsClient_ListAgents() { func ExampleAgentsClient_GetAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleAgentsClient_GetAgent() { func ExampleAgentsClient_CreateAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleAgentsClient_CreateAgent() { func ExampleAgentsClient_UpdateAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleAgentsClient_UpdateAgent() { func ExampleAgentsClient_DeleteAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleAgentsClient_DeleteAgent() { func ExampleAgentsClient_ExportAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +204,11 @@ func ExampleAgentsClient_ExportAgent() { func ExampleAgentsClient_RestoreAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -192,6 +232,11 @@ func ExampleAgentsClient_RestoreAgent() { func ExampleAgentsClient_ValidateAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -212,6 +257,11 @@ func ExampleAgentsClient_ValidateAgent() { func ExampleAgentsClient_GetAgentValidationResult() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -232,6 +282,11 @@ func ExampleAgentsClient_GetAgentValidationResult() { func ExampleAgentsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -252,6 +307,11 @@ func ExampleAgentsClient_GetLocation() { func ExampleAgentsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -278,6 +338,11 @@ func ExampleAgentsClient_ListLocations() { func ExampleAgentsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -296,6 +361,11 @@ func ExampleAgentsClient_CancelOperation() { func ExampleAgentsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -316,6 +386,11 @@ func ExampleAgentsClient_GetOperation() { func ExampleAgentsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/changelogs_client.go b/dialogflow/cx/apiv3/changelogs_client.go index fea876d58ae3..a0a3c20819d4 100644 --- a/dialogflow/cx/apiv3/changelogs_client.go +++ b/dialogflow/cx/apiv3/changelogs_client.go @@ -137,7 +137,8 @@ func (c *ChangelogsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ChangelogsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -243,7 +244,8 @@ func NewChangelogsClient(ctx context.Context, opts ...option.ClientOption) (*Cha // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *changelogsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/changelogs_client_example_test.go b/dialogflow/cx/apiv3/changelogs_client_example_test.go index e24d96ed6743..7f96c50c128b 100644 --- a/dialogflow/cx/apiv3/changelogs_client_example_test.go +++ b/dialogflow/cx/apiv3/changelogs_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewChangelogsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewChangelogsClient() { func ExampleChangelogsClient_ListChangelogs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleChangelogsClient_ListChangelogs() { func ExampleChangelogsClient_GetChangelog() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleChangelogsClient_GetChangelog() { func ExampleChangelogsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleChangelogsClient_GetLocation() { func ExampleChangelogsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +157,11 @@ func ExampleChangelogsClient_ListLocations() { func ExampleChangelogsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleChangelogsClient_CancelOperation() { func ExampleChangelogsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleChangelogsClient_GetOperation() { func ExampleChangelogsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/deployments_client.go b/dialogflow/cx/apiv3/deployments_client.go index 314aa114f3be..8193413941ca 100644 --- a/dialogflow/cx/apiv3/deployments_client.go +++ b/dialogflow/cx/apiv3/deployments_client.go @@ -137,7 +137,8 @@ func (c *DeploymentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *DeploymentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -243,7 +244,8 @@ func NewDeploymentsClient(ctx context.Context, opts ...option.ClientOption) (*De // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *deploymentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/deployments_client_example_test.go b/dialogflow/cx/apiv3/deployments_client_example_test.go index 0931d10a5c39..f39555998aba 100644 --- a/dialogflow/cx/apiv3/deployments_client_example_test.go +++ b/dialogflow/cx/apiv3/deployments_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewDeploymentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewDeploymentsClient() { func ExampleDeploymentsClient_ListDeployments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleDeploymentsClient_ListDeployments() { func ExampleDeploymentsClient_GetDeployment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleDeploymentsClient_GetDeployment() { func ExampleDeploymentsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleDeploymentsClient_GetLocation() { func ExampleDeploymentsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -132,6 +157,11 @@ func ExampleDeploymentsClient_ListLocations() { func ExampleDeploymentsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -150,6 +180,11 @@ func ExampleDeploymentsClient_CancelOperation() { func ExampleDeploymentsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. @@ -170,6 +205,11 @@ func ExampleDeploymentsClient_GetOperation() { func ExampleDeploymentsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewDeploymentsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/doc.go b/dialogflow/cx/apiv3/doc.go index 4cb0f40db7f9..2d85e0bcae3d 100644 --- a/dialogflow/cx/apiv3/doc.go +++ b/dialogflow/cx/apiv3/doc.go @@ -20,51 +20,62 @@ // Builds conversational interfaces (for example, chatbots, and voice-powered // apps and devices). // -// Example usage +// # Example usage // // To get started with this package, create a client. -// ctx := context.Background() -// c, err := cx.NewPagesClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cx.NewPagesClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() // // The client will use your default application credentials. Clients should be reused instead of created as needed. // The methods of Client are safe for concurrent use by multiple goroutines. // The returned client must be Closed when it is done being used. // -// Using the Client +// # Using the Client // // The following is an example of making an API call with the newly created client. // -// ctx := context.Background() -// c, err := cx.NewPagesClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() -// -// req := &cxpb.ListPagesRequest{ -// // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3#ListPagesRequest. -// } -// it := c.ListPages(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp -// } -// -// Use of Context -// -// The ctx passed to NewClient is used for authentication requests and +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := cx.NewPagesClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &cxpb.ListPagesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3#ListPagesRequest. +// } +// it := c.ListPages(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewPagesClient is used for authentication requests and // for creating the underlying connection, but is not used for subsequent calls. // Individual methods on the client use the ctx given to them. // diff --git a/dialogflow/cx/apiv3/entity_types_client.go b/dialogflow/cx/apiv3/entity_types_client.go index 5f89ab5f2842..13083b423511 100644 --- a/dialogflow/cx/apiv3/entity_types_client.go +++ b/dialogflow/cx/apiv3/entity_types_client.go @@ -176,7 +176,8 @@ func (c *EntityTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *EntityTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -309,7 +310,8 @@ func NewEntityTypesClient(ctx context.Context, opts ...option.ClientOption) (*En // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *entityTypesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/entity_types_client_example_test.go b/dialogflow/cx/apiv3/entity_types_client_example_test.go index 5e9821a67b48..60936fa4af56 100644 --- a/dialogflow/cx/apiv3/entity_types_client_example_test.go +++ b/dialogflow/cx/apiv3/entity_types_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewEntityTypesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewEntityTypesClient() { func ExampleEntityTypesClient_ListEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleEntityTypesClient_ListEntityTypes() { func ExampleEntityTypesClient_GetEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleEntityTypesClient_GetEntityType() { func ExampleEntityTypesClient_CreateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleEntityTypesClient_CreateEntityType() { func ExampleEntityTypesClient_UpdateEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleEntityTypesClient_UpdateEntityType() { func ExampleEntityTypesClient_DeleteEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleEntityTypesClient_DeleteEntityType() { func ExampleEntityTypesClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleEntityTypesClient_GetLocation() { func ExampleEntityTypesClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleEntityTypesClient_ListLocations() { func ExampleEntityTypesClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleEntityTypesClient_CancelOperation() { func ExampleEntityTypesClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleEntityTypesClient_GetOperation() { func ExampleEntityTypesClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEntityTypesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/environments_client.go b/dialogflow/cx/apiv3/environments_client.go index 654d4b621469..c398b6acdd2e 100644 --- a/dialogflow/cx/apiv3/environments_client.go +++ b/dialogflow/cx/apiv3/environments_client.go @@ -240,7 +240,8 @@ func (c *EnvironmentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *EnvironmentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -261,10 +262,10 @@ func (c *EnvironmentsClient) GetEnvironment(ctx context.Context, req *cxpb.GetEn // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: Environment +// response: Environment func (c *EnvironmentsClient) CreateEnvironment(ctx context.Context, req *cxpb.CreateEnvironmentRequest, opts ...gax.CallOption) (*CreateEnvironmentOperation, error) { return c.internalClient.CreateEnvironment(ctx, req, opts...) } @@ -281,10 +282,10 @@ func (c *EnvironmentsClient) CreateEnvironmentOperation(name string) *CreateEnvi // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: Environment +// response: Environment func (c *EnvironmentsClient) UpdateEnvironment(ctx context.Context, req *cxpb.UpdateEnvironmentRequest, opts ...gax.CallOption) (*UpdateEnvironmentOperation, error) { return c.internalClient.UpdateEnvironment(ctx, req, opts...) } @@ -311,9 +312,9 @@ func (c *EnvironmentsClient) LookupEnvironmentHistory(ctx context.Context, req * // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: RunContinuousTestMetadata +// metadata: RunContinuousTestMetadata // -// response: RunContinuousTestResponse +// response: RunContinuousTestResponse func (c *EnvironmentsClient) RunContinuousTest(ctx context.Context, req *cxpb.RunContinuousTestRequest, opts ...gax.CallOption) (*RunContinuousTestOperation, error) { return c.internalClient.RunContinuousTest(ctx, req, opts...) } @@ -335,9 +336,9 @@ func (c *EnvironmentsClient) ListContinuousTestResults(ctx context.Context, req // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: DeployFlowMetadata +// metadata: DeployFlowMetadata // -// response: DeployFlowResponse +// response: DeployFlowResponse func (c *EnvironmentsClient) DeployFlow(ctx context.Context, req *cxpb.DeployFlowRequest, opts ...gax.CallOption) (*DeployFlowOperation, error) { return c.internalClient.DeployFlow(ctx, req, opts...) } @@ -455,7 +456,8 @@ func NewEnvironmentsClient(ctx context.Context, opts ...option.ClientOption) (*E // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *environmentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/environments_client_example_test.go b/dialogflow/cx/apiv3/environments_client_example_test.go index c3fa393aa348..be276ad58cd7 100644 --- a/dialogflow/cx/apiv3/environments_client_example_test.go +++ b/dialogflow/cx/apiv3/environments_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewEnvironmentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewEnvironmentsClient() { func ExampleEnvironmentsClient_ListEnvironments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleEnvironmentsClient_ListEnvironments() { func ExampleEnvironmentsClient_GetEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleEnvironmentsClient_GetEnvironment() { func ExampleEnvironmentsClient_CreateEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -111,6 +131,11 @@ func ExampleEnvironmentsClient_CreateEnvironment() { func ExampleEnvironmentsClient_UpdateEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -136,6 +161,11 @@ func ExampleEnvironmentsClient_UpdateEnvironment() { func ExampleEnvironmentsClient_DeleteEnvironment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -154,6 +184,11 @@ func ExampleEnvironmentsClient_DeleteEnvironment() { func ExampleEnvironmentsClient_LookupEnvironmentHistory() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -180,6 +215,11 @@ func ExampleEnvironmentsClient_LookupEnvironmentHistory() { func ExampleEnvironmentsClient_RunContinuousTest() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -205,6 +245,11 @@ func ExampleEnvironmentsClient_RunContinuousTest() { func ExampleEnvironmentsClient_ListContinuousTestResults() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -231,6 +276,11 @@ func ExampleEnvironmentsClient_ListContinuousTestResults() { func ExampleEnvironmentsClient_DeployFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -256,6 +306,11 @@ func ExampleEnvironmentsClient_DeployFlow() { func ExampleEnvironmentsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +331,11 @@ func ExampleEnvironmentsClient_GetLocation() { func ExampleEnvironmentsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -302,6 +362,11 @@ func ExampleEnvironmentsClient_ListLocations() { func ExampleEnvironmentsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -320,6 +385,11 @@ func ExampleEnvironmentsClient_CancelOperation() { func ExampleEnvironmentsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. @@ -340,6 +410,11 @@ func ExampleEnvironmentsClient_GetOperation() { func ExampleEnvironmentsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewEnvironmentsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/experiments_client.go b/dialogflow/cx/apiv3/experiments_client.go index 850cd3349011..b652a960a107 100644 --- a/dialogflow/cx/apiv3/experiments_client.go +++ b/dialogflow/cx/apiv3/experiments_client.go @@ -202,7 +202,8 @@ func (c *ExperimentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ExperimentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -335,7 +336,8 @@ func NewExperimentsClient(ctx context.Context, opts ...option.ClientOption) (*Ex // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *experimentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/experiments_client_example_test.go b/dialogflow/cx/apiv3/experiments_client_example_test.go index af1b34076aa8..0217b2032b79 100644 --- a/dialogflow/cx/apiv3/experiments_client_example_test.go +++ b/dialogflow/cx/apiv3/experiments_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewExperimentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewExperimentsClient() { func ExampleExperimentsClient_ListExperiments() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleExperimentsClient_ListExperiments() { func ExampleExperimentsClient_GetExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleExperimentsClient_GetExperiment() { func ExampleExperimentsClient_CreateExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleExperimentsClient_CreateExperiment() { func ExampleExperimentsClient_UpdateExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleExperimentsClient_UpdateExperiment() { func ExampleExperimentsClient_DeleteExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleExperimentsClient_DeleteExperiment() { func ExampleExperimentsClient_StartExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleExperimentsClient_StartExperiment() { func ExampleExperimentsClient_StopExperiment() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -184,6 +224,11 @@ func ExampleExperimentsClient_StopExperiment() { func ExampleExperimentsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -204,6 +249,11 @@ func ExampleExperimentsClient_GetLocation() { func ExampleExperimentsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -230,6 +280,11 @@ func ExampleExperimentsClient_ListLocations() { func ExampleExperimentsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -248,6 +303,11 @@ func ExampleExperimentsClient_CancelOperation() { func ExampleExperimentsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. @@ -268,6 +328,11 @@ func ExampleExperimentsClient_GetOperation() { func ExampleExperimentsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewExperimentsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/flows_client.go b/dialogflow/cx/apiv3/flows_client.go index 1397c066b12e..c3579638ef9a 100644 --- a/dialogflow/cx/apiv3/flows_client.go +++ b/dialogflow/cx/apiv3/flows_client.go @@ -252,7 +252,8 @@ func (c *FlowsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *FlowsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -297,11 +298,11 @@ func (c *FlowsClient) UpdateFlow(ctx context.Context, req *cxpb.UpdateFlowReques // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train a flow prior to sending it queries. See the // training @@ -335,10 +336,10 @@ func (c *FlowsClient) GetFlowValidationResult(ctx context.Context, req *cxpb.Get // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: ImportFlowResponse +// response: ImportFlowResponse // // Note: You should always train a flow prior to sending it queries. See the // training @@ -359,10 +360,10 @@ func (c *FlowsClient) ImportFlowOperation(name string) *ImportFlowOperation { // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: ExportFlowResponse +// response: ExportFlowResponse // // Note that resources (e.g. intents, entities, webhooks) that the flow // references will also be exported. @@ -483,7 +484,8 @@ func NewFlowsClient(ctx context.Context, opts ...option.ClientOption) (*FlowsCli // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *flowsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/flows_client_example_test.go b/dialogflow/cx/apiv3/flows_client_example_test.go index 9122dd90d91e..0714137061e7 100644 --- a/dialogflow/cx/apiv3/flows_client_example_test.go +++ b/dialogflow/cx/apiv3/flows_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewFlowsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewFlowsClient() { func ExampleFlowsClient_CreateFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -60,6 +70,11 @@ func ExampleFlowsClient_CreateFlow() { func ExampleFlowsClient_DeleteFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleFlowsClient_DeleteFlow() { func ExampleFlowsClient_ListFlows() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleFlowsClient_ListFlows() { func ExampleFlowsClient_GetFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleFlowsClient_GetFlow() { func ExampleFlowsClient_UpdateFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleFlowsClient_UpdateFlow() { func ExampleFlowsClient_TrainFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -167,6 +202,11 @@ func ExampleFlowsClient_TrainFlow() { func ExampleFlowsClient_ValidateFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -187,6 +227,11 @@ func ExampleFlowsClient_ValidateFlow() { func ExampleFlowsClient_GetFlowValidationResult() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -207,6 +252,11 @@ func ExampleFlowsClient_GetFlowValidationResult() { func ExampleFlowsClient_ImportFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -232,6 +282,11 @@ func ExampleFlowsClient_ImportFlow() { func ExampleFlowsClient_ExportFlow() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -257,6 +312,11 @@ func ExampleFlowsClient_ExportFlow() { func ExampleFlowsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -277,6 +337,11 @@ func ExampleFlowsClient_GetLocation() { func ExampleFlowsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -303,6 +368,11 @@ func ExampleFlowsClient_ListLocations() { func ExampleFlowsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -321,6 +391,11 @@ func ExampleFlowsClient_CancelOperation() { func ExampleFlowsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. @@ -341,6 +416,11 @@ func ExampleFlowsClient_GetOperation() { func ExampleFlowsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewFlowsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/intents_client.go b/dialogflow/cx/apiv3/intents_client.go index 74017ede9a34..7d4d6bc97d04 100644 --- a/dialogflow/cx/apiv3/intents_client.go +++ b/dialogflow/cx/apiv3/intents_client.go @@ -176,7 +176,8 @@ func (c *IntentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *IntentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -309,7 +310,8 @@ func NewIntentsClient(ctx context.Context, opts ...option.ClientOption) (*Intent // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *intentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/intents_client_example_test.go b/dialogflow/cx/apiv3/intents_client_example_test.go index a68ae662d6f6..935e4b13165f 100644 --- a/dialogflow/cx/apiv3/intents_client_example_test.go +++ b/dialogflow/cx/apiv3/intents_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewIntentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewIntentsClient() { func ExampleIntentsClient_ListIntents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleIntentsClient_ListIntents() { func ExampleIntentsClient_GetIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleIntentsClient_GetIntent() { func ExampleIntentsClient_CreateIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleIntentsClient_CreateIntent() { func ExampleIntentsClient_UpdateIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleIntentsClient_UpdateIntent() { func ExampleIntentsClient_DeleteIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleIntentsClient_DeleteIntent() { func ExampleIntentsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleIntentsClient_GetLocation() { func ExampleIntentsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleIntentsClient_ListLocations() { func ExampleIntentsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleIntentsClient_CancelOperation() { func ExampleIntentsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleIntentsClient_GetOperation() { func ExampleIntentsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewIntentsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/pages_client.go b/dialogflow/cx/apiv3/pages_client.go index 35e9b301e50c..0f146bfed2af 100644 --- a/dialogflow/cx/apiv3/pages_client.go +++ b/dialogflow/cx/apiv3/pages_client.go @@ -176,7 +176,8 @@ func (c *PagesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *PagesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -309,7 +310,8 @@ func NewPagesClient(ctx context.Context, opts ...option.ClientOption) (*PagesCli // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *pagesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/pages_client_example_test.go b/dialogflow/cx/apiv3/pages_client_example_test.go index 6ebb96ed2518..e7095d0414e5 100644 --- a/dialogflow/cx/apiv3/pages_client_example_test.go +++ b/dialogflow/cx/apiv3/pages_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewPagesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewPagesClient() { func ExamplePagesClient_ListPages() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExamplePagesClient_ListPages() { func ExamplePagesClient_GetPage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExamplePagesClient_GetPage() { func ExamplePagesClient_CreatePage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExamplePagesClient_CreatePage() { func ExamplePagesClient_UpdatePage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExamplePagesClient_UpdatePage() { func ExamplePagesClient_DeletePage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExamplePagesClient_DeletePage() { func ExamplePagesClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExamplePagesClient_GetLocation() { func ExamplePagesClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExamplePagesClient_ListLocations() { func ExamplePagesClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExamplePagesClient_CancelOperation() { func ExamplePagesClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExamplePagesClient_GetOperation() { func ExamplePagesClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewPagesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/security_settings_client.go b/dialogflow/cx/apiv3/security_settings_client.go index 5cfbe29bcf62..5bee237c1365 100644 --- a/dialogflow/cx/apiv3/security_settings_client.go +++ b/dialogflow/cx/apiv3/security_settings_client.go @@ -176,7 +176,8 @@ func (c *SecuritySettingsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SecuritySettingsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -298,7 +299,8 @@ func NewSecuritySettingsClient(ctx context.Context, opts ...option.ClientOption) // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *securitySettingsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/security_settings_client_example_test.go b/dialogflow/cx/apiv3/security_settings_client_example_test.go index 858001047605..4731cdc4598f 100644 --- a/dialogflow/cx/apiv3/security_settings_client_example_test.go +++ b/dialogflow/cx/apiv3/security_settings_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewSecuritySettingsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewSecuritySettingsClient() { func ExampleSecuritySettingsClient_CreateSecuritySettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -60,6 +70,11 @@ func ExampleSecuritySettingsClient_CreateSecuritySettings() { func ExampleSecuritySettingsClient_GetSecuritySettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -80,6 +95,11 @@ func ExampleSecuritySettingsClient_GetSecuritySettings() { func ExampleSecuritySettingsClient_UpdateSecuritySettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -100,6 +120,11 @@ func ExampleSecuritySettingsClient_UpdateSecuritySettings() { func ExampleSecuritySettingsClient_ListSecuritySettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleSecuritySettingsClient_ListSecuritySettings() { func ExampleSecuritySettingsClient_DeleteSecuritySettings() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleSecuritySettingsClient_DeleteSecuritySettings() { func ExampleSecuritySettingsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleSecuritySettingsClient_GetLocation() { func ExampleSecuritySettingsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleSecuritySettingsClient_ListLocations() { func ExampleSecuritySettingsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleSecuritySettingsClient_CancelOperation() { func ExampleSecuritySettingsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleSecuritySettingsClient_GetOperation() { func ExampleSecuritySettingsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSecuritySettingsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/session_entity_types_client.go b/dialogflow/cx/apiv3/session_entity_types_client.go index 6ca160e4b34a..96993ccf0615 100644 --- a/dialogflow/cx/apiv3/session_entity_types_client.go +++ b/dialogflow/cx/apiv3/session_entity_types_client.go @@ -176,7 +176,8 @@ func (c *SessionEntityTypesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SessionEntityTypesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -297,7 +298,8 @@ func NewSessionEntityTypesClient(ctx context.Context, opts ...option.ClientOptio // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *sessionEntityTypesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/session_entity_types_client_example_test.go b/dialogflow/cx/apiv3/session_entity_types_client_example_test.go index 40e3f2a58856..0261e381ea91 100644 --- a/dialogflow/cx/apiv3/session_entity_types_client_example_test.go +++ b/dialogflow/cx/apiv3/session_entity_types_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewSessionEntityTypesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewSessionEntityTypesClient() { func ExampleSessionEntityTypesClient_ListSessionEntityTypes() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleSessionEntityTypesClient_ListSessionEntityTypes() { func ExampleSessionEntityTypesClient_GetSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleSessionEntityTypesClient_GetSessionEntityType() { func ExampleSessionEntityTypesClient_CreateSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleSessionEntityTypesClient_CreateSessionEntityType() { func ExampleSessionEntityTypesClient_UpdateSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleSessionEntityTypesClient_UpdateSessionEntityType() { func ExampleSessionEntityTypesClient_DeleteSessionEntityType() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleSessionEntityTypesClient_DeleteSessionEntityType() { func ExampleSessionEntityTypesClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleSessionEntityTypesClient_GetLocation() { func ExampleSessionEntityTypesClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleSessionEntityTypesClient_ListLocations() { func ExampleSessionEntityTypesClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleSessionEntityTypesClient_CancelOperation() { func ExampleSessionEntityTypesClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleSessionEntityTypesClient_GetOperation() { func ExampleSessionEntityTypesClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionEntityTypesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/sessions_client.go b/dialogflow/cx/apiv3/sessions_client.go index 635ee9373a1d..b8da8cdcf646 100644 --- a/dialogflow/cx/apiv3/sessions_client.go +++ b/dialogflow/cx/apiv3/sessions_client.go @@ -155,7 +155,8 @@ func (c *SessionsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *SessionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -289,7 +290,8 @@ func NewSessionsClient(ctx context.Context, opts ...option.ClientOption) (*Sessi // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *sessionsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/sessions_client_example_test.go b/dialogflow/cx/apiv3/sessions_client_example_test.go index 5b3152f19437..38804cdbf59b 100644 --- a/dialogflow/cx/apiv3/sessions_client_example_test.go +++ b/dialogflow/cx/apiv3/sessions_client_example_test.go @@ -29,6 +29,11 @@ import ( func ExampleNewSessionsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -41,6 +46,11 @@ func ExampleNewSessionsClient() { func ExampleSessionsClient_DetectIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -61,6 +71,11 @@ func ExampleSessionsClient_DetectIntent() { func ExampleSessionsClient_StreamingDetectIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -96,6 +111,11 @@ func ExampleSessionsClient_StreamingDetectIntent() { func ExampleSessionsClient_MatchIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -116,6 +136,11 @@ func ExampleSessionsClient_MatchIntent() { func ExampleSessionsClient_FulfillIntent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -136,6 +161,11 @@ func ExampleSessionsClient_FulfillIntent() { func ExampleSessionsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +186,11 @@ func ExampleSessionsClient_GetLocation() { func ExampleSessionsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -182,6 +217,11 @@ func ExampleSessionsClient_ListLocations() { func ExampleSessionsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -200,6 +240,11 @@ func ExampleSessionsClient_CancelOperation() { func ExampleSessionsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. @@ -220,6 +265,11 @@ func ExampleSessionsClient_GetOperation() { func ExampleSessionsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewSessionsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/test_cases_client.go b/dialogflow/cx/apiv3/test_cases_client.go index a3de964d017e..34fa4d6dcc4a 100644 --- a/dialogflow/cx/apiv3/test_cases_client.go +++ b/dialogflow/cx/apiv3/test_cases_client.go @@ -279,7 +279,8 @@ func (c *TestCasesClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TestCasesClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -315,9 +316,9 @@ func (c *TestCasesClient) UpdateTestCase(ctx context.Context, req *cxpb.UpdateTe // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: RunTestCaseMetadata +// metadata: RunTestCaseMetadata // -// response: RunTestCaseResponse +// response: RunTestCaseResponse func (c *TestCasesClient) RunTestCase(ctx context.Context, req *cxpb.RunTestCaseRequest, opts ...gax.CallOption) (*RunTestCaseOperation, error) { return c.internalClient.RunTestCase(ctx, req, opts...) } @@ -334,9 +335,9 @@ func (c *TestCasesClient) RunTestCaseOperation(name string) *RunTestCaseOperatio // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: BatchRunTestCasesMetadata +// metadata: BatchRunTestCasesMetadata // -// response: BatchRunTestCasesResponse +// response: BatchRunTestCasesResponse func (c *TestCasesClient) BatchRunTestCases(ctx context.Context, req *cxpb.BatchRunTestCasesRequest, opts ...gax.CallOption) (*BatchRunTestCasesOperation, error) { return c.internalClient.BatchRunTestCases(ctx, req, opts...) } @@ -360,9 +361,9 @@ func (c *TestCasesClient) CalculateCoverage(ctx context.Context, req *cxpb.Calcu // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: ImportTestCasesMetadata +// metadata: ImportTestCasesMetadata // -// response: ImportTestCasesResponse +// response: ImportTestCasesResponse func (c *TestCasesClient) ImportTestCases(ctx context.Context, req *cxpb.ImportTestCasesRequest, opts ...gax.CallOption) (*ImportTestCasesOperation, error) { return c.internalClient.ImportTestCases(ctx, req, opts...) } @@ -380,9 +381,9 @@ func (c *TestCasesClient) ImportTestCasesOperation(name string) *ImportTestCases // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: ExportTestCasesMetadata +// metadata: ExportTestCasesMetadata // -// response: ExportTestCasesResponse +// response: ExportTestCasesResponse func (c *TestCasesClient) ExportTestCases(ctx context.Context, req *cxpb.ExportTestCasesRequest, opts ...gax.CallOption) (*ExportTestCasesOperation, error) { return c.internalClient.ExportTestCases(ctx, req, opts...) } @@ -511,7 +512,8 @@ func NewTestCasesClient(ctx context.Context, opts ...option.ClientOption) (*Test // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *testCasesGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/test_cases_client_example_test.go b/dialogflow/cx/apiv3/test_cases_client_example_test.go index 4fdc882813e1..cc2add7ad6ec 100644 --- a/dialogflow/cx/apiv3/test_cases_client_example_test.go +++ b/dialogflow/cx/apiv3/test_cases_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewTestCasesClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewTestCasesClient() { func ExampleTestCasesClient_ListTestCases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleTestCasesClient_ListTestCases() { func ExampleTestCasesClient_BatchDeleteTestCases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -84,6 +99,11 @@ func ExampleTestCasesClient_BatchDeleteTestCases() { func ExampleTestCasesClient_GetTestCase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -104,6 +124,11 @@ func ExampleTestCasesClient_GetTestCase() { func ExampleTestCasesClient_CreateTestCase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -124,6 +149,11 @@ func ExampleTestCasesClient_CreateTestCase() { func ExampleTestCasesClient_UpdateTestCase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleTestCasesClient_UpdateTestCase() { func ExampleTestCasesClient_RunTestCase() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -169,6 +204,11 @@ func ExampleTestCasesClient_RunTestCase() { func ExampleTestCasesClient_BatchRunTestCases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -194,6 +234,11 @@ func ExampleTestCasesClient_BatchRunTestCases() { func ExampleTestCasesClient_CalculateCoverage() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -214,6 +259,11 @@ func ExampleTestCasesClient_CalculateCoverage() { func ExampleTestCasesClient_ImportTestCases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -239,6 +289,11 @@ func ExampleTestCasesClient_ImportTestCases() { func ExampleTestCasesClient_ExportTestCases() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -264,6 +319,11 @@ func ExampleTestCasesClient_ExportTestCases() { func ExampleTestCasesClient_ListTestCaseResults() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -290,6 +350,11 @@ func ExampleTestCasesClient_ListTestCaseResults() { func ExampleTestCasesClient_GetTestCaseResult() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -310,6 +375,11 @@ func ExampleTestCasesClient_GetTestCaseResult() { func ExampleTestCasesClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -330,6 +400,11 @@ func ExampleTestCasesClient_GetLocation() { func ExampleTestCasesClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -356,6 +431,11 @@ func ExampleTestCasesClient_ListLocations() { func ExampleTestCasesClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -374,6 +454,11 @@ func ExampleTestCasesClient_CancelOperation() { func ExampleTestCasesClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. @@ -394,6 +479,11 @@ func ExampleTestCasesClient_GetOperation() { func ExampleTestCasesClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTestCasesClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/transition_route_groups_client.go b/dialogflow/cx/apiv3/transition_route_groups_client.go index 97cf2c572171..5d0b26584da7 100644 --- a/dialogflow/cx/apiv3/transition_route_groups_client.go +++ b/dialogflow/cx/apiv3/transition_route_groups_client.go @@ -176,7 +176,8 @@ func (c *TransitionRouteGroupsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *TransitionRouteGroupsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -309,7 +310,8 @@ func NewTransitionRouteGroupsClient(ctx context.Context, opts ...option.ClientOp // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *transitionRouteGroupsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/transition_route_groups_client_example_test.go b/dialogflow/cx/apiv3/transition_route_groups_client_example_test.go index aad214dd8998..0de7cc3efe49 100644 --- a/dialogflow/cx/apiv3/transition_route_groups_client_example_test.go +++ b/dialogflow/cx/apiv3/transition_route_groups_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewTransitionRouteGroupsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewTransitionRouteGroupsClient() { func ExampleTransitionRouteGroupsClient_ListTransitionRouteGroups() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleTransitionRouteGroupsClient_ListTransitionRouteGroups() { func ExampleTransitionRouteGroupsClient_GetTransitionRouteGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleTransitionRouteGroupsClient_GetTransitionRouteGroup() { func ExampleTransitionRouteGroupsClient_CreateTransitionRouteGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleTransitionRouteGroupsClient_CreateTransitionRouteGroup() { func ExampleTransitionRouteGroupsClient_UpdateTransitionRouteGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleTransitionRouteGroupsClient_UpdateTransitionRouteGroup() { func ExampleTransitionRouteGroupsClient_DeleteTransitionRouteGroup() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleTransitionRouteGroupsClient_DeleteTransitionRouteGroup() { func ExampleTransitionRouteGroupsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleTransitionRouteGroupsClient_GetLocation() { func ExampleTransitionRouteGroupsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleTransitionRouteGroupsClient_ListLocations() { func ExampleTransitionRouteGroupsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleTransitionRouteGroupsClient_CancelOperation() { func ExampleTransitionRouteGroupsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleTransitionRouteGroupsClient_GetOperation() { func ExampleTransitionRouteGroupsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewTransitionRouteGroupsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/versions_client.go b/dialogflow/cx/apiv3/versions_client.go index 305ddd38a9f3..3d34e983594c 100644 --- a/dialogflow/cx/apiv3/versions_client.go +++ b/dialogflow/cx/apiv3/versions_client.go @@ -212,7 +212,8 @@ func (c *VersionsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *VersionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -233,9 +234,9 @@ func (c *VersionsClient) GetVersion(ctx context.Context, req *cxpb.GetVersionReq // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: CreateVersionOperationMetadata +// metadata: CreateVersionOperationMetadata // -// response: Version +// response: Version func (c *VersionsClient) CreateVersion(ctx context.Context, req *cxpb.CreateVersionRequest, opts ...gax.CallOption) (*CreateVersionOperation, error) { return c.internalClient.CreateVersion(ctx, req, opts...) } @@ -262,11 +263,11 @@ func (c *VersionsClient) DeleteVersion(ctx context.Context, req *cxpb.DeleteVers // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) func (c *VersionsClient) LoadVersion(ctx context.Context, req *cxpb.LoadVersionRequest, opts ...gax.CallOption) (*LoadVersionOperation, error) { return c.internalClient.LoadVersion(ctx, req, opts...) } @@ -389,7 +390,8 @@ func NewVersionsClient(ctx context.Context, opts ...option.ClientOption) (*Versi // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *versionsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/versions_client_example_test.go b/dialogflow/cx/apiv3/versions_client_example_test.go index e92f2a81862d..421c7ec437b2 100644 --- a/dialogflow/cx/apiv3/versions_client_example_test.go +++ b/dialogflow/cx/apiv3/versions_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewVersionsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewVersionsClient() { func ExampleVersionsClient_ListVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleVersionsClient_ListVersions() { func ExampleVersionsClient_GetVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleVersionsClient_GetVersion() { func ExampleVersionsClient_CreateVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -111,6 +131,11 @@ func ExampleVersionsClient_CreateVersion() { func ExampleVersionsClient_UpdateVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -131,6 +156,11 @@ func ExampleVersionsClient_UpdateVersion() { func ExampleVersionsClient_DeleteVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -149,6 +179,11 @@ func ExampleVersionsClient_DeleteVersion() { func ExampleVersionsClient_LoadVersion() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -172,6 +207,11 @@ func ExampleVersionsClient_LoadVersion() { func ExampleVersionsClient_CompareVersions() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -192,6 +232,11 @@ func ExampleVersionsClient_CompareVersions() { func ExampleVersionsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -212,6 +257,11 @@ func ExampleVersionsClient_GetLocation() { func ExampleVersionsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -238,6 +288,11 @@ func ExampleVersionsClient_ListLocations() { func ExampleVersionsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -256,6 +311,11 @@ func ExampleVersionsClient_CancelOperation() { func ExampleVersionsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. @@ -276,6 +336,11 @@ func ExampleVersionsClient_GetOperation() { func ExampleVersionsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewVersionsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3/webhooks_client.go b/dialogflow/cx/apiv3/webhooks_client.go index 5197e6014905..b7bfd75e5fba 100644 --- a/dialogflow/cx/apiv3/webhooks_client.go +++ b/dialogflow/cx/apiv3/webhooks_client.go @@ -176,7 +176,8 @@ func (c *WebhooksClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *WebhooksClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -297,7 +298,8 @@ func NewWebhooksClient(ctx context.Context, opts ...option.ClientOption) (*Webho // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *webhooksGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } diff --git a/dialogflow/cx/apiv3/webhooks_client_example_test.go b/dialogflow/cx/apiv3/webhooks_client_example_test.go index 22d5d46f2853..501233e158aa 100644 --- a/dialogflow/cx/apiv3/webhooks_client_example_test.go +++ b/dialogflow/cx/apiv3/webhooks_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewWebhooksClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewWebhooksClient() { func ExampleWebhooksClient_ListWebhooks() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -66,6 +76,11 @@ func ExampleWebhooksClient_ListWebhooks() { func ExampleWebhooksClient_GetWebhook() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -86,6 +101,11 @@ func ExampleWebhooksClient_GetWebhook() { func ExampleWebhooksClient_CreateWebhook() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -106,6 +126,11 @@ func ExampleWebhooksClient_CreateWebhook() { func ExampleWebhooksClient_UpdateWebhook() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -126,6 +151,11 @@ func ExampleWebhooksClient_UpdateWebhook() { func ExampleWebhooksClient_DeleteWebhook() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleWebhooksClient_DeleteWebhook() { func ExampleWebhooksClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -164,6 +199,11 @@ func ExampleWebhooksClient_GetLocation() { func ExampleWebhooksClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -190,6 +230,11 @@ func ExampleWebhooksClient_ListLocations() { func ExampleWebhooksClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -208,6 +253,11 @@ func ExampleWebhooksClient_CancelOperation() { func ExampleWebhooksClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. @@ -228,6 +278,11 @@ func ExampleWebhooksClient_GetOperation() { func ExampleWebhooksClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewWebhooksClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3beta1/agents_client.go b/dialogflow/cx/apiv3beta1/agents_client.go index aacd2a56d24d..1f20e4cbe5d1 100644 --- a/dialogflow/cx/apiv3beta1/agents_client.go +++ b/dialogflow/cx/apiv3beta1/agents_client.go @@ -344,7 +344,8 @@ func (c *AgentsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *AgentsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -388,10 +389,10 @@ func (c *AgentsClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgentReq // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: ExportAgentResponse +// response: ExportAgentResponse func (c *AgentsClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { return c.internalClient.ExportAgent(ctx, req, opts...) } @@ -411,11 +412,11 @@ func (c *AgentsClient) ExportAgentOperation(name string) *ExportAgentOperation { // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train a flow prior to sending it queries. See the // training @@ -550,7 +551,8 @@ func NewAgentsClient(ctx context.Context, opts ...option.ClientOption) (*AgentsC // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *agentsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -649,7 +651,7 @@ func (c *agentsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *agentsRESTClient) Connection() *grpc.ClientConn { return nil } @@ -1235,8 +1237,12 @@ func (c *agentsRESTClient) UpdateAgent(ctx context.Context, req *cxpb.UpdateAgen baseUrl.Path += fmt.Sprintf("/v3beta1/%v", req.GetAgent().GetName()) params := url.Values{} - if req.GetUpdateMask().GetPaths() != nil { - params.Add("updateMask.paths", fmt.Sprintf("%v", req.GetUpdateMask().GetPaths())) + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask)) } baseUrl.RawQuery = params.Encode() @@ -1327,10 +1333,10 @@ func (c *agentsRESTClient) DeleteAgent(ctx context.Context, req *cxpb.DeleteAgen // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: ExportAgentResponse +// response: ExportAgentResponse func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgentRequest, opts ...gax.CallOption) (*ExportAgentOperation, error) { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -1402,11 +1408,11 @@ func (c *agentsRESTClient) ExportAgent(ctx context.Context, req *cxpb.ExportAgen // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: An empty Struct -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) +// metadata: An empty Struct +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) // -// response: An Empty -// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) +// response: An Empty +// message (at https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) // // Note: You should always train a flow prior to sending it queries. See the // training diff --git a/dialogflow/cx/apiv3beta1/agents_client_example_test.go b/dialogflow/cx/apiv3beta1/agents_client_example_test.go index aa910a6f3c61..23b39fcd377d 100644 --- a/dialogflow/cx/apiv3beta1/agents_client_example_test.go +++ b/dialogflow/cx/apiv3beta1/agents_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewAgentsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewAgentsClient() { func ExampleNewAgentsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -52,6 +62,11 @@ func ExampleNewAgentsRESTClient() { func ExampleAgentsClient_ListAgents() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleAgentsClient_ListAgents() { func ExampleAgentsClient_GetAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +118,11 @@ func ExampleAgentsClient_GetAgent() { func ExampleAgentsClient_CreateAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -118,6 +143,11 @@ func ExampleAgentsClient_CreateAgent() { func ExampleAgentsClient_UpdateAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -138,6 +168,11 @@ func ExampleAgentsClient_UpdateAgent() { func ExampleAgentsClient_DeleteAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -156,6 +191,11 @@ func ExampleAgentsClient_DeleteAgent() { func ExampleAgentsClient_ExportAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -181,6 +221,11 @@ func ExampleAgentsClient_ExportAgent() { func ExampleAgentsClient_RestoreAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -204,6 +249,11 @@ func ExampleAgentsClient_RestoreAgent() { func ExampleAgentsClient_ValidateAgent() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -224,6 +274,11 @@ func ExampleAgentsClient_ValidateAgent() { func ExampleAgentsClient_GetAgentValidationResult() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -244,6 +299,11 @@ func ExampleAgentsClient_GetAgentValidationResult() { func ExampleAgentsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -264,6 +324,11 @@ func ExampleAgentsClient_GetLocation() { func ExampleAgentsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -290,6 +355,11 @@ func ExampleAgentsClient_ListLocations() { func ExampleAgentsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -308,6 +378,11 @@ func ExampleAgentsClient_CancelOperation() { func ExampleAgentsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. @@ -328,6 +403,11 @@ func ExampleAgentsClient_GetOperation() { func ExampleAgentsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewAgentsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3beta1/changelogs_client.go b/dialogflow/cx/apiv3beta1/changelogs_client.go index 4aff825e6af2..dd5cfbcd7d33 100644 --- a/dialogflow/cx/apiv3beta1/changelogs_client.go +++ b/dialogflow/cx/apiv3beta1/changelogs_client.go @@ -172,7 +172,8 @@ func (c *ChangelogsClient) setGoogleClientInfo(keyval ...string) { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *ChangelogsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } @@ -278,7 +279,8 @@ func NewChangelogsClient(ctx context.Context, opts ...option.ClientOption) (*Cha // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. func (c *changelogsGRPCClient) Connection() *grpc.ClientConn { return c.connPool.Conn() } @@ -362,7 +364,7 @@ func (c *changelogsRESTClient) Close() error { // Connection returns a connection to the API service. // -// Deprecated. +// Deprecated: This method always returns nil. func (c *changelogsRESTClient) Connection() *grpc.ClientConn { return nil } diff --git a/dialogflow/cx/apiv3beta1/changelogs_client_example_test.go b/dialogflow/cx/apiv3beta1/changelogs_client_example_test.go index e04eb4790908..c5100ec1e20c 100644 --- a/dialogflow/cx/apiv3beta1/changelogs_client_example_test.go +++ b/dialogflow/cx/apiv3beta1/changelogs_client_example_test.go @@ -28,6 +28,11 @@ import ( func ExampleNewChangelogsClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -40,6 +45,11 @@ func ExampleNewChangelogsClient() { func ExampleNewChangelogsRESTClient() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsRESTClient(ctx) if err != nil { // TODO: Handle error. @@ -52,6 +62,11 @@ func ExampleNewChangelogsRESTClient() { func ExampleChangelogsClient_ListChangelogs() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -78,6 +93,11 @@ func ExampleChangelogsClient_ListChangelogs() { func ExampleChangelogsClient_GetChangelog() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -98,6 +118,11 @@ func ExampleChangelogsClient_GetChangelog() { func ExampleChangelogsClient_GetLocation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -118,6 +143,11 @@ func ExampleChangelogsClient_GetLocation() { func ExampleChangelogsClient_ListLocations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -144,6 +174,11 @@ func ExampleChangelogsClient_ListLocations() { func ExampleChangelogsClient_CancelOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -162,6 +197,11 @@ func ExampleChangelogsClient_CancelOperation() { func ExampleChangelogsClient_GetOperation() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. @@ -182,6 +222,11 @@ func ExampleChangelogsClient_GetOperation() { func ExampleChangelogsClient_ListOperations() { ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := cx.NewChangelogsClient(ctx) if err != nil { // TODO: Handle error. diff --git a/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go b/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go new file mode 100644 index 000000000000..b417d9bacf47 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/advanced_settings.pb.go @@ -0,0 +1,277 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto + +package cxpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. +// Settings exposed at lower level overrides the settings exposed at higher +// level. Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides the +// playback_interruption_settings at the agent level, leaving other settings +// at the agent level unchanged. +// +// DTMF settings does not override each other. DTMF settings set at different +// levels define DTMF detections running in parallel. +// +// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. +type AdvancedSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Settings for logging. + // Settings for Dialogflow History, Contact Center messages, StackDriver logs, + // and speech logging. + // Exposed at the following levels: + // - Agent level. + LoggingSettings *AdvancedSettings_LoggingSettings `protobuf:"bytes,6,opt,name=logging_settings,json=loggingSettings,proto3" json:"logging_settings,omitempty"` +} + +func (x *AdvancedSettings) Reset() { + *x = AdvancedSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdvancedSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdvancedSettings) ProtoMessage() {} + +func (x *AdvancedSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdvancedSettings.ProtoReflect.Descriptor instead. +func (*AdvancedSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescGZIP(), []int{0} +} + +func (x *AdvancedSettings) GetLoggingSettings() *AdvancedSettings_LoggingSettings { + if x != nil { + return x.LoggingSettings + } + return nil +} + +// Define behaviors on logging. +type AdvancedSettings_LoggingSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, StackDriver logging is currently enabled. + EnableStackdriverLogging bool `protobuf:"varint,2,opt,name=enable_stackdriver_logging,json=enableStackdriverLogging,proto3" json:"enable_stackdriver_logging,omitempty"` + // If true, DF Interaction logging is currently enabled. + EnableInteractionLogging bool `protobuf:"varint,3,opt,name=enable_interaction_logging,json=enableInteractionLogging,proto3" json:"enable_interaction_logging,omitempty"` +} + +func (x *AdvancedSettings_LoggingSettings) Reset() { + *x = AdvancedSettings_LoggingSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdvancedSettings_LoggingSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdvancedSettings_LoggingSettings) ProtoMessage() {} + +func (x *AdvancedSettings_LoggingSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdvancedSettings_LoggingSettings.ProtoReflect.Descriptor instead. +func (*AdvancedSettings_LoggingSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AdvancedSettings_LoggingSettings) GetEnableStackdriverLogging() bool { + if x != nil { + return x.EnableStackdriverLogging + } + return false +} + +func (x *AdvancedSettings_LoggingSettings) GetEnableInteractionLogging() bool { + if x != nil { + return x.EnableInteractionLogging + } + return false +} + +var File_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x22, 0x93, 0x02, 0x0a, 0x10, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x6f, 0x0a, 0x10, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x8d, 0x01, 0x0a, 0x0f, 0x4c, 0x6f, 0x67, 0x67, 0x69, + 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0xdd, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x42, 0x15, 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, + 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, + 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_goTypes = []interface{}{ + (*AdvancedSettings)(nil), // 0: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + (*AdvancedSettings_LoggingSettings)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings +} +var file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_depIdxs = []int32{ + 1, // 0: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.logging_settings:type_name -> google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdvancedSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdvancedSettings_LoggingSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_depIdxs = nil +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go b/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go new file mode 100644 index 000000000000..bce6291a7888 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/agent.pb.go @@ -0,0 +1,2307 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/agent.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Data format of the exported agent. +type ExportAgentRequest_DataFormat int32 + +const ( + // Unspecified format. + ExportAgentRequest_DATA_FORMAT_UNSPECIFIED ExportAgentRequest_DataFormat = 0 + // Agent content will be exported as raw bytes. + ExportAgentRequest_BLOB ExportAgentRequest_DataFormat = 1 +) + +// Enum value maps for ExportAgentRequest_DataFormat. +var ( + ExportAgentRequest_DataFormat_name = map[int32]string{ + 0: "DATA_FORMAT_UNSPECIFIED", + 1: "BLOB", + } + ExportAgentRequest_DataFormat_value = map[string]int32{ + "DATA_FORMAT_UNSPECIFIED": 0, + "BLOB": 1, + } +) + +func (x ExportAgentRequest_DataFormat) Enum() *ExportAgentRequest_DataFormat { + p := new(ExportAgentRequest_DataFormat) + *p = x + return p +} + +func (x ExportAgentRequest_DataFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExportAgentRequest_DataFormat) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_enumTypes[0].Descriptor() +} + +func (ExportAgentRequest_DataFormat) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_enumTypes[0] +} + +func (x ExportAgentRequest_DataFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExportAgentRequest_DataFormat.Descriptor instead. +func (ExportAgentRequest_DataFormat) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{8, 0} +} + +// Restore option. +type RestoreAgentRequest_RestoreOption int32 + +const ( + // Unspecified. Treated as KEEP. + RestoreAgentRequest_RESTORE_OPTION_UNSPECIFIED RestoreAgentRequest_RestoreOption = 0 + // Always respect the settings from the exported agent file. It may cause + // a restoration failure if some settings (e.g. model type) are not + // supported in the target agent. + RestoreAgentRequest_KEEP RestoreAgentRequest_RestoreOption = 1 + // Fallback to default settings if some settings are not supported in the + // target agent. + RestoreAgentRequest_FALLBACK RestoreAgentRequest_RestoreOption = 2 +) + +// Enum value maps for RestoreAgentRequest_RestoreOption. +var ( + RestoreAgentRequest_RestoreOption_name = map[int32]string{ + 0: "RESTORE_OPTION_UNSPECIFIED", + 1: "KEEP", + 2: "FALLBACK", + } + RestoreAgentRequest_RestoreOption_value = map[string]int32{ + "RESTORE_OPTION_UNSPECIFIED": 0, + "KEEP": 1, + "FALLBACK": 2, + } +) + +func (x RestoreAgentRequest_RestoreOption) Enum() *RestoreAgentRequest_RestoreOption { + p := new(RestoreAgentRequest_RestoreOption) + *p = x + return p +} + +func (x RestoreAgentRequest_RestoreOption) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RestoreAgentRequest_RestoreOption) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_enumTypes[1].Descriptor() +} + +func (RestoreAgentRequest_RestoreOption) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_enumTypes[1] +} + +func (x RestoreAgentRequest_RestoreOption) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RestoreAgentRequest_RestoreOption.Descriptor instead. +func (RestoreAgentRequest_RestoreOption) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{10, 0} +} + +// Settings related to speech recognition. +type SpeechToTextSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether to use speech adaptation for speech recognition. + EnableSpeechAdaptation bool `protobuf:"varint,1,opt,name=enable_speech_adaptation,json=enableSpeechAdaptation,proto3" json:"enable_speech_adaptation,omitempty"` +} + +func (x *SpeechToTextSettings) Reset() { + *x = SpeechToTextSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpeechToTextSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpeechToTextSettings) ProtoMessage() {} + +func (x *SpeechToTextSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpeechToTextSettings.ProtoReflect.Descriptor instead. +func (*SpeechToTextSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{0} +} + +func (x *SpeechToTextSettings) GetEnableSpeechAdaptation() bool { + if x != nil { + return x.EnableSpeechAdaptation + } + return false +} + +// Agents are best described as Natural Language Understanding (NLU) modules +// that transform user requests into actionable data. You can include agents +// in your app, product, or service to determine user intent and respond to the +// user in a natural way. +// +// After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3beta1.Intent], +// [Entity Types][google.cloud.dialogflow.cx.v3beta1.EntityType], [Flows][google.cloud.dialogflow.cx.v3beta1.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3beta1.Fulfillment], +// [Webhooks][google.cloud.dialogflow.cx.v3beta1.Webhook], and so on to manage the conversation flows.. +type Agent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the agent. + // Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent] + // populates the name automatically. + // Format: `projects//locations//agents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the agent, unique within the location. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Immutable. The default language of the agent as a language tag. + // See [Language + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // for a list of the currently supported language codes. + // This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method. + DefaultLanguageCode string `protobuf:"bytes,3,opt,name=default_language_code,json=defaultLanguageCode,proto3" json:"default_language_code,omitempty"` + // The list of all languages supported by the agent (except for the + // `default_language_code`). + SupportedLanguageCodes []string `protobuf:"bytes,4,rep,name=supported_language_codes,json=supportedLanguageCodes,proto3" json:"supported_language_codes,omitempty"` + // Required. The time zone of the agent from the [time zone + // database](https://www.iana.org/time-zones), e.g., America/New_York, + // Europe/Paris. + TimeZone string `protobuf:"bytes,5,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"` + // The description of the agent. The maximum length is 500 characters. If + // exceeded, the request is rejected. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + // The URI of the agent's avatar. Avatars are used throughout the Dialogflow + // console and in the self-hosted [Web + // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) + // integration. + AvatarUri string `protobuf:"bytes,7,opt,name=avatar_uri,json=avatarUri,proto3" json:"avatar_uri,omitempty"` + // Speech recognition related settings. + SpeechToTextSettings *SpeechToTextSettings `protobuf:"bytes,13,opt,name=speech_to_text_settings,json=speechToTextSettings,proto3" json:"speech_to_text_settings,omitempty"` + // Immutable. Name of the start flow in this agent. A start flow will be automatically + // created when the agent is created, and can only be deleted by deleting the + // agent. + // Format: `projects//locations//agents//flows/`. + StartFlow string `protobuf:"bytes,16,opt,name=start_flow,json=startFlow,proto3" json:"start_flow,omitempty"` + // Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] reference for the agent. + // Format: `projects//locations//securitySettings/`. + SecuritySettings string `protobuf:"bytes,17,opt,name=security_settings,json=securitySettings,proto3" json:"security_settings,omitempty"` + // Indicates if stackdriver logging is enabled for the agent. + // Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings] + // instead. + // + // Deprecated: Do not use. + EnableStackdriverLogging bool `protobuf:"varint,18,opt,name=enable_stackdriver_logging,json=enableStackdriverLogging,proto3" json:"enable_stackdriver_logging,omitempty"` + // Indicates if automatic spell correction is enabled in detect intent + // requests. + EnableSpellCorrection bool `protobuf:"varint,20,opt,name=enable_spell_correction,json=enableSpellCorrection,proto3" json:"enable_spell_correction,omitempty"` + // Indicates whether the agent is locked for changes. If the agent is locked, + // modifications to the agent will be rejected except for [RestoreAgent][]. + Locked bool `protobuf:"varint,27,opt,name=locked,proto3" json:"locked,omitempty"` + // Hierarchical advanced settings for this agent. The settings exposed at the + // lower level overrides the settings exposed at the higher level. + AdvancedSettings *AdvancedSettings `protobuf:"bytes,22,opt,name=advanced_settings,json=advancedSettings,proto3" json:"advanced_settings,omitempty"` +} + +func (x *Agent) Reset() { + *x = Agent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Agent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Agent) ProtoMessage() {} + +func (x *Agent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Agent.ProtoReflect.Descriptor instead. +func (*Agent) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{1} +} + +func (x *Agent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Agent) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Agent) GetDefaultLanguageCode() string { + if x != nil { + return x.DefaultLanguageCode + } + return "" +} + +func (x *Agent) GetSupportedLanguageCodes() []string { + if x != nil { + return x.SupportedLanguageCodes + } + return nil +} + +func (x *Agent) GetTimeZone() string { + if x != nil { + return x.TimeZone + } + return "" +} + +func (x *Agent) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Agent) GetAvatarUri() string { + if x != nil { + return x.AvatarUri + } + return "" +} + +func (x *Agent) GetSpeechToTextSettings() *SpeechToTextSettings { + if x != nil { + return x.SpeechToTextSettings + } + return nil +} + +func (x *Agent) GetStartFlow() string { + if x != nil { + return x.StartFlow + } + return "" +} + +func (x *Agent) GetSecuritySettings() string { + if x != nil { + return x.SecuritySettings + } + return "" +} + +// Deprecated: Do not use. +func (x *Agent) GetEnableStackdriverLogging() bool { + if x != nil { + return x.EnableStackdriverLogging + } + return false +} + +func (x *Agent) GetEnableSpellCorrection() bool { + if x != nil { + return x.EnableSpellCorrection + } + return false +} + +func (x *Agent) GetLocked() bool { + if x != nil { + return x.Locked + } + return false +} + +func (x *Agent) GetAdvancedSettings() *AdvancedSettings { + if x != nil { + return x.AdvancedSettings + } + return nil +} + +// The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. +type ListAgentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location to list all agents for. + // Format: `projects//locations/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListAgentsRequest) Reset() { + *x = ListAgentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAgentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAgentsRequest) ProtoMessage() {} + +func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAgentsRequest.ProtoReflect.Descriptor instead. +func (*ListAgentsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAgentsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListAgentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAgentsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents]. +type ListAgentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of agents. There will be a maximum number of items returned based + // on the page_size field in the request. + Agents []*Agent `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAgentsResponse) Reset() { + *x = ListAgentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAgentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAgentsResponse) ProtoMessage() {} + +func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAgentsResponse.ProtoReflect.Descriptor instead. +func (*ListAgentsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAgentsResponse) GetAgents() []*Agent { + if x != nil { + return x.Agents + } + return nil +} + +func (x *ListAgentsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent]. +type GetAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the agent. + // Format: `projects//locations//agents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetAgentRequest) Reset() { + *x = GetAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAgentRequest) ProtoMessage() {} + +func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAgentRequest.ProtoReflect.Descriptor instead. +func (*GetAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{4} +} + +func (x *GetAgentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent]. +type CreateAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location to create a agent for. + // Format: `projects//locations/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The agent to create. + Agent *Agent `protobuf:"bytes,2,opt,name=agent,proto3" json:"agent,omitempty"` +} + +func (x *CreateAgentRequest) Reset() { + *x = CreateAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAgentRequest) ProtoMessage() {} + +func (x *CreateAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAgentRequest.ProtoReflect.Descriptor instead. +func (*CreateAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateAgentRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateAgentRequest) GetAgent() *Agent { + if x != nil { + return x.Agent + } + return nil +} + +// The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent]. +type UpdateAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to update. + Agent *Agent `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent,omitempty"` + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateAgentRequest) Reset() { + *x = UpdateAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAgentRequest) ProtoMessage() {} + +func (x *UpdateAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAgentRequest.ProtoReflect.Descriptor instead. +func (*UpdateAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateAgentRequest) GetAgent() *Agent { + if x != nil { + return x.Agent + } + return nil +} + +func (x *UpdateAgentRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent]. +type DeleteAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the agent to delete. + // Format: `projects//locations//agents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteAgentRequest) Reset() { + *x = DeleteAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAgentRequest) ProtoMessage() {} + +func (x *DeleteAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAgentRequest.ProtoReflect.Descriptor instead. +func (*DeleteAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteAgentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. +type ExportAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the agent to export. + // Format: `projects//locations//agents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to + // export the agent to. The format of this URI must be + // `gs:///`. + // If left unspecified, the serialized agent is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + AgentUri string `protobuf:"bytes,2,opt,name=agent_uri,json=agentUri,proto3" json:"agent_uri,omitempty"` + // Optional. The data format of the exported agent. If not specified, `BLOB` is assumed. + DataFormat ExportAgentRequest_DataFormat `protobuf:"varint,3,opt,name=data_format,json=dataFormat,proto3,enum=google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest_DataFormat" json:"data_format,omitempty"` + // Optional. Environment name. If not set, draft environment is assumed. + // Format: `projects//locations//agents//environments/`. + Environment string `protobuf:"bytes,5,opt,name=environment,proto3" json:"environment,omitempty"` +} + +func (x *ExportAgentRequest) Reset() { + *x = ExportAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportAgentRequest) ProtoMessage() {} + +func (x *ExportAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportAgentRequest.ProtoReflect.Descriptor instead. +func (*ExportAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{8} +} + +func (x *ExportAgentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportAgentRequest) GetAgentUri() string { + if x != nil { + return x.AgentUri + } + return "" +} + +func (x *ExportAgentRequest) GetDataFormat() ExportAgentRequest_DataFormat { + if x != nil { + return x.DataFormat + } + return ExportAgentRequest_DATA_FORMAT_UNSPECIFIED +} + +func (x *ExportAgentRequest) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +// The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent]. +type ExportAgentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The exported agent. + // + // Types that are assignable to Agent: + // + // *ExportAgentResponse_AgentUri + // *ExportAgentResponse_AgentContent + Agent isExportAgentResponse_Agent `protobuf_oneof:"agent"` +} + +func (x *ExportAgentResponse) Reset() { + *x = ExportAgentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportAgentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportAgentResponse) ProtoMessage() {} + +func (x *ExportAgentResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportAgentResponse.ProtoReflect.Descriptor instead. +func (*ExportAgentResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{9} +} + +func (m *ExportAgentResponse) GetAgent() isExportAgentResponse_Agent { + if m != nil { + return m.Agent + } + return nil +} + +func (x *ExportAgentResponse) GetAgentUri() string { + if x, ok := x.GetAgent().(*ExportAgentResponse_AgentUri); ok { + return x.AgentUri + } + return "" +} + +func (x *ExportAgentResponse) GetAgentContent() []byte { + if x, ok := x.GetAgent().(*ExportAgentResponse_AgentContent); ok { + return x.AgentContent + } + return nil +} + +type isExportAgentResponse_Agent interface { + isExportAgentResponse_Agent() +} + +type ExportAgentResponse_AgentUri struct { + // The URI to a file containing the exported agent. This field is populated + // only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest]. + AgentUri string `protobuf:"bytes,1,opt,name=agent_uri,json=agentUri,proto3,oneof"` +} + +type ExportAgentResponse_AgentContent struct { + // Uncompressed raw byte content for agent. + AgentContent []byte `protobuf:"bytes,2,opt,name=agent_content,json=agentContent,proto3,oneof"` +} + +func (*ExportAgentResponse_AgentUri) isExportAgentResponse_Agent() {} + +func (*ExportAgentResponse_AgentContent) isExportAgentResponse_Agent() {} + +// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent]. +type RestoreAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the agent to restore into. + // Format: `projects//locations//agents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The agent to restore. + // + // Types that are assignable to Agent: + // + // *RestoreAgentRequest_AgentUri + // *RestoreAgentRequest_AgentContent + Agent isRestoreAgentRequest_Agent `protobuf_oneof:"agent"` + // Agent restore mode. If not specified, `KEEP` is assumed. + RestoreOption RestoreAgentRequest_RestoreOption `protobuf:"varint,5,opt,name=restore_option,json=restoreOption,proto3,enum=google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest_RestoreOption" json:"restore_option,omitempty"` +} + +func (x *RestoreAgentRequest) Reset() { + *x = RestoreAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreAgentRequest) ProtoMessage() {} + +func (x *RestoreAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreAgentRequest.ProtoReflect.Descriptor instead. +func (*RestoreAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{10} +} + +func (x *RestoreAgentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *RestoreAgentRequest) GetAgent() isRestoreAgentRequest_Agent { + if m != nil { + return m.Agent + } + return nil +} + +func (x *RestoreAgentRequest) GetAgentUri() string { + if x, ok := x.GetAgent().(*RestoreAgentRequest_AgentUri); ok { + return x.AgentUri + } + return "" +} + +func (x *RestoreAgentRequest) GetAgentContent() []byte { + if x, ok := x.GetAgent().(*RestoreAgentRequest_AgentContent); ok { + return x.AgentContent + } + return nil +} + +func (x *RestoreAgentRequest) GetRestoreOption() RestoreAgentRequest_RestoreOption { + if x != nil { + return x.RestoreOption + } + return RestoreAgentRequest_RESTORE_OPTION_UNSPECIFIED +} + +type isRestoreAgentRequest_Agent interface { + isRestoreAgentRequest_Agent() +} + +type RestoreAgentRequest_AgentUri struct { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to restore agent from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + AgentUri string `protobuf:"bytes,2,opt,name=agent_uri,json=agentUri,proto3,oneof"` +} + +type RestoreAgentRequest_AgentContent struct { + // Uncompressed raw byte content for agent. + AgentContent []byte `protobuf:"bytes,3,opt,name=agent_content,json=agentContent,proto3,oneof"` +} + +func (*RestoreAgentRequest_AgentUri) isRestoreAgentRequest_Agent() {} + +func (*RestoreAgentRequest_AgentContent) isRestoreAgentRequest_Agent() {} + +// The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent]. +type ValidateAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to validate. + // Format: `projects//locations//agents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If not specified, the agent's default language is used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *ValidateAgentRequest) Reset() { + *x = ValidateAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateAgentRequest) ProtoMessage() {} + +func (x *ValidateAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateAgentRequest.ProtoReflect.Descriptor instead. +func (*ValidateAgentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{11} +} + +func (x *ValidateAgentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ValidateAgentRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult]. +type GetAgentValidationResultRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent name. + // Format: `projects//locations//agents//validationResult`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If not specified, the agent's default language is used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetAgentValidationResultRequest) Reset() { + *x = GetAgentValidationResultRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAgentValidationResultRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAgentValidationResultRequest) ProtoMessage() {} + +func (x *GetAgentValidationResultRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAgentValidationResultRequest.ProtoReflect.Descriptor instead. +func (*GetAgentValidationResultRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{12} +} + +func (x *GetAgentValidationResultRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetAgentValidationResultRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult]. +type AgentValidationResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the agent validation result. + // Format: `projects//locations//agents//validationResult`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Contains all flow validation results. + FlowValidationResults []*FlowValidationResult `protobuf:"bytes,2,rep,name=flow_validation_results,json=flowValidationResults,proto3" json:"flow_validation_results,omitempty"` +} + +func (x *AgentValidationResult) Reset() { + *x = AgentValidationResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AgentValidationResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentValidationResult) ProtoMessage() {} + +func (x *AgentValidationResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentValidationResult.ProtoReflect.Descriptor instead. +func (*AgentValidationResult) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP(), []int{13} +} + +func (x *AgentValidationResult) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AgentValidationResult) GetFlowValidationResults() []*FlowValidationResult { + if x != nil { + return x.FlowValidationResults + } + return nil +} + +var File_google_cloud_dialogflow_cx_v3beta1_agent_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x64, 0x76, 0x61, + 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, 0x0a, 0x14, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, + 0x54, 0x6f, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, + 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x5f, + 0x61, 0x64, 0x61, 0x70, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x41, 0x64, + 0x61, 0x70, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x85, 0x07, 0x0a, 0x05, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, + 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, + 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x74, 0x69, + 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x69, 0x12, 0x6f, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x65, 0x63, + 0x68, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x70, + 0x65, 0x65, 0x63, 0x68, 0x54, 0x6f, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x14, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x54, 0x6f, 0x54, 0x65, 0x78, 0x74, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, + 0x05, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x12, + 0x5c, 0x0a, 0x11, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xfa, 0x41, 0x2c, 0x0a, + 0x2a, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x0a, + 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x64, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x63, 0x6b, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, + 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x6c, 0x6c, 0x5f, + 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x70, 0x65, 0x6c, 0x6c, 0x43, 0x6f, 0x72, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, + 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, + 0x61, 0x0a, 0x11, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x41, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x52, 0x10, 0x61, 0x64, 0x76, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x3a, 0x5c, 0xea, 0x41, 0x59, 0x0a, 0x1f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, + 0x22, 0x90, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x12, 0x1f, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x7f, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4e, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x21, 0x12, 0x1f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x05, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, + 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x51, 0x0a, 0x12, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xe2, 0x02, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, 0x67, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4f, + 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x01, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, + 0x33, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1b, 0x0a, + 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4c, + 0x4f, 0x42, 0x10, 0x01, 0x22, 0x64, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x42, 0x07, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0xd8, 0x02, 0x0a, 0x13, 0x52, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x69, 0x12, 0x25, + 0x0a, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x6c, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x47, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, + 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x45, 0x45, 0x50, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x78, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, + 0x93, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x37, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x31, 0x0a, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x9c, 0x02, 0x0a, 0x15, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x70, 0x0a, 0x17, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x15, + 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x7d, 0xea, 0x41, 0x7a, 0x0a, 0x2f, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x47, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x32, 0x91, 0x0f, 0x0a, 0x06, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0xbd, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0xaa, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xbf, 0x01, 0x0a, + 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x22, + 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x2f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0xda, + 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0xca, + 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x32, 0x35, 0x2f, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0xda, 0x41, 0x11, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2c, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0x9d, 0x01, 0x0a, 0x0b, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xd7, 0x01, 0x0a, 0x0b, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x71, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x36, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x2d, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0xdc, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x74, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, + 0x01, 0x2a, 0xca, 0x41, 0x2f, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x16, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x12, 0xc9, 0x01, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x43, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3d, 0x22, 0x38, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, + 0x12, 0xeb, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x43, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, 0x40, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x78, + 0xca, 0x41, 0x19, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0xd2, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, + 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_cloud_dialogflow_cx_v3beta1_agent_proto_goTypes = []interface{}{ + (ExportAgentRequest_DataFormat)(0), // 0: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat + (RestoreAgentRequest_RestoreOption)(0), // 1: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption + (*SpeechToTextSettings)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + (*Agent)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.Agent + (*ListAgentsRequest)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + (*GetAgentRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + (*CreateAgentRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + (*UpdateAgentRequest)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + (*DeleteAgentRequest)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + (*ExportAgentRequest)(nil), // 10: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + (*ExportAgentResponse)(nil), // 11: google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse + (*RestoreAgentRequest)(nil), // 12: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + (*ValidateAgentRequest)(nil), // 13: google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + (*GetAgentValidationResultRequest)(nil), // 14: google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + (*AgentValidationResult)(nil), // 15: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + (*AdvancedSettings)(nil), // 16: google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + (*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask + (*FlowValidationResult)(nil), // 18: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + (*emptypb.Empty)(nil), // 19: google.protobuf.Empty + (*longrunning.Operation)(nil), // 20: google.longrunning.Operation +} +var file_google_cloud_dialogflow_cx_v3beta1_agent_proto_depIdxs = []int32{ + 2, // 0: google.cloud.dialogflow.cx.v3beta1.Agent.speech_to_text_settings:type_name -> google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings + 16, // 1: google.cloud.dialogflow.cx.v3beta1.Agent.advanced_settings:type_name -> google.cloud.dialogflow.cx.v3beta1.AdvancedSettings + 3, // 2: google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse.agents:type_name -> google.cloud.dialogflow.cx.v3beta1.Agent + 3, // 3: google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest.agent:type_name -> google.cloud.dialogflow.cx.v3beta1.Agent + 3, // 4: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.agent:type_name -> google.cloud.dialogflow.cx.v3beta1.Agent + 17, // 5: google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 6: google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.data_format:type_name -> google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest.DataFormat + 1, // 7: google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.restore_option:type_name -> google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest.RestoreOption + 18, // 8: google.cloud.dialogflow.cx.v3beta1.AgentValidationResult.flow_validation_results:type_name -> google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + 4, // 9: google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents:input_type -> google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest + 6, // 10: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.GetAgentRequest + 7, // 11: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateAgentRequest + 8, // 12: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateAgentRequest + 9, // 13: google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteAgentRequest + 10, // 14: google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.ExportAgentRequest + 12, // 15: google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest + 13, // 16: google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent:input_type -> google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest + 14, // 17: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult:input_type -> google.cloud.dialogflow.cx.v3beta1.GetAgentValidationResultRequest + 5, // 18: google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents:output_type -> google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse + 3, // 19: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgent:output_type -> google.cloud.dialogflow.cx.v3beta1.Agent + 3, // 20: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent:output_type -> google.cloud.dialogflow.cx.v3beta1.Agent + 3, // 21: google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent:output_type -> google.cloud.dialogflow.cx.v3beta1.Agent + 19, // 22: google.cloud.dialogflow.cx.v3beta1.Agents.DeleteAgent:output_type -> google.protobuf.Empty + 20, // 23: google.cloud.dialogflow.cx.v3beta1.Agents.ExportAgent:output_type -> google.longrunning.Operation + 20, // 24: google.cloud.dialogflow.cx.v3beta1.Agents.RestoreAgent:output_type -> google.longrunning.Operation + 15, // 25: google.cloud.dialogflow.cx.v3beta1.Agents.ValidateAgent:output_type -> google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + 15, // 26: google.cloud.dialogflow.cx.v3beta1.Agents.GetAgentValidationResult:output_type -> google.cloud.dialogflow.cx.v3beta1.AgentValidationResult + 18, // [18:27] is the sub-list for method output_type + 9, // [9:18] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_agent_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_agent_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_agent_proto != nil { + return + } + file_google_cloud_dialogflow_cx_v3beta1_advanced_settings_proto_init() + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpeechToTextSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Agent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAgentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAgentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportAgentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAgentValidationResultRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AgentValidationResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*ExportAgentResponse_AgentUri)(nil), + (*ExportAgentResponse_AgentContent)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes[10].OneofWrappers = []interface{}{ + (*RestoreAgentRequest_AgentUri)(nil), + (*RestoreAgentRequest_AgentContent)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDesc, + NumEnums: 2, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_agent_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_agent_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_agent_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_agent_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_agent_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_agent_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AgentsClient is the client API for Agents service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AgentsClient interface { + // Returns the list of all agents in the specified location. + ListAgents(ctx context.Context, in *ListAgentsRequest, opts ...grpc.CallOption) (*ListAgentsResponse, error) + // Retrieves the specified agent. + GetAgent(ctx context.Context, in *GetAgentRequest, opts ...grpc.CallOption) (*Agent, error) + // Creates an agent in the specified location. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + CreateAgent(ctx context.Context, in *CreateAgentRequest, opts ...grpc.CallOption) (*Agent, error) + // Updates the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateAgent(ctx context.Context, in *UpdateAgentRequest, opts ...grpc.CallOption) (*Agent, error) + // Deletes the specified agent. + DeleteAgent(ctx context.Context, in *DeleteAgentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Exports the specified agent to a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportAgentResponse][google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse] + ExportAgent(ctx context.Context, in *ExportAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Restores the specified agent from a binary file. + // + // Replaces the current agent with a new one. Note that all existing resources + // in agent (e.g. intents, entity types, flows) will be removed. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + RestoreAgent(ctx context.Context, in *RestoreAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Validates the specified agent and creates or updates validation results. + // The agent in draft version is validated. Please call this API after the + // training is completed to get the complete validation results. + ValidateAgent(ctx context.Context, in *ValidateAgentRequest, opts ...grpc.CallOption) (*AgentValidationResult, error) + // Gets the latest agent validation result. Agent validation is performed + // when ValidateAgent is called. + GetAgentValidationResult(ctx context.Context, in *GetAgentValidationResultRequest, opts ...grpc.CallOption) (*AgentValidationResult, error) +} + +type agentsClient struct { + cc grpc.ClientConnInterface +} + +func NewAgentsClient(cc grpc.ClientConnInterface) AgentsClient { + return &agentsClient{cc} +} + +func (c *agentsClient) ListAgents(ctx context.Context, in *ListAgentsRequest, opts ...grpc.CallOption) (*ListAgentsResponse, error) { + out := new(ListAgentsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/ListAgents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) GetAgent(ctx context.Context, in *GetAgentRequest, opts ...grpc.CallOption) (*Agent, error) { + out := new(Agent) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/GetAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) CreateAgent(ctx context.Context, in *CreateAgentRequest, opts ...grpc.CallOption) (*Agent, error) { + out := new(Agent) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/CreateAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) UpdateAgent(ctx context.Context, in *UpdateAgentRequest, opts ...grpc.CallOption) (*Agent, error) { + out := new(Agent) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/UpdateAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) DeleteAgent(ctx context.Context, in *DeleteAgentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/DeleteAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) ExportAgent(ctx context.Context, in *ExportAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/ExportAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) RestoreAgent(ctx context.Context, in *RestoreAgentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/RestoreAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) ValidateAgent(ctx context.Context, in *ValidateAgentRequest, opts ...grpc.CallOption) (*AgentValidationResult, error) { + out := new(AgentValidationResult) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/ValidateAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentsClient) GetAgentValidationResult(ctx context.Context, in *GetAgentValidationResultRequest, opts ...grpc.CallOption) (*AgentValidationResult, error) { + out := new(AgentValidationResult) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Agents/GetAgentValidationResult", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AgentsServer is the server API for Agents service. +type AgentsServer interface { + // Returns the list of all agents in the specified location. + ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) + // Retrieves the specified agent. + GetAgent(context.Context, *GetAgentRequest) (*Agent, error) + // Creates an agent in the specified location. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + CreateAgent(context.Context, *CreateAgentRequest) (*Agent, error) + // Updates the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateAgent(context.Context, *UpdateAgentRequest) (*Agent, error) + // Deletes the specified agent. + DeleteAgent(context.Context, *DeleteAgentRequest) (*emptypb.Empty, error) + // Exports the specified agent to a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportAgentResponse][google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse] + ExportAgent(context.Context, *ExportAgentRequest) (*longrunning.Operation, error) + // Restores the specified agent from a binary file. + // + // Replaces the current agent with a new one. Note that all existing resources + // in agent (e.g. intents, entity types, flows) will be removed. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + RestoreAgent(context.Context, *RestoreAgentRequest) (*longrunning.Operation, error) + // Validates the specified agent and creates or updates validation results. + // The agent in draft version is validated. Please call this API after the + // training is completed to get the complete validation results. + ValidateAgent(context.Context, *ValidateAgentRequest) (*AgentValidationResult, error) + // Gets the latest agent validation result. Agent validation is performed + // when ValidateAgent is called. + GetAgentValidationResult(context.Context, *GetAgentValidationResultRequest) (*AgentValidationResult, error) +} + +// UnimplementedAgentsServer can be embedded to have forward compatible implementations. +type UnimplementedAgentsServer struct { +} + +func (*UnimplementedAgentsServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") +} +func (*UnimplementedAgentsServer) GetAgent(context.Context, *GetAgentRequest) (*Agent, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAgent not implemented") +} +func (*UnimplementedAgentsServer) CreateAgent(context.Context, *CreateAgentRequest) (*Agent, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAgent not implemented") +} +func (*UnimplementedAgentsServer) UpdateAgent(context.Context, *UpdateAgentRequest) (*Agent, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAgent not implemented") +} +func (*UnimplementedAgentsServer) DeleteAgent(context.Context, *DeleteAgentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAgent not implemented") +} +func (*UnimplementedAgentsServer) ExportAgent(context.Context, *ExportAgentRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportAgent not implemented") +} +func (*UnimplementedAgentsServer) RestoreAgent(context.Context, *RestoreAgentRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreAgent not implemented") +} +func (*UnimplementedAgentsServer) ValidateAgent(context.Context, *ValidateAgentRequest) (*AgentValidationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateAgent not implemented") +} +func (*UnimplementedAgentsServer) GetAgentValidationResult(context.Context, *GetAgentValidationResultRequest) (*AgentValidationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAgentValidationResult not implemented") +} + +func RegisterAgentsServer(s *grpc.Server, srv AgentsServer) { + s.RegisterService(&_Agents_serviceDesc, srv) +} + +func _Agents_ListAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAgentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).ListAgents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/ListAgents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).ListAgents(ctx, req.(*ListAgentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_GetAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).GetAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/GetAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).GetAgent(ctx, req.(*GetAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_CreateAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).CreateAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/CreateAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).CreateAgent(ctx, req.(*CreateAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_UpdateAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).UpdateAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/UpdateAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).UpdateAgent(ctx, req.(*UpdateAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_DeleteAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).DeleteAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/DeleteAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).DeleteAgent(ctx, req.(*DeleteAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_ExportAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).ExportAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/ExportAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).ExportAgent(ctx, req.(*ExportAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_RestoreAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).RestoreAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/RestoreAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).RestoreAgent(ctx, req.(*RestoreAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_ValidateAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).ValidateAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/ValidateAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).ValidateAgent(ctx, req.(*ValidateAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Agents_GetAgentValidationResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAgentValidationResultRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentsServer).GetAgentValidationResult(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Agents/GetAgentValidationResult", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentsServer).GetAgentValidationResult(ctx, req.(*GetAgentValidationResultRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Agents_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Agents", + HandlerType: (*AgentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListAgents", + Handler: _Agents_ListAgents_Handler, + }, + { + MethodName: "GetAgent", + Handler: _Agents_GetAgent_Handler, + }, + { + MethodName: "CreateAgent", + Handler: _Agents_CreateAgent_Handler, + }, + { + MethodName: "UpdateAgent", + Handler: _Agents_UpdateAgent_Handler, + }, + { + MethodName: "DeleteAgent", + Handler: _Agents_DeleteAgent_Handler, + }, + { + MethodName: "ExportAgent", + Handler: _Agents_ExportAgent_Handler, + }, + { + MethodName: "RestoreAgent", + Handler: _Agents_RestoreAgent_Handler, + }, + { + MethodName: "ValidateAgent", + Handler: _Agents_ValidateAgent_Handler, + }, + { + MethodName: "GetAgentValidationResult", + Handler: _Agents_GetAgentValidationResult_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/agent.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go b/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go new file mode 100644 index 000000000000..1139dcb2bc25 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/audio_config.pb.go @@ -0,0 +1,1093 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/audio_config.proto + +package cxpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Audio encoding of the audio content sent in the conversational query request. +// Refer to the +// [Cloud Speech API +// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more +// details. +type AudioEncoding int32 + +const ( + // Not specified. + AudioEncoding_AUDIO_ENCODING_UNSPECIFIED AudioEncoding = 0 + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + AudioEncoding_AUDIO_ENCODING_LINEAR_16 AudioEncoding = 1 + // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // Codec) is the recommended encoding because it is lossless (therefore + // recognition is not compromised) and requires only about half the + // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + // 24-bit samples, however, not all fields in `STREAMINFO` are supported. + AudioEncoding_AUDIO_ENCODING_FLAC AudioEncoding = 2 + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + AudioEncoding_AUDIO_ENCODING_MULAW AudioEncoding = 3 + // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AudioEncoding_AUDIO_ENCODING_AMR AudioEncoding = 4 + // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AudioEncoding_AUDIO_ENCODING_AMR_WB AudioEncoding = 5 + // Opus encoded audio frames in Ogg container + // ([OggOpus](https://wiki.xiph.org/OggOpus)). + // `sample_rate_hertz` must be 16000. + AudioEncoding_AUDIO_ENCODING_OGG_OPUS AudioEncoding = 6 + // Although the use of lossy encodings is not recommended, if a very low + // bitrate encoding is required, `OGG_OPUS` is highly preferred over + // Speex encoding. The [Speex](https://speex.org/) encoding supported by + // Dialogflow API has a header byte in each block, as in MIME type + // `audio/x-speex-with-header-byte`. + // It is a variant of the RTP Speex encoding defined in + // [RFC 5574](https://tools.ietf.org/html/rfc5574). + // The stream is a sequence of blocks, one block per RTP packet. Each block + // starts with a byte containing the length of the block, in bytes, followed + // by one or more frames of Speex data, padded to an integral number of + // bytes (octets) as specified in RFC 5574. In other words, each RTP header + // is replaced with a single byte containing the block length. Only Speex + // wideband is supported. `sample_rate_hertz` must be 16000. + AudioEncoding_AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE AudioEncoding = 7 +) + +// Enum value maps for AudioEncoding. +var ( + AudioEncoding_name = map[int32]string{ + 0: "AUDIO_ENCODING_UNSPECIFIED", + 1: "AUDIO_ENCODING_LINEAR_16", + 2: "AUDIO_ENCODING_FLAC", + 3: "AUDIO_ENCODING_MULAW", + 4: "AUDIO_ENCODING_AMR", + 5: "AUDIO_ENCODING_AMR_WB", + 6: "AUDIO_ENCODING_OGG_OPUS", + 7: "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE", + } + AudioEncoding_value = map[string]int32{ + "AUDIO_ENCODING_UNSPECIFIED": 0, + "AUDIO_ENCODING_LINEAR_16": 1, + "AUDIO_ENCODING_FLAC": 2, + "AUDIO_ENCODING_MULAW": 3, + "AUDIO_ENCODING_AMR": 4, + "AUDIO_ENCODING_AMR_WB": 5, + "AUDIO_ENCODING_OGG_OPUS": 6, + "AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE": 7, + } +) + +func (x AudioEncoding) Enum() *AudioEncoding { + p := new(AudioEncoding) + *p = x + return p +} + +func (x AudioEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[0].Descriptor() +} + +func (AudioEncoding) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[0] +} + +func (x AudioEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AudioEncoding.Descriptor instead. +func (AudioEncoding) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{0} +} + +// Variant of the specified [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use. +// +// See the [Cloud Speech +// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) +// for which models have different variants. For example, the "phone_call" model +// has both a standard and an enhanced variant. When you use an enhanced model, +// you will generally receive higher quality results than for a standard model. +type SpeechModelVariant int32 + +const ( + // No model variant specified. In this case Dialogflow defaults to + // USE_BEST_AVAILABLE. + SpeechModelVariant_SPEECH_MODEL_VARIANT_UNSPECIFIED SpeechModelVariant = 0 + // Use the best available variant of the [Speech + // model][InputAudioConfig.model] that the caller is eligible for. + // + // Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) for + // how to make your project eligible for enhanced models. + SpeechModelVariant_USE_BEST_AVAILABLE SpeechModelVariant = 1 + // Use standard model variant even if an enhanced model is available. See the + // [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // for details about enhanced models. + SpeechModelVariant_USE_STANDARD SpeechModelVariant = 2 + // Use an enhanced model variant: + // + // - If an enhanced variant does not exist for the given + // [model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] and request language, Dialogflow falls + // back to the standard variant. + // + // The [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // describes which models have enhanced variants. + // + // - If the API caller isn't eligible for enhanced models, Dialogflow returns + // an error. Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) + // for how to make your project eligible. + SpeechModelVariant_USE_ENHANCED SpeechModelVariant = 3 +) + +// Enum value maps for SpeechModelVariant. +var ( + SpeechModelVariant_name = map[int32]string{ + 0: "SPEECH_MODEL_VARIANT_UNSPECIFIED", + 1: "USE_BEST_AVAILABLE", + 2: "USE_STANDARD", + 3: "USE_ENHANCED", + } + SpeechModelVariant_value = map[string]int32{ + "SPEECH_MODEL_VARIANT_UNSPECIFIED": 0, + "USE_BEST_AVAILABLE": 1, + "USE_STANDARD": 2, + "USE_ENHANCED": 3, + } +) + +func (x SpeechModelVariant) Enum() *SpeechModelVariant { + p := new(SpeechModelVariant) + *p = x + return p +} + +func (x SpeechModelVariant) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SpeechModelVariant) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[1].Descriptor() +} + +func (SpeechModelVariant) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[1] +} + +func (x SpeechModelVariant) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SpeechModelVariant.Descriptor instead. +func (SpeechModelVariant) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{1} +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +type SsmlVoiceGender int32 + +const ( + // An unspecified gender, which means that the client doesn't care which + // gender the selected voice will have. + SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED SsmlVoiceGender = 0 + // A male voice. + SsmlVoiceGender_SSML_VOICE_GENDER_MALE SsmlVoiceGender = 1 + // A female voice. + SsmlVoiceGender_SSML_VOICE_GENDER_FEMALE SsmlVoiceGender = 2 + // A gender-neutral voice. + SsmlVoiceGender_SSML_VOICE_GENDER_NEUTRAL SsmlVoiceGender = 3 +) + +// Enum value maps for SsmlVoiceGender. +var ( + SsmlVoiceGender_name = map[int32]string{ + 0: "SSML_VOICE_GENDER_UNSPECIFIED", + 1: "SSML_VOICE_GENDER_MALE", + 2: "SSML_VOICE_GENDER_FEMALE", + 3: "SSML_VOICE_GENDER_NEUTRAL", + } + SsmlVoiceGender_value = map[string]int32{ + "SSML_VOICE_GENDER_UNSPECIFIED": 0, + "SSML_VOICE_GENDER_MALE": 1, + "SSML_VOICE_GENDER_FEMALE": 2, + "SSML_VOICE_GENDER_NEUTRAL": 3, + } +) + +func (x SsmlVoiceGender) Enum() *SsmlVoiceGender { + p := new(SsmlVoiceGender) + *p = x + return p +} + +func (x SsmlVoiceGender) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SsmlVoiceGender) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[2].Descriptor() +} + +func (SsmlVoiceGender) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[2] +} + +func (x SsmlVoiceGender) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SsmlVoiceGender.Descriptor instead. +func (SsmlVoiceGender) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{2} +} + +// Audio encoding of the output audio format in Text-To-Speech. +type OutputAudioEncoding int32 + +const ( + // Not specified. + OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_UNSPECIFIED OutputAudioEncoding = 0 + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_LINEAR_16 OutputAudioEncoding = 1 + // MP3 audio at 32kbps. + OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MP3 OutputAudioEncoding = 2 + // MP3 audio at 64kbps. + OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MP3_64_KBPS OutputAudioEncoding = 4 + // Opus encoded audio wrapped in an ogg container. The result will be a + // file which can be played natively on Android, and in browsers (at least + // Chrome and Firefox). The quality of the encoding is considerably higher + // than MP3 while using approximately the same bitrate. + OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_OGG_OPUS OutputAudioEncoding = 3 + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MULAW OutputAudioEncoding = 5 +) + +// Enum value maps for OutputAudioEncoding. +var ( + OutputAudioEncoding_name = map[int32]string{ + 0: "OUTPUT_AUDIO_ENCODING_UNSPECIFIED", + 1: "OUTPUT_AUDIO_ENCODING_LINEAR_16", + 2: "OUTPUT_AUDIO_ENCODING_MP3", + 4: "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS", + 3: "OUTPUT_AUDIO_ENCODING_OGG_OPUS", + 5: "OUTPUT_AUDIO_ENCODING_MULAW", + } + OutputAudioEncoding_value = map[string]int32{ + "OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0, + "OUTPUT_AUDIO_ENCODING_LINEAR_16": 1, + "OUTPUT_AUDIO_ENCODING_MP3": 2, + "OUTPUT_AUDIO_ENCODING_MP3_64_KBPS": 4, + "OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3, + "OUTPUT_AUDIO_ENCODING_MULAW": 5, + } +) + +func (x OutputAudioEncoding) Enum() *OutputAudioEncoding { + p := new(OutputAudioEncoding) + *p = x + return p +} + +func (x OutputAudioEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OutputAudioEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[3].Descriptor() +} + +func (OutputAudioEncoding) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes[3] +} + +func (x OutputAudioEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OutputAudioEncoding.Descriptor instead. +func (OutputAudioEncoding) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{3} +} + +// Information for a word recognized by the speech recognizer. +type SpeechWordInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The word this info is for. + Word string `protobuf:"bytes,3,opt,name=word,proto3" json:"word,omitempty"` + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + StartOffset *durationpb.Duration `protobuf:"bytes,1,opt,name=start_offset,json=startOffset,proto3" json:"start_offset,omitempty"` + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + EndOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=end_offset,json=endOffset,proto3" json:"end_offset,omitempty"` + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"` +} + +func (x *SpeechWordInfo) Reset() { + *x = SpeechWordInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SpeechWordInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SpeechWordInfo) ProtoMessage() {} + +func (x *SpeechWordInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SpeechWordInfo.ProtoReflect.Descriptor instead. +func (*SpeechWordInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{0} +} + +func (x *SpeechWordInfo) GetWord() string { + if x != nil { + return x.Word + } + return "" +} + +func (x *SpeechWordInfo) GetStartOffset() *durationpb.Duration { + if x != nil { + return x.StartOffset + } + return nil +} + +func (x *SpeechWordInfo) GetEndOffset() *durationpb.Duration { + if x != nil { + return x.EndOffset + } + return nil +} + +func (x *SpeechWordInfo) GetConfidence() float32 { + if x != nil { + return x.Confidence + } + return 0 +} + +// Instructs the speech recognizer on how to process the audio content. +type InputAudioConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Audio encoding of the audio content to process. + AudioEncoding AudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=google.cloud.dialogflow.cx.v3beta1.AudioEncoding" json:"audio_encoding,omitempty"` + // Sample rate (in Hertz) of the audio content sent in the query. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics) for + // more details. + SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` + // Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo] in + // [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult] with information about the recognized speech + // words, e.g. start and end time offsets. If false or unspecified, Speech + // doesn't return any word-level information. + EnableWordInfo bool `protobuf:"varint,13,opt,name=enable_word_info,json=enableWordInfo,proto3" json:"enable_word_info,omitempty"` + // Optional. A list of strings containing words and phrases that the speech + // recognizer should recognize with higher likelihood. + // + // See [the Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) + // for more details. + PhraseHints []string `protobuf:"bytes,4,rep,name=phrase_hints,json=phraseHints,proto3" json:"phrase_hints,omitempty"` + // Optional. Which Speech model to select for the given request. Select the + // model best suited to your domain to get best results. If a model is not + // explicitly specified, then we auto-select a model based on the parameters + // in the InputAudioConfig. + // If enhanced speech model is enabled for the agent and an enhanced + // version of the specified model for the language does not exist, then the + // speech is recognized using the standard version of the specified model. + // Refer to + // [Cloud Speech API + // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) + // for more details. + Model string `protobuf:"bytes,7,opt,name=model,proto3" json:"model,omitempty"` + // Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use. + ModelVariant SpeechModelVariant `protobuf:"varint,10,opt,name=model_variant,json=modelVariant,proto3,enum=google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant" json:"model_variant,omitempty"` + // Optional. If `false` (default), recognition does not cease until the + // client closes the stream. + // If `true`, the recognizer will detect a single spoken utterance in input + // audio. Recognition ceases when it detects the audio's voice has + // stopped or paused. In this case, once a detected intent is received, the + // client should close the stream and start a new request with a new stream as + // needed. + // Note: This setting is relevant only for streaming methods. + SingleUtterance bool `protobuf:"varint,8,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"` +} + +func (x *InputAudioConfig) Reset() { + *x = InputAudioConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InputAudioConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputAudioConfig) ProtoMessage() {} + +func (x *InputAudioConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputAudioConfig.ProtoReflect.Descriptor instead. +func (*InputAudioConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{1} +} + +func (x *InputAudioConfig) GetAudioEncoding() AudioEncoding { + if x != nil { + return x.AudioEncoding + } + return AudioEncoding_AUDIO_ENCODING_UNSPECIFIED +} + +func (x *InputAudioConfig) GetSampleRateHertz() int32 { + if x != nil { + return x.SampleRateHertz + } + return 0 +} + +func (x *InputAudioConfig) GetEnableWordInfo() bool { + if x != nil { + return x.EnableWordInfo + } + return false +} + +func (x *InputAudioConfig) GetPhraseHints() []string { + if x != nil { + return x.PhraseHints + } + return nil +} + +func (x *InputAudioConfig) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *InputAudioConfig) GetModelVariant() SpeechModelVariant { + if x != nil { + return x.ModelVariant + } + return SpeechModelVariant_SPEECH_MODEL_VARIANT_UNSPECIFIED +} + +func (x *InputAudioConfig) GetSingleUtterance() bool { + if x != nil { + return x.SingleUtterance + } + return false +} + +// Description of which voice to use for speech synthesis. +type VoiceSelectionParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The name of the voice. If not set, the service will choose a + // voice based on the other parameters such as language_code and + // [ssml_gender][google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.ssml_gender]. + // + // For the list of available voices, please refer to [Supported voices and + // languages](https://cloud.google.com/text-to-speech/docs/voices). + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The preferred gender of the voice. If not set, the service will + // choose a voice based on the other parameters such as language_code and + // [name][google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a + // voice of the appropriate gender is not available, the synthesizer should + // substitute a voice with a different gender rather than failing the request. + SsmlGender SsmlVoiceGender `protobuf:"varint,2,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender" json:"ssml_gender,omitempty"` +} + +func (x *VoiceSelectionParams) Reset() { + *x = VoiceSelectionParams{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VoiceSelectionParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VoiceSelectionParams) ProtoMessage() {} + +func (x *VoiceSelectionParams) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VoiceSelectionParams.ProtoReflect.Descriptor instead. +func (*VoiceSelectionParams) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{2} +} + +func (x *VoiceSelectionParams) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VoiceSelectionParams) GetSsmlGender() SsmlVoiceGender { + if x != nil { + return x.SsmlGender + } + return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED +} + +// Configuration of how speech should be synthesized. +type SynthesizeSpeechConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal + // native speed supported by the specific voice. 2.0 is twice as fast, and + // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any + // other values < 0.25 or > 4.0 will return an error. + SpeakingRate float64 `protobuf:"fixed64,1,opt,name=speaking_rate,json=speakingRate,proto3" json:"speaking_rate,omitempty"` + // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + // semitones from the original pitch. -20 means decrease 20 semitones from the + // original pitch. + Pitch float64 `protobuf:"fixed64,2,opt,name=pitch,proto3" json:"pitch,omitempty"` + // Optional. Volume gain (in dB) of the normal native volume supported by the + // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + // will play at approximately half the amplitude of the normal native signal + // amplitude. A value of +6.0 (dB) will play at approximately twice the + // amplitude of the normal native signal amplitude. We strongly recommend not + // to exceed +10 (dB) as there's usually no effective increase in loudness for + // any value greater than that. + VolumeGainDb float64 `protobuf:"fixed64,3,opt,name=volume_gain_db,json=volumeGainDb,proto3" json:"volume_gain_db,omitempty"` + // Optional. An identifier which selects 'audio effects' profiles that are + // applied on (post synthesized) text to speech. Effects are applied on top of + // each other in the order they are given. + EffectsProfileId []string `protobuf:"bytes,5,rep,name=effects_profile_id,json=effectsProfileId,proto3" json:"effects_profile_id,omitempty"` + // Optional. The desired voice of the synthesized audio. + Voice *VoiceSelectionParams `protobuf:"bytes,4,opt,name=voice,proto3" json:"voice,omitempty"` +} + +func (x *SynthesizeSpeechConfig) Reset() { + *x = SynthesizeSpeechConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SynthesizeSpeechConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SynthesizeSpeechConfig) ProtoMessage() {} + +func (x *SynthesizeSpeechConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SynthesizeSpeechConfig.ProtoReflect.Descriptor instead. +func (*SynthesizeSpeechConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{3} +} + +func (x *SynthesizeSpeechConfig) GetSpeakingRate() float64 { + if x != nil { + return x.SpeakingRate + } + return 0 +} + +func (x *SynthesizeSpeechConfig) GetPitch() float64 { + if x != nil { + return x.Pitch + } + return 0 +} + +func (x *SynthesizeSpeechConfig) GetVolumeGainDb() float64 { + if x != nil { + return x.VolumeGainDb + } + return 0 +} + +func (x *SynthesizeSpeechConfig) GetEffectsProfileId() []string { + if x != nil { + return x.EffectsProfileId + } + return nil +} + +func (x *SynthesizeSpeechConfig) GetVoice() *VoiceSelectionParams { + if x != nil { + return x.Voice + } + return nil +} + +// Instructs the speech synthesizer how to generate the output audio content. +type OutputAudioConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Audio encoding of the synthesized audio content. + AudioEncoding OutputAudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding" json:"audio_encoding,omitempty"` + // Optional. The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` + // Optional. Configuration of how speech should be synthesized. + SynthesizeSpeechConfig *SynthesizeSpeechConfig `protobuf:"bytes,3,opt,name=synthesize_speech_config,json=synthesizeSpeechConfig,proto3" json:"synthesize_speech_config,omitempty"` +} + +func (x *OutputAudioConfig) Reset() { + *x = OutputAudioConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputAudioConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputAudioConfig) ProtoMessage() {} + +func (x *OutputAudioConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputAudioConfig.ProtoReflect.Descriptor instead. +func (*OutputAudioConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP(), []int{4} +} + +func (x *OutputAudioConfig) GetAudioEncoding() OutputAudioEncoding { + if x != nil { + return x.AudioEncoding + } + return OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_UNSPECIFIED +} + +func (x *OutputAudioConfig) GetSampleRateHertz() int32 { + if x != nil { + return x.SampleRateHertz + } + return 0 +} + +func (x *OutputAudioConfig) GetSynthesizeSpeechConfig() *SynthesizeSpeechConfig { + if x != nil { + return x.SynthesizeSpeechConfig + } + return nil +} + +var File_google_cloud_dialogflow_cx_v3beta1_audio_config_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x0e, 0x53, 0x70, 0x65, 0x65, + 0x63, 0x68, 0x57, 0x6f, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3c, + 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x0a, + 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x6e, 0x64, + 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, + 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5d, 0x0a, 0x0e, 0x61, + 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x61, 0x75, 0x64, + 0x69, 0x6f, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x72, 0x74, 0x7a, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, + 0x65, 0x48, 0x65, 0x72, 0x74, 0x7a, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x48, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x5b, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x5f, 0x75, 0x74, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x55, 0x74, 0x74, 0x65, 0x72, 0x61, 0x6e, 0x63, + 0x65, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, + 0x0a, 0x0b, 0x73, 0x73, 0x6d, 0x6c, 0x5f, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x73, 0x6d, 0x6c, 0x56, 0x6f, 0x69, + 0x63, 0x65, 0x47, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x0a, 0x73, 0x73, 0x6d, 0x6c, 0x47, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x22, 0xf7, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x73, + 0x69, 0x7a, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x23, 0x0a, 0x0d, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x69, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x05, 0x70, 0x69, 0x74, 0x63, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x61, 0x69, 0x6e, 0x5f, 0x64, 0x62, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x61, 0x69, 0x6e, 0x44, 0x62, + 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x65, 0x66, + 0x66, 0x65, 0x63, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x4e, + 0x0a, 0x05, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x9a, + 0x02, 0x0a, 0x11, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x61, 0x75, 0x64, 0x69, + 0x6f, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x72, 0x74, 0x7a, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, + 0x48, 0x65, 0x72, 0x74, 0x7a, 0x12, 0x74, 0x0a, 0x18, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x73, + 0x69, 0x7a, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x74, 0x68, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x53, 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x16, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x53, + 0x70, 0x65, 0x65, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0xfb, 0x01, 0x0a, 0x0d, + 0x41, 0x75, 0x64, 0x69, 0x6f, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, + 0x1a, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, + 0x18, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x4c, 0x49, 0x4e, 0x45, 0x41, 0x52, 0x5f, 0x31, 0x36, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x41, + 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4c, + 0x41, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, + 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x55, 0x4c, 0x41, 0x57, 0x10, 0x03, 0x12, 0x16, + 0x0a, 0x12, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, + 0x5f, 0x41, 0x4d, 0x52, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, + 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x4d, 0x52, 0x5f, 0x57, 0x42, 0x10, + 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x47, 0x47, 0x5f, 0x4f, 0x50, 0x55, 0x53, 0x10, 0x06, 0x12, 0x29, + 0x0a, 0x25, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, + 0x5f, 0x53, 0x50, 0x45, 0x45, 0x58, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x10, 0x07, 0x2a, 0x76, 0x0a, 0x12, 0x53, 0x70, 0x65, + 0x65, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, + 0x24, 0x0a, 0x20, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, + 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x53, 0x45, 0x5f, 0x42, 0x45, 0x53, + 0x54, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x55, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x55, 0x53, 0x45, 0x5f, 0x45, 0x4e, 0x48, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, + 0x03, 0x2a, 0x8d, 0x01, 0x0a, 0x0f, 0x53, 0x73, 0x6d, 0x6c, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x47, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x53, 0x4d, 0x4c, 0x5f, 0x56, 0x4f, + 0x49, 0x43, 0x45, 0x5f, 0x47, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x53, 0x4d, 0x4c, + 0x5f, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x47, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, + 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x53, 0x4d, 0x4c, 0x5f, 0x56, 0x4f, 0x49, + 0x43, 0x45, 0x5f, 0x47, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x4d, 0x41, 0x4c, 0x45, + 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x53, 0x4d, 0x4c, 0x5f, 0x56, 0x4f, 0x49, 0x43, 0x45, + 0x5f, 0x47, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x45, 0x55, 0x54, 0x52, 0x41, 0x4c, 0x10, + 0x03, 0x2a, 0xec, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x75, 0x64, 0x69, + 0x6f, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x21, 0x4f, 0x55, 0x54, + 0x50, 0x55, 0x54, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x23, 0x0a, 0x1f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, + 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x49, 0x4e, 0x45, 0x41, 0x52, + 0x5f, 0x31, 0x36, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, + 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, + 0x50, 0x33, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x41, + 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x50, + 0x33, 0x5f, 0x36, 0x34, 0x5f, 0x4b, 0x42, 0x50, 0x53, 0x10, 0x04, 0x12, 0x22, 0x0a, 0x1e, 0x4f, + 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x45, 0x4e, 0x43, 0x4f, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x47, 0x47, 0x5f, 0x4f, 0x50, 0x55, 0x53, 0x10, 0x03, 0x12, + 0x1f, 0x0a, 0x1b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x5f, + 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x55, 0x4c, 0x41, 0x57, 0x10, 0x05, + 0x42, 0xb0, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x41, 0x75, 0x64, + 0x69, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, + 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, + 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x41, 0x55, 0x0a, 0x1b, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x6c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x36, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x7d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_goTypes = []interface{}{ + (AudioEncoding)(0), // 0: google.cloud.dialogflow.cx.v3beta1.AudioEncoding + (SpeechModelVariant)(0), // 1: google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant + (SsmlVoiceGender)(0), // 2: google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender + (OutputAudioEncoding)(0), // 3: google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding + (*SpeechWordInfo)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo + (*InputAudioConfig)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig + (*VoiceSelectionParams)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + (*SynthesizeSpeechConfig)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + (*OutputAudioConfig)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration +} +var file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_depIdxs = []int32{ + 9, // 0: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.start_offset:type_name -> google.protobuf.Duration + 9, // 1: google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo.end_offset:type_name -> google.protobuf.Duration + 0, // 2: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.audio_encoding:type_name -> google.cloud.dialogflow.cx.v3beta1.AudioEncoding + 1, // 3: google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model_variant:type_name -> google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant + 2, // 4: google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.ssml_gender:type_name -> google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender + 6, // 5: google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig.voice:type_name -> google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams + 3, // 6: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.audio_encoding:type_name -> google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding + 7, // 7: google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesize_speech_config:type_name -> google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_audio_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpeechWordInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InputAudioConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VoiceSelectionParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SynthesizeSpeechConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputAudioConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDesc, + NumEnums: 4, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_audio_config_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_audio_config_proto_depIdxs = nil +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go b/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go new file mode 100644 index 000000000000..0d297a823aea --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/changelog.pb.go @@ -0,0 +1,702 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/changelog.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The request message for [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3beta1.Changelogs.ListChangelogs]. +type ListChangelogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent containing the changelogs. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The filter string. Supports filter by user_email, resource, type and + // create_time. Some examples: + // 1. By user email: + // user_email = "someone@google.com" + // 2. By resource name: + // resource = "projects/123/locations/global/agents/456/flows/789" + // 3. By resource display name: + // display_name = "my agent" + // 4. By action: + // action = "Create" + // 5. By type: + // type = "flows" + // 6. By create time. Currently predicates on `create_time` and + // `create_time_epoch_seconds` are supported: + // create_time_epoch_seconds > 1551790877 AND create_time <= + // 2017-01-15T01:30:15.01Z + // 7. Combination of above filters: + // resource = "projects/123/locations/global/agents/456/flows/789" + // AND user_email = "someone@google.com" + // AND create_time <= 2017-01-15T01:30:15.01Z + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListChangelogsRequest) Reset() { + *x = ListChangelogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListChangelogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChangelogsRequest) ProtoMessage() {} + +func (x *ListChangelogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChangelogsRequest.ProtoReflect.Descriptor instead. +func (*ListChangelogsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescGZIP(), []int{0} +} + +func (x *ListChangelogsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListChangelogsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListChangelogsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListChangelogsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3beta1.Changelogs.ListChangelogs]. +type ListChangelogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of changelogs. There will be a maximum number of items returned + // based on the page_size field in the request. The changelogs will be ordered + // by timestamp. + Changelogs []*Changelog `protobuf:"bytes,1,rep,name=changelogs,proto3" json:"changelogs,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListChangelogsResponse) Reset() { + *x = ListChangelogsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListChangelogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChangelogsResponse) ProtoMessage() {} + +func (x *ListChangelogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChangelogsResponse.ProtoReflect.Descriptor instead. +func (*ListChangelogsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescGZIP(), []int{1} +} + +func (x *ListChangelogsResponse) GetChangelogs() []*Changelog { + if x != nil { + return x.Changelogs + } + return nil +} + +func (x *ListChangelogsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Changelogs.GetChangelog][google.cloud.dialogflow.cx.v3beta1.Changelogs.GetChangelog]. +type GetChangelogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the changelog to get. + // Format: `projects//locations//agents//changelogs/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetChangelogRequest) Reset() { + *x = GetChangelogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetChangelogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetChangelogRequest) ProtoMessage() {} + +func (x *GetChangelogRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetChangelogRequest.ProtoReflect.Descriptor instead. +func (*GetChangelogRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescGZIP(), []int{2} +} + +func (x *GetChangelogRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Changelogs represents a change made to a given agent. +type Changelog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the changelog. + // Format: `projects//locations//agents//changelogs/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Email address of the authenticated user. + UserEmail string `protobuf:"bytes,2,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` + // The affected resource display name of the change. + DisplayName string `protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The action of the change. + Action string `protobuf:"bytes,11,opt,name=action,proto3" json:"action,omitempty"` + // The affected resource type. + Type string `protobuf:"bytes,8,opt,name=type,proto3" json:"type,omitempty"` + // The affected resource name of the change. + Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + // The timestamp of the change. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *Changelog) Reset() { + *x = Changelog{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Changelog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Changelog) ProtoMessage() {} + +func (x *Changelog) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Changelog.ProtoReflect.Descriptor instead. +func (*Changelog) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescGZIP(), []int{3} +} + +func (x *Changelog) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Changelog) GetUserEmail() string { + if x != nil { + return x.UserEmail + } + return "" +} + +func (x *Changelog) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Changelog) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *Changelog) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Changelog) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *Changelog) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +var File_google_cloud_dialogflow_cx_v3beta1_changelog_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x01, 0x0a, + 0x15, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x12, 0x23, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x6c, 0x6f, 0x67, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x8f, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x52, 0x0a, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x56, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdf, 0x02, 0x0a, 0x09, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x75, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x3a, 0x77, 0xea, 0x41, 0x74, 0x0a, 0x23, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x12, 0x4d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x2f, + 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x7d, 0x32, 0xa5, 0x04, 0x0a, 0x0a, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0xd6, 0x01, 0x0a, 0x0e, 0x4c, + 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x39, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0xc3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x6c, 0x6f, 0x67, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x22, 0x4b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x2f, + 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x78, 0xca, 0x41, 0x19, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x42, 0xd6, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0e, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, + 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, + 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, + 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_goTypes = []interface{}{ + (*ListChangelogsRequest)(nil), // 0: google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + (*ListChangelogsResponse)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse + (*GetChangelogRequest)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest + (*Changelog)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.Changelog + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_depIdxs = []int32{ + 3, // 0: google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse.changelogs:type_name -> google.cloud.dialogflow.cx.v3beta1.Changelog + 4, // 1: google.cloud.dialogflow.cx.v3beta1.Changelog.create_time:type_name -> google.protobuf.Timestamp + 0, // 2: google.cloud.dialogflow.cx.v3beta1.Changelogs.ListChangelogs:input_type -> google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest + 2, // 3: google.cloud.dialogflow.cx.v3beta1.Changelogs.GetChangelog:input_type -> google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest + 1, // 4: google.cloud.dialogflow.cx.v3beta1.Changelogs.ListChangelogs:output_type -> google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse + 3, // 5: google.cloud.dialogflow.cx.v3beta1.Changelogs.GetChangelog:output_type -> google.cloud.dialogflow.cx.v3beta1.Changelog + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_changelog_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListChangelogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListChangelogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetChangelogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Changelog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_changelog_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_changelog_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ChangelogsClient is the client API for Changelogs service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ChangelogsClient interface { + // Returns the list of Changelogs. + ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error) + // Retrieves the specified Changelog. + GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error) +} + +type changelogsClient struct { + cc grpc.ClientConnInterface +} + +func NewChangelogsClient(cc grpc.ClientConnInterface) ChangelogsClient { + return &changelogsClient{cc} +} + +func (c *changelogsClient) ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error) { + out := new(ListChangelogsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Changelogs/ListChangelogs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *changelogsClient) GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error) { + out := new(Changelog) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Changelogs/GetChangelog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChangelogsServer is the server API for Changelogs service. +type ChangelogsServer interface { + // Returns the list of Changelogs. + ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error) + // Retrieves the specified Changelog. + GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error) +} + +// UnimplementedChangelogsServer can be embedded to have forward compatible implementations. +type UnimplementedChangelogsServer struct { +} + +func (*UnimplementedChangelogsServer) ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListChangelogs not implemented") +} +func (*UnimplementedChangelogsServer) GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetChangelog not implemented") +} + +func RegisterChangelogsServer(s *grpc.Server, srv ChangelogsServer) { + s.RegisterService(&_Changelogs_serviceDesc, srv) +} + +func _Changelogs_ListChangelogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListChangelogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangelogsServer).ListChangelogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Changelogs/ListChangelogs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangelogsServer).ListChangelogs(ctx, req.(*ListChangelogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Changelogs_GetChangelog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetChangelogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangelogsServer).GetChangelog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Changelogs/GetChangelog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangelogsServer).GetChangelog(ctx, req.(*GetChangelogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Changelogs_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Changelogs", + HandlerType: (*ChangelogsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListChangelogs", + Handler: _Changelogs_ListChangelogs_Handler, + }, + { + MethodName: "GetChangelog", + Handler: _Changelogs_GetChangelog_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/changelog.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go new file mode 100644 index 000000000000..db7dfcda6b74 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/deployment.pb.go @@ -0,0 +1,839 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/deployment.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The state of the deployment. +type Deployment_State int32 + +const ( + // State unspecified. + Deployment_STATE_UNSPECIFIED Deployment_State = 0 + // The deployment is running. + Deployment_RUNNING Deployment_State = 1 + // The deployment succeeded. + Deployment_SUCCEEDED Deployment_State = 2 + // The deployment failed. + Deployment_FAILED Deployment_State = 3 +) + +// Enum value maps for Deployment_State. +var ( + Deployment_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "RUNNING", + 2: "SUCCEEDED", + 3: "FAILED", + } + Deployment_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + } +) + +func (x Deployment_State) Enum() *Deployment_State { + p := new(Deployment_State) + *p = x + return p +} + +func (x Deployment_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Deployment_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_enumTypes[0].Descriptor() +} + +func (Deployment_State) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_enumTypes[0] +} + +func (x Deployment_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Deployment_State.Descriptor instead. +func (Deployment_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP(), []int{0, 0} +} + +// Represents an deployment in an environment. A deployment happens when a flow +// version configured to be active in the environment. You can configure running +// pre-deployment steps, e.g. running validation test cases, experiment +// auto-rollout, etc. +type Deployment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the deployment. + // Format: projects//locations//agents//environments//deployments/. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The name of the flow version for this deployment. + // Format: projects//locations//agents//flows//versions/. + FlowVersion string `protobuf:"bytes,2,opt,name=flow_version,json=flowVersion,proto3" json:"flow_version,omitempty"` + // The current state of the deployment. + State Deployment_State `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.dialogflow.cx.v3beta1.Deployment_State" json:"state,omitempty"` + // Result of the deployment. + Result *Deployment_Result `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` + // Start time of this deployment. + StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // End time of this deployment. + EndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` +} + +func (x *Deployment) Reset() { + *x = Deployment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deployment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deployment) ProtoMessage() {} + +func (x *Deployment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Deployment.ProtoReflect.Descriptor instead. +func (*Deployment) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP(), []int{0} +} + +func (x *Deployment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Deployment) GetFlowVersion() string { + if x != nil { + return x.FlowVersion + } + return "" +} + +func (x *Deployment) GetState() Deployment_State { + if x != nil { + return x.State + } + return Deployment_STATE_UNSPECIFIED +} + +func (x *Deployment) GetResult() *Deployment_Result { + if x != nil { + return x.Result + } + return nil +} + +func (x *Deployment) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *Deployment) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +// The request message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments]. +type ListDeploymentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListDeploymentsRequest) Reset() { + *x = ListDeploymentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDeploymentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDeploymentsRequest) ProtoMessage() {} + +func (x *ListDeploymentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDeploymentsRequest.ProtoReflect.Descriptor instead. +func (*ListDeploymentsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP(), []int{1} +} + +func (x *ListDeploymentsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDeploymentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListDeploymentsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments]. +type ListDeploymentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of deployments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + Deployments []*Deployment `protobuf:"bytes,1,rep,name=deployments,proto3" json:"deployments,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListDeploymentsResponse) Reset() { + *x = ListDeploymentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDeploymentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDeploymentsResponse) ProtoMessage() {} + +func (x *ListDeploymentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDeploymentsResponse.ProtoReflect.Descriptor instead. +func (*ListDeploymentsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP(), []int{2} +} + +func (x *ListDeploymentsResponse) GetDeployments() []*Deployment { + if x != nil { + return x.Deployments + } + return nil +} + +func (x *ListDeploymentsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment]. +type GetDeploymentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + // Format: `projects//locations//agents//environments//deployments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDeploymentRequest) Reset() { + *x = GetDeploymentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDeploymentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDeploymentRequest) ProtoMessage() {} + +func (x *GetDeploymentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDeploymentRequest.ProtoReflect.Descriptor instead. +func (*GetDeploymentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP(), []int{3} +} + +func (x *GetDeploymentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Result of the deployment. +type Deployment_Result struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Results of test cases running before the deployment. + // Format: `projects//locations//agents//testCases//results/`. + DeploymentTestResults []string `protobuf:"bytes,1,rep,name=deployment_test_results,json=deploymentTestResults,proto3" json:"deployment_test_results,omitempty"` + // The name of the experiment triggered by this deployment. + // Format: projects//locations//agents//environments//experiments/. + Experiment string `protobuf:"bytes,2,opt,name=experiment,proto3" json:"experiment,omitempty"` +} + +func (x *Deployment_Result) Reset() { + *x = Deployment_Result{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deployment_Result) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deployment_Result) ProtoMessage() {} + +func (x *Deployment_Result) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Deployment_Result.ProtoReflect.Descriptor instead. +func (*Deployment_Result) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Deployment_Result) GetDeploymentTestResults() []string { + if x != nil { + return x.DeploymentTestResults + } + return nil +} + +func (x *Deployment_Result) GetExperiment() string { + if x != nil { + return x.Experiment + } + return "" +} + +var File_google_cloud_dialogflow_cx_v3beta1_deployment_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x06, + 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x49, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0xba, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x65, 0x0a, 0x17, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x2d, 0xfa, 0x41, 0x2a, 0x0a, 0x28, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x15, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, + 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, + 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x46, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, + 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x96, 0x01, + 0xea, 0x41, 0x92, 0x01, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x7d, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x50, 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x58, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x32, 0xcc, 0x04, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0xd6, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x5b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, + 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x78, 0xca, 0x41, 0x19, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x42, 0xd7, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0f, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, + 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, + 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, + 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_goTypes = []interface{}{ + (Deployment_State)(0), // 0: google.cloud.dialogflow.cx.v3beta1.Deployment.State + (*Deployment)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.Deployment + (*ListDeploymentsRequest)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest + (*ListDeploymentsResponse)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + (*GetDeploymentRequest)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + (*Deployment_Result)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.Deployment.Result + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_depIdxs = []int32{ + 0, // 0: google.cloud.dialogflow.cx.v3beta1.Deployment.state:type_name -> google.cloud.dialogflow.cx.v3beta1.Deployment.State + 5, // 1: google.cloud.dialogflow.cx.v3beta1.Deployment.result:type_name -> google.cloud.dialogflow.cx.v3beta1.Deployment.Result + 6, // 2: google.cloud.dialogflow.cx.v3beta1.Deployment.start_time:type_name -> google.protobuf.Timestamp + 6, // 3: google.cloud.dialogflow.cx.v3beta1.Deployment.end_time:type_name -> google.protobuf.Timestamp + 1, // 4: google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse.deployments:type_name -> google.cloud.dialogflow.cx.v3beta1.Deployment + 2, // 5: google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments:input_type -> google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest + 4, // 6: google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment:input_type -> google.cloud.dialogflow.cx.v3beta1.GetDeploymentRequest + 3, // 7: google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments:output_type -> google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse + 1, // 8: google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment:output_type -> google.cloud.dialogflow.cx.v3beta1.Deployment + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_deployment_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deployment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDeploymentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDeploymentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDeploymentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Deployment_Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_deployment_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_deployment_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DeploymentsClient is the client API for Deployments service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DeploymentsClient interface { + // Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) + // Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) +} + +type deploymentsClient struct { + cc grpc.ClientConnInterface +} + +func NewDeploymentsClient(cc grpc.ClientConnInterface) DeploymentsClient { + return &deploymentsClient{cc} +} + +func (c *deploymentsClient) ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) { + out := new(ListDeploymentsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Deployments/ListDeployments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deploymentsClient) GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) { + out := new(Deployment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Deployments/GetDeployment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DeploymentsServer is the server API for Deployments service. +type DeploymentsServer interface { + // Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) + // Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. + GetDeployment(context.Context, *GetDeploymentRequest) (*Deployment, error) +} + +// UnimplementedDeploymentsServer can be embedded to have forward compatible implementations. +type UnimplementedDeploymentsServer struct { +} + +func (*UnimplementedDeploymentsServer) ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDeployments not implemented") +} +func (*UnimplementedDeploymentsServer) GetDeployment(context.Context, *GetDeploymentRequest) (*Deployment, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDeployment not implemented") +} + +func RegisterDeploymentsServer(s *grpc.Server, srv DeploymentsServer) { + s.RegisterService(&_Deployments_serviceDesc, srv) +} + +func _Deployments_ListDeployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDeploymentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeploymentsServer).ListDeployments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Deployments/ListDeployments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeploymentsServer).ListDeployments(ctx, req.(*ListDeploymentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Deployments_GetDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDeploymentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeploymentsServer).GetDeployment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Deployments/GetDeployment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeploymentsServer).GetDeployment(ctx, req.(*GetDeploymentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Deployments_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Deployments", + HandlerType: (*DeploymentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListDeployments", + Handler: _Deployments_ListDeployments_Handler, + }, + { + MethodName: "GetDeployment", + Handler: _Deployments_GetDeployment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/deployment.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go b/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go new file mode 100644 index 000000000000..1f80b80d33a8 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/entity_type.pb.go @@ -0,0 +1,1548 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents kinds of entities. +type EntityType_Kind int32 + +const ( + // Not specified. This value should be never used. + EntityType_KIND_UNSPECIFIED EntityType_Kind = 0 + // Map entity types allow mapping of a group of synonyms to a canonical + // value. + EntityType_KIND_MAP EntityType_Kind = 1 + // List entity types contain a set of entries that do not map to canonical + // values. However, list entity types can contain references to other entity + // types (with or without aliases). + EntityType_KIND_LIST EntityType_Kind = 2 + // Regexp entity types allow to specify regular expressions in entries + // values. + EntityType_KIND_REGEXP EntityType_Kind = 3 +) + +// Enum value maps for EntityType_Kind. +var ( + EntityType_Kind_name = map[int32]string{ + 0: "KIND_UNSPECIFIED", + 1: "KIND_MAP", + 2: "KIND_LIST", + 3: "KIND_REGEXP", + } + EntityType_Kind_value = map[string]int32{ + "KIND_UNSPECIFIED": 0, + "KIND_MAP": 1, + "KIND_LIST": 2, + "KIND_REGEXP": 3, + } +) + +func (x EntityType_Kind) Enum() *EntityType_Kind { + p := new(EntityType_Kind) + *p = x + return p +} + +func (x EntityType_Kind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EntityType_Kind) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_enumTypes[0].Descriptor() +} + +func (EntityType_Kind) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_enumTypes[0] +} + +func (x EntityType_Kind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EntityType_Kind.Descriptor instead. +func (EntityType_Kind) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{0, 0} +} + +// Represents different entity type expansion modes. Automated expansion +// allows an agent to recognize values that have not been explicitly listed in +// the entity (for example, new kinds of shopping list items). +type EntityType_AutoExpansionMode int32 + +const ( + // Auto expansion disabled for the entity. + EntityType_AUTO_EXPANSION_MODE_UNSPECIFIED EntityType_AutoExpansionMode = 0 + // Allows an agent to recognize values that have not been explicitly + // listed in the entity. + EntityType_AUTO_EXPANSION_MODE_DEFAULT EntityType_AutoExpansionMode = 1 +) + +// Enum value maps for EntityType_AutoExpansionMode. +var ( + EntityType_AutoExpansionMode_name = map[int32]string{ + 0: "AUTO_EXPANSION_MODE_UNSPECIFIED", + 1: "AUTO_EXPANSION_MODE_DEFAULT", + } + EntityType_AutoExpansionMode_value = map[string]int32{ + "AUTO_EXPANSION_MODE_UNSPECIFIED": 0, + "AUTO_EXPANSION_MODE_DEFAULT": 1, + } +) + +func (x EntityType_AutoExpansionMode) Enum() *EntityType_AutoExpansionMode { + p := new(EntityType_AutoExpansionMode) + *p = x + return p +} + +func (x EntityType_AutoExpansionMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EntityType_AutoExpansionMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_enumTypes[1].Descriptor() +} + +func (EntityType_AutoExpansionMode) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_enumTypes[1] +} + +func (x EntityType_AutoExpansionMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EntityType_AutoExpansionMode.Descriptor instead. +func (EntityType_AutoExpansionMode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{0, 1} +} + +// Entities are extracted from user input and represent parameters that are +// meaningful to your application. For example, a date range, a proper name +// such as a geographic location or landmark, and so on. Entities represent +// actionable data for your application. +// +// When you define an entity, you can also include synonyms that all map to +// that entity. For example, "soft drink", "soda", "pop", and so on. +// +// There are three types of entities: +// +// - **System** - entities that are defined by the Dialogflow API for common +// data types such as date, time, currency, and so on. A system entity is +// represented by the `EntityType` type. +// +// - **Custom** - entities that are defined by you that represent +// actionable data that is meaningful to your application. For example, +// you could define a `pizza.sauce` entity for red or white pizza sauce, +// a `pizza.cheese` entity for the different types of cheese on a pizza, +// a `pizza.topping` entity for different toppings, and so on. A custom +// entity is represented by the `EntityType` type. +// +// - **User** - entities that are built for an individual user such as +// favorites, preferences, playlists, and so on. A user entity is +// represented by the [SessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityType] type. +// +// For more information about entity types, see the [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/entities-overview). +type EntityType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the entity type. + // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType]. + // Format: `projects//locations//agents//entityTypes/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the entity type, unique within the agent. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Required. Indicates the kind of entity type. + Kind EntityType_Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=google.cloud.dialogflow.cx.v3beta1.EntityType_Kind" json:"kind,omitempty"` + // Indicates whether the entity type can be automatically expanded. + AutoExpansionMode EntityType_AutoExpansionMode `protobuf:"varint,4,opt,name=auto_expansion_mode,json=autoExpansionMode,proto3,enum=google.cloud.dialogflow.cx.v3beta1.EntityType_AutoExpansionMode" json:"auto_expansion_mode,omitempty"` + // The collection of entity entries associated with the entity type. + Entities []*EntityType_Entity `protobuf:"bytes,5,rep,name=entities,proto3" json:"entities,omitempty"` + // Collection of exceptional words and phrases that shouldn't be matched. + // For example, if you have a size entity type with entry `giant`(an + // adjective), you might consider adding `giants`(a noun) as an exclusion. + // If the kind of entity type is `KIND_MAP`, then the phrases specified by + // entities and excluded phrases should be mutually exclusive. + ExcludedPhrases []*EntityType_ExcludedPhrase `protobuf:"bytes,6,rep,name=excluded_phrases,json=excludedPhrases,proto3" json:"excluded_phrases,omitempty"` + // Enables fuzzy entity extraction during classification. + EnableFuzzyExtraction bool `protobuf:"varint,7,opt,name=enable_fuzzy_extraction,json=enableFuzzyExtraction,proto3" json:"enable_fuzzy_extraction,omitempty"` + // Indicates whether parameters of the entity type should be redacted in log. + // If redaction is enabled, page parameters and intent parameters referring to + // the entity type will be replaced by parameter name during logging. + Redact bool `protobuf:"varint,9,opt,name=redact,proto3" json:"redact,omitempty"` +} + +func (x *EntityType) Reset() { + *x = EntityType{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntityType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntityType) ProtoMessage() {} + +func (x *EntityType) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntityType.ProtoReflect.Descriptor instead. +func (*EntityType) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{0} +} + +func (x *EntityType) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EntityType) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *EntityType) GetKind() EntityType_Kind { + if x != nil { + return x.Kind + } + return EntityType_KIND_UNSPECIFIED +} + +func (x *EntityType) GetAutoExpansionMode() EntityType_AutoExpansionMode { + if x != nil { + return x.AutoExpansionMode + } + return EntityType_AUTO_EXPANSION_MODE_UNSPECIFIED +} + +func (x *EntityType) GetEntities() []*EntityType_Entity { + if x != nil { + return x.Entities + } + return nil +} + +func (x *EntityType) GetExcludedPhrases() []*EntityType_ExcludedPhrase { + if x != nil { + return x.ExcludedPhrases + } + return nil +} + +func (x *EntityType) GetEnableFuzzyExtraction() bool { + if x != nil { + return x.EnableFuzzyExtraction + } + return false +} + +func (x *EntityType) GetRedact() bool { + if x != nil { + return x.Redact + } + return false +} + +// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes]. +type ListEntityTypesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to list all entity types for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The language to list entity types for. The following fields are language + // dependent: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListEntityTypesRequest) Reset() { + *x = ListEntityTypesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEntityTypesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEntityTypesRequest) ProtoMessage() {} + +func (x *ListEntityTypesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEntityTypesRequest.ProtoReflect.Descriptor instead. +func (*ListEntityTypesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{1} +} + +func (x *ListEntityTypesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListEntityTypesRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *ListEntityTypesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListEntityTypesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes]. +type ListEntityTypesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of entity types. There will be a maximum number of items returned + // based on the page_size field in the request. + EntityTypes []*EntityType `protobuf:"bytes,1,rep,name=entity_types,json=entityTypes,proto3" json:"entity_types,omitempty"` + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListEntityTypesResponse) Reset() { + *x = ListEntityTypesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEntityTypesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEntityTypesResponse) ProtoMessage() {} + +func (x *ListEntityTypesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEntityTypesResponse.ProtoReflect.Descriptor instead. +func (*ListEntityTypesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{2} +} + +func (x *ListEntityTypesResponse) GetEntityTypes() []*EntityType { + if x != nil { + return x.EntityTypes + } + return nil +} + +func (x *ListEntityTypesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType]. +type GetEntityTypeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entity type. + // Format: `projects//locations//agents//entityTypes/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The language to retrieve the entity type for. The following fields are + // language dependent: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetEntityTypeRequest) Reset() { + *x = GetEntityTypeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEntityTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEntityTypeRequest) ProtoMessage() {} + +func (x *GetEntityTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEntityTypeRequest.ProtoReflect.Descriptor instead. +func (*GetEntityTypeRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{3} +} + +func (x *GetEntityTypeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetEntityTypeRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType]. +type CreateEntityTypeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to create a entity type for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The entity type to create. + EntityType *EntityType `protobuf:"bytes,2,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"` + // The language of the following fields in `entity_type`: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *CreateEntityTypeRequest) Reset() { + *x = CreateEntityTypeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEntityTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEntityTypeRequest) ProtoMessage() {} + +func (x *CreateEntityTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEntityTypeRequest.ProtoReflect.Descriptor instead. +func (*CreateEntityTypeRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateEntityTypeRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateEntityTypeRequest) GetEntityType() *EntityType { + if x != nil { + return x.EntityType + } + return nil +} + +func (x *CreateEntityTypeRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType]. +type UpdateEntityTypeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The entity type to update. + EntityType *EntityType `protobuf:"bytes,1,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"` + // The language of the following fields in `entity_type`: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // The mask to control which fields get updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateEntityTypeRequest) Reset() { + *x = UpdateEntityTypeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEntityTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEntityTypeRequest) ProtoMessage() {} + +func (x *UpdateEntityTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEntityTypeRequest.ProtoReflect.Descriptor instead. +func (*UpdateEntityTypeRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateEntityTypeRequest) GetEntityType() *EntityType { + if x != nil { + return x.EntityType + } + return nil +} + +func (x *UpdateEntityTypeRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *UpdateEntityTypeRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType]. +type DeleteEntityTypeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the entity type to delete. + // Format: `projects//locations//agents//entityTypes/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This field has no effect for entity type not being used. + // For entity types that are used by intents or pages: + // + // - If `force` is set to false, an error will be returned with message + // indicating the referencing resources. + // - If `force` is set to true, Dialogflow will remove the entity type, as + // well as any references to the entity type (i.e. Page + // [parameter][google.cloud.dialogflow.cx.v3beta1.Form.Parameter] of the entity type will be changed to + // '@sys.any' and intent [parameter][google.cloud.dialogflow.cx.v3beta1.Intent.Parameter] of the entity type + // will be removed). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteEntityTypeRequest) Reset() { + *x = DeleteEntityTypeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEntityTypeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEntityTypeRequest) ProtoMessage() {} + +func (x *DeleteEntityTypeRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEntityTypeRequest.ProtoReflect.Descriptor instead. +func (*DeleteEntityTypeRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteEntityTypeRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteEntityTypeRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// An **entity entry** for an associated entity type. +type EntityType_Entity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The primary value associated with this entity entry. + // For example, if the entity type is *vegetable*, the value could be + // *scallions*. + // + // For `KIND_MAP` entity types: + // + // * A canonical value to be used in place of synonyms. + // + // For `KIND_LIST` entity types: + // + // - A string that can contain references to other entity types (with or + // without aliases). + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // Required. A collection of value synonyms. For example, if the entity type + // is *vegetable*, and `value` is *scallions*, a synonym could be *green + // onions*. + // + // For `KIND_LIST` entity types: + // + // * This collection must contain exactly one synonym equal to `value`. + Synonyms []string `protobuf:"bytes,2,rep,name=synonyms,proto3" json:"synonyms,omitempty"` +} + +func (x *EntityType_Entity) Reset() { + *x = EntityType_Entity{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntityType_Entity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntityType_Entity) ProtoMessage() {} + +func (x *EntityType_Entity) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntityType_Entity.ProtoReflect.Descriptor instead. +func (*EntityType_Entity) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *EntityType_Entity) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *EntityType_Entity) GetSynonyms() []string { + if x != nil { + return x.Synonyms + } + return nil +} + +// An excluded entity phrase that should not be matched. +type EntityType_ExcludedPhrase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The word or phrase to be excluded. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *EntityType_ExcludedPhrase) Reset() { + *x = EntityType_ExcludedPhrase{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntityType_ExcludedPhrase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntityType_ExcludedPhrase) ProtoMessage() {} + +func (x *EntityType_ExcludedPhrase) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntityType_ExcludedPhrase.ProtoReflect.Descriptor instead. +func (*EntityType_ExcludedPhrase) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *EntityType_ExcludedPhrase) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +var File_google_cloud_dialogflow_cx_v3beta1_entity_type_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x07, 0x0a, + 0x0a, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x70, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x65, 0x78, + 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x10, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x50, 0x68, 0x72, + 0x61, 0x73, 0x65, 0x52, 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x50, 0x68, 0x72, + 0x61, 0x73, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, + 0x75, 0x7a, 0x7a, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x75, 0x7a, + 0x7a, 0x79, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x1a, 0x44, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x19, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x79, 0x6e, + 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x08, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x1a, 0x2b, 0x0a, 0x0e, 0x45, 0x78, + 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4a, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, + 0x14, 0x0a, 0x10, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4d, 0x41, + 0x50, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, + 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, + 0x50, 0x10, 0x03, 0x22, 0x59, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x6f, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, + 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x3a, 0x7b, + 0xea, 0x41, 0x78, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x7b, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x22, 0xbf, 0x01, 0x0a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x94, 0x01, + 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x54, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x22, 0xd1, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x0b, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x71, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x32, 0xcd, 0x09, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0xda, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0xc7, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe8, + 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x22, 0x3d, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0xda, 0x41, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0xf9, 0x01, 0x0a, 0x10, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x78, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x58, 0x32, 0x49, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0b, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0xda, 0x41, 0x17, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xb5, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x2a, 0x3d, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x78, 0xca, + 0x41, 0x19, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0xd7, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x0f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, + 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, + 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, + 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, + 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_goTypes = []interface{}{ + (EntityType_Kind)(0), // 0: google.cloud.dialogflow.cx.v3beta1.EntityType.Kind + (EntityType_AutoExpansionMode)(0), // 1: google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode + (*EntityType)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.EntityType + (*ListEntityTypesRequest)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + (*ListEntityTypesResponse)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + (*GetEntityTypeRequest)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + (*CreateEntityTypeRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + (*UpdateEntityTypeRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + (*DeleteEntityTypeRequest)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + (*EntityType_Entity)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + (*EntityType_ExcludedPhrase)(nil), // 10: google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + (*fieldmaskpb.FieldMask)(nil), // 11: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 12: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_depIdxs = []int32{ + 0, // 0: google.cloud.dialogflow.cx.v3beta1.EntityType.kind:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType.Kind + 1, // 1: google.cloud.dialogflow.cx.v3beta1.EntityType.auto_expansion_mode:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType.AutoExpansionMode + 9, // 2: google.cloud.dialogflow.cx.v3beta1.EntityType.entities:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType.Entity + 10, // 3: google.cloud.dialogflow.cx.v3beta1.EntityType.excluded_phrases:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType.ExcludedPhrase + 2, // 4: google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse.entity_types:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType + 2, // 5: google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest.entity_type:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType + 2, // 6: google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.entity_type:type_name -> google.cloud.dialogflow.cx.v3beta1.EntityType + 11, // 7: google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest.update_mask:type_name -> google.protobuf.FieldMask + 3, // 8: google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes:input_type -> google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest + 5, // 9: google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType:input_type -> google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest + 6, // 10: google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest + 7, // 11: google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest + 8, // 12: google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest + 4, // 13: google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes:output_type -> google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse + 2, // 14: google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType:output_type -> google.cloud.dialogflow.cx.v3beta1.EntityType + 2, // 15: google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType:output_type -> google.cloud.dialogflow.cx.v3beta1.EntityType + 2, // 16: google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType:output_type -> google.cloud.dialogflow.cx.v3beta1.EntityType + 12, // 17: google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType:output_type -> google.protobuf.Empty + 13, // [13:18] is the sub-list for method output_type + 8, // [8:13] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_entity_type_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntityTypesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEntityTypesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEntityTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEntityTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEntityTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteEntityTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityType_Entity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityType_ExcludedPhrase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_entity_type_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_entity_type_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// EntityTypesClient is the client API for EntityTypes service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EntityTypesClient interface { + // Returns the list of all entity types in the specified agent. + ListEntityTypes(ctx context.Context, in *ListEntityTypesRequest, opts ...grpc.CallOption) (*ListEntityTypesResponse, error) + // Retrieves the specified entity type. + GetEntityType(ctx context.Context, in *GetEntityTypeRequest, opts ...grpc.CallOption) (*EntityType, error) + // Creates an entity type in the specified agent. + CreateEntityType(ctx context.Context, in *CreateEntityTypeRequest, opts ...grpc.CallOption) (*EntityType, error) + // Updates the specified entity type. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateEntityType(ctx context.Context, in *UpdateEntityTypeRequest, opts ...grpc.CallOption) (*EntityType, error) + // Deletes the specified entity type. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + DeleteEntityType(ctx context.Context, in *DeleteEntityTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type entityTypesClient struct { + cc grpc.ClientConnInterface +} + +func NewEntityTypesClient(cc grpc.ClientConnInterface) EntityTypesClient { + return &entityTypesClient{cc} +} + +func (c *entityTypesClient) ListEntityTypes(ctx context.Context, in *ListEntityTypesRequest, opts ...grpc.CallOption) (*ListEntityTypesResponse, error) { + out := new(ListEntityTypesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/ListEntityTypes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *entityTypesClient) GetEntityType(ctx context.Context, in *GetEntityTypeRequest, opts ...grpc.CallOption) (*EntityType, error) { + out := new(EntityType) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/GetEntityType", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *entityTypesClient) CreateEntityType(ctx context.Context, in *CreateEntityTypeRequest, opts ...grpc.CallOption) (*EntityType, error) { + out := new(EntityType) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/CreateEntityType", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *entityTypesClient) UpdateEntityType(ctx context.Context, in *UpdateEntityTypeRequest, opts ...grpc.CallOption) (*EntityType, error) { + out := new(EntityType) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/UpdateEntityType", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *entityTypesClient) DeleteEntityType(ctx context.Context, in *DeleteEntityTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/DeleteEntityType", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EntityTypesServer is the server API for EntityTypes service. +type EntityTypesServer interface { + // Returns the list of all entity types in the specified agent. + ListEntityTypes(context.Context, *ListEntityTypesRequest) (*ListEntityTypesResponse, error) + // Retrieves the specified entity type. + GetEntityType(context.Context, *GetEntityTypeRequest) (*EntityType, error) + // Creates an entity type in the specified agent. + CreateEntityType(context.Context, *CreateEntityTypeRequest) (*EntityType, error) + // Updates the specified entity type. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateEntityType(context.Context, *UpdateEntityTypeRequest) (*EntityType, error) + // Deletes the specified entity type. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + DeleteEntityType(context.Context, *DeleteEntityTypeRequest) (*emptypb.Empty, error) +} + +// UnimplementedEntityTypesServer can be embedded to have forward compatible implementations. +type UnimplementedEntityTypesServer struct { +} + +func (*UnimplementedEntityTypesServer) ListEntityTypes(context.Context, *ListEntityTypesRequest) (*ListEntityTypesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEntityTypes not implemented") +} +func (*UnimplementedEntityTypesServer) GetEntityType(context.Context, *GetEntityTypeRequest) (*EntityType, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEntityType not implemented") +} +func (*UnimplementedEntityTypesServer) CreateEntityType(context.Context, *CreateEntityTypeRequest) (*EntityType, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEntityType not implemented") +} +func (*UnimplementedEntityTypesServer) UpdateEntityType(context.Context, *UpdateEntityTypeRequest) (*EntityType, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEntityType not implemented") +} +func (*UnimplementedEntityTypesServer) DeleteEntityType(context.Context, *DeleteEntityTypeRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteEntityType not implemented") +} + +func RegisterEntityTypesServer(s *grpc.Server, srv EntityTypesServer) { + s.RegisterService(&_EntityTypes_serviceDesc, srv) +} + +func _EntityTypes_ListEntityTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEntityTypesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EntityTypesServer).ListEntityTypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/ListEntityTypes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EntityTypesServer).ListEntityTypes(ctx, req.(*ListEntityTypesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EntityTypes_GetEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEntityTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EntityTypesServer).GetEntityType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/GetEntityType", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EntityTypesServer).GetEntityType(ctx, req.(*GetEntityTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EntityTypes_CreateEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEntityTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EntityTypesServer).CreateEntityType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/CreateEntityType", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EntityTypesServer).CreateEntityType(ctx, req.(*CreateEntityTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EntityTypes_UpdateEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEntityTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EntityTypesServer).UpdateEntityType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/UpdateEntityType", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EntityTypesServer).UpdateEntityType(ctx, req.(*UpdateEntityTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _EntityTypes_DeleteEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEntityTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EntityTypesServer).DeleteEntityType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.EntityTypes/DeleteEntityType", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EntityTypesServer).DeleteEntityType(ctx, req.(*DeleteEntityTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _EntityTypes_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.EntityTypes", + HandlerType: (*EntityTypesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListEntityTypes", + Handler: _EntityTypes_ListEntityTypes_Handler, + }, + { + MethodName: "GetEntityType", + Handler: _EntityTypes_GetEntityType_Handler, + }, + { + MethodName: "CreateEntityType", + Handler: _EntityTypes_CreateEntityType_Handler, + }, + { + MethodName: "UpdateEntityType", + Handler: _EntityTypes_UpdateEntityType_Handler, + }, + { + MethodName: "DeleteEntityType", + Handler: _EntityTypes_DeleteEntityType_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/entity_type.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go new file mode 100644 index 000000000000..a5c14855f710 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/environment.pb.go @@ -0,0 +1,2653 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/environment.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The overall result for a continuous test run in an agent environment. +type ContinuousTestResult_AggregatedTestResult int32 + +const ( + // Not specified. Should never be used. + ContinuousTestResult_AGGREGATED_TEST_RESULT_UNSPECIFIED ContinuousTestResult_AggregatedTestResult = 0 + // All the tests passed. + ContinuousTestResult_PASSED ContinuousTestResult_AggregatedTestResult = 1 + // At least one test did not pass. + ContinuousTestResult_FAILED ContinuousTestResult_AggregatedTestResult = 2 +) + +// Enum value maps for ContinuousTestResult_AggregatedTestResult. +var ( + ContinuousTestResult_AggregatedTestResult_name = map[int32]string{ + 0: "AGGREGATED_TEST_RESULT_UNSPECIFIED", + 1: "PASSED", + 2: "FAILED", + } + ContinuousTestResult_AggregatedTestResult_value = map[string]int32{ + "AGGREGATED_TEST_RESULT_UNSPECIFIED": 0, + "PASSED": 1, + "FAILED": 2, + } +) + +func (x ContinuousTestResult_AggregatedTestResult) Enum() *ContinuousTestResult_AggregatedTestResult { + p := new(ContinuousTestResult_AggregatedTestResult) + *p = x + return p +} + +func (x ContinuousTestResult_AggregatedTestResult) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ContinuousTestResult_AggregatedTestResult) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_enumTypes[0].Descriptor() +} + +func (ContinuousTestResult_AggregatedTestResult) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_enumTypes[0] +} + +func (x ContinuousTestResult_AggregatedTestResult) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ContinuousTestResult_AggregatedTestResult.Descriptor instead. +func (ContinuousTestResult_AggregatedTestResult) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{9, 0} +} + +// Represents an environment for an agent. You can create multiple versions +// of your agent and publish them to separate environments. When you edit an +// agent, you are editing the draft agent. At any point, you can save the draft +// agent as an agent version, which is an immutable snapshot of your agent. When +// you save the draft agent, it is published to the default environment. When +// you create agent versions, you can publish them to custom environments. You +// can create a variety of custom environments for testing, development, +// production, etc. +type Environment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the environment. + // Format: `projects//locations//agents//environments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the environment (unique in an agent). Limit of + // 64 characters. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The human-readable description of the environment. The maximum length is + // 500 characters. If exceeded, the request is rejected. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Required. A list of configurations for flow versions. You should include version + // configs for all flows that are reachable from [`Start + // Flow`][Agent.start_flow] in the agent. Otherwise, an error will be + // returned. + VersionConfigs []*Environment_VersionConfig `protobuf:"bytes,6,rep,name=version_configs,json=versionConfigs,proto3" json:"version_configs,omitempty"` + // Output only. Update time of this environment. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // The test cases config for continuous tests of this environment. + TestCasesConfig *Environment_TestCasesConfig `protobuf:"bytes,7,opt,name=test_cases_config,json=testCasesConfig,proto3" json:"test_cases_config,omitempty"` + // The webhook configuration for this environment. + WebhookConfig *Environment_WebhookConfig `protobuf:"bytes,10,opt,name=webhook_config,json=webhookConfig,proto3" json:"webhook_config,omitempty"` +} + +func (x *Environment) Reset() { + *x = Environment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment) ProtoMessage() {} + +func (x *Environment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment.ProtoReflect.Descriptor instead. +func (*Environment) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{0} +} + +func (x *Environment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Environment) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Environment) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Environment) GetVersionConfigs() []*Environment_VersionConfig { + if x != nil { + return x.VersionConfigs + } + return nil +} + +func (x *Environment) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Environment) GetTestCasesConfig() *Environment_TestCasesConfig { + if x != nil { + return x.TestCasesConfig + } + return nil +} + +func (x *Environment) GetWebhookConfig() *Environment_WebhookConfig { + if x != nil { + return x.WebhookConfig + } + return nil +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments]. +type ListEnvironmentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to list all environments for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListEnvironmentsRequest) Reset() { + *x = ListEnvironmentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnvironmentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnvironmentsRequest) ProtoMessage() {} + +func (x *ListEnvironmentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEnvironmentsRequest.ProtoReflect.Descriptor instead. +func (*ListEnvironmentsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{1} +} + +func (x *ListEnvironmentsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListEnvironmentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListEnvironmentsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments]. +type ListEnvironmentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of environments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListEnvironmentsResponse) Reset() { + *x = ListEnvironmentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListEnvironmentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEnvironmentsResponse) ProtoMessage() {} + +func (x *ListEnvironmentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEnvironmentsResponse.ProtoReflect.Descriptor instead. +func (*ListEnvironmentsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{2} +} + +func (x *ListEnvironmentsResponse) GetEnvironments() []*Environment { + if x != nil { + return x.Environments + } + return nil +} + +func (x *ListEnvironmentsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Environments.GetEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironment]. +type GetEnvironmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // Format: `projects//locations//agents//environments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetEnvironmentRequest) Reset() { + *x = GetEnvironmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEnvironmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEnvironmentRequest) ProtoMessage() {} + +func (x *GetEnvironmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEnvironmentRequest.ProtoReflect.Descriptor instead. +func (*GetEnvironmentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{3} +} + +func (x *GetEnvironmentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironment]. +type CreateEnvironmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The environment to create. + Environment *Environment `protobuf:"bytes,2,opt,name=environment,proto3" json:"environment,omitempty"` +} + +func (x *CreateEnvironmentRequest) Reset() { + *x = CreateEnvironmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateEnvironmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateEnvironmentRequest) ProtoMessage() {} + +func (x *CreateEnvironmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateEnvironmentRequest.ProtoReflect.Descriptor instead. +func (*CreateEnvironmentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateEnvironmentRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateEnvironmentRequest) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +// The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironment]. +type UpdateEnvironmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The environment to update. + Environment *Environment `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"` + // Required. The mask to control which fields get updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateEnvironmentRequest) Reset() { + *x = UpdateEnvironmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateEnvironmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateEnvironmentRequest) ProtoMessage() {} + +func (x *UpdateEnvironmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateEnvironmentRequest.ProtoReflect.Descriptor instead. +func (*UpdateEnvironmentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateEnvironmentRequest) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *UpdateEnvironmentRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironment]. +type DeleteEnvironmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. + // Format: `projects//locations//agents//environments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteEnvironmentRequest) Reset() { + *x = DeleteEnvironmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteEnvironmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteEnvironmentRequest) ProtoMessage() {} + +func (x *DeleteEnvironmentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteEnvironmentRequest.ProtoReflect.Descriptor instead. +func (*DeleteEnvironmentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteEnvironmentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistory]. +type LookupEnvironmentHistoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the environment to look up the history for. + // Format: `projects//locations//agents//environments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *LookupEnvironmentHistoryRequest) Reset() { + *x = LookupEnvironmentHistoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupEnvironmentHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupEnvironmentHistoryRequest) ProtoMessage() {} + +func (x *LookupEnvironmentHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupEnvironmentHistoryRequest.ProtoReflect.Descriptor instead. +func (*LookupEnvironmentHistoryRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{7} +} + +func (x *LookupEnvironmentHistoryRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LookupEnvironmentHistoryRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *LookupEnvironmentHistoryRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistory]. +type LookupEnvironmentHistoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Represents a list of snapshots for an environment. Time of the snapshots is + // stored in [`update_time`][google.cloud.dialogflow.cx.v3beta1.Environment.update_time]. + Environments []*Environment `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *LookupEnvironmentHistoryResponse) Reset() { + *x = LookupEnvironmentHistoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupEnvironmentHistoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupEnvironmentHistoryResponse) ProtoMessage() {} + +func (x *LookupEnvironmentHistoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupEnvironmentHistoryResponse.ProtoReflect.Descriptor instead. +func (*LookupEnvironmentHistoryResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{8} +} + +func (x *LookupEnvironmentHistoryResponse) GetEnvironments() []*Environment { + if x != nil { + return x.Environments + } + return nil +} + +func (x *LookupEnvironmentHistoryResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Represents a result from running a test case in an agent environment. +type ContinuousTestResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name for the continuous test result. Format: + // `projects//locations//agents//environments//continuousTestResults/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The result of this continuous test run, i.e. whether all the tests in this + // continuous test run pass or not. + Result ContinuousTestResult_AggregatedTestResult `protobuf:"varint,2,opt,name=result,proto3,enum=google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult_AggregatedTestResult" json:"result,omitempty"` + // A list of individual test case results names in this continuous test run. + TestCaseResults []string `protobuf:"bytes,3,rep,name=test_case_results,json=testCaseResults,proto3" json:"test_case_results,omitempty"` + // Time when the continuous testing run starts. + RunTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=run_time,json=runTime,proto3" json:"run_time,omitempty"` +} + +func (x *ContinuousTestResult) Reset() { + *x = ContinuousTestResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContinuousTestResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContinuousTestResult) ProtoMessage() {} + +func (x *ContinuousTestResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContinuousTestResult.ProtoReflect.Descriptor instead. +func (*ContinuousTestResult) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{9} +} + +func (x *ContinuousTestResult) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ContinuousTestResult) GetResult() ContinuousTestResult_AggregatedTestResult { + if x != nil { + return x.Result + } + return ContinuousTestResult_AGGREGATED_TEST_RESULT_UNSPECIFIED +} + +func (x *ContinuousTestResult) GetTestCaseResults() []string { + if x != nil { + return x.TestCaseResults + } + return nil +} + +func (x *ContinuousTestResult) GetRunTime() *timestamppb.Timestamp { + if x != nil { + return x.RunTime + } + return nil +} + +// The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. +type RunContinuousTestRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: `projects//locations//agents//environments/`. + Environment string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"` +} + +func (x *RunContinuousTestRequest) Reset() { + *x = RunContinuousTestRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunContinuousTestRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunContinuousTestRequest) ProtoMessage() {} + +func (x *RunContinuousTestRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunContinuousTestRequest.ProtoReflect.Descriptor instead. +func (*RunContinuousTestRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{10} +} + +func (x *RunContinuousTestRequest) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +// The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest]. +type RunContinuousTestResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The result for a continuous test run. + ContinuousTestResult *ContinuousTestResult `protobuf:"bytes,1,opt,name=continuous_test_result,json=continuousTestResult,proto3" json:"continuous_test_result,omitempty"` +} + +func (x *RunContinuousTestResponse) Reset() { + *x = RunContinuousTestResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunContinuousTestResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunContinuousTestResponse) ProtoMessage() {} + +func (x *RunContinuousTestResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunContinuousTestResponse.ProtoReflect.Descriptor instead. +func (*RunContinuousTestResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{11} +} + +func (x *RunContinuousTestResponse) GetContinuousTestResult() *ContinuousTestResult { + if x != nil { + return x.ContinuousTestResult + } + return nil +} + +// Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest] long running +// operation. +type RunContinuousTestMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The test errors. + Errors []*TestError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *RunContinuousTestMetadata) Reset() { + *x = RunContinuousTestMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RunContinuousTestMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RunContinuousTestMetadata) ProtoMessage() {} + +func (x *RunContinuousTestMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RunContinuousTestMetadata.ProtoReflect.Descriptor instead. +func (*RunContinuousTestMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{12} +} + +func (x *RunContinuousTestMetadata) GetErrors() []*TestError { + if x != nil { + return x.Errors + } + return nil +} + +// The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults]. +type ListContinuousTestResultsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The environment to list results for. + // Format: `projects//locations//agents// + // environments/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListContinuousTestResultsRequest) Reset() { + *x = ListContinuousTestResultsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListContinuousTestResultsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListContinuousTestResultsRequest) ProtoMessage() {} + +func (x *ListContinuousTestResultsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListContinuousTestResultsRequest.ProtoReflect.Descriptor instead. +func (*ListContinuousTestResultsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{13} +} + +func (x *ListContinuousTestResultsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListContinuousTestResultsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListContinuousTestResultsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Environments.ListTestCaseResults][]. +type ListContinuousTestResultsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of continuous test results. + ContinuousTestResults []*ContinuousTestResult `protobuf:"bytes,1,rep,name=continuous_test_results,json=continuousTestResults,proto3" json:"continuous_test_results,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListContinuousTestResultsResponse) Reset() { + *x = ListContinuousTestResultsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListContinuousTestResultsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListContinuousTestResultsResponse) ProtoMessage() {} + +func (x *ListContinuousTestResultsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListContinuousTestResultsResponse.ProtoReflect.Descriptor instead. +func (*ListContinuousTestResultsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{14} +} + +func (x *ListContinuousTestResultsResponse) GetContinuousTestResults() []*ContinuousTestResult { + if x != nil { + return x.ContinuousTestResults + } + return nil +} + +func (x *ListContinuousTestResultsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow]. +type DeployFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The environment to deploy the flow to. + // Format: `projects//locations//agents// + // environments/`. + Environment string `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"` + // Required. The flow version to deploy. + // Format: `projects//locations//agents// + // flows//versions/`. + FlowVersion string `protobuf:"bytes,2,opt,name=flow_version,json=flowVersion,proto3" json:"flow_version,omitempty"` +} + +func (x *DeployFlowRequest) Reset() { + *x = DeployFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployFlowRequest) ProtoMessage() {} + +func (x *DeployFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployFlowRequest.ProtoReflect.Descriptor instead. +func (*DeployFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{15} +} + +func (x *DeployFlowRequest) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +func (x *DeployFlowRequest) GetFlowVersion() string { + if x != nil { + return x.FlowVersion + } + return "" +} + +// The response message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow]. +type DeployFlowResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The updated environment where the flow is deployed. + Environment *Environment `protobuf:"bytes,1,opt,name=environment,proto3" json:"environment,omitempty"` + // The name of the flow version deployment. + // Format: `projects//locations//agents// + // environments//deployments/`. + Deployment string `protobuf:"bytes,2,opt,name=deployment,proto3" json:"deployment,omitempty"` +} + +func (x *DeployFlowResponse) Reset() { + *x = DeployFlowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployFlowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployFlowResponse) ProtoMessage() {} + +func (x *DeployFlowResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployFlowResponse.ProtoReflect.Descriptor instead. +func (*DeployFlowResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{16} +} + +func (x *DeployFlowResponse) GetEnvironment() *Environment { + if x != nil { + return x.Environment + } + return nil +} + +func (x *DeployFlowResponse) GetDeployment() string { + if x != nil { + return x.Deployment + } + return "" +} + +// Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow] long running +// operation. +type DeployFlowMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Errors of running deployment tests. + TestErrors []*TestError `protobuf:"bytes,1,rep,name=test_errors,json=testErrors,proto3" json:"test_errors,omitempty"` +} + +func (x *DeployFlowMetadata) Reset() { + *x = DeployFlowMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployFlowMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployFlowMetadata) ProtoMessage() {} + +func (x *DeployFlowMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployFlowMetadata.ProtoReflect.Descriptor instead. +func (*DeployFlowMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{17} +} + +func (x *DeployFlowMetadata) GetTestErrors() []*TestError { + if x != nil { + return x.TestErrors + } + return nil +} + +// Configuration for the version. +type Environment_VersionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: projects//locations//agents//flows//versions/. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *Environment_VersionConfig) Reset() { + *x = Environment_VersionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment_VersionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment_VersionConfig) ProtoMessage() {} + +func (x *Environment_VersionConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment_VersionConfig.ProtoReflect.Descriptor instead. +func (*Environment_VersionConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Environment_VersionConfig) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +// The configuration for continuous tests. +type Environment_TestCasesConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of test case names to run. They should be under the same agent. + // Format of each test case name: `projects//locations/ + // /agents//testCases/` + TestCases []string `protobuf:"bytes,1,rep,name=test_cases,json=testCases,proto3" json:"test_cases,omitempty"` + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] periodically. + // Default false. If set to true, run once a day. + EnableContinuousRun bool `protobuf:"varint,2,opt,name=enable_continuous_run,json=enableContinuousRun,proto3" json:"enable_continuous_run,omitempty"` + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig.test_cases] before + // deploying a flow version to the environment. Default false. + EnablePredeploymentRun bool `protobuf:"varint,3,opt,name=enable_predeployment_run,json=enablePredeploymentRun,proto3" json:"enable_predeployment_run,omitempty"` +} + +func (x *Environment_TestCasesConfig) Reset() { + *x = Environment_TestCasesConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment_TestCasesConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment_TestCasesConfig) ProtoMessage() {} + +func (x *Environment_TestCasesConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment_TestCasesConfig.ProtoReflect.Descriptor instead. +func (*Environment_TestCasesConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Environment_TestCasesConfig) GetTestCases() []string { + if x != nil { + return x.TestCases + } + return nil +} + +func (x *Environment_TestCasesConfig) GetEnableContinuousRun() bool { + if x != nil { + return x.EnableContinuousRun + } + return false +} + +func (x *Environment_TestCasesConfig) GetEnablePredeploymentRun() bool { + if x != nil { + return x.EnablePredeploymentRun + } + return false +} + +// Configuration for webhooks. +type Environment_WebhookConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of webhooks to override for the agent environment. The webhook + // must exist in the agent. You can override fields in + // [`generic_web_service`][google.cloud.dialogflow.cx.v3beta1.Webhook.generic_web_service] and + // [`service_directory`][google.cloud.dialogflow.cx.v3beta1.Webhook.service_directory]. + WebhookOverrides []*Webhook `protobuf:"bytes,1,rep,name=webhook_overrides,json=webhookOverrides,proto3" json:"webhook_overrides,omitempty"` +} + +func (x *Environment_WebhookConfig) Reset() { + *x = Environment_WebhookConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Environment_WebhookConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Environment_WebhookConfig) ProtoMessage() {} + +func (x *Environment_WebhookConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Environment_WebhookConfig.ProtoReflect.Descriptor instead. +func (*Environment_WebhookConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Environment_WebhookConfig) GetWebhookOverrides() []*Webhook { + if x != nil { + return x.WebhookOverrides + } + return nil +} + +var File_google_cloud_dialogflow_cx_v3beta1_environment_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x30, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x07, 0x0a, 0x0b, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6b, 0x0a, 0x0f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6b, 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, + 0x73, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0f, 0x74, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x64, 0x0a, 0x0e, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x68, 0x6f, + 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x54, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x43, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x23, 0x0a, 0x21, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0xc7, + 0x01, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x46, 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x52, + 0x09, 0x74, 0x65, 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, + 0x72, 0x75, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x52, 0x75, 0x6e, 0x12, 0x38, + 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x1a, 0x69, 0x0a, 0x0d, 0x57, 0x65, 0x62, 0x68, + 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x11, 0x77, 0x65, 0x62, + 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x52, 0x10, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x73, 0x3a, 0x7d, 0xea, 0x41, 0x7a, 0x0a, 0x25, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x51, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x7d, 0x22, 0x9c, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x12, 0x25, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, + 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5a, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x12, 0x25, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x56, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x5d, 0x0a, 0x18, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x1f, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9f, 0x01, 0x0a, + 0x20, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb5, + 0x04, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, + 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x59, 0x0a, 0x11, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x2d, 0xfa, + 0x41, 0x2a, 0x0a, 0x28, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x65, + 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x74, 0x65, + 0x73, 0x74, 0x43, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x35, 0x0a, + 0x08, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x72, 0x75, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x14, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x64, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x0a, 0x22, + 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x3a, 0xb7, 0x01, 0xea, + 0x41, 0xb3, 0x01, 0x0a, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x80, 0x01, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, + 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x7b, 0x63, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x7d, 0x22, 0x6b, 0x0a, 0x18, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, + 0x25, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6e, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, + 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, + 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x14, 0x63, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x62, 0x0a, 0x19, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, + 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x45, + 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x30, 0x12, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xbd, 0x01, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x17, + 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x0b, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x27, 0x0a, 0x25, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, + 0x0c, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x87, 0x01, 0x0a, 0x12, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x64, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x46, + 0x6c, 0x6f, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x0b, 0x74, + 0x65, 0x73, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x0a, 0x74, 0x65, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x32, 0xb2, 0x12, 0x0a, 0x0c, + 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xde, 0x01, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xcb, 0x01, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x4d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x83, 0x02, 0x0a, 0x11, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x22, 0x3e, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0xda, 0x41, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0xca, 0x41, 0x25, 0x0a, 0x0b, 0x45, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x12, 0x94, 0x02, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, + 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x32, 0x4a, 0x2f, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0xda, 0x41, 0x17, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0xca, 0x41, 0x25, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0xb8, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x2a, 0x3e, 0x2f, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x8d, 0x02, 0x0a, 0x18, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x59, 0x12, 0x57, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x8e, 0x02, 0x0a, 0x11, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9b, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5c, 0x22, + 0x57, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x36, 0x0a, 0x19, + 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x52, 0x75, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x91, 0x02, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x12, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x58, 0x12, 0x56, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xeb, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x86, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x55, 0x22, 0x50, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x28, 0x0a, 0x12, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x78, 0xca, 0x41, 0x19, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x42, 0xd8, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, + 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, + 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_environment_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_google_cloud_dialogflow_cx_v3beta1_environment_proto_goTypes = []interface{}{ + (ContinuousTestResult_AggregatedTestResult)(0), // 0: google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + (*Environment)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.Environment + (*ListEnvironmentsRequest)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + (*ListEnvironmentsResponse)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + (*GetEnvironmentRequest)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + (*CreateEnvironmentRequest)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + (*UpdateEnvironmentRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + (*DeleteEnvironmentRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + (*LookupEnvironmentHistoryRequest)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + (*LookupEnvironmentHistoryResponse)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + (*ContinuousTestResult)(nil), // 10: google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + (*RunContinuousTestRequest)(nil), // 11: google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + (*RunContinuousTestResponse)(nil), // 12: google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse + (*RunContinuousTestMetadata)(nil), // 13: google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata + (*ListContinuousTestResultsRequest)(nil), // 14: google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + (*ListContinuousTestResultsResponse)(nil), // 15: google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + (*DeployFlowRequest)(nil), // 16: google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + (*DeployFlowResponse)(nil), // 17: google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse + (*DeployFlowMetadata)(nil), // 18: google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata + (*Environment_VersionConfig)(nil), // 19: google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + (*Environment_TestCasesConfig)(nil), // 20: google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + (*Environment_WebhookConfig)(nil), // 21: google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 23: google.protobuf.FieldMask + (*TestError)(nil), // 24: google.cloud.dialogflow.cx.v3beta1.TestError + (*Webhook)(nil), // 25: google.cloud.dialogflow.cx.v3beta1.Webhook + (*longrunning.Operation)(nil), // 26: google.longrunning.Operation + (*emptypb.Empty)(nil), // 27: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3beta1_environment_proto_depIdxs = []int32{ + 19, // 0: google.cloud.dialogflow.cx.v3beta1.Environment.version_configs:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment.VersionConfig + 22, // 1: google.cloud.dialogflow.cx.v3beta1.Environment.update_time:type_name -> google.protobuf.Timestamp + 20, // 2: google.cloud.dialogflow.cx.v3beta1.Environment.test_cases_config:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment.TestCasesConfig + 21, // 3: google.cloud.dialogflow.cx.v3beta1.Environment.webhook_config:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig + 1, // 4: google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse.environments:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment + 1, // 5: google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest.environment:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment + 1, // 6: google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.environment:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment + 23, // 7: google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 8: google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse.environments:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment + 0, // 9: google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.result:type_name -> google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.AggregatedTestResult + 22, // 10: google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult.run_time:type_name -> google.protobuf.Timestamp + 10, // 11: google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse.continuous_test_result:type_name -> google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + 24, // 12: google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata.errors:type_name -> google.cloud.dialogflow.cx.v3beta1.TestError + 10, // 13: google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse.continuous_test_results:type_name -> google.cloud.dialogflow.cx.v3beta1.ContinuousTestResult + 1, // 14: google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse.environment:type_name -> google.cloud.dialogflow.cx.v3beta1.Environment + 24, // 15: google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata.test_errors:type_name -> google.cloud.dialogflow.cx.v3beta1.TestError + 25, // 16: google.cloud.dialogflow.cx.v3beta1.Environment.WebhookConfig.webhook_overrides:type_name -> google.cloud.dialogflow.cx.v3beta1.Webhook + 2, // 17: google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments:input_type -> google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest + 4, // 18: google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironment:input_type -> google.cloud.dialogflow.cx.v3beta1.GetEnvironmentRequest + 5, // 19: google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironment:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateEnvironmentRequest + 6, // 20: google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironment:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateEnvironmentRequest + 7, // 21: google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironment:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteEnvironmentRequest + 8, // 22: google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistory:input_type -> google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest + 11, // 23: google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest:input_type -> google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest + 14, // 24: google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults:input_type -> google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest + 16, // 25: google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.DeployFlowRequest + 3, // 26: google.cloud.dialogflow.cx.v3beta1.Environments.ListEnvironments:output_type -> google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse + 1, // 27: google.cloud.dialogflow.cx.v3beta1.Environments.GetEnvironment:output_type -> google.cloud.dialogflow.cx.v3beta1.Environment + 26, // 28: google.cloud.dialogflow.cx.v3beta1.Environments.CreateEnvironment:output_type -> google.longrunning.Operation + 26, // 29: google.cloud.dialogflow.cx.v3beta1.Environments.UpdateEnvironment:output_type -> google.longrunning.Operation + 27, // 30: google.cloud.dialogflow.cx.v3beta1.Environments.DeleteEnvironment:output_type -> google.protobuf.Empty + 9, // 31: google.cloud.dialogflow.cx.v3beta1.Environments.LookupEnvironmentHistory:output_type -> google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse + 26, // 32: google.cloud.dialogflow.cx.v3beta1.Environments.RunContinuousTest:output_type -> google.longrunning.Operation + 15, // 33: google.cloud.dialogflow.cx.v3beta1.Environments.ListContinuousTestResults:output_type -> google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse + 26, // 34: google.cloud.dialogflow.cx.v3beta1.Environments.DeployFlow:output_type -> google.longrunning.Operation + 26, // [26:35] is the sub-list for method output_type + 17, // [17:26] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_environment_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_environment_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_environment_proto != nil { + return + } + file_google_cloud_dialogflow_cx_v3beta1_test_case_proto_init() + file_google_cloud_dialogflow_cx_v3beta1_webhook_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnvironmentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListEnvironmentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEnvironmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateEnvironmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateEnvironmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteEnvironmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupEnvironmentHistoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupEnvironmentHistoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContinuousTestResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunContinuousTestRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunContinuousTestResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RunContinuousTestMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListContinuousTestResultsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListContinuousTestResultsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployFlowResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeployFlowMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment_VersionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment_TestCasesConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Environment_WebhookConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDesc, + NumEnums: 1, + NumMessages: 21, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_environment_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_environment_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_environment_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_environment_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_environment_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_environment_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// EnvironmentsClient is the client API for Environments service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EnvironmentsClient interface { + // Returns the list of all environments in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. + ListEnvironments(ctx context.Context, in *ListEnvironmentsRequest, opts ...grpc.CallOption) (*ListEnvironmentsResponse, error) + // Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + GetEnvironment(ctx context.Context, in *GetEnvironmentRequest, opts ...grpc.CallOption) (*Environment, error) + // Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + CreateEnvironment(ctx context.Context, in *CreateEnvironmentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + UpdateEnvironment(ctx context.Context, in *UpdateEnvironmentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + DeleteEnvironment(ctx context.Context, in *DeleteEnvironmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + LookupEnvironmentHistory(ctx context.Context, in *LookupEnvironmentHistoryRequest, opts ...grpc.CallOption) (*LookupEnvironmentHistoryResponse, error) + // Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata] + // - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse] + RunContinuousTest(ctx context.Context, in *RunContinuousTestRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Fetches a list of continuous test results for a given environment. + ListContinuousTestResults(ctx context.Context, in *ListContinuousTestResultsRequest, opts ...grpc.CallOption) (*ListContinuousTestResultsResponse, error) + // Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata] + // - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse] + DeployFlow(ctx context.Context, in *DeployFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) +} + +type environmentsClient struct { + cc grpc.ClientConnInterface +} + +func NewEnvironmentsClient(cc grpc.ClientConnInterface) EnvironmentsClient { + return &environmentsClient{cc} +} + +func (c *environmentsClient) ListEnvironments(ctx context.Context, in *ListEnvironmentsRequest, opts ...grpc.CallOption) (*ListEnvironmentsResponse, error) { + out := new(ListEnvironmentsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/ListEnvironments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) GetEnvironment(ctx context.Context, in *GetEnvironmentRequest, opts ...grpc.CallOption) (*Environment, error) { + out := new(Environment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/GetEnvironment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) CreateEnvironment(ctx context.Context, in *CreateEnvironmentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/CreateEnvironment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) UpdateEnvironment(ctx context.Context, in *UpdateEnvironmentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/UpdateEnvironment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) DeleteEnvironment(ctx context.Context, in *DeleteEnvironmentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/DeleteEnvironment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) LookupEnvironmentHistory(ctx context.Context, in *LookupEnvironmentHistoryRequest, opts ...grpc.CallOption) (*LookupEnvironmentHistoryResponse, error) { + out := new(LookupEnvironmentHistoryResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/LookupEnvironmentHistory", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) RunContinuousTest(ctx context.Context, in *RunContinuousTestRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/RunContinuousTest", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) ListContinuousTestResults(ctx context.Context, in *ListContinuousTestResultsRequest, opts ...grpc.CallOption) (*ListContinuousTestResultsResponse, error) { + out := new(ListContinuousTestResultsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/ListContinuousTestResults", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *environmentsClient) DeployFlow(ctx context.Context, in *DeployFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Environments/DeployFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EnvironmentsServer is the server API for Environments service. +type EnvironmentsServer interface { + // Returns the list of all environments in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. + ListEnvironments(context.Context, *ListEnvironmentsRequest) (*ListEnvironmentsResponse, error) + // Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + GetEnvironment(context.Context, *GetEnvironmentRequest) (*Environment, error) + // Creates an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3beta1.Agent]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + CreateEnvironment(context.Context, *CreateEnvironmentRequest) (*longrunning.Operation, error) + // Updates the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] + UpdateEnvironment(context.Context, *UpdateEnvironmentRequest) (*longrunning.Operation, error) + // Deletes the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + DeleteEnvironment(context.Context, *DeleteEnvironmentRequest) (*emptypb.Empty, error) + // Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + LookupEnvironmentHistory(context.Context, *LookupEnvironmentHistoryRequest) (*LookupEnvironmentHistoryResponse, error) + // Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata] + // - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse] + RunContinuousTest(context.Context, *RunContinuousTestRequest) (*longrunning.Operation, error) + // Fetches a list of continuous test results for a given environment. + ListContinuousTestResults(context.Context, *ListContinuousTestResultsRequest) (*ListContinuousTestResultsResponse, error) + // Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3beta1.DeployFlowMetadata] + // - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse] + DeployFlow(context.Context, *DeployFlowRequest) (*longrunning.Operation, error) +} + +// UnimplementedEnvironmentsServer can be embedded to have forward compatible implementations. +type UnimplementedEnvironmentsServer struct { +} + +func (*UnimplementedEnvironmentsServer) ListEnvironments(context.Context, *ListEnvironmentsRequest) (*ListEnvironmentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEnvironments not implemented") +} +func (*UnimplementedEnvironmentsServer) GetEnvironment(context.Context, *GetEnvironmentRequest) (*Environment, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEnvironment not implemented") +} +func (*UnimplementedEnvironmentsServer) CreateEnvironment(context.Context, *CreateEnvironmentRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateEnvironment not implemented") +} +func (*UnimplementedEnvironmentsServer) UpdateEnvironment(context.Context, *UpdateEnvironmentRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateEnvironment not implemented") +} +func (*UnimplementedEnvironmentsServer) DeleteEnvironment(context.Context, *DeleteEnvironmentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteEnvironment not implemented") +} +func (*UnimplementedEnvironmentsServer) LookupEnvironmentHistory(context.Context, *LookupEnvironmentHistoryRequest) (*LookupEnvironmentHistoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupEnvironmentHistory not implemented") +} +func (*UnimplementedEnvironmentsServer) RunContinuousTest(context.Context, *RunContinuousTestRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method RunContinuousTest not implemented") +} +func (*UnimplementedEnvironmentsServer) ListContinuousTestResults(context.Context, *ListContinuousTestResultsRequest) (*ListContinuousTestResultsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListContinuousTestResults not implemented") +} +func (*UnimplementedEnvironmentsServer) DeployFlow(context.Context, *DeployFlowRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployFlow not implemented") +} + +func RegisterEnvironmentsServer(s *grpc.Server, srv EnvironmentsServer) { + s.RegisterService(&_Environments_serviceDesc, srv) +} + +func _Environments_ListEnvironments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEnvironmentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).ListEnvironments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/ListEnvironments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).ListEnvironments(ctx, req.(*ListEnvironmentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_GetEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEnvironmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).GetEnvironment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/GetEnvironment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).GetEnvironment(ctx, req.(*GetEnvironmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_CreateEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateEnvironmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).CreateEnvironment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/CreateEnvironment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).CreateEnvironment(ctx, req.(*CreateEnvironmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_UpdateEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateEnvironmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).UpdateEnvironment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/UpdateEnvironment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).UpdateEnvironment(ctx, req.(*UpdateEnvironmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_DeleteEnvironment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteEnvironmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).DeleteEnvironment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/DeleteEnvironment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).DeleteEnvironment(ctx, req.(*DeleteEnvironmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_LookupEnvironmentHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupEnvironmentHistoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).LookupEnvironmentHistory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/LookupEnvironmentHistory", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).LookupEnvironmentHistory(ctx, req.(*LookupEnvironmentHistoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_RunContinuousTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunContinuousTestRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).RunContinuousTest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/RunContinuousTest", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).RunContinuousTest(ctx, req.(*RunContinuousTestRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_ListContinuousTestResults_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListContinuousTestResultsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).ListContinuousTestResults(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/ListContinuousTestResults", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).ListContinuousTestResults(ctx, req.(*ListContinuousTestResultsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Environments_DeployFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeployFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EnvironmentsServer).DeployFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Environments/DeployFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EnvironmentsServer).DeployFlow(ctx, req.(*DeployFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Environments_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Environments", + HandlerType: (*EnvironmentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListEnvironments", + Handler: _Environments_ListEnvironments_Handler, + }, + { + MethodName: "GetEnvironment", + Handler: _Environments_GetEnvironment_Handler, + }, + { + MethodName: "CreateEnvironment", + Handler: _Environments_CreateEnvironment_Handler, + }, + { + MethodName: "UpdateEnvironment", + Handler: _Environments_UpdateEnvironment_Handler, + }, + { + MethodName: "DeleteEnvironment", + Handler: _Environments_DeleteEnvironment_Handler, + }, + { + MethodName: "LookupEnvironmentHistory", + Handler: _Environments_LookupEnvironmentHistory_Handler, + }, + { + MethodName: "RunContinuousTest", + Handler: _Environments_RunContinuousTest_Handler, + }, + { + MethodName: "ListContinuousTestResults", + Handler: _Environments_ListContinuousTestResults_Handler, + }, + { + MethodName: "DeployFlow", + Handler: _Environments_DeployFlow_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/environment.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go new file mode 100644 index 000000000000..0ca155c69d9b --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/experiment.pb.go @@ -0,0 +1,2813 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/experiment.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The state of the experiment. +type Experiment_State int32 + +const ( + // State unspecified. + Experiment_STATE_UNSPECIFIED Experiment_State = 0 + // The experiment is created but not started yet. + Experiment_DRAFT Experiment_State = 1 + // The experiment is running. + Experiment_RUNNING Experiment_State = 2 + // The experiment is done. + Experiment_DONE Experiment_State = 3 + // The experiment with auto-rollout enabled has failed. + Experiment_ROLLOUT_FAILED Experiment_State = 4 +) + +// Enum value maps for Experiment_State. +var ( + Experiment_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "DRAFT", + 2: "RUNNING", + 3: "DONE", + 4: "ROLLOUT_FAILED", + } + Experiment_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "RUNNING": 2, + "DONE": 3, + "ROLLOUT_FAILED": 4, + } +) + +func (x Experiment_State) Enum() *Experiment_State { + p := new(Experiment_State) + *p = x + return p +} + +func (x Experiment_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Experiment_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes[0].Descriptor() +} + +func (Experiment_State) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes[0] +} + +func (x Experiment_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Experiment_State.Descriptor instead. +func (Experiment_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 0} +} + +// Types of ratio-based metric for Dialogflow experiment. +type Experiment_Result_MetricType int32 + +const ( + // Metric unspecified. + Experiment_Result_METRIC_UNSPECIFIED Experiment_Result_MetricType = 0 + // Percentage of contained sessions without user calling back in 24 hours. + Experiment_Result_CONTAINED_SESSION_NO_CALLBACK_RATE Experiment_Result_MetricType = 1 + // Percentage of sessions that were handed to a human agent. + Experiment_Result_LIVE_AGENT_HANDOFF_RATE Experiment_Result_MetricType = 2 + // Percentage of sessions with the same user calling back. + Experiment_Result_CALLBACK_SESSION_RATE Experiment_Result_MetricType = 3 + // Percentage of sessions where user hung up. + Experiment_Result_ABANDONED_SESSION_RATE Experiment_Result_MetricType = 4 + // Percentage of sessions reached Dialogflow 'END_PAGE' or + // 'END_SESSION'. + Experiment_Result_SESSION_END_RATE Experiment_Result_MetricType = 5 +) + +// Enum value maps for Experiment_Result_MetricType. +var ( + Experiment_Result_MetricType_name = map[int32]string{ + 0: "METRIC_UNSPECIFIED", + 1: "CONTAINED_SESSION_NO_CALLBACK_RATE", + 2: "LIVE_AGENT_HANDOFF_RATE", + 3: "CALLBACK_SESSION_RATE", + 4: "ABANDONED_SESSION_RATE", + 5: "SESSION_END_RATE", + } + Experiment_Result_MetricType_value = map[string]int32{ + "METRIC_UNSPECIFIED": 0, + "CONTAINED_SESSION_NO_CALLBACK_RATE": 1, + "LIVE_AGENT_HANDOFF_RATE": 2, + "CALLBACK_SESSION_RATE": 3, + "ABANDONED_SESSION_RATE": 4, + "SESSION_END_RATE": 5, + } +) + +func (x Experiment_Result_MetricType) Enum() *Experiment_Result_MetricType { + p := new(Experiment_Result_MetricType) + *p = x + return p +} + +func (x Experiment_Result_MetricType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Experiment_Result_MetricType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes[1].Descriptor() +} + +func (Experiment_Result_MetricType) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes[1] +} + +func (x Experiment_Result_MetricType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Experiment_Result_MetricType.Descriptor instead. +func (Experiment_Result_MetricType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 1, 0} +} + +// types of count-based metric for Dialogflow experiment. +type Experiment_Result_CountType int32 + +const ( + // Count type unspecified. + Experiment_Result_COUNT_TYPE_UNSPECIFIED Experiment_Result_CountType = 0 + // Total number of occurrences of a 'NO_MATCH'. + Experiment_Result_TOTAL_NO_MATCH_COUNT Experiment_Result_CountType = 1 + // Total number of turn counts. + Experiment_Result_TOTAL_TURN_COUNT Experiment_Result_CountType = 2 + // Average turn count in a session. + Experiment_Result_AVERAGE_TURN_COUNT Experiment_Result_CountType = 3 +) + +// Enum value maps for Experiment_Result_CountType. +var ( + Experiment_Result_CountType_name = map[int32]string{ + 0: "COUNT_TYPE_UNSPECIFIED", + 1: "TOTAL_NO_MATCH_COUNT", + 2: "TOTAL_TURN_COUNT", + 3: "AVERAGE_TURN_COUNT", + } + Experiment_Result_CountType_value = map[string]int32{ + "COUNT_TYPE_UNSPECIFIED": 0, + "TOTAL_NO_MATCH_COUNT": 1, + "TOTAL_TURN_COUNT": 2, + "AVERAGE_TURN_COUNT": 3, + } +) + +func (x Experiment_Result_CountType) Enum() *Experiment_Result_CountType { + p := new(Experiment_Result_CountType) + *p = x + return p +} + +func (x Experiment_Result_CountType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Experiment_Result_CountType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes[2].Descriptor() +} + +func (Experiment_Result_CountType) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes[2] +} + +func (x Experiment_Result_CountType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Experiment_Result_CountType.Descriptor instead. +func (Experiment_Result_CountType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 1, 1} +} + +// Represents an experiment in an environment. +type Experiment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the experiment. + // Format: projects//locations//agents//environments//experiments/.. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the experiment (unique in an environment). Limit + // of 64 characters. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The human-readable description of the experiment. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // The current state of the experiment. + // Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + // Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + // RUNNING->DONE. + State Experiment_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.dialogflow.cx.v3beta1.Experiment_State" json:"state,omitempty"` + // The definition of the experiment. + Definition *Experiment_Definition `protobuf:"bytes,5,opt,name=definition,proto3" json:"definition,omitempty"` + // The configuration for auto rollout. If set, there should be exactly two + // variants in the experiment (control variant being the default version of + // the flow), the traffic allocation for the non-control variant will + // gradually increase to 100% when conditions are met, and eventually + // replace the control variant to become the default version of the flow. + RolloutConfig *RolloutConfig `protobuf:"bytes,14,opt,name=rollout_config,json=rolloutConfig,proto3" json:"rollout_config,omitempty"` + // State of the auto rollout process. + RolloutState *RolloutState `protobuf:"bytes,15,opt,name=rollout_state,json=rolloutState,proto3" json:"rollout_state,omitempty"` + // The reason why rollout has failed. Should only be set when state is + // ROLLOUT_FAILED. + RolloutFailureReason string `protobuf:"bytes,16,opt,name=rollout_failure_reason,json=rolloutFailureReason,proto3" json:"rollout_failure_reason,omitempty"` + // Inference result of the experiment. + Result *Experiment_Result `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"` + // Creation time of this experiment. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Start time of this experiment. + StartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // End time of this experiment. + EndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Last update time of this experiment. + LastUpdateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` + // Maximum number of days to run the experiment. If auto-rollout is + // not enabled, default value and maximum will be 30 days. If auto-rollout is + // enabled, default value and maximum will be 6 days. + ExperimentLength *durationpb.Duration `protobuf:"bytes,11,opt,name=experiment_length,json=experimentLength,proto3" json:"experiment_length,omitempty"` + // The history of updates to the experiment variants. + VariantsHistory []*VariantsHistory `protobuf:"bytes,12,rep,name=variants_history,json=variantsHistory,proto3" json:"variants_history,omitempty"` +} + +func (x *Experiment) Reset() { + *x = Experiment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Experiment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Experiment) ProtoMessage() {} + +func (x *Experiment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Experiment.ProtoReflect.Descriptor instead. +func (*Experiment) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0} +} + +func (x *Experiment) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Experiment) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Experiment) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Experiment) GetState() Experiment_State { + if x != nil { + return x.State + } + return Experiment_STATE_UNSPECIFIED +} + +func (x *Experiment) GetDefinition() *Experiment_Definition { + if x != nil { + return x.Definition + } + return nil +} + +func (x *Experiment) GetRolloutConfig() *RolloutConfig { + if x != nil { + return x.RolloutConfig + } + return nil +} + +func (x *Experiment) GetRolloutState() *RolloutState { + if x != nil { + return x.RolloutState + } + return nil +} + +func (x *Experiment) GetRolloutFailureReason() string { + if x != nil { + return x.RolloutFailureReason + } + return "" +} + +func (x *Experiment) GetResult() *Experiment_Result { + if x != nil { + return x.Result + } + return nil +} + +func (x *Experiment) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Experiment) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *Experiment) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *Experiment) GetLastUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdateTime + } + return nil +} + +func (x *Experiment) GetExperimentLength() *durationpb.Duration { + if x != nil { + return x.ExperimentLength + } + return nil +} + +func (x *Experiment) GetVariantsHistory() []*VariantsHistory { + if x != nil { + return x.VariantsHistory + } + return nil +} + +// A list of flow version variants. +type VersionVariants struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of flow version variants. + Variants []*VersionVariants_Variant `protobuf:"bytes,1,rep,name=variants,proto3" json:"variants,omitempty"` +} + +func (x *VersionVariants) Reset() { + *x = VersionVariants{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionVariants) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionVariants) ProtoMessage() {} + +func (x *VersionVariants) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionVariants.ProtoReflect.Descriptor instead. +func (*VersionVariants) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{1} +} + +func (x *VersionVariants) GetVariants() []*VersionVariants_Variant { + if x != nil { + return x.Variants + } + return nil +} + +// The configuration for auto rollout. +type RolloutConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Steps to roll out a flow version. Steps should be sorted by percentage in + // ascending order. + RolloutSteps []*RolloutConfig_RolloutStep `protobuf:"bytes,1,rep,name=rollout_steps,json=rolloutSteps,proto3" json:"rollout_steps,omitempty"` + // The conditions that are used to evaluate the success of a rollout + // step. If not specified, all rollout steps will proceed to the next one + // unless failure conditions are met. E.g. "containment_rate > 60% AND + // callback_rate < 20%". See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + RolloutCondition string `protobuf:"bytes,2,opt,name=rollout_condition,json=rolloutCondition,proto3" json:"rollout_condition,omitempty"` + // The conditions that are used to evaluate the failure of a rollout + // step. If not specified, no rollout steps will fail. E.g. "containment_rate + // < 10% OR average_turn_count < 3". See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + FailureCondition string `protobuf:"bytes,3,opt,name=failure_condition,json=failureCondition,proto3" json:"failure_condition,omitempty"` +} + +func (x *RolloutConfig) Reset() { + *x = RolloutConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RolloutConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RolloutConfig) ProtoMessage() {} + +func (x *RolloutConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RolloutConfig.ProtoReflect.Descriptor instead. +func (*RolloutConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{2} +} + +func (x *RolloutConfig) GetRolloutSteps() []*RolloutConfig_RolloutStep { + if x != nil { + return x.RolloutSteps + } + return nil +} + +func (x *RolloutConfig) GetRolloutCondition() string { + if x != nil { + return x.RolloutCondition + } + return "" +} + +func (x *RolloutConfig) GetFailureCondition() string { + if x != nil { + return x.FailureCondition + } + return "" +} + +// State of the auto-rollout process. +type RolloutState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Display name of the current auto rollout step. + Step string `protobuf:"bytes,1,opt,name=step,proto3" json:"step,omitempty"` + // Index of the current step in the auto rollout steps list. + StepIndex int32 `protobuf:"varint,3,opt,name=step_index,json=stepIndex,proto3" json:"step_index,omitempty"` + // Start time of the current step. + StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` +} + +func (x *RolloutState) Reset() { + *x = RolloutState{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RolloutState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RolloutState) ProtoMessage() {} + +func (x *RolloutState) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RolloutState.ProtoReflect.Descriptor instead. +func (*RolloutState) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{3} +} + +func (x *RolloutState) GetStep() string { + if x != nil { + return x.Step + } + return "" +} + +func (x *RolloutState) GetStepIndex() int32 { + if x != nil { + return x.StepIndex + } + return 0 +} + +func (x *RolloutState) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +// The history of variants update. +type VariantsHistory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The variants updated. We currently only support single variant + // experiment. + // + // Types that are assignable to Variants: + // + // *VariantsHistory_VersionVariants + Variants isVariantsHistory_Variants `protobuf_oneof:"variants"` + // Update time of the variants. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *VariantsHistory) Reset() { + *x = VariantsHistory{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VariantsHistory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VariantsHistory) ProtoMessage() {} + +func (x *VariantsHistory) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VariantsHistory.ProtoReflect.Descriptor instead. +func (*VariantsHistory) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{4} +} + +func (m *VariantsHistory) GetVariants() isVariantsHistory_Variants { + if m != nil { + return m.Variants + } + return nil +} + +func (x *VariantsHistory) GetVersionVariants() *VersionVariants { + if x, ok := x.GetVariants().(*VariantsHistory_VersionVariants); ok { + return x.VersionVariants + } + return nil +} + +func (x *VariantsHistory) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +type isVariantsHistory_Variants interface { + isVariantsHistory_Variants() +} + +type VariantsHistory_VersionVariants struct { + // The flow versions as the variants. + VersionVariants *VersionVariants `protobuf:"bytes,1,opt,name=version_variants,json=versionVariants,proto3,oneof"` +} + +func (*VariantsHistory_VersionVariants) isVariantsHistory_Variants() {} + +// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +type ListExperimentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListExperimentsRequest) Reset() { + *x = ListExperimentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListExperimentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExperimentsRequest) ProtoMessage() {} + +func (x *ListExperimentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListExperimentsRequest.ProtoReflect.Descriptor instead. +func (*ListExperimentsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{5} +} + +func (x *ListExperimentsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListExperimentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListExperimentsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments]. +type ListExperimentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of experiments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + Experiments []*Experiment `protobuf:"bytes,1,rep,name=experiments,proto3" json:"experiments,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListExperimentsResponse) Reset() { + *x = ListExperimentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListExperimentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListExperimentsResponse) ProtoMessage() {} + +func (x *ListExperimentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListExperimentsResponse.ProtoReflect.Descriptor instead. +func (*ListExperimentsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{6} +} + +func (x *ListExperimentsResponse) GetExperiments() []*Experiment { + if x != nil { + return x.Experiments + } + return nil +} + +func (x *ListExperimentsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment]. +type GetExperimentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + // Format: `projects//locations//agents//environments//experiments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetExperimentRequest) Reset() { + *x = GetExperimentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetExperimentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetExperimentRequest) ProtoMessage() {} + +func (x *GetExperimentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetExperimentRequest.ProtoReflect.Descriptor instead. +func (*GetExperimentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{7} +} + +func (x *GetExperimentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment]. +type CreateExperimentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for. + // Format: `projects//locations//agents//environments/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The experiment to create. + Experiment *Experiment `protobuf:"bytes,2,opt,name=experiment,proto3" json:"experiment,omitempty"` +} + +func (x *CreateExperimentRequest) Reset() { + *x = CreateExperimentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateExperimentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateExperimentRequest) ProtoMessage() {} + +func (x *CreateExperimentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateExperimentRequest.ProtoReflect.Descriptor instead. +func (*CreateExperimentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateExperimentRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateExperimentRequest) GetExperiment() *Experiment { + if x != nil { + return x.Experiment + } + return nil +} + +// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment]. +type UpdateExperimentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The experiment to update. + Experiment *Experiment `protobuf:"bytes,1,opt,name=experiment,proto3" json:"experiment,omitempty"` + // Required. The mask to control which fields get updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateExperimentRequest) Reset() { + *x = UpdateExperimentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateExperimentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateExperimentRequest) ProtoMessage() {} + +func (x *UpdateExperimentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateExperimentRequest.ProtoReflect.Descriptor instead. +func (*UpdateExperimentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateExperimentRequest) GetExperiment() *Experiment { + if x != nil { + return x.Experiment + } + return nil +} + +func (x *UpdateExperimentRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment]. +type DeleteExperimentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete. + // Format: `projects//locations//agents//environments//experiments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteExperimentRequest) Reset() { + *x = DeleteExperimentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteExperimentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteExperimentRequest) ProtoMessage() {} + +func (x *DeleteExperimentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteExperimentRequest.ProtoReflect.Descriptor instead. +func (*DeleteExperimentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteExperimentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment]. +type StartExperimentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the experiment to start. + // Format: `projects//locations//agents//environments//experiments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *StartExperimentRequest) Reset() { + *x = StartExperimentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartExperimentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartExperimentRequest) ProtoMessage() {} + +func (x *StartExperimentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartExperimentRequest.ProtoReflect.Descriptor instead. +func (*StartExperimentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{11} +} + +func (x *StartExperimentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment]. +type StopExperimentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the experiment to stop. + // Format: `projects//locations//agents//environments//experiments/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *StopExperimentRequest) Reset() { + *x = StopExperimentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopExperimentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopExperimentRequest) ProtoMessage() {} + +func (x *StopExperimentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopExperimentRequest.ProtoReflect.Descriptor instead. +func (*StopExperimentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{12} +} + +func (x *StopExperimentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Definition of the experiment. +type Experiment_Definition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The condition defines which subset of sessions are selected for + // this experiment. If not specified, all sessions are eligible. E.g. + // "query_input.language_code=en" See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + Condition string `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` + // The variants of the experiment. We currently only support single variant + // experiment. + // + // Types that are assignable to Variants: + // + // *Experiment_Definition_VersionVariants + Variants isExperiment_Definition_Variants `protobuf_oneof:"variants"` +} + +func (x *Experiment_Definition) Reset() { + *x = Experiment_Definition{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Experiment_Definition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Experiment_Definition) ProtoMessage() {} + +func (x *Experiment_Definition) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Experiment_Definition.ProtoReflect.Descriptor instead. +func (*Experiment_Definition) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Experiment_Definition) GetCondition() string { + if x != nil { + return x.Condition + } + return "" +} + +func (m *Experiment_Definition) GetVariants() isExperiment_Definition_Variants { + if m != nil { + return m.Variants + } + return nil +} + +func (x *Experiment_Definition) GetVersionVariants() *VersionVariants { + if x, ok := x.GetVariants().(*Experiment_Definition_VersionVariants); ok { + return x.VersionVariants + } + return nil +} + +type isExperiment_Definition_Variants interface { + isExperiment_Definition_Variants() +} + +type Experiment_Definition_VersionVariants struct { + // The flow versions as the variants of this experiment. + VersionVariants *VersionVariants `protobuf:"bytes,2,opt,name=version_variants,json=versionVariants,proto3,oneof"` +} + +func (*Experiment_Definition_VersionVariants) isExperiment_Definition_Variants() {} + +// The inference result which includes an objective metric to optimize and the +// confidence interval. +type Experiment_Result struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version variants and metrics. + VersionMetrics []*Experiment_Result_VersionMetrics `protobuf:"bytes,1,rep,name=version_metrics,json=versionMetrics,proto3" json:"version_metrics,omitempty"` + // The last time the experiment's stats data was updated. Will have default + // value if stats have never been computed for this experiment. + LastUpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` +} + +func (x *Experiment_Result) Reset() { + *x = Experiment_Result{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Experiment_Result) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Experiment_Result) ProtoMessage() {} + +func (x *Experiment_Result) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Experiment_Result.ProtoReflect.Descriptor instead. +func (*Experiment_Result) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Experiment_Result) GetVersionMetrics() []*Experiment_Result_VersionMetrics { + if x != nil { + return x.VersionMetrics + } + return nil +} + +func (x *Experiment_Result) GetLastUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdateTime + } + return nil +} + +// A confidence interval is a range of possible values for the experiment +// objective you are trying to measure. +type Experiment_Result_ConfidenceInterval struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The confidence level used to construct the interval, i.e. there is X% + // chance that the true value is within this interval. + ConfidenceLevel float64 `protobuf:"fixed64,1,opt,name=confidence_level,json=confidenceLevel,proto3" json:"confidence_level,omitempty"` + // The percent change between an experiment metric's value and the value + // for its control. + Ratio float64 `protobuf:"fixed64,2,opt,name=ratio,proto3" json:"ratio,omitempty"` + // Lower bound of the interval. + LowerBound float64 `protobuf:"fixed64,3,opt,name=lower_bound,json=lowerBound,proto3" json:"lower_bound,omitempty"` + // Upper bound of the interval. + UpperBound float64 `protobuf:"fixed64,4,opt,name=upper_bound,json=upperBound,proto3" json:"upper_bound,omitempty"` +} + +func (x *Experiment_Result_ConfidenceInterval) Reset() { + *x = Experiment_Result_ConfidenceInterval{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Experiment_Result_ConfidenceInterval) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Experiment_Result_ConfidenceInterval) ProtoMessage() {} + +func (x *Experiment_Result_ConfidenceInterval) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Experiment_Result_ConfidenceInterval.ProtoReflect.Descriptor instead. +func (*Experiment_Result_ConfidenceInterval) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 1, 0} +} + +func (x *Experiment_Result_ConfidenceInterval) GetConfidenceLevel() float64 { + if x != nil { + return x.ConfidenceLevel + } + return 0 +} + +func (x *Experiment_Result_ConfidenceInterval) GetRatio() float64 { + if x != nil { + return x.Ratio + } + return 0 +} + +func (x *Experiment_Result_ConfidenceInterval) GetLowerBound() float64 { + if x != nil { + return x.LowerBound + } + return 0 +} + +func (x *Experiment_Result_ConfidenceInterval) GetUpperBound() float64 { + if x != nil { + return x.UpperBound + } + return 0 +} + +// Metric and corresponding confidence intervals. +type Experiment_Result_Metric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ratio-based metric type. Only one of type or count_type is specified in + // each Metric. + Type Experiment_Result_MetricType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.dialogflow.cx.v3beta1.Experiment_Result_MetricType" json:"type,omitempty"` + // Count-based metric type. Only one of type or count_type is specified in + // each Metric. + CountType Experiment_Result_CountType `protobuf:"varint,5,opt,name=count_type,json=countType,proto3,enum=google.cloud.dialogflow.cx.v3beta1.Experiment_Result_CountType" json:"count_type,omitempty"` + // The actual value of the metric. + // + // Types that are assignable to Value: + // + // *Experiment_Result_Metric_Ratio + // *Experiment_Result_Metric_Count + Value isExperiment_Result_Metric_Value `protobuf_oneof:"value"` + // The probability that the treatment is better than all other treatments + // in the experiment + ConfidenceInterval *Experiment_Result_ConfidenceInterval `protobuf:"bytes,3,opt,name=confidence_interval,json=confidenceInterval,proto3" json:"confidence_interval,omitempty"` +} + +func (x *Experiment_Result_Metric) Reset() { + *x = Experiment_Result_Metric{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Experiment_Result_Metric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Experiment_Result_Metric) ProtoMessage() {} + +func (x *Experiment_Result_Metric) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Experiment_Result_Metric.ProtoReflect.Descriptor instead. +func (*Experiment_Result_Metric) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 1, 1} +} + +func (x *Experiment_Result_Metric) GetType() Experiment_Result_MetricType { + if x != nil { + return x.Type + } + return Experiment_Result_METRIC_UNSPECIFIED +} + +func (x *Experiment_Result_Metric) GetCountType() Experiment_Result_CountType { + if x != nil { + return x.CountType + } + return Experiment_Result_COUNT_TYPE_UNSPECIFIED +} + +func (m *Experiment_Result_Metric) GetValue() isExperiment_Result_Metric_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *Experiment_Result_Metric) GetRatio() float64 { + if x, ok := x.GetValue().(*Experiment_Result_Metric_Ratio); ok { + return x.Ratio + } + return 0 +} + +func (x *Experiment_Result_Metric) GetCount() float64 { + if x, ok := x.GetValue().(*Experiment_Result_Metric_Count); ok { + return x.Count + } + return 0 +} + +func (x *Experiment_Result_Metric) GetConfidenceInterval() *Experiment_Result_ConfidenceInterval { + if x != nil { + return x.ConfidenceInterval + } + return nil +} + +type isExperiment_Result_Metric_Value interface { + isExperiment_Result_Metric_Value() +} + +type Experiment_Result_Metric_Ratio struct { + // Ratio value of a metric. + Ratio float64 `protobuf:"fixed64,2,opt,name=ratio,proto3,oneof"` +} + +type Experiment_Result_Metric_Count struct { + // Count value of a metric. + Count float64 `protobuf:"fixed64,4,opt,name=count,proto3,oneof"` +} + +func (*Experiment_Result_Metric_Ratio) isExperiment_Result_Metric_Value() {} + +func (*Experiment_Result_Metric_Count) isExperiment_Result_Metric_Value() {} + +// Version variant and associated metrics. +type Experiment_Result_VersionMetrics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version]. + // Format: `projects//locations//agents//flows//versions/`. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // The metrics and corresponding confidence intervals in the inference + // result. + Metrics []*Experiment_Result_Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` + // Number of sessions that were allocated to this version. + SessionCount int32 `protobuf:"varint,3,opt,name=session_count,json=sessionCount,proto3" json:"session_count,omitempty"` +} + +func (x *Experiment_Result_VersionMetrics) Reset() { + *x = Experiment_Result_VersionMetrics{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Experiment_Result_VersionMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Experiment_Result_VersionMetrics) ProtoMessage() {} + +func (x *Experiment_Result_VersionMetrics) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Experiment_Result_VersionMetrics.ProtoReflect.Descriptor instead. +func (*Experiment_Result_VersionMetrics) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{0, 1, 2} +} + +func (x *Experiment_Result_VersionMetrics) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Experiment_Result_VersionMetrics) GetMetrics() []*Experiment_Result_Metric { + if x != nil { + return x.Metrics + } + return nil +} + +func (x *Experiment_Result_VersionMetrics) GetSessionCount() int32 { + if x != nil { + return x.SessionCount + } + return 0 +} + +// A single flow version with specified traffic allocation. +type VersionVariants_Variant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the flow version. + // Format: `projects//locations//agents//flows//versions/`. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Percentage of the traffic which should be routed to this + // version of flow. Traffic allocation for a single flow must sum up to 1.0. + TrafficAllocation float32 `protobuf:"fixed32,2,opt,name=traffic_allocation,json=trafficAllocation,proto3" json:"traffic_allocation,omitempty"` + // Whether the variant is for the control group. + IsControlGroup bool `protobuf:"varint,3,opt,name=is_control_group,json=isControlGroup,proto3" json:"is_control_group,omitempty"` +} + +func (x *VersionVariants_Variant) Reset() { + *x = VersionVariants_Variant{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VersionVariants_Variant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionVariants_Variant) ProtoMessage() {} + +func (x *VersionVariants_Variant) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionVariants_Variant.ProtoReflect.Descriptor instead. +func (*VersionVariants_Variant) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *VersionVariants_Variant) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *VersionVariants_Variant) GetTrafficAllocation() float32 { + if x != nil { + return x.TrafficAllocation + } + return 0 +} + +func (x *VersionVariants_Variant) GetIsControlGroup() bool { + if x != nil { + return x.IsControlGroup + } + return false +} + +// A single rollout step with specified traffic allocation. +type RolloutConfig_RolloutStep struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the rollout step; + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The percentage of traffic allocated to the flow version of this rollout + // step. (0%, 100%]. + TrafficPercent int32 `protobuf:"varint,2,opt,name=traffic_percent,json=trafficPercent,proto3" json:"traffic_percent,omitempty"` + // The minimum time that this step should last. Should be longer than 1 + // hour. If not set, the default minimum duration for each step will be 1 + // hour. + MinDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=min_duration,json=minDuration,proto3" json:"min_duration,omitempty"` +} + +func (x *RolloutConfig_RolloutStep) Reset() { + *x = RolloutConfig_RolloutStep{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RolloutConfig_RolloutStep) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RolloutConfig_RolloutStep) ProtoMessage() {} + +func (x *RolloutConfig_RolloutStep) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RolloutConfig_RolloutStep.ProtoReflect.Descriptor instead. +func (*RolloutConfig_RolloutStep) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *RolloutConfig_RolloutStep) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *RolloutConfig_RolloutStep) GetTrafficPercent() int32 { + if x != nil { + return x.TrafficPercent + } + return 0 +} + +func (x *RolloutConfig_RolloutStep) GetMinDuration() *durationpb.Duration { + if x != nil { + return x.MinDuration + } + return nil +} + +var File_google_cloud_dialogflow_cx_v3beta1_experiment_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x14, 0x0a, + 0x0a, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x58, 0x0a, 0x0e, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, + 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x72, 0x6f, 0x6c, + 0x6c, 0x6f, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x0d, 0x72, 0x6f, + 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x0c, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x5f, 0x66, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x65, + 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x10, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x5e, 0x0a, 0x10, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x5f, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x0f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x1a, 0x98, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x60, 0x0a, 0x10, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x48, + 0x00, 0x52, 0x0f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0xc8, + 0x09, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x6d, 0x0a, 0x0f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x0e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, + 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x97, + 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, + 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x05, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6c, 0x6f, 0x77, + 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x70, 0x65, 0x72, + 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x75, 0x70, + 0x70, 0x65, 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0xf2, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x12, 0x54, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x05, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x12, 0x16, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, + 0x48, 0x00, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x13, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xcf, 0x01, + 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x12, 0x40, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0xb6, 0x01, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x12, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, + 0x4e, 0x45, 0x44, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x43, + 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1b, + 0x0a, 0x17, 0x4c, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x48, 0x41, 0x4e, + 0x44, 0x4f, 0x46, 0x46, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x43, + 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x52, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, + 0x4e, 0x45, 0x44, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x54, 0x45, + 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, + 0x44, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x10, 0x05, 0x22, 0x6f, 0x0a, 0x09, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, + 0x54, 0x43, 0x48, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x4f, 0x54, 0x41, 0x4c, 0x5f, 0x54, 0x55, 0x52, 0x4e, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, + 0x02, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x56, 0x45, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x55, 0x52, + 0x4e, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x03, 0x22, 0x54, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x52, 0x41, + 0x46, 0x54, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x52, + 0x4f, 0x4c, 0x4c, 0x4f, 0x55, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x3a, + 0x96, 0x01, 0xea, 0x41, 0x92, 0x01, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x6a, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x2f, + 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x65, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x7d, 0x22, 0xe8, 0x01, 0x0a, 0x0f, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x08, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x73, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x08, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0x7c, 0x0a, 0x07, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x74, 0x72, + 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x22, 0xe7, 0x02, 0x0a, 0x0d, 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x0d, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, + 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x65, 0x70, 0x52, 0x0c, 0x72, 0x6f, 0x6c, + 0x6c, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x6f, 0x6c, + 0x6c, 0x6f, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x97, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x53, + 0x74, 0x65, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, + 0x63, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0e, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, + 0x3c, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, + 0x0c, 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x74, 0x65, + 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x74, 0x65, 0x70, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x0f, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, + 0x60, 0x0a, 0x10, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x48, 0x00, + 0x52, 0x0f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x0a, + 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x58, 0x0a, + 0x14, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x12, 0x24, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x0a, 0x65, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xb0, + 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, + 0x6b, 0x22, 0x5b, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5a, + 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x15, 0x53, 0x74, + 0x6f, 0x70, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xdd, 0x0d, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, + 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0xd6, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x5b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xf5, 0x01, 0x0a, 0x10, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x74, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x5a, 0x22, 0x4c, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x3a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0xda, 0x41, + 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x86, 0x02, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x84, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x65, 0x32, 0x57, 0x2f, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0xda, 0x41, 0x16, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2c, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, 0xc4, 0x01, 0x0a, 0x10, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x2a, 0x4c, 0x2f, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0xe3, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x22, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x52, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3a, 0x01, + 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xe0, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x6f, + 0x70, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x56, 0x22, 0x51, + 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x74, 0x6f, + 0x70, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x78, 0xca, 0x41, 0x19, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, 0x74, 0x70, + 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0xd7, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0f, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, + 0x46, 0xaa, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, + 0x33, 0x42, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, + 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_goTypes = []interface{}{ + (Experiment_State)(0), // 0: google.cloud.dialogflow.cx.v3beta1.Experiment.State + (Experiment_Result_MetricType)(0), // 1: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType + (Experiment_Result_CountType)(0), // 2: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType + (*Experiment)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.Experiment + (*VersionVariants)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.VersionVariants + (*RolloutConfig)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.RolloutConfig + (*RolloutState)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.RolloutState + (*VariantsHistory)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.VariantsHistory + (*ListExperimentsRequest)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + (*ListExperimentsResponse)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + (*GetExperimentRequest)(nil), // 10: google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + (*CreateExperimentRequest)(nil), // 11: google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + (*UpdateExperimentRequest)(nil), // 12: google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + (*DeleteExperimentRequest)(nil), // 13: google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + (*StartExperimentRequest)(nil), // 14: google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + (*StopExperimentRequest)(nil), // 15: google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + (*Experiment_Definition)(nil), // 16: google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + (*Experiment_Result)(nil), // 17: google.cloud.dialogflow.cx.v3beta1.Experiment.Result + (*Experiment_Result_ConfidenceInterval)(nil), // 18: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + (*Experiment_Result_Metric)(nil), // 19: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + (*Experiment_Result_VersionMetrics)(nil), // 20: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + (*VersionVariants_Variant)(nil), // 21: google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + (*RolloutConfig_RolloutStep)(nil), // 22: google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (*fieldmaskpb.FieldMask)(nil), // 25: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 26: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_depIdxs = []int32{ + 0, // 0: google.cloud.dialogflow.cx.v3beta1.Experiment.state:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.State + 16, // 1: google.cloud.dialogflow.cx.v3beta1.Experiment.definition:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Definition + 5, // 2: google.cloud.dialogflow.cx.v3beta1.Experiment.rollout_config:type_name -> google.cloud.dialogflow.cx.v3beta1.RolloutConfig + 6, // 3: google.cloud.dialogflow.cx.v3beta1.Experiment.rollout_state:type_name -> google.cloud.dialogflow.cx.v3beta1.RolloutState + 17, // 4: google.cloud.dialogflow.cx.v3beta1.Experiment.result:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Result + 23, // 5: google.cloud.dialogflow.cx.v3beta1.Experiment.create_time:type_name -> google.protobuf.Timestamp + 23, // 6: google.cloud.dialogflow.cx.v3beta1.Experiment.start_time:type_name -> google.protobuf.Timestamp + 23, // 7: google.cloud.dialogflow.cx.v3beta1.Experiment.end_time:type_name -> google.protobuf.Timestamp + 23, // 8: google.cloud.dialogflow.cx.v3beta1.Experiment.last_update_time:type_name -> google.protobuf.Timestamp + 24, // 9: google.cloud.dialogflow.cx.v3beta1.Experiment.experiment_length:type_name -> google.protobuf.Duration + 7, // 10: google.cloud.dialogflow.cx.v3beta1.Experiment.variants_history:type_name -> google.cloud.dialogflow.cx.v3beta1.VariantsHistory + 21, // 11: google.cloud.dialogflow.cx.v3beta1.VersionVariants.variants:type_name -> google.cloud.dialogflow.cx.v3beta1.VersionVariants.Variant + 22, // 12: google.cloud.dialogflow.cx.v3beta1.RolloutConfig.rollout_steps:type_name -> google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep + 23, // 13: google.cloud.dialogflow.cx.v3beta1.RolloutState.start_time:type_name -> google.protobuf.Timestamp + 4, // 14: google.cloud.dialogflow.cx.v3beta1.VariantsHistory.version_variants:type_name -> google.cloud.dialogflow.cx.v3beta1.VersionVariants + 23, // 15: google.cloud.dialogflow.cx.v3beta1.VariantsHistory.update_time:type_name -> google.protobuf.Timestamp + 3, // 16: google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse.experiments:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment + 3, // 17: google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest.experiment:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment + 3, // 18: google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.experiment:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment + 25, // 19: google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest.update_mask:type_name -> google.protobuf.FieldMask + 4, // 20: google.cloud.dialogflow.cx.v3beta1.Experiment.Definition.version_variants:type_name -> google.cloud.dialogflow.cx.v3beta1.VersionVariants + 20, // 21: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.version_metrics:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics + 23, // 22: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.last_update_time:type_name -> google.protobuf.Timestamp + 1, // 23: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.type:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Result.MetricType + 2, // 24: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.count_type:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Result.CountType + 18, // 25: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric.confidence_interval:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Result.ConfidenceInterval + 19, // 26: google.cloud.dialogflow.cx.v3beta1.Experiment.Result.VersionMetrics.metrics:type_name -> google.cloud.dialogflow.cx.v3beta1.Experiment.Result.Metric + 24, // 27: google.cloud.dialogflow.cx.v3beta1.RolloutConfig.RolloutStep.min_duration:type_name -> google.protobuf.Duration + 8, // 28: google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments:input_type -> google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest + 10, // 29: google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment:input_type -> google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest + 11, // 30: google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest + 12, // 31: google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest + 13, // 32: google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest + 14, // 33: google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment:input_type -> google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest + 15, // 34: google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment:input_type -> google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest + 9, // 35: google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments:output_type -> google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse + 3, // 36: google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment:output_type -> google.cloud.dialogflow.cx.v3beta1.Experiment + 3, // 37: google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment:output_type -> google.cloud.dialogflow.cx.v3beta1.Experiment + 3, // 38: google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment:output_type -> google.cloud.dialogflow.cx.v3beta1.Experiment + 26, // 39: google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment:output_type -> google.protobuf.Empty + 3, // 40: google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment:output_type -> google.cloud.dialogflow.cx.v3beta1.Experiment + 3, // 41: google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment:output_type -> google.cloud.dialogflow.cx.v3beta1.Experiment + 35, // [35:42] is the sub-list for method output_type + 28, // [28:35] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_experiment_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Experiment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionVariants); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RolloutConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RolloutState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VariantsHistory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListExperimentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListExperimentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetExperimentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateExperimentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateExperimentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteExperimentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartExperimentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopExperimentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Experiment_Definition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Experiment_Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Experiment_Result_ConfidenceInterval); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Experiment_Result_Metric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Experiment_Result_VersionMetrics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VersionVariants_Variant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RolloutConfig_RolloutStep); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*VariantsHistory_VersionVariants)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*Experiment_Definition_VersionVariants)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes[16].OneofWrappers = []interface{}{ + (*Experiment_Result_Metric_Ratio)(nil), + (*Experiment_Result_Metric_Count)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDesc, + NumEnums: 3, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_experiment_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_experiment_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ExperimentsClient is the client API for Experiments service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ExperimentsClient interface { + // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + ListExperiments(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + UpdateExperiment(ctx context.Context, in *UpdateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. + StartExperiment(ctx context.Context, in *StartExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. + StopExperiment(ctx context.Context, in *StopExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) +} + +type experimentsClient struct { + cc grpc.ClientConnInterface +} + +func NewExperimentsClient(cc grpc.ClientConnInterface) ExperimentsClient { + return &experimentsClient{cc} +} + +func (c *experimentsClient) ListExperiments(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) { + out := new(ListExperimentsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/ListExperiments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentsClient) GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + out := new(Experiment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/GetExperiment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentsClient) CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + out := new(Experiment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/CreateExperiment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentsClient) UpdateExperiment(ctx context.Context, in *UpdateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + out := new(Experiment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/UpdateExperiment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentsClient) DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/DeleteExperiment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentsClient) StartExperiment(ctx context.Context, in *StartExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + out := new(Experiment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/StartExperiment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentsClient) StopExperiment(ctx context.Context, in *StopExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + out := new(Experiment) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Experiments/StopExperiment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExperimentsServer is the server API for Experiments service. +type ExperimentsServer interface { + // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + ListExperiments(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error) + // Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. + CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error) + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + UpdateExperiment(context.Context, *UpdateExperimentRequest) (*Experiment, error) + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. + DeleteExperiment(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. + StartExperiment(context.Context, *StartExperimentRequest) (*Experiment, error) + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. + StopExperiment(context.Context, *StopExperimentRequest) (*Experiment, error) +} + +// UnimplementedExperimentsServer can be embedded to have forward compatible implementations. +type UnimplementedExperimentsServer struct { +} + +func (*UnimplementedExperimentsServer) ListExperiments(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExperiments not implemented") +} +func (*UnimplementedExperimentsServer) GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExperiment not implemented") +} +func (*UnimplementedExperimentsServer) CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateExperiment not implemented") +} +func (*UnimplementedExperimentsServer) UpdateExperiment(context.Context, *UpdateExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateExperiment not implemented") +} +func (*UnimplementedExperimentsServer) DeleteExperiment(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteExperiment not implemented") +} +func (*UnimplementedExperimentsServer) StartExperiment(context.Context, *StartExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartExperiment not implemented") +} +func (*UnimplementedExperimentsServer) StopExperiment(context.Context, *StopExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method StopExperiment not implemented") +} + +func RegisterExperimentsServer(s *grpc.Server, srv ExperimentsServer) { + s.RegisterService(&_Experiments_serviceDesc, srv) +} + +func _Experiments_ListExperiments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExperimentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).ListExperiments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/ListExperiments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).ListExperiments(ctx, req.(*ListExperimentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Experiments_GetExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).GetExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/GetExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).GetExperiment(ctx, req.(*GetExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Experiments_CreateExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).CreateExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/CreateExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).CreateExperiment(ctx, req.(*CreateExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Experiments_UpdateExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).UpdateExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/UpdateExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).UpdateExperiment(ctx, req.(*UpdateExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Experiments_DeleteExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).DeleteExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/DeleteExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).DeleteExperiment(ctx, req.(*DeleteExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Experiments_StartExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).StartExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/StartExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).StartExperiment(ctx, req.(*StartExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Experiments_StopExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentsServer).StopExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Experiments/StopExperiment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentsServer).StopExperiment(ctx, req.(*StopExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Experiments_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Experiments", + HandlerType: (*ExperimentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListExperiments", + Handler: _Experiments_ListExperiments_Handler, + }, + { + MethodName: "GetExperiment", + Handler: _Experiments_GetExperiment_Handler, + }, + { + MethodName: "CreateExperiment", + Handler: _Experiments_CreateExperiment_Handler, + }, + { + MethodName: "UpdateExperiment", + Handler: _Experiments_UpdateExperiment_Handler, + }, + { + MethodName: "DeleteExperiment", + Handler: _Experiments_DeleteExperiment_Handler, + }, + { + MethodName: "StartExperiment", + Handler: _Experiments_StartExperiment_Handler, + }, + { + MethodName: "StopExperiment", + Handler: _Experiments_StopExperiment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/experiment.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go b/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go new file mode 100644 index 000000000000..6bacde8e3f6f --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/flow.pb.go @@ -0,0 +1,2681 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/flow.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + longrunning "google.golang.org/genproto/googleapis/longrunning" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// NLU model type. +type NluSettings_ModelType int32 + +const ( + // Not specified. `MODEL_TYPE_STANDARD` will be used. + NluSettings_MODEL_TYPE_UNSPECIFIED NluSettings_ModelType = 0 + // Use standard NLU model. + NluSettings_MODEL_TYPE_STANDARD NluSettings_ModelType = 1 + // Use advanced NLU model. + NluSettings_MODEL_TYPE_ADVANCED NluSettings_ModelType = 3 +) + +// Enum value maps for NluSettings_ModelType. +var ( + NluSettings_ModelType_name = map[int32]string{ + 0: "MODEL_TYPE_UNSPECIFIED", + 1: "MODEL_TYPE_STANDARD", + 3: "MODEL_TYPE_ADVANCED", + } + NluSettings_ModelType_value = map[string]int32{ + "MODEL_TYPE_UNSPECIFIED": 0, + "MODEL_TYPE_STANDARD": 1, + "MODEL_TYPE_ADVANCED": 3, + } +) + +func (x NluSettings_ModelType) Enum() *NluSettings_ModelType { + p := new(NluSettings_ModelType) + *p = x + return p +} + +func (x NluSettings_ModelType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NluSettings_ModelType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes[0].Descriptor() +} + +func (NluSettings_ModelType) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes[0] +} + +func (x NluSettings_ModelType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NluSettings_ModelType.Descriptor instead. +func (NluSettings_ModelType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{0, 0} +} + +// NLU model training mode. +type NluSettings_ModelTrainingMode int32 + +const ( + // Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used. + NluSettings_MODEL_TRAINING_MODE_UNSPECIFIED NluSettings_ModelTrainingMode = 0 + // NLU model training is automatically triggered when a flow gets modified. + // User can also manually trigger model training in this mode. + NluSettings_MODEL_TRAINING_MODE_AUTOMATIC NluSettings_ModelTrainingMode = 1 + // User needs to manually trigger NLU model training. Best for large flows + // whose models take long time to train. + NluSettings_MODEL_TRAINING_MODE_MANUAL NluSettings_ModelTrainingMode = 2 +) + +// Enum value maps for NluSettings_ModelTrainingMode. +var ( + NluSettings_ModelTrainingMode_name = map[int32]string{ + 0: "MODEL_TRAINING_MODE_UNSPECIFIED", + 1: "MODEL_TRAINING_MODE_AUTOMATIC", + 2: "MODEL_TRAINING_MODE_MANUAL", + } + NluSettings_ModelTrainingMode_value = map[string]int32{ + "MODEL_TRAINING_MODE_UNSPECIFIED": 0, + "MODEL_TRAINING_MODE_AUTOMATIC": 1, + "MODEL_TRAINING_MODE_MANUAL": 2, + } +) + +func (x NluSettings_ModelTrainingMode) Enum() *NluSettings_ModelTrainingMode { + p := new(NluSettings_ModelTrainingMode) + *p = x + return p +} + +func (x NluSettings_ModelTrainingMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NluSettings_ModelTrainingMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes[1].Descriptor() +} + +func (NluSettings_ModelTrainingMode) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes[1] +} + +func (x NluSettings_ModelTrainingMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NluSettings_ModelTrainingMode.Descriptor instead. +func (NluSettings_ModelTrainingMode) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{0, 1} +} + +// Import option. +type ImportFlowRequest_ImportOption int32 + +const ( + // Unspecified. Treated as `KEEP`. + ImportFlowRequest_IMPORT_OPTION_UNSPECIFIED ImportFlowRequest_ImportOption = 0 + // Always respect settings in exported flow content. It may cause a + // import failure if some settings (e.g. custom NLU) are not supported in + // the agent to import into. + ImportFlowRequest_KEEP ImportFlowRequest_ImportOption = 1 + // Fallback to default settings if some settings are not supported in the + // agent to import into. E.g. Standard NLU will be used if custom NLU is + // not available. + ImportFlowRequest_FALLBACK ImportFlowRequest_ImportOption = 2 +) + +// Enum value maps for ImportFlowRequest_ImportOption. +var ( + ImportFlowRequest_ImportOption_name = map[int32]string{ + 0: "IMPORT_OPTION_UNSPECIFIED", + 1: "KEEP", + 2: "FALLBACK", + } + ImportFlowRequest_ImportOption_value = map[string]int32{ + "IMPORT_OPTION_UNSPECIFIED": 0, + "KEEP": 1, + "FALLBACK": 2, + } +) + +func (x ImportFlowRequest_ImportOption) Enum() *ImportFlowRequest_ImportOption { + p := new(ImportFlowRequest_ImportOption) + *p = x + return p +} + +func (x ImportFlowRequest_ImportOption) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ImportFlowRequest_ImportOption) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes[2].Descriptor() +} + +func (ImportFlowRequest_ImportOption) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes[2] +} + +func (x ImportFlowRequest_ImportOption) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ImportFlowRequest_ImportOption.Descriptor instead. +func (ImportFlowRequest_ImportOption) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{12, 0} +} + +// Settings related to NLU. +type NluSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates the type of NLU model. + ModelType NluSettings_ModelType `protobuf:"varint,1,opt,name=model_type,json=modelType,proto3,enum=google.cloud.dialogflow.cx.v3beta1.NluSettings_ModelType" json:"model_type,omitempty"` + // To filter out false positive results and still get variety in matched + // natural language inputs for your agent, you can tune the machine learning + // classification threshold. If the returned score value is less than the + // threshold value, then a no-match event will be triggered. The score values + // range from 0.0 (completely uncertain) to 1.0 (completely certain). If set + // to 0.0, the default of 0.3 is used. + ClassificationThreshold float32 `protobuf:"fixed32,3,opt,name=classification_threshold,json=classificationThreshold,proto3" json:"classification_threshold,omitempty"` + // Indicates NLU model training mode. + ModelTrainingMode NluSettings_ModelTrainingMode `protobuf:"varint,4,opt,name=model_training_mode,json=modelTrainingMode,proto3,enum=google.cloud.dialogflow.cx.v3beta1.NluSettings_ModelTrainingMode" json:"model_training_mode,omitempty"` +} + +func (x *NluSettings) Reset() { + *x = NluSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NluSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NluSettings) ProtoMessage() {} + +func (x *NluSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NluSettings.ProtoReflect.Descriptor instead. +func (*NluSettings) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{0} +} + +func (x *NluSettings) GetModelType() NluSettings_ModelType { + if x != nil { + return x.ModelType + } + return NluSettings_MODEL_TYPE_UNSPECIFIED +} + +func (x *NluSettings) GetClassificationThreshold() float32 { + if x != nil { + return x.ClassificationThreshold + } + return 0 +} + +func (x *NluSettings) GetModelTrainingMode() NluSettings_ModelTrainingMode { + if x != nil { + return x.ModelTrainingMode + } + return NluSettings_MODEL_TRAINING_MODE_UNSPECIFIED +} + +// Flows represents the conversation flows when you build your chatbot agent. +// +// A flow consists of many pages connected by the transition routes. +// Conversations always start with the built-in Start Flow (with an all-0 ID). +// Transition routes can direct the conversation session from the current flow +// (parent flow) to another flow (sub flow). When the sub flow is finished, +// Dialogflow will bring the session back to the parent flow, where the sub flow +// is started. +// +// Usually, when a transition route is followed by a matched intent, the intent +// will be "consumed". This means the intent won't activate more transition +// routes. However, when the followed transition route moves the conversation +// session into a different flow, the matched intent can be carried over and to +// be consumed in the target flow. +type Flow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the flow. + // Format: `projects//locations//agents//flows/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the flow. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The description of the flow. The maximum length is 500 characters. If + // exceeded, the request is rejected. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // A flow's transition routes serve two purposes: + // + // * They are responsible for matching the user's first utterances in the + // flow. + // * They are inherited by every page's [transition + // routes][Page.transition_routes] and can support use cases such as the user + // saying "help" or "can I talk to a human?", which can be handled in a common + // way regardless of the current page. Transition routes defined in the page + // have higher priority than those defined in the flow. + // + // TransitionRoutes are evalauted in the following order: + // + // * TransitionRoutes with intent specified. + // * TransitionRoutes with only condition specified. + // + // TransitionRoutes with intent specified are inherited by pages in the flow. + TransitionRoutes []*TransitionRoute `protobuf:"bytes,4,rep,name=transition_routes,json=transitionRoutes,proto3" json:"transition_routes,omitempty"` + // A flow's event handlers serve two purposes: + // + // * They are responsible for handling events (e.g. no match, + // webhook errors) in the flow. + // * They are inherited by every page's [event + // handlers][Page.event_handlers], which can be used to handle common events + // regardless of the current page. Event handlers defined in the page + // have higher priority than those defined in the flow. + // + // Unlike [transition_routes][google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes], these handlers are + // evaluated on a first-match basis. The first one that matches the event + // get executed, with the rest being ignored. + EventHandlers []*EventHandler `protobuf:"bytes,10,rep,name=event_handlers,json=eventHandlers,proto3" json:"event_handlers,omitempty"` + // A flow's transition route group serve two purposes: + // + // * They are responsible for matching the user's first utterances in the + // flow. + // * They are inherited by every page's [transition + // route groups][Page.transition_route_groups]. Transition route groups + // defined in the page have higher priority than those defined in the flow. + // + // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + TransitionRouteGroups []string `protobuf:"bytes,15,rep,name=transition_route_groups,json=transitionRouteGroups,proto3" json:"transition_route_groups,omitempty"` + // NLU related settings of the flow. + NluSettings *NluSettings `protobuf:"bytes,11,opt,name=nlu_settings,json=nluSettings,proto3" json:"nlu_settings,omitempty"` +} + +func (x *Flow) Reset() { + *x = Flow{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Flow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Flow) ProtoMessage() {} + +func (x *Flow) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Flow.ProtoReflect.Descriptor instead. +func (*Flow) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{1} +} + +func (x *Flow) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Flow) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Flow) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Flow) GetTransitionRoutes() []*TransitionRoute { + if x != nil { + return x.TransitionRoutes + } + return nil +} + +func (x *Flow) GetEventHandlers() []*EventHandler { + if x != nil { + return x.EventHandlers + } + return nil +} + +func (x *Flow) GetTransitionRouteGroups() []string { + if x != nil { + return x.TransitionRouteGroups + } + return nil +} + +func (x *Flow) GetNluSettings() *NluSettings { + if x != nil { + return x.NluSettings + } + return nil +} + +// The request message for [Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow]. +type CreateFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to create a flow for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The flow to create. + Flow *Flow `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"` + // The language of the following fields in `flow`: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *CreateFlowRequest) Reset() { + *x = CreateFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateFlowRequest) ProtoMessage() {} + +func (x *CreateFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateFlowRequest.ProtoReflect.Descriptor instead. +func (*CreateFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateFlowRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateFlowRequest) GetFlow() *Flow { + if x != nil { + return x.Flow + } + return nil +} + +func (x *CreateFlowRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow]. +type DeleteFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the flow to delete. + // Format: `projects//locations//agents//flows/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This field has no effect for flows with no incoming transitions. + // For flows with incoming transitions: + // + // - If `force` is set to false, an error will be returned with message + // indicating the incoming transitions. + // - If `force` is set to true, Dialogflow will remove the flow, as well as + // any transitions to the flow (i.e. [Target + // flow][EventHandler.target_flow] in event handlers or [Target + // flow][TransitionRoute.target_flow] in transition routes that point to + // this flow will be cleared). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeleteFlowRequest) Reset() { + *x = DeleteFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFlowRequest) ProtoMessage() {} + +func (x *DeleteFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFlowRequest.ProtoReflect.Descriptor instead. +func (*DeleteFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{3} +} + +func (x *DeleteFlowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteFlowRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// The request message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows]. +type ListFlowsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent containing the flows. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // The language to list flows for. The following fields are language + // dependent: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,4,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *ListFlowsRequest) Reset() { + *x = ListFlowsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFlowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFlowsRequest) ProtoMessage() {} + +func (x *ListFlowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFlowsRequest.ProtoReflect.Descriptor instead. +func (*ListFlowsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{4} +} + +func (x *ListFlowsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListFlowsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFlowsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListFlowsRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows]. +type ListFlowsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of flows. There will be a maximum number of items returned based + // on the page_size field in the request. + Flows []*Flow `protobuf:"bytes,1,rep,name=flows,proto3" json:"flows,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFlowsResponse) Reset() { + *x = ListFlowsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFlowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFlowsResponse) ProtoMessage() {} + +func (x *ListFlowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFlowsResponse.ProtoReflect.Descriptor instead. +func (*ListFlowsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{5} +} + +func (x *ListFlowsResponse) GetFlows() []*Flow { + if x != nil { + return x.Flows + } + return nil +} + +func (x *ListFlowsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow]. +type GetFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the flow to get. + // Format: `projects//locations//agents//flows/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The language to retrieve the flow for. The following fields are language + // dependent: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetFlowRequest) Reset() { + *x = GetFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFlowRequest) ProtoMessage() {} + +func (x *GetFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFlowRequest.ProtoReflect.Descriptor instead. +func (*GetFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{6} +} + +func (x *GetFlowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetFlowRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow]. +type UpdateFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The flow to update. + Flow *Flow `protobuf:"bytes,1,opt,name=flow,proto3" json:"flow,omitempty"` + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // The language of the following fields in `flow`: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *UpdateFlowRequest) Reset() { + *x = UpdateFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFlowRequest) ProtoMessage() {} + +func (x *UpdateFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFlowRequest.ProtoReflect.Descriptor instead. +func (*UpdateFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateFlowRequest) GetFlow() *Flow { + if x != nil { + return x.Flow + } + return nil +} + +func (x *UpdateFlowRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateFlowRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow]. +type TrainFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The flow to train. + // Format: `projects//locations//agents//flows/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *TrainFlowRequest) Reset() { + *x = TrainFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TrainFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TrainFlowRequest) ProtoMessage() {} + +func (x *TrainFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TrainFlowRequest.ProtoReflect.Descriptor instead. +func (*TrainFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{8} +} + +func (x *TrainFlowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow]. +type ValidateFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The flow to validate. + // Format: `projects//locations//agents//flows/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If not specified, the agent's default language is used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *ValidateFlowRequest) Reset() { + *x = ValidateFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateFlowRequest) ProtoMessage() {} + +func (x *ValidateFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateFlowRequest.ProtoReflect.Descriptor instead. +func (*ValidateFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{9} +} + +func (x *ValidateFlowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ValidateFlowRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. +type GetFlowValidationResultRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The flow name. + // Format: `projects//locations//agents//flows//validationResult`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If not specified, the agent's default language is used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetFlowValidationResultRequest) Reset() { + *x = GetFlowValidationResultRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFlowValidationResultRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFlowValidationResultRequest) ProtoMessage() {} + +func (x *GetFlowValidationResultRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFlowValidationResultRequest.ProtoReflect.Descriptor instead. +func (*GetFlowValidationResultRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{10} +} + +func (x *GetFlowValidationResultRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetFlowValidationResultRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult]. +type FlowValidationResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the flow validation result. + // Format: `projects//locations//agents//flows//validationResult`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Contains all validation messages. + ValidationMessages []*ValidationMessage `protobuf:"bytes,2,rep,name=validation_messages,json=validationMessages,proto3" json:"validation_messages,omitempty"` + // Last time the flow was validated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` +} + +func (x *FlowValidationResult) Reset() { + *x = FlowValidationResult{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FlowValidationResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FlowValidationResult) ProtoMessage() {} + +func (x *FlowValidationResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FlowValidationResult.ProtoReflect.Descriptor instead. +func (*FlowValidationResult) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{11} +} + +func (x *FlowValidationResult) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FlowValidationResult) GetValidationMessages() []*ValidationMessage { + if x != nil { + return x.ValidationMessages + } + return nil +} + +func (x *FlowValidationResult) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +// The request message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow]. +type ImportFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to import the flow into. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The flow to import. + // + // Types that are assignable to Flow: + // + // *ImportFlowRequest_FlowUri + // *ImportFlowRequest_FlowContent + Flow isImportFlowRequest_Flow `protobuf_oneof:"flow"` + // Flow import mode. If not specified, `KEEP` is assumed. + ImportOption ImportFlowRequest_ImportOption `protobuf:"varint,4,opt,name=import_option,json=importOption,proto3,enum=google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest_ImportOption" json:"import_option,omitempty"` +} + +func (x *ImportFlowRequest) Reset() { + *x = ImportFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportFlowRequest) ProtoMessage() {} + +func (x *ImportFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportFlowRequest.ProtoReflect.Descriptor instead. +func (*ImportFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{12} +} + +func (x *ImportFlowRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (m *ImportFlowRequest) GetFlow() isImportFlowRequest_Flow { + if m != nil { + return m.Flow + } + return nil +} + +func (x *ImportFlowRequest) GetFlowUri() string { + if x, ok := x.GetFlow().(*ImportFlowRequest_FlowUri); ok { + return x.FlowUri + } + return "" +} + +func (x *ImportFlowRequest) GetFlowContent() []byte { + if x, ok := x.GetFlow().(*ImportFlowRequest_FlowContent); ok { + return x.FlowContent + } + return nil +} + +func (x *ImportFlowRequest) GetImportOption() ImportFlowRequest_ImportOption { + if x != nil { + return x.ImportOption + } + return ImportFlowRequest_IMPORT_OPTION_UNSPECIFIED +} + +type isImportFlowRequest_Flow interface { + isImportFlowRequest_Flow() +} + +type ImportFlowRequest_FlowUri struct { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import flow from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + FlowUri string `protobuf:"bytes,2,opt,name=flow_uri,json=flowUri,proto3,oneof"` +} + +type ImportFlowRequest_FlowContent struct { + // Uncompressed raw byte content for flow. + FlowContent []byte `protobuf:"bytes,3,opt,name=flow_content,json=flowContent,proto3,oneof"` +} + +func (*ImportFlowRequest_FlowUri) isImportFlowRequest_Flow() {} + +func (*ImportFlowRequest_FlowContent) isImportFlowRequest_Flow() {} + +// The response message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow]. +type ImportFlowResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the new flow. + // Format: `projects//locations//agents//flows/`. + Flow string `protobuf:"bytes,1,opt,name=flow,proto3" json:"flow,omitempty"` +} + +func (x *ImportFlowResponse) Reset() { + *x = ImportFlowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportFlowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportFlowResponse) ProtoMessage() {} + +func (x *ImportFlowResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportFlowResponse.ProtoReflect.Descriptor instead. +func (*ImportFlowResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{13} +} + +func (x *ImportFlowResponse) GetFlow() string { + if x != nil { + return x.Flow + } + return "" +} + +// The request message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow]. +type ExportFlowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the flow to export. + // Format: `projects//locations//agents//flows/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to + // export the flow to. The format of this URI must be + // `gs:///`. + // If left unspecified, the serialized flow is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + FlowUri string `protobuf:"bytes,2,opt,name=flow_uri,json=flowUri,proto3" json:"flow_uri,omitempty"` + // Optional. Whether to export flows referenced by the specified flow. + IncludeReferencedFlows bool `protobuf:"varint,4,opt,name=include_referenced_flows,json=includeReferencedFlows,proto3" json:"include_referenced_flows,omitempty"` +} + +func (x *ExportFlowRequest) Reset() { + *x = ExportFlowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportFlowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportFlowRequest) ProtoMessage() {} + +func (x *ExportFlowRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportFlowRequest.ProtoReflect.Descriptor instead. +func (*ExportFlowRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{14} +} + +func (x *ExportFlowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportFlowRequest) GetFlowUri() string { + if x != nil { + return x.FlowUri + } + return "" +} + +func (x *ExportFlowRequest) GetIncludeReferencedFlows() bool { + if x != nil { + return x.IncludeReferencedFlows + } + return false +} + +// The response message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow]. +type ExportFlowResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The exported flow. + // + // Types that are assignable to Flow: + // + // *ExportFlowResponse_FlowUri + // *ExportFlowResponse_FlowContent + Flow isExportFlowResponse_Flow `protobuf_oneof:"flow"` +} + +func (x *ExportFlowResponse) Reset() { + *x = ExportFlowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportFlowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportFlowResponse) ProtoMessage() {} + +func (x *ExportFlowResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportFlowResponse.ProtoReflect.Descriptor instead. +func (*ExportFlowResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP(), []int{15} +} + +func (m *ExportFlowResponse) GetFlow() isExportFlowResponse_Flow { + if m != nil { + return m.Flow + } + return nil +} + +func (x *ExportFlowResponse) GetFlowUri() string { + if x, ok := x.GetFlow().(*ExportFlowResponse_FlowUri); ok { + return x.FlowUri + } + return "" +} + +func (x *ExportFlowResponse) GetFlowContent() []byte { + if x, ok := x.GetFlow().(*ExportFlowResponse_FlowContent); ok { + return x.FlowContent + } + return nil +} + +type isExportFlowResponse_Flow interface { + isExportFlowResponse_Flow() +} + +type ExportFlowResponse_FlowUri struct { + // The URI to a file containing the exported flow. This field is populated + // only if `flow_uri` is specified in [ExportFlowRequest][google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest]. + FlowUri string `protobuf:"bytes,1,opt,name=flow_uri,json=flowUri,proto3,oneof"` +} + +type ExportFlowResponse_FlowContent struct { + // Uncompressed raw byte content for flow. + FlowContent []byte `protobuf:"bytes,2,opt,name=flow_content,json=flowContent,proto3,oneof"` +} + +func (*ExportFlowResponse_FlowUri) isExportFlowResponse_Flow() {} + +func (*ExportFlowResponse_FlowContent) isExportFlowResponse_Flow() {} + +var File_google_cloud_dialogflow_cx_v3beta1_flow_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, + 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, + 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x03, 0x0a, 0x0b, 0x4e, 0x6c, 0x75, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x58, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4e, 0x6c, 0x75, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x39, 0x0a, 0x18, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x17, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x71, 0x0a, 0x13, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, + 0x6c, 0x75, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x11, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x22, + 0x59, 0x0a, 0x09, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, + 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x4f, 0x44, 0x45, + 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x41, 0x44, 0x56, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x03, 0x22, 0x7b, 0x0a, 0x11, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, + 0x23, 0x0a, 0x1f, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, + 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x54, 0x52, + 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x4f, + 0x4d, 0x41, 0x54, 0x49, 0x43, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x4f, 0x44, 0x45, 0x4c, + 0x5f, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, + 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x22, 0xca, 0x04, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x57, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x17, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, 0x42, 0x33, 0xfa, 0x41, 0x30, 0x0a, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x52, 0x0a, 0x0c, 0x6e, 0x6c, 0x75, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4e, 0x6c, 0x75, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x6e, + 0x6c, 0x75, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x68, 0xea, 0x41, 0x65, 0x0a, + 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x12, + 0x43, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x66, + 0x6c, 0x6f, 0x77, 0x7d, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x20, 0x12, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, + 0x6f, 0x77, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x66, 0x6c, + 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x23, 0x0a, + 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x22, 0x65, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x10, 0x4c, 0x69, + 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, + 0x7b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x05, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x71, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, + 0xb8, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x4e, 0x0a, 0x10, 0x54, 0x72, + 0x61, 0x69, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x76, 0x0a, 0x13, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, + 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x36, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x30, 0x0a, 0x2e, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xdc, 0x02, 0x0a, 0x14, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x8a, 0x01, 0xea, 0x41, 0x86, 0x01, 0x0a, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x54, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x66, + 0x6c, 0x6f, 0x77, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xcd, 0x02, 0x0a, 0x11, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x08, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x07, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x72, 0x69, 0x12, 0x23, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, + 0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x67, 0x0a, + 0x0d, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x0c, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x45, 0x45, 0x50, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x42, 0x06, 0x0a, + 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x4d, 0x0a, 0x12, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x66, + 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xfa, 0x41, 0x20, 0x0a, 0x1e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, + 0x66, 0x6c, 0x6f, 0x77, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, + 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x66, + 0x6c, 0x6f, 0x77, 0x55, 0x72, 0x69, 0x12, 0x3d, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, + 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x22, 0x5e, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x07, 0x66, 0x6c, 0x6f, 0x77, 0x55, 0x72, 0x69, 0x12, 0x23, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, + 0x52, 0x0b, 0x66, 0x6c, 0x6f, 0x77, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x0a, + 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x9b, 0x11, 0x0a, 0x05, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x12, + 0xc2, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x22, + 0x53, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x37, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x3a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0xa3, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, + 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0xaf, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x32, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x39, 0x12, 0x37, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0xcc, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, + 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, + 0x77, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x32, 0x3c, 0x2f, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0xda, 0x41, 0x10, + 0x66, 0x6c, 0x6f, 0x77, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x12, 0xe4, 0x01, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 0x3d, 0x2f, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x3a, 0x01, 0x2a, 0xda, 0x41, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x2f, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0xce, 0x01, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x45, 0x22, 0x40, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xf0, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x46, 0x6c, 0x6f, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x6f, + 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6c, + 0x6f, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x2f, 0x2a, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xdc, 0x01, 0x0a, 0x0a, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x78, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, 0x3e, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x2c, 0x0a, 0x12, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0xdc, 0x01, 0x0a, 0x0a, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x78, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, 0x3e, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0xca, 0x41, 0x2c, 0x0a, 0x12, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x1a, 0x78, 0xca, 0x41, 0x19, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x42, 0xd1, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, + 0x46, 0x6c, 0x6f, 0x77, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, + 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, + 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, + 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, + 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, + 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_google_cloud_dialogflow_cx_v3beta1_flow_proto_goTypes = []interface{}{ + (NluSettings_ModelType)(0), // 0: google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType + (NluSettings_ModelTrainingMode)(0), // 1: google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode + (ImportFlowRequest_ImportOption)(0), // 2: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption + (*NluSettings)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.NluSettings + (*Flow)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.Flow + (*CreateFlowRequest)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + (*DeleteFlowRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + (*ListFlowsRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + (*ListFlowsResponse)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + (*GetFlowRequest)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + (*UpdateFlowRequest)(nil), // 10: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + (*TrainFlowRequest)(nil), // 11: google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + (*ValidateFlowRequest)(nil), // 12: google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + (*GetFlowValidationResultRequest)(nil), // 13: google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + (*FlowValidationResult)(nil), // 14: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + (*ImportFlowRequest)(nil), // 15: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + (*ImportFlowResponse)(nil), // 16: google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse + (*ExportFlowRequest)(nil), // 17: google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + (*ExportFlowResponse)(nil), // 18: google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse + (*TransitionRoute)(nil), // 19: google.cloud.dialogflow.cx.v3beta1.TransitionRoute + (*EventHandler)(nil), // 20: google.cloud.dialogflow.cx.v3beta1.EventHandler + (*fieldmaskpb.FieldMask)(nil), // 21: google.protobuf.FieldMask + (*ValidationMessage)(nil), // 22: google.cloud.dialogflow.cx.v3beta1.ValidationMessage + (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 24: google.protobuf.Empty + (*longrunning.Operation)(nil), // 25: google.longrunning.Operation +} +var file_google_cloud_dialogflow_cx_v3beta1_flow_proto_depIdxs = []int32{ + 0, // 0: google.cloud.dialogflow.cx.v3beta1.NluSettings.model_type:type_name -> google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelType + 1, // 1: google.cloud.dialogflow.cx.v3beta1.NluSettings.model_training_mode:type_name -> google.cloud.dialogflow.cx.v3beta1.NluSettings.ModelTrainingMode + 19, // 2: google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes:type_name -> google.cloud.dialogflow.cx.v3beta1.TransitionRoute + 20, // 3: google.cloud.dialogflow.cx.v3beta1.Flow.event_handlers:type_name -> google.cloud.dialogflow.cx.v3beta1.EventHandler + 3, // 4: google.cloud.dialogflow.cx.v3beta1.Flow.nlu_settings:type_name -> google.cloud.dialogflow.cx.v3beta1.NluSettings + 4, // 5: google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest.flow:type_name -> google.cloud.dialogflow.cx.v3beta1.Flow + 4, // 6: google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse.flows:type_name -> google.cloud.dialogflow.cx.v3beta1.Flow + 4, // 7: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.flow:type_name -> google.cloud.dialogflow.cx.v3beta1.Flow + 21, // 8: google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest.update_mask:type_name -> google.protobuf.FieldMask + 22, // 9: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.validation_messages:type_name -> google.cloud.dialogflow.cx.v3beta1.ValidationMessage + 23, // 10: google.cloud.dialogflow.cx.v3beta1.FlowValidationResult.update_time:type_name -> google.protobuf.Timestamp + 2, // 11: google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.import_option:type_name -> google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest.ImportOption + 5, // 12: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateFlowRequest + 6, // 13: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteFlowRequest + 7, // 14: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows:input_type -> google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest + 9, // 15: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.GetFlowRequest + 10, // 16: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateFlowRequest + 11, // 17: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.TrainFlowRequest + 12, // 18: google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.ValidateFlowRequest + 13, // 19: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult:input_type -> google.cloud.dialogflow.cx.v3beta1.GetFlowValidationResultRequest + 15, // 20: google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest + 17, // 21: google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow:input_type -> google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest + 4, // 22: google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow:output_type -> google.cloud.dialogflow.cx.v3beta1.Flow + 24, // 23: google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow:output_type -> google.protobuf.Empty + 8, // 24: google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows:output_type -> google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse + 4, // 25: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow:output_type -> google.cloud.dialogflow.cx.v3beta1.Flow + 4, // 26: google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow:output_type -> google.cloud.dialogflow.cx.v3beta1.Flow + 25, // 27: google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow:output_type -> google.longrunning.Operation + 14, // 28: google.cloud.dialogflow.cx.v3beta1.Flows.ValidateFlow:output_type -> google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + 14, // 29: google.cloud.dialogflow.cx.v3beta1.Flows.GetFlowValidationResult:output_type -> google.cloud.dialogflow.cx.v3beta1.FlowValidationResult + 25, // 30: google.cloud.dialogflow.cx.v3beta1.Flows.ImportFlow:output_type -> google.longrunning.Operation + 25, // 31: google.cloud.dialogflow.cx.v3beta1.Flows.ExportFlow:output_type -> google.longrunning.Operation + 22, // [22:32] is the sub-list for method output_type + 12, // [12:22] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_flow_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_flow_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_flow_proto != nil { + return + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() + file_google_cloud_dialogflow_cx_v3beta1_validation_message_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NluSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Flow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFlowsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFlowsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TrainFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFlowValidationResultRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FlowValidationResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportFlowResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportFlowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportFlowResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*ImportFlowRequest_FlowUri)(nil), + (*ImportFlowRequest_FlowContent)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*ExportFlowResponse_FlowUri)(nil), + (*ExportFlowResponse_FlowContent)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDesc, + NumEnums: 3, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_flow_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_flow_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_flow_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_flow_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_flow_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_flow_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// FlowsClient is the client API for Flows service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FlowsClient interface { + // Creates a flow in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + CreateFlow(ctx context.Context, in *CreateFlowRequest, opts ...grpc.CallOption) (*Flow, error) + // Deletes a specified flow. + DeleteFlow(ctx context.Context, in *DeleteFlowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns the list of all flows in the specified agent. + ListFlows(ctx context.Context, in *ListFlowsRequest, opts ...grpc.CallOption) (*ListFlowsResponse, error) + // Retrieves the specified flow. + GetFlow(ctx context.Context, in *GetFlowRequest, opts ...grpc.CallOption) (*Flow, error) + // Updates the specified flow. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateFlow(ctx context.Context, in *UpdateFlowRequest, opts ...grpc.CallOption) (*Flow, error) + // Trains the specified flow. Note that only the flow in 'draft' environment + // is trained. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + TrainFlow(ctx context.Context, in *TrainFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Validates the specified flow and creates or updates validation results. + // Please call this API after the training is completed to get the complete + // validation results. + ValidateFlow(ctx context.Context, in *ValidateFlowRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) + // Gets the latest flow validation result. Flow validation is performed + // when ValidateFlow is called. + GetFlowValidationResult(ctx context.Context, in *GetFlowValidationResultRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) + // Imports the specified flow to the specified agent from a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + ImportFlow(ctx context.Context, in *ImportFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) + // Exports the specified flow to a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] + // + // Note that resources (e.g. intents, entities, webhooks) that the flow + // references will also be exported. + ExportFlow(ctx context.Context, in *ExportFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) +} + +type flowsClient struct { + cc grpc.ClientConnInterface +} + +func NewFlowsClient(cc grpc.ClientConnInterface) FlowsClient { + return &flowsClient{cc} +} + +func (c *flowsClient) CreateFlow(ctx context.Context, in *CreateFlowRequest, opts ...grpc.CallOption) (*Flow, error) { + out := new(Flow) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/CreateFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) DeleteFlow(ctx context.Context, in *DeleteFlowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/DeleteFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) ListFlows(ctx context.Context, in *ListFlowsRequest, opts ...grpc.CallOption) (*ListFlowsResponse, error) { + out := new(ListFlowsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/ListFlows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) GetFlow(ctx context.Context, in *GetFlowRequest, opts ...grpc.CallOption) (*Flow, error) { + out := new(Flow) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) UpdateFlow(ctx context.Context, in *UpdateFlowRequest, opts ...grpc.CallOption) (*Flow, error) { + out := new(Flow) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/UpdateFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) TrainFlow(ctx context.Context, in *TrainFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/TrainFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) ValidateFlow(ctx context.Context, in *ValidateFlowRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) { + out := new(FlowValidationResult) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/ValidateFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) GetFlowValidationResult(ctx context.Context, in *GetFlowValidationResultRequest, opts ...grpc.CallOption) (*FlowValidationResult, error) { + out := new(FlowValidationResult) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlowValidationResult", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) ImportFlow(ctx context.Context, in *ImportFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/ImportFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *flowsClient) ExportFlow(ctx context.Context, in *ExportFlowRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) { + out := new(longrunning.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Flows/ExportFlow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FlowsServer is the server API for Flows service. +type FlowsServer interface { + // Creates a flow in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + CreateFlow(context.Context, *CreateFlowRequest) (*Flow, error) + // Deletes a specified flow. + DeleteFlow(context.Context, *DeleteFlowRequest) (*emptypb.Empty, error) + // Returns the list of all flows in the specified agent. + ListFlows(context.Context, *ListFlowsRequest) (*ListFlowsResponse, error) + // Retrieves the specified flow. + GetFlow(context.Context, *GetFlowRequest) (*Flow, error) + // Updates the specified flow. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateFlow(context.Context, *UpdateFlowRequest) (*Flow, error) + // Trains the specified flow. Note that only the flow in 'draft' environment + // is trained. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + TrainFlow(context.Context, *TrainFlowRequest) (*longrunning.Operation, error) + // Validates the specified flow and creates or updates validation results. + // Please call this API after the training is completed to get the complete + // validation results. + ValidateFlow(context.Context, *ValidateFlowRequest) (*FlowValidationResult, error) + // Gets the latest flow validation result. Flow validation is performed + // when ValidateFlow is called. + GetFlowValidationResult(context.Context, *GetFlowValidationResultRequest) (*FlowValidationResult, error) + // Imports the specified flow to the specified agent from a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse] + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + ImportFlow(context.Context, *ImportFlowRequest) (*longrunning.Operation, error) + // Exports the specified flow to a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse] + // + // Note that resources (e.g. intents, entities, webhooks) that the flow + // references will also be exported. + ExportFlow(context.Context, *ExportFlowRequest) (*longrunning.Operation, error) +} + +// UnimplementedFlowsServer can be embedded to have forward compatible implementations. +type UnimplementedFlowsServer struct { +} + +func (*UnimplementedFlowsServer) CreateFlow(context.Context, *CreateFlowRequest) (*Flow, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateFlow not implemented") +} +func (*UnimplementedFlowsServer) DeleteFlow(context.Context, *DeleteFlowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteFlow not implemented") +} +func (*UnimplementedFlowsServer) ListFlows(context.Context, *ListFlowsRequest) (*ListFlowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFlows not implemented") +} +func (*UnimplementedFlowsServer) GetFlow(context.Context, *GetFlowRequest) (*Flow, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFlow not implemented") +} +func (*UnimplementedFlowsServer) UpdateFlow(context.Context, *UpdateFlowRequest) (*Flow, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateFlow not implemented") +} +func (*UnimplementedFlowsServer) TrainFlow(context.Context, *TrainFlowRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method TrainFlow not implemented") +} +func (*UnimplementedFlowsServer) ValidateFlow(context.Context, *ValidateFlowRequest) (*FlowValidationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateFlow not implemented") +} +func (*UnimplementedFlowsServer) GetFlowValidationResult(context.Context, *GetFlowValidationResultRequest) (*FlowValidationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFlowValidationResult not implemented") +} +func (*UnimplementedFlowsServer) ImportFlow(context.Context, *ImportFlowRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportFlow not implemented") +} +func (*UnimplementedFlowsServer) ExportFlow(context.Context, *ExportFlowRequest) (*longrunning.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportFlow not implemented") +} + +func RegisterFlowsServer(s *grpc.Server, srv FlowsServer) { + s.RegisterService(&_Flows_serviceDesc, srv) +} + +func _Flows_CreateFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).CreateFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/CreateFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).CreateFlow(ctx, req.(*CreateFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_DeleteFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).DeleteFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/DeleteFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).DeleteFlow(ctx, req.(*DeleteFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_ListFlows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFlowsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).ListFlows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/ListFlows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).ListFlows(ctx, req.(*ListFlowsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_GetFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).GetFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).GetFlow(ctx, req.(*GetFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_UpdateFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).UpdateFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/UpdateFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).UpdateFlow(ctx, req.(*UpdateFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_TrainFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TrainFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).TrainFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/TrainFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).TrainFlow(ctx, req.(*TrainFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_ValidateFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).ValidateFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/ValidateFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).ValidateFlow(ctx, req.(*ValidateFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_GetFlowValidationResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFlowValidationResultRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).GetFlowValidationResult(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/GetFlowValidationResult", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).GetFlowValidationResult(ctx, req.(*GetFlowValidationResultRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_ImportFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).ImportFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/ImportFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).ImportFlow(ctx, req.(*ImportFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Flows_ExportFlow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportFlowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FlowsServer).ExportFlow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Flows/ExportFlow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FlowsServer).ExportFlow(ctx, req.(*ExportFlowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Flows_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Flows", + HandlerType: (*FlowsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateFlow", + Handler: _Flows_CreateFlow_Handler, + }, + { + MethodName: "DeleteFlow", + Handler: _Flows_DeleteFlow_Handler, + }, + { + MethodName: "ListFlows", + Handler: _Flows_ListFlows_Handler, + }, + { + MethodName: "GetFlow", + Handler: _Flows_GetFlow_Handler, + }, + { + MethodName: "UpdateFlow", + Handler: _Flows_UpdateFlow_Handler, + }, + { + MethodName: "TrainFlow", + Handler: _Flows_TrainFlow_Handler, + }, + { + MethodName: "ValidateFlow", + Handler: _Flows_ValidateFlow_Handler, + }, + { + MethodName: "GetFlowValidationResult", + Handler: _Flows_GetFlowValidationResult_Handler, + }, + { + MethodName: "ImportFlow", + Handler: _Flows_ImportFlow_Handler, + }, + { + MethodName: "ExportFlow", + Handler: _Flows_ExportFlow_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/flow.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go b/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go new file mode 100644 index 000000000000..1c17a34fb948 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/fulfillment.pb.go @@ -0,0 +1,647 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/fulfillment.proto + +package cxpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A fulfillment can do one or more of the following actions at the same time: +// +// - Generate rich message responses. +// - Set parameter values. +// - Call the webhook. +// +// Fulfillments can be called at various stages in the [Page][google.cloud.dialogflow.cx.v3beta1.Page] or +// [Form][google.cloud.dialogflow.cx.v3beta1.Form] lifecycle. For example, when a [DetectIntentRequest][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest] drives a +// session to enter a new page, the page's entry fulfillment can add a static +// response to the [QueryResult][google.cloud.dialogflow.cx.v3beta1.QueryResult] in the returning [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse], +// call the webhook (for example, to load user data from a database), or both. +type Fulfillment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rich message responses to present to the user. + Messages []*ResponseMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + // The webhook to call. + // Format: `projects//locations//agents//webhooks/`. + Webhook string `protobuf:"bytes,2,opt,name=webhook,proto3" json:"webhook,omitempty"` + // Whether Dialogflow should return currently queued fulfillment response + // messages in streaming APIs. If a webhook is specified, it happens before + // Dialogflow invokes webhook. + // Warning: + // 1) This flag only affects streaming API. Responses are still queued + // and returned once in non-streaming API. + // 2) The flag can be enabled in any fulfillment but only the first 3 partial + // responses will be returned. You may only want to apply it to fulfillments + // that have slow webhooks. + ReturnPartialResponses bool `protobuf:"varint,8,opt,name=return_partial_responses,json=returnPartialResponses,proto3" json:"return_partial_responses,omitempty"` + // The value of this field will be populated in the [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] + // `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is + // called. + // The tag is typically used by the webhook service to identify which + // fulfillment is being called, but it could be used for other purposes. + // This field is required if `webhook` is specified. + Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` + // Set parameter values before executing the webhook. + SetParameterActions []*Fulfillment_SetParameterAction `protobuf:"bytes,4,rep,name=set_parameter_actions,json=setParameterActions,proto3" json:"set_parameter_actions,omitempty"` + // Conditional cases for this fulfillment. + ConditionalCases []*Fulfillment_ConditionalCases `protobuf:"bytes,5,rep,name=conditional_cases,json=conditionalCases,proto3" json:"conditional_cases,omitempty"` +} + +func (x *Fulfillment) Reset() { + *x = Fulfillment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fulfillment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fulfillment) ProtoMessage() {} + +func (x *Fulfillment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fulfillment.ProtoReflect.Descriptor instead. +func (*Fulfillment) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescGZIP(), []int{0} +} + +func (x *Fulfillment) GetMessages() []*ResponseMessage { + if x != nil { + return x.Messages + } + return nil +} + +func (x *Fulfillment) GetWebhook() string { + if x != nil { + return x.Webhook + } + return "" +} + +func (x *Fulfillment) GetReturnPartialResponses() bool { + if x != nil { + return x.ReturnPartialResponses + } + return false +} + +func (x *Fulfillment) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +func (x *Fulfillment) GetSetParameterActions() []*Fulfillment_SetParameterAction { + if x != nil { + return x.SetParameterActions + } + return nil +} + +func (x *Fulfillment) GetConditionalCases() []*Fulfillment_ConditionalCases { + if x != nil { + return x.ConditionalCases + } + return nil +} + +// Setting a parameter value. +type Fulfillment_SetParameterAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Display name of the parameter. + Parameter string `protobuf:"bytes,1,opt,name=parameter,proto3" json:"parameter,omitempty"` + // The new value of the parameter. A null value clears the parameter. + Value *structpb.Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Fulfillment_SetParameterAction) Reset() { + *x = Fulfillment_SetParameterAction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fulfillment_SetParameterAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fulfillment_SetParameterAction) ProtoMessage() {} + +func (x *Fulfillment_SetParameterAction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fulfillment_SetParameterAction.ProtoReflect.Descriptor instead. +func (*Fulfillment_SetParameterAction) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Fulfillment_SetParameterAction) GetParameter() string { + if x != nil { + return x.Parameter + } + return "" +} + +func (x *Fulfillment_SetParameterAction) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +// A list of cascading if-else conditions. Cases are mutually exclusive. +// The first one with a matching condition is selected, all the rest ignored. +type Fulfillment_ConditionalCases struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of cascading if-else conditions. + Cases []*Fulfillment_ConditionalCases_Case `protobuf:"bytes,1,rep,name=cases,proto3" json:"cases,omitempty"` +} + +func (x *Fulfillment_ConditionalCases) Reset() { + *x = Fulfillment_ConditionalCases{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fulfillment_ConditionalCases) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fulfillment_ConditionalCases) ProtoMessage() {} + +func (x *Fulfillment_ConditionalCases) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fulfillment_ConditionalCases.ProtoReflect.Descriptor instead. +func (*Fulfillment_ConditionalCases) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Fulfillment_ConditionalCases) GetCases() []*Fulfillment_ConditionalCases_Case { + if x != nil { + return x.Cases + } + return nil +} + +// Each case has a Boolean condition. When it is evaluated to be True, the +// corresponding messages will be selected and evaluated recursively. +type Fulfillment_ConditionalCases_Case struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The condition to activate and select this case. Empty means the + // condition is always true. The condition is evaluated against [form + // parameters][Form.parameters] or [session + // parameters][SessionInfo.parameters]. + // + // See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + Condition string `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` + // A list of case content. + CaseContent []*Fulfillment_ConditionalCases_Case_CaseContent `protobuf:"bytes,2,rep,name=case_content,json=caseContent,proto3" json:"case_content,omitempty"` +} + +func (x *Fulfillment_ConditionalCases_Case) Reset() { + *x = Fulfillment_ConditionalCases_Case{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fulfillment_ConditionalCases_Case) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fulfillment_ConditionalCases_Case) ProtoMessage() {} + +func (x *Fulfillment_ConditionalCases_Case) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fulfillment_ConditionalCases_Case.ProtoReflect.Descriptor instead. +func (*Fulfillment_ConditionalCases_Case) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescGZIP(), []int{0, 1, 0} +} + +func (x *Fulfillment_ConditionalCases_Case) GetCondition() string { + if x != nil { + return x.Condition + } + return "" +} + +func (x *Fulfillment_ConditionalCases_Case) GetCaseContent() []*Fulfillment_ConditionalCases_Case_CaseContent { + if x != nil { + return x.CaseContent + } + return nil +} + +// The list of messages or conditional cases to activate for this case. +type Fulfillment_ConditionalCases_Case_CaseContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Either a message is returned or additional cases to be evaluated. + // + // Types that are assignable to CasesOrMessage: + // + // *Fulfillment_ConditionalCases_Case_CaseContent_Message + // *Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases + CasesOrMessage isFulfillment_ConditionalCases_Case_CaseContent_CasesOrMessage `protobuf_oneof:"cases_or_message"` +} + +func (x *Fulfillment_ConditionalCases_Case_CaseContent) Reset() { + *x = Fulfillment_ConditionalCases_Case_CaseContent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fulfillment_ConditionalCases_Case_CaseContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fulfillment_ConditionalCases_Case_CaseContent) ProtoMessage() {} + +func (x *Fulfillment_ConditionalCases_Case_CaseContent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fulfillment_ConditionalCases_Case_CaseContent.ProtoReflect.Descriptor instead. +func (*Fulfillment_ConditionalCases_Case_CaseContent) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescGZIP(), []int{0, 1, 0, 0} +} + +func (m *Fulfillment_ConditionalCases_Case_CaseContent) GetCasesOrMessage() isFulfillment_ConditionalCases_Case_CaseContent_CasesOrMessage { + if m != nil { + return m.CasesOrMessage + } + return nil +} + +func (x *Fulfillment_ConditionalCases_Case_CaseContent) GetMessage() *ResponseMessage { + if x, ok := x.GetCasesOrMessage().(*Fulfillment_ConditionalCases_Case_CaseContent_Message); ok { + return x.Message + } + return nil +} + +func (x *Fulfillment_ConditionalCases_Case_CaseContent) GetAdditionalCases() *Fulfillment_ConditionalCases { + if x, ok := x.GetCasesOrMessage().(*Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases); ok { + return x.AdditionalCases + } + return nil +} + +type isFulfillment_ConditionalCases_Case_CaseContent_CasesOrMessage interface { + isFulfillment_ConditionalCases_Case_CaseContent_CasesOrMessage() +} + +type Fulfillment_ConditionalCases_Case_CaseContent_Message struct { + // Returned message. + Message *ResponseMessage `protobuf:"bytes,1,opt,name=message,proto3,oneof"` +} + +type Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases struct { + // Additional cases to be evaluated. + AdditionalCases *Fulfillment_ConditionalCases `protobuf:"bytes,2,opt,name=additional_cases,json=additionalCases,proto3,oneof"` +} + +func (*Fulfillment_ConditionalCases_Case_CaseContent_Message) isFulfillment_ConditionalCases_Case_CaseContent_CasesOrMessage() { +} + +func (*Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases) isFulfillment_ConditionalCases_Case_CaseContent_CasesOrMessage() { +} + +var File_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, + 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, + 0x08, 0x0a, 0x0b, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4f, + 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x40, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, + 0x6b, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x16, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, + 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x76, 0x0a, + 0x15, 0x73, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, + 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x73, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6d, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, + 0x61, 0x73, 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xf0, 0x03, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x05, 0x63, + 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x73, + 0x65, 0x52, 0x05, 0x63, 0x61, 0x73, 0x65, 0x73, 0x1a, 0xfe, 0x02, 0x0a, 0x04, 0x43, 0x61, 0x73, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x74, 0x0a, 0x0c, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, + 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x73, 0x65, 0x2e, 0x43, 0x61, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x61, 0x73, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0xe1, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x73, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x6d, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x61, 0x73, + 0x65, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x43, 0x61, 0x73, 0x65, 0x73, 0x42, 0x12, 0x0a, 0x10, 0x63, 0x61, 0x73, 0x65, 0x73, 0x5f, 0x6f, + 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0xd8, 0x01, 0x0a, 0x26, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x10, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, + 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_goTypes = []interface{}{ + (*Fulfillment)(nil), // 0: google.cloud.dialogflow.cx.v3beta1.Fulfillment + (*Fulfillment_SetParameterAction)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + (*Fulfillment_ConditionalCases)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + (*Fulfillment_ConditionalCases_Case)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + (*Fulfillment_ConditionalCases_Case_CaseContent)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + (*ResponseMessage)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.ResponseMessage + (*structpb.Value)(nil), // 6: google.protobuf.Value +} +var file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_depIdxs = []int32{ + 5, // 0: google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage + 1, // 1: google.cloud.dialogflow.cx.v3beta1.Fulfillment.set_parameter_actions:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction + 2, // 2: google.cloud.dialogflow.cx.v3beta1.Fulfillment.conditional_cases:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + 6, // 3: google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction.value:type_name -> google.protobuf.Value + 3, // 4: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.cases:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case + 4, // 5: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.case_content:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent + 5, // 6: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.message:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage + 2, // 7: google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases.Case.CaseContent.additional_cases:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment.ConditionalCases + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto != nil { + return + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fulfillment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fulfillment_SetParameterAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fulfillment_ConditionalCases); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fulfillment_ConditionalCases_Case); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fulfillment_ConditionalCases_Case_CaseContent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*Fulfillment_ConditionalCases_Case_CaseContent_Message)(nil), + (*Fulfillment_ConditionalCases_Case_CaseContent_AdditionalCases)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_depIdxs = nil +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go b/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go new file mode 100644 index 000000000000..e1d570b9d847 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/intent.pb.go @@ -0,0 +1,1603 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/intent.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents the options for views of an intent. +// An intent can be a sizable object. Therefore, we provide a resource view that +// does not return training phrases in the response. +type IntentView int32 + +const ( + // Not specified. Treated as INTENT_VIEW_FULL. + IntentView_INTENT_VIEW_UNSPECIFIED IntentView = 0 + // Training phrases field is not populated in the response. + IntentView_INTENT_VIEW_PARTIAL IntentView = 1 + // All fields are populated. + IntentView_INTENT_VIEW_FULL IntentView = 2 +) + +// Enum value maps for IntentView. +var ( + IntentView_name = map[int32]string{ + 0: "INTENT_VIEW_UNSPECIFIED", + 1: "INTENT_VIEW_PARTIAL", + 2: "INTENT_VIEW_FULL", + } + IntentView_value = map[string]int32{ + "INTENT_VIEW_UNSPECIFIED": 0, + "INTENT_VIEW_PARTIAL": 1, + "INTENT_VIEW_FULL": 2, + } +) + +func (x IntentView) Enum() *IntentView { + p := new(IntentView) + *p = x + return p +} + +func (x IntentView) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IntentView) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_enumTypes[0].Descriptor() +} + +func (IntentView) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_enumTypes[0] +} + +func (x IntentView) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IntentView.Descriptor instead. +func (IntentView) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{0} +} + +// An intent represents a user's intent to interact with a conversational agent. +// +// You can provide information for the Dialogflow API to use to match user input +// to an intent by adding training phrases (i.e., examples of user input) to +// your intent. +type Intent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the intent. + // Required for the [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3beta1.Intents.UpdateIntent] method. [Intents.CreateIntent][google.cloud.dialogflow.cx.v3beta1.Intents.CreateIntent] + // populates the name automatically. + // Format: `projects//locations//agents//intents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the intent, unique within the agent. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The collection of training phrases the agent is trained on to identify the + // intent. + TrainingPhrases []*Intent_TrainingPhrase `protobuf:"bytes,3,rep,name=training_phrases,json=trainingPhrases,proto3" json:"training_phrases,omitempty"` + // The collection of parameters associated with the intent. + Parameters []*Intent_Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` + // The priority of this intent. Higher numbers represent higher + // priorities. + // + // - If the supplied value is unspecified or 0, the service + // translates the value to 500,000, which corresponds to the + // `Normal` priority in the console. + // - If the supplied value is negative, the intent is ignored + // in runtime detect intent requests. + Priority int32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"` + // Indicates whether this is a fallback intent. Currently only default + // fallback intent is allowed in the agent, which is added upon agent + // creation. + // Adding training phrases to fallback intent is useful in the case of + // requests that are mistakenly matched, since training phrases assigned to + // fallback intents act as negative examples that triggers no-match event. + IsFallback bool `protobuf:"varint,6,opt,name=is_fallback,json=isFallback,proto3" json:"is_fallback,omitempty"` + // The key/value metadata to label an intent. Labels can contain + // lowercase letters, digits and the symbols '-' and '_'. International + // characters are allowed, including letters from unicase alphabets. Keys must + // start with a letter. Keys and values can be no longer than 63 characters + // and no more than 128 bytes. + // + // Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed + // Dialogflow defined labels include: + // * sys-head + // * sys-contextual + // The above labels do not require value. "sys-head" means the intent is a + // head intent. "sys-contextual" means the intent is a contextual intent. + Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Human readable description for better understanding an intent like its + // scope, content, result etc. Maximum character limit: 140 characters. + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *Intent) Reset() { + *x = Intent{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Intent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Intent) ProtoMessage() {} + +func (x *Intent) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Intent.ProtoReflect.Descriptor instead. +func (*Intent) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{0} +} + +func (x *Intent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Intent) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Intent) GetTrainingPhrases() []*Intent_TrainingPhrase { + if x != nil { + return x.TrainingPhrases + } + return nil +} + +func (x *Intent) GetParameters() []*Intent_Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *Intent) GetPriority() int32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *Intent) GetIsFallback() bool { + if x != nil { + return x.IsFallback + } + return false +} + +func (x *Intent) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Intent) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +// The request message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ListIntents]. +type ListIntentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to list all intents for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The language to list intents for. The following fields are language + // dependent: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // The resource view to apply to the returned intent. + IntentView IntentView `protobuf:"varint,5,opt,name=intent_view,json=intentView,proto3,enum=google.cloud.dialogflow.cx.v3beta1.IntentView" json:"intent_view,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListIntentsRequest) Reset() { + *x = ListIntentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListIntentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIntentsRequest) ProtoMessage() {} + +func (x *ListIntentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIntentsRequest.ProtoReflect.Descriptor instead. +func (*ListIntentsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{1} +} + +func (x *ListIntentsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListIntentsRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *ListIntentsRequest) GetIntentView() IntentView { + if x != nil { + return x.IntentView + } + return IntentView_INTENT_VIEW_UNSPECIFIED +} + +func (x *ListIntentsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListIntentsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ListIntents]. +type ListIntentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of intents. There will be a maximum number of items returned based + // on the page_size field in the request. + Intents []*Intent `protobuf:"bytes,1,rep,name=intents,proto3" json:"intents,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListIntentsResponse) Reset() { + *x = ListIntentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListIntentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIntentsResponse) ProtoMessage() {} + +func (x *ListIntentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIntentsResponse.ProtoReflect.Descriptor instead. +func (*ListIntentsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{2} +} + +func (x *ListIntentsResponse) GetIntents() []*Intent { + if x != nil { + return x.Intents + } + return nil +} + +func (x *ListIntentsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Intents.GetIntent][google.cloud.dialogflow.cx.v3beta1.Intents.GetIntent]. +type GetIntentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the intent. + // Format: `projects//locations//agents//intents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The language to retrieve the intent for. The following fields are language + // dependent: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetIntentRequest) Reset() { + *x = GetIntentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIntentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIntentRequest) ProtoMessage() {} + +func (x *GetIntentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIntentRequest.ProtoReflect.Descriptor instead. +func (*GetIntentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{3} +} + +func (x *GetIntentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetIntentRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Intents.CreateIntent][google.cloud.dialogflow.cx.v3beta1.Intents.CreateIntent]. +type CreateIntentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The agent to create an intent for. + // Format: `projects//locations//agents/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The intent to create. + Intent *Intent `protobuf:"bytes,2,opt,name=intent,proto3" json:"intent,omitempty"` + // The language of the following fields in `intent`: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *CreateIntentRequest) Reset() { + *x = CreateIntentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateIntentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIntentRequest) ProtoMessage() {} + +func (x *CreateIntentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIntentRequest.ProtoReflect.Descriptor instead. +func (*CreateIntentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateIntentRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateIntentRequest) GetIntent() *Intent { + if x != nil { + return x.Intent + } + return nil +} + +func (x *CreateIntentRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3beta1.Intents.UpdateIntent]. +type UpdateIntentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The intent to update. + Intent *Intent `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent,omitempty"` + // The language of the following fields in `intent`: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateIntentRequest) Reset() { + *x = UpdateIntentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateIntentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateIntentRequest) ProtoMessage() {} + +func (x *UpdateIntentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateIntentRequest.ProtoReflect.Descriptor instead. +func (*UpdateIntentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateIntentRequest) GetIntent() *Intent { + if x != nil { + return x.Intent + } + return nil +} + +func (x *UpdateIntentRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *UpdateIntentRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.cx.v3beta1.Intents.DeleteIntent]. +type DeleteIntentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the intent to delete. + // Format: `projects//locations//agents//intents/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteIntentRequest) Reset() { + *x = DeleteIntentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteIntentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteIntentRequest) ProtoMessage() {} + +func (x *DeleteIntentRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteIntentRequest.ProtoReflect.Descriptor instead. +func (*DeleteIntentRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteIntentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Represents an example that the agent is trained on to identify the intent. +type Intent_TrainingPhrase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The unique identifier of the training phrase. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Required. The ordered list of training phrase parts. + // The parts are concatenated in order to form the training phrase. + // + // Note: The API does not automatically annotate training phrases like the + // Dialogflow Console does. + // + // Note: Do not forget to include whitespace at part boundaries, so the + // training phrase is well formatted when the parts are concatenated. + // + // If the training phrase does not need to be annotated with parameters, + // you just need a single part with only the [Part.text][google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase.Part.text] field set. + // + // If you want to annotate the training phrase, you must create multiple + // parts, where the fields of each part are populated in one of two ways: + // + // - `Part.text` is set to a part of the phrase that has no parameters. + // - `Part.text` is set to a part of the phrase that you want to annotate, + // and the `parameter_id` field is set. + Parts []*Intent_TrainingPhrase_Part `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts,omitempty"` + // Indicates how many times this example was added to the intent. + RepeatCount int32 `protobuf:"varint,3,opt,name=repeat_count,json=repeatCount,proto3" json:"repeat_count,omitempty"` +} + +func (x *Intent_TrainingPhrase) Reset() { + *x = Intent_TrainingPhrase{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Intent_TrainingPhrase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Intent_TrainingPhrase) ProtoMessage() {} + +func (x *Intent_TrainingPhrase) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Intent_TrainingPhrase.ProtoReflect.Descriptor instead. +func (*Intent_TrainingPhrase) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Intent_TrainingPhrase) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Intent_TrainingPhrase) GetParts() []*Intent_TrainingPhrase_Part { + if x != nil { + return x.Parts + } + return nil +} + +func (x *Intent_TrainingPhrase) GetRepeatCount() int32 { + if x != nil { + return x.RepeatCount + } + return 0 +} + +// Represents an intent parameter. +type Intent_Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The unique identifier of the parameter. This field + // is used by [training phrases][google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase] to annotate their + // [parts][google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase.Part]. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Required. The entity type of the parameter. + // Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, + // `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + // `projects//locations//agents//entityTypes/` for developer entity types. + EntityType string `protobuf:"bytes,2,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"` + // Indicates whether the parameter represents a list of values. + IsList bool `protobuf:"varint,3,opt,name=is_list,json=isList,proto3" json:"is_list,omitempty"` + // Indicates whether the parameter content should be redacted in log. If + // redaction is enabled, the parameter content will be replaced by parameter + // name during logging. + // Note: the parameter content is subject to redaction if either parameter + // level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is + // enabled. + Redact bool `protobuf:"varint,4,opt,name=redact,proto3" json:"redact,omitempty"` +} + +func (x *Intent_Parameter) Reset() { + *x = Intent_Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Intent_Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Intent_Parameter) ProtoMessage() {} + +func (x *Intent_Parameter) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Intent_Parameter.ProtoReflect.Descriptor instead. +func (*Intent_Parameter) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Intent_Parameter) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Intent_Parameter) GetEntityType() string { + if x != nil { + return x.EntityType + } + return "" +} + +func (x *Intent_Parameter) GetIsList() bool { + if x != nil { + return x.IsList + } + return false +} + +func (x *Intent_Parameter) GetRedact() bool { + if x != nil { + return x.Redact + } + return false +} + +// Represents a part of a training phrase. +type Intent_TrainingPhrase_Part struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The text for this part. + Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` + // The [parameter][google.cloud.dialogflow.cx.v3beta1.Intent.Parameter] used to annotate this part of the + // training phrase. This field is required for annotated parts of the + // training phrase. + ParameterId string `protobuf:"bytes,2,opt,name=parameter_id,json=parameterId,proto3" json:"parameter_id,omitempty"` +} + +func (x *Intent_TrainingPhrase_Part) Reset() { + *x = Intent_TrainingPhrase_Part{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Intent_TrainingPhrase_Part) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Intent_TrainingPhrase_Part) ProtoMessage() {} + +func (x *Intent_TrainingPhrase_Part) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Intent_TrainingPhrase_Part.ProtoReflect.Descriptor instead. +func (*Intent_TrainingPhrase_Part) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP(), []int{0, 0, 0} +} + +func (x *Intent_TrainingPhrase_Part) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *Intent_TrainingPhrase_Part) GetParameterId() string { + if x != nil { + return x.ParameterId + } + return "" +} + +var File_google_cloud_dialogflow_cx_v3beta1_intent_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x07, 0x0a, 0x06, 0x49, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x64, + 0x0a, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x68, 0x72, 0x61, 0x73, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x72, + 0x61, 0x73, 0x65, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x72, + 0x61, 0x73, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x66, 0x61, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x4e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xe2, 0x01, 0x0a, 0x0e, 0x54, 0x72, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x59, 0x0a, 0x05, + 0x70, 0x61, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x50, 0x68, 0x72, 0x61, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x42, 0x0a, 0x04, 0x50, 0x61, + 0x72, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x64, 0x1a, 0xa0, + 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x4d, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x64, + 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x64, 0x61, 0x63, + 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x6e, 0xea, 0x41, + 0x6b, 0x0a, 0x20, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x47, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x7d, 0x22, 0x88, 0x02, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x12, 0x20, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4f, 0x0a, 0x0b, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x69, 0x65, 0x77, 0x52, + 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x44, 0x0a, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x75, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x22, 0x12, 0x20, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x47, + 0x0a, 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xc0, 0x01, 0x0a, + 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, + 0x53, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x22, 0x0a, 0x20, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x58, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x56, 0x69, + 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x49, 0x45, + 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x50, + 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x54, 0x45, + 0x4e, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xe4, + 0x08, 0x0a, 0x07, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xca, 0x01, 0x0a, 0x0b, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xda, 0x41, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xb7, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, + 0x39, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0xce, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, + 0x39, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x06, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0xda, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, + 0x32, 0x40, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0xda, 0x41, 0x12, 0x69, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x12, + 0xa9, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x12, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x2a, 0x39, 0x2f, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x78, 0xca, 0x41, 0x19, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, 0x68, 0x74, 0x74, 0x70, + 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0xd3, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, + 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x42, 0x0b, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, 0x02, 0x22, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x69, 0x61, + 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, 0x65, 0x74, + 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x3a, + 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_intent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_google_cloud_dialogflow_cx_v3beta1_intent_proto_goTypes = []interface{}{ + (IntentView)(0), // 0: google.cloud.dialogflow.cx.v3beta1.IntentView + (*Intent)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.Intent + (*ListIntentsRequest)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest + (*ListIntentsResponse)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse + (*GetIntentRequest)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.GetIntentRequest + (*CreateIntentRequest)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest + (*UpdateIntentRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest + (*DeleteIntentRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest + (*Intent_TrainingPhrase)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase + (*Intent_Parameter)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.Intent.Parameter + nil, // 10: google.cloud.dialogflow.cx.v3beta1.Intent.LabelsEntry + (*Intent_TrainingPhrase_Part)(nil), // 11: google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase.Part + (*fieldmaskpb.FieldMask)(nil), // 12: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 13: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3beta1_intent_proto_depIdxs = []int32{ + 8, // 0: google.cloud.dialogflow.cx.v3beta1.Intent.training_phrases:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase + 9, // 1: google.cloud.dialogflow.cx.v3beta1.Intent.parameters:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent.Parameter + 10, // 2: google.cloud.dialogflow.cx.v3beta1.Intent.labels:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent.LabelsEntry + 0, // 3: google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest.intent_view:type_name -> google.cloud.dialogflow.cx.v3beta1.IntentView + 1, // 4: google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse.intents:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent + 1, // 5: google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest.intent:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent + 1, // 6: google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest.intent:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent + 12, // 7: google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest.update_mask:type_name -> google.protobuf.FieldMask + 11, // 8: google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase.parts:type_name -> google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase.Part + 2, // 9: google.cloud.dialogflow.cx.v3beta1.Intents.ListIntents:input_type -> google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest + 4, // 10: google.cloud.dialogflow.cx.v3beta1.Intents.GetIntent:input_type -> google.cloud.dialogflow.cx.v3beta1.GetIntentRequest + 5, // 11: google.cloud.dialogflow.cx.v3beta1.Intents.CreateIntent:input_type -> google.cloud.dialogflow.cx.v3beta1.CreateIntentRequest + 6, // 12: google.cloud.dialogflow.cx.v3beta1.Intents.UpdateIntent:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdateIntentRequest + 7, // 13: google.cloud.dialogflow.cx.v3beta1.Intents.DeleteIntent:input_type -> google.cloud.dialogflow.cx.v3beta1.DeleteIntentRequest + 3, // 14: google.cloud.dialogflow.cx.v3beta1.Intents.ListIntents:output_type -> google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse + 1, // 15: google.cloud.dialogflow.cx.v3beta1.Intents.GetIntent:output_type -> google.cloud.dialogflow.cx.v3beta1.Intent + 1, // 16: google.cloud.dialogflow.cx.v3beta1.Intents.CreateIntent:output_type -> google.cloud.dialogflow.cx.v3beta1.Intent + 1, // 17: google.cloud.dialogflow.cx.v3beta1.Intents.UpdateIntent:output_type -> google.cloud.dialogflow.cx.v3beta1.Intent + 13, // 18: google.cloud.dialogflow.cx.v3beta1.Intents.DeleteIntent:output_type -> google.protobuf.Empty + 14, // [14:19] is the sub-list for method output_type + 9, // [9:14] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_intent_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_intent_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_intent_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Intent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListIntentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListIntentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIntentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIntentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateIntentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIntentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Intent_TrainingPhrase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Intent_Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Intent_TrainingPhrase_Part); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDesc, + NumEnums: 1, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_intent_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_intent_proto_depIdxs, + EnumInfos: file_google_cloud_dialogflow_cx_v3beta1_intent_proto_enumTypes, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_intent_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_intent_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_intent_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// IntentsClient is the client API for Intents service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type IntentsClient interface { + // Returns the list of all intents in the specified agent. + ListIntents(ctx context.Context, in *ListIntentsRequest, opts ...grpc.CallOption) (*ListIntentsResponse, error) + // Retrieves the specified intent. + GetIntent(ctx context.Context, in *GetIntentRequest, opts ...grpc.CallOption) (*Intent, error) + // Creates an intent in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + CreateIntent(ctx context.Context, in *CreateIntentRequest, opts ...grpc.CallOption) (*Intent, error) + // Updates the specified intent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateIntent(ctx context.Context, in *UpdateIntentRequest, opts ...grpc.CallOption) (*Intent, error) + // Deletes the specified intent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + DeleteIntent(ctx context.Context, in *DeleteIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type intentsClient struct { + cc grpc.ClientConnInterface +} + +func NewIntentsClient(cc grpc.ClientConnInterface) IntentsClient { + return &intentsClient{cc} +} + +func (c *intentsClient) ListIntents(ctx context.Context, in *ListIntentsRequest, opts ...grpc.CallOption) (*ListIntentsResponse, error) { + out := new(ListIntentsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Intents/ListIntents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intentsClient) GetIntent(ctx context.Context, in *GetIntentRequest, opts ...grpc.CallOption) (*Intent, error) { + out := new(Intent) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Intents/GetIntent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intentsClient) CreateIntent(ctx context.Context, in *CreateIntentRequest, opts ...grpc.CallOption) (*Intent, error) { + out := new(Intent) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Intents/CreateIntent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intentsClient) UpdateIntent(ctx context.Context, in *UpdateIntentRequest, opts ...grpc.CallOption) (*Intent, error) { + out := new(Intent) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Intents/UpdateIntent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intentsClient) DeleteIntent(ctx context.Context, in *DeleteIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Intents/DeleteIntent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IntentsServer is the server API for Intents service. +type IntentsServer interface { + // Returns the list of all intents in the specified agent. + ListIntents(context.Context, *ListIntentsRequest) (*ListIntentsResponse, error) + // Retrieves the specified intent. + GetIntent(context.Context, *GetIntentRequest) (*Intent, error) + // Creates an intent in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + CreateIntent(context.Context, *CreateIntentRequest) (*Intent, error) + // Updates the specified intent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + UpdateIntent(context.Context, *UpdateIntentRequest) (*Intent, error) + // Deletes the specified intent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + DeleteIntent(context.Context, *DeleteIntentRequest) (*emptypb.Empty, error) +} + +// UnimplementedIntentsServer can be embedded to have forward compatible implementations. +type UnimplementedIntentsServer struct { +} + +func (*UnimplementedIntentsServer) ListIntents(context.Context, *ListIntentsRequest) (*ListIntentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListIntents not implemented") +} +func (*UnimplementedIntentsServer) GetIntent(context.Context, *GetIntentRequest) (*Intent, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIntent not implemented") +} +func (*UnimplementedIntentsServer) CreateIntent(context.Context, *CreateIntentRequest) (*Intent, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateIntent not implemented") +} +func (*UnimplementedIntentsServer) UpdateIntent(context.Context, *UpdateIntentRequest) (*Intent, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateIntent not implemented") +} +func (*UnimplementedIntentsServer) DeleteIntent(context.Context, *DeleteIntentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteIntent not implemented") +} + +func RegisterIntentsServer(s *grpc.Server, srv IntentsServer) { + s.RegisterService(&_Intents_serviceDesc, srv) +} + +func _Intents_ListIntents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIntentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntentsServer).ListIntents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Intents/ListIntents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntentsServer).ListIntents(ctx, req.(*ListIntentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Intents_GetIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetIntentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntentsServer).GetIntent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Intents/GetIntent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntentsServer).GetIntent(ctx, req.(*GetIntentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Intents_CreateIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIntentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntentsServer).CreateIntent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Intents/CreateIntent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntentsServer).CreateIntent(ctx, req.(*CreateIntentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Intents_UpdateIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateIntentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntentsServer).UpdateIntent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Intents/UpdateIntent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntentsServer).UpdateIntent(ctx, req.(*UpdateIntentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Intents_DeleteIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntentsServer).DeleteIntent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Intents/DeleteIntent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntentsServer).DeleteIntent(ctx, req.(*DeleteIntentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Intents_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Intents", + HandlerType: (*IntentsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListIntents", + Handler: _Intents_ListIntents_Handler, + }, + { + MethodName: "GetIntent", + Handler: _Intents_GetIntent_Handler, + }, + { + MethodName: "CreateIntent", + Handler: _Intents_CreateIntent_Handler, + }, + { + MethodName: "UpdateIntent", + Handler: _Intents_UpdateIntent_Handler, + }, + { + MethodName: "DeleteIntent", + Handler: _Intents_DeleteIntent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/intent.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/page.pb.go b/dialogflow/cx/apiv3beta1/cxpb/page.pb.go new file mode 100644 index 000000000000..33597598d925 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/page.pb.go @@ -0,0 +1,1998 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/page.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A Dialogflow CX conversation (session) can be described and visualized as a +// state machine. The states of a CX session are represented by pages. +// +// For each flow, you define many pages, where your combined pages can handle a +// complete conversation on the topics the flow is designed for. At any given +// moment, exactly one page is the current page, the current page is considered +// active, and the flow associated with that page is considered active. Every +// flow has a special start page. When a flow initially becomes active, the +// start page page becomes the current page. For each conversational turn, the +// current page will either stay the same or transition to another page. +// +// You configure each page to collect information from the end-user that is +// relevant for the conversational state represented by the page. +// +// For more information, see the +// [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page). +type Page struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the page. + // Required for the [Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage] method. [Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage] + // populates the name automatically. + // Format: `projects//locations//agents//flows//pages/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the page, unique within the flow. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The fulfillment to call when the session is entering the page. + EntryFulfillment *Fulfillment `protobuf:"bytes,7,opt,name=entry_fulfillment,json=entryFulfillment,proto3" json:"entry_fulfillment,omitempty"` + // The form associated with the page, used for collecting parameters + // relevant to the page. + Form *Form `protobuf:"bytes,4,opt,name=form,proto3" json:"form,omitempty"` + // Ordered list of [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] associated + // with the page. Transition route groups must be unique within a page. + // + // - If multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> page's + // transition route group -> flow's transition routes. + // + // - If multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. + // + // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + TransitionRouteGroups []string `protobuf:"bytes,11,rep,name=transition_route_groups,json=transitionRouteGroups,proto3" json:"transition_route_groups,omitempty"` + // A list of transitions for the transition rules of this page. + // They route the conversation to another page in the same flow, or another + // flow. + // + // When we are in a certain page, the TransitionRoutes are evalauted in the + // following order: + // + // - TransitionRoutes defined in the page with intent specified. + // - TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent + // specified. + // - TransitionRoutes defined in flow with intent specified. + // - TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3beta1.Flow.transition_route_groups] with intent + // specified. + // - TransitionRoutes defined in the page with only condition specified. + // - TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only + // condition specified. + TransitionRoutes []*TransitionRoute `protobuf:"bytes,9,rep,name=transition_routes,json=transitionRoutes,proto3" json:"transition_routes,omitempty"` + // Handlers associated with the page to handle events such as webhook errors, + // no match or no input. + EventHandlers []*EventHandler `protobuf:"bytes,10,rep,name=event_handlers,json=eventHandlers,proto3" json:"event_handlers,omitempty"` +} + +func (x *Page) Reset() { + *x = Page{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Page) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Page) ProtoMessage() {} + +func (x *Page) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Page.ProtoReflect.Descriptor instead. +func (*Page) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{0} +} + +func (x *Page) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Page) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Page) GetEntryFulfillment() *Fulfillment { + if x != nil { + return x.EntryFulfillment + } + return nil +} + +func (x *Page) GetForm() *Form { + if x != nil { + return x.Form + } + return nil +} + +func (x *Page) GetTransitionRouteGroups() []string { + if x != nil { + return x.TransitionRouteGroups + } + return nil +} + +func (x *Page) GetTransitionRoutes() []*TransitionRoute { + if x != nil { + return x.TransitionRoutes + } + return nil +} + +func (x *Page) GetEventHandlers() []*EventHandler { + if x != nil { + return x.EventHandlers + } + return nil +} + +// A form is a data model that groups related parameters that can be collected +// from the user. The process in which the agent prompts the user and collects +// parameter values from the user is called form filling. A form can be added to +// a [page][google.cloud.dialogflow.cx.v3beta1.Page]. When form filling is done, the filled parameters will be +// written to the [session][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters]. +type Form struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Parameters to collect from the user. + Parameters []*Form_Parameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *Form) Reset() { + *x = Form{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Form) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Form) ProtoMessage() {} + +func (x *Form) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Form.ProtoReflect.Descriptor instead. +func (*Form) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{1} +} + +func (x *Form) GetParameters() []*Form_Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +// An event handler specifies an [event][google.cloud.dialogflow.cx.v3beta1.EventHandler.event] that can be handled +// during a session. When the specified event happens, the following actions are +// taken in order: +// +// * If there is a +// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.EventHandler.trigger_fulfillment] associated with +// the event, it will be called. +// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_page] associated +// with the event, the session will transition into the specified page. +// * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_flow] associated +// with the event, the session will transition into the specified flow. +type EventHandler struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The unique identifier of this event handler. + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // Required. The name of the event to handle. + Event string `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"` + // The fulfillment to call when the event occurs. + // Handling webhook errors with a fulfillment enabled with webhook could + // cause infinite loop. It is invalid to specify such fulfillment for a + // handler handling webhooks. + TriggerFulfillment *Fulfillment `protobuf:"bytes,5,opt,name=trigger_fulfillment,json=triggerFulfillment,proto3" json:"trigger_fulfillment,omitempty"` + // The target to transition to, either a page in the same host flow (the flow + // that owns this [TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute]), or another flow in the same agent. + // + // Types that are assignable to Target: + // + // *EventHandler_TargetPage + // *EventHandler_TargetFlow + Target isEventHandler_Target `protobuf_oneof:"target"` +} + +func (x *EventHandler) Reset() { + *x = EventHandler{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventHandler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventHandler) ProtoMessage() {} + +func (x *EventHandler) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventHandler.ProtoReflect.Descriptor instead. +func (*EventHandler) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{2} +} + +func (x *EventHandler) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EventHandler) GetEvent() string { + if x != nil { + return x.Event + } + return "" +} + +func (x *EventHandler) GetTriggerFulfillment() *Fulfillment { + if x != nil { + return x.TriggerFulfillment + } + return nil +} + +func (m *EventHandler) GetTarget() isEventHandler_Target { + if m != nil { + return m.Target + } + return nil +} + +func (x *EventHandler) GetTargetPage() string { + if x, ok := x.GetTarget().(*EventHandler_TargetPage); ok { + return x.TargetPage + } + return "" +} + +func (x *EventHandler) GetTargetFlow() string { + if x, ok := x.GetTarget().(*EventHandler_TargetFlow); ok { + return x.TargetFlow + } + return "" +} + +type isEventHandler_Target interface { + isEventHandler_Target() +} + +type EventHandler_TargetPage struct { + // The target page to transition to. + // Format: `projects//locations//agents//flows//pages/`. + TargetPage string `protobuf:"bytes,2,opt,name=target_page,json=targetPage,proto3,oneof"` +} + +type EventHandler_TargetFlow struct { + // The target flow to transition to. + // Format: `projects//locations//agents//flows/`. + TargetFlow string `protobuf:"bytes,3,opt,name=target_flow,json=targetFlow,proto3,oneof"` +} + +func (*EventHandler_TargetPage) isEventHandler_Target() {} + +func (*EventHandler_TargetFlow) isEventHandler_Target() {} + +// A transition route specifies a [intent][google.cloud.dialogflow.cx.v3beta1.Intent] that can be matched and/or a +// data condition that can be evaluated during a session. When a specified +// transition is matched, the following actions are taken in order: +// +// * If there is a +// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.trigger_fulfillment] associated with +// the transition, it will be called. +// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_page] associated +// with the transition, the session will transition into the specified page. +// * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_flow] associated +// with the transition, the session will transition into the specified flow. +type TransitionRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The unique identifier of this transition route. + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3beta1.Intent]. + // Format: `projects//locations//agents//intents/`. + // Indicates that the transition can only happen when the given intent is + // matched. + // At least one of `intent` or `condition` must be specified. When both + // `intent` and `condition` are specified, the transition can only happen + // when both are fulfilled. + Intent string `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent,omitempty"` + // The condition to evaluate against [form parameters][google.cloud.dialogflow.cx.v3beta1.Form.parameters] or + // [session parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters]. + // + // See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + // At least one of `intent` or `condition` must be specified. When both + // `intent` and `condition` are specified, the transition can only happen + // when both are fulfilled. + Condition string `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"` + // The fulfillment to call when the condition is satisfied. At least one of + // `trigger_fulfillment` and `target` must be specified. When both are + // defined, `trigger_fulfillment` is executed first. + TriggerFulfillment *Fulfillment `protobuf:"bytes,3,opt,name=trigger_fulfillment,json=triggerFulfillment,proto3" json:"trigger_fulfillment,omitempty"` + // The target to transition to, either a page in the same host flow (the flow + // that owns this [TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute]), or another flow in the same agent. + // + // Types that are assignable to Target: + // + // *TransitionRoute_TargetPage + // *TransitionRoute_TargetFlow + Target isTransitionRoute_Target `protobuf_oneof:"target"` +} + +func (x *TransitionRoute) Reset() { + *x = TransitionRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransitionRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransitionRoute) ProtoMessage() {} + +func (x *TransitionRoute) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransitionRoute.ProtoReflect.Descriptor instead. +func (*TransitionRoute) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{3} +} + +func (x *TransitionRoute) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TransitionRoute) GetIntent() string { + if x != nil { + return x.Intent + } + return "" +} + +func (x *TransitionRoute) GetCondition() string { + if x != nil { + return x.Condition + } + return "" +} + +func (x *TransitionRoute) GetTriggerFulfillment() *Fulfillment { + if x != nil { + return x.TriggerFulfillment + } + return nil +} + +func (m *TransitionRoute) GetTarget() isTransitionRoute_Target { + if m != nil { + return m.Target + } + return nil +} + +func (x *TransitionRoute) GetTargetPage() string { + if x, ok := x.GetTarget().(*TransitionRoute_TargetPage); ok { + return x.TargetPage + } + return "" +} + +func (x *TransitionRoute) GetTargetFlow() string { + if x, ok := x.GetTarget().(*TransitionRoute_TargetFlow); ok { + return x.TargetFlow + } + return "" +} + +type isTransitionRoute_Target interface { + isTransitionRoute_Target() +} + +type TransitionRoute_TargetPage struct { + // The target page to transition to. + // Format: `projects//locations//agents//flows//pages/`. + TargetPage string `protobuf:"bytes,4,opt,name=target_page,json=targetPage,proto3,oneof"` +} + +type TransitionRoute_TargetFlow struct { + // The target flow to transition to. + // Format: `projects//locations//agents//flows/`. + TargetFlow string `protobuf:"bytes,5,opt,name=target_flow,json=targetFlow,proto3,oneof"` +} + +func (*TransitionRoute_TargetPage) isTransitionRoute_Target() {} + +func (*TransitionRoute_TargetFlow) isTransitionRoute_Target() {} + +// The request message for [Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages]. +type ListPagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The flow to list all pages for. + // Format: `projects//locations//agents//flows/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The language to list pages for. The following fields are language + // dependent: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListPagesRequest) Reset() { + *x = ListPagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPagesRequest) ProtoMessage() {} + +func (x *ListPagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPagesRequest.ProtoReflect.Descriptor instead. +func (*ListPagesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{4} +} + +func (x *ListPagesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListPagesRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *ListPagesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPagesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages]. +type ListPagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of pages. There will be a maximum number of items returned based + // on the page_size field in the request. + Pages []*Page `protobuf:"bytes,1,rep,name=pages,proto3" json:"pages,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListPagesResponse) Reset() { + *x = ListPagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPagesResponse) ProtoMessage() {} + +func (x *ListPagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPagesResponse.ProtoReflect.Descriptor instead. +func (*ListPagesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{5} +} + +func (x *ListPagesResponse) GetPages() []*Page { + if x != nil { + return x.Pages + } + return nil +} + +func (x *ListPagesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [Pages.GetPage][google.cloud.dialogflow.cx.v3beta1.Pages.GetPage]. +type GetPageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the page. + // Format: `projects//locations//agents//flows//pages/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The language to retrieve the page for. The following fields are language + // dependent: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *GetPageRequest) Reset() { + *x = GetPageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPageRequest) ProtoMessage() {} + +func (x *GetPageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPageRequest.ProtoReflect.Descriptor instead. +func (*GetPageRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{6} +} + +func (x *GetPageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPageRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage]. +type CreatePageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The flow to create a page for. + // Format: `projects//locations//agents//flows/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The page to create. + Page *Page `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` + // The language of the following fields in `page`: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` +} + +func (x *CreatePageRequest) Reset() { + *x = CreatePageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatePageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatePageRequest) ProtoMessage() {} + +func (x *CreatePageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreatePageRequest.ProtoReflect.Descriptor instead. +func (*CreatePageRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{7} +} + +func (x *CreatePageRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreatePageRequest) GetPage() *Page { + if x != nil { + return x.Page + } + return nil +} + +func (x *CreatePageRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +// The request message for [Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage]. +type UpdatePageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The page to update. + Page *Page `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + // The language of the following fields in `page`: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdatePageRequest) Reset() { + *x = UpdatePageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePageRequest) ProtoMessage() {} + +func (x *UpdatePageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePageRequest.ProtoReflect.Descriptor instead. +func (*UpdatePageRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdatePageRequest) GetPage() *Page { + if x != nil { + return x.Page + } + return nil +} + +func (x *UpdatePageRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *UpdatePageRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [Pages.DeletePage][google.cloud.dialogflow.cx.v3beta1.Pages.DeletePage]. +type DeletePageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the page to delete. + // Format: `projects//locations//agents//Flows//pages/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This field has no effect for pages with no incoming transitions. + // For pages with incoming transitions: + // + // - If `force` is set to false, an error will be returned with message + // indicating the incoming transitions. + // - If `force` is set to true, Dialogflow will remove the page, as well as + // any transitions to the page (i.e. [Target + // page][EventHandler.target_page] in event handlers or [Target + // page][TransitionRoute.target_page] in transition routes that point to + // this page will be cleared). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *DeletePageRequest) Reset() { + *x = DeletePageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeletePageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeletePageRequest) ProtoMessage() {} + +func (x *DeletePageRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeletePageRequest.ProtoReflect.Descriptor instead. +func (*DeletePageRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{9} +} + +func (x *DeletePageRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeletePageRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +// Represents a form parameter. +type Form_Parameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The human-readable name of the parameter, unique within the + // form. + DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Indicates whether the parameter is required. Optional parameters will not + // trigger prompts; however, they are filled if the user specifies them. + // Required parameters must be filled before form filling concludes. + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + // Required. The entity type of the parameter. + // Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, + // `projects/-/locations/-/agents/-/entityTypes/sys.date`), or + // `projects//locations//agents//entityTypes/` for developer entity types. + EntityType string `protobuf:"bytes,3,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"` + // Indicates whether the parameter represents a list of values. + IsList bool `protobuf:"varint,4,opt,name=is_list,json=isList,proto3" json:"is_list,omitempty"` + // Required. Defines fill behavior for the parameter. + FillBehavior *Form_Parameter_FillBehavior `protobuf:"bytes,7,opt,name=fill_behavior,json=fillBehavior,proto3" json:"fill_behavior,omitempty"` + // The default value of an optional parameter. If the parameter is required, + // the default value will be ignored. + DefaultValue *structpb.Value `protobuf:"bytes,9,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + // Indicates whether the parameter content should be redacted in log. If + // redaction is enabled, the parameter content will be replaced by parameter + // name during logging. + // Note: the parameter content is subject to redaction if either parameter + // level redaction or [entity type level redaction][google.cloud.dialogflow.cx.v3beta1.EntityType.redact] is + // enabled. + Redact bool `protobuf:"varint,11,opt,name=redact,proto3" json:"redact,omitempty"` +} + +func (x *Form_Parameter) Reset() { + *x = Form_Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Form_Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Form_Parameter) ProtoMessage() {} + +func (x *Form_Parameter) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Form_Parameter.ProtoReflect.Descriptor instead. +func (*Form_Parameter) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Form_Parameter) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Form_Parameter) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *Form_Parameter) GetEntityType() string { + if x != nil { + return x.EntityType + } + return "" +} + +func (x *Form_Parameter) GetIsList() bool { + if x != nil { + return x.IsList + } + return false +} + +func (x *Form_Parameter) GetFillBehavior() *Form_Parameter_FillBehavior { + if x != nil { + return x.FillBehavior + } + return nil +} + +func (x *Form_Parameter) GetDefaultValue() *structpb.Value { + if x != nil { + return x.DefaultValue + } + return nil +} + +func (x *Form_Parameter) GetRedact() bool { + if x != nil { + return x.Redact + } + return false +} + +// Configuration for how the filling of a parameter should be handled. +type Form_Parameter_FillBehavior struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The fulfillment to provide the initial prompt that the agent + // can present to the user in order to fill the parameter. + InitialPromptFulfillment *Fulfillment `protobuf:"bytes,3,opt,name=initial_prompt_fulfillment,json=initialPromptFulfillment,proto3" json:"initial_prompt_fulfillment,omitempty"` + // The handlers for parameter-level events, used to provide reprompt for + // the parameter or transition to a different page/flow. The supported + // events are: + // * `sys.no-match-`, where N can be from 1 to 6 + // * `sys.no-match-default` + // * `sys.no-input-`, where N can be from 1 to 6 + // * `sys.no-input-default` + // * `sys.invalid-parameter` + // + // `initial_prompt_fulfillment` provides the first prompt for the + // parameter. + // + // If the user's response does not fill the parameter, a + // no-match/no-input event will be triggered, and the fulfillment + // associated with the `sys.no-match-1`/`sys.no-input-1` handler (if + // defined) will be called to provide a prompt. The + // `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to + // the next no-match/no-input event, and so on. + // + // A `sys.no-match-default` or `sys.no-input-default` handler will be used + // to handle all following no-match/no-input events after all numbered + // no-match/no-input handlers for the parameter are consumed. + // + // A `sys.invalid-parameter` handler can be defined to handle the case + // where the parameter values have been `invalidated` by webhook. For + // example, if the user's response fill the parameter, however the + // parameter was invalidated by webhook, the fulfillment associated with + // the `sys.invalid-parameter` handler (if defined) will be called to + // provide a prompt. + // + // If the event handler for the corresponding event can't be found on the + // parameter, `initial_prompt_fulfillment` will be re-prompted. + RepromptEventHandlers []*EventHandler `protobuf:"bytes,5,rep,name=reprompt_event_handlers,json=repromptEventHandlers,proto3" json:"reprompt_event_handlers,omitempty"` +} + +func (x *Form_Parameter_FillBehavior) Reset() { + *x = Form_Parameter_FillBehavior{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Form_Parameter_FillBehavior) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Form_Parameter_FillBehavior) ProtoMessage() {} + +func (x *Form_Parameter_FillBehavior) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Form_Parameter_FillBehavior.ProtoReflect.Descriptor instead. +func (*Form_Parameter_FillBehavior) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP(), []int{1, 0, 0} +} + +func (x *Form_Parameter_FillBehavior) GetInitialPromptFulfillment() *Fulfillment { + if x != nil { + return x.InitialPromptFulfillment + } + return nil +} + +func (x *Form_Parameter_FillBehavior) GetRepromptEventHandlers() []*EventHandler { + if x != nil { + return x.RepromptEventHandlers + } + return nil +} + +var File_google_cloud_dialogflow_cx_v3beta1_page_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, + 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x75, 0x6c, 0x66, 0x69, + 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x04, 0x0a, 0x04, 0x50, 0x61, + 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5c, + 0x0a, 0x11, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, + 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x04, + 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x46, 0x6f, 0x72, 0x6d, 0x52, 0x04, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x6b, 0x0a, 0x17, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x33, 0xfa, 0x41, 0x30, + 0x0a, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x0e, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x52, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x73, 0x3a, 0x75, 0xea, 0x41, 0x72, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x50, 0x61, 0x67, 0x65, 0x12, 0x50, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x7d, 0x2f, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x66, 0x6c, 0x6f, 0x77, 0x7d, 0x2f, 0x70, 0x61, 0x67, + 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x67, 0x65, 0x7d, 0x22, 0xc3, 0x05, 0x0a, 0x04, 0x46, 0x6f, + 0x72, 0x6d, 0x12, 0x52, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6d, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xe6, 0x04, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x69, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, + 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x6c, + 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x66, + 0x69, 0x6c, 0x6c, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0d, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x64, 0x61, + 0x63, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, + 0x1a, 0xec, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x6c, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x12, 0x72, 0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x6d, 0x70, 0x74, 0x5f, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, + 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x18, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, + 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x6d, 0x70, + 0x74, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x15, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x6d, + 0x70, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x22, + 0xbe, 0x02, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, 0x13, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, + 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x12, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x66, 0x69, + 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xfa, 0x41, 0x20, + 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x61, 0x67, 0x65, + 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x65, 0x12, 0x46, + 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x23, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x42, 0x08, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x22, 0x83, 0x03, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, + 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, + 0x41, 0x22, 0x0a, 0x20, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x13, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6c, + 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x23, 0xfa, 0x41, 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x50, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x66, + 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xfa, 0x41, 0x20, 0x0a, 0x1e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x6c, 0x6f, 0x77, 0x48, 0x00, + 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x46, 0x6c, 0x6f, 0x77, 0x42, 0x08, 0x0a, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7b, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3e, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x71, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x20, 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xbb, 0x01, 0x0a, + 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x12, 0x1e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x61, 0x67, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x11, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, + 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x65, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, + 0x0a, 0x1e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x32, 0xda, 0x08, 0x0a, + 0x05, 0x50, 0x61, 0x67, 0x65, 0x73, 0x12, 0xca, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0xb7, 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x61, 0x67, 0x65, 0x12, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x22, 0x4e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x61, + 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xca, 0x01, + 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, 0x12, 0x35, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x22, 0x5b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x22, 0x3f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x70, 0x61, 0x67, 0x65, 0x73, 0x3a, 0x04, 0x70, 0x61, 0x67, 0x65, 0xda, 0x41, 0x0b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x61, 0x67, 0x65, 0x12, 0xd4, 0x01, 0x0a, 0x0a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, + 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x22, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x4c, 0x32, 0x44, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x67, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x2f, + 0x70, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x04, 0x70, 0x61, 0x67, 0x65, 0xda, 0x41, + 0x10, 0x70, 0x61, 0x67, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, + 0x12, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x2a, 0x3f, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x2f, + 0x70, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, + 0x78, 0xca, 0x41, 0x19, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x59, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0xd1, 0x01, 0x0a, 0x26, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x50, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, 0x46, 0xaa, + 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, 0x33, 0x42, + 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_google_cloud_dialogflow_cx_v3beta1_page_proto_goTypes = []interface{}{ + (*Page)(nil), // 0: google.cloud.dialogflow.cx.v3beta1.Page + (*Form)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.Form + (*EventHandler)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.EventHandler + (*TransitionRoute)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.TransitionRoute + (*ListPagesRequest)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + (*ListPagesResponse)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + (*GetPageRequest)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.GetPageRequest + (*CreatePageRequest)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + (*UpdatePageRequest)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + (*DeletePageRequest)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + (*Form_Parameter)(nil), // 10: google.cloud.dialogflow.cx.v3beta1.Form.Parameter + (*Form_Parameter_FillBehavior)(nil), // 11: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + (*Fulfillment)(nil), // 12: google.cloud.dialogflow.cx.v3beta1.Fulfillment + (*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask + (*structpb.Value)(nil), // 14: google.protobuf.Value + (*emptypb.Empty)(nil), // 15: google.protobuf.Empty +} +var file_google_cloud_dialogflow_cx_v3beta1_page_proto_depIdxs = []int32{ + 12, // 0: google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment + 1, // 1: google.cloud.dialogflow.cx.v3beta1.Page.form:type_name -> google.cloud.dialogflow.cx.v3beta1.Form + 3, // 2: google.cloud.dialogflow.cx.v3beta1.Page.transition_routes:type_name -> google.cloud.dialogflow.cx.v3beta1.TransitionRoute + 2, // 3: google.cloud.dialogflow.cx.v3beta1.Page.event_handlers:type_name -> google.cloud.dialogflow.cx.v3beta1.EventHandler + 10, // 4: google.cloud.dialogflow.cx.v3beta1.Form.parameters:type_name -> google.cloud.dialogflow.cx.v3beta1.Form.Parameter + 12, // 5: google.cloud.dialogflow.cx.v3beta1.EventHandler.trigger_fulfillment:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment + 12, // 6: google.cloud.dialogflow.cx.v3beta1.TransitionRoute.trigger_fulfillment:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment + 0, // 7: google.cloud.dialogflow.cx.v3beta1.ListPagesResponse.pages:type_name -> google.cloud.dialogflow.cx.v3beta1.Page + 0, // 8: google.cloud.dialogflow.cx.v3beta1.CreatePageRequest.page:type_name -> google.cloud.dialogflow.cx.v3beta1.Page + 0, // 9: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.page:type_name -> google.cloud.dialogflow.cx.v3beta1.Page + 13, // 10: google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest.update_mask:type_name -> google.protobuf.FieldMask + 11, // 11: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.fill_behavior:type_name -> google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior + 14, // 12: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.default_value:type_name -> google.protobuf.Value + 12, // 13: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.initial_prompt_fulfillment:type_name -> google.cloud.dialogflow.cx.v3beta1.Fulfillment + 2, // 14: google.cloud.dialogflow.cx.v3beta1.Form.Parameter.FillBehavior.reprompt_event_handlers:type_name -> google.cloud.dialogflow.cx.v3beta1.EventHandler + 4, // 15: google.cloud.dialogflow.cx.v3beta1.Pages.ListPages:input_type -> google.cloud.dialogflow.cx.v3beta1.ListPagesRequest + 6, // 16: google.cloud.dialogflow.cx.v3beta1.Pages.GetPage:input_type -> google.cloud.dialogflow.cx.v3beta1.GetPageRequest + 7, // 17: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage:input_type -> google.cloud.dialogflow.cx.v3beta1.CreatePageRequest + 8, // 18: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage:input_type -> google.cloud.dialogflow.cx.v3beta1.UpdatePageRequest + 9, // 19: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePage:input_type -> google.cloud.dialogflow.cx.v3beta1.DeletePageRequest + 5, // 20: google.cloud.dialogflow.cx.v3beta1.Pages.ListPages:output_type -> google.cloud.dialogflow.cx.v3beta1.ListPagesResponse + 0, // 21: google.cloud.dialogflow.cx.v3beta1.Pages.GetPage:output_type -> google.cloud.dialogflow.cx.v3beta1.Page + 0, // 22: google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage:output_type -> google.cloud.dialogflow.cx.v3beta1.Page + 0, // 23: google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage:output_type -> google.cloud.dialogflow.cx.v3beta1.Page + 15, // 24: google.cloud.dialogflow.cx.v3beta1.Pages.DeletePage:output_type -> google.protobuf.Empty + 20, // [20:25] is the sub-list for method output_type + 15, // [15:20] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_page_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_page_proto != nil { + return + } + file_google_cloud_dialogflow_cx_v3beta1_fulfillment_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Page); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Form); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventHandler); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransitionRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreatePageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeletePageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Form_Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Form_Parameter_FillBehavior); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*EventHandler_TargetPage)(nil), + (*EventHandler_TargetFlow)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*TransitionRoute_TargetPage)(nil), + (*TransitionRoute_TargetFlow)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_page_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_page_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_page_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_page_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_page_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_page_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_page_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// PagesClient is the client API for Pages service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PagesClient interface { + // Returns the list of all pages in the specified flow. + ListPages(ctx context.Context, in *ListPagesRequest, opts ...grpc.CallOption) (*ListPagesResponse, error) + // Retrieves the specified page. + GetPage(ctx context.Context, in *GetPageRequest, opts ...grpc.CallOption) (*Page, error) + // Creates a page in the specified flow. + CreatePage(ctx context.Context, in *CreatePageRequest, opts ...grpc.CallOption) (*Page, error) + // Updates the specified page. + UpdatePage(ctx context.Context, in *UpdatePageRequest, opts ...grpc.CallOption) (*Page, error) + // Deletes the specified page. + DeletePage(ctx context.Context, in *DeletePageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type pagesClient struct { + cc grpc.ClientConnInterface +} + +func NewPagesClient(cc grpc.ClientConnInterface) PagesClient { + return &pagesClient{cc} +} + +func (c *pagesClient) ListPages(ctx context.Context, in *ListPagesRequest, opts ...grpc.CallOption) (*ListPagesResponse, error) { + out := new(ListPagesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Pages/ListPages", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pagesClient) GetPage(ctx context.Context, in *GetPageRequest, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Pages/GetPage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pagesClient) CreatePage(ctx context.Context, in *CreatePageRequest, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Pages/CreatePage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pagesClient) UpdatePage(ctx context.Context, in *UpdatePageRequest, opts ...grpc.CallOption) (*Page, error) { + out := new(Page) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Pages/UpdatePage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pagesClient) DeletePage(ctx context.Context, in *DeletePageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.cx.v3beta1.Pages/DeletePage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PagesServer is the server API for Pages service. +type PagesServer interface { + // Returns the list of all pages in the specified flow. + ListPages(context.Context, *ListPagesRequest) (*ListPagesResponse, error) + // Retrieves the specified page. + GetPage(context.Context, *GetPageRequest) (*Page, error) + // Creates a page in the specified flow. + CreatePage(context.Context, *CreatePageRequest) (*Page, error) + // Updates the specified page. + UpdatePage(context.Context, *UpdatePageRequest) (*Page, error) + // Deletes the specified page. + DeletePage(context.Context, *DeletePageRequest) (*emptypb.Empty, error) +} + +// UnimplementedPagesServer can be embedded to have forward compatible implementations. +type UnimplementedPagesServer struct { +} + +func (*UnimplementedPagesServer) ListPages(context.Context, *ListPagesRequest) (*ListPagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPages not implemented") +} +func (*UnimplementedPagesServer) GetPage(context.Context, *GetPageRequest) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPage not implemented") +} +func (*UnimplementedPagesServer) CreatePage(context.Context, *CreatePageRequest) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePage not implemented") +} +func (*UnimplementedPagesServer) UpdatePage(context.Context, *UpdatePageRequest) (*Page, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePage not implemented") +} +func (*UnimplementedPagesServer) DeletePage(context.Context, *DeletePageRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePage not implemented") +} + +func RegisterPagesServer(s *grpc.Server, srv PagesServer) { + s.RegisterService(&_Pages_serviceDesc, srv) +} + +func _Pages_ListPages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PagesServer).ListPages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Pages/ListPages", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PagesServer).ListPages(ctx, req.(*ListPagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Pages_GetPage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PagesServer).GetPage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Pages/GetPage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PagesServer).GetPage(ctx, req.(*GetPageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Pages_CreatePage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PagesServer).CreatePage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Pages/CreatePage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PagesServer).CreatePage(ctx, req.(*CreatePageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Pages_UpdatePage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PagesServer).UpdatePage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Pages/UpdatePage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PagesServer).UpdatePage(ctx, req.(*UpdatePageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Pages_DeletePage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PagesServer).DeletePage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.dialogflow.cx.v3beta1.Pages/DeletePage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PagesServer).DeletePage(ctx, req.(*DeletePageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Pages_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.dialogflow.cx.v3beta1.Pages", + HandlerType: (*PagesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListPages", + Handler: _Pages_ListPages_Handler, + }, + { + MethodName: "GetPage", + Handler: _Pages_GetPage_Handler, + }, + { + MethodName: "CreatePage", + Handler: _Pages_CreatePage_Handler, + }, + { + MethodName: "UpdatePage", + Handler: _Pages_UpdatePage_Handler, + }, + { + MethodName: "DeletePage", + Handler: _Pages_DeletePage_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/dialogflow/cx/v3beta1/page.proto", +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go b/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go new file mode 100644 index 000000000000..e0ec6437f559 --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/response_message.pb.go @@ -0,0 +1,1230 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/response_message.proto + +package cxpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents a response message that can be returned by a conversational agent. +// +// Response messages are also used for output audio synthesis. The approach is +// as follows: +// +// - If at least one OutputAudioText response is present, then all +// OutputAudioText responses are linearly concatenated, and the result is used +// for output audio synthesis. +// - If the OutputAudioText responses are a mixture of text and SSML, then the +// concatenated result is treated as SSML; otherwise, the result is treated as +// either text or SSML as appropriate. The agent designer should ideally use +// either text or SSML consistently throughout the bot design. +// - Otherwise, all Text responses are linearly concatenated, and the result is +// used for output audio synthesis. +// +// This approach allows for more sophisticated user experience scenarios, where +// the text displayed to the user may differ from what is heard. +type ResponseMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The rich response message. + // + // Types that are assignable to Message: + // + // *ResponseMessage_Text_ + // *ResponseMessage_Payload + // *ResponseMessage_ConversationSuccess_ + // *ResponseMessage_OutputAudioText_ + // *ResponseMessage_LiveAgentHandoff_ + // *ResponseMessage_EndInteraction_ + // *ResponseMessage_PlayAudio_ + // *ResponseMessage_MixedAudio_ + // *ResponseMessage_TelephonyTransferCall_ + Message isResponseMessage_Message `protobuf_oneof:"message"` +} + +func (x *ResponseMessage) Reset() { + *x = ResponseMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage) ProtoMessage() {} + +func (x *ResponseMessage) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage.ProtoReflect.Descriptor instead. +func (*ResponseMessage) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0} +} + +func (m *ResponseMessage) GetMessage() isResponseMessage_Message { + if m != nil { + return m.Message + } + return nil +} + +func (x *ResponseMessage) GetText() *ResponseMessage_Text { + if x, ok := x.GetMessage().(*ResponseMessage_Text_); ok { + return x.Text + } + return nil +} + +func (x *ResponseMessage) GetPayload() *structpb.Struct { + if x, ok := x.GetMessage().(*ResponseMessage_Payload); ok { + return x.Payload + } + return nil +} + +func (x *ResponseMessage) GetConversationSuccess() *ResponseMessage_ConversationSuccess { + if x, ok := x.GetMessage().(*ResponseMessage_ConversationSuccess_); ok { + return x.ConversationSuccess + } + return nil +} + +func (x *ResponseMessage) GetOutputAudioText() *ResponseMessage_OutputAudioText { + if x, ok := x.GetMessage().(*ResponseMessage_OutputAudioText_); ok { + return x.OutputAudioText + } + return nil +} + +func (x *ResponseMessage) GetLiveAgentHandoff() *ResponseMessage_LiveAgentHandoff { + if x, ok := x.GetMessage().(*ResponseMessage_LiveAgentHandoff_); ok { + return x.LiveAgentHandoff + } + return nil +} + +func (x *ResponseMessage) GetEndInteraction() *ResponseMessage_EndInteraction { + if x, ok := x.GetMessage().(*ResponseMessage_EndInteraction_); ok { + return x.EndInteraction + } + return nil +} + +func (x *ResponseMessage) GetPlayAudio() *ResponseMessage_PlayAudio { + if x, ok := x.GetMessage().(*ResponseMessage_PlayAudio_); ok { + return x.PlayAudio + } + return nil +} + +func (x *ResponseMessage) GetMixedAudio() *ResponseMessage_MixedAudio { + if x, ok := x.GetMessage().(*ResponseMessage_MixedAudio_); ok { + return x.MixedAudio + } + return nil +} + +func (x *ResponseMessage) GetTelephonyTransferCall() *ResponseMessage_TelephonyTransferCall { + if x, ok := x.GetMessage().(*ResponseMessage_TelephonyTransferCall_); ok { + return x.TelephonyTransferCall + } + return nil +} + +type isResponseMessage_Message interface { + isResponseMessage_Message() +} + +type ResponseMessage_Text_ struct { + // Returns a text response. + Text *ResponseMessage_Text `protobuf:"bytes,1,opt,name=text,proto3,oneof"` +} + +type ResponseMessage_Payload struct { + // Returns a response containing a custom, platform-specific payload. + Payload *structpb.Struct `protobuf:"bytes,2,opt,name=payload,proto3,oneof"` +} + +type ResponseMessage_ConversationSuccess_ struct { + // Indicates that the conversation succeeded. + ConversationSuccess *ResponseMessage_ConversationSuccess `protobuf:"bytes,9,opt,name=conversation_success,json=conversationSuccess,proto3,oneof"` +} + +type ResponseMessage_OutputAudioText_ struct { + // A text or ssml response that is preferentially used for TTS output audio + // synthesis, as described in the comment on the ResponseMessage message. + OutputAudioText *ResponseMessage_OutputAudioText `protobuf:"bytes,8,opt,name=output_audio_text,json=outputAudioText,proto3,oneof"` +} + +type ResponseMessage_LiveAgentHandoff_ struct { + // Hands off conversation to a human agent. + LiveAgentHandoff *ResponseMessage_LiveAgentHandoff `protobuf:"bytes,10,opt,name=live_agent_handoff,json=liveAgentHandoff,proto3,oneof"` +} + +type ResponseMessage_EndInteraction_ struct { + // Output only. A signal that indicates the interaction with the Dialogflow agent has + // ended. + // This message is generated by Dialogflow only when the conversation + // reaches `END_SESSION` page. It is not supposed to be defined by the user. + // + // It's guaranteed that there is at most one such message in each response. + EndInteraction *ResponseMessage_EndInteraction `protobuf:"bytes,11,opt,name=end_interaction,json=endInteraction,proto3,oneof"` +} + +type ResponseMessage_PlayAudio_ struct { + // Signal that the client should play an audio clip hosted at a + // client-specific URI. Dialogflow uses this to construct + // [mixed_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixed_audio]. However, Dialogflow itself + // does not try to read or process the URI in any way. + PlayAudio *ResponseMessage_PlayAudio `protobuf:"bytes,12,opt,name=play_audio,json=playAudio,proto3,oneof"` +} + +type ResponseMessage_MixedAudio_ struct { + // Output only. An audio response message composed of both the synthesized Dialogflow + // agent responses and responses defined via + // [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio]. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + MixedAudio *ResponseMessage_MixedAudio `protobuf:"bytes,13,opt,name=mixed_audio,json=mixedAudio,proto3,oneof"` +} + +type ResponseMessage_TelephonyTransferCall_ struct { + // A signal that the client should transfer the phone call connected to + // this agent to a third-party endpoint. + TelephonyTransferCall *ResponseMessage_TelephonyTransferCall `protobuf:"bytes,18,opt,name=telephony_transfer_call,json=telephonyTransferCall,proto3,oneof"` +} + +func (*ResponseMessage_Text_) isResponseMessage_Message() {} + +func (*ResponseMessage_Payload) isResponseMessage_Message() {} + +func (*ResponseMessage_ConversationSuccess_) isResponseMessage_Message() {} + +func (*ResponseMessage_OutputAudioText_) isResponseMessage_Message() {} + +func (*ResponseMessage_LiveAgentHandoff_) isResponseMessage_Message() {} + +func (*ResponseMessage_EndInteraction_) isResponseMessage_Message() {} + +func (*ResponseMessage_PlayAudio_) isResponseMessage_Message() {} + +func (*ResponseMessage_MixedAudio_) isResponseMessage_Message() {} + +func (*ResponseMessage_TelephonyTransferCall_) isResponseMessage_Message() {} + +// The text response message. +type ResponseMessage_Text struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A collection of text responses. + Text []string `protobuf:"bytes,1,rep,name=text,proto3" json:"text,omitempty"` + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + AllowPlaybackInterruption bool `protobuf:"varint,2,opt,name=allow_playback_interruption,json=allowPlaybackInterruption,proto3" json:"allow_playback_interruption,omitempty"` +} + +func (x *ResponseMessage_Text) Reset() { + *x = ResponseMessage_Text{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_Text) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_Text) ProtoMessage() {} + +func (x *ResponseMessage_Text) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_Text.ProtoReflect.Descriptor instead. +func (*ResponseMessage_Text) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ResponseMessage_Text) GetText() []string { + if x != nil { + return x.Text + } + return nil +} + +func (x *ResponseMessage_Text) GetAllowPlaybackInterruption() bool { + if x != nil { + return x.AllowPlaybackInterruption + } + return false +} + +// Indicates that the conversation should be handed off to a live agent. +// +// Dialogflow only uses this to determine which conversations were handed off +// to a human agent for measurement purposes. What else to do with this signal +// is up to you and your handoff procedures. +// +// You may set this, for example: +// - In the [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if +// entering the page indicates something went extremely wrong in the +// conversation. +// - In a webhook response when you determine that the customer issue can only +// be handled by a human. +type ResponseMessage_LiveAgentHandoff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Custom metadata for your handoff procedure. Dialogflow doesn't impose + // any structure on this. + Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *ResponseMessage_LiveAgentHandoff) Reset() { + *x = ResponseMessage_LiveAgentHandoff{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_LiveAgentHandoff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_LiveAgentHandoff) ProtoMessage() {} + +func (x *ResponseMessage_LiveAgentHandoff) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_LiveAgentHandoff.ProtoReflect.Descriptor instead. +func (*ResponseMessage_LiveAgentHandoff) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ResponseMessage_LiveAgentHandoff) GetMetadata() *structpb.Struct { + if x != nil { + return x.Metadata + } + return nil +} + +// Indicates that the conversation succeeded, i.e., the bot handled the issue +// that the customer talked to it about. +// +// Dialogflow only uses this to determine which conversations should be +// counted as successful and doesn't process the metadata in this message in +// any way. Note that Dialogflow also considers conversations that get to the +// conversation end page as successful even if they don't return +// [ConversationSuccess][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess]. +// +// You may set this, for example: +// - In the [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if +// entering the page indicates that the conversation succeeded. +// - In a webhook response when you determine that you handled the customer +// issue. +type ResponseMessage_ConversationSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Custom metadata. Dialogflow doesn't impose any structure on this. + Metadata *structpb.Struct `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *ResponseMessage_ConversationSuccess) Reset() { + *x = ResponseMessage_ConversationSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_ConversationSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_ConversationSuccess) ProtoMessage() {} + +func (x *ResponseMessage_ConversationSuccess) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_ConversationSuccess.ProtoReflect.Descriptor instead. +func (*ResponseMessage_ConversationSuccess) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *ResponseMessage_ConversationSuccess) GetMetadata() *structpb.Struct { + if x != nil { + return x.Metadata + } + return nil +} + +// A text or ssml response that is preferentially used for TTS output audio +// synthesis, as described in the comment on the ResponseMessage message. +type ResponseMessage_OutputAudioText struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source, which is either plain text or SSML. + // + // Types that are assignable to Source: + // + // *ResponseMessage_OutputAudioText_Text + // *ResponseMessage_OutputAudioText_Ssml + Source isResponseMessage_OutputAudioText_Source `protobuf_oneof:"source"` + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + AllowPlaybackInterruption bool `protobuf:"varint,3,opt,name=allow_playback_interruption,json=allowPlaybackInterruption,proto3" json:"allow_playback_interruption,omitempty"` +} + +func (x *ResponseMessage_OutputAudioText) Reset() { + *x = ResponseMessage_OutputAudioText{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_OutputAudioText) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_OutputAudioText) ProtoMessage() {} + +func (x *ResponseMessage_OutputAudioText) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_OutputAudioText.ProtoReflect.Descriptor instead. +func (*ResponseMessage_OutputAudioText) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 3} +} + +func (m *ResponseMessage_OutputAudioText) GetSource() isResponseMessage_OutputAudioText_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *ResponseMessage_OutputAudioText) GetText() string { + if x, ok := x.GetSource().(*ResponseMessage_OutputAudioText_Text); ok { + return x.Text + } + return "" +} + +func (x *ResponseMessage_OutputAudioText) GetSsml() string { + if x, ok := x.GetSource().(*ResponseMessage_OutputAudioText_Ssml); ok { + return x.Ssml + } + return "" +} + +func (x *ResponseMessage_OutputAudioText) GetAllowPlaybackInterruption() bool { + if x != nil { + return x.AllowPlaybackInterruption + } + return false +} + +type isResponseMessage_OutputAudioText_Source interface { + isResponseMessage_OutputAudioText_Source() +} + +type ResponseMessage_OutputAudioText_Text struct { + // The raw text to be synthesized. + Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"` +} + +type ResponseMessage_OutputAudioText_Ssml struct { + // The SSML text to be synthesized. For more information, see + // [SSML](/speech/text-to-speech/docs/ssml). + Ssml string `protobuf:"bytes,2,opt,name=ssml,proto3,oneof"` +} + +func (*ResponseMessage_OutputAudioText_Text) isResponseMessage_OutputAudioText_Source() {} + +func (*ResponseMessage_OutputAudioText_Ssml) isResponseMessage_OutputAudioText_Source() {} + +// Indicates that interaction with the Dialogflow agent has ended. +// This message is generated by Dialogflow only and not supposed to be +// defined by the user. +type ResponseMessage_EndInteraction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResponseMessage_EndInteraction) Reset() { + *x = ResponseMessage_EndInteraction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_EndInteraction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_EndInteraction) ProtoMessage() {} + +func (x *ResponseMessage_EndInteraction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_EndInteraction.ProtoReflect.Descriptor instead. +func (*ResponseMessage_EndInteraction) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 4} +} + +// Specifies an audio clip to be played by the client as part of the response. +type ResponseMessage_PlayAudio struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. URI of the audio clip. Dialogflow does not impose any validation on this + // value. It is specific to the client that reads it. + AudioUri string `protobuf:"bytes,1,opt,name=audio_uri,json=audioUri,proto3" json:"audio_uri,omitempty"` + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + AllowPlaybackInterruption bool `protobuf:"varint,2,opt,name=allow_playback_interruption,json=allowPlaybackInterruption,proto3" json:"allow_playback_interruption,omitempty"` +} + +func (x *ResponseMessage_PlayAudio) Reset() { + *x = ResponseMessage_PlayAudio{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_PlayAudio) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_PlayAudio) ProtoMessage() {} + +func (x *ResponseMessage_PlayAudio) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_PlayAudio.ProtoReflect.Descriptor instead. +func (*ResponseMessage_PlayAudio) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *ResponseMessage_PlayAudio) GetAudioUri() string { + if x != nil { + return x.AudioUri + } + return "" +} + +func (x *ResponseMessage_PlayAudio) GetAllowPlaybackInterruption() bool { + if x != nil { + return x.AllowPlaybackInterruption + } + return false +} + +// Represents an audio message that is composed of both segments +// synthesized from the Dialogflow agent prompts and ones hosted externally +// at the specified URIs. +// The external URIs are specified via +// [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio]. +// This message is generated by Dialogflow only and not supposed to be +// defined by the user. +type ResponseMessage_MixedAudio struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Segments this audio response is composed of. + Segments []*ResponseMessage_MixedAudio_Segment `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"` +} + +func (x *ResponseMessage_MixedAudio) Reset() { + *x = ResponseMessage_MixedAudio{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_MixedAudio) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_MixedAudio) ProtoMessage() {} + +func (x *ResponseMessage_MixedAudio) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_MixedAudio.ProtoReflect.Descriptor instead. +func (*ResponseMessage_MixedAudio) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 6} +} + +func (x *ResponseMessage_MixedAudio) GetSegments() []*ResponseMessage_MixedAudio_Segment { + if x != nil { + return x.Segments + } + return nil +} + +// Represents the signal that telles the client to transfer the phone call +// connected to the agent to a third-party endpoint. +type ResponseMessage_TelephonyTransferCall struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Endpoint to transfer the call to. + // + // Types that are assignable to Endpoint: + // + // *ResponseMessage_TelephonyTransferCall_PhoneNumber + Endpoint isResponseMessage_TelephonyTransferCall_Endpoint `protobuf_oneof:"endpoint"` +} + +func (x *ResponseMessage_TelephonyTransferCall) Reset() { + *x = ResponseMessage_TelephonyTransferCall{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_TelephonyTransferCall) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_TelephonyTransferCall) ProtoMessage() {} + +func (x *ResponseMessage_TelephonyTransferCall) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_TelephonyTransferCall.ProtoReflect.Descriptor instead. +func (*ResponseMessage_TelephonyTransferCall) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 7} +} + +func (m *ResponseMessage_TelephonyTransferCall) GetEndpoint() isResponseMessage_TelephonyTransferCall_Endpoint { + if m != nil { + return m.Endpoint + } + return nil +} + +func (x *ResponseMessage_TelephonyTransferCall) GetPhoneNumber() string { + if x, ok := x.GetEndpoint().(*ResponseMessage_TelephonyTransferCall_PhoneNumber); ok { + return x.PhoneNumber + } + return "" +} + +type isResponseMessage_TelephonyTransferCall_Endpoint interface { + isResponseMessage_TelephonyTransferCall_Endpoint() +} + +type ResponseMessage_TelephonyTransferCall_PhoneNumber struct { + // Transfer the call to a phone number + // in [E.164 format](https://en.wikipedia.org/wiki/E.164). + PhoneNumber string `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3,oneof"` +} + +func (*ResponseMessage_TelephonyTransferCall_PhoneNumber) isResponseMessage_TelephonyTransferCall_Endpoint() { +} + +// Represents one segment of audio. +type ResponseMessage_MixedAudio_Segment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Content of the segment. + // + // Types that are assignable to Content: + // + // *ResponseMessage_MixedAudio_Segment_Audio + // *ResponseMessage_MixedAudio_Segment_Uri + Content isResponseMessage_MixedAudio_Segment_Content `protobuf_oneof:"content"` + // Output only. Whether the playback of this segment can be interrupted by the end + // user's speech and the client should then start the next Dialogflow + // request. + AllowPlaybackInterruption bool `protobuf:"varint,3,opt,name=allow_playback_interruption,json=allowPlaybackInterruption,proto3" json:"allow_playback_interruption,omitempty"` +} + +func (x *ResponseMessage_MixedAudio_Segment) Reset() { + *x = ResponseMessage_MixedAudio_Segment{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseMessage_MixedAudio_Segment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseMessage_MixedAudio_Segment) ProtoMessage() {} + +func (x *ResponseMessage_MixedAudio_Segment) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseMessage_MixedAudio_Segment.ProtoReflect.Descriptor instead. +func (*ResponseMessage_MixedAudio_Segment) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP(), []int{0, 6, 0} +} + +func (m *ResponseMessage_MixedAudio_Segment) GetContent() isResponseMessage_MixedAudio_Segment_Content { + if m != nil { + return m.Content + } + return nil +} + +func (x *ResponseMessage_MixedAudio_Segment) GetAudio() []byte { + if x, ok := x.GetContent().(*ResponseMessage_MixedAudio_Segment_Audio); ok { + return x.Audio + } + return nil +} + +func (x *ResponseMessage_MixedAudio_Segment) GetUri() string { + if x, ok := x.GetContent().(*ResponseMessage_MixedAudio_Segment_Uri); ok { + return x.Uri + } + return "" +} + +func (x *ResponseMessage_MixedAudio_Segment) GetAllowPlaybackInterruption() bool { + if x != nil { + return x.AllowPlaybackInterruption + } + return false +} + +type isResponseMessage_MixedAudio_Segment_Content interface { + isResponseMessage_MixedAudio_Segment_Content() +} + +type ResponseMessage_MixedAudio_Segment_Audio struct { + // Raw audio synthesized from the Dialogflow agent's response using + // the output config specified in the request. + Audio []byte `protobuf:"bytes,1,opt,name=audio,proto3,oneof"` +} + +type ResponseMessage_MixedAudio_Segment_Uri struct { + // Client-specific URI that points to an audio clip accessible to the + // client. Dialogflow does not impose any validation on it. + Uri string `protobuf:"bytes,2,opt,name=uri,proto3,oneof"` +} + +func (*ResponseMessage_MixedAudio_Segment_Audio) isResponseMessage_MixedAudio_Segment_Content() {} + +func (*ResponseMessage_MixedAudio_Segment_Uri) isResponseMessage_MixedAudio_Segment_Content() {} + +var File_google_cloud_dialogflow_cx_v3beta1_response_message_proto protoreflect.FileDescriptor + +var file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x64, + 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, + 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, + 0x0e, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, + 0x78, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x7c, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, + 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x71, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x43, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x75, 0x64, 0x69, + 0x6f, 0x54, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, + 0x75, 0x64, 0x69, 0x6f, 0x54, 0x65, 0x78, 0x74, 0x12, 0x74, 0x0a, 0x12, 0x6c, 0x69, 0x76, 0x65, + 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, + 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x69, 0x76, 0x65, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, + 0x76, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x12, 0x72, + 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x6e, 0x64, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x6f, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x79, + 0x41, 0x75, 0x64, 0x69, 0x6f, 0x48, 0x00, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x41, 0x75, 0x64, + 0x69, 0x6f, 0x12, 0x66, 0x0a, 0x0b, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x75, 0x64, 0x69, + 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, + 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x69, 0x78, + 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0a, + 0x6d, 0x69, 0x78, 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x83, 0x01, 0x0a, 0x17, 0x74, + 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x79, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, + 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x74, 0x65, 0x6c, 0x65, 0x70, + 0x68, 0x6f, 0x6e, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, + 0x1a, 0x64, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x43, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x62, + 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x50, 0x6c, 0x61, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, + 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x47, 0x0a, 0x10, 0x4c, 0x69, 0x76, 0x65, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, + 0x4a, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x8c, 0x01, 0x0a, 0x0f, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x54, 0x65, 0x78, 0x74, 0x12, + 0x14, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x73, 0x73, 0x6d, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x73, 0x73, 0x6d, 0x6c, 0x12, 0x43, 0x0a, 0x1b, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6c, 0x61, 0x79, + 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x10, 0x0a, 0x0e, 0x45, 0x6e, + 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x72, 0x0a, 0x09, + 0x50, 0x6c, 0x61, 0x79, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x20, 0x0a, 0x09, 0x61, 0x75, 0x64, + 0x69, 0x6f, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x55, 0x72, 0x69, 0x12, 0x43, 0x0a, 0x1b, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6c, 0x61, 0x79, + 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0xf8, 0x01, 0x0a, 0x0a, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x12, + 0x62, 0x0a, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x46, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x63, 0x78, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x41, 0x75, 0x64, 0x69, + 0x6f, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0x85, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x05, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, + 0x52, 0x05, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x43, 0x0a, 0x1b, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x50, 0x6c, 0x61, 0x79, + 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x48, 0x0a, 0x15, 0x54, + 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x23, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x42, 0xdc, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, + 0x2e, 0x63, 0x78, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x14, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x64, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x63, 0x78, 0x2f, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x78, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x02, 0x44, + 0x46, 0xaa, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x43, 0x78, 0x2e, 0x56, + 0x33, 0x42, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x26, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, + 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x69, 0x61, 0x6c, 0x6f, 0x67, 0x66, 0x6c, + 0x6f, 0x77, 0x3a, 0x3a, 0x43, 0x58, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescOnce sync.Once + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescData = file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDesc +) + +func file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescGZIP() []byte { + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescOnce.Do(func() { + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescData) + }) + return file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDescData +} + +var file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_goTypes = []interface{}{ + (*ResponseMessage)(nil), // 0: google.cloud.dialogflow.cx.v3beta1.ResponseMessage + (*ResponseMessage_Text)(nil), // 1: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + (*ResponseMessage_LiveAgentHandoff)(nil), // 2: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + (*ResponseMessage_ConversationSuccess)(nil), // 3: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + (*ResponseMessage_OutputAudioText)(nil), // 4: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + (*ResponseMessage_EndInteraction)(nil), // 5: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + (*ResponseMessage_PlayAudio)(nil), // 6: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + (*ResponseMessage_MixedAudio)(nil), // 7: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + (*ResponseMessage_TelephonyTransferCall)(nil), // 8: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + (*ResponseMessage_MixedAudio_Segment)(nil), // 9: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + (*structpb.Struct)(nil), // 10: google.protobuf.Struct +} +var file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_depIdxs = []int32{ + 1, // 0: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.text:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Text + 10, // 1: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.payload:type_name -> google.protobuf.Struct + 3, // 2: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.conversation_success:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess + 4, // 3: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.output_audio_text:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.OutputAudioText + 2, // 4: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.live_agent_handoff:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff + 5, // 5: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.end_interaction:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.EndInteraction + 6, // 6: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.PlayAudio + 7, // 7: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixed_audio:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio + 8, // 8: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.telephony_transfer_call:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.TelephonyTransferCall + 10, // 9: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.LiveAgentHandoff.metadata:type_name -> google.protobuf.Struct + 10, // 10: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess.metadata:type_name -> google.protobuf.Struct + 9, // 11: google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.segments:type_name -> google.cloud.dialogflow.cx.v3beta1.ResponseMessage.MixedAudio.Segment + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() } +func file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_init() { + if File_google_cloud_dialogflow_cx_v3beta1_response_message_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_Text); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_LiveAgentHandoff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_ConversationSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_OutputAudioText); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_EndInteraction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_PlayAudio); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_MixedAudio); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_TelephonyTransferCall); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseMessage_MixedAudio_Segment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ResponseMessage_Text_)(nil), + (*ResponseMessage_Payload)(nil), + (*ResponseMessage_ConversationSuccess_)(nil), + (*ResponseMessage_OutputAudioText_)(nil), + (*ResponseMessage_LiveAgentHandoff_)(nil), + (*ResponseMessage_EndInteraction_)(nil), + (*ResponseMessage_PlayAudio_)(nil), + (*ResponseMessage_MixedAudio_)(nil), + (*ResponseMessage_TelephonyTransferCall_)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*ResponseMessage_OutputAudioText_Text)(nil), + (*ResponseMessage_OutputAudioText_Ssml)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[8].OneofWrappers = []interface{}{ + (*ResponseMessage_TelephonyTransferCall_PhoneNumber)(nil), + } + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*ResponseMessage_MixedAudio_Segment_Audio)(nil), + (*ResponseMessage_MixedAudio_Segment_Uri)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_goTypes, + DependencyIndexes: file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_depIdxs, + MessageInfos: file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_msgTypes, + }.Build() + File_google_cloud_dialogflow_cx_v3beta1_response_message_proto = out.File + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_rawDesc = nil + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_goTypes = nil + file_google_cloud_dialogflow_cx_v3beta1_response_message_proto_depIdxs = nil +} diff --git a/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go b/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go new file mode 100644 index 000000000000..688a45a7d32e --- /dev/null +++ b/dialogflow/cx/apiv3beta1/cxpb/security_settings.pb.go @@ -0,0 +1,1700 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.21.5 +// source: google/cloud/dialogflow/cx/v3beta1/security_settings.proto + +package cxpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines how we redact data. +type SecuritySettings_RedactionStrategy int32 + +const ( + // Do not redact. + SecuritySettings_REDACTION_STRATEGY_UNSPECIFIED SecuritySettings_RedactionStrategy = 0 + // Call redaction service to clean up the data to be persisted. + SecuritySettings_REDACT_WITH_SERVICE SecuritySettings_RedactionStrategy = 1 +) + +// Enum value maps for SecuritySettings_RedactionStrategy. +var ( + SecuritySettings_RedactionStrategy_name = map[int32]string{ + 0: "REDACTION_STRATEGY_UNSPECIFIED", + 1: "REDACT_WITH_SERVICE", + } + SecuritySettings_RedactionStrategy_value = map[string]int32{ + "REDACTION_STRATEGY_UNSPECIFIED": 0, + "REDACT_WITH_SERVICE": 1, + } +) + +func (x SecuritySettings_RedactionStrategy) Enum() *SecuritySettings_RedactionStrategy { + p := new(SecuritySettings_RedactionStrategy) + *p = x + return p +} + +func (x SecuritySettings_RedactionStrategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecuritySettings_RedactionStrategy) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[0].Descriptor() +} + +func (SecuritySettings_RedactionStrategy) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[0] +} + +func (x SecuritySettings_RedactionStrategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecuritySettings_RedactionStrategy.Descriptor instead. +func (SecuritySettings_RedactionStrategy) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{6, 0} +} + +// Defines what types of data to redact. +type SecuritySettings_RedactionScope int32 + +const ( + // Don't redact any kind of data. + SecuritySettings_REDACTION_SCOPE_UNSPECIFIED SecuritySettings_RedactionScope = 0 + // On data to be written to disk or similar devices that are capable of + // holding data even if power is disconnected. This includes data that are + // temporarily saved on disk. + SecuritySettings_REDACT_DISK_STORAGE SecuritySettings_RedactionScope = 2 +) + +// Enum value maps for SecuritySettings_RedactionScope. +var ( + SecuritySettings_RedactionScope_name = map[int32]string{ + 0: "REDACTION_SCOPE_UNSPECIFIED", + 2: "REDACT_DISK_STORAGE", + } + SecuritySettings_RedactionScope_value = map[string]int32{ + "REDACTION_SCOPE_UNSPECIFIED": 0, + "REDACT_DISK_STORAGE": 2, + } +) + +func (x SecuritySettings_RedactionScope) Enum() *SecuritySettings_RedactionScope { + p := new(SecuritySettings_RedactionScope) + *p = x + return p +} + +func (x SecuritySettings_RedactionScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecuritySettings_RedactionScope) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[1].Descriptor() +} + +func (SecuritySettings_RedactionScope) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[1] +} + +func (x SecuritySettings_RedactionScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecuritySettings_RedactionScope.Descriptor instead. +func (SecuritySettings_RedactionScope) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{6, 1} +} + +// Type of data we purge after retention settings triggers purge. +type SecuritySettings_PurgeDataType int32 + +const ( + // Unspecified. Do not use. + SecuritySettings_PURGE_DATA_TYPE_UNSPECIFIED SecuritySettings_PurgeDataType = 0 + // Dialogflow history. This does not include Cloud logging, which is + // owned by the user - not Dialogflow. + SecuritySettings_DIALOGFLOW_HISTORY SecuritySettings_PurgeDataType = 1 +) + +// Enum value maps for SecuritySettings_PurgeDataType. +var ( + SecuritySettings_PurgeDataType_name = map[int32]string{ + 0: "PURGE_DATA_TYPE_UNSPECIFIED", + 1: "DIALOGFLOW_HISTORY", + } + SecuritySettings_PurgeDataType_value = map[string]int32{ + "PURGE_DATA_TYPE_UNSPECIFIED": 0, + "DIALOGFLOW_HISTORY": 1, + } +) + +func (x SecuritySettings_PurgeDataType) Enum() *SecuritySettings_PurgeDataType { + p := new(SecuritySettings_PurgeDataType) + *p = x + return p +} + +func (x SecuritySettings_PurgeDataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecuritySettings_PurgeDataType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[2].Descriptor() +} + +func (SecuritySettings_PurgeDataType) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[2] +} + +func (x SecuritySettings_PurgeDataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecuritySettings_PurgeDataType.Descriptor instead. +func (SecuritySettings_PurgeDataType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{6, 2} +} + +// File format for exported audio file. Currently only in telephony +// recordings. +type SecuritySettings_AudioExportSettings_AudioFormat int32 + +const ( + // Unspecified. Do not use. + SecuritySettings_AudioExportSettings_AUDIO_FORMAT_UNSPECIFIED SecuritySettings_AudioExportSettings_AudioFormat = 0 + // G.711 mu-law PCM with 8kHz sample rate. + SecuritySettings_AudioExportSettings_MULAW SecuritySettings_AudioExportSettings_AudioFormat = 1 + // MP3 file format. + SecuritySettings_AudioExportSettings_MP3 SecuritySettings_AudioExportSettings_AudioFormat = 2 + // OGG Vorbis. + SecuritySettings_AudioExportSettings_OGG SecuritySettings_AudioExportSettings_AudioFormat = 3 +) + +// Enum value maps for SecuritySettings_AudioExportSettings_AudioFormat. +var ( + SecuritySettings_AudioExportSettings_AudioFormat_name = map[int32]string{ + 0: "AUDIO_FORMAT_UNSPECIFIED", + 1: "MULAW", + 2: "MP3", + 3: "OGG", + } + SecuritySettings_AudioExportSettings_AudioFormat_value = map[string]int32{ + "AUDIO_FORMAT_UNSPECIFIED": 0, + "MULAW": 1, + "MP3": 2, + "OGG": 3, + } +) + +func (x SecuritySettings_AudioExportSettings_AudioFormat) Enum() *SecuritySettings_AudioExportSettings_AudioFormat { + p := new(SecuritySettings_AudioExportSettings_AudioFormat) + *p = x + return p +} + +func (x SecuritySettings_AudioExportSettings_AudioFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecuritySettings_AudioExportSettings_AudioFormat) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[3].Descriptor() +} + +func (SecuritySettings_AudioExportSettings_AudioFormat) Type() protoreflect.EnumType { + return &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_enumTypes[3] +} + +func (x SecuritySettings_AudioExportSettings_AudioFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecuritySettings_AudioExportSettings_AudioFormat.Descriptor instead. +func (SecuritySettings_AudioExportSettings_AudioFormat) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{6, 0, 0} +} + +// The request message for [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.GetSecuritySettings]. +type GetSecuritySettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Resource name of the settings. + // Format: `projects//locations//securitySettings/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSecuritySettingsRequest) Reset() { + *x = GetSecuritySettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSecuritySettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecuritySettingsRequest) ProtoMessage() {} + +func (x *GetSecuritySettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSecuritySettingsRequest.ProtoReflect.Descriptor instead. +func (*GetSecuritySettingsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{0} +} + +func (x *GetSecuritySettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings]. +type UpdateSecuritySettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. [SecuritySettings] object that contains values for each of the + // fields to update. + SecuritySettings *SecuritySettings `protobuf:"bytes,1,opt,name=security_settings,json=securitySettings,proto3" json:"security_settings,omitempty"` + // Required. The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateSecuritySettingsRequest) Reset() { + *x = UpdateSecuritySettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecuritySettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecuritySettingsRequest) ProtoMessage() {} + +func (x *UpdateSecuritySettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSecuritySettingsRequest.ProtoReflect.Descriptor instead. +func (*UpdateSecuritySettingsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{1} +} + +func (x *UpdateSecuritySettingsRequest) GetSecuritySettings() *SecuritySettings { + if x != nil { + return x.SecuritySettings + } + return nil +} + +func (x *UpdateSecuritySettingsRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request message for [SecuritySettings.ListSecuritySettings][]. +type ListSecuritySettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location to list all security settings for. + // Format: `projects//locations/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The next_page_token value returned from a previous list request. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListSecuritySettingsRequest) Reset() { + *x = ListSecuritySettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecuritySettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecuritySettingsRequest) ProtoMessage() {} + +func (x *ListSecuritySettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSecuritySettingsRequest.ProtoReflect.Descriptor instead. +func (*ListSecuritySettingsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{2} +} + +func (x *ListSecuritySettingsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListSecuritySettingsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListSecuritySettingsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for [SecuritySettings.ListSecuritySettings][]. +type ListSecuritySettingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of security settings. + SecuritySettings []*SecuritySettings `protobuf:"bytes,1,rep,name=security_settings,json=securitySettings,proto3" json:"security_settings,omitempty"` + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListSecuritySettingsResponse) Reset() { + *x = ListSecuritySettingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecuritySettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecuritySettingsResponse) ProtoMessage() {} + +func (x *ListSecuritySettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSecuritySettingsResponse.ProtoReflect.Descriptor instead. +func (*ListSecuritySettingsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{3} +} + +func (x *ListSecuritySettingsResponse) GetSecuritySettings() []*SecuritySettings { + if x != nil { + return x.SecuritySettings + } + return nil +} + +func (x *ListSecuritySettingsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for [SecuritySettings.CreateSecuritySettings][]. +type CreateSecuritySettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for. + // Format: `projects//locations/`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The security settings to create. + SecuritySettings *SecuritySettings `protobuf:"bytes,2,opt,name=security_settings,json=securitySettings,proto3" json:"security_settings,omitempty"` +} + +func (x *CreateSecuritySettingsRequest) Reset() { + *x = CreateSecuritySettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSecuritySettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSecuritySettingsRequest) ProtoMessage() {} + +func (x *CreateSecuritySettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSecuritySettingsRequest.ProtoReflect.Descriptor instead. +func (*CreateSecuritySettingsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateSecuritySettingsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateSecuritySettingsRequest) GetSecuritySettings() *SecuritySettings { + if x != nil { + return x.SecuritySettings + } + return nil +} + +// The request message for [SecuritySettings.DeleteSecuritySettings][]. +type DeleteSecuritySettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete. + // Format: `projects//locations//securitySettings/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteSecuritySettingsRequest) Reset() { + *x = DeleteSecuritySettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecuritySettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecuritySettingsRequest) ProtoMessage() {} + +func (x *DeleteSecuritySettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSecuritySettingsRequest.ProtoReflect.Descriptor instead. +func (*DeleteSecuritySettingsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_dialogflow_cx_v3beta1_security_settings_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteSecuritySettingsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Represents the settings related to security issues, such as data redaction +// and data retention. It may take hours for updates on the settings to +// propagate to all the related components and take effect. +type SecuritySettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Resource name of the settings. + // Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.UpdateSecuritySettings] method. + // [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.CreateSecuritySettings] populates the name + // automatically. + // Format: `projects//locations//securitySettings/`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The human-readable name of the security settings, unique within the + // location. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Strategy that defines how we do redaction. + RedactionStrategy SecuritySettings_RedactionStrategy `protobuf:"varint,3,opt,name=redaction_strategy,json=redactionStrategy,proto3,enum=google.cloud.dialogflow.cx.v3beta1.SecuritySettings_RedactionStrategy" json:"redaction_strategy,omitempty"` + // Defines the data for which Dialogflow applies redaction. Dialogflow does + // not redact data that it does not have access to – for example, Cloud + // logging. + RedactionScope SecuritySettings_RedactionScope `protobuf:"varint,4,opt,name=redaction_scope,json=redactionScope,proto3,enum=google.cloud.dialogflow.cx.v3beta1.SecuritySettings_RedactionScope" json:"redaction_scope,omitempty"` + // [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this + // template to define inspect base settings. + // + // The `DLP Inspect Templates Reader` role is needed on the Dialogflow + // service identity service account (has the form + // `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + // for your agent's project. + // + // If empty, we use the default DLP inspect config. + // + // The template name will have one of the following formats: + // `projects//locations//inspectTemplates/